[oprofile] OProfile user use reasonable $HOME
William Eden Cohen
wcohen at fedoraproject.org
Tue Mar 15 20:48:23 UTC 2011
commit 097ccbc138efc1b4c40a01abeda03150156a1da9
Author: William Cohen <wcohen at redhat.com>
Date: Tue Mar 15 16:41:07 2011 -0400
OProfile user use reasonable $HOME
oprofile.spec | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/oprofile.spec b/oprofile.spec
index c5bbafb..e329cfa 100644
--- a/oprofile.spec
+++ b/oprofile.spec
@@ -1,7 +1,7 @@
Summary: System wide profiler
Name: oprofile
Version: 0.9.6
-Release: 16%{?dist}
+Release: 17%{?dist}
License: GPLv2
Group: Development/System
#
@@ -9,6 +9,7 @@ Source0: oprofile-%{version}.tar.gz
Requires: binutils
Requires: which
Requires(pre): shadow-utils
+Requires(postun): shadow-utils
Patch10: oprofile-0.4-guess2.patch
Patch63: oprofile-0.7-libs.patch
Patch83: oprofile-0.9.3-xen.patch
@@ -177,10 +178,14 @@ rm -rf ${RPM_BUILD_ROOT}
%pre
getent group oprofile >/dev/null || groupadd -r -g 16 oprofile
getent passwd oprofile >/dev/null || \
-useradd -r -g oprofile -d /home/oprofile -r -u 16 -s /sbin/nologin \
+useradd -r -g oprofile -d /var/lib/oprofile -M -r -u 16 -s /sbin/nologin \
-c "Special user account to be used by OProfile" oprofile
exit 0
+%postun
+test "$1" != 0 || userdel oprofile &>/dev/null || :
+test "$1" != 0 || groupdel oprofile &>/dev/null || :
+
%files
%defattr(-,root,root)
%doc docs.installed/*
@@ -241,6 +246,9 @@ exit 0
/etc/ld.so.conf.d/*
%changelog
+* Tue Mar 15 2011 Will Cohen <wcohen at redhat.com> - 0.9.6-17
+- Correct oprofile user information.
+
* Thu Mar 10 2011 Will Cohen <wcohen at redhat.com> - 0.9.6-16
- Remove obsolete configure options.
More information about the scm-commits
mailing list