Source: excellent-bifurcation
Version: 0.0.20071015-7
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that excellent-bifurcation could not be built reproducibly.
THe list of source files is unsorted, which leads to a non-deterministic
linking order.

The attached patch fixes this.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/reproducible-build.patch b/debian/patches/reproducible-build.patch
new file mode 100644
index 0000000..1de69b7
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,14 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Sort source files for deterministic linking order
+
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -4,7 +4,7 @@
+ PKGCONFIG_CFLAGS= `pkg-config $(PKGCONFIG_FILES) --cflags`
+ PKGCONFIG_LDFLAGS= `pkg-config $(PKGCONFIG_FILES) --libs`
+ LDFLAGS=`allegro-config --libs`
+-SOURCES=$(shell find . -name "*.c")
++SOURCES=$(sort $(shell find . -name "*.c"))
+ OBJECTS=$(SOURCES:.c=.o)
+ EXECUTABLE=excellent-bifurcation
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 585d997..d5d941a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ config_file.patch
 link-with-libm.patch
 fix_allegro_linker_flag.patch
 fix_hurd_ftbfs.patch
+reproducible-build.patch

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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