[Pkg-freeipa-devel] [Git][freeipa-team/bind-dyndb-ldap][master] 3 commits: support-9.18.diff: Fix build with bind9 9.18.
Timo Aaltonen (@tjaalton)
gitlab at salsa.debian.org
Wed Feb 23 11:17:46 GMT 2022
Timo Aaltonen pushed to branch master at FreeIPA packaging / bind-dyndb-ldap
Commits:
1d5f255d by Timo Aaltonen at 2022-02-23T13:06:19+02:00
support-9.18.diff: Fix build with bind9 9.18.
drop patches that aren't needed anymore with this
- - - - -
1c649e9d by Timo Aaltonen at 2022-02-23T13:17:06+02:00
control, rules: Use a strict dependency on bind9-libs that the package was built against, in order to avoid bind9 updates breaking the package. (Closes: #1004729)
- - - - -
203baba7 by Timo Aaltonen at 2022-02-23T13:17:12+02:00
releasing package bind-dyndb-ldap version 11.9-5
- - - - -
13 changed files:
- debian/changelog
- debian/control
- − debian/patches/define-have-threads-h.diff
- − debian/patches/drop-serialize.diff
- − debian/patches/fix-atomics.diff
- − debian/patches/fix-typo.diff
- debian/patches/hardcode-version.diff
- debian/patches/series
- + debian/patches/support-9.18.diff
- − debian/patches/use-dns_name_copy.diff
- − debian/patches/use-dns_ssuruletype_t.diff
- − debian/patches/use-isc_result_totext.diff
- debian/rules
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,13 @@
+bind-dyndb-ldap (11.9-5) unstable; urgency=medium
+
+ * support-9.18.diff: Fix build with bind9 9.18. (Closes: #1006014)
+ - drop patches that aren't needed anymore with this
+ * control, rules: Use a strict dependency on bind9-libs that the
+ package was built against, in order to avoid bind9 updates breaking
+ the package. (Closes: #1004729)
+
+ -- Timo Aaltonen <tjaalton at debian.org> Wed, 23 Feb 2022 13:17:07 +0200
+
bind-dyndb-ldap (11.9-4) unstable; urgency=medium
* Rebuild against bind9 9.17.19-3. (Closes: #998575, #999463)
=====================================
debian/control
=====================================
@@ -18,7 +18,8 @@ Vcs-Browser: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap
Package: bind9-dyndb-ldap
Architecture: any
Depends: ${misc:Depends}, ${shlibs:Depends},
- bind9 (>= 9.11)
+ bind9 (>= 9.11),
+ bind9-libs (= ${bind9-libs:Version}),
Description: LDAP back-end plug-in for BIND
This package provides an LDAP back-end plug-in for BIND. It features
support for dynamic updates and internal caching, to lift the load
=====================================
debian/patches/define-have-threads-h.diff deleted
=====================================
@@ -1,11 +0,0 @@
---- a/src/ldap_helper.c
-+++ b/src/ldap_helper.c
-@@ -4,7 +4,7 @@
-
- #include "dyndb-config.h"
- #define HAVE_TLS 1
--#define HAVE_THREAD_LOCAL 1
-+#define HAVE_THREADS_H 1
-
- #define __GNUC_ATOMICS
-
=====================================
debian/patches/drop-serialize.diff deleted
=====================================
@@ -1,39 +0,0 @@
---- a/src/ldap_driver.c
-+++ b/src/ldap_driver.c
-@@ -13,10 +13,10 @@
- #include <isc/buffer.h>
- #include <isc/commandline.h>
- #include <isc/hash.h>
--#include <isc/lib.h>
- #include <isc/mem.h>
- #include <isc/once.h>
- #include <isc/refcount.h>
-+#include <isc/types.h>
- #include <isc/util.h>
-
- #include <dns/db.h>
-@@ -240,16 +240,6 @@ endload(dns_db_t *db, dns_rdatacallbacks
- return ISC_R_SUCCESS;
- }
-
--static isc_result_t
--serialize(dns_db_t *db, dns_dbversion_t *version, FILE *file)
--{
-- ldapdb_t *ldapdb = (ldapdb_t *) db;
--
-- REQUIRE(VALID_LDAPDB(ldapdb));
--
-- return dns_db_serialize(ldapdb->rbtdb, version, file);
--}
--
- /* !!! This could be required for optimizations (like on-disk cache). */
- static isc_result_t
- dump(dns_db_t *db, dns_dbversion_t *version, const char *filename,
-@@ -916,7 +906,6 @@ static dns_dbmethods_t ldapdb_methods =
- detach,
- beginload,
- endload,
-- serialize, /* see dns_db_serialize(), implementation is not mandatory */
- dump,
- currentversion,
- newversion,
=====================================
debian/patches/fix-atomics.diff deleted
=====================================
@@ -1,206 +0,0 @@
---- a/src/fwd_register.c
-+++ b/src/fwd_register.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2013-2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/rwlock.h>
- #include <isc/util.h>
- #include <dns/name.h>
---- a/src/ldap_helper.c
-+++ b/src/ldap_helper.c
-@@ -6,6 +6,8 @@
- #define HAVE_TLS 1
- #define HAVE_THREAD_LOCAL 1
-
-+#define __GNUC_ATOMICS
-+
- #include <dns/dyndb.h>
- #include <dns/diff.h>
- #include <dns/journal.h>
---- a/src/rbt_helper.h
-+++ b/src/rbt_helper.h
-@@ -5,6 +5,8 @@
- #ifndef _LD_RBT_HELPER_H_
- #define _LD_RBT_HELPER_H_
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/rwlock.h>
- #include <dns/rbt.h>
- #include "util.h"
---- a/src/zone_register.c
-+++ b/src/zone_register.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2009-2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/mem.h>
- #include <isc/rwlock.h>
- #include <isc/util.h>
---- a/src/acl.c
-+++ b/src/acl.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2009-2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include "dyndb-config.h"
-
- #include <isccfg/aclconf.h>
---- a/src/empty_zones.c
-+++ b/src/empty_zones.c
-@@ -1,3 +1,5 @@
-+#define __GNUC_ATOMICS
-+
- #include <stdio.h>
-
- #include <isc/result.h>
---- a/src/fwd.c
-+++ b/src/fwd.c
-@@ -4,6 +4,8 @@
- * DNS forwarding helpers.
- */
-
-+#define __GNUC_ATOMICS
-+
- #include "dyndb-config.h"
-
- #include <isccfg/grammar.h>
---- a/src/ldap_convert.c
-+++ b/src/ldap_convert.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2009-2015 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/buffer.h>
- #include <isc/hex.h>
- #include <isc/mem.h>
---- a/src/bindcfg.c
-+++ b/src/bindcfg.c
-@@ -4,6 +4,8 @@
- * Utilities for BIND configuration parsers.
- */
-
-+#define __GNUC_ATOMICS
-+
- #include "dyndb-config.h"
-
- #include <isc/util.h>
---- a/src/ldap_entry.c
-+++ b/src/ldap_entry.c
-@@ -3,6 +3,8 @@
- */
- #include <uuid/uuid.h>
-
-+#define __GNUC_ATOMICS
-+
- #include <dns/rdata.h>
- #include <dns/ttl.h>
- #include <dns/types.h>
---- a/src/ldap_driver.c
-+++ b/src/ldap_driver.c
-@@ -8,6 +8,8 @@
- #error "Can't compile without dyndb-config.h"
- #endif
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/buffer.h>
- #include <isc/commandline.h>
- #include <isc/hash.h>
---- a/src/lock.c
-+++ b/src/lock.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/task.h>
- #include <isc/util.h>
-
---- a/src/metadb.c
-+++ b/src/metadb.c
-@@ -4,6 +4,8 @@
- * Meta-database for information which are not represented in DNS data.
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/mutex.h>
- #include <isc/util.h>
-
---- a/src/mldap.c
-+++ b/src/mldap.c
-@@ -5,6 +5,8 @@
- * DNS data.
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <ldap.h>
- #include <stddef.h>
- #include <uuid/uuid.h>
---- a/src/rbt_helper.c
-+++ b/src/rbt_helper.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2013-2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/util.h>
- #include <dns/rbt.h>
-
---- a/src/settings.c
-+++ b/src/settings.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2009-2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <isc/util.h>
- #include <isc/mem.h>
- #include <isc/task.h>
---- a/src/syncptr.c
-+++ b/src/syncptr.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2009-2015 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <ldap.h>
- #include <arpa/inet.h>
- #include <sys/socket.h>
---- a/src/syncrepl.c
-+++ b/src/syncrepl.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2013-2014 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <unistd.h>
-
- #include <isc/condition.h>
---- a/src/zone.c
-+++ b/src/zone.c
-@@ -2,6 +2,8 @@
- * Copyright (C) 2014-2015 bind-dyndb-ldap authors; see COPYING for license
- */
-
-+#define __GNUC_ATOMICS
-+
- #include <inttypes.h>
- #include <isc/types.h>
- #include <isc/util.h>
=====================================
debian/patches/fix-typo.diff deleted
=====================================
@@ -1,11 +0,0 @@
---- a/src/str.h
-+++ b/src/str.h
-@@ -17,7 +17,7 @@
- #define _STR_MEM_FLARG_PASS , file, line
- #else
- #define _STR_MEM_FILELINE
--#define _STR_MEM_FLAG
-+#define _STR_MEM_FLARG
- #define _STR_MEM_FLARG_PASS
- #endif
-
=====================================
debian/patches/hardcode-version.diff
=====================================
@@ -1,6 +1,6 @@
--- a/configure.ac
+++ b/configure.ac
-@@ -92,30 +92,7 @@ AC_CHECK_LIB([uuid], [uuid_unparse], [],
+@@ -104,46 +104,7 @@ AC_CHECK_LIB([uuid], [uuid_unparse], [],
AC_LANG(C)
# Check version of libdns
@@ -10,6 +10,7 @@
-#include <dns/version.h>
-],[ printf("%d\n", dns_libinterface) ])], [
- LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
+- AC_MSG_RESULT([$LIBDNS_VERSION_MAJOR])
- AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
- [Define libdns version])], [
- AC_RUN_IFELSE([AC_LANG_PROGRAM([[
@@ -23,12 +24,27 @@
- return !(scanned == 3 && major == 9);
- ]])], [
- LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
+- AC_MSG_RESULT([$LIBDNS_VERSION_MAJOR])
- AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
- [Define libdns version])],
-- [AC_MSG_ERROR([Can't obtain libdns version.])])
+- [
+- LIBDNS_PATH="${libdir}/libdns.so"
+- if test -L "$LIBDNS_PATH" ; then
+- LIBDNS_VERSION_MAJOR=$(ls -l "$LIBDNS_PATH" | sed -e 's/^.*->\s*libdns-9\.\([[0-9]]\+\)\.\([[0-9]]\+\).*\.so/\1 \2/' -e t -e d | xargs printf "%02d%02d")
+- else
+- AC_MSG_ERROR([Can't obtain libdns version1.])
+- fi
+- if test -z "$LIBDNS_VERSION_MAJOR" || test "$LIBDNS_VERSION_MAJOR" -lt 1200; then
+- AC_MSG_ERROR([Can't obtain libdns version ($LIBDNS_VERSION_MAJOR).])
+- else
+- AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
+- [Define libdns version])
+- AC_MSG_RESULT([$LIBDNS_VERSION_MAJOR])
+- fi
+- ])
-], [AC_MSG_ERROR([Cross compiling is not supported.])]
-)
-+AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [1700], [Define libdns version])
++AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [1800], [Define libdns version])
dnl isc_errno_toresult() was not available in older header files
AC_MSG_CHECKING([isc_errno_toresult availability])
=====================================
debian/patches/series
=====================================
@@ -1,11 +1,5 @@
+support-9.18.diff
fix-keytab-path.diff
fix-werror-build.diff
0001-Skip-isc_bind9-check-on-BIND-9.16.17.patch
hardcode-version.diff
-fix-atomics.diff
-use-isc_result_totext.diff
-use-dns_name_copy.diff
-fix-typo.diff
-use-dns_ssuruletype_t.diff
-define-have-threads-h.diff
-drop-serialize.diff
=====================================
debian/patches/support-9.18.diff
=====================================
@@ -0,0 +1,418 @@
+diff --git a/configure.ac b/configure.ac
+index faac214..e5ab91d 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -53,6 +53,18 @@ AC_TRY_COMPILE([
+ [CFLAGS="$SAVED_CFLAGS"
+ AC_MSG_RESULT([no])])
+
++# Check if build chain supports -std=gnu11
++AC_MSG_CHECKING([for -std=gnu11 compiler flag])
++SAVED_CFLAGS="$CFLAGS"
++CFLAGS="-std=gnu11 -Werror"
++AC_TRY_COMPILE([
++ extern int fdef(void);
++],[],
++[AC_MSG_RESULT([yes])
++ CFLAGS="$SAVED_CFLAGS -std=gnu11"],
++[CFLAGS="$SAVED_CFLAGS"
++ AC_MSG_RESULT([no])])
++
+ # Get CFLAGS from isc-config.sh
+ AC_ARG_VAR([BIND9_CFLAGS],
+ [C compiler flags for bind9, overriding isc-config.sh])
+@@ -98,6 +110,7 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([
+ #include <dns/version.h>
+ ],[ printf("%d\n", dns_libinterface) ])], [
+ LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
++ AC_MSG_RESULT([$LIBDNS_VERSION_MAJOR])
+ AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
+ [Define libdns version])], [
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+@@ -111,9 +124,24 @@ AC_RUN_IFELSE([AC_LANG_PROGRAM([
+ return !(scanned == 3 && major == 9);
+ ]])], [
+ LIBDNS_VERSION_MAJOR=`./conftest$ac_exeext`
++ AC_MSG_RESULT([$LIBDNS_VERSION_MAJOR])
+ AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
+ [Define libdns version])],
+- [AC_MSG_ERROR([Can't obtain libdns version.])])
++ [
++ LIBDNS_PATH="${libdir}/libdns.so"
++ if test -L "$LIBDNS_PATH" ; then
++ LIBDNS_VERSION_MAJOR=$(ls -l "$LIBDNS_PATH" | sed -e 's/^.*->\s*libdns-9\.\([[0-9]]\+\)\.\([[0-9]]\+\).*\.so/\1 \2/' -e t -e d | xargs printf "%02d%02d")
++ else
++ AC_MSG_ERROR([Can't obtain libdns version1.])
++ fi
++ if test -z "$LIBDNS_VERSION_MAJOR" || test "$LIBDNS_VERSION_MAJOR" -lt 1200; then
++ AC_MSG_ERROR([Can't obtain libdns version ($LIBDNS_VERSION_MAJOR).])
++ else
++ AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [$LIBDNS_VERSION_MAJOR],
++ [Define libdns version])
++ AC_MSG_RESULT([$LIBDNS_VERSION_MAJOR])
++ fi
++ ])
+ ], [AC_MSG_ERROR([Cross compiling is not supported.])]
+ )
+
+@@ -137,6 +165,10 @@ AC_CHECK_LIB([dns], [dns_db_setservestalettl],
+ [AC_DEFINE([HAVE_DNS_SERVESTALE], 1, [Define if dns library provides dns_db_setservestalettl])]
+ )
+
++AC_CHECK_LIB([dns], [dns_result_totext],
++ [AC_DEFINE([HAVE_DNS_RESULT_TOTEXT], 1, [Define if dns library provides dns_result_totext])]
++)
++
+ dnl Older autoconf (2.59, for example) doesn't define docdir
+ [[ ! -n "$docdir" ]] && docdir='${datadir}/doc/${PACKAGE_TARNAME}'
+ AC_SUBST([docdir])
+diff --git a/src/acl.c b/src/acl.c
+index ba89abc..8f5f33f 100644
+--- a/src/acl.c
++++ b/src/acl.c
+@@ -66,6 +66,10 @@ const enum_txt_assoc_t acl_type_txts[] = {
+ } \
+ } while (0)
+
++#if LIBDNS_VERSION_MAJOR < 1700
++typedef dns_rdatatype_t dns_ssuruletype_t;
++#endif
++
+ static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
+ get_mode(const cfg_obj_t *obj, bool *value)
+ {
+@@ -184,14 +188,14 @@ count_list_elements(const cfg_obj_t *list)
+ }
+
+ static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
+-get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_rdatatype_t **typesp,
++get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_ssuruletype_t **typesp,
+ unsigned int *np)
+ {
+ isc_result_t result = ISC_R_SUCCESS;
+ unsigned int i;
+ unsigned int n = 0;
+ const cfg_listelt_t *el;
+- dns_rdatatype_t *types = NULL;
++ dns_ssuruletype_t *types = NULL;
+
+ REQUIRE(obj != NULL);
+ REQUIRE(typesp != NULL && *typesp == NULL);
+@@ -201,7 +205,7 @@ get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_rdatatype_t **typesp,
+
+ n = count_list_elements(obj);
+ if (n > 0) {
+- types = isc_mem_get(mctx, n * sizeof(dns_rdatatype_t));
++ types = isc_mem_get(mctx, n * sizeof(dns_ssuruletype_t));
+ }
+ i = 0;
+ for (el = cfg_list_first(obj); el != NULL; el = cfg_list_next(el)) {
+@@ -216,7 +220,12 @@ get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_rdatatype_t **typesp,
+ DE_CONST(str, r.base);
+ r.length = strlen(str);
+
++#if LIBDNS_VERSION_MAJOR < 1700
+ result = dns_rdatatype_fromtext(&types[i++], &r);
++#else
++ types[i].max = 0;
++ result = dns_rdatatype_fromtext(&types[i++].type, &r);
++#endif
+ if (result != ISC_R_SUCCESS) {
+ log_error("'%s' is not a valid type", str);
+ goto cleanup;
+@@ -229,7 +238,7 @@ get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_rdatatype_t **typesp,
+ return result;
+
+ cleanup:
+- SAFE_MEM_PUT(mctx, types, n * sizeof(dns_rdatatype_t));
++ SAFE_MEM_PUT(mctx, types, n * sizeof(dns_ssuruletype_t));
+
+ return result;
+ }
+@@ -281,14 +290,18 @@ acl_configure_zone_ssutable(const char *policy_str, dns_zone_t *zone)
+ goto cleanup;
+ }
+
++#if LIBDNS_VERSION_MAJOR >= 1700
++ dns_ssutable_create(mctx, &table);
++#else
+ CHECK(dns_ssutable_create(mctx, &table));
++#endif
+
+ for (el = cfg_list_first(policy); el != NULL; el = cfg_list_next(el)) {
+ const cfg_obj_t *stmt;
+ bool grant;
+ unsigned int match_type;
+ dns_fixedname_t fname, fident;
+- dns_rdatatype_t *types;
++ dns_ssuruletype_t *types;
+ unsigned int n;
+
+ types = NULL;
+@@ -303,9 +316,14 @@ acl_configure_zone_ssutable(const char *policy_str, dns_zone_t *zone)
+ result = get_fixed_name(stmt, "name", &fname);
+ if (result == ISC_R_NOTFOUND &&
+ match_type == dns_ssumatchtype_subdomain) {
++#if LIBDNS_VERSION_MAJOR >= 1700
++ dns_name_copy(dns_zone_getorigin(zone),
++ dns_fixedname_initname(&fname));
++#else
+ CHECK(dns_name_copy(dns_zone_getorigin(zone),
+ dns_fixedname_initname(&fname),
+ &fname.buffer));
++#endif
+ }
+ else if (result != ISC_R_SUCCESS)
+ goto cleanup;
+@@ -324,13 +342,22 @@ acl_configure_zone_ssutable(const char *policy_str, dns_zone_t *zone)
+ CLEANUP_WITH(DNS_R_BADNAME);
+ }
+
++#if LIBDNS_VERSION_MAJOR >= 1700
++ result = ISC_R_SUCCESS;
++ dns_ssutable_addrule(table, grant,
++ dns_fixedname_name(&fident),
++ match_type,
++ dns_fixedname_name(&fname),
++ n, types);
++#else
+ result = dns_ssutable_addrule(table, grant,
+ dns_fixedname_name(&fident),
+ match_type,
+ dns_fixedname_name(&fname),
+ n, types);
++#endif
+
+- SAFE_MEM_PUT(mctx, types, n * sizeof(dns_rdatatype_t));
++ SAFE_MEM_PUT(mctx, types, n * sizeof(dns_ssuruletype_t));
+ if (result != ISC_R_SUCCESS)
+ goto cleanup;
+
+diff --git a/src/empty_zones.c b/src/empty_zones.c
+index e3e4545..03f16fc 100644
+--- a/src/empty_zones.c
++++ b/src/empty_zones.c
+@@ -15,6 +15,8 @@
+
+ #if LIBDNS_VERSION_MAJOR < 1600
+ #define dns_name_copynf(src, dst) dns_name_copy((src), (dst), NULL)
++#elif LIBDNS_VERSION_MAJOR >= 1714
++#define dns_name_copynf(src, dst) dns_name_copy((src), (dst))
+ #endif
+
+ /**
+diff --git a/src/ldap_convert.c b/src/ldap_convert.c
+index dc6e32b..f8e4fba 100644
+--- a/src/ldap_convert.c
++++ b/src/ldap_convert.c
+@@ -29,6 +29,8 @@
+
+ #if LIBDNS_VERSION_MAJOR < 1600
+ #define dns_name_copynf(src, dst) dns_name_copy((src), (dst), NULL)
++#elif LIBDNS_VERSION_MAJOR >= 1714
++#define dns_name_copynf(src, dst) dns_name_copy((src), (dst))
+ #endif
+
+ /**
+diff --git a/src/ldap_driver.c b/src/ldap_driver.c
+index e9f1005..a8f01b6 100644
+--- a/src/ldap_driver.c
++++ b/src/ldap_driver.c
+@@ -11,11 +11,13 @@
+ #include <isc/buffer.h>
+ #include <isc/commandline.h>
+ #include <isc/hash.h>
+-#include <isc/lib.h>
+ #include <isc/mem.h>
+ #include <isc/once.h>
+ #include <isc/refcount.h>
+ #include <isc/util.h>
++#if LIBDNS_VERSION_MAJOR < 1617
++#include <isc/lib.h>
++#endif
+
+ #include <dns/db.h>
+ #include <dns/diff.h>
+@@ -238,6 +240,7 @@ endload(dns_db_t *db, dns_rdatacallbacks_t *callbacks) {
+ return ISC_R_SUCCESS;
+ }
+
++#if LIBDNS_VERSION_MAJOR < 1719
+ static isc_result_t
+ serialize(dns_db_t *db, dns_dbversion_t *version, FILE *file)
+ {
+@@ -247,6 +250,7 @@ serialize(dns_db_t *db, dns_dbversion_t *version, FILE *file)
+
+ return dns_db_serialize(ldapdb->rbtdb, version, file);
+ }
++#endif
+
+ /* !!! This could be required for optimizations (like on-disk cache). */
+ static isc_result_t
+@@ -635,6 +639,7 @@ issecure(dns_db_t *db)
+ return dns_db_issecure(ldapdb->rbtdb);
+ }
+
++#if LIBDNS_VERSION_MAJOR < 1721
+ static unsigned int
+ nodecount(dns_db_t *db)
+ {
+@@ -644,6 +649,17 @@ nodecount(dns_db_t *db)
+
+ return dns_db_nodecount(ldapdb->rbtdb);
+ }
++#else
++static unsigned int
++nodecount(dns_db_t *db, dns_dbtree_t tree)
++{
++ ldapdb_t *ldapdb = (ldapdb_t *) db;
++
++ REQUIRE(VALID_LDAPDB(ldapdb));
++
++ return dns_db_nodecount(ldapdb->rbtdb, tree);
++}
++#endif
+
+ /**
+ * Return TRUE, because database does not need to be loaded from disk
+@@ -896,7 +912,7 @@ getservestalettl(dns_db_t *db, dns_ttl_t *ttl) {
+ }
+ #endif
+
+-#if LIBDNS_VERSION_MAJOR >= 1606
++#if LIBDNS_VERSION_MAJOR >= 1606 && LIBDNS_VERSION_MAJOR < 1720
+ /* Used for cache size adjustments, called by dns_cache_setcachesize.
+ * Just proxy to rbtdb implementation. */
+ static isc_result_t
+@@ -914,7 +930,9 @@ static dns_dbmethods_t ldapdb_methods = {
+ detach,
+ beginload,
+ endload,
++#if LIBDNS_VERSION_MAJOR < 1719
+ serialize, /* see dns_db_serialize(), implementation is not mandatory */
++#endif
+ dump,
+ currentversion,
+ newversion,
+@@ -966,7 +984,7 @@ static dns_dbmethods_t ldapdb_methods = {
+ #if LIBDNS_VERSION_MAJOR >= 1600
+ NULL, /* setgluecachestats */
+ #endif
+-#if LIBDNS_VERSION_MAJOR >= 1606
++#if LIBDNS_VERSION_MAJOR >= 1606 && LIBDNS_VERSION_MAJOR < 1720
+ adjusthashsize, /* adjusthashsize */
+ #endif
+ };
+diff --git a/src/ldap_helper.c b/src/ldap_helper.c
+index 97a1859..7ea3df9 100644
+--- a/src/ldap_helper.c
++++ b/src/ldap_helper.c
+@@ -5,6 +5,7 @@
+ #include "dyndb-config.h"
+ #define HAVE_TLS 1
+ #define HAVE_THREAD_LOCAL 1
++#include <threads.h>
+
+ #include <dns/dyndb.h>
+ #include <dns/diff.h>
+@@ -3760,7 +3761,7 @@ static void ATTR_NONNULLS
+ update_zone(isc_task_t *task, isc_event_t *event)
+ {
+ ldap_syncreplevent_t *pevent = (ldap_syncreplevent_t *)event;
+- isc_result_t result ;
++ isc_result_t result = ISC_R_SUCCESS;
+ ldap_instance_t *inst = pevent->inst;
+ isc_mem_t *mctx;
+ dns_name_t prevname;
+diff --git a/src/mldap.c b/src/mldap.c
+index 3a76153..2c41d5d 100644
+--- a/src/mldap.c
++++ b/src/mldap.c
+@@ -44,6 +44,9 @@
+ #else
+ /* BIND 9.16+ */
+ #define REFCOUNT_CAST(n) ((isc_refcount_t) (n))
++#if LIBDNS_VERSION_MAJOR >= 1714
++#define dns_name_copynf(src, dst) dns_name_copy((src), (dst))
++#endif
+ #endif
+
+ /* name "ldap.uuid." */
+@@ -495,7 +498,7 @@ mldap_iter_deadnodes_next(mldapdb_t *mldap, metadb_iter_t **iterp,
+ isc_result_t result;
+ dns_dbnode_t *rbt_node = NULL;
+ metadb_iter_t *iter = NULL;
+- uint32_t node_generation;
++ uint32_t node_generation = 0;
+ uint32_t cur_generation;
+ metadb_node_t metadb_node;
+ DECLARE_BUFFERED_NAME(name);
+diff --git a/src/str.h b/src/str.h
+index a4061c0..e716361 100644
+--- a/src/str.h
++++ b/src/str.h
+@@ -17,7 +17,7 @@
+ #define _STR_MEM_FLARG_PASS , file, line
+ #else
+ #define _STR_MEM_FILELINE
+-#define _STR_MEM_FLAG
++#define _STR_MEM_FLARG
+ #define _STR_MEM_FLARG_PASS
+ #endif
+
+diff --git a/src/syncptr.c b/src/syncptr.c
+index 8824679..7d6047d 100644
+--- a/src/syncptr.c
++++ b/src/syncptr.c
+@@ -34,6 +34,8 @@
+
+ #if LIBDNS_VERSION_MAJOR < 1600
+ #define dns_name_copynf(src, dst) dns_name_copy((src), (dst), NULL)
++#elif LIBDNS_VERSION_MAJOR >= 1714
++#define dns_name_copynf(src, dst) dns_name_copy((src), (dst))
+ #endif
+
+ /*
+diff --git a/src/syncrepl.c b/src/syncrepl.c
+index 3baeb78..0bee09a 100644
+--- a/src/syncrepl.c
++++ b/src/syncrepl.c
+@@ -129,7 +129,7 @@ void
+ finish(isc_task_t *task, isc_event_t *event) {
+ isc_result_t result = ISC_R_SUCCESS;
+ sync_barrierev_t *bev = NULL;
+- sync_state_t new_state;
++ sync_state_t new_state = sync_configinit;
+
+ REQUIRE(event != NULL);
+ UNUSED(task);
+@@ -496,8 +496,8 @@ isc_result_t
+ sync_barrier_wait(sync_ctx_t *sctx, ldap_instance_t *inst) {
+ isc_event_t *ev = NULL;
+ sync_barrierev_t *bev = NULL;
+- sync_state_t barrier_state;
+- sync_state_t final_state;
++ sync_state_t barrier_state = sync_configinit;
++ sync_state_t final_state = sync_configinit;
+ task_element_t *taskel = NULL;
+ task_element_t *next_taskel = NULL;
+
+diff --git a/src/util.h b/src/util.h
+index 7a8555b..f4b08f9 100644
+--- a/src/util.h
++++ b/src/util.h
+@@ -15,9 +15,14 @@
+ #include <dns/result.h>
+
+ #include "log.h"
++#include "dyndb-config.h"
+
+ extern bool verbose_checks; /* from settings.c */
+
++#ifndef HAVE_DNS_RESULT_TOTEXT
++#define dns_result_totext isc_result_totext
++#endif
++
+ #define CLEANUP_WITH(result_code) \
+ do { \
+ result = (result_code); \
=====================================
debian/patches/use-dns_name_copy.diff deleted
=====================================
@@ -1,60 +0,0 @@
---- a/src/empty_zones.c
-+++ b/src/empty_zones.c
-@@ -239,7 +239,7 @@ empty_zone_search_init(empty_zone_search
- REQUIRE(dns_name_isabsolute(qname));
-
- INIT_BUFFERED_NAME(iter->qname);
-- dns_name_copynf(qname, &iter->qname);
-+ dns_name_copy(qname, &iter->qname);
-
- INIT_BUFFERED_NAME(iter->ezname);
- iter->nextidx = 0;
---- a/src/ldap_convert.c
-+++ b/src/ldap_convert.c
-@@ -138,7 +138,7 @@ dn_to_dnsname(isc_mem_t *mctx, const cha
- } else if (idx == 1) { /* zone only */
- if (iszone != NULL)
- *iszone = true;
-- dns_name_copynf(dns_rootname, &origin);
-+ dns_name_copy(dns_rootname, &origin);
- CHECK(dns_name_fromtext(&name, &name_buf, dns_rootname, 0, NULL));
- } else if (idx == 2) { /* owner and zone */
- if (iszone != NULL)
---- a/src/mldap.c
-+++ b/src/mldap.c
-@@ -344,8 +344,8 @@ mldap_dnsname_get(metadb_node_t *node, d
- CHECK(metadb_rdataset_get(node, dns_rdatatype_rp, &rdataset));
- dns_rdataset_current(&rdataset, &rdata);
- CHECK(dns_rdata_tostruct(&rdata, &rp, NULL));
-- dns_name_copynf(&rp.mail, fqdn);
-- dns_name_copynf(&rp.text, zone);
-+ dns_name_copy(&rp.mail, fqdn);
-+ dns_name_copy(&rp.text, zone);
-
- cleanup:
- if (dns_rdataset_isassociated(&rdataset))
---- a/src/syncptr.c
-+++ b/src/syncptr.c
-@@ -402,7 +402,7 @@ sync_ptr_init(isc_mem_t *mctx, dns_zt_t
- isc_mem_attach(mctx, &ev->mctx);
- INIT_BUFFERED_NAME(ev->a_name);
- INIT_BUFFERED_NAME(ev->ptr_name);
-- dns_name_copynf(a_name, &ev->a_name);
-+ dns_name_copy(a_name, &ev->a_name);
- ev->mod_op = mod_op;
- strncpy(ev->ip_str, ip_str, sizeof(ev->ip_str));
- ev->ip_str[sizeof(ev->ip_str) - 1] = '\0';
---- a/src/acl.c
-+++ b/src/acl.c
-@@ -305,9 +305,8 @@ acl_configure_zone_ssutable(const char *
- result = get_fixed_name(stmt, "name", &fname);
- if (result == ISC_R_NOTFOUND &&
- match_type == dns_ssumatchtype_subdomain) {
-- CHECK(dns_name_copy(dns_zone_getorigin(zone),
-- dns_fixedname_initname(&fname),
-- &fname.buffer));
-+ dns_name_copy(dns_zone_getorigin(zone),
-+ dns_fixedname_initname(&fname));
- }
- else if (result != ISC_R_SUCCESS)
- goto cleanup;
=====================================
debian/patches/use-dns_ssuruletype_t.diff deleted
=====================================
@@ -1,64 +0,0 @@
---- a/src/acl.c
-+++ b/src/acl.c
-@@ -186,14 +186,14 @@ count_list_elements(const cfg_obj_t *lis
- }
-
- static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
--get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_rdatatype_t **typesp,
-+get_types(isc_mem_t *mctx, const cfg_obj_t *obj, dns_ssuruletype_t **typesp,
- unsigned int *np)
- {
- isc_result_t result = ISC_R_SUCCESS;
- unsigned int i;
- unsigned int n = 0;
- const cfg_listelt_t *el;
-- dns_rdatatype_t *types = NULL;
-+ dns_ssuruletype_t *types = NULL;
-
- REQUIRE(obj != NULL);
- REQUIRE(typesp != NULL && *typesp == NULL);
-@@ -203,7 +203,7 @@ get_types(isc_mem_t *mctx, const cfg_obj
-
- n = count_list_elements(obj);
- if (n > 0) {
-- types = isc_mem_get(mctx, n * sizeof(dns_rdatatype_t));
-+ types = isc_mem_get(mctx, n * sizeof(*types));
- }
- i = 0;
- for (el = cfg_list_first(obj); el != NULL; el = cfg_list_next(el)) {
-@@ -218,7 +218,7 @@ get_types(isc_mem_t *mctx, const cfg_obj
- DE_CONST(str, r.base);
- r.length = strlen(str);
-
-- result = dns_rdatatype_fromtext(&types[i++], &r);
-+ result = dns_rdatatype_fromtext(&types[i++].type, &r);
- if (result != ISC_R_SUCCESS) {
- log_error("'%s' is not a valid type", str);
- goto cleanup;
-@@ -231,7 +231,7 @@ get_types(isc_mem_t *mctx, const cfg_obj
- return result;
-
- cleanup:
-- SAFE_MEM_PUT(mctx, types, n * sizeof(dns_rdatatype_t));
-+ SAFE_MEM_PUT(mctx, types, n * sizeof(*types));
-
- return result;
- }
-@@ -290,7 +290,7 @@ acl_configure_zone_ssutable(const char *
- bool grant;
- unsigned int match_type;
- dns_fixedname_t fname, fident;
-- dns_rdatatype_t *types;
-+ dns_ssuruletype_t *types;
- unsigned int n;
-
- types = NULL;
-@@ -331,7 +331,7 @@ acl_configure_zone_ssutable(const char *
- dns_fixedname_name(&fname),
- n, types);
-
-- SAFE_MEM_PUT(mctx, types, n * sizeof(dns_rdatatype_t));
-+ SAFE_MEM_PUT(mctx, types, n * sizeof(types));
- if (result != ISC_R_SUCCESS)
- goto cleanup;
-
=====================================
debian/patches/use-isc_result_totext.diff deleted
=====================================
@@ -1,53 +0,0 @@
---- a/src/fwd.c
-+++ b/src/fwd.c
-@@ -594,7 +594,7 @@ fwd_configure_zone(const settings_set_t
- lock_state = ISC_R_IGNORE; /* prevent double-unlock */
- log_debug(5, "%s %s: forwarder table was updated: %s",
- msg_obj_type, set->name,
-- dns_result_totext(result));
-+ isc_result_totext(result));
-
- /* Handle collisions with automatic empty zones. */
- if (isconfigured == true)
---- a/src/ldap_helper.c
-+++ b/src/ldap_helper.c
-@@ -1223,7 +1223,7 @@ activate_zone(ldap_instance_t *inst, dns
- if (result != ISC_R_SUCCESS) {
- dns_zone_log(toview, ISC_LOG_ERROR,
- "cannot add zone to view: %s",
-- dns_result_totext(result));
-+ isc_result_totext(result));
- goto cleanup;
- }
-
-@@ -4068,7 +4068,7 @@ cleanup:
- "unable to reload invalid zone; "
- "reload triggered by change in %s: %s",
- ldap_entry_logname(entry),
-- dns_result_totext(result));
-+ isc_result_totext(result));
- }
-
- } else if (result != ISC_R_SUCCESS) {
---- a/src/log.h
-+++ b/src/log.h
-@@ -24,7 +24,7 @@
- log_error("bug in %s(): " fmt, __func__,##__VA_ARGS__)
-
- #define log_error_r(fmt, ...) \
-- log_error(fmt ": %s", ##__VA_ARGS__, dns_result_totext(result))
-+ log_error(fmt ": %s", ##__VA_ARGS__, isc_result_totext(result))
-
- #define log_error_position(format, ...) \
- log_error("[%-15s: %4d: %-21s] " format, \
---- a/src/util.h
-+++ b/src/util.h
-@@ -30,7 +30,7 @@ extern bool verbose_checks; /* from sett
- if (result != ISC_R_SUCCESS) { \
- if (verbose_checks == true) \
- log_error_position("check failed: %s", \
-- dns_result_totext(result)); \
-+ isc_result_totext(result)); \
- goto cleanup; \
- } \
- } while (0)
=====================================
debian/rules
=====================================
@@ -1,6 +1,7 @@
#!/usr/bin/make -f
CFLAGS += -Wno-uninitialized
+BIND9_LIBS_VER = $(shell dpkg-query -f='$${Version}\n' -W bind9-libs)
%:
dh $@ --builddirectory=build
@@ -23,3 +24,7 @@ override_dh_missing:
override_dh_fixperms:
dh_fixperms -X var/cache/bind/dyndb-ldap
+
+override_dh_gencontrol:
+ dh_gencontrol -- \
+ -V'bind9-libs:Version=$(BIND9_LIBS_VER)'
View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/compare/a1f9ec66602790578bb4bd22adf30be7f709b227...203baba7ceb6bb42176d9551a87af7fb415519a2
--
View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/compare/a1f9ec66602790578bb4bd22adf30be7f709b227...203baba7ceb6bb42176d9551a87af7fb415519a2
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/20220223/89697bf9/attachment-0001.htm>
More information about the Pkg-freeipa-devel
mailing list