commit 794951592b004e82c0160014751d9ebb654035c0 Author: Bernhard M. Wiedemann Date: Tue Jul 18 10:30:16 2017 +0200 drbd: Allow to override build date (v3) and to not record build user and hostname if requested in order to allow for reproducible builds. See https://reproducible-builds.org/ for why this is good and https://reproducible-builds.org/specs/source-date-epoch/ for the definition of this variable. diff --git a/drbd/Kbuild b/drbd/Kbuild index 2d1b4d0..80b8099 100644 --- a/drbd/Kbuild +++ b/drbd/Kbuild @@ -134,5 +134,10 @@ $(obj)/drbd_buildtag.c: $(filter-out drbd_buildtag.o,$(drbd-y)) echo >&2 "Your DRBD source tree is broken. Unpack again."; \ exit 1; \ fi ; \ - echo -e "\t\t\" build by $$USER@$$HOSTNAME, `date "+%F %T"`\";\n}"; \ + if [ -z "${WANT_DRBD_REPRODUCIBLE_BUILD}" ] || [ -z "${SOURCE_DATE_EPOCH}" ] ; then \ + buildinfo="build by $$USER@$$HOSTNAME, `date "+%F %T"`" ; \ + else \ + buildinfo="reproducible build, `date -u -d@${SOURCE_DATE_EPOCH} "+%F %T"`" ; \ + fi ; \ + echo -e "\t\t\" $$buildinfo\";\n}"; \ mv -f $@.new $@