1
0

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
This commit is contained in:
Witek Bedyk 2022-04-07 14:42:16 +00:00 committed by Git OBS Bridge
parent 68dc9fd0a8
commit 8a16a427b6
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Thu Apr 7 12:36:08 UTC 2022 - Julio González Gil <jgonzalez@suse.com>
- 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 <witold.bedyk@suse.com> Fri Mar 18 12:20:59 UTC 2022 - Witek Bedyk <witold.bedyk@suse.com>

View File

@ -57,7 +57,9 @@ BuildRequires: golang-github-prometheus-promu
BuildRequires: golang-packaging BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.16 BuildRequires: golang(API) >= 1.16
BuildRoot: %{_tmppath}/%{name}-%{version}-build 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): user(prometheus)
Requires(pre): group(prometheus) Requires(pre): group(prometheus)
Requires(post): %fillup_prereq Requires(post): %fillup_prereq
@ -147,19 +149,20 @@ install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics
%dir %{_sysconfdir}/prometheus %dir %{_sysconfdir}/prometheus
%config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml %config(noreplace) %{_sysconfdir}/prometheus/prometheus.yml
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
%package -n firewalld-prometheus-config %package -n firewalld-prometheus-config
Summary: Firewalld configuration file for Prometheus Summary: Firewalld configuration file for Prometheus
Group: Productivity/Networking/Security Group: Productivity/Networking/Security
Version: 0.1 Version: 0.1
Release: 0 Release: 0
License: GPL-2.0-or-later License: GPL-2.0-or-later
Requires: firewalld
%description -n firewalld-prometheus-config %description -n firewalld-prometheus-config
This package contains configuration file for Prometheus for older versions of This package contains configuration file for Prometheus for older versions of
Firewalld which do not provide this in own package. Firewalld which do not provide this in own package.
%files -n firewalld-prometheus-config %files -n firewalld-prometheus-config
%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300
%dir %{_prefix}/lib/firewalld %dir %{_prefix}/lib/firewalld
%dir %{_prefix}/lib/firewalld/services %dir %{_prefix}/lib/firewalld/services
%{_prefix}/lib/firewalld/services/prometheus.xml %{_prefix}/lib/firewalld/services/prometheus.xml