diff options
author | Wulf Krueger <philantrop@gentoo.org> | 2008-04-25 22:48:51 +0000 |
---|---|---|
committer | Wulf Krueger <philantrop@gentoo.org> | 2008-04-25 22:48:51 +0000 |
commit | 894d7d0059483c23911627659566deaefa72a6d6 (patch) | |
tree | bf22063d464ffd9f39d2310179d19ae8f8ae9691 /app-antivirus | |
parent | Version bump (upstream included my patch). (diff) | |
download | gentoo-2-894d7d0059483c23911627659566deaefa72a6d6.tar.gz gentoo-2-894d7d0059483c23911627659566deaefa72a6d6.tar.bz2 gentoo-2-894d7d0059483c23911627659566deaefa72a6d6.zip |
Added a patch to fix compilation with >=clamav-0.93. Fixes bug 219021.
(Portage version: 2.1.5_rc6)
Diffstat (limited to 'app-antivirus')
-rw-r--r-- | app-antivirus/klamav/ChangeLog | 6 | ||||
-rw-r--r-- | app-antivirus/klamav/files/klamav-0.42-clamav093.patch | 91 | ||||
-rw-r--r-- | app-antivirus/klamav/klamav-0.42.ebuild | 11 |
3 files changed, 104 insertions, 4 deletions
diff --git a/app-antivirus/klamav/ChangeLog b/app-antivirus/klamav/ChangeLog index 1621d4f57dd9..813f47e67d50 100644 --- a/app-antivirus/klamav/ChangeLog +++ b/app-antivirus/klamav/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for app-antivirus/klamav # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/klamav/ChangeLog,v 1.42 2008/02/26 20:08:12 rich0 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/klamav/ChangeLog,v 1.43 2008/04/25 22:48:51 philantrop Exp $ + + 25 Apr 2008; Wulf C. Krueger <philantrop@gentoo.org> + +files/klamav-0.42-clamav093.patch, klamav-0.42.ebuild: + Added a patch to fix compilation with >=clamav-0.93. Fixes bug 219021. 26 Feb 2008; Richard Freeman <rich0@gentoo.org> klamav-0.42.ebuild: amd64 stable - 202694 diff --git a/app-antivirus/klamav/files/klamav-0.42-clamav093.patch b/app-antivirus/klamav/files/klamav-0.42-clamav093.patch new file mode 100644 index 000000000000..c4f81ad07042 --- /dev/null +++ b/app-antivirus/klamav/files/klamav-0.42-clamav093.patch @@ -0,0 +1,91 @@ +diff -ur klamav-0.42/src/klammail/cfgparser.c klamav-0.42-clamav093/src/klammail/cfgparser.c +--- klamav-0.42/src/klammail/cfgparser.c 2008-01-06 17:00:35.000000000 +0100 ++++ klamav-0.42-clamav093/src/klammail/cfgparser.c 2008-03-28 07:00:26.000000000 +0100 +@@ -63,10 +63,10 @@ + {"ScanOLE2", OPT_NOARG}, + {"ScanArchive", OPT_NOARG}, + {"ScanRAR", OPT_NOARG}, +- {"ArchiveMaxFileSize", OPT_COMPSIZE}, +- {"ArchiveMaxRecursion", OPT_NUM}, +- {"ArchiveMaxFiles", OPT_NUM}, +- {"ArchiveMaxCompressionRatio", OPT_NUM}, ++ {"MaxScanSize", OPT_COMPSIZE}, ++ {"MaxFileSize", OPT_COMPSIZE}, ++ {"MaxRecursion", OPT_NUM}, ++ {"MaxFiles", OPT_NUM}, + {"ArchiveLimitMemoryUsage", OPT_NOARG}, + {"ArchiveBlockEncrypted", OPT_NOARG}, + {"DataDirectory", OPT_STR}, /* obsolete */ +diff -ur klamav-0.42/src/klammail/clamdmail.c klamav-0.42-clamav093/src/klammail/clamdmail.c +--- klamav-0.42/src/klammail/clamdmail.c 2008-01-06 17:00:35.000000000 +0100 ++++ klamav-0.42-clamav093/src/klammail/clamdmail.c 2008-03-28 07:10:31.000000000 +0100 +@@ -151,14 +151,14 @@ + while((bytes = read(0, buff, BUFFSIZE)) > 0) { + + if(write(fd, buff, bytes) != bytes) { +- cli_dbgmsg("clamdmail -> Can't write() file.\n"); ++ printf("clamdmail -> Can't write() file.\n"); + close(fd); + return CL_EMEM; + } + } + + if(fsync(fd) == -1) { +- cli_dbgmsg("fsync() failed for descriptor %d\n", fd); ++ printf("fsync() failed for descriptor %d\n", fd); + close(fd); + return CL_EFSYNC; + } +@@ -202,13 +202,12 @@ + /* set up archive limits */ + memset(&limits, 0, sizeof(struct cl_limits)); + limits.maxfiles = 1000; /* max files */ +- limits.maxfilesize = 10 * 1048576; /* maximum size of archived/compressed ++ limits.maxfilesize = 10 * 1048576; /* maximum size of + * file (files exceeding this limit + * will be ignored) + */ +- limits.maxreclevel = 5; /* maximum recursion level for archives */ +- limits.maxmailrec = 64; /* maximum recursion level for mail files */ +- limits.maxratio = 200; /* maximum compression ratio */ ++ limits.maxreclevel = 5; /* maximum recursion level for archives and mail files */ ++ limits.maxscansize = 200 * limits.maxfilesize; /* maximum compression ratio */ + + ret = cl_scandesc(fd, &virname, &size, engine, &limits, CL_SCAN_STDOPT | CL_ARCHIVE | CL_MAIL | CL_OLE2 | CL_SCAN_HTML); + +@@ -368,7 +367,7 @@ + while((bytes = read(fd, buff, BUFFSIZE)) > 0) { + + if(write(1, buff, bytes) != bytes) { +- cli_dbgmsg("clamdmail -> Can't write() file.\n"); ++ printf("clamdmail -> Can't write() file.\n"); + close(fd); + return CL_EMEM; + } +diff -ur klamav-0.42/src/scanviewer.cpp klamav-0.42-clamav093/src/scanviewer.cpp +--- klamav-0.42/src/scanviewer.cpp 2008-01-06 17:00:35.000000000 +0100 ++++ klamav-0.42-clamav093/src/scanviewer.cpp 2008-03-28 07:00:26.000000000 +0100 +@@ -393,18 +393,18 @@ + options += "--max-files=" + QString("%1").arg(KlamavConfig::noFilesToExtract()) + " "; + + if (KlamavConfig::mBsToExtract() > 0) +- options += "--max-space=" + QString("%1").arg(KlamavConfig::mBsToExtract()) + " "; ++ options += "--max-filesize=" + QString("%1").arg(KlamavConfig::mBsToExtract()) + " "; + +- if (KlamavConfig::compressionRatio() > 0) +- options += "--max-ratio=" + QString("%1").arg(KlamavConfig::compressionRatio()) + " "; ++ if (KlamavConfig::mBsToExtract() > 0 && KlamavConfig::compressionRatio() > 0) ++ options += "--max-scansize=" + QString("%1").arg(KlamavConfig::mBsToExtract() * KlamavConfig::compressionRatio()) + " "; + + if (KlamavConfig::recursionLevel() > 0) + options += "--max-recursion=" + QString("%1").arg(KlamavConfig::recursionLevel()) + " "; + + + //config->setGroup("Klamscan"); +- if (KlamavConfig::virusLimitsExceeded()) +- options += "--block-max "; ++// if (KlamavConfig::virusLimitsExceeded()) ++// options += "--block-max "; + + if (KlamavConfig::virusEncrypted()) + options += "--block-encrypted "; diff --git a/app-antivirus/klamav/klamav-0.42.ebuild b/app-antivirus/klamav/klamav-0.42.ebuild index c82a210745c3..dc50538bae4a 100644 --- a/app-antivirus/klamav/klamav-0.42.ebuild +++ b/app-antivirus/klamav/klamav-0.42.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-antivirus/klamav/klamav-0.42.ebuild,v 1.7 2008/02/26 20:08:12 rich0 Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-antivirus/klamav/klamav-0.42.ebuild,v 1.8 2008/04/25 22:48:51 philantrop Exp $ inherit kde @@ -21,11 +21,16 @@ RDEPEND="${DEPEND}" need-kde 3.5 -PATCHES="${FILESDIR}/${PN}-0.41-cl_loaddbdir.patch" +PATCHES=( "${FILESDIR}/${PN}-0.41-cl_loaddbdir.patch" ) src_unpack(){ kde_src_unpack + # Make things work with clamav versions >= 0.93. Fixes bug 219021. + if has_version '>=app-antivirus/clamav-0.93' ; then + epatch "${FILESDIR}/${P}-clamav093.patch" + fi + # Assure a future version won't try to build this. rm -rf "${WORKDIR}/${MY_P}/dazuko"* || die "We missed to eradicate some files" @@ -40,5 +45,5 @@ src_compile(){ pkg_postinst(){ elog "The on-access scanning functionality is provided by" - elog "the Dazuko kernel module: emerge sys-fs/dazuko" + elog "the Dazuko kernel module. To use it, install sys-fs/dazuko." } |