Search code examples
debianpackagingdebsoftware-packaging

debuild - dependencies set but without version


Lets say I have the following package: zs-boost_1.71.0_armhf.deb. This is custom package that installs boost 1.71 to some custom location (assume /opt/deps).

I also have project that uses this library. It builds and runs fine. Now I'm packaging it. I have the following in debian/control file:

Depends: ${shlibs:Depends}, ${misc:Depends}

I build package using: debuild -b -us -uc -aarmhf. Package can be built and works as expected. My only problem is that its Depends entry in deb's control file is as follows:

Depends: Depends: libc6 (>= 2.9), libpq5 (>= 9.0~), zs-boost, init-system-helpers (>= 1.18~)

Note that zs-boost has no version. How can I fix it? Is it caused by installation to custom directory? I'd assume that if package was identified correctly, then its version should be used as well?

debian/package.substvars contains the following line for shlibs:

shlibs:Depends=libc6 (>= 2.9), libssl1.1 (>= 1.1.0), libuuid1 (>= 2.16), zs-boost

What should I do for the dependencies to be properly versioned? Note that I am not interested in providing version numbers manually, this is only one package and we have 20+ packages that are constantly updated and rebuilt and doing it by hand is out of question.

Thanks in advance.


Solution

  • If you want a versioned dependency, put one in debian/control.

    Depends: zs-boost (>= 1.71.0)
    

    The versioned dependency on a specific version of libc6 you see in the generated shlibs is ultimately down to a similar explicit declaration determined (usually conservatively and with great care) by a package maintainer.