Bug#823241: unhide: please make the build reproducible (fileordering)

2016-12-25 Thread Samuel Henrique
​Control: tag -1 + pending

Fix commited to git, version 20130526-2 will fix/close this bug.​

Thanks for the patch!

Samuel Henrique 


Bug#823241: unhide: please make the build reproducible (fileordering)

2016-05-02 Thread Alexis Bienvenüe
Source: unhide
Version: 20130526-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: fileordering
X-Debbugs-Cc: reproducible-bui...@lists.alioth.debian.org

Dear Maintainer,

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

The attached patch fixes the order in which c files are passed to
the compiler. Once applied, unhide can be built reproducibly in our
current experimental framework.

Regards,
Alexis Bienvenüe.

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

diff -Nru unhide-20130526/debian/changelog unhide-20130526/debian/changelog
--- unhide-20130526/debian/changelog	2015-11-02 23:51:16.0 +0100
+++ unhide-20130526/debian/changelog	2016-05-02 17:57:58.0 +0200
@@ -1,3 +1,9 @@
+unhide (20130526-1.0~reproducible1) UNRELEASED; urgency=medium
+
+  * Sort c source files to pass to gcc, to get reproducible build.
+
+ -- Alexis Bienvenüe   Mon, 02 May 2016 17:57:58 +0200
+
 unhide (20130526-1) unstable; urgency=medium
 
   * Team upload.
diff -Nru unhide-20130526/debian/rules unhide-20130526/debian/rules
--- unhide-20130526/debian/rules	2015-11-02 20:44:36.0 +0100
+++ unhide-20130526/debian/rules	2016-05-02 17:57:11.0 +0200
@@ -21,7 +21,7 @@
 	ln man/es/unhide.8 man/unhide.es.8
 
 override_dh_auto_build:
-	gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Wall -O2 -pthread -o unhide-linux unhide-linux*.c unhide-output.c
+	gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Wall -O2 -pthread -o unhide-linux $(sort $(wildcard unhide-linux*.c)) unhide-output.c
 	gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Wall -O2 -o unhide-tcp unhide-tcp.c unhide-tcp-fast.c unhide-output.c
 	gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -Wall -O2 -o unhide_rb unhide_rb.c
-	gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o unhide-posix unhide-posix.c
\ Pas de fin de ligne à la fin du fichier
+	gcc $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o unhide-posix unhide-posix.c