https://github.com/antirez/redis/pull/4390 From 8832af49fa1f4fdd8f9e152f013bb71b343d26dd Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Sun, 22 Oct 2017 05:20:38 +0200 Subject: [PATCH 1/2] Use RELEASENOTES date instead of build date in order to make builds reproducible. See https://reproducible-builds.org/ for why this is good. --- src/mkreleasehdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkreleasehdr.sh b/src/mkreleasehdr.sh index 1ae95886b4a..c48156cf3dd 100755 --- a/src/mkreleasehdr.sh +++ b/src/mkreleasehdr.sh @@ -1,7 +1,7 @@ #!/bin/sh GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1` GIT_DIRTY=`git diff --no-ext-diff 2> /dev/null | wc -l` -BUILD_ID=`uname -n`"-"`date +%s` +BUILD_ID=`uname -n`"-"`date -r ../00-RELEASENOTES +%s` test -f release.h || touch release.h (cat release.h | grep SHA1 | grep $GIT_SHA1) && \ (cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already up-to-date From 96c1ddd8ad5b6f0f437011efef090e837a41f8e8 Mon Sep 17 00:00:00 2001 From: "Bernhard M. Wiedemann" Date: Wed, 11 Jul 2018 18:52:06 +0200 Subject: [PATCH 2/2] Allow to override hostname to make builds reproducible. --- src/mkreleasehdr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mkreleasehdr.sh b/src/mkreleasehdr.sh index c48156cf3dd..39cf37d3378 100755 --- a/src/mkreleasehdr.sh +++ b/src/mkreleasehdr.sh @@ -1,7 +1,7 @@ #!/bin/sh GIT_SHA1=`(git show-ref --head --hash=8 2> /dev/null || echo 00000000) | head -n1` GIT_DIRTY=`git diff --no-ext-diff 2> /dev/null | wc -l` -BUILD_ID=`uname -n`"-"`date -r ../00-RELEASENOTES +%s` +BUILD_ID=${HOST:-`uname -n`}"-"`date -r ../00-RELEASENOTES +%s` test -f release.h || touch release.h (cat release.h | grep SHA1 | grep $GIT_SHA1) && \ (cat release.h | grep DIRTY | grep $GIT_DIRTY) && exit 0 # Already up-to-date