From 9fe7712d1b4a3e86f7b910b4378107e62980a77ce5f64810a0c84f07e626daa3 Mon Sep 17 00:00:00 2001 From: Manfred Hollstein Date: Tue, 15 Nov 2022 11:18:31 +0000 Subject: [PATCH] Accepting request 1035822 from home:manfred-h:devel:kubic - Remove incorrectly added go_provides and go_nostrip macros - Add definition for SOURCE_DATE_EPOCH to enable reproducible builds OBS-URL: https://build.opensuse.org/request/show/1035822 OBS-URL: https://build.opensuse.org/package/show/devel:kubic/helmfile?expand=0&rev=70 --- helmfile.changes | 6 ++++++ helmfile.spec | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/helmfile.changes b/helmfile.changes index 1269d06..dc11bea 100644 --- a/helmfile.changes +++ b/helmfile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Nov 15 09:53:14 UTC 2022 - manfred.h@gmx.net + +- Remove incorrectly added go_provides and go_nostrip macros +- Add definition for SOURCE_DATE_EPOCH to enable reproducible builds + ------------------------------------------------------------------- Tue Nov 15 09:44:47 UTC 2022 - manfred.h@gmx.net diff --git a/helmfile.spec b/helmfile.spec index e44042e..c611319 100644 --- a/helmfile.spec +++ b/helmfile.spec @@ -33,8 +33,6 @@ BuildRequires: xz BuildRequires: golang(API) >= 1.19 Obsoletes: %{name}-bash-completion < %{version} Obsoletes: %{name}-zsh-completion < %{version} -%{go_nostrip} -%{go_provides} %description Helmfile is a declarative spec for deploying helm charts. It lets you... @@ -50,9 +48,16 @@ delegates to helm - as a result, helm must be installed. %setup -qa1 %build +modified="$(sed -n '/^----/n;s/ - .*$//;p;q' "%{_sourcedir}/%{name}.changes")" +SOURCE_DATE_EPOCH=$(date -u -d "${modified}" "+%s") +export SOURCE_DATE_EPOCH +rm -f source_date_epoch +echo SOURCE_DATE_EPOCH=$SOURCE_DATE_EPOCH > source_date_epoch go build -mod=vendor -buildmode=pie %install +. ./source_date_epoch +export SOURCE_DATE_EPOCH make TAG=v%{version} install mkdir -p %{buildroot}%{_bindir} install -m755 ${HOME}/go/bin/helmfile %{buildroot}/%{_bindir}/helmfile