From delphij@FreeBSD.org  Fri Jun 11 19:15:48 2010
Return-Path: <delphij@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 419FE106566B;
	Fri, 11 Jun 2010 19:15:48 +0000 (UTC)
	(envelope-from delphij@FreeBSD.org)
Received: from freefall.freebsd.org (unknown [IPv6:2001:4f8:fff6::28])
	by mx1.freebsd.org (Postfix) with ESMTP id 323B08FC13;
	Fri, 11 Jun 2010 19:15:48 +0000 (UTC)
Received: from freefall.freebsd.org (localhost [127.0.0.1])
	by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o5BJFmU0044376;
	Fri, 11 Jun 2010 19:15:48 GMT
	(envelope-from delphij@freefall.freebsd.org)
Received: (from delphij@localhost)
	by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o5BJFmQY044375;
	Fri, 11 Jun 2010 19:15:48 GMT
	(envelope-from delphij)
Message-Id: <201006111915.o5BJFmQY044375@freefall.freebsd.org>
Date: Fri, 11 Jun 2010 19:15:48 GMT
From: Xin LI <delphij@freebsd.org>
Reply-To: Xin LI <delphij@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: gabor@freebsd.org
Subject: [PATCH] security/amavisd-new should not insist Berkeley DB 4.2
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         147794
>Category:       ports
>Synopsis:       [PATCH] security/amavisd-new should not insist Berkeley DB 4.2
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gabor
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jun 11 19:20:02 UTC 2010
>Closed-Date:    Mon Jul 12 11:14:04 UTC 2010
>Last-Modified:  Mon Jul 12 11:14:04 UTC 2010
>Originator:     Xin LI
>Release:        FreeBSD 8.0-STABLE i386
>Organization:
iXsystems, Inc.
>Environment:
System: FreeBSD freefall.freebsd.org 8.0-STABLE FreeBSD 8.0-STABLE #42 r204803: Sat Mar 6 21:21:56 UTC 2010 simon@freefall.freebsd.org:/usr/src/sys/i386/compile/FREEFALL i386


>Description:
	Revision 1.78 of Makefile have:

		USE_BDB=42

	Which causes Berkeley DB 4.2 be always installed regardless whether
	higher versions being installed.  This is unnecessary and undesirable.

>How-To-Repeat:
>Fix:

	The attached patch change the behavior to accept at least 4.2.
	(Note that 4.3 or 4.4 _may_ have some performance issues but at
	 least it worked just fine with 4.6).

--- amavisd-new.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/security/amavisd-new/Makefile,v
retrieving revision 1.78
diff -u -p -r1.78 Makefile
--- Makefile	8 Jun 2010 07:10:55 -0000	1.78
+++ Makefile	11 Jun 2010 19:11:12 -0000
@@ -106,7 +106,7 @@ AMAVIS_NOMILTER="@comment "
 .endif
 
 .if defined(WITH_BDB)
-USE_BDB=	42
+USE_BDB=	42+
 RUN_DEPENDS+=	${SITE_PERL}/${PERL_ARCH}/BerkeleyDB.pm:${PORTSDIR}/databases/p5-BerkeleyDB
 .endif
 
--- amavisd-new.diff ends here ---


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->gabor 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Fri Jun 11 19:20:12 UTC 2010 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147794 

From: Gabor Kovesdan <gabor@FreeBSD.org>
To: bug-followup@FreeBSD.org, delphij@freebsd.org
Cc:  
Subject: Re: ports/147794: [PATCH] security/amavisd-new should not insist
 Berkeley DB 4.2
Date: Fri, 11 Jun 2010 21:33:17 +0200

 There were some discussions between a user, the author and me, which 
 version to use. First, it seemed a good idea to rely on this one because 
 this one was confirmed to work properly as opposed to earlier versions 
 but now there are also reported problems on this. Now we are 
 reconsidering what to do, probably we will change to 4.7+ or directly to 
 5.0 in the coming days.
 
 -- 
 Gabor Kovesdan
 FreeBSD Volunteer
 
 EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org
 WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
 

From: Xin LI <delphij@delphij.net>
To: Gabor Kovesdan <gabor@FreeBSD.ORG>, 
 "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.ORG>
Cc:  
Subject: Re: ports/147794: [PATCH] security/amavisd-new should not insist
 Berkeley DB 4.2
