#203 BIND 9.16.13 support
Merged a month ago by abbra. Opened a month ago by pemensik.
pemensik/bind-dyndb-ldap bind-9.16.13-support  into  master

file modified
+19 -7
@@ -90,19 +90,31 @@ 

  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

file modified
+5
@@ -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 @@ 

  	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;

file modified
+6
@@ -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 @@ 

  	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;

  

BIND 9.16.12 and more recent have removed numeric versioning of library.
Instead it just contain complete text version. Extract numbers from it
and export it in similar manner.

I get the following issue, though the generated configure works:

configure.ac:97: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2740: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2759: AC_RUN_IFELSE is expanded from...
configure.ac:97: the top level
configure.ac:97: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2740: _AC_RUN_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from...
../../lib/autoconf/general.m4:2759: AC_RUN_IFELSE is expanded from...

1 new commit added

  • rwlock initialization does not return value
a month ago

I just cannot figure, what is wrong with those macros. According to documentation, AC_LANG_PROGRAM uses AC_LANG_SOURCE. But for unknown reason it does not accept it without weird warnings. I just cannot see what is wrong. It is better, if deprecated AC_TRY_RUN() is used, but it generates errors on ./configure time when I tried that.

rebased onto f0d75b7

a month ago

Thanks. I don't see these problems anymore on F34.

Pull-Request has been merged by abbra

a month ago

That is because I haven't pushed rebase to f34 until today. Just started building bind 9.16.13 for it. Previous version in f34 was BIND 9.16.11, which did not yet had the breaking changes.

F34 is now locked for final freeze. You will not be able to rebase in F34 without a blocker bug.

At this point I'd suggest we don't do rebase in F34 but rather focus on polishing F35.