Source: kball
Version: 0.0.20041216-8
Severity: wishlist
Tags: patch
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 kball could not be built reproducibly.
The list of source files used during build is unsorted, which leads
to a non-deterministic linking order.

The attached patch fixes this by sorting the 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..86f1642
--- /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.all
++++ b/makefile.all
+@@ -2,7 +2,7 @@
+ # Thanks to Schwarzung for help.
+ # Copyright (c) 2003-2005, Kronoman
+ 
+-TEMP = $(wildcard $(SRCDIR)/*$(SRCSUF))
++TEMP = $(sort $(wildcard $(SRCDIR)/*$(SRCSUF)))
+ FILES = $(if $(TEMP), $(TEMP), $(error No source code found!))
+ OBJS = $(addprefix $(OBJDIR)/,$(addsuffix $(OBJSUF), $(basename $(notdir $(FILES) ) ) ) )
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 9c27815..aa8243b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@
 08_dont_strip.patch
 09_keypad_enter.patch
 gcc-4.5.patch
+reproducible-build.patch

Attachment: signature.asc
Description: PGP signature

Reply via email to