Source: fuse-zip
Version: 0.4.0-2
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 fuse-zip could not be built reproducibly.
During build it links object files in non-deterministic order.

The attached patch fixes that 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..6d6a8de
--- /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/lib/Makefile
++++ b/lib/Makefile
+@@ -4,7 +4,7 @@
+ RELEASE_CXXFLAGS=-O2 -Wall -Wextra
+ FUSEFLAGS=$(shell pkg-config fuse --cflags)
+ ZIPFLAGS=$(shell pkg-config libzip --cflags)
+-SOURCES=$(wildcard *.cpp)
++SOURCES=$(sort $(wildcard *.cpp))
+ OBJECTS=$(SOURCES:.cpp=.o)
+ CLEANFILES=$(OBJECTS) $(DEST)
+ 
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

_______________________________________________
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