From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Aug 2 18:10:13 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28B4F16A469 for ; Thu, 2 Aug 2007 18:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0E713C4E1 for ; Thu, 2 Aug 2007 18:10:13 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.1/8.14.1) with ESMTP id l72IACa3042004 for ; Thu, 2 Aug 2007 18:10:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.1/8.14.1/Submit) id l72IAC8x042003; Thu, 2 Aug 2007 18:10:12 GMT (envelope-from gnats) Resent-Date: Thu, 2 Aug 2007 18:10:12 GMT Resent-Message-Id: <200708021810.l72IAC8x042003@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Eygene Ryabinkin Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2443716A418; Thu, 2 Aug 2007 18:09:15 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from pobox.codelabs.ru (pobox.codelabs.ru [144.206.177.45]) by mx1.freebsd.org (Postfix) with ESMTP id CEE0813C468; Thu, 2 Aug 2007 18:09:14 +0000 (UTC) (envelope-from rea-fbsd@codelabs.ru) Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25]) by pobox.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256) id 1IGeqR-0000oP-Kj; Thu, 02 Aug 2007 21:52:19 +0400 Message-Id: <20070802175219.194AD1AF419@void.codelabs.ru> Date: Thu, 2 Aug 2007 21:52:19 +0400 (MSD) From: Eygene Ryabinkin To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: sergei@FreeBSD.org Subject: ports/115153: ports/sysutils/cfengine patch for bdb <= 4.3 X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Eygene Ryabinkin List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Aug 2007 18:10:13 -0000 >Number: 115153 >Category: ports >Synopsis: ports/sysutils/cfengine patch for bdb <= 4.3 >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Aug 02 18:10:12 GMT 2007 >Closed-Date: >Last-Modified: >Originator: Eygene Ryabinkin >Release: FreeBSD 7.0-CURRENT i386 >Organization: Code Labs >Environment: System: FreeBSD XXX 7.0-CURRENT FreeBSD 7.0-CURRENT #8: Thu Jul 26 10:22:08 MSD 2007 root@XXX:/usr/obj/usr/src/sys/XXX i386 >Description: CFEngine 2.2.1 fails to build with BDB 4.3 due to two unspotted preprocessor branches on the CF_OLD_DB variable. >How-To-Repeat: Set WITH_BDB_VER=43 and try to build the port. >Fix: Apply the patch that follows. Please, note that src/instrument.c was already (eventually) corrected in the Subversion, see http://svn.iu.hio.no/viewvc/trunk/src/instrument.c?root=Cfengine-2&r1=401&r2=402 but src/cfshow.c was not patched yet. I had reported the issue to Mark Burgess and will post back when he will answer. --- src/instrument.c.orig Thu Aug 2 21:10:45 2007 +++ src/instrument.c Thu Aug 2 21:22:39 2007 @@ -62,7 +62,11 @@ return; } +#ifdef CF_OLD_DB +if ((errno = dbp->open(dbp,name,NULL,DB_BTREE,DB_CREATE,0644)) != 0) +#else if ((errno = dbp->open(dbp,NULL,name,NULL,DB_BTREE,DB_CREATE,0644)) != 0) +#endif { snprintf(OUTPUT,CF_BUFSIZE*2,"Couldn't open performance database %s\n",name); CfLog(cferror,OUTPUT,"db_open"); --- src/cfshow.c.orig Thu Aug 2 21:14:58 2007 +++ src/cfshow.c Thu Aug 2 21:22:46 2007 @@ -323,7 +323,11 @@ return; } +#ifdef CF_OLD_DB +if ((errno = dbp->open(dbp,name,NULL,DB_BTREE,DB_CREATE,0644)) != 0) +#else if ((errno = dbp->open(dbp,NULL,name,NULL,DB_BTREE,DB_CREATE,0644)) != 0) +#endif { printf("Couldn't open last-seen database %s\n",name); perror("db_open"); >Release-Note: >Audit-Trail: >Unformatted: