ports/110651: Use USE_BDB infrastructure to select appropriate db[2-4] version with www/apache22 port

Timur I. Bakeyev timur at gnu.org
Thu Mar 22 01:40:03 UTC 2007


>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 at 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:



More information about the freebsd-ports-bugs mailing list