diff --git a/opa-ff.changes b/opa-ff.changes index 1a017d2..8e6cfaf 100644 --- a/opa-ff.changes +++ b/opa-ff.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Aug 1 04:29:23 UTC 2018 - bwiedemann@suse.com + +- Add reproducible.patch to override build date (boo#1047218) + ------------------------------------------------------------------- Tue Jun 12 07:16:45 UTC 2018 - nmoreychaisemartin@suse.com diff --git a/opa-ff.spec b/opa-ff.spec index 8e17d38..8e7098e 100644 --- a/opa-ff.spec +++ b/opa-ff.spec @@ -34,6 +34,7 @@ Source0: %{name}-%{version}%{git_ver}.tar.gz Source1: opa-ff.rpmlintrc Patch1: opa-ff-add-shebang-for-exp-files.patch Patch2: opa-ff-suse-build-fixes.patch +Patch3: reproducible.patch BuildRequires: gcc-c++ BuildRequires: infiniband-diags-devel BuildRequires: libexpat-devel @@ -118,6 +119,7 @@ This package contains the necessary headers for opamgt development. %setup -q -n %{name}-%{version}%{git_ver} %patch1 %patch2 +%patch3 -p1 %build export RPM_OPT_FLAGS diff --git a/reproducible.patch b/reproducible.patch new file mode 100644 index 0000000..769f828 --- /dev/null +++ b/reproducible.patch @@ -0,0 +1,30 @@ +https://github.com/01org/opa-ff/pull/10 + +commit 2ae76192815212d7a3f821d6a3dddc3d0bb9eae4 +Author: Bernhard M. Wiedemann +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 ]