[csw-devel] SF.net SVN: gar:[9198] csw/mgar/pkg/clamav/trunk

bonivart at users.sourceforge.net bonivart at users.sourceforge.net
Tue Mar 16 09:11:25 CET 2010


Revision: 9198
          http://gar.svn.sourceforge.net/gar/?rev=9198&view=rev
Author:   bonivart
Date:     2010-03-16 08:11:25 +0000 (Tue, 16 Mar 2010)

Log Message:
-----------
clamav: more fixes for 0.96rc1

Modified Paths:
--------------
    csw/mgar/pkg/clamav/trunk/Makefile
    csw/mgar/pkg/clamav/trunk/checksums
    csw/mgar/pkg/clamav/trunk/files/CSWclamav.clamd.conf.p
    csw/mgar/pkg/clamav/trunk/files/CSWclamav.cswclamd

Modified: csw/mgar/pkg/clamav/trunk/Makefile
===================================================================
--- csw/mgar/pkg/clamav/trunk/Makefile	2010-03-16 06:52:46 UTC (rev 9197)
+++ csw/mgar/pkg/clamav/trunk/Makefile	2010-03-16 08:11:25 UTC (rev 9198)
@@ -46,6 +46,7 @@
 # unrecognized by 0.95rc1? CONFIGURE_ARGS += --with-sendmail=$(libdir)/sendmail
 CONFIGURE_ARGS += --with-dbdir=/var/opt/csw/$(GARNAME)/db
 CONFIGURE_ARGS += --localstatedir=/var/opt/csw/$(GARNAME)
+CONFIGURE_ARGS += --sysconfdir=$(sysconfdir)
 
 EXTRA_MERGE_EXCLUDE_FILES = .*~ $(libdir)/.*\.a $(libdir)/.*\.la
 
@@ -58,8 +59,8 @@
 PROTOTYPE_CLASS_1 = ugfiles
 PROTOTYPE_USER_1 = clamav
 
-INITSMF  = /etc/opt/csw/init.d/cswclamd
-INITSMF += /etc/opt/csw/init.d/cswclamav-milter
+INITSMF  = /opt/csw/etc/init.d/cswclamd
+INITSMF += /opt/csw/etc/init.d/cswclamav-milter
 SAMPLECONF  = /etc/opt/csw/clamd.conf
 SAMPLECONF += /etc/opt/csw/clamav-milter.conf
 SAMPLECONF += /etc/opt/csw/freshclam.conf
@@ -86,9 +87,9 @@
 
 post-install-modulated:
 	@echo " ==> Post-install for $(GARNAME) (custom)"
-	@ginstall -d $(DESTDIR)/etc/opt/csw/init.d
-	@ginstall -m 755 $(FILEDIR)/CSWclamav.cswclamd $(DESTDIR)/etc/opt/csw/init.d/cswclamd
-	@ginstall -m 755 $(FILEDIR)/CSWclamav.cswclamav-milter $(DESTDIR)/etc/opt/csw/init.d/cswclamav-milter
+	@ginstall -d $(DESTDIR)/opt/csw/etc/init.d
+	@ginstall -m 755 $(FILEDIR)/CSWclamav.cswclamd $(DESTDIR)/opt/csw/etc/init.d/cswclamd
+	@ginstall -m 755 $(FILEDIR)/CSWclamav.cswclamav-milter $(DESTDIR)/opt/csw/etc/init.d/cswclamav-milter
 	@ginstall -d $(DESTDIR)$(sysconfdir)/pkg/CSWclamav
 	@ginstall -m 644 $(FILEDIR)/CSWclamav.cswusergroup $(DESTDIR)$(sysconfdir)/pkg/CSWclamav/cswusergroup
 	@ginstall -d $(DOCDEST)
