From nobody@FreeBSD.org  Mon Oct 11 12:11:27 2010
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 5409B106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Oct 2010 12:11:27 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 2844D8FC12
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Oct 2010 12:11:27 +0000 (UTC)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o9BCBQGT046902
	for <freebsd-gnats-submit@FreeBSD.org>; Mon, 11 Oct 2010 12:11:26 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id o9BCBQPx046891;
	Mon, 11 Oct 2010 12:11:26 GMT
	(envelope-from nobody)
Message-Id: <201010111211.o9BCBQPx046891@www.freebsd.org>
Date: Mon, 11 Oct 2010 12:11:26 GMT
From: Adrian Thearle <adrian@thearle.com.au>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [PATCH] mail/postfix-gps: OPTIONS added for other databases
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         151388
>Category:       ports
>Synopsis:       [PATCH] mail/postfix-gps: OPTIONS added for other databases
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    delphij
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 11 12:20:01 UTC 2010
>Closed-Date:    Fri Mar 18 10:14:12 UTC 2011
>Last-Modified:  Fri Mar 18 10:14:12 UTC 2011
>Originator:     Adrian Thearle
>Release:        FreeBSD 8.1-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD freebsd_81_amd64_02.thearle.com.au 8.1-RELEASE FreeBSD 8.1-RELEASE #0: Mon Jul 19 02:36:49 UTC 2010
>Description:
Added OPTIONS to allow postfix-gps to work with the other databases. These change the port runtime dependancies to ensure the right perl DBD Driver is installed
>How-To-Repeat:

>Fix:

--- postfix-gps-1.005_3.patch begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/postfix-gps/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- Makefile    5 Oct 2010 19:57:43 -0000       1.17
+++ Makefile    11 Oct 2010 11:40:53 -0000
@@ -17,8 +17,7 @@
 COMMENT=       Greylist Policy Service for postfix

 LIB_DEPENDS=   dbi.0:${PORTSDIR}/databases/libdbi
-RUN_DEPENDS=   ${LOCALBASE}/lib/dbd:${PORTSDIR}/databases/libdbi-drivers \
-               ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
+RUN_DEPENDS=   ${LOCALBASE}/lib/dbd:${PORTSDIR}/databases/libdbi-drivers

 SCRIPT_FILES=  gps-maintain.pl gps-db-update.pl
 PLIST_FILES=   etc/gps.conf-dist libexec/gps libexec/gps-maintain.pl libexec/gps-db-update.pl
@@ -33,6 +32,24 @@
                CXXFLAGS="${CXXFLAGS} -I${LOCALBASE}/include"   \
                LDFLAGS="${LDFLAGS} ${PTHREAD_LIBS} -L${LOCALBASE}/lib"

+OPTIONS=       MYSQL           "Build with MySQL support" on \
+               PGSQL           "Build with PostgreSQL support" off \
+               SQLITE          "Build with SQLite support" off
+
+.include <bsd.port.options.mk>
+
+.if !defined(WITHOUT_MYSQL)
+RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/DBD/mysql.pm:${PORTSDIR}/databases/p5-DBD-mysql
+.endif
+
+.if !defined(WITHOUT_PGSQL)
+RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/DBD/Pg.pm:${PORTSDIR}/databases/p5-DBD-Pg
+.endif
+
+.if !defined(WITHOUT_SQLITE)
+RUN_DEPENDS+=   ${SITE_PERL}/${PERL_ARCH}/DBD/SQLite.pm:${PORTSDIR}/databases/p5-DBD-SQLite
+.endif
+
 pre-configure:
        @cd ${WRKSRC} && ${ACLOCAL}

--- postfix-gps-1.005_3.patch ends here ---


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

http://www.freebsd.org/cgi/query-pr.cgi?pr=151388 
State-Changed-From-To: open->feedback 
State-Changed-By: delphij 
State-Changed-When: Mon Oct 11 16:40:49 UTC 2010 
State-Changed-Why:  
Hi, 

I am aware of the problem but the proposed fix won't work, 
unfortunately, since the C part of the daemon needs a 
multiple database enabled libdbi-drivers package to work. 

Without the ability to depend on libdbi-drivers support, 
the change you have proposed will only effective on the 
perl maintainence part of the postfix-gps port. 

So I think I will have to close or mark this suspend if 
we don't have better solutions :( 

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

From: Adrian Thearle <adrian@thearle.com.au>
To: delphij@FreeBSD.org, FreeBSD-ports-bugs@FreeBSD.org, 
 FreeBSD-gnats-submit@FreeBSD.org
Cc:  
Subject: Re: ports/151388: [PATCH] mail/postfix-gps: OPTIONS added for other
 databases
