dpkg: ELF package metadata prevents some packages from building

Bug #2069722 reported by Adrien Nader
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpkg (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Some packages do not build anymore, citing a missing environment variable. This can be reproduced by not using dpkg-buildpackage. For example build chaos-marmosets:

```
$ debian/rules binary
[...]
cc: fatal error: environment variable ‘DPKG_BUILDPACKAGE_PACKAGE_ARCH’ not defined
```

Related branches

Benjamin Drung (bdrung)
description: updated
Revision history for this message
Adrien Nader (adrien) wrote (last edit ):

Based on autopkgtests, at least these packages are impacted: asymptote, golang-logrus, graphite2, gsequencer, mosh, python-cmake-build-extension, rust-libc, seqan3, slt.

Based on my own experience, camitk is also impacted.

Benjamin Drung (bdrung)
Changed in dpkg (Ubuntu):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Benjamin Drung (bdrung) wrote :

Pushed proposed fix to https://code.launchpad.net/~bdrung/ubuntu/+source/dpkg/+git/dpkg/+ref/ubuntu/devel

Now the env variable names to not match. I suggest renaming them from DPKG_BUILDPACKAGE_* to DEB_BUILD_* instead.

Benjamin Drung (bdrung)
Changed in dpkg (Ubuntu):
status: Triaged → In Progress
status: In Progress → Fix Committed
Revision history for this message
Alessandro Astone (aleasto) wrote :

Is it expected to require such changes to autopkgtests now?

https://code.launchpad.net/~aleasto/ubuntu/+source/graphite2/+git/graphite2/+merge/467970

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpkg - 1.22.6ubuntu14

---------------
dpkg (1.22.6ubuntu14) oracular; urgency=medium

  * Export environment variables DEB_BUILD_OS_RELEASE_ID, DEB_HOST_ARCH,
    DEB_SOURCE, and DEB_VERSION when including buildflags.mk (LP: #2070015)
  * buildflags: document RUSTFLAGS
  * buildflags: Always set RUSTFLAGS
  * buildflags: set origin of env vars for ELF package metadata

 -- Benjamin Drung <email address hidden> Fri, 21 Jun 2024 18:46:10 +0200

Changed in dpkg (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.