Source: xpa
Version: 2.1.17-1
Severity: wishlist
Tags: patch upstream
User: reproducible-builds@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Dear Maintainer,

While working on the “reproducible builds” effort [1], we have noticed
that 'xpa' could not be built reproducibly.

The attached patch fixes the order in which *.o files are merged. Once
applied, xpa can be built reproducibly in our current experimental
framework.

Regards,
Alexis Bienvenüe.

 [1]: https://wiki.debian.org/ReproducibleBuilds


diff -Nru xpa-2.1.17/debian/changelog xpa-2.1.17/debian/changelog
--- xpa-2.1.17/debian/changelog	2015-10-20 10:21:34.000000000 +0200
+++ xpa-2.1.17/debian/changelog	2016-04-25 13:14:48.000000000 +0200
@@ -1,3 +1,9 @@
+xpa (2.1.17-1.0~reproducible1) unstable; urgency=medium
+
+  * Build libs with fixed order *.o files, to ger reproducible build.
+
+ -- Alexis Bienvenüe <p...@passoire.fr>  Mon, 25 Apr 2016 13:14:48 +0200
+
 xpa (2.1.17-1) unstable; urgency=low
 
   * New upstream version
diff -Nru xpa-2.1.17/debian/patches/series xpa-2.1.17/debian/patches/series
--- xpa-2.1.17/debian/patches/series	2015-10-20 10:08:03.000000000 +0200
+++ xpa-2.1.17/debian/patches/series	2016-04-25 13:13:06.000000000 +0200
@@ -2,3 +2,4 @@
 fix_manpages.patch
 install_tclxpa.patch
 hardening.patch
+sort_o_files
diff -Nru xpa-2.1.17/debian/patches/sort_o_files xpa-2.1.17/debian/patches/sort_o_files
--- xpa-2.1.17/debian/patches/sort_o_files	1970-01-01 01:00:00.000000000 +0100
+++ xpa-2.1.17/debian/patches/sort_o_files	2016-04-25 13:14:03.000000000 +0200
@@ -0,0 +1,24 @@
+Description: Sort *.o files
+ Build libs with fixed order *.o files, to ger reproducible build.
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+--- xpa-2.1.17.orig/Makefile.in
++++ xpa-2.1.17/Makefile.in
+@@ -185,7 +185,7 @@ shlib:		$(LIB)
+ 		rm -f lib$(PACKAGE).tmp/xt*.o; \
+ 		rm -f lib$(PACKAGE).tmp/tcl*.o; \
+ 		CC='$(CC)' CXX=$(CXX) \
+-		./mklib -ldflags "$(LDFLAGS)" -o $(PACKAGE) lib$(PACKAGE).tmp/*.o; \
++		./mklib -ldflags "$(LDFLAGS)" -o $(PACKAGE) `LC_ALL=C ls lib$(PACKAGE).tmp/*.o`; \
+ 		rm -rf lib$(PACKAGE).tmp)
+ 
+ mingw-dll:	$(LIBOBJS)
+@@ -204,7 +204,7 @@ shtclxpa:	tclxpa
+ 		@(rm -rf $(PACKAGE)tmp; mkdir $(PACKAGE)tmp; \
+ 		(cd $(PACKAGE)tmp && ar x ../libtclxpa.a); \
+ 		CC='$(CC)' CXX='$(CXX)' \
+-		./mklib -ldflags "$(LDFLAGS)" -o tclxpa -L. -lxpa $(PACKAGE)tmp/*.o $(TCL_LIBS); \
++		./mklib -ldflags "$(LDFLAGS)" -o tclxpa -L. -lxpa `LC_ALL=C ls $(PACKAGE)tmp/*.o` $(TCL_LIBS); \
+ 		rm -rf $(PACKAGE)tmp; )
+ 
+ diff:
_______________________________________________
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