Add strip and pie
(cherry picked from commit c411b5c9be752a00811be06ee85e03e216faa612)
This commit is contained in:
parent
731a4cc7b8
commit
2c79319c69
@ -2,7 +2,7 @@
|
||||
|
||||
Name: alertmanager
|
||||
Version: 0.21.0
|
||||
Release: 5
|
||||
Release: 6
|
||||
Summary: Prometheus Alertmanager.
|
||||
License: ASL 2.0
|
||||
URL: https://github.com/prometheus/%{name}
|
||||
@ -28,8 +28,9 @@ takes care of silencing and inhibition of alerts.
|
||||
%setup -q -n %{name}-%{version}
|
||||
|
||||
%build
|
||||
go build -mod=vendor -o %{_builddir}/%{name}-%{version}/bin/alertmanager ./cmd/alertmanager
|
||||
go build -mod=vendor -o %{_builddir}/%{name}-%{version}/bin/amtool ./cmd/amtool
|
||||
export GOFLAGS="-mod=vendor -buildmode=pie"
|
||||
go build -ldflags '-w -s -linkmode=external -extldflags "-Wl,-z,relro -Wl,-z,now -pie"' -mod=vendor -o %{_builddir}/%{name}-%{version}/bin/alertmanager ./cmd/alertmanager
|
||||
go build -ldflags '-w -s -linkmode=external -extldflags "-Wl,-z,relro -Wl,-z,now -pie"' -mod=vendor -o %{_builddir}/%{name}-%{version}/bin/amtool ./cmd/amtool
|
||||
|
||||
%install
|
||||
mkdir -vp %{buildroot}%{_sharedstatedir}/prometheus
|
||||
@ -65,6 +66,9 @@ exit 0
|
||||
%dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus
|
||||
|
||||
%changelog
|
||||
* Tue Mar 07 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 0.21.0-6
|
||||
- Add strip and pie
|
||||
|
||||
* Fri Feb 03 2023 jiangxinyu <jiangxinyu@kylinos.cn> - 0.21.0-5
|
||||
- Add buildRequires systemd
|
||||
|
||||
@ -77,4 +81,4 @@ exit 0
|
||||
- DESC: solve empty postun transaction issue.
|
||||
|
||||
* Tue Aug 11 2020 houjian <houjian@kylinos.cn> - 0.21.0-2
|
||||
- Package init
|
||||
- Package init
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user