Source: traceroute Version: 1:2.1.0-1 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 traceroute could not be built reproducibly. Some lists used during linking are unsorted (libraries, sources, objects), which causes an unreproducible build. The attached patch fixes this by sorting those lists. Regards, Reiner [1]: https://wiki.debian.org/ReproducibleBuilds
diff --git a/debian/patches/07-reproducible-build.patch b/debian/patches/07-reproducible-build.patch new file mode 100644 index 0000000..c00d349 --- /dev/null +++ b/debian/patches/07-reproducible-build.patch @@ -0,0 +1,37 @@ +Author: Reiner Herrmann <[email protected]> +Description: Sort lists of libraries/source/object files + for deterministic linking order + +--- a/Make.rules ++++ b/Make.rules +@@ -136,8 +136,8 @@ + _libs = $(strip $(foreach _lib,$(LIBDIRS),\ + $(if $(filter lib%,$(_lib)),\ + $(patsubst lib%,-l%,$(_lib)),\ +- $(wildcard $(srcdir)/$(_lib)/$(_lib).so \ +- $(srcdir)/$(_lib)/$(_lib).a)))) ++ $(sort $(wildcard $(srcdir)/$(_lib)/$(_lib).so \ ++ $(srcdir)/$(_lib)/$(_lib).a))))) + + override LIBS := $(_libs) -lm $(LIBS) + +@@ -166,7 +166,7 @@ + endif + endif + +-sources = $(wildcard *.c) ++sources = $(sort $(wildcard *.c)) + OBJS = $(sources:.c=.$(obj)) + + +--- a/default.rules ++++ b/default.rules +@@ -143,7 +143,7 @@ + ifeq ($(filter $(TARGET),$(EXEDIRS)),$(TARGET)) + + ifeq ($(filter $(TARGET),$(MODUSERS)),$(TARGET)) +-MOD_OBJS = $(wildcard $(foreach dir,$(MODDIRS),$(srcdir)/$(dir)/*.o)) ++MOD_OBJS = $(sort $(wildcard $(foreach dir,$(MODDIRS),$(srcdir)/$(dir)/*.o))) + ifeq ($(shared),yes) + override LDFLAGS := -rdynamic $(LDFLAGS) + endif diff --git a/debian/patches/series b/debian/patches/series index 8345718..47f3022 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,3 +4,4 @@ 04-manpage-lft.patch 05-manpage-p.patch 06-build.patch +07-reproducible-build.patch
signature.asc
Description: PGP signature
_______________________________________________ Reproducible-builds mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/reproducible-builds
