Deb packaging: Ensuring dependencies are installed

If none of the more specific forums is the right place to ask

Deb packaging: Ensuring dependencies are installed

Postby ChrisOfBristol » 2020-10-27 21:01

This is a deb package file creation problem, rather than a Debian distribution problem, I hope this is the correct place to post this query.

I have made a deb package and if I install it from the file using "apt install myapp.deb" it installs the dependency listed in the "Requires:" statement in the control file. If I right-click on it and use the Software application to do it (on Ubuntu, but I imagine things would be similar on other Debian based distributions), it doesn't install the dependency, this is what I would expect to happen had I used dpkg. What do I need to do to the package, presumably in the control file to force it to install the dependency? Having read the documentation, the "Requires:" statement seems to be as strong as it gets!
Ubuntu Budgie 20.10
ChrisOfBristol
 
Posts: 38
Joined: 2012-03-28 05:43

Re: Deb packaging: Ensuring dependencies are installed

Postby peter_irich » 2020-10-28 18:12

If it is your deb-packet also are have the source code.
You can ran it through strace and it will show which libraries it used.
Then with you can find this libraries and with "dpkg -S ... " find its packages and include its in your DEBIAN/control
and rebuild your deb-packet and try install it again.

Peter.
peter_irich
 
Posts: 1299
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: Deb packaging: Ensuring dependencies are installed

Postby stevepusser » 2020-10-29 12:19

Lacking any information, we can not know where you went wrong. Properly built Debian packages automatically determine the dependencies and minimum versions thereof for compiled binaries via the replacement of the dh_shlibdeps variable in "Depends", but scripting languages like Python or Perl need those added manually to the package "Depends:" field in debian/control (not the DEBIAN/control in the final deb--that's completely different).

So we'd need to see your debian/control and debian/rules files, plus what command you used to build the deb, just for a start.
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12136
Joined: 2009-10-06 05:53

Re: Deb packaging: Ensuring dependencies are installed

Postby peter_irich » 2020-10-29 19:56

But deb-packet contains exactly DEBIAN/conrol with Depends: ......
peter_irich
 
Posts: 1299
Joined: 2009-09-10 20:15
Location: Saint-Petersburg, Russian Federation

Re: Deb packaging: Ensuring dependencies are installed

Postby ChrisOfBristol » 2020-10-30 00:03

stevepusser wrote:need to see your debian/control and debian/rules files, plus what command you used to build the deb, just for a start.

A while ago I managed to create a working deb file with your help. I have since spent some time checking and tidying things up and spotted that I had always installed the hugin-tools dependency before installing myapp. In trying to simulate what a user would get as closely as possible, instead of using dpkg, I right-clicked on the file so "Software" installs it. Despite the dependency being stated it doesn't install it.

rules
Code: Select all
#!/usr/bin/make -f 
export DH_VERBOSE=1
export PYBUILD_NAME=myapp
#export PYBUILD_INSTALL_ARGS=--install-lib=/usr/share/myapp/ --install-scripts=/usr/share/myapp/
%: 
   dh $@ --with python3 --buildsystem=pybuild


control
Code: Select all
Source: myapp
Priority: optional
Maintainer: Me <myapp@yahoo.com>
Homepage: https://github.com/myapp/myapp
Build-Depends: debhelper (>= 10.0.0), dh-python, python3-all, python-setuptools
Standards-Version: 4.3.0
XS-Python-Version: 3.7
Section: graphics

Package: myapp
Architecture: all
Depends: hugin-tools, ${misc:Depends}, ${python3:Depends}
Description: Blah, blah.


command
I created a source package in the past in the (vain) hope of getting a sponsor/mentor interested in it, but recently have only created binary packages with
Code: Select all
debuild -i -us -uc

Since you asked what command I used, I tried building a source file with
Code: Select all
debuild -i -us -uc -S

then another binary file.
The dependency is now satisfied when I install it with "Software". Should I assume that I must have added the dependency statement in between previously building the source package and rebuilding it today and that is what has made the difference?
Ubuntu Budgie 20.10
ChrisOfBristol
 
Posts: 38
Joined: 2012-03-28 05:43

Re: Deb packaging: Ensuring dependencies are installed

Postby stevepusser » 2020-10-30 10:54

peter_irich wrote:But deb-packet contains exactly DEBIAN/conrol with Depends: ......


I specifically already said that file is not the one I'm talking about. Yes, you added the hugin-tools dependency in the original debian/control file, that made it work. Python is a scripting language, thus most dependencies must be specified manually by the packager. However, even binaries would probably need a manual depends for hugin-tools, much like MystiQ or WinFF need one for an outside tool (ffmpeg).
MX Linux packager and developer
User avatar
stevepusser
 
Posts: 12136
Joined: 2009-10-06 05:53


Return to General Questions

Who is online

Users browsing this forum: No registered users and 20 guests

fashionable