Source: brotli Version: 0.5.2+dfsg-1 Severity: wishlist Tags: patch upstream User: [email protected] Usertags: fileordering X-Debbugs-Cc: [email protected]
Hi! While working on the "reproducible builds" effort [1], we have noticed that brotli could not be built reproducibly. During build objects are linked 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..7c2e4a0 --- /dev/null +++ b/debian/patches/reproducible-build.patch @@ -0,0 +1,12 @@ +Author: Reiner Herrmann <[email protected]> +Description: Sort source files so that objects are linked in deterministic order + +--- a/Makefile ++++ b/Makefile +@@ -1,5 +1,5 @@ + OS := $(shell uname) +-LIBSOURCES = $(wildcard common/*.c) $(wildcard dec/*.c) $(wildcard enc/*.c) ++LIBSOURCES = $(sort $(wildcard common/*.c) $(wildcard dec/*.c) $(wildcard enc/*.c)) + SOURCES = $(LIBSOURCES) tools/bro.c + BINDIR = bin + OBJDIR = $(BINDIR)/obj diff --git a/debian/patches/series b/debian/patches/series index 041258e..1f64a55 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ 0001-Add-LDFLAGS-to-the-final-linking.patch +reproducible-build.patch
signature.asc
Description: PGP signature

