From 7c45f219e4b2c1397551e3261e37125108d94ebf Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Thu, 13 Apr 2017 20:08:51 +0100 Subject: [PATCH] Please make the build reproducible Whilst working on the Reproducible Builds effort [0], we noticed that miniupnpd could not be built reproducibly due to embedded timestamps. [0] https://reproducible-builds.org/ Signed-off-by: Chris Lamb --- miniupnpd/genconfig.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/miniupnpd/genconfig.sh b/miniupnpd/genconfig.sh index 1e0f0b7..d938a38 100755 --- a/miniupnpd/genconfig.sh +++ b/miniupnpd/genconfig.sh @@ -60,6 +60,10 @@ CONFIGFILE_FINAL="config.h" CONFIGMACRO="CONFIG_H_INCLUDED" MINIUPNPD_DATE=`date +"%Y%m%d"` +if [ -n "$SOURCE_DATE_EPOCH" ]; then + MINIUPNPD_DATE=`date --utc --date="@$SOURCE_DATE_EPOCH" +"%Y%m%d"` +fi + # Facility to syslog LOG_MINIUPNPD="LOG_DAEMON"