Source: allegro4.4
Version: 2:4.4.2-5
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: locale

Hi!

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)
 
 override_dh_makeshlibs:
]]]

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

Thanks,

Daniel

 [1]: https://wiki.debian.org/ReproducibleBuilds
 [2]: 
https://tests.reproducible-builds.org/dbdtxt/unstable/amd64/allegro4.4_4.4.2-7.diffoscope.txt

_______________________________________________
Reproducible-builds mailing list
Reproducible-builds@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to