Source: libselinux Version: 2.5-3 Severity: wishlist Tags: patch 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 libselinux could not be built reproducibly. The list of object files is unsorted and causes a non-deterministic linking order. The attached patch fixes this by sorting the list of source files, from which the list of object files is derived from. 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..1a19d54 --- /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/src/Makefile ++++ b/src/Makefile +@@ -48,7 +48,7 @@ + endif + + GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) selinuxswig_python_exception.i +-SRCS= $(filter-out $(UNUSED_SRCS) $(GENERATED) audit2why.c, $(wildcard *.c)) ++SRCS= $(filter-out $(UNUSED_SRCS) $(GENERATED) audit2why.c, $(sort $(wildcard *.c))) + + MAX_STACK_SIZE=32768 + diff --git a/debian/patches/series b/debian/patches/series index 562125a..d2e44d9 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,3 +1,4 @@ fix-makefile-bugs.patch fix-cross-compile.patch 0003-Avoid-mounting-proc-outside-of-selinux_init_load_pol.patch +reproducible-build.patch
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