[Bug 2054741] Re: dpkg-buildpackage ignores DEB_BUILD_PROFILES
Luca Boccassi
2054741 at bugs.launchpad.net
Thu Mar 7 13:39:00 UTC 2024
Pick any package and add to debian/rules:
execute_before_dh_auto_clean:
echo $(DEB_BUILD_PROFILES)
exit 1
root at jammy:/tmp/s# dpkg-buildpackage -uc -us -b
dpkg-buildpackage: info: source package systemd
dpkg-buildpackage: info: source version 255.4-1
dpkg-buildpackage: info: source distribution sid
dpkg-buildpackage: info: source changed by Luca Boccassi <bluca at debian.org>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
debian/rules clean
dh clean --without autoreconf --buildsystem=meson
debian/rules execute_before_dh_auto_clean
make[1]: Entering directory '/tmp/s'
echo noudeb
noudeb
exit 1
make[1]: *** [debian/rules:179: execute_before_dh_auto_clean] Error 1
make[1]: Leaving directory '/tmp/s'
make: *** [debian/rules:291: clean] Error 2
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2
root at jammy:/tmp/s# DEB_BUILD_PROFILES=foo dpkg-buildpackage -uc -us -b
dpkg-buildpackage: info: source package systemd
dpkg-buildpackage: info: source version 255.4-1
dpkg-buildpackage: info: source distribution sid
dpkg-buildpackage: info: source changed by Luca Boccassi <bluca at debian.org>
dpkg-buildpackage: info: host architecture amd64
dpkg-source --before-build .
debian/rules clean
dh clean --without autoreconf --buildsystem=meson
debian/rules execute_before_dh_auto_clean
make[1]: Entering directory '/tmp/s'
echo noudeb foo
noudeb foo
exit 1
make[1]: *** [debian/rules:179: execute_before_dh_auto_clean] Error 1
make[1]: Leaving directory '/tmp/s'
make: *** [debian/rules:291: clean] Error 2
dpkg-buildpackage: error: debian/rules clean subprocess returned exit status 2
root at jammy:/tmp/s# apt-cache policy dpkg
dpkg:
Installed: 1.21.1ubuntu2.3
Candidate: 1.21.1ubuntu2.3
Version table:
*** 1.21.1ubuntu2.3 500
500 http://azure.archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
100 /var/lib/dpkg/status
1.21.1ubuntu2.3~ppa22.04.1 500
500 https://ppa.launchpadcontent.net/upstream-systemd-ci/systemd-ci/ubuntu jammy/main amd64 Packages
1.21.1ubuntu2.2 500
500 http://azure.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
1.21.1ubuntu2.1 500
500 http://azure.archive.ubuntu.com/ubuntu jammy-security/main amd64 Packages
1.21.1ubuntu2 500
500 http://azure.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to dpkg in Ubuntu.
https://bugs.launchpad.net/bugs/2054741
Title:
dpkg-buildpackage ignores DEB_BUILD_PROFILES
Status in dpkg package in Ubuntu:
Fix Released
Status in dpkg source package in Jammy:
Fix Committed
Status in dpkg source package in Mantic:
Fix Committed
Status in dpkg source package in Noble:
Fix Released
Bug description:
[Impact]
DEB_BUILD_PROFILES= can be used in Debian to specify a build profile
to use with dpkg-buildpackage. We want to use it in the systemd
project to build the upstream packages for the Ubuntu autopkgtest
cloud CI on Github. But in the Ubuntu's fork of dpkg,
DEB_BUILD_PROFILES's value is ignored and unconditionally swapped with
'noudeb'. This makes it impossible to use package-specific profiles,
and it's a regression w.r.t Debian.
[Fix]
Backport patch from Noble that fixes the issue: https://code.launchpad.net/~bluca/ubuntu/+source/dpkg/+git/dpkg/+merge/461136
and takes into account if the environment variable is set when reading the profile
[Test]
To reproduce it, simply print the content of DEB_BUILD_PROFILES in
d/rules in any package and build with DEB_BUILD_PROFILES=foo dpkg-
buildpackage. Before the fix, whatever is passed via the env var is
ignored. After the fix, it will be respected.
[Regression Potential]
dpkg-buildpackage is used to build all packages, so in case of
unforeseen issues other packages could potentially fail to build. A
unit test exercising this change is included in the patch to minimize
potential for regressions.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dpkg/+bug/2054741/+subscriptions
More information about the foundations-bugs
mailing list