[Reproducible-builds] Bug#831660: vtun: please make the build reproducible

Chris Lamb lamby at debian.org
Mon Jul 18 09:43:32 UTC 2016


Source: vtun
Version: 3.0.3-2.2
Severity: wishlist
Tags: patch
User: reproducible-builds at lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds at lists.alioth.debian.org

Hi,

Whilst working on the "reproducible builds" effort [0], we noticed
that vtun could not be built reproducibly.

Patch attached.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/10-reproducible-build.patch	1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/10-reproducible-build.patch	2016-07-18 11:42:23.424612145 +0200
@@ -0,0 +1,39 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-07-18
+
+--- vtun-3.0.3.orig/configure.in
++++ vtun-3.0.3/configure.in
+@@ -274,6 +274,12 @@ changequote(<,>)
+ REL=`echo 'BRANCH-3_X' | tr -d '$: \-' | sed 's/^[A-Za-z]*//' | sed 's/\_/\./'`
+ changequote([,])
+ 
+-AC_DEFINE_UNQUOTED(VTUN_VER, "$REL `date '+%m/%d/%Y'`")
++if test -n "$SOURCE_DATE_EPOCH"; then
++	BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH}" '+%m/%d/%Y'`
++else
++	BUILD_DATE=`date '+%m/%d/%Y'`
++fi
++
++AC_DEFINE_UNQUOTED(VTUN_VER, "$REL $BUILD_DATE")
+ 
+ AC_OUTPUT(Makefile)
+
+--- vtun-3.0.3.orig/configure
++++ vtun-3.0.3/configure
+@@ -6539,9 +6539,14 @@ echo "${ECHO_T}" >&6
+ 
+ REL=`echo 'BRANCH-3_X' | tr -d '$: \-' | sed 's/^[A-Za-z]*//' | sed 's/\_/\./'`
+ 
++if test -n "$SOURCE_DATE_EPOCH"; then
++	BUILD_DATE=`date --utc --date="@${SOURCE_DATE_EPOCH}" '+%m/%d/%Y'`
++else
++	BUILD_DATE=`date '+%m/%d/%Y'`
++fi
+ 
+ cat >>confdefs.h <<_ACEOF
+-#define VTUN_VER "$REL `date '+%m/%d/%Y'`"
++#define VTUN_VER "$REL $BUILD_DATE"
+ _ACEOF
+ 
+ 
--- a/debian/patches/series	2016-07-18 11:29:16.344108326 +0200
--- b/debian/patches/series	2016-07-18 11:40:53.131200698 +0200
@@ -8,3 +8,4 @@
 07-dual-family-transport.patch
 08-gcc5-inline.patch
 09-client-uses-lot-of-CPU-after-a-SIGHUP.patch
+10-reproducible-build.patch


More information about the Reproducible-builds mailing list