Author: qboosh                       Date: Tue Mar  6 20:13:48 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- handle sanlock user/group

---- Files affected:
packages/sanlock:
   sanlock.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/sanlock/sanlock.spec
diff -u packages/sanlock/sanlock.spec:1.2 packages/sanlock/sanlock.spec:1.3
--- packages/sanlock/sanlock.spec:1.2   Tue Mar  6 20:53:10 2012
+++ packages/sanlock/sanlock.spec       Tue Mar  6 21:13:43 2012
@@ -16,6 +16,13 @@
 BuildRequires: libblkid-devel
 BuildRequires: libuuid-devel
 BuildRequires: python-devel
+BuildRequires: rpmbuild(macros) >= 1.202
+Requires(postun):      /usr/sbin/groupdel
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires(pre): /usr/sbin/useradd
 Requires:      %{name}-libs = %{version}-%{release}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -102,13 +109,23 @@
 
 install -d $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
 cat >$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/sanlock.conf <<EOF
-d /var/run/sanlock 0755 root root -
+d /var/run/sanlock 0775 sanlock sanlock -
 d /var/run/wdmd 0755 root root -
 EOF
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%pre
+%groupadd -g 279 sanlock
+%useradd -u 279 -g 279 -d /usr/share/empty -s /bin/false -c 'SANlock user' 
sanlock
+
+%postun
+if [ "$1" = "0" ]; then
+       %userremove sanlock
+       %groupremove sanlock
+fi
+
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
 
@@ -120,7 +137,7 @@
 %attr(754,root,root) /etc/rc.d/init.d/sanlock
 %attr(754,root,root) /etc/rc.d/init.d/wdmd
 /usr/lib/tmpfiles.d/sanlock.conf
-%dir /var/run/sanlock
+%attr(775,sanlock,sanlock) %dir /var/run/sanlock
 %dir /var/run/wdmd
 %{_mandir}/man8/sanlock.8*
 %{_mandir}/man8/wdmd.8*
@@ -153,6 +170,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2012/03/06 20:13:43  qboosh
+- handle sanlock user/group
+
 Revision 1.2  2012/03/06 19:53:10  qboosh
 - updated to 2.0
 - added link patch to fix libsanlock linking
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/sanlock/sanlock.spec?r1=1.2&r2=1.3&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to