Source: gabedit
Version: 2.4.8-2
Severity: wishlist
Tags: patch
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 'gabedit' could not be built reproducibly.

The attached patch sorts object files while building the final gabedit
executable, to get a fixed order. Once applied, gabedit can be built
reproducibly in our current experimental framework.

Regards,
Alexis Bienvenüe.

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

diff -Nru gabedit-2.4.8/debian/changelog gabedit-2.4.8/debian/changelog
--- gabedit-2.4.8/debian/changelog	2015-10-19 00:12:22.000000000 +0200
+++ gabedit-2.4.8/debian/changelog	2016-04-04 20:25:54.000000000 +0200
@@ -1,3 +1,9 @@
+gabedit (2.4.8-2.0~reproducible1) unstable; urgency=medium
+
+  * Sort object files in Makefile, to get reproducible build
+
+ -- Alexis Bienvenüe <p...@passoire.fr>  Mon, 04 Apr 2016 20:25:54 +0200
+
 gabedit (2.4.8-2) unstable; urgency=medium
 
   * debian/compat: Raised to level 9.
diff -Nru gabedit-2.4.8/debian/patches/01-sort-object-files-in-makefile.patch gabedit-2.4.8/debian/patches/01-sort-object-files-in-makefile.patch
--- gabedit-2.4.8/debian/patches/01-sort-object-files-in-makefile.patch	1970-01-01 01:00:00.000000000 +0100
+++ gabedit-2.4.8/debian/patches/01-sort-object-files-in-makefile.patch	2016-04-04 21:16:50.000000000 +0200
@@ -0,0 +1,24 @@
+Description: Sort object files in Makefile
+ To get reproducible build.
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+Index: gabedit-2.4.8/Makefile
+===================================================================
+--- gabedit-2.4.8.orig/Makefile
++++ gabedit-2.4.8/Makefile
+@@ -63,11 +63,14 @@ all: gabedit
+ gabedit: $(SUBDIRS)
+ 	$(MKDIR) tmp
+ 	cp $(OBJECTS) tmp
+-	$(CC) $(LDFLAGS) tmp/*.o -o gabedit $(GLTOPS) $(X11LIB) $(GTKLIB) $(OGLLIB) $(JPEGLIB) $(LIBPTHREAD) $(WIN32LIB) $(OMPLIB) -g -lm
++	$(MAKE) exec
+ 	@$(RMTMP) > ptmp
+ 	rmdir tmp
+ 	@$(RM) ptmp
+  
++exec:
++	$(CC) $(LDFLAGS) $(sort $(wildcard tmp/*.o)) -o gabedit $(GLTOPS) $(X11LIB) $(GTKLIB) $(OGLLIB) $(JPEGLIB) $(LIBPTHREAD) $(WIN32LIB) $(OMPLIB) -g -lm
++
+ clean:
+ 	@$(RM) gabedit
+ 	@$(RM) gabedit.exe
diff -Nru gabedit-2.4.8/debian/patches/series gabedit-2.4.8/debian/patches/series
--- gabedit-2.4.8/debian/patches/series	2014-02-09 13:25:06.000000000 +0100
+++ gabedit-2.4.8/debian/patches/series	2016-04-04 20:24:35.000000000 +0200
@@ -0,0 +1 @@
+01-sort-object-files-in-makefile.patch
_______________________________________________
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