SHA256
1
0
forked from pool/oprofile

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
This commit is contained in:
Tony Jones 2023-09-28 01:53:21 +00:00 committed by Git OBS Bridge
parent de12e4b8e0
commit 867d5321a9
2 changed files with 10 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 28 01:52:52 UTC 2023 - Tony Jones <tonyj@suse.com>
- 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 <antoine.belvire@opensuse.org>

View File

@ -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