[Pkg-freeipa-devel] [Git][freeipa-team/bind-dyndb-ldap][master] 2 commits: d/p/fix-ftbfs-openldap-2.5.diff: Fix FTBFS when building with OpenLDAP 2.5
Timo Aaltonen (@tjaalton)
gitlab at salsa.debian.org
Fri May 14 08:31:42 BST 2021
Timo Aaltonen pushed to branch master at FreeIPA packaging / bind-dyndb-ldap
Commits:
7195a81d by Sergio Durigan Junior at 2021-05-11T18:10:25-04:00
d/p/fix-ftbfs-openldap-2.5.diff: Fix FTBFS when building with OpenLDAP 2.5
- - - - -
70f44a11 by Sergio Durigan Junior at 2021-05-11T18:11:09-04:00
Update changelog for 11.6-4 release
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/fix-ftbfs-openldap-2.5.diff
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+bind-dyndb-ldap (11.6-4) unstable; urgency=medium
+
+ * d/p/fix-ftbfs-openldap-2.5.diff: Fix FTBFS when building with
+ OpenLDAP 2.5.
+
+ -- Sergio Durigan Junior <sergiodj at debian.org> Tue, 11 May 2021 18:10:57 -0400
+
bind-dyndb-ldap (11.6-3) unstable; urgency=medium
* support-9.16.13.diff: Fix build against bind 9.16.13 and up.
=====================================
debian/patches/fix-ftbfs-openldap-2.5.diff
=====================================
@@ -0,0 +1,117 @@
+From 859f339999d85f54860da80c4d16683fa3593b79 Mon Sep 17 00:00:00 2001
+From: Sergio Durigan Junior <sergiodj at sergiodj.net>
+Date: May 11 2021 21:33:03 +0000
+Subject: Fix FTBFS when building with OpenLDAP 2.5
+
+
+The new version of OpenLDAP (2.5) exports the 'ldap_connect' symbol,
+which conflicts with the function with the same name that is being
+defined and used in src/ldap_helper.c:
+
+libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -Wextra -Werror -std=gnu99 -O2 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto -ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security -fvisibility=hidden -fno-delete-null-pointer-checks -c ../../src/ldap_entry.c -fPIC -DPIC -o .libs/ldap_la-ldap_entry.o
+../../src/ldap_helper.c:343:21: error: conflicting types for ‘ldap_connect’
+ 343 | static isc_result_t ldap_connect(ldap_instance_t *ldap_inst,
+ | ^~~~~~~~~~~~
+In file included from ../../src/ldap_helper.c:52:
+/usr/include/ldap.h:1554:1: note: previous declaration of ‘ldap_connect’ was here
+ 1554 | ldap_connect( LDAP *ld );
+ | ^~~~~~~~~~~~
+
+This commit fixes this FTBFS by renaming the 'ldap_connect' function
+to 'bdl_ldap_connect'. While at it, it also renames the
+'ldap_reconnect' function to 'bdl_ldap_reconnect'.
+
+Signed-off-by: Sergio Durigan Junior <sergiodj at sergiodj.net>
+
+---
+
+Forwarded: https://pagure.io/bind-dyndb-ldap/pull-request/205
+Last-Updated: 2021-05-11
+
+diff --git a/src/ldap_helper.c b/src/ldap_helper.c
+index e13bcfc..1c89e54 100644
+--- a/src/ldap_helper.c
++++ b/src/ldap_helper.c
+@@ -340,9 +340,9 @@ ldap_parse_rrentry(isc_mem_t *mctx, ldap_entry_t *entry, dns_name_t *origin,
+ const settings_set_t * const settings,
+ ldapdb_rdatalist_t *rdatalist) ATTR_NONNULLS ATTR_CHECKRESULT;
+
+-static isc_result_t ldap_connect(ldap_instance_t *ldap_inst,
++static isc_result_t bdl_ldap_connect(ldap_instance_t *ldap_inst,
+ ldap_connection_t *ldap_conn, bool force) ATTR_NONNULLS ATTR_CHECKRESULT;
+-static isc_result_t ldap_reconnect(ldap_instance_t *ldap_inst,
++static isc_result_t bdl_ldap_reconnect(ldap_instance_t *ldap_inst,
+ ldap_connection_t *ldap_conn, bool force) ATTR_NONNULLS ATTR_CHECKRESULT;
+ static isc_result_t handle_connection_error(ldap_instance_t *ldap_inst,
+ ldap_connection_t *ldap_conn, bool force) ATTR_NONNULLS;
+@@ -2797,8 +2797,8 @@ cleanup:
+ * credentials and settings are available from the ldap_inst.
+ */
+ static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
+-ldap_connect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,
+- bool force)
++bdl_ldap_connect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,
++ bool force)
+ {
+ LDAP *ld = NULL;
+ int ret;
+@@ -2842,9 +2842,9 @@ ldap_connect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,
+ if (ldap_conn->handle != NULL)
+ ldap_unbind_ext_s(ldap_conn->handle, NULL, NULL);
+ ldap_conn->handle = ld;
+- ld = NULL; /* prevent double-unbind from ldap_reconnect() and cleanup: */
++ ld = NULL; /* prevent double-unbind from bdl_ldap_reconnect() and cleanup: */
+
+- CHECK(ldap_reconnect(ldap_inst, ldap_conn, force));
++ CHECK(bdl_ldap_reconnect(ldap_inst, ldap_conn, force));
+ return result;
+
+ cleanup:
+@@ -2861,8 +2861,8 @@ cleanup:
+ }
+
+ static isc_result_t ATTR_NONNULLS ATTR_CHECKRESULT
+-ldap_reconnect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,
+- bool force)
++bdl_ldap_reconnect(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn,
++ bool force)
+ {
+ isc_result_t result;
+ int ret = 0;
+@@ -3036,7 +3036,7 @@ handle_connection_error(ldap_instance_t *ldap_inst, ldap_connection_t *ldap_conn
+ reconnect:
+ if (ldap_conn->handle == NULL && force == false)
+ log_error("connection to the LDAP server was lost");
+- result = ldap_connect(ldap_inst, ldap_conn, force);
++ result = bdl_ldap_connect(ldap_inst, ldap_conn, force);
+ if (result == ISC_R_SUCCESS)
+ log_info("successfully reconnected to LDAP server");
+ break;
+@@ -3581,7 +3581,7 @@ remove_entry_from_ldap(dns_name_t *owner, dns_name_t *zone, ldap_instance_t *lda
+ * successful
+ * TODO: handle this case inside ldap_pool_getconnection()?
+ */
+- CHECK(ldap_connect(ldap_inst, ldap_conn, false));
++ CHECK(bdl_ldap_connect(ldap_inst, ldap_conn, false));
+ }
+ ret = ldap_delete_ext_s(ldap_conn->handle, str_buf(dn), NULL, NULL);
+ result = (ret == LDAP_SUCCESS) ? ISC_R_SUCCESS : ISC_R_FAILURE;
+@@ -3717,7 +3717,7 @@ ldap_pool_connect(ldap_pool_t *pool, ldap_instance_t *ldap_inst)
+ for (i = 0; i < pool->connections; i++) {
+ ldap_conn = NULL;
+ CHECK(new_ldap_connection(pool, &ldap_conn));
+- result = ldap_connect(ldap_inst, ldap_conn, false);
++ result = bdl_ldap_connect(ldap_inst, ldap_conn, false);
+ /* Continue even if LDAP server is down */
+ if (result != ISC_R_NOTCONNECTED && result != ISC_R_TIMEDOUT &&
+ result != ISC_R_SUCCESS) {
+@@ -4769,7 +4769,7 @@ ldap_syncrepl_watcher(isc_threadarg_t arg)
+ goto retry;
+ }
+
+- result = ldap_connect(inst, conn, true);
++ result = bdl_ldap_connect(inst, conn, true);
+ if (result != ISC_R_SUCCESS) {
+ log_error_r("reconnection to LDAP failed");
+ goto retry;
+
=====================================
debian/patches/series
=====================================
@@ -3,3 +3,4 @@ fix-werror-build.diff
support-9.16.9.diff
support-bind-9.16.11.diff
support-9.16.13.diff
+fix-ftbfs-openldap-2.5.diff
View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/compare/2afedf5246836b48b396273939051e5aa2fb1f88...70f44a1162a9eb82485b5914c5361a194f31f759
--
View it on GitLab: https://salsa.debian.org/freeipa-team/bind-dyndb-ldap/-/compare/2afedf5246836b48b396273939051e5aa2fb1f88...70f44a1162a9eb82485b5914c5361a194f31f759
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/20210514/e43c0878/attachment-0001.htm>
More information about the Pkg-freeipa-devel
mailing list