ports/133876: [PATCH] www/mod_clamav: update to 0.23

Renato Botelho garga at FreeBSD.org
Mon Apr 20 16:00:13 UTC 2009


>Number:         133876
>Category:       ports
>Synopsis:       [PATCH] www/mod_clamav: update to 0.23
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Apr 20 16:00:12 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Renato Botelho
>Release:        FreeBSD 8.0-CURRENT i386
>Organization:
FreeBSD.org
>Environment:
System: FreeBSD botelhor.bplab.local 8.0-CURRENT FreeBSD 8.0-CURRENT #65 r191101: Wed Apr 15 10:50:15 BRT
>Description:
- Update to 0.23

PS: This version just works with apache 2.2

Added file(s):
- files/patch-mod_clamav.h

Removed file(s):
- files/patch-mod_clamav.c

Port maintainer (tmueko at kommunity.net) is cc'd.

Generated with FreeBSD Port Tools 0.77
>How-To-Repeat:
>Fix:

--- mod_clamav-0.23.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/pcvs/ports/www/mod_clamav/Makefile,v
retrieving revision 1.17
diff -u -u -r1.17 Makefile
--- Makefile	27 Mar 2009 11:53:07 -0000	1.17
+++ Makefile	20 Apr 2009 15:48:56 -0000
@@ -6,8 +6,7 @@
 #
 
 PORTNAME=	mod_clamav
-PORTVERSION=	0.22
-PORTREVISION=	4
+PORTVERSION=	0.23
 CATEGORIES=	www security
 MASTER_SITES=	http://software.othello.ch/mod_clamav/ \
 		http://www.kommunity.net/download/mod_clamav/
@@ -16,16 +15,10 @@
 COMMENT=	Scans content delivered by the Apache20 proxy module for viruses
 
 USE_AUTOTOOLS=	libtool:15
-USE_APACHE=	2.0
+USE_APACHE=	2.2
 WITH_APACHE2=	YES
 GNU_CONFIGURE=	yes
 
-.include <bsd.port.pre.mk>
-
-.if exists(${LOCALBASE}/include/apache22/http_core.h) || exists(${LOCALBASE}/include/apache/http_core.h)
-IGNORE=	mod_clamav only compile and run with apache-2.0.x
-.endif
-
 .if defined(WITH_CLAMAVDEVEL)
 LIB_DEPENDS+=	clamav.6:${PORTSDIR}/security/clamav-devel
 .else
@@ -33,7 +26,7 @@
 LIB_DEPENDS+=	clamav.6:${PORTSDIR}/security/clamav
 .endif
 
-CONFIGURE_ARGS=	--with-apxs=${PREFIX}/sbin/apxs \
+CONFIGURE_ARGS=	--with-apxs=${APXS} \
 		--libdir=${PREFIX}/lib/apache2
 CFLAGS+=	-I${LOCALBASE}/include
 CPPFLAGS+=	-I${LOCALBASE}/include \
@@ -43,6 +36,13 @@
 CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" \
 		LDFLAGS="${LDFLAGS}"
 
+post-patch:
+	@${REINPLACE_CMD} -e 's,REG_EXTENDED,AP_REG_EXTENDED,' \
+		${WRKSRC}/config.c
+	@${REINPLACE_CMD} -e '/^AC_CHECK_HEADERS/ s,regex.h ,,g' \
+		${WRKSRC}/configure.in
+
 post-install:
 	@${CAT} ${PKGMESSAGE}
