Lasse Collin: > posix-shell.m4 comes from gnulib > > [..] > > One can force the POSIX shell to a specific value on the configure > command line by passing, for example, "gl_cv_posix_shell=/bin/sh" as an > argument. It's not documented in the --help output but it's mentioned > in INSTALL section 3.1. That is an alternative to patching to get > reproducible builds. >
Hi Lasse, Looks like the gnulib guys weren't willing to accept my patch so I'll go the gl_cv_posix_shell route. This is Debian-specific, so xz-utils won't need to make any changes. Thanks for your time and your pointers! @Debian maintainer, please see the attached patch. X -- GPG: ed25519/56034877E1F87C35 GPG: rsa4096/1318EFAC5FBBDBCE https://github.com/infinity0/pubkeys.git
diff -Nru xz-utils-5.1.1alpha+20120614/debian/changelog xz-utils-5.1.1alpha+20120614/debian/changelog --- xz-utils-5.1.1alpha+20120614/debian/changelog 2015-06-18 20:27:36.000000000 +0200 +++ xz-utils-5.1.1alpha+20120614/debian/changelog 2016-07-05 23:35:36.000000000 +0200 @@ -1,3 +1,11 @@ +xz-utils (5.1.1alpha+20120614-2.2) UNRELEASED; urgency=medium + + * Non-maintainer upload. + * Force a constant /bin/sh for installed scripts. This helps the build + be reproducible; /bin/sh on Debian is always POSIX. (Closes: #806331) + + -- Ximin Luo <infini...@debian.org> Sun, 03 Jul 2016 10:42:33 +0200 + xz-utils (5.1.1alpha+20120614-2.1) unstable; urgency=medium [ Helmut Grohne ] diff -Nru xz-utils-5.1.1alpha+20120614/debian/rules xz-utils-5.1.1alpha+20120614/debian/rules --- xz-utils-5.1.1alpha+20120614/debian/rules 2012-10-12 00:38:38.000000000 +0200 +++ xz-utils-5.1.1alpha+20120614/debian/rules 2016-07-03 11:01:15.000000000 +0200 @@ -66,12 +66,14 @@ debian/normal-build/Makefile debian/normal-build/Doxyfile: $(configure_input) dh_auto_configure --builddirectory debian/normal-build -- \ + $(opt_reproduce) \ --disable-threads --disable-static \ $(opt_optimize) $(opt_quiet) \ --disable-xzdec --disable-lzmadec debian/static-build/Makefile: $(configure_input) dh_auto_configure --builddirectory debian/static-build -- \ + $(opt_reproduce) \ --disable-threads --disable-shared \ --enable-liblzma2-compat \ $(opt_optimize) $(opt_quiet) \ @@ -81,6 +83,7 @@ debian/xzdec-build/Makefile: $(configure_input) dh_auto_configure --builddirectory debian/xzdec-build -- \ + $(opt_reproduce) \ --disable-shared --disable-nls --disable-encoders \ --enable-small --disable-threads \ --disable-liblzma2-compat \ @@ -97,6 +100,7 @@ flags_cmd = dpkg-buildflags --export=configure opt_optimize = $(shell $(flags_cmd)) opt_optimize_small = $(shell $(small_flags_env) $(flags_cmd)) +opt_reproduce = gl_cv_posix_shell=/bin/sh opt_no_act = opt_quiet =