Compare commits

...

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
a79ef22631
!23 [sync] PR-22: Repair the build of the RISC-V platform.
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2024-04-03 02:06:20 +00:00
iGxnon
5f6854843f temporarily fix building for riscv
Signed-off-by: iGxnon <igxnon@gmail.com>
(cherry picked from commit 2a25b4ae0fd8527354002eed5103b271b6867f61)
2024-04-03 09:45:38 +08:00
openeuler-ci-bot
9c8f2b6481
!19 [sync] PR-18: update to v0.26.0 to fix CVE-2023-40577
From: @openeuler-sync-bot 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2023-09-07 08:49:43 +00:00
guozhengxin
e7f6a4141b update to v0.26.0
(cherry picked from commit 965909d4d75d6aae95e2e282f592b698f657034f)
2023-09-06 08:59:39 +08:00
openeuler-ci-bot
659016a567
!15 update sys and net to support loong64
From: @zhangwenlong01 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2023-06-09 07:18:14 +00:00
Wenlong Zhang
693aaacc5c update sys and net to support loong64 2023-06-01 11:41:32 +08:00
openeuler-ci-bot
5385225488
!12 [sync] PR-10: Add strip and pie
From: @openeuler-sync-bot 
Reviewed-by: @jxy_git 
Signed-off-by: @jxy_git
2023-03-07 03:19:50 +00:00
jxy_git
2c79319c69 Add strip and pie
(cherry picked from commit c411b5c9be752a00811be06ee85e03e216faa612)
2023-03-07 11:06:55 +08:00
openeuler-ci-bot
731a4cc7b8
!7 Add buildRequires systemd
From: @jxy_git 
Reviewed-by: @yangzhao_kl 
Signed-off-by: @yangzhao_kl
2023-02-03 08:14:49 +00:00
jxy_git
49ae448c9d Add buildRequires systemd 2023-02-03 15:59:18 +08:00
5 changed files with 65 additions and 9 deletions

View 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

View File

@ -1,19 +1,23 @@
%define debug_package %{nil}
Name: alertmanager
Version: 0.21.0
Release: 4
Version: 0.26.0
Release: 2
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
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}
Requires(pre): shadow-utils
@ -26,15 +30,25 @@ takes care of silencing and inhibition of alerts.
%prep
%setup -q -n %{name}-%{version}
%patch0 -p1
tar -xzvf %{SOURCE4}
%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
mkdir -p $(go env GOPATH)/bin/
cp -n $(which promu) $(go env GOPATH)/bin/
export GOFLAGS="-mod=vendor -buildmode=pie
%ifarch riscv64
-gcflags=all=-d=wrapglobalmapctl=1
%endif
"
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
@ -65,6 +79,23 @@ exit 0
%dir %attr(755, prometheus, prometheus)%{_sharedstatedir}/prometheus
%changelog
* Sat Mar 23 2024 Wenhui Tang <wenhui.oerv@isrc.iscas.ac.cn> - 0.26.0-2
- Append flags to GOFLAGS to fix go linker bugs for riscv
- Related issue: https://github.com/golang/go/issues/62465
- This is a temporary solution that requires fixing the upstream riscv support for golang.
* 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
* 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
* Sat Jan 29 2022 yangzhao <yangzhao1@kylinos.cn> - 0.21.0-4
- Build from source code
@ -74,4 +105,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

Binary file not shown.

BIN
v0.26.0.tar.gz Normal file

Binary file not shown.

BIN
vendor.tar.gz Normal file

Binary file not shown.