SPECS: bfilter.spec - registered uid/gid - remove user/group in %postun

pawelz pawelz at pld-linux.org
Sun Sep 28 03:43:02 CEST 2008


Author: pawelz                       Date: Sun Sep 28 01:43:02 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- registered uid/gid
- remove user/group in %postun

---- Files affected:
SPECS:
   bfilter.spec (1.12 -> 1.13) 

---- Diffs:

================================================================
Index: SPECS/bfilter.spec
diff -u SPECS/bfilter.spec:1.12 SPECS/bfilter.spec:1.13
--- SPECS/bfilter.spec:1.12	Mon Feb 12 22:23:49 2007
+++ SPECS/bfilter.spec	Sun Sep 28 03:42:57 2008
@@ -14,7 +14,6 @@
 # Source0-md5:	72ca85565bd4c556b06e3a264c0c24f1
 Source1:	%{name}.init
 URL:		http://bfilter.sf.net
-BuildRequires:	broken-pre-scriptlet(fix:user/group)
 BuildRequires:	libsigc++12-devel
 BuildRequires:	libstdc++-devel
 BuildRequires:	pkgconfig
@@ -61,14 +60,12 @@
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-# XXX: unify
-# TODO register uid/gid in uid_gid.db.txt
-%groupadd -r -g XXX -f %{name}
-%useradd -r -u XXX -s /bin/false -d / -M -g %{name} -c "BFilter filtering proxy" %{name}
+%groupadd -r -g 199 %{name}
+%useradd -r -u 199 -s /bin/false -d / -g %{name} -c "BFilter filtering proxy" %{name}
 
 %post
 /sbin/chkconfig --add %{name}
-%service %{name} restart
+%service %{name} restart "BFilter filtering proxy"
 
 %preun
 if [ "$1" = "0" ]; then
@@ -76,6 +73,12 @@
 	/sbin/chkconfig --del %{name}
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+	%userremove %{name}
+	%groupremove %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README doc/*.html doc/*.png
@@ -93,6 +96,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.13  2008/09/28 01:42:57  pawelz
+- registered uid/gid
+- remove user/group in %postun
+
 Revision 1.12  2007/02/12 21:23:49  glen
 - tabs in preamble
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/bfilter.spec?r1=1.12&r2=1.13&f=u



More information about the pld-cvs-commit mailing list