On Thu, Feb 11, 2021 at 10:50:35PM +0200, Boian Bonev wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > Hi All, > > While playing with glibc 2.33 (I made a couple of changes on the 2.31-9 > and built it locally), I stumbled upon the following generated > dependency in libnih1: > > $ apt info libnih1 > Package: libnih1 > Version: 1.0.3-11 > Priority: optional > Section: libs > Source: libnih > Maintainer: Debian QA Group <packa...@qa.debian.org> > Installed-Size: 214 kB > Depends: libc6 (>> 2.31), libc6 (<< 2.32) > Homepage: https://launchpad.net/libnih > Tag: role::shared-lib > ... > > Looking into libnih source package didn't make it obvious for me what > part of libnih requires this dependency. Can someone aware with that > package shed some light?
So... I just learned something new today, thanks! :) My first thought was "dpkg-shlibdeps and symbols files". So in short: - once upon a time, the library -dev packages came with a .shlibs file that said "if you use this package to compile against the library, you need to add these dependencies to your binary package" - this was... less than optimal in many cases, e.g. it was lacking granularity, so sometimes it would introduce dependencies on needlessly high versions when a much lower version of the same library would suffice - the library symbols file mechanism was introduced; start at https://wiki.debian.org/UsingSymbolsFiles https://www.debian.org/doc/debian-policy/ch-sharedlibs.html#the-symbols-system ...and hit me up (or, of course, feel free to ask on the list) if you have any more questions about the symbols files and their use... there was a time when I misled some people into thinking that I would actually help with updating the library packaging guide (yeah, sorry about that, everyone) OK, so basically what you need to do is take a look at any of the /var/lib/dpkg/info/libc6:*.symbols files that ought to be present on your system (I guess you have at least one libc6-dev package installed) and look at its second line... ...and here's the part that I learned today: I hadn't realized that a symbols file could actually declare any dependencies that it wanted, I thought that its job was only to say "this symbol appeared in this version, so if your program uses it, you need to depend on that". But, yeah, the libc6 symbols file actually declares a << dependency relation, too, so there it is :) Hope that helped! G'luck, Peter -- Peter Pentchev r...@ringlet.net r...@debian.org p...@storpool.com PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint 2EE7 A7A5 17FC 124C F115 C354 651E EFB0 2527 DF13
signature.asc
Description: PGP signature