SPECS (AC-branch): mailman.spec - moved update trigger to post - u...

baggins baggins at pld-linux.org
Mon Oct 10 12:40:58 CEST 2005


Author: baggins                      Date: Mon Oct 10 10:40:57 2005 GMT
Module: SPECS                         Tag: AC-branch
---- Log message:
- moved update trigger to post
- uncommented move trigger

---- Files affected:
SPECS:
   mailman.spec (1.80.2.6 -> 1.80.2.7) 

---- Diffs:

================================================================
Index: SPECS/mailman.spec
diff -u SPECS/mailman.spec:1.80.2.6 SPECS/mailman.spec:1.80.2.7
--- SPECS/mailman.spec:1.80.2.6	Mon Oct 10 08:46:32 2005
+++ SPECS/mailman.spec	Mon Oct 10 12:40:52 2005
@@ -1,6 +1,5 @@
 # $Revision$, $Date$
 # TODO:
-# - add triggers /var/spool -> /var/lib?
 # - are *.po files (beside *.mo) needed in binary package?
 Summary:	The GNU Mailing List Management System
 Summary(es):	El Sistema de Mantenimiento de listas de GNU
@@ -226,6 +225,7 @@
 %useradd -u 94 -d %{_var}/lib/%{name} -s /bin/false -c "GNU Mailing List Manager" -g mailman mailman
 
 %post
+%{_libdir}/mailman/bin/update
 if [ "$1" = "1" ]; then
 	if [ -f /var/lock/subsys/crond ]; then
 		/etc/rc.d/init.d/crond restart
@@ -260,33 +260,25 @@
 	crontab -u %{name} -r
 fi
 
-%triggerpostun -- mailman < %{epoch}:%{version}-%{release}
-# TODO, move this to pre or post as it will kill any other trigger as
-# it's the "best match", besides "triggerpostun < %{epoch}:%{version}-%{release}"
-# and "post" are called with same criteria
-%{_libdir}/mailman/bin/update
-
-#%triggerpostun -- mailman < 5:2.1.5-7.1
-# NB, the trigger with bin/update will kill running of any other
-# trigger as only one trigger is ran per upgrade!!!
-#if [ -f /var/lock/subsys/mailman ]; then
-#	/etc/rc.d/init.d/mailman stop 1>&2
-#	stopped=true
-#fi
-#if [ "`getent passwd mailman | cut -d: -f6`" != "%{_var}/lib/%{name}" ]; then
-#	echo "Fixing passwd entry"
-#	/usr/sbin/usermod -d %{_var}/lib/%{name} mailman
-#fi
-#echo "Moving data from /var/spool/mailman to /var/lib/mailman"
-#mv -f /var/spool/mailman/archives/* %{_var}/lib/mailman/archives/
-#mv -f /var/spool/mailman/data/* %{_var}/lib/mailman/data/
-#mv -f /var/spool/mailman/lists/* %{_var}/lib/mailman/lists/
-#mv -f /var/spool/mailman/qfiles/* %{_var}/lib/mailman/qfiles/
-#mv -f /var/spool/mailman/spam/* %{_var}/lib/mailman/spam/
-#mv -f /var/spool/mailman/logs/* %{_logdir}/
-#if [ "x$stopped" = "xtrue" ]; then
-#	/etc/rc.d/init.d/mailman start 1>&2
-#fi
+%triggerpostun -- mailman <= 5:2.1.5-7
+if [ -f /var/lock/subsys/mailman ]; then
+	/etc/rc.d/init.d/mailman stop 1>&2
+	stopped=true
+fi
+if [ "`getent passwd mailman | cut -d: -f6`" != "%{_var}/lib/%{name}" ]; then
+	echo "Fixing passwd entry"
+	/usr/sbin/usermod -d %{_var}/lib/%{name} mailman
+fi
+echo "Moving data from /var/spool/mailman to /var/lib/mailman"
+mv -f /var/spool/mailman/archives/* %{_var}/lib/mailman/archives/
+mv -f /var/spool/mailman/data/* %{_var}/lib/mailman/data/
+mv -f /var/spool/mailman/lists/* %{_var}/lib/mailman/lists/
+mv -f /var/spool/mailman/qfiles/* %{_var}/lib/mailman/qfiles/
+mv -f /var/spool/mailman/spam/* %{_var}/lib/mailman/spam/
+mv -f /var/spool/mailman/logs/* %{_logdir}/
+if [ "x$stopped" = "xtrue" ]; then
+	/etc/rc.d/init.d/mailman start 1>&2
+fi
 
 %files
 %defattr(644,root,root,755)
@@ -347,6 +339,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.80.2.7  2005/10/10 10:40:52  baggins
+- moved update trigger to post
+- uncommented move trigger
+
 Revision 1.80.2.6  2005/10/10 06:46:32  glen
 - fix triggers (did they ever got tested?? maybe remove old triggers if they didn't)
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/mailman.spec?r1=1.80.2.6&r2=1.80.2.7&f=u




More information about the pld-cvs-commit mailing list