!12 [sync] PR-10: 修复安选编译选项问题

From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
This commit is contained in:
openeuler-ci-bot 2023-02-09 04:36:45 +00:00 committed by Gitee
commit 379d083285
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -8,7 +8,7 @@
Name: pushgateway Name: pushgateway
Version: 1.4.1 Version: 1.4.1
Release: 3 Release: 4
Summary: Prometheus pushgateway. Summary: Prometheus pushgateway.
License: ASL 2.0 License: ASL 2.0
URL: https://github.com/prometheus/%{name} URL: https://github.com/prometheus/%{name}
@ -37,7 +37,7 @@ The Pushgateway then exposes these metrics to Prometheus.
%build %build
mkdir -p $(pwd)/bin mkdir -p $(pwd)/bin
export GOBIN=$(pwd)/bin export GOBIN=$(pwd)/bin
go build -mod=vendor -o bin ./ ... go build -mod=vendor -buildmode=pie -ldflags "-s -w" -o bin ./ ...
%install %install
mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_bindir}
@ -70,6 +70,9 @@ exit 0
%dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus %dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus
%changelog %changelog
* Thu Feb 09 2023 xu_ping <xuping33@h-partners.com> - 1.4.1-4
- set flags for build
* Thu Jan 5 2023 caodongxia <caodongxia@h-partners.com> - 1.4.1-3 * Thu Jan 5 2023 caodongxia <caodongxia@h-partners.com> - 1.4.1-3
- Add buildRequires systemd - Add buildRequires systemd