From odip@bionet.nsc.ru  Fri Apr  6 06:25:58 2007
Return-Path: <odip@bionet.nsc.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id C3EFC16A401
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  6 Apr 2007 06:25:58 +0000 (UTC)
	(envelope-from odip@bionet.nsc.ru)
Received: from manticore.bionet.nsc.ru (manticore.bionet.nsc.ru [84.237.118.164])
	by mx1.freebsd.org (Postfix) with SMTP id AA7AD13C43E
	for <FreeBSD-gnats-submit@freebsd.org>; Fri,  6 Apr 2007 06:25:51 +0000 (UTC)
	(envelope-from odip@bionet.nsc.ru)
Received: by manticore.bionet.nsc.ru (Postfix, from userid 1001)
	id 0DD96218DF; Fri,  6 Apr 2007 13:25:42 +0700 (NOVST)
Message-Id: <20070406062542.0DD96218DF@manticore.bionet.nsc.ru>
Date: Fri,  6 Apr 2007 13:25:42 +0700 (NOVST)
From: Dmitry A Grigorovich <odip@bionet.nsc.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [PATCH] ftp/proftpd can't build with both mysql and postgresql
X-Send-Pr-Version: 3.113
X-GNATS-Notify: beech@alaskaparadise.com

>Number:         111307
>Category:       ports
>Synopsis:       [PATCH] ftp/proftpd can't build with both mysql and postgresql
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    sat
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Apr 06 06:30:06 GMT 2007
>Closed-Date:    Fri Apr 06 09:59:49 GMT 2007
>Last-Modified:  Fri Apr  6 10:00:10 GMT 2007
>Originator:     Dmitry A Grigorovich
>Release:        FreeBSD 6.2-RELEASE-p3 i386
>Organization:
ICiG SB RAS, Russia
>Environment:
FreeBSD monk.bionet.nsc.ru 6.2-RELEASE-p3 FreeBSD 6.2-RELEASE-p3

>Description:

ftp/proftpd can't build when both options selected: MYSQL and POSTGRESQL

FreeBSD port generate following list of proftpd modules:
  mod_ratio:mod_readme:mod_rewrite:mod_wrap2:mod_sql:mod_sql_mysql:
  mod_sql:mod_sql_postgres:mod_ifsession

But configure from proftpd don't allow using mod_sql twice - it's abort !

>How-To-Repeat:

cd /usr/ports/ftp/proftpd
make rmconfig # default config
make config
# Select both MYSQL and POSTGRESQL !
make configure

Output:

root@monk# cd /usr/ports/ftp/proftpd
root@monk# make configure
===>  Found saved configuration for proftpd-1.3.1.r2_3
===>  Extracting for proftpd-1.3.1.r2_3
=> MD5 Checksum OK for proftpd-1.3.1rc2.tar.bz2.
=> SHA256 Checksum OK for proftpd-1.3.1rc2.tar.bz2.
===>  Patching for proftpd-1.3.1.r2_3
===>  Applying FreeBSD patches for proftpd-1.3.1.r2_3
===>   proftpd-1.3.1.r2_3 depends on executable in : gmake - found
===>   proftpd-1.3.1.r2_3 depends on file: /usr/local/bin/autoconf259 - found
===>   proftpd-1.3.1.r2_3 depends on shared library: mysqlclient.15 - found
===>   proftpd-1.3.1.r2_3 depends on shared library: pq.4 - found
===>  Configuring for proftpd-1.3.1.r2_3
==> Configuring with mod_ratio:mod_readme:mod_rewrite:mod_wrap2:mod_sql:mod_sql_mysql:mod_sql:mod_sql_postgres:mod_ifsession
configure: WARNING: you should use --build, --host, --target
...
...
...
checking whether printf supports %llu format... yes
checking for default transfer buffer sizes... 32768
checking checking for duplicate module requests... yes
configure: error: duplicate build request for mod_sql -- aborting
===>  Script "configure" failed unexpectedly.
Please report the problem to beech@alaskaparadise.com [maintainer] and attach
the "/usr/ports/ftp/proftpd/work/proftpd-1.3.1rc2/config.log" including the
output of the failure of your make command. Also, it might be a good idea to
provide an overview of all packages installed on your system (e.g. an s
/var/db/pkg).
*** Error code 1

Stop in /usr/ports/ftp/proftpd.
*** Error code 1

Stop in /usr/ports/ftp/proftpd.

>Fix:

Apply following patch
Reinstall ftp/proftpd

