From owner-freebsd-ports-bugs@FreeBSD.ORG Wed Dec 4 21:30:01 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 238DB669 for ; Wed, 4 Dec 2013 21:30:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id EF9381290 for ; Wed, 4 Dec 2013 21:30:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rB4LU03P045860 for ; Wed, 4 Dec 2013 21:30:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rB4LU0QP045859; Wed, 4 Dec 2013 21:30:00 GMT (envelope-from gnats) Resent-Date: Wed, 4 Dec 2013 21:30:00 GMT Resent-Message-Id: <201312042130.rB4LU0QP045859@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Christopher K Davis Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D2C615DF for ; Wed, 4 Dec 2013 21:26:16 +0000 (UTC) Received: from sergyar.ckdhr.com (sergyar.ckdhr.com [66.92.89.27]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 741361263 for ; Wed, 4 Dec 2013 21:26:16 +0000 (UTC) Received: from localhost (localhost.ckdhr.com [127.0.0.1]) by sergyar.ckdhr.com (Postfix) with ESMTP id B7E90D4123 for ; Wed, 4 Dec 2013 16:17:42 -0500 (EST) Received: from sergyar.ckdhr.com ([127.0.0.1]) by localhost (sergyar.ckdhr.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id yb-pl6uMIlu1 for ; Wed, 4 Dec 2013 16:17:41 -0500 (EST) Received: by sergyar.ckdhr.com (Postfix, from userid 1001) id 563B9D4121; Wed, 4 Dec 2013 16:17:41 -0500 (EST) Message-Id: <20131204211741.563B9D4121@sergyar.ckdhr.com> Date: Wed, 4 Dec 2013 16:17:41 -0500 (EST) From: Christopher K Davis To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/184503: [patch] mail/policyd2 port assumes MySQL for web UI, requires web UI X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: Christopher K Davis List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Dec 2013 21:30:01 -0000 >Number: 184503 >Category: ports >Synopsis: [patch] mail/policyd2 port assumes MySQL for web UI, requires web UI >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: Wed Dec 04 21:30:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Christopher K Davis >Release: FreeBSD 9.2-RELEASE amd64 >Organization: Google Inc. >Environment: System: FreeBSD escobar.ckdhr.com 9.2-RELEASE FreeBSD 9.2-RELEASE #0 r255898: Thu Sep 26 22:50:31 UTC 2013 root@bake.isc.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: The mail/policyd2 port unconditionally sets USE_PHP to use pdo_mysql even if PORT_OPTIONS doesn't include MYSQL. This will make the PHP web UI nonfunctional if an alternate database is used. In addition, it always installs the PHP-based web UI rather than making doing so a configuration option. >How-To-Repeat: Install mail/policyd2 with MYSQL unset in the port config. >Fix: Attached patch makes two changes: 1. Adds a WEBUI configuration option to bsd.options.desc.mk for use by this port as well as by any future ports that include an optional web-based user interface component. 2. Uses the WEBUI configuration option as well as the chosen database(s) to install the appropriate PHP database module(s) if the web UI is desired. --- Mk/bsd.options.desc.mk~ 2013-09-07 08:08:39.000000000 -0400 +++ Mk/bsd.options.desc.mk 2013-09-09 20:53:52.000000000 -0400 @@ -447,6 +447,7 @@ WEBKIT_DESC?= WebKit support WEBP_DESC?= WebP image format support WEBSERVER_DESC?= Build and/or install internal web server +WEBUI_DESC?= Build and/or install web user interface WMA_DESC?= Windows Media Audio support WMF_DESC?= Windows Metafile support WXGTK_DESC?= wxGTK GUI toolkit support --- mail/policyd2/Makefile.orig 2012-11-17 00:59:10.000000000 -0500 +++ mail/policyd2/Makefile 2013-09-09 20:00:18.000000000 -0400 @@ -1,7 +1,4 @@ -# New ports collection makefile for: policyd2 -# Date created: 2 December 2008 -# Whom: Chifeng QU -# +# Created by: Chifeng QU # $FreeBSD: ports/mail/policyd2/Makefile,v 1.17 2012/11/17 05:59:10 svnexp Exp $ # @@ -20,7 +17,6 @@ p5-Cache-FastMmap>=0:${PORTSDIR}/devel/p5-Cache-FastMmap USE_PERL5= yes -USE_PHP= yes NO_BUILD= yes USE_RC_SUBR= policyd2 BINMODE= 0755 @@ -30,20 +26,28 @@ PORTDOCS= AUTHORS ChangeLog INSTALL TODO WISHLIST PORTDATA= * -OPTIONS_DEFINE= MYSQL PGSQL SQLITE -OPTIONS_DEFAULT= MYSQL +OPTIONS_DEFINE= MYSQL PGSQL SQLITE WEBUI +OPTIONS_DEFAULT= MYSQL WEBUI .include -USE_PHP= pdo_mysql .if ${PORT_OPTIONS:MMYSQL} RUN_DEPENDS+= p5-DBD-mysql>=0:${PORTSDIR}/databases/p5-DBD-mysql -.endif +.if ${PORT_OPTIONS:MWEBUI} +USE_PHP= pdo_mysql +.endif # MYSQL && WEBUI +.endif # MYSQL .if ${PORT_OPTIONS:MSQLITE} RUN_DEPENDS+= p5-DBD-SQLite>=0:${PORTSDIR}/databases/p5-DBD-SQLite -.endif +.if ${PORT_OPTIONS:MWEBUI} +USE_PHP= pdo_sqlite +.endif # SQLITE && WEBUI +.endif # SQLITE .if ${PORT_OPTIONS:MPGSQL} RUN_DEPENDS+= p5-DBD-Pg>=0:${PORTSDIR}/databases/p5-DBD-Pg -.endif +.if ${PORT_OPTIONS:MWEBUI} +USE_PHP= pdo_pgsql +.endif # PGSQL && WEBUI +.endif # PGSQL post-patch: @${REINPLACE_CMD} 's|/etc|${PREFIX}/etc|' ${WRKSRC}/cbpadmin \ >Release-Note: >Audit-Trail: >Unformatted: