17
0

Upgrade to version 0.28.1 #1

Open
witekbedyk wants to merge 5 commits from witekbedyk/golang-github-prometheus-alertmanager:mlmtools-main into leap-16.0
10 changed files with 245 additions and 60 deletions

View File

@@ -1,4 +1,4 @@
From 09b9b978c3da4a8b431030cadc685ea2be68528e Mon Sep 17 00:00:00 2001
From 407e5faf4924e1e77bf782fd6e143c412676371b Mon Sep 17 00:00:00 2001
From: Jan Fajerski <jfajerski@suse.com>
Date: Fri, 8 Feb 2019 12:14:47 +0100
Subject: [PATCH] Adjust default settings
@@ -9,10 +9,10 @@ Signed-off-by: Jan Fajerski <jfajerski@suse.com>
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/alertmanager/main.go b/cmd/alertmanager/main.go
index b645aa3..c91dc69 100644
index 30b02447..6f2635e4 100644
--- a/cmd/alertmanager/main.go
+++ b/cmd/alertmanager/main.go
@@ -199,8 +199,8 @@ func run() int {
@@ -143,8 +143,8 @@ func run() int {
}
var (
@@ -22,4 +22,7 @@ index b645aa3..c91dc69 100644
+ dataDir = kingpin.Flag("storage.path", "Base path for data storage.").Default("/var/lib/prometheus/alertmanager").String()
retention = kingpin.Flag("data.retention", "How long to keep data for.").Default("120h").Duration()
maintenanceInterval = kingpin.Flag("data.maintenance-interval", "Interval between garbage collection and snapshotting to disk of the silences and the notification logs.").Default("15m").Duration()
alertGCInterval = kingpin.Flag("alerts.gc-interval", "Interval between alert GC.").Default("30m").Duration()
maxSilences = kingpin.Flag("silences.max-silences", "Maximum number of silences, including expired silences. If negative or zero, no limit is set.").Default("0").Int()
--
2.47.1

98
0002-Bump-x-net.patch Normal file
View File

@@ -0,0 +1,98 @@
diff --git a/go.mod b/go.mod
index 886f16f3..ca7c42d3 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,8 @@
module github.com/prometheus/alertmanager
-go 1.22.0
+go 1.23.0
+
+toolchain go1.24.3
require (
github.com/KimMachineGun/automemlimit v0.7.0
@@ -43,8 +45,8 @@ require (
go.uber.org/atomic v1.11.0
go.uber.org/automaxprocs v1.6.0
golang.org/x/mod v0.22.0
- golang.org/x/net v0.33.0
- golang.org/x/text v0.21.0
+ golang.org/x/net v0.36.0
+ golang.org/x/text v0.22.0
golang.org/x/tools v0.28.0
gopkg.in/telebot.v3 v3.3.8
gopkg.in/yaml.v2 v2.4.0
@@ -93,10 +95,10 @@ require (
go.opentelemetry.io/otel v1.24.0 // indirect
go.opentelemetry.io/otel/metric v1.24.0 // indirect
go.opentelemetry.io/otel/trace v1.24.0 // indirect
- golang.org/x/crypto v0.31.0 // indirect
+ golang.org/x/crypto v0.35.0 // indirect
golang.org/x/oauth2 v0.24.0 // indirect
- golang.org/x/sync v0.10.0 // indirect
- golang.org/x/sys v0.28.0 // indirect
+ golang.org/x/sync v0.11.0 // indirect
+ golang.org/x/sys v0.30.0 // indirect
google.golang.org/protobuf v1.35.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/go.sum b/go.sum
index 8b90e154..79f0edeb 100644
--- a/go.sum
+++ b/go.sum
@@ -550,8 +550,8 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh
golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.31.0 h1:ihbySMvVjLAeSH1IbfcRTkD/iNscyz8rGzjF/E5hV6U=
-golang.org/x/crypto v0.31.0/go.mod h1:kDsLvtWBEx7MV9tJOj9bnXsPbxwJQ6csT/x4KIN4Ssk=
+golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
+golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -636,8 +636,8 @@ golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su
golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.33.0 h1:74SYHlV8BIgHIFC/LrYkOGIwL19eTYXQ5wc6TBuO36I=
-golang.org/x/net v0.33.0/go.mod h1:HXLR5J+9DxmrqMwG9qjGCxZ+zKXxBru04zlTvWlWuN4=
+golang.org/x/net v0.36.0 h1:vWF2fRbw4qslQsQzgFqZff+BItCvGFQqKzKIzx1rmoA=
+golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -672,8 +672,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.10.0 h1:3NQrjDixjgGwUOCaF8w2+VYHv0Ve/vGYSbdkTa98gmQ=
-golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
+golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -752,8 +752,8 @@ golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220412211240-33da011f77ad/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
-golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
+golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -765,8 +765,8 @@ golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.21.0 h1:zyQAAkrwaneQ066sspRyJaG9VNi/YJ1NfzcGB3hZ/qo=
-golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ=
+golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
+golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=

View File

@@ -1,13 +0,0 @@
Index: alertmanager-0.26.0/.promu.yml
===================================================================
--- alertmanager-0.26.0.orig/.promu.yml
+++ alertmanager-0.26.0/.promu.yml
@@ -10,7 +10,7 @@ build:
path: ./cmd/alertmanager
- name: amtool
path: ./cmd/amtool
- flags: -a
+ flags: -a -buildmode pie
tags:
all:
- netgo

View File

@@ -1,22 +1,6 @@
<services>
<service name="obs_scm" mode="disabled">
<param name="scm">git</param>
<param name="url">https://github.com/prometheus/alertmanager</param>
<param name="exclude">.git</param>
<param name="exclude">.github</param>
<param name="revision">refs/tags/v0.26.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">^\D*([\d.]+)$</param>
</service>
<service name="set_version" mode="disabled">
<param name="basename">alertmanager</param>
</service>
<service name="tar" mode="buildtime"/>
<service name="recompress" mode="buildtime">
<param name="file">alertmanager-*.tar</param>
<param name="compression">gz</param>
</service>
<service name="go_modules" mode="disabled">
<param name="archive">alertmanager-0.26.0.obscpio</param>
<service name="download_files" mode="manual" />
<service name="go_modules" mode="manual">
<param name="archive">alertmanager-*.tar.gz</param>
</service>
</services>

Binary file not shown.

BIN
alertmanager-0.28.1.tar.gz LFS Normal file

Binary file not shown.

View File

@@ -1,4 +1,4 @@
name: alertmanager
version: 0.26.0
mtime: 1692862323
commit: d7b4f0c7322e7151d6e3b1e31cbc15361e295d8d
version: 0.28.1
mtime: 1741356286
commit: b2099eaa2c9ebc25edb26517cb9c732738e93910

View File

@@ -1,3 +1,103 @@
-------------------------------------------------------------------
Thu Feb 5 13:41:59 UTC 2026 - Witek Bedyk <witold.bedyk@suse.com>
- Replace cpio with tar
- Build only for SUSE distributions
-------------------------------------------------------------------
Tue Dec 16 15:43:45 UTC 2025 - Witek Bedyk <witold.bedyk@suse.com>
- Require gcc11-c++ for building with SLE 12
-------------------------------------------------------------------
Mon Aug 11 10:15:07 UTC 2025 - Witek Bedyk <witold.bedyk@suse.com>
- Rebase 0001-Default-settings.patch
- Rebase 0002-Bump-x-net.patch
- Update to version 0.28.1 (jsc#PED-13285):
* Improved performance of inhibition rules when using Equal
labels.
* Improve the documentation on escaping in UTF-8 matchers.
* Update alertmanager_config_hash metric help to document the
hash is not cryptographically strong.
* Fix panic in amtool when using --verbose.
* Fix templating of channel field for Rocket.Chat.
* Fix rocketchat_configs written as rocket_configs in docs.
* Fix usage for --enable-feature flag.
* Trim whitespace from OpsGenie API Key.
* Fix Jira project template not rendered when searching for
existing issues.
* Fix subtle bug in JSON/YAML encoding of inhibition rules that
would cause Equal labels to be omitted.
* Fix header for slack_configs in docs.
* Fix weight and wrap of Microsoft Teams notifications.
- Upgrade to version 0.28.0:
* CVE-2025-47908: Bump github.com/rs/cors (bsc#1247748).
* Templating errors in the SNS integration now return an error.
* Adopt log/slog, drop go-kit/log.
* Add a new Microsoft Teams integration based on Flows.
* Add a new Rocket.Chat integration.
* Add a new Jira integration.
* Add support for GOMEMLIMIT, enable it via the feature flag
--enable-feature=auto-gomemlimit.
* Add support for GOMAXPROCS, enable it via the feature flag
--enable-feature=auto-gomaxprocs.
* Add support for limits of silences including the maximum number
of active and pending silences, and the maximum size per
silence (in bytes). You can use the flags
--silences.max-silences and --silences.max-silence-size-bytes
to set them accordingly.
* Muted alerts now show whether they are suppressed or not in
both the /api/v2/alerts endpoint and the Alertmanager UI.
- Upgrade to version 0.27.0:
* API: Removal of all api/v1/ endpoints. These endpoints
now log and return a deprecation message and respond with a
status code of 410.
* UTF-8 Support: Introduction of support for any UTF-8
character as part of label names and matchers.
* Discord Integration: Enforce max length in message.
* Metrics: Introduced the experimental feature flag
--enable-feature=receiver-name-in-metrics to include the
receiver name.
* Metrics: Introduced a new gauge named
alertmanager_inhibition_rules that counts the number of
configured inhibition rules.
* Metrics: Introduced a new counter named
alertmanager_alerts_supressed_total that tracks muted alerts,
it contains a reason label to indicate the source of the mute.
* Discord Integration: Introduced support for webhook_url_file.
* Microsoft Teams Integration: Introduced support for
webhook_url_file.
* Microsoft Teams Integration: Add support for summary.
* Metrics: Notification metrics now support two new values for
the label reason, contextCanceled and contextDeadlineExceeded.
* Email Integration: Contents of auth_password_file are now
trimmed of prefixed and suffixed whitespace.
* amtool: Fixes the error scheme required for webhook url when
using amtool with --alertmanager.url.
* Mixin: Fix AlertmanagerFailedToSendAlerts,
AlertmanagerClusterFailedToSendAlerts, and
AlertmanagerClusterFailedToSendAlerts to make sure they ignore
the reason label.
-------------------------------------------------------------------
Wed May 28 08:43:39 UTC 2025 - Witek Bedyk <witold.bedyk@suse.com>
- Security:
* Fix proxy bypassing using IPv6 zone IDs
(CVE-2025-22870, bsc#1238686)
* Fix HTTP/2 CONTINUATION flood in net/http
(CVE-2023-45288, bsc#1236516)
* Add 0002-Bump-x-net.patch
- Use `manual` build service
- Partially drop Go packaging macros
- Add testing
- remove patch 0002-Set-build-flags.patch and instead set GO_FLAGS
environment variable in the spec file
-------------------------------------------------------------------
Tue Feb 27 11:41:27 UTC 2024 - Witek Bedyk <witold.bedyk@suse.com>

View File

@@ -16,24 +16,26 @@
#
Name: golang-github-prometheus-alertmanager
Version: 0.26.0
Version: 0.28.1
Release: 0
Summary: Prometheus Alertmanager
License: Apache-2.0
URL: https://prometheus.io/
URL: https://github.com/prometheus/alertmanager
Group: System/Monitoring
Source: alertmanager-%{version}.tar.gz
Source: %{URL}/archive/refs/tags/v%{version}.tar.gz#/alertmanager-%{version}.tar.gz
Source1: vendor.tar.gz
Source2: prometheus-alertmanager.service
Source3: alertmanager.yml
# Lifted from Debian's alertmanager package
Patch1: 0001-Default-settings.patch
# Build as position independent executables (PIE)
Patch2: 0002-Set-build-flags.patch
Patch2: 0002-Bump-x-net.patch
BuildRequires: fdupes
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
BuildRequires: gcc11-c++
%endif
BuildRequires: golang-github-prometheus-promu >= 0.12.0
BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.20
BuildRequires: golang(API) >= 1.23
Requires(pre): group(prometheus)
Requires(pre): user(prometheus)
Provides: prometheus-alertmanager = %{version}
@@ -44,6 +46,10 @@ ExcludeArch: s390
%{go_nostrip}
%endif
%if ! 0%{?suse_version}
ExclusiveArch: do_not_build
%endif
%description
The Alertmanager handles alerts sent by client applications such as the
Prometheus server. It takes care of deduplicating, grouping, and routing
@@ -51,22 +57,24 @@ them to the correct receiver integration such as email, PagerDuty, or
OpsGenie. It also takes care of silencing and inhibition of alerts.
%prep
%ifarch s390x
%autosetup -N -a1 -n alertmanager-%{version}
%patch -P 1 -p1
%else
%autosetup -a1 -p1 -n alertmanager-%{version}
%endif
%build
%goprep github.com/prometheus/alertmanager
GOPATH=%{_builddir}/go promu build -v
%ifarch %{ix86} armv7l armv7hl s390x
export BUILD_CGO_FLAG="--cgo"
%if 0%{?suse_version} == 1315 && !0%{?is_opensuse}
export CC=gcc-11
export CXX=g++-11
%endif
%endif
%ifnarch ppc64
export GOFLAGS="-buildmode=pie"
%endif
promu build -v $BUILD_CGO_FLAG
%install
%goinstall
install -D -m0755 %{_builddir}/alertmanager-%{version}/alertmanager %{buildroot}/%{_bindir}/alertmanager
install -D -m0755 %{_builddir}/alertmanager-%{version}/alertmanager %{buildroot}/%{_bindir}/prometheus-alertmanager
install -D -m0755 %{_builddir}/alertmanager-%{version}/amtool %{buildroot}/%{_bindir}/amtool
mv %{buildroot}%{_bindir}/alertmanager %{buildroot}%{_bindir}/prometheus-alertmanager
install -D -m 0644 %{SOURCE2} %{buildroot}%{_unitdir}/prometheus-alertmanager.service
install -Dd -m 0755 %{buildroot}%{_sbindir}
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rcprometheus-alertmanager
@@ -76,6 +84,11 @@ install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus
install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/alertmanager
%fdupes %{buildroot}/%{_prefix}
%check
go test -short -x `go list ./... | grep -v cluster`
%{buildroot}%{_bindir}/prometheus-alertmanager --version
%{buildroot}%{_bindir}/amtool --version
%pre
%service_add_pre prometheus-alertmanager.service

BIN
vendor.tar.gz LFS

Binary file not shown.