Bug#992702: nbdkit: stores wrong path to mke2fs if built on merged-/usr system

Simon McVittie smcv at debian.org
Sun Aug 22 15:33:41 BST 2021


Source: nbdkit
Version: 1.26.5-1
Severity: important
Tags: patch bookworm sid
User: reproducible-builds at lists.alioth.debian.org
Usertags: usrmerge
X-Debbugs-Cc: reproducible-bugs at lists.alioth.debian.org

If nbdkit 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 bash
is recorded in the binary as /usr/bin/bash.

This can be seen on the reproducible-builds.org infra:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/diffoscope-results/nbdkit.html
(search for "/sbin/mke2fs" to see the difference I'm concerned about).

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

The problematic situation is if the package is *built* on a merged-/usr
system, but *used* on a non-merged-/usr system. In this situation,
/usr/sbin/mke2fs exists on the build system but not on the system where
sharutils will be used, resulting in the feature that uses mke2fs not being
available.

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.

Some Debian developers advocate that instead of merged-/usr, we should use
a different strategy where /sbin becomes a "symlink farm" with individual
symlinks such as /sbin/mke2fs-> /usr/sbin/mke2fs. If that route is taken
instead of merged-/usr, then resolving bugs like this one will be equally
important as part of that transition, because it shares the property
that both /sbin/mke2fs and /usr/bin/mke2fs exist after the transition,
but only /sbin/mke2fs exists on untransitioned systems.

The attached patch resolves this: with it applied, the package builds
identically with and without --add-depends-arch=usrmerge, other than an
unrelated unreproducibility where CFLAGS that include the build path
are compiled into another part of the package.

A side benefit of fixing this is that this change is a step towards
making the package reproducible (as recommended by Policy §4.15).

    smcv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-d-rules-Specify-canonical-path-to-mke2fs.patch
Type: text/x-diff
Size: 1626 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/reproducible-bugs/attachments/20210822/60b89369/attachment.patch>


More information about the Reproducible-bugs mailing list