[Pkg-freeipa-devel] [Git][freeipa-team/bind-dyndb-ldap][master] 2 commits: patches: Fix build against bind9 9.18.10, and bump the hardcoded version to...

Timo Aaltonen (@tjaalton) gitlab at salsa.debian.org
Thu Jan 12 13:10:07 GMT 2023



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


Commits:
f0fa00ea by Timo Aaltonen at 2023-01-12T15:08:56+02:00
patches: Fix build against bind9 9.18.10, and bump the hardcoded version to match. (Closes: #1027094)

- - - - -
2140ff23 by Timo Aaltonen at 2023-01-12T15:09:03+02:00
releasing package bind-dyndb-ldap version 11.10-2

- - - - -


7 changed files:

- debian/changelog
- debian/control
- + debian/patches/fix-dns_db_allrdatasets.diff
- + debian/patches/fix-include.diff
- + debian/patches/fix-isc-error.diff
- debian/patches/hardcode-version.diff
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+bind-dyndb-ldap (11.10-2) unstable; urgency=medium
+
+  * patches: Fix build against bind9 9.18.10, and bump the hardcoded
+    version to match. (Closes: #1027094)
+
+ -- Timo Aaltonen <tjaalton at debian.org>  Thu, 12 Jan 2023 15:08:57 +0200
+
 bind-dyndb-ldap (11.10-1) unstable; urgency=medium
 
   * New upstream release.


=====================================
debian/control
=====================================
@@ -5,7 +5,7 @@ Maintainer: Debian FreeIPA Team <pkg-freeipa-devel at alioth-lists.debian.net>
 Uploaders: Timo Aaltonen <tjaalton at debian.org>
 Build-Depends:
  debhelper-compat (= 12),
- bind9-dev (>= 1:9.17.19-3),
+ bind9-dev (>= 1:9.18.10),
  libkrb5-dev,
  libldap2-dev,
  libsasl2-dev,


=====================================
debian/patches/fix-dns_db_allrdatasets.diff
=====================================
@@ -0,0 +1,89 @@
+From e664510525c600fb000c9afa50772420597d1eb1 Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <abokovoy at redhat.com>
+Date: Jan 12 2023 11:27:55 +0000
+Subject: Support bind 9.18.10 or later
+
+
+dns_db_allrdatasets() gained a new parameter. Adopt the code to allow
+injecting 0 options if building against 9.18.10.
+
+Fixes: https://pagure.io/bind-dyndb-ldap/issue/216
+
+Signed-off-by: Alexander Bokovoy <abokovoy at redhat.com>
+
+---
+
+--- a/src/ldap_driver.c
++++ b/src/ldap_driver.c
+@@ -465,13 +465,13 @@ findrdataset(dns_db_t *db, dns_dbnode_t
+ 
+ static isc_result_t
+ allrdatasets(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
+-	     isc_stdtime_t now, dns_rdatasetiter_t **iteratorp)
++	     DNS_DB_ALLRDATASETS_OPTIONS(unsigned int options, isc_stdtime_t now), dns_rdatasetiter_t **iteratorp)
+ {
+ 	ldapdb_t *ldapdb = (ldapdb_t *) db;
+ 
+ 	REQUIRE(VALID_LDAPDB(ldapdb));
+ 
+-	return dns_db_allrdatasets(ldapdb->rbtdb, node, version, now, iteratorp);
++	return dns_db_allrdatasets(ldapdb->rbtdb, node, version, DNS_DB_ALLRDATASETS_OPTIONS(options, now), iteratorp);
+ }
+ 
+ /* TODO: Add 'tainted' flag to the LDAP instance if something went wrong. */
+@@ -514,7 +514,7 @@ node_isempty(dns_db_t *db, dns_dbnode_t
+ 
+ 	CHECK(ldapdb_name_fromnode(node, dns_fixedname_initname(&fname)));
+ 
+-	result = dns_db_allrdatasets(db, node, version, now, &rds_iter);
++	result = dns_db_allrdatasets(db, node, version, DNS_DB_ALLRDATASETS_OPTIONS(0, now), &rds_iter);
+ 	if (result == ISC_R_NOTFOUND) {
+ 		*isempty = true;
+ 	} else if (result == ISC_R_SUCCESS) {
+--- a/src/metadb.c
++++ b/src/metadb.c
+@@ -217,7 +217,8 @@ metadb_node_delete(metadb_node_t **nodep
+ 	node = *nodep;
+ 
+ 	dns_rdataset_init(&rdataset);
+-	CHECK(dns_db_allrdatasets(node->rbtdb, node->dbnode, node->version, 0,
++	CHECK(dns_db_allrdatasets(node->rbtdb, node->dbnode, node->version,
++				  DNS_DB_ALLRDATASETS_OPTIONS(0, 0),
+ 				  &iter));
+ 
+ 	for (result = dns_rdatasetiter_first(iter);
+--- a/src/util.h
++++ b/src/util.h
+@@ -29,6 +29,12 @@ extern bool verbose_checks; /* from sett
+ #define dns_name_copynf(src, dst) dns_name_copy((src), (dst))
+ #endif
+ 
++#if LIBDNS_VERSION_MAJOR >= 1810
++#define DNS_DB_ALLRDATASETS_OPTIONS(options, tstamp) options, tstamp
++#else
++#define DNS_DB_ALLRDATASETS_OPTIONS(options, tstamp) tstamp
++#endif
++
+ #define CLEANUP_WITH(result_code)				\
+ 	do {							\
+ 		result = (result_code);				\
+--- a/src/ldap_helper.c
++++ b/src/ldap_helper.c
+@@ -2005,7 +2005,7 @@ zone_sync_apex(const ldap_instance_t * c
+ 				 zone_settings, &rdatalist));
+ 
+ 	CHECK(dns_db_getoriginnode(rbtdb, &node));
+-	result = dns_db_allrdatasets(rbtdb, node, version, 0,
++	result = dns_db_allrdatasets(rbtdb, node, version, DNS_DB_ALLRDATASETS_OPTIONS(0, 0),
+ 				     &rbt_rds_iterator);
+ 	if (result == ISC_R_SUCCESS) {
+ 		CHECK(diff_ldap_rbtdb(inst->mctx, &name, &rdatalist,
+@@ -3929,7 +3929,7 @@ update_restart:
+ 	CHECK(dns_db_newversion(ldapdb, &version));
+ 
+ 	CHECK(dns_db_findnode(rbtdb, &entry->fqdn, true, &node));
+-	result = dns_db_allrdatasets(rbtdb, node, version, 0, &rbt_rds_iterator);
++	result = dns_db_allrdatasets(rbtdb, node, version, DNS_DB_ALLRDATASETS_OPTIONS(0, 0), &rbt_rds_iterator);
+ 	if (result != ISC_R_SUCCESS && result != ISC_R_NOTFOUND)
+ 		goto cleanup;
+ 


=====================================
debian/patches/fix-include.diff
=====================================
@@ -0,0 +1,28 @@
+From d9094eb0b593dce7aaf74c611b3f3c93954f400e Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <abokovoy at redhat.com>
+Date: Jan 12 2023 11:33:04 +0000
+Subject: Fix broken bind 9.18.10 build
+
+
+bind 9.18.10 added use of isrwlock in dns/zt.h but did not include
+isc/rwlock.h
+
+Fixes: https://pagure.io/bind-dyndb-ldap/issues/216
+
+Signed-off-by: Alexander Bokovoy <abokovoy at redhat.com>
+
+---
+
+diff --git a/src/zone_register.h b/src/zone_register.h
+index 9d13bb6..2b6ab51 100644
+--- a/src/zone_register.h
++++ b/src/zone_register.h
+@@ -5,6 +5,7 @@
+ #ifndef _LD_ZONE_REGISTER_H_
+ #define _LD_ZONE_REGISTER_H_
+ 
++#include <isc/rwlock.h>
+ #include <dns/zt.h>
+ 
+ #include "settings.h"
+


=====================================
debian/patches/fix-isc-error.diff
=====================================
@@ -0,0 +1,147 @@
+From 78397b655d25a68acadc4b597946ed88028612be Mon Sep 17 00:00:00 2001
+From: Alexander Bokovoy <abokovoy at redhat.com>
+Date: Jan 12 2023 12:53:42 +0000
+Subject: adopt to bind 9.18.10+ loggers
+
+
+Fixes: https://pagure.io/bind-dyndb-ldap/issues/216
+
+Signed-off-by: Alexander Bokovoy <abokovoy at redhat.com>
+
+---
+
+diff --git a/src/ldap_helper.c b/src/ldap_helper.c
+index 7ea3df9..3dfd385 100644
+--- a/src/ldap_helper.c
++++ b/src/ldap_helper.c
+@@ -1317,8 +1317,7 @@ configure_zone_acl(isc_mem_t *mctx, dns_zone_t *zone,
+ 			dns_zone_logc(zone, DNS_LOGCATEGORY_SECURITY, ISC_LOG_CRITICAL,
+ 				      "cannot configure restrictive %s policy: %s",
+ 				      type_txt, isc_result_totext(result2));
+-			FATAL_ERROR(__FILE__, __LINE__,
+-				    "insecure state detected");
++			fatal_error("insecure state detected");
+ 		}
+ 	}
+ 	acl_setter(zone, acl);
+@@ -1365,8 +1364,7 @@ configure_zone_ssutable(dns_zone_t *zone, const char *update_str)
+ 			dns_zone_logc(zone, DNS_LOGCATEGORY_SECURITY, ISC_LOG_CRITICAL,
+ 				      "cannot disable all updates: %s",
+ 				      isc_result_totext(result2));
+-			FATAL_ERROR(__FILE__, __LINE__,
+-				    "insecure state detected");
++			fatal_error("insecure state detected");
+ 		}
+ 	}
+ 
+@@ -2951,8 +2949,7 @@ force_reconnect:
+ 						   ldap_inst);
+ 		break;
+ 	case AUTH_INVALID:
+-		UNEXPECTED_ERROR(__FILE__, __LINE__,
+-				"invalid auth_method_enum value %u",
++		unexpected_error("invalid auth_method_enum value %u",
+ 				 auth_method_enum);
+ 		break;
+ 
+@@ -3782,8 +3779,7 @@ update_zone(isc_task_t *task, isc_event_t *event)
+ 		else if (entry->class & LDAP_ENTRYCLASS_FORWARD)
+ 			CHECK(ldap_parse_fwd_zoneentry(entry, inst));
+ 		else
+-			FATAL_ERROR(__FILE__, __LINE__,
+-				    "update_zone: unexpected entry class");
++			fatal_error("update_zone: unexpected entry class");
+ 	}
+ 
+ cleanup:
+diff --git a/src/log.h b/src/log.h
+index da71f8b..6491159 100644
+--- a/src/log.h
++++ b/src/log.h
+@@ -17,8 +17,17 @@
+ #define GET_LOG_LEVEL(level)	(level)
+ #endif
+ 
++#if LIBDNS_VERSION_MAJOR >= 1810
++#define fatal_error(...) \
++	isc_error_fatal(__FILE__, __LINE__, __func__, __VA_ARGS__)
++#define unexpected_error(...) \
++	isc_error_unexpected(__FILE__, __LINE__, __func__, __VA_ARGS__)
++#else
+ #define fatal_error(...) \
+ 	isc_error_fatal(__FILE__, __LINE__, __VA_ARGS__)
++#define unexpected_error(...) \
++	isc_error_unexpected(__FILE__, __LINE__, __VA_ARGS__)
++#endif
+ 
+ #define log_bug(fmt, ...) \
+ 	log_error("bug in %s(): " fmt, __func__,##__VA_ARGS__)
+diff --git a/src/settings.c b/src/settings.c
+index def60d7..2a0bb19 100644
+--- a/src/settings.c
++++ b/src/settings.c
+@@ -178,8 +178,7 @@ setting_get(const char *const name, const setting_type_t type,
+ 		*(bool *)target = setting->value.value_boolean;
+ 		break;
+ 	default:
+-		UNEXPECTED_ERROR(__FILE__, __LINE__,
+-				 "invalid setting_type_t value %u", type);
++		unexpected_error("invalid setting_type_t value %u", type);
+ 		break;
+ 	}
+ 
+@@ -278,8 +277,7 @@ set_value(isc_mem_t *mctx, const settings_set_t *set, setting_t *setting,
+ 			CLEANUP_WITH(ISC_R_IGNORE);
+ 		break;
+ 	default:
+-		UNEXPECTED_ERROR(__FILE__, __LINE__,
+-				 "invalid setting_type_t value %u", setting->type);
++		unexpected_error("invalid setting_type_t value %u", setting->type);
+ 		break;
+ 	}
+ 
+@@ -304,8 +302,7 @@ set_value(isc_mem_t *mctx, const settings_set_t *set, setting_t *setting,
+ 		setting->value.value_boolean = numeric_value;
+ 		break;
+ 	default:
+-		UNEXPECTED_ERROR(__FILE__, __LINE__,
+-				 "invalid setting_type_t value %u", setting->type);
++		unexpected_error("invalid setting_type_t value %u", setting->type);
+ 		break;
+ 	}
+ 	setting->filled = 1;
+@@ -389,8 +386,7 @@ setting_unset(const char *const name, const settings_set_t *set)
+ 	case ST_BOOLEAN:
+ 		break;
+ 	default:
+-		UNEXPECTED_ERROR(__FILE__, __LINE__,
+-				 "invalid setting_type_t value %u", setting->type);
++		unexpected_error("invalid setting_type_t value %u", setting->type);
+ 		break;
+ 	}
+ 	setting->filled = 0;
+diff --git a/src/syncrepl.c b/src/syncrepl.c
+index 0bee09a..f94379c 100644
+--- a/src/syncrepl.c
++++ b/src/syncrepl.c
+@@ -148,8 +148,7 @@ finish(isc_task_t *task, isc_event_t *event) {
+ 		case sync_datainit:
+ 		case sync_finished:
+ 		default:
+-			FATAL_ERROR(__FILE__, __LINE__,
+-				    "sync_barrier_wait(): invalid state "
++			fatal_error("sync_barrier_wait(): invalid state "
+ 				    "%u", bev->sctx->state);
+ 	}
+ 	sync_state_change(bev->sctx, new_state, false);
+@@ -518,8 +517,7 @@ sync_barrier_wait(sync_ctx_t *sctx, ldap_instance_t *inst) {
+ 		case sync_databarrier:
+ 		case sync_finished:
+ 		default:
+-			FATAL_ERROR(__FILE__, __LINE__,
+-				    "sync_barrier_wait(): invalid state "
++			fatal_error("sync_barrier_wait(): invalid state "
+ 				    "%u", sctx->state);
+ 	}
+ 
+


=====================================
debian/patches/hardcode-version.diff
=====================================
@@ -44,7 +44,7 @@
 -    ])
 -], [AC_MSG_ERROR([Cross compiling is not supported.])]
 -)
-+AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [1800], [Define libdns version])
++AC_DEFINE_UNQUOTED([LIBDNS_VERSION_MAJOR], [1810], [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,3 +1,7 @@
 fix-keytab-path.diff
 fix-werror-build.diff
 hardcode-version.diff
+
+fix-dns_db_allrdatasets.diff
+fix-include.diff
+fix-isc-error.diff



View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/compare/0ce3c7f8279d179081d13f39259ee1ac374fcf7a...2140ff23a017b7b1c45a075e02d0de52af310dac

-- 
View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/compare/0ce3c7f8279d179081d13f39259ee1ac374fcf7a...2140ff23a017b7b1c45a075e02d0de52af310dac
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/20230112/00c976a2/attachment-0001.htm>


More information about the Pkg-freeipa-devel mailing list