From 6f3490c81fcdeb8eee479201e56e65633de0a493 Mon Sep 17 00:00:00 2001 From: Jan F. Chadima Date: Jul 25 2011 17:16:58 +0000 Subject: Add support for berkeley db 5 --- diff --git a/cyrus-sasl-2.1.23-db5.patch b/cyrus-sasl-2.1.23-db5.patch new file mode 100644 index 0000000..ff831cd --- /dev/null +++ b/cyrus-sasl-2.1.23-db5.patch @@ -0,0 +1,22 @@ +--- a/sasldb/db_berkeley.c ++++ b/sasldb/db_berkeley.c +@@ -100,7 +100,7 @@ static int berkeleydb_open(const sasl_ut + ret = db_create(mbdb, NULL, 0); + if (ret == 0 && *mbdb != NULL) + { +-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 ++#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) + ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, flags, 0660); + #else + ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, flags, 0660); +--- a/utils/dbconverter-2.c ++++ b/utils/dbconverter-2.c +@@ -214,7 +214,7 @@ static int berkeleydb_open(const char *p + ret = db_create(mbdb, NULL, 0); + if (ret == 0 && *mbdb != NULL) + { +-#if DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 ++#if (DB_VERSION_MAJOR > 4) || ((DB_VERSION_MAJOR == 4) && (DB_VERSION_MINOR >= 1)) + ret = (*mbdb)->open(*mbdb, NULL, path, NULL, DB_HASH, DB_CREATE, 0664); + #else + ret = (*mbdb)->open(*mbdb, path, NULL, DB_HASH, DB_CREATE, 0664); diff --git a/cyrus-sasl.spec b/cyrus-sasl.spec index 8ce5f43..1c6c292 100644 --- a/cyrus-sasl.spec +++ b/cyrus-sasl.spec @@ -8,7 +8,7 @@ Summary: The Cyrus SASL library Name: cyrus-sasl Version: 2.1.23 -Release: 23%{?dist} +Release: 24%{?dist} License: BSD with advertising Group: System Environment/Libraries # Source0 originally comes from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/; @@ -43,6 +43,7 @@ Patch37: cyrus-sasl-2.1.23-race.patch Patch38: cyrus-sasl-2.1.23-pam_rhosts.patch Patch39: cyrus-sasl-2.1.23-ntlm.patch Patch40: cyrus-sasl-2.1.23-rimap2.patch +Patch41: cyrus-sasl-2.1.23-db5.patch Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf, automake, libtool, gdbm-devel, groff @@ -178,6 +179,7 @@ chmod -x include/*.h %patch38 -p1 -b .pam_rhosts %patch39 -p1 -b .ntlm %patch40 -p1 -b .rimap2 +%patch41 -p1 -b .db5 %build # FIXME - we remove these files directly so that we can avoid using the -f @@ -430,6 +432,9 @@ exit 0 /etc/rc.d/init.d/saslauthd %changelog +* Mon Jul 25 2011 Jan F. Chadima - 2.1.23-24 +- Add support for berkeley db 5 + * Wed Jun 29 2011 Jan F. Chadima - 2.1.23-23 - Migrate the package to full native systemd unit files, according to the Fedora packaging guidelines.