dpkg-buildflags Ubuntu vendor module incompatible with Debaain
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dpkg (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Description: Ubuntu 24.04 LTS
Release: 24.04
dpkg:
Installed: 1.22.6ubuntu6
Candidate: 1.22.6ubuntu6
Version table:
*** 1.22.6ubuntu6 500
500 http://
100 /var/lib/
expected: i expect dpkg-buildflags --get CFLAGS to include -ffile-
observed: if run in a directory with a valid debian/changelog, dpkg-buildflags --get CFLAGS includes both -ffile-
analysis:
The Debian vendor module's "reproducible" support, which is what's also documented by the reproducibility project, will include -ffile-
the code from Vendor/Debian.pm does as follows:
# Avoid storing the build path in the binaries.
if ($flags-
my $build_path = $flags-
my $map;
# -ffile-prefix-map is a superset of -fdebug-prefix-map, prefer it
# if both are set.
if ($flags-
$map = '-ffile-
} else {
$map = '-fdebug-
}
}
Starting in 1.22.0ubuntu1, the Ubuntu vendor code *almost* unconditionally adds -fdebug-
It also means dpkg-buildflags behavior changes depending on whether it can parse a file ./debian/changelog and find version and source in it or not.
That code is here:
} elsif (-r 'debian/changelog') {
require Dpkg::Changelog
my $pkgchangelog = Dpkg::Changelog
my $chgentry = @{$pkgchangelog
my $pkgver = $chgentry-
my $pkgsrc = $chgentry-
if ($pkgver ne "" && $pkgsrc ne "") {
my $debugprefixmap = '-fdebug-
# Strip any existing -fdebug-prefix-map flag.
}
}
It *should* define -ffile-prefix-map *or* -fdebug-prefix-map based on the same metric Debian uses, and strip all other instances of both.
tags: | added: release-oo-incoming |
tags: |
added: release-nn-incoming removed: release-oo-incoming |