From c276db839319b75113fcf13e94d0cf849f3b29e3f45f2e8395d6a93483119ec7 Mon Sep 17 00:00:00 2001 From: Witek Bedyk Date: Thu, 8 Jul 2021 13:35:59 +0000 Subject: [PATCH] Accepting request 904744 from home:witekbedyk:branches:server:monitoring - Provide and reload firewalld configuration only for: + openSUSE Leap 15.0, 15.1, 15.2 + SUSE SLE15, SLE15 SP1, SLE15 SP2 OBS-URL: https://build.opensuse.org/request/show/904744 OBS-URL: https://build.opensuse.org/package/show/server:monitoring/golang-github-prometheus-prometheus?expand=0&rev=47 --- golang-github-prometheus-prometheus.changes | 15 +++++++++++++++ golang-github-prometheus-prometheus.spec | 18 ++++++++++++++++++ prometheus.firewall.xml | 6 ++++++ 3 files changed, 39 insertions(+) create mode 100644 prometheus.firewall.xml diff --git a/golang-github-prometheus-prometheus.changes b/golang-github-prometheus-prometheus.changes index da7dc1d..6475a66 100644 --- a/golang-github-prometheus-prometheus.changes +++ b/golang-github-prometheus-prometheus.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 8 08:08:39 UTC 2021 - Witek Bedyk + +- Provide and reload firewalld configuration only for: + + openSUSE Leap 15.0, 15.1, 15.2 + + SUSE SLE15, SLE15 SP1, SLE15 SP2 + ------------------------------------------------------------------- Wed May 19 20:32:28 UTC 2021 - Daniel Molkentin @@ -135,6 +142,14 @@ Mon Nov 9 10:49:39 UTC 2020 - Stefano Torresi * use systemd-sysusers to configure the user in a dedicated 'system-user-prometheus' subpackage * add 'prometheus' package alias +------------------------------------------------------------------- +Mon Aug 31 13:59:02 UTC 2020 - Patrick Seidensal + +- Update package with changes from `server:monitoring` bsc#1175478 + + Left out removal of firewalld related configuration files as SLE-15-SP1's + `firewalld` package does not contain prometheus configuration yet. + ------------------------------------------------------------------- Fri Jul 31 14:50:21 UTC 2020 - Witek Bedyk diff --git a/golang-github-prometheus-prometheus.spec b/golang-github-prometheus-prometheus.spec index ec25a1c..b806819 100644 --- a/golang-github-prometheus-prometheus.spec +++ b/golang-github-prometheus-prometheus.spec @@ -40,12 +40,16 @@ Source1: vendor.tar.gz Source2: prometheus.service Source3: prometheus.yml Source4: prometheus.sysconfig +Source5: prometheus.firewall.xml Patch1: 0001-Do-not-force-the-pure-Go-name-resolver.patch # Lifted from Debian's prometheus package Patch2: 0002-Default-settings.patch # PATCH-FEATURE-OPENSUSE 0003-Add-Uyuni-service-discovery.patch jcavalheiro@suse.de Patch3: 0003-Add-Uyuni-service-discovery.patch BuildRequires: fdupes +%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300 +BuildRequires: firewall-macros +%endif # Adding glibc-devel-static seems to be required for linking if building # with -buildmode=pie BuildRequires: glibc-devel-static @@ -94,6 +98,11 @@ cp -fr console_libraries/ consoles/ %{buildroot}%{_datarootdir}/prometheus install -m 0755 -d %{buildroot}%{_fillupdir} install -m 0644 %{SOURCE4} %{buildroot}%{_fillupdir}/sysconfig.prometheus +%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300 +install -m 0755 -d %{buildroot}%{_libdir}/firewalld/services/ +install -m 0644 %{SOURCE5} %{buildroot}%{_libdir}/firewalld/services/prometheus.xml +%endif + install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/data install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics @@ -107,6 +116,9 @@ install -Dd -m 0750 %{buildroot}%{_localstatedir}/lib/prometheus/metrics %post %fillup_only -n prometheus %service_add_post prometheus.service +%if 0%{?suse_version} == 1500 && 0%{?sle_version} < 150300 +%firewalld_reload +%endif %preun %service_del_preun prometheus.service @@ -133,4 +145,10 @@ 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 +%dir %{_libdir}/firewalld +%dir %{_libdir}/firewalld/services +%{_libdir}/firewalld/services/prometheus.xml +%endif + %changelog diff --git a/prometheus.firewall.xml b/prometheus.firewall.xml new file mode 100644 index 0000000..c9c2b50 --- /dev/null +++ b/prometheus.firewall.xml @@ -0,0 +1,6 @@ + + + Prometheus + Prometheus monitoring system and time series database. + +