Re: pbuilder and ${shlibs:Depends}
On Sat, 19 Mar 2011, Panayiotis Karabassis wrote: > So, to summarize: > > If: > a) /usr/bin/foo of package foo needs at RUN-TIME /usr/lib/libbar.so > b) /usr/lib/libbar.so is packaged under package libbar > > then I need to: > c) add package libbar-dev as a BUILD dependency of foo. > > And dh_shlibdeps will do its magic? How does this work exactly? Yes. man dpkg-shlibdeps to understand the details. > d) Does libbar-dev provide a DEBIAN/shlibs file that says that libbar.so > is packaged in package libbar? No, "libbar" provides the shlibs/symbols file but libbar-dev depends on libbar so you get it implicitely. And you also need the /usr/include files in libbar-dev... > Is the above correct? Almost. Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110319080436.gb31...@rivendell.home.ouaza.com
Re: pbuilder and ${shlibs:Depends}
On Fri, 18 Mar 2011, Paul Gevers wrote: > > Unfortunately this is wrong, at least for ELF binaries. Usually if you > > don't have all the dependencies that you expect, it's because they are > > optional and are disabled when they are not found during ./configure. > > Although I am just a simple DM, I still don't agree completely. Both my > upstreams call binaries (not libraries) in their programs (via a shell > or system call). As far as I can tell, that won't (and should not by the > name) be picked up by the ${shlibs:Depends} variable. Especially for the > shell call, I don't see an other way than providing it manually. You're right on this one. But I think the question was about libraries from the start. Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110319080222.ga31...@rivendell.home.ouaza.com
Re: pbuilder and ${shlibs:Depends}
> Unfortunately this is wrong, at least for ELF binaries. Usually if you > don't have all the dependencies that you expect, it's because they are > optional and are disabled when they are not found during ./configure. > > Thus the correct solution is to add the required -dev packages in the > Build-Depends so that ./configure finds the optional libraries that you > want your program to use. So, to summarize: If: a) /usr/bin/foo of package foo needs at RUN-TIME /usr/lib/libbar.so b) /usr/lib/libbar.so is packaged under package libbar then I need to: c) add package libbar-dev as a BUILD dependency of foo. And dh_shlibdeps will do its magic? How does this work exactly? d) Does libbar-dev provide a DEBIAN/shlibs file that says that libbar.so is packaged in package libbar? Is the above correct? > You did not save some complication you just got wrong information due to > this. It's unlikely that jh_depends works like dpkg-shlibdeps. > > I guess you need to have all the jars installed at build time and thus you > want to add them to Build-Depends. But you should really ask for > confirmation someone on debian-java@ or an experienced java packager (or > maybe it's in jh_depends documentation). Indeed. I will post to the appropriate list. Regards, Panayiotis -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d83e270.7080...@gmail.com
Re: pbuilder and ${shlibs:Depends}
>>> Add the missing dependencies manually AND use the variable. (At least >>> this is what I do in all my packages. >> >> Thank you very much! This is really all I needed to know. > > Unfortunately this is wrong, at least for ELF binaries. Usually if you > don't have all the dependencies that you expect, it's because they are > optional and are disabled when they are not found during ./configure. Although I am just a simple DM, I still don't agree completely. Both my upstreams call binaries (not libraries) in their programs (via a shell or system call). As far as I can tell, that won't (and should not by the name) be picked up by the ${shlibs:Depends} variable. Especially for the shell call, I don't see an other way than providing it manually. > Adding manual dependencies on C libraries is almost always wrong. Here I think I agree. Paul signature.asc Description: OpenPGP digital signature
Re: pbuilder and ${shlibs:Depends}
On Fri, 18 Mar 2011, Panayiotis Karabassis wrote: > I am still a little confused about this. Could you provide an > example/documentation to clarify this? From experience, I believe that > it WILL expand to LIBRARIES (not executables) that the program needs to > run, if said libraries are installed at build time. If not, what's its > purpose? It will expand to libraries which are listed in the NEEDED section of the ELF binaries present in your package. > > Add the missing dependencies manually AND use the variable. (At least > > this is what I do in all my packages. > > Thank you very much! This is really all I needed to know. Unfortunately this is wrong, at least for ELF binaries. Usually if you don't have all the dependencies that you expect, it's because they are optional and are disabled when they are not found during ./configure. Thus the correct solution is to add the required -dev packages in the Build-Depends so that ./configure finds the optional libraries that you want your program to use. Adding manual dependencies on C libraries is almost always wrong. > BTW, I'm not actually using dpkg-shlibdeps, but rather jh_depends. I > wanted to save some complication, since most developers are probably > more familiar with the former. You did not save some complication you just got wrong information due to this. It's unlikely that jh_depends works like dpkg-shlibdeps. I guess you need to have all the jars installed at build time and thus you want to add them to Build-Depends. But you should really ask for confirmation someone on debian-java@ or an experienced java packager (or maybe it's in jh_depends documentation). Cheers, -- Raphaël Hertzog ◈ Debian Developer Follow my Debian News ▶ http://RaphaelHertzog.com (English) ▶ http://RaphaelHertzog.fr (Français) -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110318194013.ga27...@rivendell.home.ouaza.com
Re: pbuilder and ${shlibs:Depends}
On Fri, Mar 18, 2011 at 04:46:00PM +0200, Panayiotis Karabassis wrote: > Hi, I have a question regarding pbuilder. > > My Debian package uses ${shlibs:Depends} in its Depends field. > > However, in a pbuilder environment not all dependencies are installed, > and hence ${shlibs:Depends} does not expand to *all* real dependencies. *Build* dependancies are not automatically guessed, you need to provide explicit Build-Depends so that pbuilder installs them. {shlibs:Depends} is to be used to produce dependancies for binary packages. > My question is: how do I add the missing dependencies? > > a) Put them in Build-Depends so dpkg-shlibdeps can find them? (ugly) > b) Drop ${shlibs:Depends} and list them manually? > c) Something else? Read: http://www.debian.org/doc/debian-policy/ap-pkg-sourcepkg.html http://www.debian.org/doc/debian-policy/ch-sharedlibs.html -- Simon Paillard -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20110318193208.gh12...@glenfiddich.ikibiki.org
Re: pbuilder and ${shlibs:Depends}
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/18/2011 05:57 PM, Paul Gevers wrote: > I believe that this variable will only resolve libraries which you > depend on (and you need the -dev package in the build dependencies). It > will never find a executable which you need to RUN your program. I am still a little confused about this. Could you provide an example/documentation to clarify this? From experience, I believe that it WILL expand to LIBRARIES (not executables) that the program needs to run, if said libraries are installed at build time. If not, what's its purpose? To support the above: >dh_shlibdeps is a debhelper program that is responsible for calculating >shared library dependencies for packages. > >This program is merely a wrapper around dpkg-shlibdeps(1) that calls it >once for each package listed in the control file, passing it a list of >ELF executables and shared libraries it has found. Sorry, I didn't understand the part about the -dev package. I'm a little stupid... :-D > Add the missing dependencies manually AND use the variable. (At least > this is what I do in all my packages. Thank you very much! This is really all I needed to know. BTW, I'm not actually using dpkg-shlibdeps, but rather jh_depends. I wanted to save some complication, since most developers are probably more familiar with the former. > Paul Again thank you, regards, Panayiotis -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJNg4tPAAoJEN7RcJcJCZJi0ZYIALLZiRx9plW6aXR0Ef+UzE8O 3JnU35r0OC2IRLSIGleFYN7rVzswcdSxLNjy8NIEVoknrNAYnW014Pyd8JYHyacY ybITtC4vF9V7NYneXty50zRCnF4n9zRdK744rwiQNfDUWdTXbLhv3DQrsuTCwbVW ZwmFZFnFbNO14NbKf+o9YEJKPJa00ZRS92asNDfKmOZS4oqpQdr+rYSQQmrYYXzY lUmOoLz940QyzWseXUScWHdwaxy1wHK+jOHXaF+vdpxEgJ/u/3FVu+MEPdRfjHY3 MpJNCKXPjQ0ULX57zGiHFB4qDUmeQClngxFR9NcpO9pWFsyu4ANFlrkIg8ivzt8= =z29R -END PGP SIGNATURE- -- To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/4d838b53.6010...@gmail.com
Re: pbuilder and ${shlibs:Depends}
> My Debian package uses ${shlibs:Depends} in its Depends field. > > However, in a pbuilder environment not all dependencies are installed, > and hence ${shlibs:Depends} does not expand to *all* real dependencies. I believe that this variable will only resolve libraries which you depend on (and you need the -dev package in the build dependencies). It will never find a executable which you need to RUN your program. > My question is: how do I add the missing dependencies? > > a) Put them in Build-Depends so dpkg-shlibdeps can find them? (ugly) I believe this WON't help > b) Drop ${shlibs:Depends} and list them manually? > c) Something else? Add the missing dependencies manually AND use the variable. (At least this is what I do in all my packages. Paul signature.asc Description: OpenPGP digital signature