From 95b6bb2723c881536a35404b9f8f227b742a74c6 Mon Sep 17 00:00:00 2001 From: Michał Górny Date: Thu, 6 Sep 2018 22:54:19 +0200 Subject: sys-auth/nss-mdns: Clean old up --- sys-auth/nss-mdns/Manifest | 2 - .../files/nss-mdns-0.10-avahi-socket.patch | 14 - sys-auth/nss-mdns/files/nss-mdns-0.10-ipv6.patch | 528 --------------------- sys-auth/nss-mdns/metadata.xml | 4 - sys-auth/nss-mdns/nss-mdns-0.10-r3.ebuild | 57 --- sys-auth/nss-mdns/nss-mdns-0.11.ebuild | 54 --- 6 files changed, 659 deletions(-) delete mode 100644 sys-auth/nss-mdns/files/nss-mdns-0.10-avahi-socket.patch delete mode 100644 sys-auth/nss-mdns/files/nss-mdns-0.10-ipv6.patch delete mode 100644 sys-auth/nss-mdns/nss-mdns-0.10-r3.ebuild delete mode 100644 sys-auth/nss-mdns/nss-mdns-0.11.ebuild diff --git a/sys-auth/nss-mdns/Manifest b/sys-auth/nss-mdns/Manifest index 821d3ef0c5fa..b7a8af7b6309 100644 --- a/sys-auth/nss-mdns/Manifest +++ b/sys-auth/nss-mdns/Manifest @@ -1,3 +1 @@ -DIST nss-mdns-0.10.tar.gz 353130 BLAKE2B 88cc7cbc908f397bbf52f590946b3bc8bc4c71585c9a0a52648ae3dd23b3f5ca9fbd24f0fc7c34dff08d7a4c8d72fec94a51a65650bed41b07aec6c81220d517 SHA512 7c9f4150648dfab34bc6f8551e5b58b0b7065e4c1472efb8ce1b00b2bd75627e5928b2c199d9dae742abe839968a8774e39c7646f8ce855d342b4d90252efc0e -DIST nss-mdns-0.11.tar.gz 382059 BLAKE2B 5523c76d6f7364efde54b9bf303dfdf34c11b96c9348bfd4a62d095215e7d6f32e0d44e22d21677d51700d458a10f9c36f7ccecb7b4add04fcba629ee19abc21 SHA512 9dceb0f244c4cd27b04ca2014637873a0d137464c26780dfdb228502b06b310991494b115e42e1057c45478361d0e441ec73099fbf56a13a5933618b72390af4 DIST nss-mdns-0.13.tar.gz 380261 BLAKE2B 555b7b9df8ff15da423712fac04ccbc303395d38a07121906cf31871a8684c71e43809b80674a489d87397902a33f4d19b0ae49a4c384290bad227a24880476f SHA512 f1b379111fb758323179ea3e447d754e934308940b11a8402dfb6033264940d831266d15ae1ee0badfecd5cdc7f589b42e4363dfc058f5e62026017d97eb0a3b diff --git a/sys-auth/nss-mdns/files/nss-mdns-0.10-avahi-socket.patch b/sys-auth/nss-mdns/files/nss-mdns-0.10-avahi-socket.patch deleted file mode 100644 index 9ada93d2b8fb..000000000000 --- a/sys-auth/nss-mdns/files/nss-mdns-0.10-avahi-socket.patch +++ /dev/null @@ -1,14 +0,0 @@ -https://bugs.gentoo.org/159341 - -fix the full path to the socket run dir - ---- src/Makefile.am -+++ src/Makefile.am -@@ -20,7 +20,7 @@ - AM_CFLAGS = \ - -DMDNS_ALLOW_FILE=\"$(sysconfdir)/mdns.allow\" \ - -DRESOLV_CONF_FILE=\"$(sysconfdir)/resolv.conf\" \ -- -DAVAHI_SOCKET=\"$(localstatedir)/run/avahi-daemon/socket\" -+ -DAVAHI_SOCKET=\"/var/run/avahi-daemon/socket\" - - #AM_CFLAGS += -DNDEBUG=1 -Os diff --git a/sys-auth/nss-mdns/files/nss-mdns-0.10-ipv6.patch b/sys-auth/nss-mdns/files/nss-mdns-0.10-ipv6.patch deleted file mode 100644 index 6d6dbc9eab58..000000000000 --- a/sys-auth/nss-mdns/files/nss-mdns-0.10-ipv6.patch +++ /dev/null @@ -1,528 +0,0 @@ -diff -u src/avahi.c src/avahi.c ---- src/avahi.c 2006-04-29 05:14:09.000000000 +0800 -+++ src/avahi.c 2013-01-04 10:00:05.025558790 +0800 -@@ -26,6 +26,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -34,6 +35,7 @@ - - #include "avahi.h" - #include "util.h" -+#include "query.h" - - #define WHITESPACE " \t" - -@@ -93,7 +95,8 @@ - p = ln+1; - p += strspn(p, WHITESPACE); - -- /* Skip interface */ -+ /* Parse interface */ -+ if (af == AF_INET6) ((ipv6_address_t*)data)->if_idx = strtoul(p, 0, 10); - p += strcspn(p, WHITESPACE); - p += strspn(p, WHITESPACE); - -diff -u src/avahi-test.c src/avahi-test.c ---- src/avahi-test.c 2007-02-09 00:42:23.000000000 +0800 -+++ src/avahi-test.c 2013-01-04 09:59:06.174017729 +0800 -@@ -24,6 +24,7 @@ - #include - - #include "avahi.h" -+#include "query.h" - - int main(int argc, char *argv[]) { - uint8_t data[64]; -@@ -35,15 +36,20 @@ - else - printf("AF_INET: failed (%i).\n", r); - --/* if ((r = avahi_resolve_name(AF_INET6, argc >= 2 ? argv[1] : "cocaine.local", data)) == 0) */ --/* printf("AF_INET6: %s\n", inet_ntop(AF_INET6, data, t, sizeof(t))); */ --/* else */ --/* printf("AF_INET6: failed (%i).\n", r); */ -- - if ((r = avahi_resolve_address(AF_INET, data, t, sizeof(t))) == 0) - printf("REVERSE: %s\n", t); - else - printf("REVERSE: failed (%i).\n", r); -+ -+ if ((r = avahi_resolve_name(AF_INET6, argc >= 2 ? argv[1] : "cocaine.local", data)) == 0) -+ printf("AF_INET6: %s, %u\n", inet_ntop(AF_INET6, data, t, sizeof(t)), ((ipv6_address_t*)data)->if_idx); -+ else -+ printf("AF_INET6: failed (%i).\n", r); -+ -+ if ((r = avahi_resolve_address(AF_INET6, data, t, sizeof(t))) == 0) -+ printf("REVERSE: %s\n", t); -+ else -+ printf("REVERSE: failed (%i).\n", r); - - return 0; - } -diff -u src/bsdnss.c src/bsdnss.c ---- src/bsdnss.c 2007-02-09 00:42:23.000000000 +0800 -+++ src/bsdnss.c 2013-01-04 09:49:45.566389491 +0800 -@@ -258,6 +258,8 @@ - ai->ai_addrlen = sizeof(struct sockaddr_in6); - memcpy(&((struct sockaddr_in6 *)psa)->sin6_addr, hap, - ai->ai_addrlen); -+ if (((struct sockaddr_in6 *)psa)->sin6_addr[0] == 0xfe && ((struct sockaddr_in6 *)psa)->sin6_addr[0] == 0x80) -+ ((struct sockaddr_in6 *)psa)->sin6_scope_id = ((struct ipv6_address_t*) hap)->if_idx; - break; - default: - ai->ai_addrlen = sizeof(struct sockaddr_storage); -diff -u src/map-file src/map-file ---- src/map-file 2007-01-02 02:36:21.000000000 +0800 -+++ src/map-file 2013-01-07 08:56:56.406478774 +0800 -@@ -18,6 +18,12 @@ - _nss_mdns_minimal_gethostbyname2_r; - _nss_mdns4_minimal_gethostbyname2_r; - _nss_mdns6_minimal_gethostbyname2_r; -+_nss_mdns_gethostbyname4_r; -+_nss_mdns4_gethostbyname4_r; -+_nss_mdns6_gethostbyname4_r; -+_nss_mdns_minimal_gethostbyname4_r; -+_nss_mdns4_minimal_gethostbyname4_r; -+_nss_mdns6_minimal_gethostbyname4_r; - local: - *; - }; -diff -u src/nss.c src/nss.c ---- src/nss.c 2013-01-07 15:14:23.000000000 +0800 -+++ src/nss.c 2013-01-07 16:52:38.399842517 +0800 -@@ -41,22 +41,27 @@ - - #if defined(NSS_IPV4_ONLY) && ! defined(MDNS_MINIMAL) - #define _nss_mdns_gethostbyname2_r _nss_mdns4_gethostbyname2_r -+#define _nss_mdns_gethostbyname4_r _nss_mdns4_gethostbyname4_r - #define _nss_mdns_gethostbyname_r _nss_mdns4_gethostbyname_r - #define _nss_mdns_gethostbyaddr_r _nss_mdns4_gethostbyaddr_r - #elif defined(NSS_IPV4_ONLY) && defined(MDNS_MINIMAL) - #define _nss_mdns_gethostbyname2_r _nss_mdns4_minimal_gethostbyname2_r -+#define _nss_mdns_gethostbyname4_r _nss_mdns4_minimal_gethostbyname4_r - #define _nss_mdns_gethostbyname_r _nss_mdns4_minimal_gethostbyname_r - #define _nss_mdns_gethostbyaddr_r _nss_mdns4_minimal_gethostbyaddr_r - #elif defined(NSS_IPV6_ONLY) && ! defined(MDNS_MINIMAL) - #define _nss_mdns_gethostbyname2_r _nss_mdns6_gethostbyname2_r -+#define _nss_mdns_gethostbyname4_r _nss_mdns6_gethostbyname4_r - #define _nss_mdns_gethostbyname_r _nss_mdns6_gethostbyname_r - #define _nss_mdns_gethostbyaddr_r _nss_mdns6_gethostbyaddr_r - #elif defined(NSS_IPV6_ONLY) && defined(MDNS_MINIMAL) - #define _nss_mdns_gethostbyname2_r _nss_mdns6_minimal_gethostbyname2_r -+#define _nss_mdns_gethostbyname4_r _nss_mdns6_minimal_gethostbyname4_r - #define _nss_mdns_gethostbyname_r _nss_mdns6_minimal_gethostbyname_r - #define _nss_mdns_gethostbyaddr_r _nss_mdns6_minimal_gethostbyaddr_r - #elif defined(MDNS_MINIMAL) - #define _nss_mdns_gethostbyname2_r _nss_mdns_minimal_gethostbyname2_r -+#define _nss_mdns_gethostbyname4_r _nss_mdns_minimal_gethostbyname4_r - #define _nss_mdns_gethostbyname_r _nss_mdns_minimal_gethostbyname_r - #define _nss_mdns_gethostbyaddr_r _nss_mdns_minimal_gethostbyaddr_r - #endif -@@ -81,6 +86,12 @@ - char *name[MAX_ENTRIES]; - } data; - }; -+struct user_gai_buf { -+ struct gaih_addrtuple *list_base; -+ int list_size; -+ int list_idx; -+ int wrote_name; -+}; - - #ifndef NSS_IPV6_ONLY - static void ipv4_callback(const ipv4_address_t *ipv4, void *userdata) { -@@ -93,6 +104,21 @@ - u->data.ipv4[u->count++] = *ipv4; - u->data_len += sizeof(ipv4_address_t); - } -+static void ipv4_gai_callback(const ipv4_address_t *ipv4, void *userdata) { -+ struct user_gai_buf *u = userdata; -+ assert(ipv4 && userdata); -+ -+ if (u->list_idx+1 >= u->list_size) -+ return; -+ -+ u->list_base[u->list_idx].name = 0; -+ u->list_base[u->list_idx].family = AF_INET; -+ u->list_base[u->list_idx].addr[0] = ipv4->address; -+ u->list_base[u->list_idx].scopeid = 0; -+ if (u->list_idx > 0) u->list_base[u->list_idx-1].next = &u->list_base[u->list_idx]; -+ u->list_base[u->list_idx].next = 0; -+ u->list_idx += 1; -+} - #endif - - #ifndef NSS_IPV4_ONLY -@@ -106,6 +132,21 @@ - u->data.ipv6[u->count++] = *ipv6; - u->data_len += sizeof(ipv6_address_t); - } -+static void ipv6_gai_callback(const ipv6_address_t *ipv6, void *userdata) { -+ struct user_gai_buf *u = userdata; -+ assert(ipv6 && userdata); -+ -+ if (u->list_idx+1 >= u->list_size) -+ return; -+ -+ u->list_base[u->list_idx].name = 0; -+ u->list_base[u->list_idx].family = AF_INET6; -+ memcpy(u->list_base[u->list_idx].addr, ipv6->address, sizeof(u->list_base[u->list_idx].addr)); -+ u->list_base[u->list_idx].scopeid = ipv6->if_idx; -+ if (u->list_idx > 0) u->list_base[u->list_idx-1].next = &u->list_base[u->list_idx]; -+ u->list_base[u->list_idx].next = 0; -+ u->list_idx += 1; -+} - #endif - - static void name_callback(const char*name, void *userdata) { -@@ -538,6 +579,265 @@ - - status = NSS_STATUS_SUCCESS; - -+finish: -+#ifdef ENABLE_LEGACY -+ if (fd >= 0) -+ close(fd); -+#endif -+ -+ return status; -+} -+ -+enum nss_status _nss_mdns_gethostbyname4_r( -+ const char *name, -+ struct gaih_addrtuple **pat, -+ char *buffer, -+ size_t buflen, -+ int *errnop, -+ int *h_errnop, -+ int32_t *ttlp) { -+ -+ struct user_gai_buf u; -+ enum nss_status status = NSS_STATUS_UNAVAIL; -+ int i; -+ size_t l, idx; -+ void (*ipv4_func)(const ipv4_address_t *ipv4, void *userdata); -+ void (*ipv6_func)(const ipv6_address_t *ipv6, void *userdata); -+ int name_allowed; -+ int af = AF_UNSPEC; -+ -+#ifdef ENABLE_AVAHI -+ int avahi_works = 1; -+ void * data[32]; -+#endif -+ -+#ifdef ENABLE_LEGACY -+ int fd = -1; -+#endif -+ -+ if (pat) { -+ af = (*pat)->family; -+ } -+ -+/* DEBUG_TRAP; */ -+ -+#ifdef NSS_IPV6_ONLY -+ if (af == AF_UNSPEC) -+ af = AF_INET6; -+#endif -+ -+#ifdef NSS_IPV4_ONLY -+ if (af == AF_UNSPEC) -+ af = AF_INET; -+#endif -+ -+#ifdef NSS_IPV4_ONLY -+ if (af != AF_INET) -+#elif NSS_IPV6_ONLY -+ if (af != AF_INET6) -+#else -+ if (af != AF_INET && af != AF_INET6 && af != AF_UNSPEC) -+#endif -+ { -+ *errnop = EINVAL; -+ *h_errnop = NO_RECOVERY; -+ -+ goto finish; -+ } -+ -+ if (buflen < -+ sizeof(struct gaih_addrtuple)) { -+ -+ *errnop = ERANGE; -+ *h_errnop = NO_RECOVERY; -+ status = NSS_STATUS_TRYAGAIN; -+ -+ goto finish; -+ } -+ -+ u.list_base = (struct user_gai_buf*) buffer; -+ u.list_size = buflen / sizeof( struct user_gai_buf ); -+ u.list_idx = 0; -+ u.wrote_name = 0; -+ -+#ifdef NSS_IPV6_ONLY -+ ipv4_func = NULL; -+#else -+ ipv4_func = (af == AF_INET || af == AF_UNSPEC) ? ipv4_gai_callback : NULL; -+#endif -+ -+#ifdef NSS_IPV4_ONLY -+ ipv6_func = NULL; -+#else -+ ipv6_func = (af == AF_INET6 || af == AF_UNSPEC) ? ipv6_gai_callback : NULL; -+#endif -+ -+ name_allowed = verify_name_allowed(name); -+ -+#ifdef ENABLE_AVAHI -+ -+ if (avahi_works && name_allowed) { -+ int r; -+ -+ if (af == AF_INET || af == AF_UNSPEC) { -+ if ((r = avahi_resolve_name(AF_INET, name, data)) < 0) -+ avahi_works = 0; -+ else if (r == 0) { -+ if (ipv4_func) { -+ ipv4_func((ipv4_address_t*) data, &u); -+ } -+ } -+ else -+ status = NSS_STATUS_NOTFOUND; -+ } -+ if (af == AF_INET6 || af == AF_UNSPEC) { -+ if ((r = avahi_resolve_name(AF_INET6, name, data)) < 0) -+ avahi_works = 0; -+ else if (r == 0) { -+ if (ipv6_func) -+ ipv6_func((ipv6_address_t*)data, &u); -+ } -+ else -+ status = NSS_STATUS_NOTFOUND; -+ } -+ } -+ -+#ifdef HONOUR_SEARCH_DOMAINS -+ if (u.list_idx == 0 && avahi_works && !ends_with(name, ".")) { -+ char **domains; -+ -+ if ((domains = get_search_domains())) { -+ char **p; -+ -+ /* Try to concatenate host names */ -+ for (p = domains; *p; p++) { -+ int fullnamesize; -+ char *fullname; -+ -+ fullnamesize = strlen(name) + strlen(*p) + 2; -+ -+ if (!(fullname = malloc(fullnamesize))) -+ break; -+ -+ snprintf(fullname, fullnamesize, "%s.%s", name, *p); -+ -+ if (verify_name_allowed(fullname)) { -+ int r; -+ -+ if (af == AF_INET || af == AF_UNSPEC) { -+ r = avahi_resolve_name(AF_INET, fullname, data); -+ -+ if (r < 0) { -+ /* Lookup failed */ -+ avahi_works = 0; -+ free(fullname); -+ break; -+ } else if (r == 0) { -+ /* Lookup succeeded */ -+ if (ipv4_func) -+ ipv4_func((ipv4_address_t*) data, &u); -+ } -+ } -+ if (af == AF_INET6 || af == AF_UNSPEC) { -+ r = avahi_resolve_name(AF_INET6, fullname, data); -+ -+ if (r < 0) { -+ /* Lookup failed */ -+ avahi_works = 0; -+ free(fullname); -+ break; -+ } else if (r == 0) { -+ /* Lookup succeeded */ -+ if (ipv6_func) -+ ipv6_func((ipv6_address_t*)data, &u); -+ } -+ } -+ free(fullname); -+ if (u.list_idx > 0) break; -+ -+ } else -+ free(fullname); -+ } -+ -+ free_domains(domains); -+ } -+ } -+#endif /* HONOUR_SEARCH_DOMAINS */ -+#endif /* ENABLE_AVAHI */ -+ -+#if defined(ENABLE_LEGACY) && defined(ENABLE_AVAHI) -+ if (u.list_idx == 0 && !avahi_works) -+#endif -+ -+#if defined(ENABLE_LEGACY) -+ { -+ if ((fd = mdns_open_socket()) < 0) { -+ *errnop = errno; -+ *h_errnop = NO_RECOVERY; -+ goto finish; -+ } -+ -+ if (name_allowed) { -+ /* Ignore return value */ -+ mdns_query_name(fd, name, ipv4_func, ipv6_func, &u); -+ -+ if (!u.list_idx) -+ status = NSS_STATUS_NOTFOUND; -+ } -+ -+#ifdef HONOUR_SEARCH_DOMAINS -+ if (u.list_idx == 0 && !ends_with(name, ".")) { -+ char **domains; -+ -+ /* Try the search domains if the user did not use a traling '.' */ -+ -+ if ((domains = get_search_domains())) { -+ char **p; -+ -+ for (p = domains; *p; p++) { -+ int fullnamesize = 0; -+ char *fullname = NULL; -+ -+ fullnamesize = strlen(name) + strlen(*p) + 2; -+ if (!(fullname = malloc(fullnamesize))) -+ break; -+ -+ snprintf(fullname, fullnamesize, "%s.%s", name, *p); -+ -+ if (verify_name_allowed(fullname)) { -+ -+ /* Ignore return value */ -+ mdns_query_name(fd, fullname, ipv4_func, ipv6_func, &u); -+ -+ if (u.list_idx > 0) { -+ /* We found something, so let's quit */ -+ free(fullname); -+ break; -+ } else -+ status = NSS_STATUS_NOTFOUND; -+ -+ } -+ -+ free(fullname); -+ } -+ -+ free_domains(domains); -+ } -+ } -+#endif /* HONOUR_SEARCH_DOMAINS */ -+ } -+#endif /* ENABLE_LEGACY */ -+ -+ if (u.list_idx == 0) { -+ *errnop = ETIMEDOUT; -+ *h_errnop = HOST_NOT_FOUND; -+ goto finish; -+ } -+ -+ *pat = (struct gaih_addrtuple*) buffer; -+ -+ status = NSS_STATUS_SUCCESS; -+ - finish: - #ifdef ENABLE_LEGACY - if (fd >= 0) -diff -u src/query.c src/query.c ---- src/query.c 2007-02-09 00:42:23.000000000 +0800 -+++ src/query.c 2013-01-04 09:57:03.778972196 +0800 -@@ -263,7 +263,7 @@ - return n_sent; - } - --static int recv_dns_packet(int fd, struct dns_packet **ret_packet, uint8_t *ret_ttl, struct timeval *end) { -+static int recv_dns_packet(int fd, struct dns_packet **ret_packet, uint8_t *ret_ttl, uint32_t *if_idx, struct timeval *end) { - struct dns_packet *p= NULL; - struct msghdr msg; - struct iovec io; -@@ -286,6 +286,10 @@ - msg.msg_controllen = sizeof(aux); - msg.msg_flags = 0; - -+#ifndef IP_PKTINFO -+ *if_idx = 0; -+#endif -+ - for (;;) { - ssize_t l; - int r; -@@ -304,6 +308,14 @@ - *ret_ttl = (uint8_t) (*(uint32_t*) CMSG_DATA(cmsg)); - break; - } -+#ifdef IP_PKTINFO -+ if (cmsg->cmsg_level == IPPROTO_IP && cmsg->cmsg_type == IP_PKTINFO) -+ { -+ *if_idx = ((struct in_pktinfo*) CMSG_DATA(cmsg))->ipi_ifindex; -+ break; -+ } -+#endif -+ - } - - if (!cmsg) -@@ -427,9 +439,10 @@ - - while (!done) { - uint8_t ttl; -+ uint32_t if_idx; - int r; - -- if ((r = recv_dns_packet(fd, &p, &ttl, &end)) < 0) -+ if ((r = recv_dns_packet(fd, &p, &ttl, &if_idx, &end)) < 0) - return -1; - else if (r > 0) /* timeout */ - return 1; -@@ -488,6 +501,7 @@ - rdlength == sizeof(ipv6_address_t)) { - - ipv6_address_t ipv6; -+ ipv6.if_idx = if_idx; - - if (dns_packet_consume_bytes(p, &ipv6, sizeof(ipv6_address_t)) < 0) - break; -@@ -584,9 +598,10 @@ - - while (!done) { - uint8_t ttl; -+ uint32_t if_idx; - int r; - -- if ((r = recv_dns_packet(fd, &p, &ttl, &end)) < 0) -+ if ((r = recv_dns_packet(fd, &p, &ttl, &if_idx, &end)) < 0) - return -1; - else if (r > 0) /* timeout */ - return 1; -diff -u src/query.h src/query.h ---- src/query.h 2005-06-21 22:43:23.000000000 +0800 -+++ src/query.h 2013-01-03 14:09:22.138018327 +0800 -@@ -30,6 +30,7 @@ - - typedef struct { - uint8_t address[16]; -+ uint32_t if_idx; - } ipv6_address_t; - diff --git a/sys-auth/nss-mdns/metadata.xml b/sys-auth/nss-mdns/metadata.xml index a409ede683e9..0c9ca91ffcf5 100644 --- a/sys-auth/nss-mdns/metadata.xml +++ b/sys-auth/nss-mdns/metadata.xml @@ -8,10 +8,6 @@ mgorny@gentoo.org Michał Górny - - Honour search domains from - /etc/resolv.conf (see bug #201948 for possible side effects) - Name service switch module for multicast dns. diff --git a/sys-auth/nss-mdns/nss-mdns-0.10-r3.ebuild b/sys-auth/nss-mdns/nss-mdns-0.10-r3.ebuild deleted file mode 100644 index 4f91439d3705..000000000000 --- a/sys-auth/nss-mdns/nss-mdns-0.10-r3.ebuild +++ /dev/null @@ -1,57 +0,0 @@ -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI="5" -inherit autotools eutils multilib-minimal - -DESCRIPTION="Name Service Switch module for Multicast DNS" -HOMEPAGE="http://0pointer.de/lennart/projects/nss-mdns/" -SRC_URI="http://0pointer.de/lennart/projects/nss-mdns/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~hppa ~mips ppc x86" -IUSE="search-domains" - -RDEPEND=">=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" - -src_prepare() { - epatch "${FILESDIR}"/${PN}-0.10-avahi-socket.patch \ - "${FILESDIR}"/${PN}-0.10-ipv6.patch - epatch_user - eautoreconf -} - -multilib_src_configure() { - ECONF_SOURCE=${S} \ - econf \ - $(use_enable search-domains) \ - --enable-avahi -} - -multilib_src_install_all() { - dodoc README - - insinto /etc - doins "${FILESDIR}"/mdns.allow -} - -pkg_postinst() { - ewarn - ewarn "You must modify your name service switch look up file to enable" - ewarn "multicast DNS lookups. If you wish to resolve only IPv6 addresses" - ewarn "use mdns6. For IPv4 addresses only, use mdns4. To resolve both" - ewarn "use mdns. Keep in mind that mdns will be slower if there are no" - ewarn "IPv6 addresses published via mDNS on the network. There are also" - ewarn "minimal (mdns?_minimal) libraries which only lookup .local hosts" - ewarn "and 169.254.x.x addresses." - ewarn - ewarn "Add the appropriate mdns into the hosts line in /etc/nsswitch.conf" - ewarn "An example line looks like:" - ewarn "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4" - ewarn - ewarn "If you want to perform mDNS lookups for domains other than the ones" - ewarn "ending in .local, add them to /etc/mdns.allow" - ewarn -} diff --git a/sys-auth/nss-mdns/nss-mdns-0.11.ebuild b/sys-auth/nss-mdns/nss-mdns-0.11.ebuild deleted file mode 100644 index d93a77b414f8..000000000000 --- a/sys-auth/nss-mdns/nss-mdns-0.11.ebuild +++ /dev/null @@ -1,54 +0,0 @@ -# Copyright 1999-2018 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 -inherit multilib-minimal - -DESCRIPTION="Name Service Switch module for Multicast DNS" -HOMEPAGE="https://github.com/lathiat/nss-mdns" -SRC_URI="https://github.com/lathiat/nss-mdns/releases/download/v${PV}/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~arm ~hppa ~mips ~ppc ~x86" -IUSE="" - -RDEPEND=">=net-dns/avahi-0.6.31-r2[${MULTILIB_USEDEP}]" -DEPEND="${RDEPEND}" - -multilib_src_configure() { - local myconf=( - # $(localstatedir)/run/... is used to locate avahi-daemon socket - --localstatedir=/var - ) - - ECONF_SOURCE=${S} \ - econf "${myconf[@]}" -} - -# the check target only compiles manual-use test programs -src_test() { :; } - -multilib_src_install_all() { - dodoc *.md - - insinto /etc - doins "${FILESDIR}"/mdns.allow -} - -pkg_postinst() { - ewarn "You have to modify your name service switch look up file to enable" - ewarn "multicast DNS lookups. If you wish to resolve only IPv6 addresses" - ewarn "use mdns6. For IPv4 addresses only, use mdns4. To resolve both" - ewarn "use mdns. Keep in mind that mdns will be slower if there are no" - ewarn "IPv6 addresses published via mDNS on the network. There are also" - ewarn "minimal (mdns?_minimal) libraries which only lookup .local hosts" - ewarn "and 169.254.x.x addresses." - ewarn - ewarn "Add the appropriate mdns into the hosts line in /etc/nsswitch.conf." - ewarn "An example line looks like:" - ewarn "hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4" - ewarn - ewarn "If you want to perform mDNS lookups for domains other than the ones" - ewarn "ending in .local, add them to /etc/mdns.allow." -} -- cgit v1.2.3-65-gdbad