Source: mdp-src
Version: 1.0.8-1
Severity: wishlist
Tags: patch upstream
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that mdp-src could not be built reproducibly.
During build it links object files in non-deterministic order.

The attached patch fixes this by sorting the list of source files.

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..87d30e4
--- /dev/null
+++ b/debian/patches/reproducible-build.patch
@@ -0,0 +1,14 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Sort list of source files for deterministic linking order
+
+--- a/Makefile
++++ b/Makefile
+@@ -20,7 +20,7 @@
+ 
+ UNAME_S := $(shell uname -s 2>/dev/null || echo not)
+ 
+-SOURCES = $(wildcard src/*.c)
++SOURCES = $(sort $(wildcard src/*.c))
+ OBJECTS = $(SOURCES:.c=.o)
+ TARGET  = mdp
+ DESTDIR =
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..55077d0
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+reproducible-build.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to