Source: multipath-tools
Version: 0.9.4-3
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
multipath-tools could not be built reproducibly.

In a previous reproducibility bug (#1030727), I thought that it was
the parallel nature of the build that was making it unreproducible,
and adding this flag made it reproducible for me at the time. However,
despite the --max-parallel flag working back then, I am now seeing
that the package is unreproducible.

As a reminder, what is happening is that in the "first" build the
documentation is being regenerated, but in the "second" build, the
documentation is left entirely alone, resulting in the docs in the
orig tarball being shipped instead. These have slightly different
contents, hence the unreproducibility of the package.

Anyway, it seems like we can force the docs' regeneration in all
possible cases by simply deleting the top-level source of the
documentation in the debian/rules "clean" target, and then relying on
the dependency resolution to recreate it again.

A patch to this end is attached, which also removes the --max-parallel
calls.

 [0] https://reproducible-builds.org/


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/rules      2023-06-07 10:55:29.627967515 -0700
--- b/debian/rules      2023-06-07 11:03:56.834719140 -0700
@@ -16,6 +16,8 @@
                rm -rf debian/$$treename ;\
        done
        rm -rf debian/tmp-multipath-udeb
+       # Force recreation of docs re. reproducibility
+       rm -fv libdmmp/docs/man/dmmp_strerror.3
 
 execute_before_dh_auto_configure:
        # no out of tree build support, prepare two source trees
@@ -27,13 +29,10 @@
 override_dh_auto_configure:
 
 override_dh_auto_build:
-       # parallel build is disabled to avoid race condition in man page build, 
which will end in
-       # unreproducible contents (either regenerated man pages or shipped man 
pages will be
-       # selected, depending on the race). #1030727
-       dh_auto_build --sourcedirectory=debian/build-deb --max-parallel=1 -- \
+       dh_auto_build --sourcedirectory=debian/build-deb -- \
                SCSI_DH_MODULES_PRELOAD="scsi_dh_alua scsi_dh_emc scsi_dh_rdac"
        # multipath-udeb: build separately; don't reference dynamic libgcc at 
runtime (#779579); disable systemd
-       dh_auto_build --sourcedirectory=debian/build-udeb --max-parallel=1 -- \
+       dh_auto_build --sourcedirectory=debian/build-udeb -- \
                SYSTEMD= EXTRACFLAGS="-static-libgcc"
 
 override_dh_auto_test:

Reply via email to