don't second-guess BDB ABI
authorSteve Langasek <vorlon@debian.org>
Mon, 7 Sep 2020 16:47:28 +0000 (17:47 +0100)
committerRyan Tandy <ryan@nardis.ca>
Mon, 7 Sep 2020 16:47:28 +0000 (17:47 +0100)
Bug-Debian: http://bugs.debian.org/651333
Forwarded: not-needed

OpenLDAP upstream conservatively assumes that any change to the version
number of libdb can result in an API-breaking change that could impact
the database.  In Debian, we know that such changes require bumping the
library soname and changing the package name, and demand such rigor from
our package maintainers even when upstreams don't deliver; so any such
check in the source code works against the packaging system by forcing
database upgrades when we know none are required.  Disable this check
so we rely on the packaging system to do its job.

Gbp-Pq: Name no-bdb-ABI-second-guessing

servers/slapd/back-bdb/init.c

index 6c42d5441d832656a7b3b72d22db89e6eb7c6602..34b7982f726947e8b9cfafef1b6901c71c43a430 100644 (file)
@@ -768,7 +768,7 @@ bdb_back_initialize(
        bi->bi_controls = controls;
 
        {       /* version check */
-               int major, minor, patch, ver;
+               int major, minor, patch;
                char *version = db_version( &major, &minor, &patch );
 #ifdef HAVE_EBCDIC
                char v2[1024];
@@ -782,17 +782,6 @@ bdb_back_initialize(
                version = v2;
 #endif
 
-               ver = (major << 24) | (minor << 16) | patch;
-               if( ver != DB_VERSION_FULL ) {
-                       /* fail if a versions don't match */
-                       Debug( LDAP_DEBUG_ANY,
-                               LDAP_XSTRING(bdb_back_initialize) ": "
-                               "BDB library version mismatch:"
-                               " expected " DB_VERSION_STRING ","
-                               " got %s\n", version, 0, 0 );
-                       return -1;
-               }
-
                Debug( LDAP_DEBUG_TRACE, LDAP_XSTRING(bdb_back_initialize)
                        ": %s\n", version, 0, 0 );
        }