Accepting request 1113945 from devel:tools

OBS-URL: https://build.opensuse.org/request/show/1113945
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/oprofile?expand=0&rev=57
This commit is contained in:
Ana Guerrero 2023-09-29 19:13:26 +00:00 committed by Git OBS Bridge
commit ae6b0bdf6c
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