Source: dctrl-tools Version: 2.24-2 Severity: wishlist Tags: patch User: [email protected] Usertags: fileordering X-Debbugs-Cc: [email protected]
Hi! While working on the "reproducible builds" effort [1], we have noticed that dctrl-tools could not be built reproducibly. It collects source files without sorting, which causes the object files to be linked in a non-deterministic order. The attached patch fixes this by sorting the object 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..5d48fcc --- /dev/null +++ b/debian/patches/reproducible_build.patch @@ -0,0 +1,23 @@ +Author: Reiner Herrmann <[email protected]> +Description: Sort object files for deterministic linking order + +--- a/GNUmakefile ++++ b/GNUmakefile +@@ -31,7 +31,7 @@ + PO4A_CONFIG = man/po4a/po4a.cfg + + libsrc = $(wildcard lib/*.c) +-libobj = $(libsrc:.c=.o) ++libobj = $(sort $(libsrc:.c=.o)) + + src = $(libsrc) \ + $(wildcard grep-dctrl/*.c) \ +@@ -39,7 +39,7 @@ + $(wildcard tbl-dctrl/*.c) \ + $(wildcard join-dctrl/*.c) + +-obj = $(src:.c=.o) ++obj = $(sort $(src:.c=.o)) + + exe = grep-dctrl/grep-dctrl \ + sort-dctrl/sort-dctrl \ diff --git a/debian/patches/series b/debian/patches/series index 4a6c9f6..ccb5c31 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1 +1,2 @@ GNUmakefile_remove---force-from-po4a-call +reproducible_build.patch
signature.asc
Description: PGP signature

