forked from pool/opa-ff
17a9715db7
Add reproducible.patch to override build date (boo#1047218) OBS-URL: https://build.opensuse.org/request/show/626787 OBS-URL: https://build.opensuse.org/package/show/science:HPC/opa-ff?expand=0&rev=45
31 lines
925 B
Diff
31 lines
925 B
Diff
https://github.com/01org/opa-ff/pull/10
|
|
|
|
commit 2ae76192815212d7a3f821d6a3dddc3d0bb9eae4
|
|
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
|
|
Date: Wed Nov 15 20:14:04 2017 +0100
|
|
|
|
Allow to override build date
|
|
|
|
in order to make builds reproducible.
|
|
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.
|
|
This date call only works with GNU date.
|
|
|
|
Also use UTC to be independent of timezones.
|
|
And use ISO date format as the only proper way to unambiguously
|
|
represent a date.
|
|
|
|
diff --git a/MakeTools/prep.sh b/MakeTools/prep.sh
|
|
index c0a4bd1..52b19a6 100755
|
|
--- a/MakeTools/prep.sh
|
|
+++ b/MakeTools/prep.sh
|
|
@@ -81,6 +81,7 @@ then
|
|
exit 1
|
|
fi
|
|
|
|
+[[ $SOURCE_DATE_EPOCH ]] && DATE=`date -u -d "@$SOURCE_DATE_EPOCH" -Iseconds`
|
|
DATE=${DATE:-"`date +'%m/%d/%y %H:%M'`"}
|
|
|
|
if [ "$#" = 1 ]
|