Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package prometheus-postgres_exporter for 
openSUSE:Factory checked in at 2023-04-21 14:16:59
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/prometheus-postgres_exporter (Old)
 and      /work/SRC/openSUSE:Factory/.prometheus-postgres_exporter.new.1533 
(New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "prometheus-postgres_exporter"

Fri Apr 21 14:16:59 2023 rev:9 rq:1080906 version:0.10.1

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/prometheus-postgres_exporter/prometheus-postgres_exporter.changes
        2023-04-19 17:45:23.229033682 +0200
+++ 
/work/SRC/openSUSE:Factory/.prometheus-postgres_exporter.new.1533/prometheus-postgres_exporter.changes
      2023-04-21 14:17:10.794637323 +0200
@@ -1,0 +2,7 @@
+Thu Apr 20 12:39:36 UTC 2023 - Witek Bedyk <witold.be...@suse.com>
+
+- Adapt the systemd service security configuration
+  to be able to start it on RHEL systems and clones
+- Create the prometheus user for RHEL systems and clones
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ prometheus-postgres_exporter.spec ++++++
--- /var/tmp/diff_new_pack.oGOIPB/_old  2023-04-21 14:17:11.326640306 +0200
+++ /var/tmp/diff_new_pack.oGOIPB/_new  2023-04-21 14:17:11.334640351 +0200
@@ -17,6 +17,10 @@
 #
 
 
+%if 0%{?rhel} == 8
+%global debug_package %{nil}
+%endif
+
 %if 0%{?rhel}
 # Fix ERROR: No build ID note found in
 %undefine _missing_build_ids_terminate_build
@@ -54,6 +58,8 @@
 Requires(pre):  shadow-utils
 %else
 BuildRequires:  golang(API) >= 1.14
+Requires(pre):  user(prometheus)
+Requires(pre):  group(prometheus)
 Requires(pre):  shadow
 %endif
 %{?systemd_requires}
@@ -67,6 +73,11 @@
 %prep
 %autosetup -a 1 -n postgres_exporter-%{version}
 
+# Avoid "Unknown lvalue 'XXX' in section 'Service'" errors from systemd on 
older releases
+%if 0%{?sle_version} && 0%{?sle_version} < 150300 || 0%{?rhel} && 0%{?rhel} < 9
+sed -r -i '/^(Protect(Clock|Home|Hostname|KernelLogs)|PrivateMounts)=/d' 
%{SOURCE2}
+%endif
+
 %build
 %goprep github.com/prometheus-community/postgres_exporter
 GOPATH=%{_builddir}/go promu build -v
@@ -78,8 +89,12 @@
 install -D -m 0645 %{SOURCE3} 
%buildroot%{_fillupdir}/sysconfig.prometheus-postgres_exporter
 %fdupes %{buildroot}
 
-%if 0%{?suse_version}
 %pre
+%if 0%{?rhel}
+%define serviceuser prometheus
+getent group %{serviceuser} >/dev/null || %{_sbindir}/groupadd -r 
%{serviceuser}
+getent passwd %{serviceuser} >/dev/null || %{_sbindir}/useradd -r -g 
%{serviceuser} -d %{_localstatedir}/lib/%{serviceuser} -M -s /sbin/nologin 
%{serviceuser}
+%else
 %service_add_pre %{name}.service
 %endif
 

Reply via email to