Why does security/amavisd-new depend on db3?

Michael C. Shultz ringworm01 at gmail.com
Tue Nov 15 13:53:44 PST 2005


On Tuesday 15 November 2005 11:45, Scot Hetzel wrote:
> On 11/15/05, Jiawei Ye <leafy7382 at gmail.com> wrote:
> > On 11/15/05, Michael C. Shultz <ringworm01 at gmail.com> wrote:
> > > The WITH_BDB_VER=42 only needs to be applied to
> > > databases/p5-BerkeleyDB,
> > >
> > > when "portmanager security/amavisd-new" is run ports will build in this
> > > order:
> > >
> > > ports/databases/db42                    before
> > > databases/p5-BerkeleyDB         before
> > > security/amavisd-new
> > >
> > > I'm sure there is a simple explanaition for the problem if Jiawei would
> > > only post something demonstrating how things are going wrong for him
> > > instead of merely describing what he thinks is happening.
> > >
> > > -Mike
> >
> > I am trying to, Mike. Now that xorg-clients has a RUN_DEPENDS on
> > xterm, which lists xorg-clients as CONFLICT adds a lot to the
> > frustration :(
>
> The problem is rather complex, as there are two problems:
>
> 1. When using portupgrade, or portmanager they don't check if a
> depending port require having a variable set that is defined in these
> tools configuration files before upgrading an existing port.

	Absolutly wrong, definitely for portmanager and likely for
	portupgrade.  The real problem is identified further down in this
	thread.
>
> The work arround for this is to add the variable to /etc/make.conf:
>
> .if ${.CURDIR} == /usr/ports/databases/p5-BerkleyDB
> WITH_BDB_VER?=42
> .endif

	Not nessesary. here is a sample portmanager output
	with the following in pm-020.conf 

	databases/p5-BerkeleyDB|WITH_BDB_VER=42|

	Notice specifically:

make fetch WITH_BDB_VER=42
make WITH_BDB_VER=42

	If make fetch/clean/install etc is run portmanager does
	apply WITH_BDB_VER=42, test for yourself before saying
	such things, please.

	-Mike


fetch p5-BerkeleyDB-0.27
MGPMrUpdate 0.3.5_1 command: #8 of 14  cd /usr/ports/databases/p5-BerkeleyDB; 
make fetch WITH_BDB_VER=42
------------------------------------------------------------------------
This port defaults to use Berkeley DB 3, but you can change it
by setting WITH_BDB_VER to either 2, 3, 4, 41, 42 or 43
===>  Vulnerability check disabled, database not found
------------------------------------------------------------------------
update p5-BerkeleyDB-0.27
MGPMrUpdate 0.3.5_1 command: #9 of 14  cd /usr/ports/databases/p5-BerkeleyDB; 
make WITH_BDB_VER=42
------------------------------------------------------------------------
This port defaults to use Berkeley DB 3, but you can change it
by setting WITH_BDB_VER to either 2, 3, 4, 41, 42 or 43
===>  Vulnerability check disabled, database not found
===>  Extracting for p5-BerkeleyDB-0.27
=> MD5 Checksum OK for BerkeleyDB-0.27.tar.gz.
=> No SHA256 checksum recorded for BerkeleyDB-0.27.tar.gz.
===>   p5-BerkeleyDB-0.27 depends on file: /usr/local/bin/perl5.8.7 - found
===>  Patching for p5-BerkeleyDB-0.27
===>   p5-BerkeleyDB-0.27 depends on file: /usr/local/bin/perl5.8.7 - found
/usr/local/bin/perl -pi -e '$_="" 
if /MAN3PODS/' /tmp/usr/ports.CURRENT/databases/p5-BerkeleyDB/work/BerkeleyDB-0.27/Makefile.PL
===>   p5-BerkeleyDB-0.27 depends on file: /usr/local/bin/perl5.8.7 - found
===>   p5-BerkeleyDB-0.27 depends on shared library: db-4.2.2 - found
===>  Configuring for p5-BerkeleyDB-0.27
Parsing config.in...
Looks Good.
Checking if your kit is complete...
Looks good
Writing Makefile for BerkeleyDB
===>  Building for p5-BerkeleyDB-0.27
cp BerkeleyDB.pm blib/lib/BerkeleyDB.pm
AutoSplitting blib/lib/BerkeleyDB.pm (blib/lib/auto/BerkeleyDB)
cp BerkeleyDB/Hash.pm blib/lib/BerkeleyDB/Hash.pm
cp BerkeleyDB.pod blib/lib/BerkeleyDB.pod
cp BerkeleyDB/Btree.pm blib/lib/BerkeleyDB/Btree.pm
/usr/local/bin/perl /usr/local/lib/perl5/5.8.7/ExtUtils/xsubpp -noprototypes 
-typemap /usr/local/lib/perl5/5.8.7/ExtUtils/typemap -typemap typemap  
BerkeleyDB.xs > BerkeleyDB.xsc && mv BerkeleyDB.xsc BerkeleyDB.c


	
>
> But this defeats the use of these tools configuration files.
>
> 2. Each port that includes Berkley Db adds the LIB_DEPENDS in their
> own special way.  This causes the port maintainers to have to update
> their ports when a new major version of Berkley DB is added to the
> ports collection.
>
> The fix for problem 2 is to change these ports to get it's Berkley DB
> dependancy from Mk/bsd.database.mk via the USE_BDB variable.  The
> USE_BDB variable checks to see which version of Berkley DB is
> installed, and set the dependancy on that version.  Currently, it is
> still left up to the port maintainer to set the path to the include
> dir, and the name of the library.  As well as to check if USE_BDB
> needs to be changed to the WITH_BDB_VER value.
>
> I have submitted PR 89023, which changes bsd.databases.mk to use the
> WITH_BDB_VER variable to set the desired Berkley DB to use, as well as
> to set the BDB_LIB_NAME and BDB_INCLUDE_DIR variables:
> http://www.freebsd.org/cgi/query-pr.cgi?pr=89023
>
> It also includes two example ports that use these changes.
>
> Scot
> --
> DISCLAIMER:
> No electrons were mamed while sending this message. Only slightly bruised.


More information about the freebsd-ports mailing list