Remove old patches

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Alexander Bokovoy 2021-05-25 17:42:11 +03:00
parent 517d97ba11
commit ed495ed7b3
4 changed files with 0 additions and 204 deletions

View File

@ -1,65 +0,0 @@
From 1d03c1e5b2e6c932c3a773518a0224d6bcd9d28b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Fri, 26 Mar 2021 11:46:26 +0100
Subject: [PATCH 2/2] rwlock initialization does not return value
API has changed, it no longer returns a value in isc_rwlock_init.
It returned always ISC_SUCCCESS on 9.16 anyway, so skip the check
on every 9.16 build.
---
src/fwd_register.c | 5 +++++
src/zone_register.c | 6 ++++++
2 files changed, 11 insertions(+)
diff --git a/src/fwd_register.c b/src/fwd_register.c
index cc9764bdf..fcbd66fd7 100644
--- 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_register_t **fwdrp)
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;
diff --git a/src/zone_register.c b/src/zone_register.c
index 07b1546d6..28d9b7ae8 100644
--- 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_t *ldap_inst,
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;
--
2.26.2

View File

@ -1,58 +0,0 @@
From f0d75b778ee7bfd0feb368b51027943085a54705 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Fri, 26 Mar 2021 00:59:17 +0100
Subject: [PATCH 1/2] Add support for dns library without libinterface
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.
---
configure.ac | 26 +++++++++++++++++++-------
1 file changed, 19 insertions(+), 7 deletions(-)
diff --git a/configure.ac b/configure.ac
index e8bce4abc..ca7ef188b 100644
--- 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
--
2.26.2

View File

@ -1,77 +0,0 @@
From 55ea24d66e4120b3c1370e931897028054caa554 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20Men=C5=A1=C3=ADk?= <pemensik@redhat.com>
Date: Thu, 20 May 2021 13:48:51 +0200
Subject: [PATCH] Remove ISCAPI_TASK_VALID checks
Recent BIND 9.16.16 has hidden task structure and public checks. It
still checks task validity in each isc_task_* function, which we use for
working with tasks. No lesser checking would be done.
isc_mem_t still has them, but they were removed in 9.17. Remove those
checks as well, work with them just structure undefined pointers. Rely
on bind9 library to check them.
---
src/ldap_driver.c | 2 +-
src/ldap_helper.c | 2 +-
src/syncrepl.c | 4 +---
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/src/ldap_driver.c b/src/ldap_driver.c
index 20aa9f088..e9f1005ee 100644
--- a/src/ldap_driver.c
+++ b/src/ldap_driver.c
@@ -1026,7 +1026,7 @@ ldapdb_associate(isc_mem_t *mctx, node_name_t *name, dns_dbtype_t type,
ldap_instance_t *ldap_inst = driverarg;
zone_register_t *zr = NULL;
- REQUIRE(ISCAPI_MCTX_VALID(mctx));
+ UNUSED(mctx);
REQUIRE(type == LDAP_DB_TYPE);
REQUIRE(rdclass == LDAP_DB_RDATACLASS);
REQUIRE(argc == 0);
diff --git a/src/ldap_helper.c b/src/ldap_helper.c
index 1c89e54ff..2fd2da4d8 100644
--- a/src/ldap_helper.c
+++ b/src/ldap_helper.c
@@ -1143,7 +1143,7 @@ publish_zone(isc_task_t *task, ldap_instance_t *inst, dns_zone_t *zone)
dns_view_t *view_in_zone = NULL;
isc_result_t lock_state = ISC_R_IGNORE;
- REQUIRE(ISCAPI_TASK_VALID(task));
+ UNUSED(task);
REQUIRE(inst != NULL);
REQUIRE(zone != NULL);
diff --git a/src/syncrepl.c b/src/syncrepl.c
index b7a7ab820..a406fff1c 100644
--- a/src/syncrepl.c
+++ b/src/syncrepl.c
@@ -131,7 +131,6 @@ finish(isc_task_t *task, isc_event_t *event) {
sync_barrierev_t *bev = NULL;
sync_state_t new_state;
- REQUIRE(ISCAPI_TASK_VALID(task));
REQUIRE(event != NULL);
bev = (sync_barrierev_t *)event;
@@ -206,8 +205,8 @@ barrier_decrement(isc_task_t *task, isc_event_t *event) {
sync_barrierev_t *bev = NULL;
uint32_t cnt;
- REQUIRE(ISCAPI_TASK_VALID(task));
REQUIRE(event != NULL);
+ UNUSED(task);
bev = (sync_barrierev_t *)event;
#if LIBDNS_VERSION_MAJOR < 1600
@@ -458,7 +457,6 @@ sync_task_add(sync_ctx_t *sctx, isc_task_t *task) {
uint32_t cnt;
REQUIRE(sctx != NULL);
- REQUIRE(ISCAPI_TASK_VALID(task));
newel = isc_mem_get(sctx->mctx, sizeof(*(newel)));
ZERO_PTR(newel);
--
2.26.3

View File

@ -20,10 +20,6 @@ URL: https://releases.pagure.org/bind-dyndb-ldap
Source0: https://releases.pagure.org/%{name}/%{name}-%{VERSION}.tar.bz2
Source1: https://releases.pagure.org/%{name}/%{name}-%{VERSION}.tar.bz2.asc
Patch1: bind-dyndb-ldap-11.6-bind-9.16.13-version.patch
Patch2: bind-dyndb-ldap-11.6-bind-9.16.13-rwlock.patch
Patch3: bind-dyndb-ldap-11.8-iscapi-task.patch
BuildRequires: bind-devel >= %{bind_version}, bind-lite-devel >= %{bind_version}
BuildRequires: krb5-devel
BuildRequires: openldap-devel