diff options
author | Andrej Kacian <ticho@gentoo.org> | 2005-05-24 02:01:36 +0000 |
---|---|---|
committer | Andrej Kacian <ticho@gentoo.org> | 2005-05-24 02:01:36 +0000 |
commit | d6b061644ed9c863a366fcf5be7112edc87c32d7 (patch) | |
tree | 2cd90a1359733f493f7f09240e35baf962baa051 /app-antivirus | |
parent | add use clause to scanner symlink (diff) | |
download | historical-d6b061644ed9c863a366fcf5be7112edc87c32d7.tar.gz historical-d6b061644ed9c863a366fcf5be7112edc87c32d7.tar.bz2 historical-d6b061644ed9c863a366fcf5be7112edc87c32d7.zip |
Improved functionality wrt clamav-milter, upgraded milter readme.
Package-Manager: portage-2.0.51.22-r1
Diffstat (limited to 'app-antivirus')
-rw-r--r-- | app-antivirus/clamav/ChangeLog | 10 | ||||
-rw-r--r-- | app-antivirus/clamav/Manifest | 16 | ||||
-rw-r--r-- | app-antivirus/clamav/clamav-0.85.1-r1.ebuild | 114 | ||||
-rw-r--r-- | app-antivirus/clamav/clamav-0.85.1.ebuild | 3 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamav-milter.README.gentoo | 52 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamd.rc.new | 35 | ||||
-rw-r--r-- | app-antivirus/clamav/files/digest-clamav-0.85.1-r1 | 1 |
7 files changed, 182 insertions, 49 deletions
diff --git a/app-antivirus/clamav/ChangeLog b/app-antivirus/clamav/ChangeLog index e8da6f4106f6..c615c073feff 100644 --- a/app-antivirus/clamav/ChangeLog +++ b/app-antivirus/clamav/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-antivirus/clamav # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.68 2005/05/16 23:22:50 ticho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.69 2005/05/24 02:01:36 ticho Exp $ + +*clamav-0.85.1-r1 (24 May 2005) + + 24 May 2005; Andrej Kacian <ticho@gentoo.org> + files/clamav-milter.README.gentoo, files/clamd.conf, files/clamd.rc.new, + clamav-0.85.1.ebuild, +clamav-0.85.1-r1.ebuild: + Improved functionality wrt clamav-milter and updated + clamav-milter.README.gentoo. Thanks to Andrea Barisani <lcars at gentoo org>. *clamav-0.85.1 (16 May 2005) diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest index 9052a6a4e7c1..332cdadd4330 100644 --- a/app-antivirus/clamav/Manifest +++ b/app-antivirus/clamav/Manifest @@ -3,24 +3,26 @@ Hash: SHA1 MD5 34a649543043b4506c5ecdca94ddad41 clamav-0.85.ebuild 2314 MD5 bf2cf15ce5fddd93fffa28e8b0a3f50f clamav-0.84.ebuild 2314 -MD5 502b2e8df24dcd638791aa412278efcc clamav-0.85.1.ebuild 3289 +MD5 6e3e94d49e55a5839d097c679fe3ac69 clamav-0.85.1-r1.ebuild 3574 +MD5 2a2db438252e022a29285af226af2627 clamav-0.85.1.ebuild 3328 MD5 689c7676f16b3126b2c3f9271f7c2a1e clamav-0.85-r1.ebuild 3290 -MD5 c8a9f277a409c91341abc0c3e9d0a0d3 ChangeLog 14445 +MD5 777972a15e6ea6e6f4fe8b3c5b550ec0 ChangeLog 14787 MD5 7e32edfd72887a57b16ecd73f0f7a1a0 metadata.xml 184 MD5 6ea55388f51845c2f815589dfed047a4 clamav-0.83.ebuild 2332 MD5 0bd0d31062475433335752e126830799 files/digest-clamav-0.85-r1 64 -MD5 ad7d45b1be51c06986cb42c53e733d19 files/clamav-milter.README.gentoo 1311 +MD5 08f7b320461c04bbb88555e389c2e544 files/clamav-milter.README.gentoo 1124 MD5 102cc388dbea3446ba249cfc2e80cff3 files/digest-clamav-0.85.1 66 MD5 9bbf2754f8178fd5164875d784aa9ffa files/digest-clamav-0.83 64 MD5 3e9877b8901f604bd65ea89ff18833b6 files/digest-clamav-0.84 64 MD5 0bd0d31062475433335752e126830799 files/digest-clamav-0.85 64 -MD5 ebf5fb8f2e767051b6da35605e22063d files/clamd.rc.new 1258 +MD5 f6bf5b894e60e8686cb5a36ba240e1ef files/clamd.rc.new 2032 +MD5 102cc388dbea3446ba249cfc2e80cff3 files/digest-clamav-0.85.1-r1 66 MD5 e29ee77ca9bfe28ed18dbf67a9c90e75 files/clamd.conf 193 MD5 1b3268d3723e003ad99bf706e6bf4312 files/clamd.rc 1444 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) -iD8DBQFCiStUQlM6RnzZP+IRAt9CAKCNjle7Em9X2UTE+DEPmaw5yJtYAgCfZpzP -QDZLTPZ4mh9XsmG95GLFcpU= -=DCnp +iD8DBQFCkosQQlM6RnzZP+IRAux9AJ4xOqI4yXaSYoRI88C53k1plWgn6wCdFzuM +/voNqEZ+G89G77Jbea6hPLg= +=PbXh -----END PGP SIGNATURE----- diff --git a/app-antivirus/clamav/clamav-0.85.1-r1.ebuild b/app-antivirus/clamav/clamav-0.85.1-r1.ebuild new file mode 100644 index 000000000000..981799a984c8 --- /dev/null +++ b/app-antivirus/clamav/clamav-0.85.1-r1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.85.1-r1.ebuild,v 1.1 2005/05/24 02:01:36 ticho Exp $ + +inherit eutils flag-o-matic + +DESCRIPTION="Clam Anti-Virus Scanner" +HOMEPAGE="http://www.clamav.net/" +SRC_URI="mirror://sourceforge/clamav/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~x86 ~ppc ~sparc ~amd64 ~hppa ~alpha ~ppc64 ~ia64" +IUSE="crypt milter selinux" + +DEPEND="virtual/libc + crypt? ( >=dev-libs/gmp-4.1.2 ) + milter? ( mail-mta/sendmail ) + >=sys-libs/zlib-1.2.1-r3 + >=net-misc/curl-7.10.0 + net-dns/libidn + >=sys-apps/sed-4" +RDEPEND="${DEPEND} + selinux? ( sec-policy/selinux-clamav ) + sys-apps/grep" +PROVIDE="virtual/antivirus" + +pkg_setup() { + if use milter; then + if [ ! -e /usr/lib/libmilter.a ] ; then + ewarn "In order to enable milter support, clamav needs sendmail with enabled milter" + ewarn "USE flag. Either recompile sendmail with milter USE flag enabled, or disable" + ewarn "this flag for clamav as well to disable milter support." + die "need milter-enabled sendmail" + fi + fi + enewgroup clamav + enewuser clamav -1 /bin/false /dev/null clamav + pwconv || die +} + +src_compile() { + has_version =sys-libs/glibc-2.2* && filter-lfs-flags + + local myconf + + # we depend on fixed zlib, so we can disable this check to prevent redundant + # warning (bug #61749) + myconf="${myconf} --disable-zlib-vcheck" + # use id utility instead of /etc/passwd parsing (bug #72540) + myconf="${myconf} --enable-id-check" + use milter && myconf="${myconf} --enable-milter" + + econf ${myconf} --with-dbdir=/var/lib/clamav || die + emake || die +} + +src_install() { + make DESTDIR=${D} install || die + dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL + newconfd ${FILESDIR}/clamd.conf clamd + newinitd ${FILESDIR}/clamd.rc.new clamd + dodoc ${FILESDIR}/clamav-milter.README.gentoo + + dodir /var/run/clamav + keepdir /var/run/clamav + fowners clamav:clamav /var/run/clamav + dodir /var/log/clamav + keepdir /var/log/clamav + fowners clamav:clamav /var/log/clamav + + # Change /etc/clamd.conf to be usable out of the box + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/clamd.pid:" \ + -e "s:.*\(LocalSocket\) .*:\1 /var/run/clamav/clamd.sock:" \ + -e "s:.*\(User\) .*:\1 clamav:" \ + -e "s:^\#\(LogFile\) .*:\1 /var/log/clamav/clamd.log:" \ + -e "s:^\#\(LogTime\).*:\1:" \ + ${D}/etc/clamd.conf + + # Do the same for /etc/freshclam.conf + sed -i -e "s:^\(Example\):\# \1:" \ + -e "s:.*\(PidFile\) .*:\1 /var/run/clamav/freshclam.pid:" \ + -e "s:.*\(DatabaseOwner\) .*:\1 clamav:" \ + -e "s:^\#\(LogFile\) .*:\1 /var/log/freshclam.log:" \ + -e "s:^\#\(LogTime\).*:\1:" \ + ${D}/etc/freshclam.conf + + if use milter ; then + echo "START_MILTER=yes" \ + >> ${D}/etc/conf.d/clamd + echo "MILTER_SOCKET=\"/var/run/clamav/clmilter.sock\"" \ + >>${D}/etc/conf.d/clamd + echo "MILTER_OPTS=\"-m 10\"" \ + >>${D}/etc/conf.d/clamd + fi +} + +pkg_postinst() { + echo + ewarn "As of 0.85-r1, all settings from /etc/conf.d/clamd are ignored, except for" + ewarn "START_CLAMD, START_FRESHCLAM and MILTER related options. All settings are" + ewarn "read from /etc/clamd.conf and /etc/freshclam.conf, so double-check these two files." + echo + ewarn "Warning: clamd and/or freshclam have not been restarted." + ewarn "You should restart them with: /etc/init.d/clamd restart" + echo + if use milter ; then + einfo "For simple instructions howto setup the clamav-milter..." + einfo "" + einfo "zless /usr/share/doc/${PF}/clamav-milter.README.gentoo.gz" + echo + fi +} diff --git a/app-antivirus/clamav/clamav-0.85.1.ebuild b/app-antivirus/clamav/clamav-0.85.1.ebuild index 219447934d8f..86c0b455ad83 100644 --- a/app-antivirus/clamav/clamav-0.85.1.ebuild +++ b/app-antivirus/clamav/clamav-0.85.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.85.1.ebuild,v 1.1 2005/05/16 23:22:50 ticho Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.85.1.ebuild,v 1.2 2005/05/24 02:01:36 ticho Exp $ inherit eutils flag-o-matic @@ -59,6 +59,7 @@ src_install() { make DESTDIR=${D} install || die dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL newinitd ${FILESDIR}/clamd.rc.new clamd + newconfd ${FILESDIR}/clamd.conf clamd dodoc ${FILESDIR}/clamav-milter.README.gentoo dodir /var/run/clamav diff --git a/app-antivirus/clamav/files/clamav-milter.README.gentoo b/app-antivirus/clamav/files/clamav-milter.README.gentoo index 42b397b4d91f..17e9ba628ea5 100644 --- a/app-antivirus/clamav/files/clamav-milter.README.gentoo +++ b/app-antivirus/clamav/files/clamav-milter.README.gentoo @@ -1,41 +1,25 @@ -Nick Hadaway -raker@gentoo.org -10/27/2003 -Setting up clamav-milter on Gentoo Linux +Nick Hadaway <raker@gentoo.org> +Updated by Andrea Barisani <lcars@gentoo.org> +18/05/2004 +Setting up clamav-milter on Gentoo Linux Step 1 - Configure clamd - mv /etc/clamav.conf /etc/clamav.conf.dist - nano -w /etc/clamav.conf - - # This is my /etc/clamav.conf - LogFile /tmp/clamd.log - LogFileMaxSize 16M - LogTime - LogSyslog - PidFile /var/run/clamd.pid - DataDirectory /usr/share/clamav - LocalSocket /var/run/clamd.sock - StreamSaveToDisk - MaxDirectoryRecursion 15 - ScanMail - ScanArchive - ArchiveMaxFileSize 10M - ArchiveMaxRecursion 5 - ArchiveMaxFiles 1000 - -Step 2 - Tell the init script to start clamd as well as freshclam +Check /etc/clamd.conf, default values should work out of the box but +read and understand all the options especially if you are going to +use it on production boxes. + +Step 2 - Tell the init script to start clamd as well as freshclam and the + milter itself. nano -w /etc/conf.d/clamd START_CLAMD=yes + START_FRESHCLAM=yes + START_MILTER=yes -Step 3 - Start clamd - - /etc/init.d/clamd start - -Step 4 - Edit sendmail.mc +Step 3 - Edit sendmail.mc Add these lines to sendmail.mc before any any other INPUT_MAIL_FILTER lines and before MAILER(local) @@ -43,18 +27,18 @@ Step 4 - Edit sendmail.mc will be discarded due to the use of confINPUT_MAIL_FILTERS Make this your first mail filter. :) - INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clmilter.sock, F=, T=S:4m;R:4m')dnl + INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clamav/clmilter.sock, F=, T=S:4m;R:4m')dnl define(`confINPUT_MAIL_FILTERS', `clmilter')dnl -Step 5 - Rebuild sendmail.cf +Step 4 - Rebuild sendmail.cf cd /etc/mail m4 sendmail.mc > sendmail.cf -Step 6 - Start clamav-milter +Step 5 - Start clamad - /usr/sbin/clamav-milter -blo /var/run/clmilter.sock + /etc/init.d/clamd start -Step 7 - Restart sendmail +Step 6 - Restart sendmail /etc/init.d/sendmail restart diff --git a/app-antivirus/clamav/files/clamd.rc.new b/app-antivirus/clamav/files/clamd.rc.new index cdbce1b19d91..a7293710b583 100644 --- a/app-antivirus/clamav/files/clamd.rc.new +++ b/app-antivirus/clamav/files/clamd.rc.new @@ -1,9 +1,7 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc.new,v 1.2 2005/05/16 09:23:24 ticho Exp $ - -CLAMD_SOCKET=`grep ^LocalSocket /etc/clamd.conf | cut -d\ -f 2` +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc.new,v 1.3 2005/05/24 02:01:36 ticho Exp $ depend() { use net @@ -11,9 +9,10 @@ depend() { } start() { + local clamd_socket=`grep ^LocalSocket /etc/clamd.conf | cut -d\ -f 2` if [ "${START_CLAMD}" = "yes" ]; then - if [ -S "${CLAMD_SOCKET:-/tmp/clamd}" ]; then - rm -f ${CLAMD_SOCKET:-/tmp/clamd} + if [ -S "${clamd_socket:-/tmp/clamd}" ]; then + rm -f ${clamd_socket:-/tmp/clamd} fi ebegin "Starting clamd" start-stop-daemon --start --quiet \ @@ -29,9 +28,28 @@ start() { eend 0 einfo "Virus databases are already up to date." else - eend ${retcode} "Failed to start freshclam." + eend ${retcode} "Failed to start freshclam" fi fi + if [ "${START_MILTER}" = "yes" ]; then + if [ -S "${MILTER_SOCKET}" ]; then + rm -f ${MILTER_SOCKET} + fi + + local logfile=`grep -e "^LogFile" /etc/clamd.conf | cut -d\ -f 2` + local clamav_user=`grep -e "^User" /etc/clamd.conf | cut -d\ -f 2` + if [[ -n "${logfile}" && -n "${clamav_user}" ]]; then + if [ ! -f "${logfile}" ]; then + touch ${logfile} + fi + chown ${clamav_user} ${logfile} + fi + + ebegin "Starting clamav-milter" + start-stop-daemon --start --quiet \ + --exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET} + eend $? "Failed to start clamav-milter" + fi } stop() { @@ -45,4 +63,9 @@ stop() { start-stop-daemon --stop --quiet --name freshclam eend $? "Failed to stop freshclam" fi + if [ "${START_MILTER}" = "yes" ]; then + ebegin "Stopping clamav-milter" + start-stop-daemon --stop --quiet --name clamav-milter + eend $? "Failed to stop clamav-milter" + fi } diff --git a/app-antivirus/clamav/files/digest-clamav-0.85.1-r1 b/app-antivirus/clamav/files/digest-clamav-0.85.1-r1 new file mode 100644 index 000000000000..56f3267da58d --- /dev/null +++ b/app-antivirus/clamav/files/digest-clamav-0.85.1-r1 @@ -0,0 +1 @@ +MD5 b0675c3273785d61eefc1afa304745c0 clamav-0.85.1.tar.gz 4061042 |