ports/123350: [PATCH] Fix build of mail/p5-Mail-ClamAV after clamav 0.93
Xin LI
delphij at FreeBSD.org
Sat May 3 00:40:01 UTC 2008
>Number: 123350
>Category: ports
>Synopsis: [PATCH] Fix build of mail/p5-Mail-ClamAV after clamav 0.93
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Sat May 03 00:40:00 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator: Xin LI
>Release: FreeBSD 7.0-STABLE i386
>Organization:
The FreeBSD Project
>Environment:
System: FreeBSD freefall.freebsd.org 7.0-STABLE FreeBSD 7.0-STABLE #34: Sat Apr 12 11:52:18 UTC 2008 simon at freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386
>Description:
This patch rips off no-longer existent functionalities that exists only
in previous clamav versions.
>How-To-Repeat:
p5-Mail-ClamAV is currently marked BROKEN.
>Fix:
--- p5-Mail-ClamAV.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/p5-Mail-ClamAV/Makefile,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile
--- Makefile 17 Apr 2008 14:26:58 -0000 1.12
+++ Makefile 2 May 2008 23:16:22 -0000
@@ -7,7 +7,7 @@
PORTNAME= Mail-ClamAV
PORTVERSION= 0.20
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= mail perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@@ -26,8 +26,6 @@ PERL_CONFIGURE= yes
MAN3= Mail::ClamAV.3
-BROKEN= Doesn't build with clamav-0.93
-
post-install:
@${CAT} ${PKGMESSAGE}
Index: files/patch-ClamAV.pm
===================================================================
RCS file: /home/ncvs/ports/mail/p5-Mail-ClamAV/files/patch-ClamAV.pm,v
retrieving revision 1.2
diff -u -p -r1.2 patch-ClamAV.pm
--- files/patch-ClamAV.pm 19 Dec 2007 23:08:35 -0000 1.2
+++ files/patch-ClamAV.pm 3 May 2008 00:35:27 -0000
@@ -1,5 +1,5 @@
---- ClamAV.pm.orig 2007-02-20 11:42:16.000000000 -0200
-+++ ClamAV.pm 2007-12-18 14:31:54.000000000 -0200
+--- ./ClamAV.pm.orig 2007-02-20 05:42:16.000000000 -0800
++++ ./ClamAV.pm 2008-05-02 17:22:26.382239887 -0700
@@ -73,10 +73,6 @@
CL_ESUPPORT
CL_ELOCKDB
@@ -11,7 +11,15 @@
CL_SCAN_RAW
CL_SCAN_ARCHIVE
CL_SCAN_MAIL
-@@ -169,12 +165,9 @@
+@@ -88,7 +84,6 @@
+ CL_SCAN_MAILURL
+ CL_SCAN_BLOCKMAX
+ CL_SCAN_ALGORITHMIC
+- CL_SCAN_PHISHING_DOMAINLIST
+ CL_SCAN_PHISHING_BLOCKSSL
+
+ CL_SCAN_PHISHING_BLOCKCLOAK
+@@ -169,12 +164,9 @@
VERSION => $VERSION,
PREFIX => 'clamav_perl_',
NAME => "Mail::ClamAV",
@@ -27,7 +35,60 @@
use Inline C => <<'END_OF_C';
#include <stdio.h>
#include <string.h>
-@@ -496,13 +489,7 @@
+@@ -210,12 +202,10 @@
+
+ /* set defaults for limits */
+ c->limits.maxreclevel = 5;
+- c->limits.maxmailrec = 10;
+ c->limits.maxfiles = 1000;
+ c->limits.maxfilesize = 1024 * 1028 * 10; /* 10 Megs */
+
+ /* XXX need to figure out a nice default */
+- c->limits.maxratio = 200;
+ c->limits.archivememlim = 1;
+
+ if (S_ISDIR(st.st_mode)) {
+@@ -290,19 +280,6 @@
+ return SvClam(self)->limits.maxreclevel;
+ }
+
+-int clamav_perl_maxmailrec(SV *self, ...)
+-{
+- Inline_Stack_Vars;
+- if (Inline_Stack_Items > 1) {
+- SV *max;
+- if (Inline_Stack_Items > 2)
+- croak("Invalid number of arguments to maxmailrec()");
+- max = Inline_Stack_Item(1);
+- SvClam(self)->limits.maxmailrec = SvIV(max);
+- }
+- return SvClam(self)->limits.maxmailrec;
+-}
+-
+ int clamav_perl_maxfiles(SV *self, ...)
+ {
+ Inline_Stack_Vars;
+@@ -329,19 +306,6 @@
+ return SvClam(self)->limits.maxfilesize;
+ }
+
+-int clamav_perl_maxratio(SV *self, ...)
+-{
+- Inline_Stack_Vars;
+- if (Inline_Stack_Items > 1) {
+- SV *max;
+- if (Inline_Stack_Items > 2)
+- croak("Invalid number of arguments to maxratio()");
+- max = Inline_Stack_Item(1);
+- SvClam(self)->limits.maxratio = (long int)SvIV(max);
+- }
+- return SvClam(self)->limits.maxratio;
+-}
+-
+ int clamav_perl_archivememlim(SV *self, ...)
+ {
+ Inline_Stack_Vars;
+@@ -496,13 +460,7 @@
if (strEQ("CL_ESUPPORT", name)) return CL_ESUPPORT;
if (strEQ("CL_ELOCKDB", name)) return CL_ELOCKDB;
@@ -41,3 +102,58 @@
if (strEQ("CL_DB_PHISHING", name)) return CL_DB_PHISHING;
if (strEQ("CL_DB_ACONLY", name)) return CL_DB_ACONLY;
if (strEQ("CL_DB_PHISHING_URLS", name)) return CL_DB_PHISHING_URLS;
+@@ -522,7 +480,6 @@
+ if (strEQ("CL_SCAN_MAILURL", name)) return CL_SCAN_MAILURL;
+ if (strEQ("CL_SCAN_BLOCKMAX", name)) return CL_SCAN_BLOCKMAX;
+ if (strEQ("CL_SCAN_ALGORITHMIC", name)) return CL_SCAN_ALGORITHMIC;
+- if (strEQ("CL_SCAN_PHISHING_DOMAINLIST", name)) return CL_SCAN_PHISHING_DOMAINLIST;
+ if (strEQ("CL_SCAN_PHISHING_BLOCKSSL", name)) return CL_SCAN_PHISHING_BLOCKSSL;
+ if (strEQ("CL_SCAN_PHISHING_BLOCKCLOAK", name)) return CL_SCAN_PHISHING_BLOCKCLOAK;
+ if (strEQ("CL_SCAN_ELF", name)) return CL_SCAN_ELF;
+@@ -602,11 +559,9 @@
+
+ # Set some limits (only applies to scan())
+ $c->maxreclevel(4);
+- $c->maxmailrec(4);
+ $c->maxfiles(20);
+ $c->maxfilesize(1024 * 1024 * 20); # 20 megs
+ $c->archivememlim(0); # limit memory usage for bzip2 (0/1)
+- $c->maxratio(0);
+
+ # Scan a filehandle (scandesc in clamav)
+ # scan(FileHandle or path, Bitfield of options)
+@@ -701,10 +656,6 @@
+
+ Enable algorithmic detection of viruses.
+
+-=item CL_SCAN_PHISHING_DOMAINLIST
+-
+-Phishing module: restrict URL scanning to domains from .pdf (RECOMMENDED).
+-
+ =item CL_SCAN_PHISHING_BLOCKSSL
+
+ Phishing module: always block SSL mismatches in URLs.
+@@ -890,10 +841,6 @@
+
+ Sets the maximum recursion level into archives [default 5].
+
+-=item maxmailrec
+-
+-Sets the maximum recursion level into emails [default 10].
+-
+ =item maxfiles
+
+ Maximum number of files that will be scanned [default 1000]. A value of zero
+@@ -904,12 +851,6 @@
+ Maximum file size that will be scanned in bytes [default 10M]. A value of zero
+ disables the check.
+
+-=item maxratio
+-
+-Maximum compression ratio. So if this is set to 200, libclamav will give up
+-decompressing a file if it reaches 200x its compressed size [default 200]. A
+-value of zero disables the check.
+-
+ =item archivememlim
+
+ Turns on/off memory usage limits for bzip2. [default 1]
Index: files/patch-README
===================================================================
RCS file: files/patch-README
diff -N files/patch-README
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-README 3 May 2008 00:35:27 -0000
@@ -0,0 +1,47 @@
+--- ./README.orig 2007-02-20 05:40:55.000000000 -0800
++++ ./README 2008-05-02 17:22:26.385238336 -0700
+@@ -27,11 +27,9 @@
+ # Set some limits (only applies to scan())
+ # Only relevant for archives
+ $c->maxreclevel(4);
+- $c->maxmailrec(4);
+ $c->maxfiles(20);
+ $c->maxfilesize(1024 * 1024 * 20); # 20 megs
+ $c->archivememlim(0); # limit memory usage for bzip2 (0/1)
+- $c->maxratio(0);
+
+ # Scan a filehandle (scandesc in clamav)
+ # scan(FileHandle or path, Bitfield of options)
+@@ -107,10 +105,6 @@
+ CL_SCAN_ALGORITHMIC
+ Enable algorithmic detection of viruses.
+
+- CL_SCAN_PHISHING_DOMAINLIST
+- Phishing module: restrict URL scanning to domains from .pdf
+- (RECOMMENDED).
+-
+ CL_SCAN_PHISHING_BLOCKSSL
+ Phishing module: always block SSL mismatches in URLs.
+
+@@ -239,9 +233,6 @@
+ maxreclevel
+ Sets the maximum recursion level into archives [default 5].
+
+- maxmailrec
+- Sets the maximum recursion level into emails [default 10].
+-
+ maxfiles
+ Maximum number of files that will be scanned [default 1000]. A value of
+ zero disables the check.
+@@ -250,11 +241,6 @@
+ Maximum file size that will be scanned in bytes [default 10M]. A value
+ of zero disables the check.
+
+- maxratio
+- Maximum compression ratio. So if this is set to 200, libclamav will
+- give up decompressing a file if it reaches 200x its compressed size
+- [default 200]. A value of zero disables the check.
+-
+ archivememlim
+ Turns on/off memory usage limits for bzip2. [default 1]
+
Index: files/patch-t__Mail-ClamAV.t
===================================================================
RCS file: files/patch-t__Mail-ClamAV.t
diff -N files/patch-t__Mail-ClamAV.t
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-t__Mail-ClamAV.t 3 May 2008 00:35:27 -0000
@@ -0,0 +1,21 @@
+--- ./t/Mail-ClamAV.t.orig 2007-02-20 05:35:41.000000000 -0800
++++ ./t/Mail-ClamAV.t 2008-05-02 17:35:11.841874518 -0700
+@@ -44,10 +44,6 @@
+ CL_ESUPPORT
+ CL_ELOCKDB
+
+- CL_ENCINIT
+- CL_ENCLOAD
+- CL_ENCIO
+-
+ CL_SCAN_RAW
+ CL_SCAN_ARCHIVE
+ CL_SCAN_MAIL
+@@ -59,7 +55,6 @@
+ CL_SCAN_MAILURL
+ CL_SCAN_BLOCKMAX
+ CL_SCAN_ALGORITHMIC
+- CL_SCAN_PHISHING_DOMAINLIST
+ CL_SCAN_PHISHING_BLOCKSSL
+
+ CL_SCAN_PHISHING_BLOCKCLOAK
--- p5-Mail-ClamAV.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list