-.include <bsd.port.post.mk>
+
+.include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /home/pcvs/ports/www/mod_clamav/distinfo,v
retrieving revision 1.5
diff -u -u -r1.5 distinfo
--- distinfo	15 Aug 2008 06:53:14 -0000	1.5
+++ distinfo	20 Apr 2009 15:48:56 -0000
@@ -1,3 +1,3 @@
-MD5 (mod_clamav-0.22.tar.gz) = 63d1a1fd02418a870e483a1a642dfb92
-SHA256 (mod_clamav-0.22.tar.gz) = f13c18ccfb6e40b7315db32c26c3602e14a4c9b7bf8e2ff23df87aca2e5f4341
-SIZE (mod_clamav-0.22.tar.gz) = 308718
+MD5 (mod_clamav-0.23.tar.gz) = 32c7b285dfdff5d13371b92ebe73b352
+SHA256 (mod_clamav-0.23.tar.gz) = 42e2e24c2b5dd816c6de72b60a1ad1647f6dc3ceeb400061edeba03ff231c192
+SIZE (mod_clamav-0.23.tar.gz) = 344930
Index: pkg-plist
===================================================================
RCS file: /home/pcvs/ports/www/mod_clamav/pkg-plist,v
retrieving revision 1.1
diff -u -u -r1.1 pkg-plist
--- pkg-plist	18 Apr 2004 17:01:11 -0000	1.1
+++ pkg-plist	20 Apr 2009 15:48:56 -0000
@@ -1,3 +1,3 @@
-libexec/apache2/mod_clamav.so
+%%APACHEMODDIR%%/mod_clamav.so
 @exec %D/sbin/apxs -e -A -n clamav %D/%f
 @exec %D/sbin/apxs -e -A -n clamav %D/%f
