From 867d5321a96787f34504cef57292dcfee92a92c3aa027e6d2ea0628e9b09e349 Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Thu, 28 Sep 2023 01:53:21 +0000 Subject: [PATCH] Accepting request 1113944 from home:jones_tony:branches:devel:tools - Fix build error, change user/group pre handling to procedure specified at https://en.opensuse.org/Packaging/Users_And_Groups OBS-URL: https://build.opensuse.org/request/show/1113944 OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=66 --- oprofile.changes | 6 ++++++ oprofile.spec | 10 ++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/oprofile.changes b/oprofile.changes index a2a68f5..0014b8b 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 28 01:52:52 UTC 2023 - Tony Jones + +- Fix build error, change user/group pre handling to procedure specified + at https://en.opensuse.org/Packaging/Users_And_Groups + ------------------------------------------------------------------- Sun Apr 30 17:19:41 UTC 2023 - Antoine Belvire diff --git a/oprofile.spec b/oprofile.spec index e7a2bb4..772ad0d 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -46,8 +46,7 @@ BuildRequires: libzstd-devel BuildRequires: pkgconfig BuildRequires: popt-devel BuildRequires: zlib-devel -Requires(pre): %{_sbindir}/groupadd -Requires(pre): %{_sbindir}/useradd +Requires(pre): pwdutils %ifarch ppc ppc64 ppc64le BuildRequires: libpfm-devel >= 4.3.0 %endif @@ -129,12 +128,11 @@ rm -f %{buildroot}%{_libdir}/oprofile/libopagent.*a %fdupes %{buildroot}/%{_prefix} %pre -getent group oprofile >/dev/null || \ - %{_sbindir}/groupadd -r oprofile +getent group oprofile >/dev/null || groupadd -r oprofile 2> /dev/null getent passwd oprofile >/dev/null || \ - %{_sbindir}/useradd -r -g oprofile -d %{_localstatedir}/lib/empty \ + useradd -r -g oprofile -d %{_localstatedir}/lib/empty \ -s /bin/false -c "Special user account to be used by OProfile" \ - oprofile + oprofile 2> /dev/null %post -n libopagent1 -p /sbin/ldconfig %postun -n libopagent1 -p /sbin/ldconfig