Source: gmic
Version: 1.6.8-3
Severity: wishlist
Tags: patch upstream
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org

Dear Maintainer,

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

The attached patch strips the build date from help messages. Once
applied, gmic can be built reproducibly in our current experimental
framework.

Regards,
Alexis Bienvenüe.

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



diff -Nru gmic-1.6.8/debian/changelog gmic-1.6.8/debian/changelog
--- gmic-1.6.8/debian/changelog	2016-01-16 17:27:29.000000000 +0100
+++ gmic-1.6.8/debian/changelog	2016-04-11 23:07:20.000000000 +0200
@@ -1,3 +1,9 @@
+gmic (1.6.8-3.0~reproducible1) unstable; urgency=medium
+
+  * Strip build date from help output, to make the build reproducible.
+
+ -- Alexis Bienvenüe <p...@passoire.fr>  Mon, 11 Apr 2016 23:07:20 +0200
+
 gmic (1.6.8-3) unstable; urgency=medium
 
   * [0e17dac] Add hardening flags.
diff -Nru gmic-1.6.8/debian/patches/series gmic-1.6.8/debian/patches/series
--- gmic-1.6.8/debian/patches/series	2016-01-16 17:27:29.000000000 +0100
+++ gmic-1.6.8/debian/patches/series	2016-04-11 23:05:34.000000000 +0200
@@ -1,2 +1,3 @@
 disable-optimization-in-upstream-makefile
 ldconfig-symlink-referencing-wrong-file
+strip_build_date
diff -Nru gmic-1.6.8/debian/patches/strip_build_date gmic-1.6.8/debian/patches/strip_build_date
--- gmic-1.6.8/debian/patches/strip_build_date	1970-01-01 01:00:00.000000000 +0100
+++ gmic-1.6.8/debian/patches/strip_build_date	2016-04-11 23:06:32.000000000 +0200
@@ -0,0 +1,27 @@
+Description: Strip build date
+ Strip build date and time from help outputs, to make the build reproducible.
+Author: Alexis Bienvenüe <p...@passoire.fr>
+
+--- gmic-1.6.8.orig/src/CImg.h
++++ gmic-1.6.8/src/CImg.h
+@@ -5175,7 +5175,7 @@ namespace cimg_library_suffixed {
+         if (usage) {
+           std::fprintf(cimg::output(),"\n %s%s%s",cimg::t_red,cimg::basename(argv[0]),cimg::t_normal);
+           std::fprintf(cimg::output(),": %s",usage);
+-          std::fprintf(cimg::output()," (%s, %s)\n\n",__DATE__,__TIME__);
++          std::fprintf(cimg::output(),"\n\n");
+         }
+         if (defaut) std::fprintf(cimg::output(),"%s\n",defaut);
+       }
+@@ -5253,9 +5253,9 @@ namespace cimg_library_suffixed {
+        \note Output is done on the default output stream.
+     **/
+     inline void info() {
+-      std::fprintf(cimg::output(),"\n %s%sCImg Library %u.%u.%u%s, compiled %s ( %s ) with the following flags:\n\n",
++      std::fprintf(cimg::output(),"\n %s%sCImg Library %u.%u.%u%s, compiled with the following flags:\n\n",
+                    cimg::t_red,cimg::t_bold,cimg_version/100,(cimg_version/10)%10,cimg_version%10,
+-                   cimg::t_normal,__DATE__,__TIME__);
++                   cimg::t_normal);
+ 
+       std::fprintf(cimg::output(),"  > Operating System:       %s%-13s%s %s('cimg_OS'=%d)%s\n",
+                    cimg::t_bold,
_______________________________________________
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