Package: usermode
Version: 1.109-1
Severity: normal
Tags: patch
User: [email protected]
Usertags: usrmerge

Dear Maintainer,

The reproducible build spotted a difference in your package when
built on a usrmerged system vs a non-merged system:
https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/usermode.html

It seems usermount contains the full path of 'fdformat' (et.al.) found via
AC_PROG_PATH during build.

Unlike other similar cases, the usermode configure.ac specifies its
own PATHs to search (rather than relyin on $PATH from environment).
While explicitly passing in paths to search as an argument it orders
/bin and /sbin before /usr/bin and /usr/sbin respectively (opposite
to how PATH is normally configured).

This makes tools always be found via /bin or /sbin (which are symlinks
to /usr/bin and /usr/sbin or merged-usr systems), thus the fdformat
path ends up as /sbin/fdformat on a merged-usr system. As the tool
really lives at /usr/sbin/fdformat, the result thus differs on a
merged-usr system vs a non-merged one.

Another possible way to fix this is to change the directory ordering
for fdformat in configure.ac, but that makes several assumptions:
- other distributions places things the same way we do (or don't
  care because they've already made usrmerge mandatory).
- no tool will be moved in the future
I thus don't think this is a good idea and it's probably a better
idea to just explicitly specifying the paths we want and expect
explicitly at configure time.

The attached patch fixes the problem by explicitly specifying
the default path via MOUNT, UMOUNT, MKFS, FDFORMAT variables
passed to configure as documented in AC_PROG_PATH documentation.

Regards,
Andreas Henriksson

diff -Nru usermode-1.109/debian/changelog usermode-1.109/debian/changelog
--- usermode-1.109/debian/changelog     2012-03-08 02:01:51.000000000 +0100
+++ usermode-1.109/debian/changelog     2018-11-28 21:41:25.000000000 +0100
@@ -1,3 +1,12 @@
+usermode (1.109-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Explicitly set paths for fdformat, et.al. to avoid relying
+    on automatically finding them through path. This fixes
+    reproducible builds on merged-usr vs non-merged systems.
+
+ -- Andreas Henriksson <[email protected]>  Wed, 28 Nov 2018 21:41:25 +0100
+
 usermode (1.109-1) unstable; urgency=low
 
   * New maintainer (Closes: #583242).
diff -Nru usermode-1.109/debian/rules usermode-1.109/debian/rules
--- usermode-1.109/debian/rules 2012-03-08 02:01:51.000000000 +0100
+++ usermode-1.109/debian/rules 2018-11-28 21:40:43.000000000 +0100
@@ -6,6 +6,13 @@
 %:
        dh $@
 
+override_dh_auto_configure:
+       dh_auto_configure -- \
+               MOUNT=/bin/mount \
+               UMOUNT=/bin/umount \
+               MKFS=/sbin/mkfs \
+               FDFORMAT=/usr/bin/fdformat
+
 override_dh_install: user_icon.xpm password.xpm disks.xpm
        dh_install 
        # this functionality doesn't appear to be supported in Debian

Reply via email to