From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Mar 22 01:40:03 2007 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AA6916A4E0 for ; Thu, 22 Mar 2007 01:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 3D9F213C4BA for ; Thu, 22 Mar 2007 01:40:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l2M1e3Ul011294 for ; Thu, 22 Mar 2007 01:40:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l2M1e3bw011292; Thu, 22 Mar 2007 01:40:03 GMT (envelope-from gnats) Resent-Date: Thu, 22 Mar 2007 01:40:03 GMT Resent-Message-Id: <200703220140.l2M1e3bw011292@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, "Timur I. Bakeyev" Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4402816A413 for ; Thu, 22 Mar 2007 01:31:54 +0000 (UTC) (envelope-from timur@gnu.org) Received: from mail.bat.ru (dzokonda.xs4all.nl [194.109.164.75]) by mx1.freebsd.org (Postfix) with ESMTP id 850F513C4C3 for ; Thu, 22 Mar 2007 01:31:53 +0000 (UTC) (envelope-from timur@gnu.org) Received: from timur.home.bat.ru (account timur [192.168.0.4] verified) by mail.bat.ru (CommuniGate Pro SMTP 4.2.7) with ESMTP id 244464 for FreeBSD-gnats-submit@freebsd.org; Thu, 22 Mar 2007 02:32:41 +0100 Message-Id: <1174527112.48883@timur.home.bat.ru> Date: Thu, 22 Mar 2007 02:31:52 +0100 From: "Timur I. Bakeyev" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.6 Cc: Subject: ports/110651: Use USE_BDB infrastructure to select appropriate db[2-4] version with www/apache22 port X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Mar 2007 01:40:03 -0000 >Number: 110651 >Category: ports >Synopsis: Use USE_BDB infrastructure to select appropriate db[2-4] version with www/apache22 port >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Mar 22 01:40:02 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Timur I. Bakeyev >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: >Environment: System: FreeBSD 6.2-PRERELEASE #1: Fri Oct 27 01:16:38 CEST 2006 root@timur.home.bat.ru:/usr/src/sys/i386/compile/COMMON >Description: Apache 2.2(and 2.[01] also) can use BerkleyDB 2-4 as a storage data backend. At the moment version of the database is selected with separate switch and contains quite complex logic for finding appropriate libraries and headers. Moreover, it's not always up-to-date with the latest BerkleyDB versions - it took quite a while to add db44 support for example. Also, if port configuration is stored in make.conf or pkgtools.conf it's easy to forget about dependency on DBD in case of upgrade to a newer version, so it's potential source of multiple installations of BerkleyDB in the system, which isn't goot for maintaince. So, to eliminate all that issues I suggest to use more standard USE_BDB knob to select appropriate version of BerkleyDB with all it's benefits, like usage of the highest available version automatically, set up paths and dependencies and global selection of the version to use. Here I propose a patch, that do all this. It was tested in my environment and worked ok. One note - USE_BDB knob doesn't cover usage of legacy db185, so a separate know for it still have to remain. >How-To-Repeat: >Fix: --- Makefile.modules.diff begins here --- --- Makefile.modules.orig Wed Jan 24 11:22:16 2007 +++ Makefile.modules Wed Jan 24 13:03:55 2007 @@ -64,36 +64,11 @@ . if ${WITH_BERKELEYDB} == "FreeBSD" CONFIGURE_ARGS+= --with-dbm=db185 \ --with-berkeley-db=/usr -. elif ${WITH_BERKELEYDB} == "db2" -LIB_DEPENDS+= db2:${PORTSDIR}/databases/db2 -CONFIGURE_ARGS+= --with-dbm=db2 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db3" -LIB_DEPENDS+= db3:${PORTSDIR}/databases/db3 -CONFIGURE_ARGS+= --with-dbm=db3 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db4" -LIB_DEPENDS+= db4:${PORTSDIR}/databases/db4 -CONFIGURE_ARGS+= --with-dbm=db4 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db41" -LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 -CONFIGURE_ARGS+= --with-dbm=db41 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db42" -LIB_DEPENDS+= db-4.2:${PORTSDIR}/databases/db42 -CONFIGURE_ARGS+= --with-dbm=db42 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db42 -. elif ${WITH_BERKELEYDB} == "db43" -LIB_DEPENDS+= db-4.3:${PORTSDIR}/databases/db43 -CONFIGURE_ARGS+= --with-dbm=db43 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db43 -. elif ${WITH_BERKELEYDB} == "db44" -LIB_DEPENDS+= db-4.4:${PORTSDIR}/databases/db44 -CONFIGURE_ARGS+= --with-dbm=db44 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db44 . else -IGNORE= "Unknown Berkeley DB version" +USE_BDB= YES +CONFIGURE_ARGS+= --with-dbm=db${BDB_VER} \ + --with-berkeley-db=${BDB_INCLUDE_DIR}:${BDB_LIB_DIR} +#IGNORE= "Unknown Berkeley DB version" . endif . else IGNORE= "Unknown DBM" --- Makefile.modules.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: