SPECS: hsqldb.spec - pldize user/groupadd

glen glen at pld-linux.org
Wed Jan 24 00:49:13 CET 2007


Author: glen                         Date: Tue Jan 23 23:49:13 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- pldize user/groupadd

---- Files affected:
SPECS:
   hsqldb.spec (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: SPECS/hsqldb.spec
diff -u SPECS/hsqldb.spec:1.4 SPECS/hsqldb.spec:1.5
--- SPECS/hsqldb.spec:1.4	Wed Jan 24 00:44:13 2007
+++ SPECS/hsqldb.spec	Wed Jan 24 00:49:08 2007
@@ -21,7 +21,15 @@
 BuildRequires:	junit
 BuildRequires:	rpmbuild(macros) >= 1.300
 BuildRequires:	servletapi4
+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:	servletapi4
+Provides:	group(hsqldb)
+Provides:	user(hsqldb)
 Buildarch:	noarch
 Buildroot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -66,9 +74,9 @@
 )
 
 # set right permissions
-find . -name "*.sh" -exec chmod 755 \{\} \;
+find . -name "*.sh" -exec chmod 755 {} \;
 # remove all _notes directories
-for dir in `find . -name _notes`; do rm -rf $dir; done
+for dir in $(find -name _notes); do rm -rf $dir; done
 # remove all binary libs
 find . -name "*.jar" -exec rm -f {} \;
 find . -name "*.class" -exec rm -f {} \;
@@ -144,9 +152,8 @@
 %pre
 # Add the "hsqldb" user and group
 # we need a shell to be able to use su - later
-%{_sbindir}/groupadd %{name} 2> /dev/null || :
-%{_sbindir}/useradd -g %{name} \
-    -s /bin/sh -d %{_localstatedir}/lib/%{name} %{name} 2> /dev/null || :
+%groupadd -g 169 %{name}
+%useradd -u 169 -g %{name} -s /bin/sh -d %{_localstatedir}/lib/%{name} %{name}
 
 %post
 rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
@@ -160,8 +167,8 @@
 if [ "$1" = "0" ]; then
 	rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
 	rm -f %{_localstatedir}/lib/%{name}/lib/servlet.jar
-	%{_sbindir}/userdel %{name} >> /dev/null 2>&1 || :
-	%{_sbindir}/groupdel %{name} >> /dev/null 2>&1 || :
+	%userremove %{name}
+	%groupremove %{name}
 fi
 
 %post javadoc
@@ -204,6 +211,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.5  2007/01/23 23:49:08  glen
+- pldize user/groupadd
+
 Revision 1.4  2007/01/23 23:44:13  glen
 - builds with java-sun-1.5
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/hsqldb.spec?r1=1.4&r2=1.5&f=u



More information about the pld-cvs-commit mailing list