Your message dated Mon, 23 Aug 2021 13:04:04 +0000
with message-id <[email protected]>
and subject line Bug#992622: fixed in pkgconf 1.8.0-1
has caused the Debian Bug report #992622,
regarding pkgconf: stores different system library paths if built with/without
merged-/usr
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
992622: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992622
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pkgconf
Version: 1.7.4~git20210206+dcf529b-3
Severity: important
Tags: patch
User: [email protected]
Usertags: usrmerge
X-Debbugs-Cc: [email protected]
If pkgconf is built on a merged-/usr system (as created by new
installations of Debian >= 10, debootstrap --merged-usr, or installing
the usrmerge package into an existing installation), the list of
standard library directories is not the same as if pkgconf is built on
a non-merged-/usr system (for example current official buildd chroots).
This is the same bug as https://bugs.debian.org/992620 in pkg-config,
for the same reason.
This can be seen on the reproducible-builds.org infra:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/pkgconf.html
(search for "/usr/lib:" to see the difference I'm concerned about).
If you have sbuild available, an easy way to reproduce this is to build
pkgconf twice, once with --add-depends-arch=usrmerge and once without.
The potentially problematic situation is if pkgconf is *built* on a
merged-/usr system, but *used* on a non-merged-/usr system.
Technical Committee resolution #978636 mandates heading towards a
transition to merged-/usr, and this will become a non-issue at the end of
that transition; but variation between merged-/usr and non-merged-/usr
builds is a problem while that transition is taking place, because it can
lead to partial upgrades behaving incorrectly.
The attached patches resolve this: with them applied, the package builds
identically with and without --add-depends-arch=usrmerge.
I'll send a merge request for this when I have a bug number.
A side benefit of fixing this is that this change might be sufficient
to make the package reproducible (as recommended by Policy ยง4.15): the
rest of the variation shown on reproducible-builds.org appears to be just
side-effects from the differing length of the system library path.
smcv
>From e94e9d6092fcf76efbdc6acf9b2a80826f739e79 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Sat, 21 Aug 2021 12:00:15 +0100
Subject: [PATCH 1/2] d/rules: Factor out computation of system library path
into a script
Breaking it up one line per command makes it easier to add more code than
when it was inlined it into debian/rules, and avoids needing to double
the $ for shell variables.
Based on a patch sent to pkg-config for #992620, but taking the fix
for #792285 into account in this version.
Signed-off-by: Simon McVittie <[email protected]>
---
debian/rules | 5 +----
debian/system-libdirs.sh | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 4 deletions(-)
create mode 100755 debian/system-libdirs.sh
diff --git a/debian/rules b/debian/rules
index 35fa4cb..3f58ea5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -21,10 +21,7 @@ else
GCC = gcc
endif
-SYSTEM_LIBDIRS := $(shell for opt in '' $$($${CC-$(GCC)} -print-multi-lib | sed -n -e's/.*;@/-/p'); do \
- $(GCC) $$opt -print-search-dirs | sed -n -e's/^libraries: =//p' \
- | sed -e's/:/\n/g' | xargs -n1 readlink -f | grep -v 'gcc\|/[0-9.]\+$$'; \
- done | LC_ALL=C sort -u | tr '\n' : | sed 's/:$$//')
+SYSTEM_LIBDIRS := $(shell sh debian/system-libdirs.sh $(GCC))
%:
dh $@
diff --git a/debian/system-libdirs.sh b/debian/system-libdirs.sh
new file mode 100755
index 0000000..d011a31
--- /dev/null
+++ b/debian/system-libdirs.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+set -eu
+
+gcc="$1"
+
+for opt in '' $(${CC-"$gcc"} -print-multi-lib | sed -n -e's/.*;@/-/p'); do
+ "$gcc" $opt -print-search-dirs |
+ sed -n -e 's/^libraries: =//p' |
+ sed -e 's/:/\n/g' |
+ xargs -n1 readlink -f |
+ grep -v 'gcc\|/[0-9.]\+$'
+done |
+LC_ALL=C sort -u |
+tr '\n' : |
+sed 's/:$//'
--
2.33.0
>From f42e2d44511b7bb7465e507734019632d5ba485e Mon Sep 17 00:00:00 2001
From: Simon McVittie <[email protected]>
Date: Wed, 18 Aug 2021 01:49:10 +0100
Subject: [PATCH 2/2] d/system-libdirs.sh: Always list directories with and
without /usr
Until/unless all Debian systems are merged-/usr, pkg-config needs to
use a search path that includes both /usr/lib/i386-linux-gnu
and /lib/i386-linux-gnu, and so on for other architectures, even if
those directories are the same directory (hence normalized to the same
thing by `readlink -f`) on the system where pkg-config was built.
Because we already put the list of paths through `sort -u`, the easiest
way is to always both variants of each path, and let `sort -u` collapse
the duplicates into one.
Based on a patch sent to pkg-config for #992620.
Signed-off-by: Simon McVittie <[email protected]>
---
debian/system-libdirs.sh | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/debian/system-libdirs.sh b/debian/system-libdirs.sh
index d011a31..788c74b 100755
--- a/debian/system-libdirs.sh
+++ b/debian/system-libdirs.sh
@@ -11,6 +11,21 @@ for opt in '' $(${CC-"$gcc"} -print-multi-lib | sed -n -e's/.*;@/-/p'); do
xargs -n1 readlink -f |
grep -v 'gcc\|/[0-9.]\+$'
done |
+while read -r line; do
+ case "$line" in
+ (/usr/*)
+ echo "$line"
+ echo "${line#/usr}"
+ ;;
+ (/lib*)
+ echo "$line"
+ echo "/usr$line"
+ ;;
+ (*)
+ echo "$line"
+ ;;
+ esac
+done |
LC_ALL=C sort -u |
tr '\n' : |
sed 's/:$//'
--
2.33.0
--- End Message ---
--- Begin Message ---
Source: pkgconf
Source-Version: 1.8.0-1
Done: Andrej Shadura <[email protected]>
We believe that the bug you reported is fixed in the latest version of
pkgconf, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Andrej Shadura <[email protected]> (supplier of updated pkgconf package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Mon, 23 Aug 2021 14:48:27 +0200
Source: pkgconf
Architecture: source
Version: 1.8.0-1
Distribution: unstable
Urgency: medium
Maintainer: Andrej Shadura <[email protected]>
Changed-By: Andrej Shadura <[email protected]>
Closes: 992622
Changes:
pkgconf (1.8.0-1) unstable; urgency=medium
.
[ Andrej Shadura ]
* New upstream release.
.
[ Simon McVittie ]
* d/rules: Factor out computation of system library path into a script
* d/system-libdirs.sh: Always list directories with and without /usr.
This avoids potentially unwanted -L flags in --libs if pkgconf is
built on a merged-/usr system and used on a non-merged-/usr system.
(Closes: #992622)
Checksums-Sha1:
01d6b749a979828882cdd337db4cc29457b8aa4d 1513 pkgconf_1.8.0-1.dsc
2b76eb2d88b2c4aecba937b337d218a13b67f14b 296304 pkgconf_1.8.0.orig.tar.xz
b41fdae7329479308cb398f6b53672ffd7da8932 9408 pkgconf_1.8.0-1.debian.tar.xz
Checksums-Sha256:
90a4f867599a32ef7e0632e1ef727e688d9d444f068f620f3b28c564502c7f4b 1513
pkgconf_1.8.0-1.dsc
ef9c7e61822b7cb8356e6e9e1dca58d9556f3200d78acab35e4347e9d4c2bbaf 296304
pkgconf_1.8.0.orig.tar.xz
2626555c03602620e9f0d769aa5dc84774b0e62383f24f2374b81912308c0a26 9408
pkgconf_1.8.0-1.debian.tar.xz
Files:
f2408e4cb9e11648cc9752f571db1508 1513 devel optional pkgconf_1.8.0-1.dsc
823212dc241793df8ff1d097769a3473 296304 devel optional
pkgconf_1.8.0.orig.tar.xz
afb8c173ec94583d5ae156f802dcc5b0 9408 devel optional
pkgconf_1.8.0-1.debian.tar.xz
-----BEGIN PGP SIGNATURE-----
iHUEARYIAB0WIQSD3NF/RLIsyDZW7aHoRGtKyMdyYQUCYSOaUgAKCRDoRGtKyMdy
YTFmAQCIJeqqfzT2eGJnASaV8yzdibuG5Wg5CKVGnrW+23+r/wD/eeirUHpjHgQl
V0f5hLHzq3C3sUiKIUqRWTLz8b3vuAs=
=w9N8
-----END PGP SIGNATURE-----
--- End Message ---