[Reproducible-builds] Bug#831346: ntopng: please make the build reproducible

Chris Lamb lamby at debian.org
Thu Jul 14 19:18:26 UTC 2016


Source: ntopng
Version: 2.2+dfsg1-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 ntopng could not be built reproducibly.

Patch attached. It can probably go upstream.

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


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-
-------------- next part --------------
--- a/debian/patches/reproducible-build.patch	1970-01-01 02:00:00.000000000 +0200
--- b/debian/patches/reproducible-build.patch	2016-07-14 21:16:07.446012094 +0200
@@ -0,0 +1,24 @@
+Author: Chris Lamb <lamby at debian.org>
+Last-Update: 2016-07-14
+
+--- ntopng-2.2+dfsg1.orig/autogen.sh
++++ ntopng-2.2+dfsg1/autogen.sh
+@@ -1,7 +1,7 @@
+ #!/usr/bin/env bash
+ 
+-TODAY=`date +%y%m%d`
+-NOW=`date +%s`
++TODAY=$(date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}" +%y%m%d)
++NOW=${SOURCE_DATE_EPOCH:-$(date +%s)}
+ MAJOR_RELEASE="2"
+ MINOR_RELEASE="3"
+ SHORT_VERSION="$MAJOR_RELEASE.$MINOR_RELEASE"
+@@ -14,7 +14,7 @@ GIT_RELEASE="$GIT_TAG:$GIT_DATE"
+ GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
+ else
+ GIT_RELEASE="$VERSION"
+-GIT_DATE=`date`
++GIT_DATE=$(LC_ALL=C date --utc --date="@${SOURCE_DATE_EPOCH:-$(date +%s)}")
+ GIT_BRANCH=""
+ fi
+ 
--- a/debian/patches/series	2016-07-14 21:04:24.658693160 +0200
--- b/debian/patches/series	2016-07-14 21:15:13.453449665 +0200
@@ -4,3 +4,4 @@
 no-pwd.patch
 no-detectxsslib.patch
 kfreebsd-tap.patch
+reproducible-build.patch


More information about the Reproducible-builds mailing list