From owner-freebsd-ports@FreeBSD.ORG Tue Nov 15 21:53:44 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C0A1D16A420 for ; Tue, 15 Nov 2005 21:53:44 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from xproxy.gmail.com (xproxy.gmail.com [66.249.82.203]) by mx1.FreeBSD.org (Postfix) with ESMTP id 561DC43D69 for ; Tue, 15 Nov 2005 21:53:35 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by xproxy.gmail.com with SMTP id t12so20537wxc for ; Tue, 15 Nov 2005 13:53:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=QlrF0+dOI/44BPDDaszoL9gefNGb5tXf4fISTiqef7rJcJyZ/FnfcubPHL2DbyobWKnn5B9iVpFp6CxLi7H0TdbbO0rlax/YEVbORZAx7iiRFRZ9wJoWfIDgli9YuhvrhB1b/EGew10j23h5v62aMuvgpIdinXmX43PCFY0KMyE= Received: by 10.70.130.1 with SMTP id c1mr3168536wxd; Tue, 15 Nov 2005 12:03:55 -0800 (PST) Received: from ?192.168.1.10? ( [71.102.14.129]) by mx.gmail.com with ESMTP id h13sm2928463wxd.2005.11.15.12.03.54; Tue, 15 Nov 2005 12:03:55 -0800 (PST) From: "Michael C. Shultz" To: Scot Hetzel Date: Tue, 15 Nov 2005 11:54:31 -0800 User-Agent: KMail/1.8.3 References: <790a9fff0511151145p6203afc0u73bf2a68ac800d29@mail.gmail.com> In-Reply-To: <790a9fff0511151145p6203afc0u73bf2a68ac800d29@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511151154.32536.ringworm01@gmail.com> Cc: Craig Boston , Jiawei Ye , freebsd-ports@freebsd.org Subject: Re: Why does security/amavisd-new depend on db3? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Nov 2005 21:53:44 -0000 On Tuesday 15 November 2005 11:45, Scot Hetzel wrote: > On 11/15/05, Jiawei Ye wrote: > > On 11/15/05, Michael C. Shultz 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.