Source: gnunet
Version: 0.13.1-2
Severity: important
Tags: patch bookworm sid
User: reproducible-bui...@lists.alioth.debian.org
Usertags: usrmerge
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

If gnunet 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 path to ifconfig
is recorded in the binary package as /usr/sbin/ifconfig, rather than the
canonical /sbin/ifconfig.

This can be seen on the reproducible-builds.org infra:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/i386/diffoscope-results/gnunet.html

If you have sbuild available, an easy way to reproduce this is to build
twice, once with --add-depends=usrmerge and once without.

I suspect the same thing would happen if ifconfig was built on a system
where /sbin and /usr/sbin had instead been unified via a symlink farm.

The problematic situation is if the package is *built* on a unified-/usr
system, but *used* on a non-unified-/usr system. In this situation,
/usr/sbin/ifconfig exists on the build system but not on the system where
the package will be used, resulting in the features that use this
executable not working correctly.

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. It is likely that
this class of bugs will become release-critical later in the bookworm
development cycle.

The attached patch resolves this: with it applied, the package builds
identically with and without --add-depends=usrmerge. I was unable to verify
this on unstable due to #993247, but it works on bullseye.

Some developers advocate unifying /sbin with /usr/sbin via a symlink farm
in /bin instead of merged-/usr, but that strategy would have a similar
practical effect on this particular package, and the same solution would
be required.

A side benefit of fixing this is that this change seems likely to be
sufficient to make the package reproducible (as recommended by Policy
ยง4.15).

    smcv
>From 070a018b98e01a44b3231f4549f63cb7a09cc599 Mon Sep 17 00:00:00 2001
From: Simon McVittie <s...@debian.org>
Date: Sun, 29 Aug 2021 11:06:42 +0100
Subject: [PATCH] d/rules: Specify canonical path for ifconfig

When this package is built on a system where both /usr/sbin/ifconfig and
/sbin/ifconfig exist (either merged-/usr or via a symlink farm), this
results in storing /usr/sbin/ifconfig in gnunet-config.h, which will
not work as intended on systems where only the traditional path
/sbin/ifconfig exists.

Signed-off-by: Simon McVittie <s...@debian.org>
---
 debian/rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/rules b/debian/rules
index 7784791..045fe76 100755
--- a/debian/rules
+++ b/debian/rules
@@ -8,7 +8,7 @@ include /usr/share/dpkg/architecture.mk
 	dh ${@}
 
 override_dh_auto_configure-arch:
-	dh_auto_configure -- --disable-rpath --with-microhttpd=yes $(shell dpkg-buildflags --export=configure)
+	dh_auto_configure -- --disable-rpath --with-microhttpd=yes $(shell dpkg-buildflags --export=configure) VAR_IFCONFIG_BINARY=/sbin/ifconfig
 
 override_dh_auto_configure-indep:
 
-- 
2.33.0

Reply via email to