From 46b973c3b9bd7e819e5133270703db86d15c3742846493f8a746e8200557e0d8 Mon Sep 17 00:00:00 2001 From: Samuel Cabrero Date: Wed, 25 Aug 2021 10:39:26 +0000 Subject: [PATCH] Accepting request 911951 from home:scabrero:branches:network:ldap - Fix build with glibc 2.34; (bsc#1189080); Add patch 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch OBS-URL: https://build.opensuse.org/request/show/911951 OBS-URL: https://build.opensuse.org/package/show/network:ldap/adcli?expand=0&rev=16 --- ...ck-for-ns_get16-and-ns_get32-as-well.patch | 38 +++++++++++++++++++ adcli.changes | 6 +++ adcli.spec | 4 +- 3 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch diff --git a/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch b/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch new file mode 100644 index 0000000..95e26bf --- /dev/null +++ b/0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch @@ -0,0 +1,38 @@ +From e841ba7513f3f8b6393183d2dea9adcbf7ba2e44 Mon Sep 17 00:00:00 2001 +From: Sumit Bose +Date: Wed, 28 Jul 2021 12:55:16 +0200 +Subject: [PATCH] configure: check for ns_get16 and ns_get32 as well + +With newer versions of glibc res_query() might ba already available in +glibc with ns_get16() and ns_get32() still requires libresolv. + +Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1984891 +--- + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index c6ff31d..fc6e790 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -98,13 +98,15 @@ AC_SUBST(LDAP_CFLAGS) + # ------------------------------------------------------------------- + # resolv + +-AC_MSG_CHECKING(for which library has res_query) ++AC_MSG_CHECKING([for which library has res_query, ns_get16 and ns_get32]) + for lib in "" "-lresolv"; do + saved_LIBS="$LIBS" + LIBS="$LIBS $lib" + AC_LINK_IFELSE([ + AC_LANG_PROGRAM([#include ], +- [res_query (0, 0, 0, 0, 0)]) ++ [res_query (0, 0, 0, 0, 0); ++ ns_get32 (NULL); ++ ns_get16 (NULL);]) + ], + [ AC_MSG_RESULT(${lib:-libc}); have_res_query="yes"; break; ], + [ LIBS="$saved_LIBS" ]) +-- +2.32.0 + diff --git a/adcli.changes b/adcli.changes index 2e67883..d8e29f5 100644 --- a/adcli.changes +++ b/adcli.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 13 08:46:13 UTC 2021 - Samuel Cabrero + +- Fix build with glibc 2.34; (bsc#1189080); Add patch + 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch + ------------------------------------------------------------------- Mon Mar 22 22:45:53 UTC 2021 - Andreas Stieger diff --git a/adcli.spec b/adcli.spec index f679b90..2284cdc 100644 --- a/adcli.spec +++ b/adcli.spec @@ -29,6 +29,8 @@ Source0: https://gitlab.freedesktop.org/sbose/adcli/uploads/%{filehash}/% Source2: https://gitlab.freedesktop.org/sbose/adcli/uploads/%{sighash}/%{name}-%{version}.tar.gz.sig # https://keys.openpgp.org/vks/v1/by-fingerprint/4A21C23848CDC107F487939849236C40EE9D57EB Source3: %{name}.keyring +Patch1: 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch +BuildRequires: automake BuildRequires: libxslt-tools BuildRequires: openldap2-devel BuildRequires: pkgconfig @@ -52,7 +54,7 @@ Among other things it can be used to join a computer to a domain. This package contains the documentation for adcli. %prep -%setup -q +%autosetup -p1 %build %configure \