SHA256
1
0
forked from pool/helmfile

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
This commit is contained in:
Manfred Hollstein 2022-11-15 11:18:31 +00:00 committed by Git OBS Bridge
parent 03af96c477
commit 9fe7712d1b
2 changed files with 13 additions and 2 deletions

View File

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

View File

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