Date: Tue, 12 Oct 2010 08:42:14 +1100

 This is a multi-part message in MIME format.
 --------------090504080608070004020305
 Content-Type: text/plain; charset=ISO-8859-1; format=flowed
 Content-Transfer-Encoding: 7bit
 
   I guess from my point of view they are separate problems. The 
 libdbi-drivers package is configured separately, and I ensure that I 
 compile it with postgresql support. My understanding of the ports is 
 that if a dependant port is not configured correctly, then one needs 
 enough understanding of the error message to find and recompile the 
 dependant port. I just thought this was a limitation of the ports system.
 
 We could add a check to look for 
 libdbdpgsql.so/libdbmysql.so/libdbdsqlite.so and mark the port as broken 
 if the one required by the options is not there. It could provide a 
 meaningful error explaining that they need to recompile libdbi-drivers 
 with pgsql/mysql/sqlite support.
 
 something like
 .if !defined(WITHOUT_PGSQL)
 .if !exists(${LOCALBASE}/lib/libdbdpgsql.so)
 #if we get here, then the ports system should have already installed 
 libdbi-drivers, so it should be safe to assume the library is installed
 BROKEN= libdbi-drivers was not compiled with postgresql support, please 
 run 'make options' at libdbi-drivers and reinstall.
 .endif
 .endif
 
 The second part is still a valid fix, is it not? It adds the right 
 runtime dependency for the options specified, and if libdbi-drivers has 
 been compiled correctly, then the end result is a working port.
 
 Cheers
 Adrian
 
 On 12/10/2010 3:58 AM, delphij@FreeBSD.org wrote:
 > Synopsis: [PATCH] mail/postfix-gps: OPTIONS added for other databases
 >
 > State-Changed-From-To: open->feedback
 > State-Changed-By: delphij
 > State-Changed-When: Mon Oct 11 16:40:49 UTC 2010
 > State-Changed-Why:
 > Hi,
 >
 > I am aware of the problem but the proposed fix won't work,
 > unfortunately, since the C part of the daemon needs a
 > multiple database enabled libdbi-drivers package to work.
 >
 > Without the ability to depend on libdbi-drivers support,
 > the change you have proposed will only effective on the
 > perl maintainence part of the postfix-gps port.
 >
 > So I think I will have to close or mark this suspend if
 > we don't have better solutions :(
 >
 > http://www.freebsd.org/cgi/query-pr.cgi?pr=151388
 
 --------------090504080608070004020305
 Content-Type: text/html; charset=ISO-8859-1
 Content-Transfer-Encoding: 7bit
 
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
   <head>
     <meta content="text/html; charset=ISO-8859-1"
       http-equiv="Content-Type">
   </head>
   <body bgcolor="#ffffff" text="#000000">
     <font face="Arial">I guess from my point of view they are separate
       problems. The libdbi-drivers package is configured separately, and
       I ensure that I compile it with postgresql support. My
       understanding of the ports is that if a dependant port is not
       configured correctly</font>, then one needs enough understanding
     of the error message to find and recompile the dependant port. I
     just thought this was a limitation of the ports system. <br>
     <br>
     We could add a check to look for
     libdbdpgsql.so/libdbmysql.so/libdbdsqlite.so and mark the port as
     broken if the one required by the options is not there. It could
     provide a meaningful error explaining that they need to recompile <font
       face="Arial">libdbi-drivers with pgsql/mysql/sqlite support.</font><br>
     <br>
     something like<br>
     .if !defined(WITHOUT_PGSQL)<br>
     .if !exists(${LOCALBASE}/lib/libdbdpgsql.so)<br>
     #if we get here, then the ports system should have already installed
     <font face="Arial">libdbi-drivers, so it should be safe to assume
       the library is installed</font><br>
     BROKEN= <font face="Arial">libdbi-drivers was not compiled with
       postgresql support, please run 'make options' at </font><font
       face="Arial">libdbi-drivers and reinstall.</font><br>
     <font face="Arial">.endif<br>
       .endif<br>
       <br>
     </font>The second part is still a valid fix, is it not? It adds the
     right runtime dependency for the options specified, and if <font
       face="Arial">libdbi-drivers has been compiled correctly, then the
       end result is a working port.</font><br>
     <br>
     Cheers<br>
     Adrian<br>
     <br>
     On 12/10/2010 3:58 AM, <a class="moz-txt-link-abbreviated" href="mailto:delphij@FreeBSD.org">delphij@FreeBSD.org</a> wrote:
     <blockquote
       cite="mid:201010111658.o9BGwLhg004044@freefall.freebsd.org"
       type="cite">
       <pre wrap="">Synopsis: [PATCH] mail/postfix-gps: OPTIONS added for other databases
 
 State-Changed-From-To: open-&gt;feedback
 State-Changed-By: delphij
 State-Changed-When: Mon Oct 11 16:40:49 UTC 2010
 State-Changed-Why: 
 Hi,
 
 I am aware of the problem but the proposed fix won't work,
 unfortunately, since the C part of the daemon needs a
 multiple database enabled libdbi-drivers package to work.
 
 Without the ability to depend on libdbi-drivers support,
 the change you have proposed will only effective on the
 perl maintainence part of the postfix-gps port.
 
 So I think I will have to close or mark this suspend if
 we don't have better solutions :(
 
 <a class="moz-txt-link-freetext" href="http://www.freebsd.org/cgi/query-pr.cgi?pr=151388">http://www.freebsd.org/cgi/query-pr.cgi?pr=151388</a>
 </pre>
     </blockquote>
   </body>
 </html>
 
 --------------090504080608070004020305--
State-Changed-From-To: feedback->suspended 
State-Changed-By: delphij 
State-Changed-When: Sat Feb 19 13:36:39 UTC 2011 
State-Changed-Why:  
The proposed change does not work and this needs further work. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=151388 
State-Changed-From-To: suspended->closed 
State-Changed-By: miwi 
State-Changed-When: Fri Mar 18 10:14:10 UTC 2011 
State-Changed-Why:  
maintainer timeout over 6 months. 

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