Author: glen                         Date: Sat Oct  9 13:17:20 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- chkconfig, groups, etc

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

---- Diffs:

================================================================
Index: packages/redis/redis.spec
diff -u packages/redis/redis.spec:1.2 packages/redis/redis.spec:1.3
--- packages/redis/redis.spec:1.2       Sat Oct  9 15:13:47 2010
+++ packages/redis/redis.spec   Sat Oct  9 15:17:14 2010
@@ -9,7 +9,7 @@
 Summary:       A persistent key-value database
 Name:          redis
 Version:       2.0.2
-Release:       0.1
+Release:       0.2
 License:       BSD
 Group:         Applications/Databases
 URL:           http://code.google.com/p/redis/
@@ -18,11 +18,20 @@
 Source1:       %{name}.logrotate
 Source2:       %{name}.init
 Patch0:                %{name}-redis.conf.patch
+BuildRequires: rpmbuild(macros) >= 1.202
 BuildRequires: sed >= 4.0
 %{?with_tests:BuildRequires:   tcl}
-Requires(post):        /sbin/chkconfig
-Requires(preun):       /sbin/chkconfig
-Requires(preun):       rc-scripts
+Requires:      rc-scripts
+Requires(post,preun):  /sbin/chkconfig
+Requires(postun):      /usr/sbin/userdel
+Requires(pre): /bin/id
+Requires(pre): /usr/sbin/useradd
+Requires(postun):      /usr/sbin/groupdel
+Requires(pre): /usr/bin/getgid
+Requires(pre): /usr/sbin/groupadd
+Requires:      rc-scripts
+Provides:      group(redis)
+Provides:      user(redis)
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -70,12 +79,13 @@
 %clean
 rm -fr $RPM_BUILD_ROOT
 
-%post
-/sbin/chkconfig --add redis
-
 %pre
 %groupadd -g 256 redis
-%useradd -u 245 -g redis -d %{_sharedstatedir}/redis -s /sbin/nologin -c 
'Redis Server' redis
+%useradd -u 256 -g redis -d %{_sharedstatedir}/redis -s /sbin/nologin -c 
'Redis Server' redis
+
+%post
+/sbin/chkconfig --add redis
+%service redis restart
 
 %preun
 if [ "$1" = 0 ]; then
@@ -83,6 +93,12 @@
        /sbin/chkconfig --del redis
 fi
 
+%postun
+if [ "$1" = "0" ]; then
+       %userremove redis
+       %groupremove redis
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc 00-RELEASENOTES BUGS COPYING Changelog README TODO doc/
@@ -101,6 +117,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2010/10/09 13:17:14  glen
+- chkconfig, groups, etc
+
 Revision 1.2  2010/10/09 13:13:47  glen
 - registered uid/gid
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/redis/redis.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