diff --git a/nfs-utils-2.3.4-carefully-detect-of-res_querydomain.patch b/nfs-utils-2.3.4-carefully-detect-of-res_querydomain.patch new file mode 100644 index 0000000000000000000000000000000000000000..65f92de46f033d33cf09494c5c2dd031b87e208b --- /dev/null +++ b/nfs-utils-2.3.4-carefully-detect-of-res_querydomain.patch @@ -0,0 +1,41 @@ +From 4f91877bb313a35ade44d9dde1fd219035ba1fd9 Mon Sep 17 00:00:00 2001 +From: Patrick Steinhardt +Date: Wed, 27 Feb 2019 11:58:47 -0500 +Subject: [PATCH] configure.ac: more carefully detect availability of + res_querydomain(3) + +Since glibc 2.2, the function res_querydomain(3) is implemented as a +define to `__res_querydomain`. Due to this implementation detail, using +`AC_CHECK_LIB` with a symbol name of "res_querydomain" will cause a +linking failure and thus fail to detect its availability. This is why +right now, we try to detect availability of `__res_querydomain` instead. + +Unfortunately, this may break on other platforms where there is no +`__res_querydomain` but only the function without leading underscores. +To fix this, we can perform another `AC_CHECK_LIB([resolv], +[res_querydomain], ...)` call in case where the other one was not found +and only raise an error if both symbols weren't found. + +Signed-off-by: Patrick Steinhardt +Signed-off-by: Steve Dickson +--- + configure.ac | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 4bf5aea..cb9d921 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -411,7 +411,8 @@ if test "$enable_gss" = yes; then + fi + + dnl libdnsidmap specific checks +-AC_CHECK_LIB([resolv], [__res_querydomain], , AC_MSG_ERROR(res_querydomain needed)) ++AC_CHECK_LIB([resolv], [__res_querydomain], , ++ AC_CHECK_LIB([resolv], [res_querydomain], , AC_MSG_ERROR(res_querydomain needed))) + + AC_ARG_ENABLE([ldap], + [AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])]) +-- +1.8.3.1 + diff --git a/nfs-utils.spec b/nfs-utils.spec index d2e32d025655061e677a7eb1f975f25de49b55e4..748251c1456e48c7af963a179e555a3f63cfce29 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -1,4 +1,4 @@ -%define anolis_release .0.3 +%define anolis_release .0.4 Summary: NFS utilities and supporting clients and daemons for the kernel NFS server Name: nfs-utils @@ -128,6 +128,7 @@ Patch1001: 1001-nfs-utils-gcc10.patch # backport patch from upstream Patch1002: 1002-Allow-compilation-to-succeed-with-fno-common.patch Patch1003: 0001-nfs-disable-v4client-for-loongarch.patch +Patch1004: nfs-utils-2.3.4-carefully-detect-of-res_querydomain.patch # End: Anolis customized patches Provides: exportfs = %{epoch}:%{version}-%{release} @@ -430,6 +431,9 @@ fi %{_libdir}/libnfsidmap.so %changelog +* Tue Jun 25 2024 Weisson 2.3.3-59.0.4 +- more carefully detect availability of res_querydomain(3). + * Mon Jan 22 2024 yuanhui 2.3.3-59.0.3 - LifseaOS: Remove Python dependencies and gssproxy package