It seems like Cyrus SASL 2.1.22 does not support Oracle/Sleepycat Software's Berkeley DB (BDB)
release 4.5. The supported releases seem to be BDB 4.4 and older.
The attached patch will make Cyrus SASL 2.1.22 detect and use BDB release 4.5.
I have done very little testing and make no guarantees, but feel free to use it as-is or modify it
as you like. The patch was made against ftp://ftp.andrew.cmu.edu/pub/cyrus/cyrus-sasl-2.1.22.tar.gz,
but I attach my shell script I used to create it in case you have a different release and want to
add BDB 4.5 support.
--
Geir A. Myrestrand
This is a patch for cyrus-sasl-2.1.22.tar.gz
to support Berkeley DB Release 4.5
from Oracle / Sleepycat Software.
--- cyrus-sasl-2.1.22/aclocal.m4 2006-05-18 15:30:08.000000000 -0400
+++ cyrus-sasl-2.1.22/aclocal.m4 2006-10-05 16:13:30.000000000 -0400
@@ -1691,7 +1691,7 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
AC_TRY_LINK([#include <db.h>],
--- cyrus-sasl-2.1.22/cmulocal/berkdb.m4 2005-04-26 15:14:07.000000000 -0400
+++ cyrus-sasl-2.1.22/cmulocal/berkdb.m4 2006-10-05 16:13:30.000000000 -0400
@@ -213,7 +213,7 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
AC_TRY_LINK([#include <db.h>],
--- cyrus-sasl-2.1.22/configure 2006-05-18 15:30:13.000000000 -0400
+++ cyrus-sasl-2.1.22/configure 2006-10-05 16:13:30.000000000 -0400
@@ -5125,7 +5125,7 @@ if test $ac_cv_header_db_h = yes; then
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
@@ -5882,7 +5882,7 @@ if test $ac_cv_header_db_h = yes; then
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
--- cyrus-sasl-2.1.22/saslauthd/aclocal.m4 2006-05-18 15:30:17.000000000 -0400
+++ cyrus-sasl-2.1.22/saslauthd/aclocal.m4 2006-10-05 16:13:30.000000000 -0400
@@ -2016,7 +2016,7 @@ AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB],
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
AC_TRY_LINK([#include <db.h>],
--- cyrus-sasl-2.1.22/saslauthd/configure 2006-05-18 15:30:20.000000000 -0400
+++ cyrus-sasl-2.1.22/saslauthd/configure 2006-10-05 16:13:30.000000000 -0400
@@ -8010,7 +8010,7 @@ if test $ac_cv_header_db_h = yes; then
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
@@ -8767,7 +8767,7 @@ if test $ac_cv_header_db_h = yes; then
fi
saved_LIBS=$LIBS
- for dbname in db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
+ for dbname in db-4.5 db4.5 db45 db-4.4 db4.4 db44 db-4.3 db4.3 db43 db-4.2 db4.2 db42 db-4.1 db4.1 db41 db-4.0 db4.0 db-4 db40 db4 db-3.3 db3.3 db33 db-3.2 db3.2 db32 db-3.1 db3.1 db31 db-3 db30 db3 db
do
LIBS="$saved_LIBS -l$dbname"
cat >conftest.$ac_ext <<_ACEOF
#!/bin/sh
AWK=/bin/awk
DIFF='/usr/bin/diff -Napru'
GREP=/bin/grep
RM=/bin/rm
SED=/bin/sed
SORT=/bin/sort
TAR=/bin/tar
UNIQ=/usr/bin/uniq
WGET=/usr/bin/wget
SASL=cyrus-sasl-2.1.22
# Download and extract Cyrus SASL (remove comment character to execute this portion)
#${WGET} ftp://ftp.andrew.cmu.edu/pub/cyrus/${SASL}.tar.gz
#if [ $? -ne 0 ]; then
# echo "ERROR: Failed to download Cyrus SASL!"
# exit 1
#fi
# Verify that Cyrus SASL is available in current directory
if [ ! -f ${SASL}.tar.gz ]; then
echo "ERROR: The file ${SASL}.tar.gz is missing"
exit 1
fi
# Clean up previously extracted directory
if [ ! -d ${SASL} ]; then
${RM} -rf ${SASL}
if [ $? -ne 0 ]; then
echo "ERROR: Failed to remove ${SASL} directory"
exit 2
fi
fi
# Extract Cyrus SASL
${TAR} zxf ${SASL}.tar.gz
if [ $? -ne 0 ]; then
echo "ERROR: Failed to extract Cyrus SASL!"
exit 3
fi
# Find all files that has to be updated
FILES2MODIFY=`${GREP} -R "for dbname in db-4.4" ${SASL}/* | ${AWK} -F: '{ print $1 }' | ${SORT} | ${UNIQ}`
if [ "${FILES2MODIFY}" = "" ]; then
echo "INFO: Looks like this Cyrus SASL package support Berkeley DB 4.5"
exit 0
fi
${SED} --in-place=".original" -e 's/for dbname in db-4\.4/for dbname in db-4.5 db4.5 db45 db-4.4/g' ${FILES2MODIFY}
if [ $? -ne 0 ]; then
echo "ERROR: Failed to update files with support for Berkeley DB 4.5"
echo "${FILES2MODIFY}"
exit 4
fi
echo "This is a patch for ${SASL}.tar.gz"
echo "to support Berkeley DB Release 4.5"
echo "from Oracle / Sleepycat Software."
for FILE in ${FILES2MODIFY}; do
${DIFF} ${FILE}.original ${FILE} | ${SED} 's/\.original//g'
if [ $? -ne 0 ]; then
echo "ERROR: Failed to generate diff between ${FILE}.original and ${FILE}"
exit 5
fi
done
# Clean up
${RM} -rf ${SASL}
exit 0