[Pkg-freeipa-devel] [Git][freeipa-team/bind-dyndb-ldap][master] support-9.16.13.diff: Fix build against bind 9.16.13 and up. (Closes: #986509)

Timo Aaltonen gitlab at salsa.debian.org
Tue May 4 17:35:14 BST 2021



Timo Aaltonen pushed to branch master at FreeIPA packaging / bind-dyndb-ldap


Commits:
d22d6135 by Timo Aaltonen at 2021-05-04T19:34:57+03:00
support-9.16.13.diff: Fix build against bind 9.16.13 and up. (Closes: #986509)

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- + debian/patches/support-9.16.13.diff


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+bind-dyndb-ldap (11.6-3) UNRELEASED; urgency=medium
+
+  * support-9.16.13.diff: Fix build against bind 9.16.13 and up.
+    (Closes: #986509)
+
+ -- Timo Aaltonen <tjaalton at debian.org>  Tue, 04 May 2021 19:34:43 +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.


=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ fix-keytab-path.diff
 fix-werror-build.diff
 support-9.16.9.diff
 support-bind-9.16.11.diff
+support-9.16.13.diff


=====================================
debian/patches/support-9.16.13.diff
=====================================
@@ -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;
+ 



View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/commit/d22d6135932bd21faba395ce96b16c1a71508fa1

-- 
View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/commit/d22d6135932bd21faba395ce96b16c1a71508fa1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-freeipa-devel/attachments/20210504/fa60f061/attachment-0001.htm>


More information about the Pkg-freeipa-devel mailing list