Skip site navigation (1)Skip section navigation (2)
Date:      Thu,  2 Aug 2007 21:52:19 +0400 (MSD)
From:      Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        sergei@FreeBSD.org
Subject:   ports/115153: ports/sysutils/cfengine patch for bdb <= 4.3
Message-ID:  <20070802175219.194AD1AF419@void.codelabs.ru>
Resent-Message-ID: <200708021810.l72IAC8x042003@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070802175219.194AD1AF419>