I am trying to create a new set of Qt packages for an older version of Ubuntu (Focal Fossa). I am using a newer release of Ubuntu than the one I am creating packages for, so I am using pbuilder-dist
which automates the creation of a chroot for the intended distribution. During this process, I have encountered a chicken and egg problem, where the qtbase ubuntu repo (that contains the necessary debian/control
rules, etc) contains an optional requirement on Qt documentation tools, which themselves depend on the base packages. It appears this is normally worked around by specifying the nodoc
debian build profile using the environment variable DEB_BUILD_PROFILES
, which will skip these requirements when performing the pbuilder build, however it doesn't seem to work.
I see the logic in the pbuilder-dist implementation (filter_restriction_deps
in /usr/lib/pbuilder/pbuilder-satisfydepends-funcs
) that should be reading the environment variable and filtering out the dependencies that are marked !nodoc
when nodoc
is specified, but any means of me specifying DEB_BUILD_PROFILES
seems to be ignored.
From poking around the various documentation for the debian packaging tools, there should be a way to specify this, but it eludes me. For the moment I have very crudely worked around this by just removing these optional dependencies from the build before issuing the pbuilder-dist
command line.
Can someone inform me how I can pass a build profile specifier to pbuilder_dist
?
To answer my own question, there is a --profiles
option to pbuilder-dist
which fulfills this task. Environment variables do not seem to pass onto the pbuilder
command that pbuilder-dist
runs, however the --profiles
option does.
So, to solve this, I add --profiles nodoc
on the command line for the pbuilder-dist
command:
pbuilder-dist focal build --profiles nodoc ../qtbase-opensource-src_5.15.9+kkyz-0.1.2.dsc