Source: rust-coreutils
Version: 0.0.6-1~exp1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

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

This is because the "timeout" private binary includes the full
contents of argv[0] in its --help output (ie. including the absolute
build path).

The call to help2man in debian/rules then includes the build path in
the automatically-generated rust-timeout(1) manual page, making the
build not reproducible.

A patch is attached that uses the basename in the --help output
instead. This behaviour actually matches all of the other binaries in
that directory; curiously, only the rust-timeout binary is affected.

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


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
--- a/debian/patches/reproducible-build.diff    1970-01-01 01:00:00.000000000 
+0100
--- b/debian/patches/reproducible-build.diff    2021-08-12 11:23:13.888071747 
+0100
@@ -0,0 +1,15 @@
+Description: Make the build reproducible
+Author: Chris Lamb <la...@debian.org>
+Last-Update: 2021-08-12
+
+--- rust-coreutils-0.0.6.orig/src/uu/timeout/src/timeout.rs
++++ rust-coreutils-0.0.6/src/uu/timeout/src/timeout.rs
+@@ -50,7 +50,7 @@ Usage:
+ {}",
+             NAME,
+             VERSION,
+-            program,
++            NAME,
+             &opts.usage("Start COMMAND, and kill it if still running after 
DURATION.")
+         );
+     } else if matches.opt_present("version") {
--- a/debian/patches/series     2021-08-12 09:17:54.780551708 +0100
--- b/debian/patches/series     2021-08-12 11:23:12.148071624 +0100
@@ -10,3 +10,4 @@
 revert-file-diff.diff
 revert-twox-hash.dif
 revert-retain-mut.diff
+reproducible-build.diff

Reply via email to