From ceeeb463cc1eef97fd62eaee8bf2196ba04bc384 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 29 Feb 2020 18:01:47 +0000 Subject: gentoo (leap year) resync : 29.02.2020 --- sys-auth/libnss-nis/Manifest | 3 +- .../files/libnss-nis-1.4-glibc-2.30.patch | 157 +++++++++++++++++++++ sys-auth/libnss-nis/libnss-nis-1.4.ebuild | 4 +- 3 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 sys-auth/libnss-nis/files/libnss-nis-1.4-glibc-2.30.patch (limited to 'sys-auth/libnss-nis') diff --git a/sys-auth/libnss-nis/Manifest b/sys-auth/libnss-nis/Manifest index d81b1e340d87..68edcf908042 100644 --- a/sys-auth/libnss-nis/Manifest +++ b/sys-auth/libnss-nis/Manifest @@ -1,3 +1,4 @@ +AUX libnss-nis-1.4-glibc-2.30.patch 5087 BLAKE2B d77c5dd017ea749316dd2e6bda57db7cd76625add78bebfa21a6454b8bc35ba827906ac2b0e2fd30c34595d22d633fae810fd21d27dbd0593e108377347d858a SHA512 df2503420f1499510f9e59f9615bf2904ebd7a07a6197413127643f4dc29420b33cefcceb356eca9029f206cc01d1e410b2656c57ae8304a099d3f1770803282 DIST libnss-nis-1.4.tar.gz 209887 BLAKE2B ca9c2d66080568cc7748b4df4b0318687cf9dac5717c84a8e84d033a3a0aa0d59b3159c55ad2e1513e161b40acea59c3df8cddaea1ff4897a0599777179bd7f2 SHA512 56338a1dd60b756fb40e7e08c0d7d49ce98b47f684e7278aaf1a521a74f02b23cc73908adbd6ff88057f2f0e42301f827f888fc7af82aa57ff9449a05de73b75 -EBUILD libnss-nis-1.4.ebuild 861 BLAKE2B 044d84d288409624f6780a91b926ca95033a57b2740302ed35ab633dff5eff39acb8c9ff178d63d940ed10fd15574557830c5c82c724405d6e2ba0382b0ef60e SHA512 dc7f01b79a2230a0605df7a8978bfdea4ed58310bf61c6c4d58fe68f019a9bf80f6992459b61aeed2fe481eecc44101512208a1f9fc20c6e0bdcb0b3f296e064 +EBUILD libnss-nis-1.4.ebuild 910 BLAKE2B 2a1156292a512caed163acafab28dbde0f2c5fd38fce69540e0045a193926d73b317af4af8141dd01920c1994d9bf731ed697c4da8175c71820bea83aa8c4a49 SHA512 29410bc8fc3e0634192b24416e10dea7c54103d6e36de25d38b1aa7f4779979d9d201d3d4b79db7d40d3cf639c9df3d01d4ea35795ee881833a8fcef93d14d83 MISC metadata.xml 221 BLAKE2B 79f6de476af31c1da59c7aeebab26fa0db49c902398f6f73beeca03d3077820240bc51a25d2945642d9a07470470f2ca9548c2d8f1c63a8592966f6df9955926 SHA512 edb14bd2dae6ad57f77c07fc601cf2782589165c7e48e1e123eff7e47044febfdb1e19d18cd0b240fd2ca494e3401b5aa1f1243480769e0faf5dbfa377d20a3b diff --git a/sys-auth/libnss-nis/files/libnss-nis-1.4-glibc-2.30.patch b/sys-auth/libnss-nis/files/libnss-nis-1.4-glibc-2.30.patch new file mode 100644 index 000000000000..ac8d497ecb4c --- /dev/null +++ b/sys-auth/libnss-nis/files/libnss-nis-1.4-glibc-2.30.patch @@ -0,0 +1,157 @@ +From e9f0f4286d5a923eca1a9c84ff125268d144822e Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Thu, 25 Jul 2019 12:10:56 -0700 +Subject: [PATCH] nis-hosts: Remove use of RES_USE_INET6 + +Upstream glibc dropped it starting glibc 2.30 +see +https://sourceware.org/git/?p=glibc.git;a=commit;h=3f8b44be0a658266adff5ece1e4bc3ce097a5dbe + +Fixes issue #6 + +Signed-off-by: Khem Raj +--- + src/nis-hosts.c | 55 ++++++++++++------------------------------------- + 1 file changed, 13 insertions(+), 42 deletions(-) + +diff --git a/src/nis-hosts.c b/src/nis-hosts.c +index 307b46e..bd3c4ad 100644 +--- a/src/nis-hosts.c ++++ b/src/nis-hosts.c +@@ -35,15 +35,12 @@ + #include "libc-lock.h" + #include "nss-nis.h" + +-/* Get implementation for some internal functions. */ +-#include "mapv4v6addr.h" +- + #define ENTNAME hostent + #define DATABASE "hosts" + #define NEED_H_ERRNO + +-#define EXTRA_ARGS , af, flags +-#define EXTRA_ARGS_DECL , int af, int flags ++#define EXTRA_ARGS , af ++#define EXTRA_ARGS_DECL , int af + + #define ENTDATA hostent_data + struct hostent_data +@@ -67,19 +64,8 @@ LINE_PARSER + /* Parse address. */ + if (af != AF_INET6 && inet_pton (AF_INET, addr, entdata->host_addr) > 0) + { +- assert ((flags & AI_V4MAPPED) == 0 || af != AF_UNSPEC); +- if (flags & AI_V4MAPPED) +- { +- map_v4v6_address ((char *) entdata->host_addr, +- (char *) entdata->host_addr); +- result->h_addrtype = AF_INET6; +- result->h_length = IN6ADDRSZ; +- } +- else +- { +- result->h_addrtype = AF_INET; +- result->h_length = INADDRSZ; +- } ++ result->h_addrtype = AF_INET; ++ result->h_length = INADDRSZ; + } + else if (af != AF_INET + && inet_pton (AF_INET6, addr, entdata->host_addr) > 0) +@@ -134,7 +120,7 @@ strong_alias (_nss_nis_sethostent, _nss_nis_endhostent) + static enum nss_status + internal_nis_gethostent_r (struct hostent *host, char *buffer, + size_t buflen, int *errnop, int *h_errnop, +- int af, int flags) ++ int af) + { + char *domain; + if (yp_get_default_domain (&domain)) +@@ -203,7 +189,7 @@ internal_nis_gethostent_r (struct hostent *host, char *buffer, + ++p; + free (result); + +- parse_res = parse_line (p, host, data, buflen, errnop, af, flags); ++ parse_res = parse_line (p, host, data, buflen, errnop, af); + if (parse_res == -1) + { + free (outkey); +@@ -232,8 +218,7 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, size_t buflen, + __libc_lock_lock (lock); + + status = internal_nis_gethostent_r (host, buffer, buflen, errnop, h_errnop, +- ((_res.options & RES_USE_INET6) ? AF_INET6 : AF_INET), +- ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0 )); ++ AF_INET); + + __libc_lock_unlock (lock); + +@@ -244,7 +229,7 @@ _nss_nis_gethostent_r (struct hostent *host, char *buffer, size_t buflen, + static enum nss_status + internal_gethostbyname2_r (const char *name, int af, struct hostent *host, + char *buffer, size_t buflen, int *errnop, +- int *h_errnop, int flags) ++ int *h_errnop) + { + uintptr_t pad = -(uintptr_t) buffer % __alignof__ (struct parser_data); + buffer += pad; +@@ -318,7 +303,7 @@ internal_gethostbyname2_r (const char *name, int af, struct hostent *host, + ++p; + free (result); + +- int parse_res = parse_line (p, host, data, buflen, errnop, af, flags); ++ int parse_res = parse_line (p, host, data, buflen, errnop, af); + + if (parse_res < 1 || host->h_addrtype != af) + { +@@ -351,8 +336,7 @@ _nss_nis_gethostbyname2_r (const char *name, int af, struct hostent *host, + } + + return internal_gethostbyname2_r (name, af, host, buffer, buflen, errnop, +- h_errnop, +- ((_res.options & RES_USE_INET6) ? AI_V4MAPPED : 0)); ++ h_errnop); + } + + +@@ -360,18 +344,8 @@ enum nss_status + _nss_nis_gethostbyname_r (const char *name, struct hostent *host, char *buffer, + size_t buflen, int *errnop, int *h_errnop) + { +- if (_res.options & RES_USE_INET6) +- { +- enum nss_status status; +- +- status = internal_gethostbyname2_r (name, AF_INET6, host, buffer, buflen, +- errnop, h_errnop, AI_V4MAPPED); +- if (status == NSS_STATUS_SUCCESS) +- return status; +- } +- + return internal_gethostbyname2_r (name, AF_INET, host, buffer, buflen, +- errnop, h_errnop, 0); ++ errnop, h_errnop); + } + + +@@ -433,9 +407,7 @@ _nss_nis_gethostbyaddr_r (const void *addr, socklen_t addrlen, int af, + ++p; + free (result); + +- int parse_res = parse_line (p, host, data, buflen, errnop, af, +- ((_res.options & RES_USE_INET6) +- ? AI_V4MAPPED : 0)); ++ int parse_res = parse_line (p, host, data, buflen, errnop, af); + if (parse_res < 1) + { + if (parse_res == -1) +@@ -532,8 +504,7 @@ _nss_nis_gethostbyname4_r (const char *name, struct gaih_addrtuple **pat, + buflen -= pad; + + struct hostent host; +- int parse_res = parse_line (result, &host, data, buflen, errnop, AF_UNSPEC, +- 0); ++ int parse_res = parse_line (result, &host, data, buflen, errnop, AF_UNSPEC); + if (parse_res < 1) + { + if (parse_res == -1) diff --git a/sys-auth/libnss-nis/libnss-nis-1.4.ebuild b/sys-auth/libnss-nis/libnss-nis-1.4.ebuild index 2e568b159b39..859bbcea81f5 100644 --- a/sys-auth/libnss-nis/libnss-nis-1.4.ebuild +++ b/sys-auth/libnss-nis/libnss-nis-1.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -24,6 +24,8 @@ DEPEND="${RDEPEND} S=${WORKDIR}/libnss_nis-${PV} +PATCHES=( "${FILESDIR}/${P}-glibc-2.30.patch" ) + src_prepare() { default eautoreconf -- cgit v1.2.3