aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2008-04-17 18:17:51 +0000
committerRenato Botelho <garga@FreeBSD.org>2008-04-17 18:17:51 +0000
commit64cc35100ba8084ee4f5f5d64c018007bd6cfbe5 (patch)
treebbfa0cf5c2405427d26c6bb987f6311c4d3e299f
parentabeb30147fe98a7f1a9c82cdb3e067c3c151d614 (diff)
downloadports-64cc35100ba8084ee4f5f5d64c018007bd6cfbe5.tar.gz
ports-64cc35100ba8084ee4f5f5d64c018007bd6cfbe5.zip
- Fix build with clamav-0.93
- Bump PORTREVISION Submitted by: maintainer by email
Notes
Notes: svn path=/head/; revision=211467
-rw-r--r--security/klamav/Makefile4
-rw-r--r--security/klamav/files/patch-clamav-0.9391
2 files changed, 92 insertions, 3 deletions
diff --git a/security/klamav/Makefile b/security/klamav/Makefile
index 798053fe174e..3f077a8b7127 100644
--- a/security/klamav/Makefile
+++ b/security/klamav/Makefile
@@ -7,7 +7,7 @@
PORTNAME= klamav
PORTVERSION= 0.42
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= klamav
@@ -39,8 +39,6 @@ CONFIGURE_ARGS+=--with-qt-dir=${QT_PREFIX} \
USE_KDELIBS_VER= 3
-BROKEN= Doesn't build with clamav-0.93
-
.include <bsd.port.pre.mk>
pre-configure:
diff --git a/security/klamav/files/patch-clamav-0.93 b/security/klamav/files/patch-clamav-0.93
new file mode 100644
index 000000000000..2fbbd67f9c0a
--- /dev/null
+++ b/security/klamav/files/patch-clamav-0.93
@@ -0,0 +1,91 @@
+diff -ur src/klammail/cfgparser.c klamav-0.42-clamav093/src/klammail/cfgparser.c
+--- 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 src/klammail/clamdmail.c klamav-0.42-clamav093/src/klammail/clamdmail.c
+--- 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 src/scanviewer.cpp klamav-0.42-clamav093/src/scanviewer.cpp
+--- 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 ";