--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package bind-dyndb-ldap
[ Reason ]
Allows it to build again with current bind9, fixing #986509
[ Impact ]
otherwise package would be removed from bullseye
[ Tests ]
build
[ Risks ]
Shouldn't be any risk, since the old version doesn't build against current bind9
[ Checklist ]
[x] all changes are documented in the d/changelog
[x] I reviewed all changes and I approve them
[x] attach debdiff against the package in testing
[ Other info ]
unblock bind-dyndb-ldap/11.6-3
diff -Nru bind-dyndb-ldap-11.6/debian/changelog bind-dyndb-ldap-11.6/debian/changelog
--- bind-dyndb-ldap-11.6/debian/changelog 2021-02-15 12:47:06.000000000 +0200
+++ bind-dyndb-ldap-11.6/debian/changelog 2021-05-04 19:34:58.000000000 +0300
@@ -1,3 +1,10 @@
+bind-dyndb-ldap (11.6-3) unstable; urgency=medium
+
+ * support-9.16.13.diff: Fix build against bind 9.16.13 and up.
+ (Closes: #986509)
+
+ -- Timo Aaltonen <tjaalton@debian.org> Tue, 04 May 2021 19:34:58 +0300
+
bind-dyndb-ldap (11.6-2) unstable; urgency=medium
* support-bind-9.16.11.diff: Fix build against bind9 9.16.11 and .11.
diff -Nru bind-dyndb-ldap-11.6/debian/patches/series bind-dyndb-ldap-11.6/debian/patches/series
--- bind-dyndb-ldap-11.6/debian/patches/series 2021-02-15 12:45:02.000000000 +0200
+++ bind-dyndb-ldap-11.6/debian/patches/series 2021-05-04 19:30:18.000000000 +0300
@@ -2,3 +2,4 @@
fix-werror-build.diff
support-9.16.9.diff
support-bind-9.16.11.diff
+support-9.16.13.diff
diff -Nru bind-dyndb-ldap-11.6/debian/patches/support-9.16.13.diff bind-dyndb-ldap-11.6/debian/patches/support-9.16.13.diff
--- bind-dyndb-ldap-11.6/debian/patches/support-9.16.13.diff 1970-01-01 02:00:00.000000000 +0200
+++ bind-dyndb-ldap-11.6/debian/patches/support-9.16.13.diff 2021-05-04 19:33:37.000000000 +0300
@@ -0,0 +1,86 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -90,19 +90,31 @@ AC_CHECK_LIB([krb5], [krb5_cc_initialize
+ AC_CHECK_LIB([uuid], [uuid_unparse], [],
+ AC_MSG_ERROR([Install UUID library development files]))
+
++AC_LANG(C)
+ # Check version of libdns
+ AC_MSG_CHECKING([libdns version])
+-AC_TRY_RUN([
++AC_RUN_IFELSE([AC_LANG_PROGRAM([
+ #include <stdio.h>
+ #include <dns/version.h>
+-int main(void) {
+- printf("%d\n", dns_libinterface);
+- return 0;
+-}],[LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
++],[ printf("%d\n", dns_libinterface) ])], [
++ LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
++ AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
++ [Define libdns version])], [
++ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
++#include <stdio.h>
++#include <dns/version.h>
++]],[[
++ unsigned major, minor, patch, scanned;
++ /* emulate dns_libinterface from minor and patch version */
++ scanned = sscanf(dns_version, "%u.%u.%u", &major, &minor, &patch);
++ printf("%02d%02d\n", minor, patch);
++ return !(scanned == 3 && major == 9);
++ ]])], [
++ LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
+ AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
+ [Define libdns version])],
+-[AC_MSG_ERROR([Can't obtain libdns version.])],
+-[AC_MSG_ERROR([Cross compiling is not supported.])]
++ [AC_MSG_ERROR([Can't obtain libdns version.])])
++], [AC_MSG_ERROR([Cross compiling is not supported.])]
+ )
+
+ dnl isc_errno_toresult() was not available in older header files
+--- a/src/fwd_register.c
++++ b/src/fwd_register.c
+@@ -6,6 +6,7 @@
+ #include <isc/util.h>
+ #include <dns/name.h>
+
++#include "config.h"
+ #include "rbt_helper.h"
+ #include "fwd_register.h"
+ #include "util.h"
+@@ -35,7 +36,11 @@ fwdr_create(isc_mem_t *mctx, fwd_registe
+ ZERO_PTR(fwdr);
+ isc_mem_attach(mctx, &fwdr->mctx);
+ CHECK(dns_rbt_create(mctx, NULL, NULL, &fwdr->rbt));
++#if LIBDNS_VERSION_MAJOR >= 1600
++ (void)isc_rwlock_init(&fwdr->rwlock, 0, 0);
++#else
+ CHECK(isc_rwlock_init(&fwdr->rwlock, 0, 0));
++#endif
+
+ *fwdrp = fwdr;
+ return ISC_R_SUCCESS;
+--- a/src/zone_register.c
++++ b/src/zone_register.c
+@@ -12,6 +12,7 @@
+ #include <dns/result.h>
+ #include <dns/zone.h>
+
++#include "config.h"
+ #include "fs.h"
+ #include "ldap_driver.h"
+ #include "log.h"
+@@ -115,7 +116,12 @@ zr_create(isc_mem_t *mctx, ldap_instance
+ ZERO_PTR(zr);
+ isc_mem_attach(mctx, &zr->mctx);
+ CHECK(dns_rbt_create(mctx, delete_zone_info, mctx, &zr->rbt));
++#if LIBDNS_VERSION_MAJOR >= 1600
++ /* Never fails on BIND 9.16, even it if returns value */
++ (void)isc_rwlock_init(&zr->rwlock, 0, 0);
++#else
+ CHECK(isc_rwlock_init(&zr->rwlock, 0, 0));
++#endif
+ zr->global_settings = glob_settings;
+ zr->ldap_inst = ldap_inst;
+
--- End Message ---