Source: fdm
Version: 1.7+cvs20140912-1
Severity: wishlist
Tags: patch upstream
User: [email protected]
Usertags: fileordering locale
X-Debbugs-Cc: [email protected]

Hi!

While working on the "reproducible builds" effort [1], we have noticed
that fdm could not be built reproducibly.
It collects source files with "echo *.c", which varies with different
locales. This causes a different order of objects during linking.

The attached patch fixes this by sorting the list of objects.

Regards,
 Reiner

[1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/04reproducible_build.patch b/debian/patches/04reproducible_build.patch
new file mode 100644
index 0000000..77e4729
--- /dev/null
+++ b/debian/patches/04reproducible_build.patch
@@ -0,0 +1,14 @@
+Author: Reiner Herrmann <[email protected]>
+Description: Sort object files for deterministic linking order
+
+--- a/GNUmakefile
++++ b/GNUmakefile
+@@ -42,7 +42,7 @@
+ 
+ SRCS= $(shell echo *.c|sed 's|y.tab.c||g'; echo y.tab.c)
+ include config.mk
+-OBJS= $(patsubst %.c,%.o,$(SRCS))
++OBJS= $(sort $(patsubst %.c,%.o,$(SRCS)))
+ 
+ all:		fdm
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e19e569..77b476e 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 01rename_childuser.patch
 02incrlinelim.patch
 03kfreebsd.patch
+04reproducible_build.patch

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Reproducible-builds mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds

Reply via email to