ports/89756: [patch] databases/ruby-bdb: WITH_BDB_VER not honoured resulting in incorrect library dependancy for Berkeley DB >= 4.2

Jarrod Sayers jarrod at netleader.com.au
Wed Nov 30 11:20:10 UTC 2005


>Number:         89756
>Category:       ports
>Synopsis:       [patch] databases/ruby-bdb: WITH_BDB_VER not honoured resulting in incorrect library dependancy for Berkeley DB >= 4.2
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 30 11:20:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Jarrod Sayers
>Release:        FreeBSD 4.11-RELEASE-p13 i386
>Organization:
>Environment:
System: FreeBSD wallace.netleader.com.au 4.11-RELEASE-p13 FreeBSD 4.11-RELEASE-p13 #16: Sat Nov 26 17:10:11 CST 2005 root at wallace.netleader.com.au:/usr/obj/usr/src/sys/WALLACE i386
>Description:
Some ports use the WITH_BDB_VER tunable to determine the version of the Berkeley DB
library to use.  With the databases/ruby-bdb port, this version is customisable, but
when WITH_BDB_VER is defined in /etc/make.conf for versions of Berkeley DB >= 4.2,
this results in an incorrect library dependancy.

The Makefile for this port attempts to detect the version of Berkeley DB to use by
looking for the WITH_BDB* and WITH_DB* tunables, but defaults back to WITH_BDB_VER
if no match was found.  Issue is that Berkeley DB >= 4.2 libraries are installed as
db-4.2, not as db41 as in previous versions resulting in a search for the specified
library, but by the wrong name, e.g., search is for db42.  This results in a port
that can't be installed as a core dependancy is installed, but never found.
>How-To-Repeat:
Jump into port:

wallace# cd /usr/ports/databases/ruby-bdb

Comment out all WITH_BDB*, WITH_DB* and WITH_BDB_VER tunables from /etc/make.conf to
test default:

wallace# make -V WITH_BDB_VER -V LIB_DEPENDS
4
db4:/usr/ports/databases/db4
wallace# 

Use WITH_DB42 tunable to force use of Berkeley DB 4.2:

wallace# make -V WITH_BDB_VER -V LIB_DEPENDS
42
db-4.2:/usr/ports/databases/db42
wallace# 

Remove WITH_DB42 and replace with WITH_BDB_VER=42:

wallace# make -V WITH_BDB_VER -V LIB_DEPENDS
42
db42:/usr/ports/databases/db42
wallace# 
>Fix:
Apply patch to test for WITH_BDB_VER with versions >= 4.2:
http://www.netleader.com.au/~jarrod/freebsd/databases-ruby-bdb-Makefile-with_bdb_ver.diff

--- ports/databases/ruby-bdb/Makefile.orig	Mon Nov 14 22:51:57 2005
+++ ports/databases/ruby-bdb/Makefile	Wed Nov 30 21:27:56 2005
@@ -28,10 +28,10 @@
 WITH_BDB_VER=	4
 .elif defined(WITH_BDB41) || defined(WITH_DB41)
 WITH_BDB_VER=	41
-.elif defined(WITH_BDB42) || defined(WITH_DB42)
+.elif defined(WITH_BDB42) || defined(WITH_DB42) || (defined(WITH_BDB_VER) && ${WITH_BDB_VER} == "42")
 WITH_BDB_VER=	42
 LIB_SUFFIX=	-4.2
-.elif defined(WITH_BDB43) || defined(WITH_DB43)
+.elif defined(WITH_BDB43) || defined(WITH_DB43) || (defined(WITH_BDB_VER) && ${WITH_BDB_VER} == "43")
 WITH_BDB_VER=	43
 LIB_SUFFIX=	-4.3
 .endif
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list