Author: glen                         Date: Thu May 26 10:37:04 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- do not remove celery user on package upgrades
- standard chckconfig and service restart, update deps

---- Files affected:
packages/python-celery:
   python-celery.spec (1.11 -> 1.12) 

---- Diffs:

================================================================
Index: packages/python-celery/python-celery.spec
diff -u packages/python-celery/python-celery.spec:1.11 
packages/python-celery/python-celery.spec:1.12
--- packages/python-celery/python-celery.spec:1.11      Wed May 25 12:16:18 2011
+++ packages/python-celery/python-celery.spec   Thu May 26 12:36:59 2011
@@ -12,12 +12,14 @@
 URL:           -
 BuildRequires: python-distribute
 BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.219
-Requires:      python-modules
-Requires:      python-kombu
+BuildRequires: rpmbuild(macros) >= 1.228
+Requires:      python-amqplib
 Requires:      python-anyjson
 Requires:      python-dateutil < 2.0.0
-Requires:      python-amqplib
+Requires(post,preun):  /sbin/chkconfig
+Requires:      python-kombu
+Requires:      python-modules
+Requires:      rc-scripts
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -40,7 +42,7 @@
 cp -a examples/* $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 
 install -d $RPM_BUILD_ROOT/etc/{sysconfig,rc.d/init.d}
-cp -a contrib/generic-init.d/celeryd $RPM_BUILD_ROOT/etc/rc.d/init.d/
+install -p contrib/generic-init.d/celeryd $RPM_BUILD_ROOT/etc/rc.d/init.d
 
 ## fixed path to celeryd configuration file.
 sed -i 's/default/sysconfig/' $RPM_BUILD_ROOT/etc/rc.d/init.d/celeryd
@@ -70,14 +72,20 @@
 %pre
 %useradd -u 300 -g users -r -s /bin/fafse "celery user" celery
 
-%preun
-/etc/rc.d/init.d/%{module}d stop
-
 %post
-echo "Use: \"/etc/rc.d/init.d/%{module}d start\" to start celry."
+/sbin/chkconfig --add celeryd
+%service celeryd restart
+
+%preun
+if [ "$1" = "0" ]; then
+       %service -q celeryd stop
+       /sbin/chkconfig --del celeryd
+fi
 
 %postun
-%userremove celery
+if [ "$1" = "0" ]; then
+       %userremove celery
+fi
 
 %files
 %defattr(644,root,root,755)
@@ -89,8 +97,8 @@
 %attr(755,root,root) %{_bindir}/celeryd-multi
 %attr(755,root,root) %{_bindir}/celeryev
 
-%attr(744,root,root) /etc/rc.d/init.d/*
-%attr(644,root,root) /etc/sysconfig/*
+%attr(754,root,root) /etc/rc.d/init.d/*
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/*
 
 %{py_sitescriptdir}/%{module}
 %if "%{py_ver}" > "2.4"
@@ -107,6 +115,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.12  2011/05/26 10:36:59  glen
+- do not remove celery user on package upgrades
+- standard chckconfig and service restart, update deps
+
 Revision 1.11  2011/05/25 10:16:18  cieciwa
 - release 0.3,
 - fixed config file,
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/python-celery/python-celery.spec?r1=1.11&r2=1.12&f=u

_______________________________________________
pld-cvs-commit mailing list
pld-cvs-commit@lists.pld-linux.org
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to