Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Jan 2014 15:43:37 GMT
From:      Eero Hanninen <fax@nohik.ee>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/185446: Can't build mail/postfix against databases/db6 (berkeley db 6)
Message-ID:  <201401031543.s03FhbuH092106@oldred.freebsd.org>
Resent-Message-ID: <201401031550.s03Fo0j6044420@freefall.freebsd.org>

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

>Number:         185446
>Category:       ports
>Synopsis:       Can't build mail/postfix against databases/db6 (berkeley db 6)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 03 15:50:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator:     Eero Hanninen
>Release:        10.0-RC4
>Organization:
>Environment:
FreeBSD vussvillem.nohik.ee 10.0-RC4 FreeBSD 10.0-RC4 #0 r260130: Tue Dec 31 17:10:01 UTC 2013     root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC  amd64

>Description:
When build mail/postfix (current version 2.10.2) package from source against Berkeley DB ver 6, then build just fails with postfix source code error Unknown Berkeley DB version.
>How-To-Repeat:
change default Berkeley DB version to 6 in make.conf
echo "WITH_BDB_VER=6" >> /etc/make.conf

make -C /usr/ports/mail/postfix/Makefile install clean
>Fix:
There is two fix in my mind:

1. Wait when BDB 6 support officially become available in postfix and till that check default BDB version in mail/postfix port Makefile and if its greater than 5 then give error.

2. Add little patch to postfix port to support unofficially bdb ver 6:

--- src/util/dict_db.c.orig	2014-01-03 17:01:52.189273146 +0200
+++ src/util/dict_db.c	2014-01-03 17:05:07.000258437 +0200
@@ -693,7 +693,7 @@
 	msg_fatal("set DB cache size %d: %m", dict_db_cache_size);
     if (type == DB_HASH && db->set_h_nelem(db, DICT_DB_NELM) != 0)
 	msg_fatal("set DB hash element count %d: %m", DICT_DB_NELM);
-#if DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
+#if DB_VERSION_MAJOR == 6 || DB_VERSION_MAJOR == 5 || (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR > 0)
     if ((errno = db->open(db, 0, db_path, 0, type, db_flags, 0644)) != 0)
 	FREE_RETURN(dict_surrogate(class, path, open_flags, dict_flags,
 				   "open database %s: %m", db_path));


>Release-Note:
>Audit-Trail:
>Unformatted:



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