From 8a16a427b681ae224d97a20f3aeae57843e7adf056bf3ddd0f3791fd1bacf2a5 Mon Sep 17 00:00:00 2001 From: Witek Bedyk Date: Thu, 7 Apr 2022 14:42:16 +0000 Subject: [PATCH] Accepting request 967506 from home:juliogonzalezgil:branches:server:monitoring - Build firewalld-prometheus-config only for SUSE Linux Enterprise 15, 15.1 and 15.2, and require firewalld for it - firewalld-prometheus-config needs to be a Recommends, not a Requires, as prometheus does not require it to run OBS-URL: https://build.opensuse.org/request/show/967506 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=58 --- golang-github-prometheus-prometheus.changes | 8 ++++++++ golang-github-prometheus-prometheus.spec | 7 +++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/golang-github-prometheus-prometheus.changes b/golang-github-prometheus-prometheus.changes index 1aaab63..0733a2f 100644 --- a/golang-github-prometheus-prometheus.changes +++ b/golang-github-prometheus-prometheus.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Thu Apr 7 12:36:08 UTC 2022 - Julio González Gil + +- Build firewalld-prometheus-config only for SUSE Linux Enterprise + 15, 15.1 and 15.2, and require firewalld for it +- firewalld-prometheus-config needs to be a Recommends, not a + Requires, as prometheus does not require it to run + ------------------------------------------------------------------- Fri Mar 18 12:20:59 UTC 2022 - Witek Bedyk diff --git a/golang-github-prometheus-prometheus.spec b/golang-github-prometheus-prometheus.spec index 74bb499..96b6771 100644 --- a/golang-github-prometheus-prometheus.spec +++ b/golang-github-prometheus-prometheus.spec @@ -57,7 +57,9 @@ BuildRequires: golang-github-prometheus-promu BuildRequires: golang-packaging BuildRequires: golang(API) >= 1.16 BuildRoot: %{_tmppath}/%{name}-%{version}-build -Requires: firewalld-prometheus-config +%if 0%{?suse_version} >= 1500 +Recommends: firewalld-prometheus-config +%endif Requires(pre): user(prometheus) Requires(pre): group(prometheus) Requires(post): %fillup_prereq @@ -147,19 +149,20 @@ install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics %dir %{_sysconfdir}/prometheus %config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml +%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300 %package -n firewalld-prometheus-config Summary: Firewalld configuration file for Prometheus Group: Productivity/Networking/Security Version: 0.1 Release: 0 License: GPL-2.0-or-later +Requires: firewalld %description -n firewalld-prometheus-config This package contains configuration file for Prometheus for older versions of Firewalld which do not provide this in own package. %files -n firewalld-prometheus-config -%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300 %dir %{_prefix}/lib/firewalld %dir %{_prefix}/lib/firewalld/services %{_prefix}/lib/firewalld/services/prometheus.xml