SHA256
1
0
forked from pool/rekor

Accepting request 948951 from home:bmwiedemann:branches:security

Fix BUILD_DATE for reproducible build results (boo#1047218)

OBS-URL: https://build.opensuse.org/request/show/948951
OBS-URL: https://build.opensuse.org/package/show/security/rekor?expand=0&rev=4
This commit is contained in:
Marcus Meissner 2022-01-25 08:44:46 +00:00 committed by Git OBS Bridge
parent 23276d55ac
commit f4647966d7
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jan 25 08:32:11 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com>
- Fix BUILD_DATE for reproducible build results (boo#1047218)
-------------------------------------------------------------------
Thu Jan 6 14:52:16 UTC 2022 - Marcus Meissner <meissner@suse.com>

View File

@ -42,8 +42,8 @@ Rekor fulfils the signature transparency role of sigstore's software signing inf
%autosetup -p1 -a1
%build
DATE_FMT="+%Y-%m-%dT%H:%M:%SZ"
BUILD_DATE=$(shell date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}")
DATE_FMT="+%%Y-%%m-%%dT%%H:%%M:%%SZ"
BUILD_DATE=$(date -u -d "@${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u -r "${SOURCE_DATE_EPOCH}" "${DATE_FMT}" 2>/dev/null || date -u "${DATE_FMT}")
for app in %{apps} ; do
CLI_PKG=github.com/sigstore/rekor/cmd/rekor-${app}/app
CLI_LDFLAGS="-X ${CLI_PKG}.gitVersion=%{version} -X ${CLI_PKG}.gitCommit=%{revision} -X ${CLI_PKG}.gitTreeState=release -X ${CLI_PKG}.buildDate=${BUILD_DATE}"