In fix we are avoid duplication mod_sql in ${MODULES}

--- patch-proftpd begins here ---
diff -urN proftpd/Makefile proftpd.new/Makefile
--- proftpd/Makefile	Sun Mar 25 08:33:59 2007
+++ proftpd.new/Makefile	Fri Apr  6 13:09:04 2007
@@ -65,6 +65,7 @@
 		CODECONV "Use charset conversion (mod_codeconv)" off
 
 MODULES?=
+MODULE_MOD_SQL?=
 LIBDIRS?=
 INCLUDEDIRS?=
 
@@ -155,7 +156,8 @@
 
 .if defined(WITH_MYSQL)
 USE_MYSQL=	yes
-MODULES:=${MODULES}:mod_sql:mod_sql_mysql
+MODULES:=${MODULES}:mod_sql_mysql
+MODULE_MOD_SQL:=mod_sql
 INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include:${LOCALBASE}/include/mysql
 LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib/mysql
 PLIST_SUB+=	MYSQL=""
@@ -165,7 +167,8 @@
 
 .if defined(WITH_POSTGRESQL)
 USE_PGSQL=	yes
-MODULES:=${MODULES}:mod_sql:mod_sql_postgres
+MODULES:=${MODULES}:mod_sql_postgres
+MODULE_MOD_SQL:=mod_sql
 INCLUDEDIRS:=${INCLUDEDIRS}:${LOCALBASE}/include
 LIBDIRS:=${LIBDIRS}:${LOCALBASE}/lib
 .endif
@@ -213,6 +216,9 @@
 
 # Keep this here below, in case similar constructs need to be made
 CONFIGURE_ENV+=	"LIBS=${PROFTPD_LIBS}"
+
+# Avoid duplication for mod_sql
+MODULES:=${MODULES}:${MODULE_MOD_SQL}
 
 .if !empty(MODULES)
 CONFIGURE_ARGS+=	--with-modules=${MODULES}
--- patch-proftpd ends here ---


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Fri Apr 6 06:30:28 UTC 2007 
State-Changed-Why:  
Awaiting maintainers feedback 

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

From: Beech Rintoul <beech@alaskaparadise.com>
To: bug-followup@freebsd.org
Cc: Andrew Pantyukhin <infofarmer@freebsd.org>,
 Edwin Groothuis <edwin@freebsd.org>
Subject: ports/111307: [PATCH] ftp/proftpd can't build with both mysql and postgresql
Date: Thu, 5 Apr 2007 23:27:52 -0800

 Patch approved.
 
 Please assign to sat@
 
 Beech Rintoul (Maintainer)
 -- 
 ---------------------------------------------------------------------------------------
 Beech Rintoul - Port Maintainer - beech@alaskaparadise.com
 /"\   ASCII Ribbon Campaign  | FreeBSD Since 4.x
 \ / - NO HTML/RTF in e-mail   | http://www.freebsd.org
  X  - NO Word docs in e-mail | Latest Release:
 / \  - http://www.freebsd.org/releases/6.2R/announce.html
 ---------------------------------------------------------------------------------------
 
 
 
Responsible-Changed-From-To: freebsd-ports-bugs->sat 
Responsible-Changed-By: sat 
Responsible-Changed-When: Fri Apr 6 07:45:05 UTC 2007 
Responsible-Changed-Why:  
Eat. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111307 
State-Changed-From-To: feedback->open 
State-Changed-By: edwin 
State-Changed-When: Fri Apr 6 07:57:59 UTC 2007 
State-Changed-Why:  
maintainer approved 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111307 
State-Changed-From-To: open->closed 
State-Changed-By: sat 
State-Changed-When: Fri Apr 6 09:59:33 UTC 2007 
State-Changed-Why:  
Committed, thanks! 

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

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/111307: commit references a PR
Date: Fri,  6 Apr 2007 09:59:29 +0000 (UTC)

 sat         2007-04-06 09:59:20 UTC
 
   FreeBSD ports repository
 
   Modified files:
     ftp/proftpd          Makefile 
   Log:
   - Allow support for MYSQL and PGSQL to be selected simultaneously
   
   PR:             ports/111307 (based on)
   Submitted by:   Dmitry A Grigorovich <odip@bionet.nsc.ru>
   Approved by:    Beech Rintoul <beech@alaskaparadise.com> (maintainer)
   
   Revision  Changes    Path
   1.106     +9 -5      ports/ftp/proftpd/Makefile
 _______________________________________________
 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"
 
>Unformatted:
