SPECS: clamav.spec - always upgrade config, add banner and always ...

glen glen at pld-linux.org
Mon Nov 6 10:11:34 CET 2006


Author: glen                         Date: Mon Nov  6 09:11:34 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- always upgrade config, add banner and always restart clamd after trigger

---- Files affected:
SPECS:
   clamav.spec (1.198 -> 1.199) 

---- Diffs:

================================================================
Index: SPECS/clamav.spec
diff -u SPECS/clamav.spec:1.198 SPECS/clamav.spec:1.199
--- SPECS/clamav.spec:1.198	Mon Nov  6 09:49:33 2006
+++ SPECS/clamav.spec	Mon Nov  6 10:11:29 2006
@@ -10,7 +10,7 @@
 #
 %define		_ver	0.90
 %define		_rc	rc2
-%define		_rel	0.7
+%define		_rel	0.10
 Summary:	An anti-virus utility for Unix
 Summary(pl):	Narzędzie antywirusowe dla Uniksów
 Name:		clamav
@@ -276,18 +276,25 @@
 	%{__sed} -i -e 's/clamav.conf/clamd.conf/' /etc/freshclam.conf
 fi
 
-%triggerpostun -- %{name} < 0.90-0.rc2.0.7
-if [ -f /etc/clamav.conf.rpmnew ]; then
-	%{__cp} -f /etc/clamd.conf{,.rpmsave}
-	%{__sed} -i -e '
-			s,^LogSyslog$,& yes,
-			s,^FixStaleSocket$,& yes,
-			s,^AllowSupplementaryGroups$,& yes,
-			s,^ClamukoScanOnOpen$,& yes,
-			s,^ClamukoScanOnClose$,& yes,
-			s,^ClamukoScanOnExec$,& yes,
-	' /etc/clamd.conf
-fi
+%triggerpostun -- %{name} < 0.90-0.rc2.0.10
+%{__cp} -f /etc/clamd.conf{,.rpmsave}
+%{__sed} -i -e '
+		s,^LogSyslog$,& yes,
+		s,^FixStaleSocket$,& yes,
+		s,^AllowSupplementaryGroups$,& yes,
+		s,^ClamukoScanOnOpen$,& yes,
+		s,^ClamukoScanOnClose$,& yes,
+		s,^ClamukoScanOnExec$,& yes,
+' /etc/clamd.conf
+%banner -e %{name}-0.90 <<EOF
+ClamAV config was automatically upgraded to 0.90 format. You should review it
+that it's still valid.
+EOF
+#'
+# unfortunately clamd has no configcheck option so we just have to start it
+# once again after config was broken after upgrade
+touch /var/lock/subsys/clamd
+%service -q clamd restart
 
 %post milter
 /sbin/chkconfig --add clamav-milter
@@ -370,6 +377,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.199  2006/11/06 09:11:29  glen
+- always upgrade config, add banner and always restart clamd after trigger
+
 Revision 1.198  2006/11/06 08:49:33  glen
 - config trigger
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/clamav.spec?r1=1.198&r2=1.199&f=u



More information about the pld-cvs-commit mailing list