ports/115153: ports/sysutils/cfengine patch for bdb <= 4.3

Eygene Ryabinkin rea-fbsd at codelabs.ru
Thu Aug 2 18:10:13 UTC 2007


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



More information about the freebsd-ports-bugs mailing list