Subject: pkg/31339: pkgsrc update for mail/clamav to 0.87
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <jdwhite@jdwhite.org>
List: pkgsrc-bugs
Date: 09/18/2005 16:24:00
>Number:         31339
>Category:       pkg
>Synopsis:       Updates pkg to 0.87, contains security fixes.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 18 16:24:00 +0000 2005
>Originator:     Jason White
>Release:        NetBSD 2.0
>Organization:
Jason White (jdwhite@jdwhite.org)        http://www.jdwhite.org/~jdwhite
Jabber:jdwhite(jabber.org)                IRC:irc.netbsd.org/jdwhite
PGP KeyID: 0x5290E477/A8A2 3FDB AB33 98EB ED74  EDAA F538 9A30 5290 E477
>Environment:
System: NetBSD bender.jdwhite.org 2.0 NetBSD 2.0 (BENDER) #8: Mon Nov 29 20:52:24 CST 2004 gendalia@satai:/usr/obj/i386/BENDER i386
Architecture: i386
Machine: i386
>Description:
0.87 of clamav fixes some potential buffer overflow problems described here:
http://sourceforge.net/project/shownotes.php?release_id=356974
>How-To-Repeat:
>Fix:
Patches follow to update package to 0.87.  Note: patch-aa and patch-ab both 
referenced the same file, configure.  I merged patch-aa and patch-ab together 
into a new patch-aa and removed patch-ab.  All original patchfiles did apply, 
but all with varying offsets.  The included patchfile patches also correct 
these offsets.

--- Makefile.orig	2005-09-18 10:23:09.000000000 -0500
+++ Makefile	2005-09-18 10:23:24.000000000 -0500
@@ -11,7 +11,7 @@
 
 PKG_INSTALLATION_TYPES=	overwrite pkgviews
 
-CLAMAV_VERSION=		0.86.2
+CLAMAV_VERSION=		0.87
 
 USE_LIBTOOL=		yes
 
--- patches/patch-aa.orig	2005-09-18 11:06:24.000000000 -0500
+++ patches/patch-aa	2005-09-18 10:54:31.000000000 -0500
@@ -1,8 +1,47 @@
 $NetBSD: patch-aa,v 1.13 2004/10/30 09:50:33 xtraeme Exp $
 
---- configure.orig	2004-10-18 02:37:47.000000000 +1000
-+++ configure	2004-10-19 09:28:50.000000000 +1000
-@@ -11558,6 +11558,7 @@
+--- configure.orig	2005-09-15 18:34:05.000000000 -0500
++++ configure
+@@ -11853,6 +11853,38 @@
+ 
+     use_gethostbyname_r="no"
+     ;;
++
++dragonfly*)
++    if test "$have_pthreads" = "yes"; then
++	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -pthread"
++	CLAMD_LIBS="$CLAMD_LIBS -pthread"
++	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -pthread"
++	TH_SAFE="-thread-safe"
++
++cat >>confdefs.h <<\_ACEOF
++#define CL_THREAD_SAFE 1
++_ACEOF
++
++
++cat >>confdefs.h <<\_ACEOF
++#define _REENTRANT 1
++_ACEOF
++
++	if test "$want_clamuko" = "yes"; then
++
++cat >>confdefs.h <<\_ACEOF
++#define CLAMUKO 1
++_ACEOF
++
++	fi
++    fi
++
++cat >>confdefs.h <<\_ACEOF
++#define C_BSD 1
++_ACEOF
++
++    disable_gethostbyname_r="yes"
++    ;;
+ openbsd*)
+     if test "$have_pthreads" = "yes"; then
+ 	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -pthread"
+@@ -11911,6 +11943,7 @@
   	LIBCLAMAV_LIBS="$LIBCLAMAV_LIBS -lpthread"
   	CLAMD_LIBS="-lpthread"
   	CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread"

--- patches/patch-ad.orig	2005-09-18 11:06:24.000000000 -0500
+++ patches/patch-ad	2005-09-18 10:54:31.000000000 -0500
@@ -1,8 +1,8 @@
 $NetBSD: patch-ad,v 1.9 2005/02/14 11:20:13 grant Exp $
 
---- docs/Makefile.in.orig	2005-02-14 09:40:05.000000000 +1100
+--- docs/Makefile.in.orig	2005-06-23 15:03:04.000000000 -0500
 +++ docs/Makefile.in
-@@ -182,6 +182,8 @@ EXTRA_DIST = clamdoc.pdf man clamav-mirr
+@@ -185,6 +185,8 @@
  man_MANS = man/clamscan.1 man/freshclam.1 man/sigtool.1 man/clamd.8 man/clamd.conf.5 man/clamdscan.1 man/clamav-milter.8 man/freshclam.conf.5
  all: all-am
  
--- patches/patch-af.orig	2005-09-18 11:06:24.000000000 -0500
+++ patches/patch-af	2005-09-18 10:54:31.000000000 -0500
@@ -1,8 +1,8 @@
 $NetBSD: patch-af,v 1.1 2004/08/01 04:35:33 jlam Exp $
 
---- database/Makefile.in.orig	Thu Jul 29 17:50:06 2004
+--- database/Makefile.in.orig	2005-06-23 15:03:05.000000000 -0500
 +++ database/Makefile.in
-@@ -344,17 +344,6 @@ install:
+@@ -345,17 +345,6 @@
  	@test -f $(DESTDIR)$(DBINST)/mirrors.txt && rm -f $(DESTDIR)$(DBINST)/mirrors.txt || true
  	@test -f $(DESTDIR)$(DBINST)/viruses.db && rm -f $(DESTDIR)$(DBINST)/viruses.db || true
  	@test -f $(DESTDIR)$(DBINST)/viruses.db2 && rm -f $(DESTDIR)$(DBINST)/viruses.db2 || true

--- patches/patch-ah.orig	2005-09-18 11:06:23.000000000 -0500
+++ patches/patch-ah	2005-09-18 10:58:37.000000000 -0500
@@ -1,8 +1,8 @@
 $NetBSD: patch-ah,v 1.4 2005/05/05 00:42:56 xtraeme Exp $
 
---- clamav-milter/clamav-milter.c.orig	2005-05-05 02:31:54.000000000 +0200
-+++ clamav-milter/clamav-milter.c	2005-05-05 02:33:45.000000000 +0200
-@@ -2892,7 +2892,7 @@
+--- clamav-milter/clamav-milter.c.orig	2005-09-15 17:24:41.000000000 -0500
++++ clamav-milter/clamav-milter.c
+@@ -2973,7 +2973,7 @@
  						 * the postmaster, so include
  						 * some useful information
  						 */
@@ -11,7 +11,7 @@
  							sendmailId, privdata->from);
  					else
  						fprintf(sendmail, _("A message sent from %s to\n"),
-@@ -2906,7 +2906,7 @@
+@@ -2987,7 +2987,7 @@
  						fprintf(sendmail, _("\nThe message in question has been quarantined as %s\n"), privdata->filename);
  
  					if(hflag) {
@@ -20,7 +20,7 @@
  							smfi_getsymval(ctx, "j"), privdata->from,
  							smfi_getsymval(ctx, "_"));
  						fputs(_("For your information, the original message headers were:\n\n"), sendmail);
-@@ -4047,7 +4047,7 @@
+@@ -4150,7 +4150,7 @@
  
  	if(move(privdata->filename, newname) < 0) {
  		if(use_syslog)