Source: netpanzer
Version: 0.8.7+ds-1
Severity: wishlist
Tags: patch upstream
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 netpanzer could not be built reproducibly.
The list of source files is not sorted, which causes 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..2336bff
--- /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/SConstruct
++++ b/SConstruct
+@@ -65,7 +65,7 @@
+     sources = []
+     sourceDirs = Split(sourceDirs)
+     for d in sourceDirs:
+-        sources.append(glob.glob( sourcePrefix + '/' + d + '/' + pattern))
++        sources.append(sorted(glob.glob( sourcePrefix + '/' + d + '/' + pattern)))
+     sources = Flatten(sources)
+     targetsources = []
+     for s in sources:
diff --git a/debian/patches/series b/debian/patches/series
index 24a0dd9..a9a01af 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ system-physfs.patch
 system-lua.patch
 desktop-file.patch
 hardening.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