Source: keepalived
Version: 1:1.2.16-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-CC: reproducible-bui...@lists.alioth.debian.org

Hi!

While working on Debian's “reproducible builds” effort [1], we have
noticed that keepalived doesn't build reproducibly.
The build date is part of the version string and therefore varies
depending on when it was built.

The attached patch removes the date part of the version string,
as it provides no useful information anyway.

Regards,
 Reiner

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


diff --git a/debian/patches/remove_date_from_version.patch b/debian/patches/remove_date_from_version.patch
new file mode 100644
index 0000000..98db9eb
--- /dev/null
+++ b/debian/patches/remove_date_from_version.patch
@@ -0,0 +1,31 @@
+Author: Reiner Herrmann <rei...@reiner-h.de>
+Description: Removes the timestamp from the version string
+ Having the build date as part of the version string makes building the
+ binary unreproducible. This patch removes the timestamp, as it
+ provides no useful information.
+
+Index: pkg-keepalived/configure.in
+===================================================================
+--- pkg-keepalived.orig/configure.in
++++ pkg-keepalived/configure.in
+@@ -9,7 +9,6 @@
+ dnl ----[ Process this file with autoconf to produce a configure script ]----
+ AC_INIT(keepalived/core/main.c)
+ VERSION=`cat VERSION`
+-VERSION_DATE=`date +%m/%d,20%y`
+ OUTPUT_TARGET="Makefile genhash/Makefile keepalived/core/Makefile lib/config.h keepalived.spec"
+ 
+ dnl ----[ Checks for programs ]----
+Index: pkg-keepalived/lib/config.h.in
+===================================================================
+--- pkg-keepalived.orig/lib/config.h.in
++++ pkg-keepalived/lib/config.h.in
+@@ -24,7 +24,7 @@
+ 
+ #define LOG_FACILITY_MAX        7
+ #define PROG                    "Keepalived"
+-#define VERSION_STRING PROG" v@VERSION@ (@VERSION_DATE@)\n"
++#define VERSION_STRING PROG" v@VERSION@\n"
+ #define COPYRIGHT_STRING	"Copyright (C) 2001-2012 Alexandre Cassen, <acas...@gmail.com>"
+ 
+ 
diff --git a/debian/patches/series b/debian/patches/series
index e69de29..59a68c4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -0,0 +1 @@
+remove_date_from_version.patch

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to