Date: Fri, 11 Jun 2010 12:43:24 -0700

 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA256
 
 On 2010/06/11 12:33, Gabor Kovesdan wrote:
 > There were some discussions between a user, the author and me, which
 > version to use. First, it seemed a good idea to rely on this one because
 > this one was confirmed to work properly as opposed to earlier versions
 > but now there are also reported problems on this. Now we are
 > reconsidering what to do, probably we will change to 4.7+ or directly to
 > 5.0 in the coming days.
 
 Note that you can always use INVALID_BDB_VER in conjunction with
 USE_BDB=yes.
 
 By the way I fail to see how depending directly on Berkeley DB would
 even work (note that amavisd is written in pure perl and the real
 dependency is on p5-BerkeleyDB, which is compiled as binary).  It ONLY
 work by chance that there is no pre-existing Berkeley DB installed
 (well, this really depends on which version bsd.database.mk would pick,
 see the .mk file for details).
 
 The real fix seems to be teaching p5-BerkeleyDB about different
 BerkeleyDB versions and just revert revision 1.78.
 
 Cheers,
 - -- 
 Xin LI <delphij@delphij.net>	http://www.delphij.net/
 FreeBSD - The Power to Serve!	       Live free or die
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (FreeBSD)
 
 iQEcBAEBCAAGBQJMEpHcAAoJEATO+BI/yjfBPmQIAJJ99tY1Y9/RgbL3caCc1Xge
 Gnhq+JmoeHOWtFUthQlW5b7UWXK+Zpa9C6+LUpaGaQowxnj3xge83B08LeSTF6M7
 K2Poj1fEBZ6crYt2rz/A3oZn+fd7+tIdnXA9LqtGGpP+hd6jk19QTSTtQv1FBaP2
 VZQBIvirYJBPVh5Ssmy3QNbZyxOyWha5M3WwRBox2kXi04H+KKPkIscZ1hqWv1Yl
 hzEXVzY18EdWkmNpXsnHWYxtb6pOCn3XYTXeuxD1oLdY9znIE4LztReMwxqsS+mX
 jEQnDpIzlizODBeoazF6fFyo0v8kPyt3YgcwHNkIya+laU+esDiJJ+4BieowQH8=
 =58Co
 -----END PGP SIGNATURE-----

From: Gabor Kovesdan <gabor@FreeBSD.org>
To: d@delphij.net
Cc: clsung@FreeBSD.org, 
 "bug-followup@FreeBSD.org" <bug-followup@FreeBSD.ORG>
Subject: Re: ports/147794: [PATCH] security/amavisd-new should not insist
 Berkeley DB 4.2
Date: Sun, 13 Jun 2010 01:37:30 +0200

 El 2010. 06. 11. 21:43, Xin LI escribi:
 > -----BEGIN PGP SIGNED MESSAGE-----
 > Hash: SHA256
 >
 > On 2010/06/11 12:33, Gabor Kovesdan wrote:
 >    
 >> There were some discussions between a user, the author and me, which
 >> version to use. First, it seemed a good idea to rely on this one because
 >> this one was confirmed to work properly as opposed to earlier versions
 >> but now there are also reported problems on this. Now we are
 >> reconsidering what to do, probably we will change to 4.7+ or directly to
 >> 5.0 in the coming days.
 >>      
 > Note that you can always use INVALID_BDB_VER in conjunction with
 > USE_BDB=yes.
 >
 > By the way I fail to see how depending directly on Berkeley DB would
 > even work (note that amavisd is written in pure perl and the real
 > dependency is on p5-BerkeleyDB, which is compiled as binary).  It ONLY
 > work by chance that there is no pre-existing Berkeley DB installed
 > (well, this really depends on which version bsd.database.mk would pick,
 > see the .mk file for details).
 >
 > The real fix seems to be teaching p5-BerkeleyDB about different
 > BerkeleyDB versions and just revert revision 1.78.
 >
 >    
 Oh, yes, you're right. Somehow I didn't think of it just considered the 
 case when it is not present before installing amavisd-new. I'll include 
 INVALID_BDB_VER to prevent amavisd-new installing with incompatible bdb 
 versions and I've also CC'd clsung@ because of p5-BerkeleyDB. If 
 amavisd-new has problems with old bdb versions, probably other ports 
 also have so he might make it depend on a newer version (4.7+).
 
 -- 
 Gabor Kovesdan
 FreeBSD Volunteer
 
 EMAIL: gabor@FreeBSD.org .:|:. gabor@kovesdan.org
 WEB:   http://people.FreeBSD.org/~gabor .:|:. http://kovesdan.org
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/147794: commit references a PR
Date: Sun, 11 Jul 2010 17:46:53 +0000 (UTC)

 gabor       2010-07-11 17:42:37 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/amavisd-new Makefile 
     security/amavisd-new/files amavisd.sh.in pkg-message.in 
   Log:
   - Remove BDB version requirement. This doesn't fix the problem because
     amavisd-new uses BDB through databases/p5-BerkeleyDB and if that port
     is already present on the system when we install amavisd-new, this knob
     won't guarantee that we get the proper version.  The underlying port
     should be changed to use a more modern version of BDB, so instead of
     adding quirks here, a PR has been submitted for that port
     (ports/148494). [1] [2]
   - Proper handling of the WITH_RAR case [3]
   - Remove -M option from mdmfs when using ramdisk.  This reportedly
     stop crashes. [4]
   - Bump PORTREVISION
   
   PR:             ports/147794 [1], ports/147856 [2]
   Submitted by:   delphij [1], Joe Horn <joehorn@gmail.com> [2],
                   Scot Hetzel <swhetzel@gmail.com> [3],
                   Andy Dills <andy@xecu.net> (via private mail) [4]
   
   Revision  Changes    Path
   1.79      +6 -3      ports/security/amavisd-new/Makefile
   1.10      +2 -2      ports/security/amavisd-new/files/amavisd.sh.in
   1.9       +1 -1      ports/security/amavisd-new/files/pkg-message.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: gabor 
State-Changed-When: Mon Jul 12 11:13:49 UTC 2010 
State-Changed-Why:  
Fix committed, thanks. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=147794 
>Unformatted:
