Bug#833441: rc: please make the build reproducible
Source: rc
Version: 1.7.2-2
Severity: wishlist
Tags: patch
User: reproducible-builds@lists.alioth.debian.org
Usertags: timestamps
X-Debbugs-Cc: reproducible-builds@lists.alioth.debian.org
Hi,
Whilst working on the "reproducible builds" effort [0], we noticed
that rc could not be built reproducibly.
Patch attached.
[0] https://wiki.debian.org/ReproducibleBuilds
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby@debian.org / chris-lamb.co.uk
`-
--- a/debian/patches/50_reproducible-build.patch 1970-01-01 01:00:00.000000000 +0100
--- b/debian/patches/50_reproducible-build.patch 2016-08-04 07:20:39.429150414 +0100
@@ -0,0 +1,19 @@
+Description: Make the build reproducible
+Author: Chris Lamb <lamby@debian.org>
+Last-Update: 2016-08-04
+
+--- rc-1.7.2.orig/configure.ac
++++ rc-1.7.2/configure.ac
+@@ -2,7 +2,11 @@ dnl Our package name, version, ...
+ AC_INIT([rc], [1.7.2])
+
+ dnl ... and release date
+-RELDATE=`date -I`
++if test -n "$SOURCE_DATE_EPOCH"; then
++ RELDATE=`date --utc -I --date="@$SOURCE_DATE_EPOCH"`
++else
++ RELDATE=`date -I`
++fi
+ AC_DEFINE_UNQUOTED(RELDATE, "$RELDATE", [Release date])
+
+ dnl Get things going...
--- a/debian/patches/series 2016-08-04 07:15:24.122713636 +0100
--- b/debian/patches/series 2016-08-04 07:20:38.005139349 +0100
@@ -2,3 +2,4 @@
20_panic-attribute-noreturn.patch
30_trip-hide-envvars.patch
40_manpage-typography.patch
+50_reproducible-build.patch
Reply to: