From c01e45dacada91d856017b49c59a7a594c075176 Mon Sep 17 00:00:00 2001 From: Douglas Royds Date: Mon, 19 Nov 2018 12:00:25 +1300 Subject: [PATCH] ITS#8928 Reproducibility: Remove user, hostname, pwd from version string When attempting a reproducible build, replace the WHOWHERE value with something fixed, "openldap". If you're not trying to do a reproducible build, SOURCE_DATE_EPOCH won't be set, so the existing WHOWHERE string will apply. See https://reproducible-builds.org/specs/source-date-epoch/ --- build/mkversion | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/mkversion b/build/mkversion index e4f70eb3bb..4e35723621 100755 --- a/build/mkversion +++ b/build/mkversion @@ -50,7 +50,12 @@ if test $# != 1 ; then fi APPLICATION=$1 -WHOWHERE="$USER@`uname -n`:`pwd`" +# Reproducible builds set SOURCE_DATE_EPOCH, want constant strings +if [ -n "${SOURCE_DATE_EPOCH}" ]; then + WHOWHERE="openldap" +else + WHOWHERE="$USER@$(uname -n):$(pwd)" +fi cat << __EOF__ /* This work is part of OpenLDAP Software .