update to v0.26.0
(cherry picked from commit 965909d4d75d6aae95e2e282f592b698f657034f)
This commit is contained in:
parent
659016a567
commit
e7f6a4141b
File diff suppressed because it is too large
Load Diff
25
0001-use-local-promu.patch
Normal file
25
0001-use-local-promu.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From aff2dabb339e1b7a249ac60dd0b341a35210acc3 Mon Sep 17 00:00:00 2001
|
||||
From: yangzhao_kl <yangzhao1@kylinos.cn>
|
||||
Date: Tue, 5 Sep 2023 15:52:42 +0800
|
||||
Subject: [PATCH] use local promu
|
||||
|
||||
---
|
||||
Makefile.common | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/Makefile.common b/Makefile.common
|
||||
index e372d34..52658d5 100644
|
||||
--- a/Makefile.common
|
||||
+++ b/Makefile.common
|
||||
@@ -195,7 +195,7 @@ common-unused:
|
||||
@git diff --exit-code -- go.sum go.mod
|
||||
|
||||
.PHONY: common-build
|
||||
-common-build: promu
|
||||
+common-build:
|
||||
@echo ">> building binaries"
|
||||
$(PROMU) build --prefix $(PREFIX) $(PROMU_BINARIES)
|
||||
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -1,19 +1,22 @@
|
||||
%define debug_package %{nil}
|
||||
|
||||
Name: alertmanager
|
||||
Version: 0.21.0
|
||||
Release: 7
|
||||
Version: 0.26.0
|
||||
Release: 1
|
||||
Summary: Prometheus Alertmanager.
|
||||
License: ASL 2.0
|
||||
License: Apache-2.0
|
||||
URL: https://github.com/prometheus/%{name}
|
||||
|
||||
Source0: https://github.com/prometheus/%{name}/archive/refs/tags/v%{version}.tar.gz
|
||||
Source1: %{name}.service
|
||||
Source2: %{name}.default
|
||||
Source3: %{name}.yml
|
||||
Patch0: 0001-update-sys-and-net-to-support-loong64.patch
|
||||
Source4: vendor.tar.gz
|
||||
Patch0: 0001-use-local-promu.patch
|
||||
|
||||
BuildRequires: golang
|
||||
BuildRequires: make
|
||||
BuildRequires: golang >= 1.18.0
|
||||
BuildRequires: promu
|
||||
BuildRequires: systemd
|
||||
|
||||
%{?systemd_requires}
|
||||
@ -27,19 +30,21 @@ takes care of silencing and inhibition of alerts.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}-%{version}
|
||||
%ifarch loongarch64
|
||||
%patch0 -p1
|
||||
%endif
|
||||
tar -xzvf %{SOURCE4}
|
||||
|
||||
%build
|
||||
mkdir -p $(go env GOPATH)/bin/
|
||||
cp -n $(which promu) $(go env GOPATH)/bin/
|
||||
|
||||
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
|
||||
make build
|
||||
|
||||
%install
|
||||
mkdir -vp %{buildroot}%{_sharedstatedir}/prometheus
|
||||
install -D -m 755 -vd %{buildroot}%{_bindir}
|
||||
install -D -m 755 -vp %{_builddir}/%{name}-%{version}/bin/* %{buildroot}%{_bindir}
|
||||
install -D -m 755 -vp alertmanager %{buildroot}%{_bindir}
|
||||
install -D -m 755 -vp amtool %{buildroot}%{_bindir}
|
||||
install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service
|
||||
install -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/default/%{name}
|
||||
install -D -m 644 %{SOURCE3} %{buildroot}%{_sysconfdir}/prometheus/%{name}.yml
|
||||
@ -70,6 +75,9 @@ exit 0
|
||||
%dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus
|
||||
|
||||
%changelog
|
||||
* Tue Sep 5 2023 Zhengxin Guo <guozhengxin@kylinos.cn> - 0.26.0-1
|
||||
- update to 0.26.0 to fix CVE-2023-40577
|
||||
|
||||
* Wed May 31 2023 Wenlong Zhang<zhangwenlong@loongson.cn> - 0.21.0-7
|
||||
- update sys and net to support loong64
|
||||
|
||||
|
||||
BIN
v0.21.0.tar.gz
BIN
v0.21.0.tar.gz
Binary file not shown.
BIN
v0.26.0.tar.gz
Normal file
BIN
v0.26.0.tar.gz
Normal file
Binary file not shown.
BIN
vendor.tar.gz
Normal file
BIN
vendor.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user