From 718ff9f165bcb982db9a1a59fbfd49e543a16da9dd2edece06f69cc4b1bb4f9b Mon Sep 17 00:00:00 2001 From: Tony Jones Date: Mon, 2 Oct 2017 22:39:58 +0000 Subject: [PATCH] Accepting request 530579 from home:jengelh:branches:devel:tools - Rectify RPM groups. Update summary of -devel subpackage. Do not ignore errors from useradd/groupadd. Avoid running fdupes across partitions. OBS-URL: https://build.opensuse.org/request/show/530579 OBS-URL: https://build.opensuse.org/package/show/devel:tools/oprofile?expand=0&rev=50 --- oprofile.changes | 7 +++++++ oprofile.spec | 14 +++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/oprofile.changes b/oprofile.changes index d04807b..33183ec 100644 --- a/oprofile.changes +++ b/oprofile.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 2 21:39:00 UTC 2017 - jengelh@inai.de + +- Rectify RPM groups. Update summary of -devel subpackage. + Do not ignore errors from useradd/groupadd. + Avoid running fdupes across partitions. + ------------------------------------------------------------------- Mon Sep 25 15:10:23 UTC 2017 - fcrozat@suse.com diff --git a/oprofile.spec b/oprofile.spec index ad373f1..e4c6298 100644 --- a/oprofile.spec +++ b/oprofile.spec @@ -72,7 +72,7 @@ warranty. This is the package containing the userspace tools. %package devel -Summary: System-Wide Profiler for Linux Systems +Summary: Development files for oprofile, a system-wide profiler for Linux Group: Development/Libraries/C and C++ Requires: binutils-devel Requires: libopagent1 = %{version}-%{release} @@ -87,7 +87,7 @@ virtual machines. %package -n libopagent1 Summary: System-Wide Profiler for Linux Systems -Group: Development/Libraries/C and C++ +Group: System/Libraries %description -n libopagent1 OProfile is a system-wide profiler for Linux systems, capable of @@ -127,11 +127,15 @@ make DESTDIR=%{buildroot} htmldir=%{_docdir}/oprofile install rm -f %{buildroot}%{_libdir}/oprofile/libopagent.*a # Hardlink duplicate files automatically (from package fdupes): # It doesn't save much, but it keeps rpmlint from breaking the package build. -%fdupes %{buildroot} +%fdupes %{buildroot}/%{_prefix} %pre -%{_sbindir}/groupadd -r oprofile 2>/dev/null || : -%{_sbindir}/useradd -r -g oprofile -d %{_localstatedir}/lib/empty -s /bin/false -c "Special user account to be used by OProfile" oprofile 2>/dev/null || : +getent group oprofile >/dev/null || \ + %{_sbindir}/groupadd -r oprofile 2>/dev/null +getent passwd oprofile >/dev/null || \ + %{_sbindir}/useradd -r -g oprofile -d %{_localstatedir}/lib/empty \ + -s /bin/false -c "Special user account to be used by OProfile" \ + oprofile 2>/dev/null %post -n libopagent1 -p /sbin/ldconfig %postun -n libopagent1 -p /sbin/ldconfig