Package: cyrus-sasl2
Severity: normal

tags 621437 +patch
thank you

Hi,

it looks like there is no berkeley db version specific code (and the
package doesn't use Berkeley DB transactional environment) and the
package links to db5.1 just fine.

Please apply attached patches and upload a new version.

This will allow future library transitions and binNMUs without your
manual intervention.

Patches:

1. Patch to update debian/control to allow linking generic -ldb

2. Patch to support DB_VERSION_MAJOR >= 5 (quilt patch)

O.

-- System Information:
Debian Release: squeeze/sid
  APT prefers maverick-updates
  APT policy: (500, 'maverick-updates'), (500, 'maverick-security'), (500, 
'maverick-proposed'), (500, 'maverick-backports'), (500, 'maverick')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.35-28-generic (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff --git a/debian/control b/debian/control
index 9a66a7e..f61dd67 100644
--- a/debian/control
+++ b/debian/control
@@ -4,7 +4,7 @@ Priority: standard
 Maintainer: Debian Cyrus SASL Team <[email protected]>
 Uploaders: Fabian Fagerholm <[email protected]>, Roberto C. Sanchez <[email protected]>
 Standards-Version: 3.9.1
-Build-Depends: debhelper (>= 5.0.0), quilt (>= 0.40), autotools-dev, automake1.9, autoconf, libtool, libdb4.8-dev, libpam0g-dev (>= 0.76-22), libssl-dev (>= 0.9.7e-3), libmysqlclient-dev | libmysqlclient15-dev (>= 5.0.20), libopie-dev (>= 2.32-10), libpq-dev (>= 8.1.3-4), heimdal-multidev, krb5-multidev, libsqlite0-dev (>= 2.8.16), libldap2-dev (>= 2.1.30-8), chrpath, groff-base, debconf (>= 0.5) | debconf-2.0, po-debconf, docbook-to-man, hardening-wrapper
+Build-Depends: debhelper (>= 5.0.0), quilt (>= 0.40), autotools-dev, automake1.9, autoconf, libtool, libdb-dev, libpam0g-dev (>= 0.76-22), libssl-dev (>= 0.9.7e-3), libmysqlclient-dev | libmysqlclient15-dev (>= 5.0.20), libopie-dev (>= 2.32-10), libpq-dev (>= 8.1.3-4), heimdal-multidev, krb5-multidev, libsqlite0-dev (>= 2.8.16), libldap2-dev (>= 2.1.30-8), chrpath, groff-base, debconf (>= 0.5) | debconf-2.0, po-debconf, docbook-to-man, hardening-wrapper
 Build-Conflicts: heimdal-dev
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/
 Vcs-Svn: svn://svn.debian.org/svn/pkg-cyrus-sasl2/cyrus-sasl-2.1/trunk/
diff --git a/debian/patches/0027_db5_support.diff b/debian/patches/0027_db5_support.diff
new file mode 100644
index 0000000..ff831cd
--- /dev/null
+++ b/debian/patches/0027_db5_support.diff
@@ -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/debian/patches/series b/debian/patches/series
index fec6f1f..6b1c4a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -21,3 +21,4 @@
 0024_allow_detection_of_heimdal.diff
 0025_ld_as_needed.diff
 0026_drop_krb5support_dependency.diff
+0027_db5_support.diff

Reply via email to