Source: bash
Version: 5.0-4
Severity: wishlist
Tags: patch
User: [email protected]
Usertags: buildpath
X-Debbugs-Cc: [email protected]

Hi,

A patch is attached that makes the Bash interpreter build
reproducibily for me in unstable.

This is because in various places it encoded the absolute build path
via the inclusion of output from CFLAGS or even quite-literally as
"BUILD_DIR".

I did have another patch that modified the source files "properly"
themselves but I was not only having problems with autoreconf-ing the
package (it worked, but the command was returning a non-zero exit code
regardless which I papered over with a "|| true"...?),  additionally
one of the Makefiles could not have it's BUILD_DIR patched to point to
some deterministic location as it would cause the package to FTBFS.
Thus, we would have required some post-processing anyway. (Another
alternative to this could be to simply not ship that particular file
as it is likely not going to work on end-user machines anyway).

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      [email protected] / chris-lamb.co.uk
       `-
--- a/debian/rules      2019-08-19 11:39:35.821792908 -0700
--- b/debian/rules      2019-08-19 11:56:21.330814485 -0700
@@ -263,6 +263,14 @@
                $(d_bins)/usr/share/doc/$(p)/examples/loadables
        ln -sf bash $(d_bins)/usr/share/doc/$(p_bins)
 
+       sed -i \
+               -e 's@-ffile-prefix-map=[^ ]*[ ]*@@g' \
+               -e 's@-fdebug-prefix-map=[^ ]*[ ]*@@g' \
+               -e 's@^BUILD_DIR =.*@BUILD_DIR = /path/to/build-dir@' \
+               $(d)/usr/bin/bashbug \
+               $(d_bins)/usr/lib/bash/Makefile.inc \
+               $(d_bins)/usr/share/doc/$(p)/examples/loadables/Makefile
+
 #      cat debian/README stamps/stamp-patch > debian/README.Debian
        cat debian/README > debian/README.Debian
 

Reply via email to