[Reproducible-builds] Bug#832288: pxlib: please make the build reproducible
Chris Lamb
lamby at debian.org
Sat Jul 23 20:54:53 UTC 2016
Source: pxlib
Version: 0.6.6-1
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 pxlib 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/configure 2016-07-23 21:45:29.210427491 +0100
--- b/configure 2016-07-23 21:52:11.808017904 +0100
@@ -4568,7 +4568,11 @@
-PXLIB_BUILD_DATE=`date '+%Y-%m-%d'`
+if test -n "$SOURCE_DATE_EPOCH"; then
+ PXLIB_BUILD_DATE=`date --utc --date="@$SOURCE_DATE_EPOCH" '+%Y-%m-%d'`
+else
+ PXLIB_BUILD_DATE=`date '+%Y-%m-%d'`
+fi
cat >>confdefs.h <<_ACEOF
#define PXLIB_BUILD_DATE "$PXLIB_BUILD_DATE"
--- a/configure.ac 2016-07-23 21:45:29.210427491 +0100
--- b/configure.ac 2016-07-23 21:51:49.475706857 +0100
@@ -23,7 +23,12 @@
dnl VERSION=${PXLIB_VERSION}
-PXLIB_BUILD_DATE=`date '+%Y-%m-%d'`
+if test -n "$SOURCE_DATE_EPOCH"; then
+ PXLIB_BUILD_DATE=`date --utc --date="@$SOURCE_DATE_EPOCH" '+%Y-%m-%d'`
+else
+ PXLIB_BUILD_DATE=`date '+%Y-%m-%d'`
+fi
+
AC_DEFINE_UNQUOTED(PXLIB_BUILD_DATE,"$PXLIB_BUILD_DATE",[pxlib build date])
AC_SUBST(PXLIB_BUILD_DATE)
More information about the Reproducible-builds
mailing list