diff --git a/freeipa-openldap-2.6.patch b/freeipa-openldap-2.6.patch new file mode 100644 index 0000000..fec6d6c --- /dev/null +++ b/freeipa-openldap-2.6.patch @@ -0,0 +1,44 @@ +From f0191040616e6fe58fef5b20b7d9c284de913be7 Mon Sep 17 00:00:00 2001 +From: Alexander Bokovoy +Date: Tue, 11 Jan 2022 16:10:24 +0200 +Subject: [PATCH] Support building against OpenLDAP 2.6+ + +OpenLDAP 2.6 deprecated separate libldap/libldap_r, there is only one +(reentrant) variant for the library. + +Attempt to use _r variant by default. In case it is missing, assume we +are using OpenLDAP 2.6 which has libraries without _r suffix. The +functions are still reentrant so there is not functional difference. + +Fixes: https://pagure.io/freeipa/issue/9080 + +Signed-off-by: Alexander Bokovoy +Reviewed-By: Rob Crittenden +--- + configure.ac | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1ae4dc8dd..a64b434fe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -101,9 +101,13 @@ dnl --------------------------------------------------------------------------- + + SAVE_CPPFLAGS=$CPPFLAGS + CPPFLAGS="$NSPR_CFLAGS $NSS_CFLAGS" +-AC_CHECK_LIB([ldap_r], [ldap_search], [ ], AC_MSG_ERROR([libldap_r not found])) +-AC_CHECK_LIB([lber], [ber_peek_tag], [ ], AC_MSG_ERROR([liblber not found])) +-LDAP_LIBS="-lldap_r -llber" ++SAVE_LIBS="$LIBS" ++LIBS= ++AC_SEARCH_LIBS([ldap_search], [ldap_r ldap], [], [AC_MSG_ERROR([libldap or libldap_r not found])]) ++AC_SEARCH_LIBS([ber_peek_tag], [lber], [], [AC_MSG_ERROR([liblber not found])]) ++LDAP_LIBS="$LIBS" ++LDAP_CFLAGS="" ++LIBS="$SAVE_LIBS" + LDAP_CFLAGS="" + AC_SUBST(LDAP_LIBS) + AC_SUBST(LDAP_CFLAGS) +-- +2.33.1 + diff --git a/freeipa.spec b/freeipa.spec index 6fbbdfe..f6d0f06 100644 --- a/freeipa.spec +++ b/freeipa.spec @@ -196,7 +196,7 @@ Name: %{package_name} Version: %{IPA_VERSION} -Release: 1%{?rc_version:.%rc_version}%{?dist} +Release: 2%{?rc_version:.%rc_version}%{?dist} Summary: The Identity, Policy and Audit system License: GPLv3+ @@ -207,6 +207,8 @@ Source0: https://releases.pagure.org/freeipa/freeipa-%{version}%{?rc_vers Source1: https://releases.pagure.org/freeipa/freeipa-%{version}%{?rc_version}.tar.gz.asc %endif +Patch0001: freeipa-openldap-2.6.patch + # RHEL spec file only: START: Change branding to IPA and Identity Management # Moved branding logos and background to redhat-logos-ipa-80.4: # header-logo.png, login-screen-background.jpg, login-screen-logo.png, @@ -1703,6 +1705,10 @@ fi %endif %changelog +* Wed Jan 12 2022 Alexander Bokovoy - 4.9.8-2 +- Make possible to compile FreeIPA against OpenLDAP 2.6 +- Resolves: rhbz#2032701 + * Fri Nov 26 2021 Alexander Bokovoy - 4.9.8-1 - Upstream release FreeIPA 4.9.8