Index: files/patch-mod_clamav.c
===================================================================
RCS file: files/patch-mod_clamav.c
diff -N files/patch-mod_clamav.c
--- files/patch-mod_clamav.c	27 Mar 2009 11:53:07 -0000	1.5
+++ /dev/null	1 Jan 1970 00:00:00 -0000
@@ -1,122 +0,0 @@
---- mod_clamav.c.orig	2008-01-05 14:14:27.000000000 -0200
-+++ mod_clamav.c	2009-03-25 15:07:37.000000000 -0300
-@@ -130,7 +130,7 @@
- } cl_daemon_t;
- 
- typedef struct cl_local_t {
--    struct cl_node	*engine;
-+    struct cl_engine	*engine;
-     time_t		lastreload;
- } cl_local_t;
- 
-@@ -159,7 +159,9 @@
-     const char		*dbdir;		/* local: where are virus patterns */
-     int			port;		/* daemon: clamd port number */
-     char		*socket;	/* daemon: unix domain socket path */
--    struct cl_limits	lim;		/* clamav limits structure */
-+    int			maxfiles;
-+    int			maxfilesize;
-+    int			maxreclevel;
-     int			trickle_interval;
-     int			trickle_size;
-     int			sizelimit;
-@@ -464,11 +466,20 @@
-     unsigned int	signo = 0;
-     clamav_ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, f->r, "[%d] local init",
- 	(int)getpid());
-+
-+    /* initializa clam */
-+    if (0 != (ret = cl_init(CL_INIT_DEFAULT))) {
-+	ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
-+	    "[%d] cannot initialize clamav: %s", (int)getpid(),
-+	    cl_strerror(ret));
-+	return -1;
-+    }
-+
-     /*  make sure that rec->common->local is allocated			*/
-     if (NULL == rec->common->local) {
- 	rec->common->local = (cl_local_t *)apr_palloc(rec->pool,
- 	    sizeof(cl_local_t));
--	rec->common->local->engine = NULL;
-+	rec->common->local->engine = cl_engine_new();
- 	rec->common->local->lastreload = 0;
-     }
- 
-@@ -478,7 +489,7 @@
-     }
- 
-     /* reload the database from the directory				*/
--    if (0 != (ret = cl_load(rec->dbdir, &rec->common->local->engine,
-+    if (0 != (ret = cl_load(rec->dbdir, rec->common->local->engine,
- 	&signo, CL_DB_STDOPT))) {
- 	ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, f->r,
- 	    "[%d] cannot load clamav patterns: %s", (int)getpid(),
-@@ -706,7 +717,7 @@
-     case MOD_CLAMAV_LOCAL:
- 	/* virus scan using local clamav library */
- 	return cl_scanfile(ctx->filename, virname, (unsigned long *)len,
--	    rec->common->local->engine, &rec->lim, CL_ARCHIVE);
-+	    rec->common->local->engine, CL_SCAN_ARCHIVE);
- 	break;
-     case MOD_CLAMAV_DAEMON:
- 	/* set reasonable defaults for virname */
-@@ -1752,9 +1763,14 @@
-     cfg->extendedlogging = 0;
-     cfg->perms = 0640;
-     cfg->sizelimit = 0;
--    cfg->lim.maxfiles = 100;
--    cfg->lim.maxfilesize = 10 * 1048576;
--    cfg->lim.maxreclevel = 8;
-+
-+    cfg->maxfiles = 100;
-+    cl_engine_set_num(cfg->common->local->engine, CL_ENGINE_MAX_FILES, &cfg->maxfiles);
-+    cfg->maxfilesize = 10 * 1048576;
-+    cl_engine_set_num(cfg->common->local->engine, CL_ENGINE_MAX_FILESIZE, &cfg->maxfilesize);
-+    cfg->maxreclevel = 8;
-+    cl_engine_set_num(cfg->common->local->engine, CL_ENGINE_MAX_RECURSION, &cfg->maxreclevel);
-+
-     cfg->safetypes = apr_table_make(p, 0);
-     cfg->safepatterns = apr_array_make(p, 64, sizeof(clamav_safepattern));
-     cfg->safeuris = apr_array_make(p, 64, sizeof(clamav_safeuri));
-@@ -1800,12 +1816,12 @@
- 	child->shmname = parent->shmname;
-     if (child->mutexname == NULL)
- 	child->mutexname = parent->mutexname;
--    if (child->lim.maxfiles == 0)
--	child->lim.maxfiles = parent->lim.maxfiles;
--    if (child->lim.maxfilesize == 0)
--	child->lim.maxfilesize = parent->lim.maxfilesize;
--    if (child->lim.maxreclevel == 0)
--	child->lim.maxreclevel = parent->lim.maxreclevel;
-+    if (child->maxfiles == 0)
-+	child->maxfiles = parent->maxfiles;
-+    if (child->maxfilesize == 0)
-+	child->maxfilesize = parent->maxfilesize;
-+    if (child->maxreclevel == 0)
-+	child->maxreclevel = parent->maxreclevel;
-     if ((!child->tmpdir) && (parent->tmpdir))
- 	child->tmpdir = (char *)apr_pstrdup(p, parent->tmpdir);
-     if (apr_is_empty_table(child->safetypes))
-@@ -2065,19 +2081,19 @@
-     ),
-     AP_INIT_TAKE1(
- 	"ClamavMaxfiles", ap_set_int_slot,
--	(void *)APR_OFFSETOF(clamav_config_rec, lim.maxfiles),
-+	(void *)APR_OFFSETOF(clamav_config_rec, maxfiles),
- 	RSRC_CONF,
- 	"Maximum number of files in an archive"
-     ),
-     AP_INIT_TAKE1(
- 	"ClamavMaxfilesize", ap_set_int_slot,
--	(void *)APR_OFFSETOF(clamav_config_rec, lim.maxfilesize),
-+	(void *)APR_OFFSETOF(clamav_config_rec, maxfilesize),
- 	RSRC_CONF,
- 	"Maximum archive size"
-     ),
-     AP_INIT_TAKE1(
- 	"ClamavRecursion", ap_set_int_slot,
--	(void *)APR_OFFSETOF(clamav_config_rec, lim.maxreclevel),
-+	(void *)APR_OFFSETOF(clamav_config_rec, maxreclevel),
- 	RSRC_CONF,
- 	"Maximum recursion depth when analyzing archives"
-     ),
Index: files/patch-mod_clamav.h
===================================================================
RCS file: files/patch-mod_clamav.h
diff -N files/patch-mod_clamav.h
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ files/patch-mod_clamav.h	20 Apr 2009 15:48:56 -0000
@@ -0,0 +1,13 @@
+--- mod_clamav.h.orig	2009-04-11 10:31:32.000000000 -0300
++++ mod_clamav.h	2009-04-11 10:32:11.000000000 -0300
+@@ -70,9 +70,7 @@
+ #ifdef HAVE_ALLOCA_H
+ #include <alloca.h>
+ #endif /* HAVE_ALLOCA_H */
+-#ifdef HAVE_REGEX_H
+-#include <regex.h>
+-#endif /* HAVE_REGEX_H */
++#include <ap_regex.h>
+ 
+ #ifndef CLAMAV_DEBUG
+ #define	CLAMAV_DEBUG	0
--- mod_clamav-0.23.patch ends here ---

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list