Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package golang-github-boynux-squid_exporter
for openSUSE:Factory checked in at 2022-03-09 18:48:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/golang-github-boynux-squid_exporter (Old)
and
/work/SRC/openSUSE:Factory/.golang-github-boynux-squid_exporter.new.2349 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "golang-github-boynux-squid_exporter"
Wed Mar 9 18:48:00 2022 rev:3 rq:960382 version:1.6
Changes:
--------
---
/work/SRC/openSUSE:Factory/golang-github-boynux-squid_exporter/golang-github-boynux-squid_exporter.changes
2021-03-10 08:58:41.870978322 +0100
+++
/work/SRC/openSUSE:Factory/.golang-github-boynux-squid_exporter.new.2349/golang-github-boynux-squid_exporter.changes
2022-03-11 11:43:44.690774398 +0100
@@ -1,0 +2,5 @@
+Sat Jan 22 10:49:07 UTC 2022 - Stefan Bluhm <[email protected]>
+
+- Enhanced to build on Enterprise Linux 8.
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ golang-github-boynux-squid_exporter.spec ++++++
--- /var/tmp/diff_new_pack.1zhFna/_old 2022-03-11 11:43:45.138774900 +0100
+++ /var/tmp/diff_new_pack.1zhFna/_new 2022-03-11 11:43:45.146774909 +0100
@@ -23,6 +23,15 @@
%define targetname prometheus-squid_exporter
%define serviceuser prometheus
+%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
+%endif
+
Name: golang-github-boynux-squid_exporter
Version: 1.6
Release: 0
@@ -35,10 +44,18 @@
BuildRequires: fdupes
BuildRequires: golang-packaging
BuildRequires: xz
+%if 0%{?rhel}
+BuildRequires: golang >= 1.15
+%else
BuildRequires: golang(API) = 1.15
+%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%{?systemd_requires}
+%if 0%{?rhel}
+Requires(pre): shadow-utils
+%else
Requires(pre): shadow
+%endif
%description
Exports squid metrics in Prometheus format
@@ -48,6 +65,10 @@
%build
%goprep %{githubrepo}
+%if 0%{?rhel}
+# Fix automatic versioning
+export GO111MODULE=auto
+%endif
%gobuild
%install
@@ -57,19 +78,39 @@
install -d -m 0755 %{buildroot}%{_sbindir}
ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc%{targetname}
+%check
+%if 0%{?rhel}
+# Fix OBS debug_package execution.
+rm -f %{buildroot}/usr/lib/debug/%{_bindir}/%{targetname}-%{version}-*.debug
+%endif
+
%pre
+%if 0%{?suse_version}
%service_add_pre %{targetname}.service
+%endif
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}
%post
+%if 0%{?rhel}
+%systemd_post %{targetname}.service
+%else
%service_add_post %{targetname}.service
+%endif
%preun
+%if 0%{?rhel}
+%systemd_preun %{targetname}.service
+%else
%service_del_preun %{targetname}.service
+%endif
%postun
+%if 0%{?rhel}
+%systemd_postun %{targetname}.service
+%else
%service_del_postun %{targetname}.service
+%endif
%files
%defattr(-,root,root,-)