@@ -100,4 +101,5 @@
 #	@ginstall -m 644 $(WORKSRC)/contrib/cleanup-partial.pl $(DOCDEST)/contrib
 	@ginstall -d $(DOCDEST)/html
 	@ginstall -m 644 $(WORKSRC)/docs/html/* $(DOCDEST)/html
+	@chmod 600 $(DESTDIR)$(sysconfdir)/freshclam.conf
 	@$(MAKECOOKIE)

Modified: csw/mgar/pkg/clamav/trunk/checksums
===================================================================
--- csw/mgar/pkg/clamav/trunk/checksums	2010-03-16 06:52:46 UTC (rev 9197)
+++ csw/mgar/pkg/clamav/trunk/checksums	2010-03-16 08:11:25 UTC (rev 9198)
@@ -1,3 +1,3 @@
-83ab77147b8ff549a371e1042526102c  CSWclamav.clamd.conf.p
+a3238ed54a098b66a8e3e9f8bb0ca399  CSWclamav.clamd.conf.p
 6c37b881661bf28741bb69045a642790  CSWclamav.freshclam.conf.p
 6cb3a716f06f00c73def71aa72ff5f41  clamav-0.96rc1.tar.gz

Modified: csw/mgar/pkg/clamav/trunk/files/CSWclamav.clamd.conf.p
===================================================================
--- csw/mgar/pkg/clamav/trunk/files/CSWclamav.clamd.conf.p	2010-03-16 06:52:46 UTC (rev 9197)
+++ csw/mgar/pkg/clamav/trunk/files/CSWclamav.clamd.conf.p	2010-03-16 08:11:25 UTC (rev 9198)
@@ -1,5 +1,5 @@
---- /etc/clamd.conf	2008-12-18 10:50:45.033181389 +0100
-+++ /etc/clamd.conf	2008-12-18 10:46:07.995146244 +0100
+--- /etc/clamd.conf	2010-03-12 16:32:28.977878541 +0100
++++ /etc/clamd.conf	2010-03-12 16:32:23.707431670 +0100
 @@ -5,7 +5,7 @@
  
  
@@ -9,3 +9,12 @@
  
  # Uncomment this option to enable logging.
  # LogFile must be writable for the user running daemon.
+@@ -73,7 +73,7 @@
+ 
+ # Path to a local socket file the daemon will listen on.
+ # Default: disabled (must be specified by a user)
+-#LocalSocket /tmp/clamd.socket
++LocalSocket /tmp/clamd.socket
+ 
+ # Sets the group ownership on the unix socket.
+ # Default: disabled (the primary group of the user running clamd)

Modified: csw/mgar/pkg/clamav/trunk/files/CSWclamav.cswclamd
===================================================================
--- csw/mgar/pkg/clamav/trunk/files/CSWclamav.cswclamd	2010-03-16 06:52:46 UTC (rev 9197)
+++ csw/mgar/pkg/clamav/trunk/files/CSWclamav.cswclamd	2010-03-16 08:11:25 UTC (rev 9198)
@@ -1,51 +1,36 @@
 #!/bin/sh
-#
-# clamd	  Start/Stop the clam antivirus daemon.
-#
-# description: clamd is a standard UNIX program that scans for Viruses.
-# processname: clamd
-# config: /opt/csw/etc/clamd.conf
-# pidfile: /var/opt/csw/clamav/clamd.pid
-# modified for CSW
-# 2007-02-16 Note that the pid file is now in /var/opt/csw/clamav. So, you
-#   may need to fix permissions on that directory.
-#   The clamd file (used to send options to clamd) may now be in
-#   /etc/opt/csw/.  Using this file, you may specify a different location
-#   for the config file.  For example, -c /etc/opt/csw/clamd.conf.  Put
-#   all options on one line.
-# 2007-04-14 PidFile name and User are obtained from clamd.conf.  If
-#   the directory does not exist, it is created by this script.
-# 2007-10-27 Fix restart script
-# 2008-12-10 Peter Bonivart
 
+# 2010-03-12 Peter Bonivart
+
 prog="clamd"
 progdir="/opt/csw/sbin"
 
-pidfile=`grep '^PidFile' /opt/csw/etc/clamd.conf |awk '{print $2;}'`
+conffile="/etc/opt/csw/clamd.conf"
+if [ ! -f $conffile ]; then
+  conffile="/opt/csw/etc/clamd.conf"
+fi
+if [ ! -f "$conffile" ]; then
+  echo "ERROR: can not find clamd.conf"
+  exit 1
+fi
+
+pidfile=`grep '^PidFile' $conffile | awk '{print $2}'`
 piddir=`dirname $pidfile`
 if [ ! -d $piddir ]; then
-    clamuser=`grep '^User' /opt/csw/etc/clamd.conf |awk '{print $2;}'`
-    mkdir -p $piddir
-    chown $clamuser $piddir
+  clamuser=`grep '^User' $conffile | awk '{print $2}'`
+  mkdir -p $piddir
+  chown $clamuser $piddir
 fi
 
-OPTIONS_FILE="/etc/opt/csw/clamd.conf"
-if [ ! -f $OPTIONS_FILE ] ; then
-	OPTIONS_FILE="/opt/csw/etc/clamd.conf"
-fi
-if [ ! -f "$OPTIONS_FILE" ]; then
-    exit 0
-fi
-
 PATH=/usr/sbin:/usr/bin:/opt/csw/sbin:/opt/csw/bin
 
 case "$1" in
   start)
-        echo "Starting $prog "
+        echo "Starting $prog ..."
         $progdir/$prog &
 	;;
   stop)
-        echo "Stopping $prog "
+        echo "Stopping $prog ..."
         /usr/bin/pkill -x $prog
 	;;
   restart)
@@ -61,11 +46,11 @@
         $0 start
 	;;
   refresh|reload)
-        echo "Reloading clam daemon configuration: "
+        echo "Reloading $prog configuration ..."
         /usr/bin/pkill -HUP -x $prog
 	;;
   *)
-	echo $"Usage: $0 { start|stop|refresh|reload|restart }"
+	echo "Usage: $0 { start|stop|refresh|reload|restart }"
 	exit 1
 esac
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.


More information about the devel mailing list