From 29d1d662328b04dcd0b3aa3815de0eebb1930bdf Mon Sep 17 00:00:00 2001 From: Joe Orton Date: Tue, 1 Feb 2022 08:36:37 +0000 Subject: [PATCH] fix build with OpenLDAP 2.6 (#2032706) Resolves: rhbz#2032706 --- apr-util-1.6.1-r1894933.patch | 15 +++++++++++++++ apr-util.spec | 22 ++++++++++++++++++---- 2 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 apr-util-1.6.1-r1894933.patch diff --git a/apr-util-1.6.1-r1894933.patch b/apr-util-1.6.1-r1894933.patch new file mode 100644 index 0000000..435dd09 --- /dev/null +++ b/apr-util-1.6.1-r1894933.patch @@ -0,0 +1,15 @@ +# ./pullrev.sh 1894933 +http://svn.apache.org/viewvc?view=revision&revision=1894933 + +--- apr-1.6.1/xml/apr_xml.c ++++ apr-1.6.1/xml/apr_xml.c +@@ -457,8 +457,7 @@ + APU_DECLARE(apr_status_t) apr_xml_parser_done(apr_xml_parser *parser, + apr_xml_doc **pdoc) + { +- char end; +- apr_status_t status = do_parse(parser, &end, 0, 1 /* is_final */); ++ apr_status_t status = do_parse(parser, "", 0, 1 /* is_final */); + + /* get rid of the parser */ + (void) apr_pool_cleanup_run(parser->p, parser, cleanup_parser); diff --git a/apr-util.spec b/apr-util.spec index f8a6039..26d8ee6 100644 --- a/apr-util.spec +++ b/apr-util.spec @@ -11,16 +11,23 @@ %global with_nss 0 %endif +%if 0%{?fedora} < 36 && 0%{?rhel} <= 9 +%global ldaplib ldap_r +%else +%global ldaplib ldap +%endif + %define apuver 1 Summary: Apache Portable Runtime Utility library Name: apr-util Version: 1.6.1 -Release: 19%{?dist} +Release: 20%{?dist} License: ASL 2.0 URL: https://apr.apache.org/ Source0: https://www.apache.org/dist/apr/%{name}-%{version}.tar.bz2 Patch1: apr-util-1.2.7-pkgconf.patch +Patch2: apr-util-1.6.1-r1894933.patch Patch4: apr-util-1.4.1-private.patch Patch5: apr-util-mariadb-upstream.patch BuildRequires: gcc @@ -124,9 +131,12 @@ This package provides the NSS crypto support for the apr-util. %prep %setup -q %patch1 -p1 -b .pkgconf +%patch2 -p1 -b .r1894933 %patch4 -p1 -b .private %patch5 -p1 -b .maria +: Configured for LDAP library: %{ldaplib} + %build autoheader && autoconf # A fragile autoconf test which fails if the code trips @@ -134,16 +144,17 @@ autoheader && autoconf export ac_cv_ldap_set_rebind_proc_style=three %configure --with-apr=%{_prefix} \ --includedir=%{_includedir}/apr-%{apuver} \ - --with-ldap=ldap_r --without-gdbm \ + --with-ldap=%{ldaplib} --without-gdbm \ --with-sqlite3 --with-pgsql --with-mysql --with-odbc \ --with-dbm=db5 --with-berkeley-db \ --without-sqlite2 \ --with-crypto --with-openssl \ %if %{with_nss} - --with-nss + --with-nss \ %else - --without-nss + --without-nss \ %endif + || { cat config.log; exit 1; } %{make_build} %install @@ -220,6 +231,9 @@ export LD_LIBRARY_PATH=%{buildroot}/%{_libdir}/apr-util-%{apuver} %{_datadir}/aclocal/*.m4 %changelog +* Fri Jan 28 2022 Joe Orton - 1.6.1-20 +- fix build with OpenLDAP 2.6 (#2032706) + * Wed Jan 19 2022 Fedora Release Engineering - 1.6.1-19 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild