What is the detailed process of resolving `${shlibs:Depends}` when creating a Debian package?

My recent work involves a lot of Debian packaging, and I'm using the Debian New Maintainers' Guide as my main reference.

What I haven't fully understood is how the ${shlibs:Depends} is resolved into specific packages and versions. By "how" I mean the detailed steps from the variable ${shlibs:Depends} to the final list of packages in the Depends field.

Chapter 4 says:

dh_shlibdeps(1) calculates shared library dependencies for binary packages. It generates a list of ELF executables and shared libraries it has found for each binary package. This list is used for substituting ${shlibs:Depends}.

I think what I'm really interested in are the detailed steps of "generates a list of ELF executables and shared libraries it has found for each binary package", such as what are the information sources used.

I also looked at the section "8.6.4. The shlibs system" in the Debian Policy Manual, it does give some information sources but still doesn't seem to talk about the detailed steps either.

I can surely dig into the dh_shlibdeps script to figure out how it is done, but I'm reluctant to do so because I have not learned Perl yet, so I would like to see if there is any other reference I'm not aware of that's already covered this. If there is no such reference, I'll surely read the code.

Thanks!

1

1 Answer

This topic is new to me too, but here what could collect (may be not exactly sorted) and omitted some global setting files.

ldd
dpkg -S
deb-shlibs
objdump
deb-symbols
dpkg-gensymbols
debian/shlibs.local
dpkg-shlibdeps
debian/substvars .. shlibs:dependency-field

Quiet complicated with symbol resolving, some of tools are just run on dependency lib not dependent package just prepare lib info include in lib Debian package for Debian package builder. Anyway you check:

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like