Source: allegro4.4
Version: 2:4.4.2-5
Severity: wishlist
Tags: patch
Usertags: locale


While working on the “reproducible builds” effort [1], we have noticed
that allegro4.4 could not be built reproducibly [2]: the members of
examples/source.tar.gz are sorted in a locale-dependent manner.

The following patch sorts that tarball's members in a fixed
(locale-independent) order:

diff --git a/debian/rules b/debian/rules
index a9ba95b..c1f9880 100755
--- a/debian/rules
+++ b/debian/rules
@@ -58,7 +58,9 @@ override_dh_auto_install:
 # Create examples source tar.gz
        rm -rf build/tmp; mkdir build/tmp
        cp examples/*.c examples/*.h examples/*.dat examples/*.pcx 
examples/*.txt examples/*.ini tests/*.c build/tmp/
-       cd build/tmp; GZIP="-9n" tar zcvf source.tar.gz --mtime="$(BUILD_DATE)" 
--mode=go=rX,u+rw,a-s *
+       # Glob expansions are sorted in a locale-sensitive manner; set the
+       # locale to make the order reproducible.
+       cd build/tmp && (LC_ALL=C; export LC_ALL; GZIP="-9n" tar zcvf 
source.tar.gz --mtime="$(BUILD_DATE)" --mode=go=rX,u+rw,a-s *)
        cp build/tmp/source.tar.gz $(CURDIR)/debian/tmp/$(DOC_EXAMPLES_DIR)

I believe this patch should make allegro4.4 fully reproducible.




Reproducible-builds mailing list

Reply via email to