SHA256
1
0
forked from pool/opa-ff

Accepting request 626801 from science:HPC

OBS-URL: https://build.opensuse.org/request/show/626801
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/opa-ff?expand=0&rev=11
This commit is contained in:
Dominique Leuenberger 2018-08-02 12:59:07 +00:00 committed by Git OBS Bridge
commit 41fdd3242d
3 changed files with 37 additions and 0 deletions

View File

@ -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

View File

@ -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

30
reproducible.patch Normal file
View File

@ -0,0 +1,30 @@
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 ]