Subject: Re: specifying database options
To: Greg Troxel <>
From: Steven M. Bellovin <>
List: tech-pkg
Date: 12/19/2005 21:21:16
In message <>, Greg Troxel writes:
>"Steven M. Bellovin" <> writes:
>> I have set
>> 	PKG_OPTIONS.cucipop+=db
>> in mk.conf.  It complains, though, that "db4 is not an acceptable
>> Berkeley DB" when I do the build.
>So that line worked, in that cucipop turned on db support.
>> I worked around that by saying
>> 	_BDB_TYPE=db2 make
>> but that's ugly.  What's the right thing to put into mk.conf for this?  
>> RingTFM has not enlightened me.
>Did you try the following?
>$ more /usr/pkgsrc/mk/*
>But seriously, reading is helpful here (which I
>realize you probably did).  See in
>particular lines 78 and 82-86.  I'm not a bdb expert, but it looks
>like db[1234] can all be installed in parallel.  cucipop specifies
>that it needs db2, and then BDB_DEFAULT is db4.  So, I'd except
> to find the intersection of BDB_ACCEPTED and
>_BDB_PKGS, and somehow choose them in some preference order.  Instead,
>it chooses db4 as default, and then fails because db4 isn't in

Right, I read; that's where I learned about _BDB_TYPE.
I came the conclusion you came to -- the failure was intended by the 
>So it seems is broken, and that setting something in
>mk.conf isn't really a way around this.  But, it's quite likely I'm
>missing something here.  Reading the commit log for 1.11, it seems
>this behavior is intended.  Perhaps unsetting the db2 line in cucipop
>will enable it to build with db4.   What isn't clear to me is whether
>packages can reasonably insist on db2 but not db4, and if it really is
>possible to install things in parallel.  Did you already have db4
I have db4 installed.  My assumption, though, was that there was some 
reason to use db2 rather than db4 for this package, and I'd like to 
figure out the proper way to do that.  Perhaps set _BDB_TYPE in the 
cucipop Makefile?

		--Steven M. Bellovin,