]> git.pld-linux.org Git - packages/redis.git/commitdiff
- chkconfig, groups, etc
authorElan Ruusamäe <glen@pld-linux.org>
Sat, 9 Oct 2010 13:17:14 +0000 (13:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    redis.spec -> 1.3

redis.spec

index f00c59d1ceb614ed8cda816b14e2a417b52ff6be..2f25d746bf1b5c2c6d0ef86d6d2adc7a8582a30f 100644 (file)
@@ -8,7 +8,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/
@@ -17,11 +17,20 @@ Source0:    http://redis.googlecode.com/files/%{name}-%{version}.tar.gz
 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
@@ -69,12 +78,13 @@ install -d $RPM_BUILD_ROOT%{_localstatedir}/run/%{name}
 %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
@@ -82,6 +92,12 @@ if [ "$1" = 0 ]; then
        /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/
This page took 0.111195 seconds and 4 git commands to generate.