[Reproducible-builds] Bug#798450: yadifa: please make the build reproducible

Santiago Vila sanvila at debian.org
Wed Sep 9 13:29:27 UTC 2015


Package: yadifa
Version: 2.1.3-2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hello.

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

The attached patch tries to fix this by removing the use (and
definition) of COMPILEDATE.

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

THanks.
-------------- next part --------------
diff -Nru yadifa-2.1.3/debian/changelog yadifa-2.1.3/debian/changelog
--- yadifa-2.1.3/debian/changelog	2015-09-08 07:59:35.000000000 +0200
+++ yadifa-2.1.3/debian/changelog	2015-09-09 15:12:43.000000000 +0200
@@ -1,3 +1,10 @@
+yadifa (2.1.3-2) unstable; urgency=low
+
+  * Add debian/patches/do-not-use-or-define-the-compile-date.patch
+    to make the build reproducible. Closes: ######.
+
+ -- Markus Schade <markus.schade at gmail.com>  Wed, 09 Sep 2015 15:12:24 +0200
+
 yadifa (2.1.3-1) unstable; urgency=low
 
   * New upstream version 2.1.3
diff -Nru yadifa-2.1.3/debian/patches/do-not-use-or-define-the-compile-date.patch yadifa-2.1.3/debian/patches/do-not-use-or-define-the-compile-date.patch
--- yadifa-2.1.3/debian/patches/do-not-use-or-define-the-compile-date.patch	1970-01-01 01:00:00.000000000 +0100
+++ yadifa-2.1.3/debian/patches/do-not-use-or-define-the-compile-date.patch	2015-09-09 15:09:17.000000000 +0200
@@ -0,0 +1,53 @@
+From: Santiago Vila <sanvila at debian.org>
+Subject: Do not use or define COMPILEDATE, it makes the build not to be reproducible
+
+--- yadifa-2.1.3.orig/bin/yadifa/common-config.h
++++ yadifa-2.1.3/bin/yadifa/common-config.h
+@@ -38,7 +38,6 @@
+ #define     PROGRAM_NAME                            PACKAGE
+ #define     PROGRAM_VERSION                         PACKAGE_VERSION
+ #define     RELEASEDATE                             "2015-09-07"
+-#define     COMPILEDATE                             __DATE__
+ 
+ #define     ROUND_ROBIN                             0x00
+ 
+--- yadifa-2.1.3.orig/bin/yadifa/yadifa-config.c
++++ yadifa-2.1.3/bin/yadifa/yadifa-config.c
+@@ -350,10 +350,10 @@ yadifa_print_version(int level)
+             osformatln(termout, "%s %s (%s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE);
+             break;
+         case 2:
+-            osformatln(termout, "%s %s (released %s, compiled %s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE);
++            osformatln(termout, "%s %s (released %s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE);
+             break;
+         case 3:
+-            osformatln(termout, "%s %s (released %s, compiled %s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE);
++            osformatln(termout, "%s %s (released %s)", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE);
+             yadifa_print_authors();
+             break;
+         default:
+--- yadifa-2.1.3.orig/sbin/yadifad/confs.c
++++ yadifa-2.1.3/sbin/yadifad/confs.c
+@@ -228,10 +228,10 @@ yadifad_show_version(u8 level)
+ 	    osformatln(termout, "%s %s (%s)\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE);
+ 	    break;
+ 	case 2:
+-	    osformatln(termout, "%s %s (released %s, compiled %s)\n\nbuild settings: %s\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE, BUILD_OPTIONS);
++	    osformatln(termout, "%s %s (released %s)\n\nbuild settings: %s\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, BUILD_OPTIONS);
+ 	    break;
+         case 3:
+-	    osformatln(termout, "%s %s (released %s, compiled %s)\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE, COMPILEDATE);
++	    osformatln(termout, "%s %s (released %s)\n", PROGRAM_NAME, PROGRAM_VERSION, RELEASEDATE);
+             yadifad_print_authors();
+             break;
+ 	default:
+--- yadifa-2.1.3.orig/sbin/yadifad/confs.h
++++ yadifa-2.1.3/sbin/yadifad/confs.h
+@@ -84,7 +84,6 @@ extern "C" {
+ #define     PROGRAM_NAME                PACKAGE
+ #define     PROGRAM_VERSION             PACKAGE_VERSION
+ #define     RELEASEDATE                 "2015-09-07"
+-#define     COMPILEDATE                 __DATE__
+ 
+     /* List of default values for the different configuration parameters */
+ #define     S_CONFIGDIR                 SYSCONFDIR "/"
diff -Nru yadifa-2.1.3/debian/patches/series yadifa-2.1.3/debian/patches/series
--- yadifa-2.1.3/debian/patches/series	2015-09-08 07:59:35.000000000 +0200
+++ yadifa-2.1.3/debian/patches/series	2015-09-09 15:08:31.000000000 +0200
@@ -4,3 +4,4 @@
 fix-yadifad.conf.patch
 fix-yadifad-spelling.patch
 fix-yadifarc-manpage.patch
+do-not-use-or-define-the-compile-date.patch


More information about the Reproducible-builds mailing list