## START: Set by rpmautospec ## (rpmautospec version 0.3.5) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 15; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # Generated by go2rpm 1.5.0 %bcond_with check %global shortname prometheus-alertmanager # https://github.com/prometheus/alertmanager %global goipath github.com/prometheus/alertmanager Version: 0.23.0 %gometa %global common_description %{expand: The Alertmanager handles alerts sent by client applications such as the Prometheus server. It takes care of deduplicating, grouping, and routing them to the correct receiver integrations such as email, PagerDuty, or OpsGenie. It also takes care of silencing and inhibition of alerts.} %global golicenses COPYRIGHT.txt LICENSE NOTICE %global godocs doc examples MAINTAINERS.md README.md CHANGELOG.md SECURITY.md Name: %{goname} Release: %autorelease Summary: Prometheus Alertmanager # Upstream license specification: Apache-2.0 License: ASL 2.0 URL: %{gourl} Source0: %{gosource} Source1: %{shortname}.service Source2: %{shortname}.sysusers Source3: %{shortname}.conf Source4: %{shortname}.yml Source5: README.templates Source6: %{shortname}.logrotate # Replace defaults paths for config files Patch0: defaults-paths.patch BuildRequires: systemd-rpm-macros BuildRequires: golang(github.com/alecthomas/units) BuildRequires: golang(github.com/cenkalti/backoff/v4) BuildRequires: golang(github.com/cespare/xxhash) BuildRequires: golang(github.com/go-kit/kit/log) BuildRequires: golang(github.com/go-kit/kit/log/level) BuildRequires: golang(github.com/go-openapi/errors) BuildRequires: golang(github.com/go-openapi/loads) BuildRequires: golang(github.com/go-openapi/runtime) BuildRequires: golang(github.com/go-openapi/runtime/client) BuildRequires: golang(github.com/go-openapi/runtime/flagext) BuildRequires: golang(github.com/go-openapi/runtime/middleware) BuildRequires: golang(github.com/go-openapi/runtime/security) BuildRequires: golang(github.com/go-openapi/spec) BuildRequires: golang(github.com/go-openapi/strfmt) BuildRequires: golang(github.com/go-openapi/swag) BuildRequires: golang(github.com/go-openapi/validate) BuildRequires: golang(github.com/gofrs/uuid) BuildRequires: golang(github.com/gogo/protobuf/gogoproto) BuildRequires: golang(github.com/gogo/protobuf/proto) BuildRequires: golang(github.com/gogo/protobuf/types) BuildRequires: golang(github.com/hashicorp/go-sockaddr) BuildRequires: golang(github.com/hashicorp/memberlist) BuildRequires: golang(github.com/jessevdk/go-flags) BuildRequires: golang(github.com/matttproud/golang_protobuf_extensions/pbutil) BuildRequires: golang(github.com/oklog/run) BuildRequires: golang(github.com/oklog/ulid) BuildRequires: golang(github.com/pkg/errors) BuildRequires: golang(github.com/prometheus/client_golang/api) BuildRequires: golang(github.com/prometheus/client_golang/prometheus) BuildRequires: golang(github.com/prometheus/client_golang/prometheus/promhttp) BuildRequires: golang(github.com/prometheus/common/config) BuildRequires: golang(github.com/prometheus/common/model) BuildRequires: golang(github.com/prometheus/common/promlog) BuildRequires: golang(github.com/prometheus/common/promlog/flag) BuildRequires: golang(github.com/prometheus/common/route) BuildRequires: golang(github.com/prometheus/common/version) BuildRequires: golang(github.com/prometheus/exporter-toolkit/web) BuildRequires: golang(github.com/prometheus/exporter-toolkit/web/kingpinflag) BuildRequires: golang(github.com/rs/cors) BuildRequires: golang(github.com/shurcooL/vfsgen) BuildRequires: golang(github.com/stretchr/testify/require) BuildRequires: golang(github.com/xlab/treeprint) BuildRequires: golang(golang.org/x/net/netutil) BuildRequires: golang(gopkg.in/alecthomas/kingpin.v2) BuildRequires: golang(gopkg.in/yaml.v2) %if %{with check} # Tests BuildRequires: golang(github.com/kylelemons/godebug/pretty) %endif Requires(pre): shadow-utils %description %{common_description} %gopkg %prep %goprep %patch0 -p1 %build LDFLAGS="-X github.com/prometheus/common/version.Version=%{version} \ -X github.com/prometheus/common/version.Revision=%{release} \ -X github.com/prometheus/common/version.Branch=tarball \ -X github.com/prometheus/common/version.BuildDate=$(date -u -d@$SOURCE_DATE_EPOCH +%%Y%%m%%d)" for cmd in cmd/* ; do %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd done %install %gopkginstall install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ mv %{buildroot}%{_bindir}/alertmanager %{buildroot}%{_bindir}/%{shortname} pushd %{buildroot}%{_bindir} ln -s %{shortname} alertmanager popd install -Dpm0644 %{S:4} %{buildroot}%{_sysconfdir}/prometheus/alertmanager.yml install -Dpm0644 %{S:5} %{buildroot}%{_sysconfdir}/prometheus/alertmanager_templates/README.templates mkdir -vp %{buildroot}%{_sharedstatedir}/prometheus/alertmanager install -Dpm0644 %{S:1} %{buildroot}%{_unitdir}/%{shortname}.service install -Dpm0644 %{S:2} %{buildroot}%{_sysusersdir}/%{shortname}.conf install -Dpm0644 %{S:3} %{buildroot}%{_sysconfdir}/default/%{shortname} install -Dpm0644 %{S:6} %{buildroot}%{_sysconfdir}/logrotate.d/%{shortname} install -Dpm0644 template/default.tmpl %{buildroot}/%{_datadir}/prometheus/alertmanager/template/default.tmpl # Build man pages. mkdir -vp %{buildroot}/%{_mandir}/man1/ %{buildroot}%{_bindir}/%{shortname} --help-man > \ %{buildroot}/%{_mandir}/man1/%{shortname}.1 %{buildroot}%{_bindir}/amtool --help-man > \ %{buildroot}/%{_mandir}/man1/amtool.1 sed -i '/^ /d; /^.SH "NAME"/,+1c.SH "NAME"\nprometheus-alertmanager \\- The Prometheus alert manager' \ %{buildroot}/%{_mandir}/man1/%{shortname}.1 sed -i '/^ /d; /^.SH "NAME"/,+1c.SH "NAME"\namtool \\- Tooling for the Prometheus alert manager' \ %{buildroot}/%{_mandir}/man1/amtool.1 # Fix executable path in amtool examples sed -i 's/\.\/amtool/amtool/' %{buildroot}/%{_mandir}/man1/amtool.1 %pre %sysusers_create_compat %{SOURCE2} %post %systemd_post %{shortname}.service %preun %systemd_preun %{shortname}.service %postun %systemd_postun_with_restart %{shortname}.service %if %{with check} %check %gocheck %endif %files %license COPYRIGHT.txt LICENSE NOTICE %doc doc examples MAINTAINERS.md README.md CHANGELOG.md SECURITY.md %{_bindir}/* %{_datadir}/prometheus %{_mandir}/man1/%{shortname}.1* %{_mandir}/man1/amtool.1* %dir %{_sysconfdir}/prometheus %config(noreplace) %{_sysconfdir}/prometheus/alertmanager.yml %config(noreplace) %{_sysconfdir}/logrotate.d/%{shortname} %{_sysconfdir}/prometheus/alertmanager_templates %config(noreplace) %{_sysconfdir}/default/%{shortname} %dir %attr(0755,prometheus,prometheus) %{_sharedstatedir}/prometheus %dir %attr(0755,prometheus,prometheus) %{_sharedstatedir}/prometheus/alertmanager %{_sysusersdir}/%{shortname}.conf %{_unitdir}/%{shortname}.service %gopkgfiles %changelog * Sat Apr 29 2023 Sérgio M. Basto <sergio@serjux.com> - 0.23.0-15 - Include s390x, and disable tests because it is failing * Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-14 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Wed Aug 10 2022 Maxwell G <gotmax@e.email> - 0.23.0-13 - Rebuild to fix FTBFS * Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jul 19 2022 Maxwell G <gotmax@e.email> - 0.23.0-11 - Rebuild for CVE-2022-{1705,32148,30631,30633,28131,30635,30632,30630,1962} in golang * Thu Jun 23 2022 Maxwell G <gotmax@e.email> - 0.23.0-10 - Rebuild to mitigate CVE-2022-21698 (rhbz#2067400). * Sun Jun 19 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0.23.0-9 - Rebuilt for CVE-2022-1996, CVE-2022-24675, CVE-2022-28327, CVE-2022-27191, CVE-2022-29526, CVE-2022-30629 * Sat Apr 16 2022 Fabio Alessandro Locati <me@fale.io> - 0.23.0-8 - Rebuilt for CVE-2022-27191 * Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 0.23.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Sun Jan 16 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0.23.0-6 - Fix sysusers Requires * Sun Jan 16 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0.23.0-5 - Add logrotate file * Fri Jan 14 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0.23.0-4 - Fix home directory permissions * Tue Jan 11 2022 Robert-André Mauchin <zebob.m@gmail.com> - 0.23.0-3 - Breaking changes: the binary is now named prometheus-alertmanager * Sun Aug 29 2021 Fabian Affolter <mail@fabian-affolter.ch> - 0.23.0-2 - Exclude s390x * Sun Aug 29 2021 Fabian Affolter <mail@fabian-affolter.ch> - 0.23.0-1 - Update to latest upstream release 0.23.0 (closes rhbz#1997579) * Thu Aug 12 2021 Robert-André Mauchin <zebob.m@gmail.com> - 0.22.2-1 - Update to 0.22.2 Close: rhbz#1957155,rhbz#1992361,rhbz#1991473 * Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.21.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild * Mon Dec 21 11:26:23 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.21.0-2 - Add patch to use newer common. - Fix FTBFS * Thu Jul 30 23:17:24 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.21.0-1 - Update to 0.21.0 * Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.20.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild * Sun Feb 02 01:22:57 CET 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.20.0-1 - Update to 0.20.0 * Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild * Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.18.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild * Tue Jul 09 20:05:46 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 0.18.0-1 - Initial package