Monday 17 June 2024

Re: dpkg 1.22.6ubuntu11 enables ELF packaging metadata

On Sat, 15 Jun 2024 at 10:46, Benjamin Drung <bdrung@ubuntu.com> wrote:
Hi everyone,

Hi Benjamin,
 
I just uploaded dpkg 1.22.6ubuntu11 to Ubuntu oracular. This version
enables ELF packaging metadata via dpkg-buildflags by default. ELF
objects will record the spec https://systemd.io/ELF_PACKAGE_METADATA/

So these changes break a few things, because they assume that if the environment is affected by dpkg-buildflags, it is also affected by code that is only part of running dpkg-buildpackage itself. There are a few ways that this can go wrong:

1) running "./debian/rules binary" or whatever instead of dpkg-buildpackage (which afaict is still the interface to package building that's dictated by policy)
2) code like that in cargo-auto-test that sources dpkg-buildflags output to get behaviour close to a package build without actually doing a package build.

I don't know what the ideal change for this is. I guess the code in add_build_flags could check that the DPKG_BUILDPACKAGE_* variables the spec files need are defined before including the spec files in LDFLAGS?

Cheers,
mwh