[Reproducible-builds] Bug#823879: allegro4.4: please make the build reproducible (locale)

Daniel Shahaf danielsh at apache.org
Mon May 9 23:38:57 UTC 2016


Source: allegro4.4
Version: 2:4.4.2-5
Severity: wishlist
Tags: patch
User: reproducible-builds at 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



More information about the Reproducible-builds mailing list