Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/nfs-utils/files/, net-fs/nfs-utils/
Date: Sat, 20 Apr 2019 23:40:19
Message-Id: 1555781717.7a98ed1ed020ce63dd299629d7d4a7827c2cdeef.polynomial-c@gentoo
1 commit: 7a98ed1ed020ce63dd299629d7d4a7827c2cdeef
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Sat Apr 20 17:34:52 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Sat Apr 20 17:35:17 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7a98ed1e
7
8 net-fs/nfs-utils: Fixed build on musl
9
10 Closes: https://bugs.gentoo.org/651080
11 Package-Manager: Portage-2.3.64, Repoman-2.3.12
12 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
13
14 ...-2.3.4_rc2-improved_res_querydomain_check.patch | 41 ++++++++++++++++++++++
15 net-fs/nfs-utils/nfs-utils-2.3.3.ebuild | 1 +
16 2 files changed, 42 insertions(+)
17
18 diff --git a/net-fs/nfs-utils/files/nfs-utils-2.3.4_rc2-improved_res_querydomain_check.patch b/net-fs/nfs-utils/files/nfs-utils-2.3.4_rc2-improved_res_querydomain_check.patch
19 new file mode 100644
20 index 00000000000..787a96fe89d
21 --- /dev/null
22 +++ b/net-fs/nfs-utils/files/nfs-utils-2.3.4_rc2-improved_res_querydomain_check.patch
23 @@ -0,0 +1,41 @@
24 +From 4f91877bb313a35ade44d9dde1fd219035ba1fd9 Mon Sep 17 00:00:00 2001
25 +From: Patrick Steinhardt <ps@×××.im>
26 +Date: Wed, 27 Feb 2019 11:58:47 -0500
27 +Subject: [PATCH] configure.ac: more carefully detect availability of
28 + res_querydomain(3)
29 +
30 +Since glibc 2.2, the function res_querydomain(3) is implemented as a
31 +define to `__res_querydomain`. Due to this implementation detail, using
32 +`AC_CHECK_LIB` with a symbol name of "res_querydomain" will cause a
33 +linking failure and thus fail to detect its availability. This is why
34 +right now, we try to detect availability of `__res_querydomain` instead.
35 +
36 +Unfortunately, this may break on other platforms where there is no
37 +`__res_querydomain` but only the function without leading underscores.
38 +To fix this, we can perform another `AC_CHECK_LIB([resolv],
39 +[res_querydomain], ...)` call in case where the other one was not found
40 +and only raise an error if both symbols weren't found.
41 +
42 +Signed-off-by: Patrick Steinhardt <ps@×××.im>
43 +Signed-off-by: Steve Dickson <steved@××××××.com>
44 +---
45 + configure.ac | 3 ++-
46 + 1 file changed, 2 insertions(+), 1 deletion(-)
47 +
48 +diff --git a/configure.ac b/configure.ac
49 +index 4bf5aea..cb9d921 100644
50 +--- a/configure.ac
51 ++++ b/configure.ac
52 +@@ -411,7 +411,8 @@ if test "$enable_gss" = yes; then
53 + fi
54 +
55 + dnl libdnsidmap specific checks
56 +-AC_CHECK_LIB([resolv], [__res_querydomain], , AC_MSG_ERROR(res_querydomain needed))
57 ++AC_CHECK_LIB([resolv], [__res_querydomain], ,
58 ++ AC_CHECK_LIB([resolv], [res_querydomain], , AC_MSG_ERROR(res_querydomain needed)))
59 +
60 + AC_ARG_ENABLE([ldap],
61 + [AS_HELP_STRING([--disable-ldap],[Disable support for LDAP @<:default=detect@:>@])])
62 +--
63 +1.8.3.1
64 +
65
66 diff --git a/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild b/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
67 index be66fe1e765..18852036dc2 100644
68 --- a/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
69 +++ b/net-fs/nfs-utils/nfs-utils-2.3.3.ebuild
70 @@ -68,6 +68,7 @@ PATCHES=(
71 "${FILESDIR}"/${PN}-1.2.8-cross-build.patch
72 "${FILESDIR}"/${PN}-2.3.2-junction_libs.patch
73 "${FILESDIR}"/${PN}-2.3.2-no-werror.patch
74 + "${FILESDIR}"/${PN}-2.3.4_rc2-improved_res_querydomain_check.patch #651080
75 )
76
77 src_prepare() {