Debian release specific control file

294 Views Asked by At

I am a bit confused about the question, Is it possible to control the package dependencies on Debian version specific?

In control file we need to specify the dependencies in "Depends" field, So if we want to make a single package for different Debian releases(Wheezy, Jessie, and Stretch) and if the dependencies are different for different release, then how can we define these kinds of dependencies in control file?

Thank You

1

There are 1 best solutions below

0
On

Depends on the dependencies.

Some packages have metapackages that automatically include right version for the active Debian release. The PHP packages, in particular, do that. For example, the php-curl package depends on php7.0-curl in stretch, and php7.3-curl in buster. If your package depends on php-curl, you'll automatically get the right version. The postgresql package does the same, pulling in postgresql-11 or postgresql-9.6, depending on the Debian release.

If that doesn't work, you can try creating two binary packages in your source package called myapp-jessie and myapp-stretch, each of which depend on the right sets of packages for their release. Then in the main package:

Depends: myapp-jessie | myapp-stretch

If none of those ideas work, you may need to maintain multiple control files, stand up an apt repo per release, build multiple packages, and deploy each to the appropriate apt repo.

What specific dependencies do you have?