From bcd888789b111e3cabeabda5378e871134c7a927 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Wed, 28 Jul 2021 21:07:58 +0200 Subject: [PATCH] Add ns_get16() and ns_get32() to configure check Resolves: rhbz#1984892 --- ...ck-for-ns_get16-and-ns_get32-as-well.patch | 38 +++++++++++++++++++ adcli.spec | 9 ++++- 2 files changed, 46 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..22f8a6a --- /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.31.1 + diff --git a/adcli.spec b/adcli.spec index f876978..1b203c7 100644 --- a/adcli.spec +++ b/adcli.spec @@ -1,6 +1,6 @@ Name: adcli Version: 0.9.1 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Active Directory enrollment License: LGPLv2+ URL: https://gitlab.freedesktop.org/realmd/adcli @@ -25,6 +25,9 @@ Patch8: 0003-entry-add-passwd-user-sub-command.patch Patch9: 0004-Add-setattr-option.patch Patch10: 0005-Add-delattr-option.patch +# rhbz#1984892 - adcli: FTBFS because of libresolv changes in glibc 2.34 +Patch11: 0001-configure-check-for-ns_get16-and-ns_get32-as-well.patch + BuildRequires: gcc BuildRequires: intltool pkgconfig BuildRequires: libtool @@ -88,6 +91,10 @@ documentation. %doc %{_datadir}/doc/adcli/* %changelog +* Wed Jul 28 2021 Sumit Bose - 0.9.1-6 +- Add ns_get16() and ns_get32() to configure check + Resolves: rhbz#1984892 + * Wed Jun 30 2021 Sumit Bose - 0.9.1-5 - Sync with upstream/Fedora/RHEL-8.5 Resolves: rhbz#1977168, rhbz#1977167, rhbz#1977165