1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-03 06:04:53 +00:00

- Switch to Github repository as new upstream

- Update to git snapshot 99c2f1c
- Remove patches, already merged upstream
- Remove SEARCH_DOMAINS option
- Remove unsupported CONFIGURE_ARGS
- Add WWW entry to pkg-descr

Thanks to Greg V for working with upstream in upstreaming
the patches and additional fixes

PR:		211738
This commit is contained in:
Ashish SHUKLA 2020-06-26 20:30:11 +00:00
parent 940201ec67
commit 79d677c82d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=540541
7 changed files with 19 additions and 211 deletions

View File

@ -2,10 +2,8 @@
# $FreeBSD$
PORTNAME= nss_mdns
PORTVERSION= 0.10
PORTREVISION= 3
PORTVERSION= 0.14.1.20200624
CATEGORIES= dns
MASTER_SITES= http://0pointer.de/lennart/projects/nss-mdns/
DISTNAME= nss-mdns-${PORTVERSION}
MAINTAINER= ashish@FreeBSD.org
@ -16,44 +14,42 @@ LICENSE_FILE= ${WRKSRC}/LICENSE
LIB_DEPENDS= libavahi-client.so:net/avahi-app
USES= autoreconf gmake libtool pkgconfig
CONFLICTS_INSTALL= mDNSResponder_nss-[0-9]*
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
USES= autoreconf gmake libtool
USE_LDCONFIG= yes
OPTIONS_DEFINE= SEARCH_DOMAINS DOCS
SEARCH_DOMAINS_DESC= Honour search domains in resolv.conf
USE_GITHUB= yes
GH_ACCOUNT= lathiat
GH_PROJECT= nss-mdns
GH_TAGNAME= 99c2f1c
OPTIONS_DEFINE= DOCS
CONFIGURE_ARGS+= \
--sysconfdir=/etc \
--localstatedir=/var \
--enable-avahi \
--disable-legacy \
--disable-lynx
--localstatedir=/var
INSTALLED_MODULES=nss_mdns nss_mdns_minimal
INSTALLED_MODULES= nss_mdns nss_mdns_minimal \
nss_mdns4 nss_mdns4_minimal \
nss_mdns6 nss_mdns6_minimal
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MSEARCH_DOMAINS}
CONFIGURE_ARGS+= --enable-search-domains
.endif
post-install:
.for INSTALLED_MODULE in ${INSTALLED_MODULES}
${LN} -s ${INSTALLED_MODULE}.so.1 ${STAGEDIR}${PREFIX}/lib/${INSTALLED_MODULE}.so
.endfor
.if ${PORT_OPTIONS:MDOCS}
${MKDIR} ${STAGEDIR}${DOCSDIR}/
${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/README ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${INSTALL_WRKSRC}/doc/README.html ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${INSTALL_WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}
.endif
# TODO: Print a message about the etc directory used for mdns.allow
# being relative to ${PREFIX}.
PLIST_FILES= ${INSTALLED_MODULES:C/^/lib\//:C/$/.so/} ${INSTALLED_MODULES:C/^/lib\//:C/$/.so.1/}
PORTDOCS= README README.html
PORTDOCS= README.md
.include <bsd.port.mk>

View File

@ -1,2 +1,3 @@
SHA256 (nss-mdns-0.10.tar.gz) = 1e683c2e7c3921814706d62fbbd3e9cbf493a75fa00255e0e715508d8134fa6d
SIZE (nss-mdns-0.10.tar.gz) = 353130
TIMESTAMP = 1593199547
SHA256 (lathiat-nss-mdns-0.14.1.20200624-99c2f1c_GH0.tar.gz) = 6767b4a739c8cdaaa793adb625455e55c3d38e98f11c71bd97a3a9626eb4d39a
SIZE (lathiat-nss-mdns-0.14.1.20200624-99c2f1c_GH0.tar.gz) = 30253

View File

@ -1,24 +0,0 @@
--- src/Makefile.am.orig 2007-02-08 16:42:23.000000000 +0000
+++ src/Makefile.am 2008-10-13 23:23:25.000000000 +0100
@@ -36,11 +36,7 @@
if FREEBSD_NSS
lib_LTLIBRARIES += \
nss_mdns.la \
- nss_mdns4.la \
- nss_mdns6.la \
- nss_mdns_minimal.la \
- nss_mdns4_minimal.la \
- nss_mdns6_minimal.la
+ nss_mdns_minimal.la
else
lib_LTLIBRARIES += \
libnss_mdns.la \
@@ -90,7 +86,7 @@
libnss_mdns6_minimal_la_LDFLAGS=$(libnss_mdns_la_LDFLAGS)
# FreeBSD
-nss_mdns_la_SOURCES=$(sources) bsdnss.c
+nss_mdns_la_SOURCES=$(sources) bsdnss.c nss.c
nss_mdns_la_CFLAGS=$(AM_CFLAGS)
nss_mdns_la_LDFLAGS=$(AM_LDFLAGS) -shrext .so.1

View File

@ -1,73 +0,0 @@
--- src/bsdnss.c.orig 2007-02-08 16:42:23.000000000 +0000
+++ src/bsdnss.c 2008-10-07 23:38:41.000000000 +0100
@@ -45,6 +45,7 @@
#include <netinet/in.h>
#include <netdb.h>
+#include "nss_gethostname_select.h"
#include "config.h"
#ifdef MDNS_MINIMAL
@@ -80,37 +81,6 @@
ns_mtab *nss_module_register(const char *source, unsigned int *mtabsize,
nss_module_unregister_fn *unreg);
-extern enum nss_status _nss_mdns_gethostbyname_r (const char *name, struct hostent * result,
- char *buffer, size_t buflen, int *errnop,
- int *h_errnop);
-
-extern enum nss_status _nss_mdns_gethostbyname2_r (const char *name, int af, struct hostent * result,
- char *buffer, size_t buflen, int *errnop,
- int *h_errnop);
-extern enum nss_status _nss_mdns_gethostbyaddr_r (struct in_addr * addr, int len, int type,
- struct hostent * result, char *buffer,
- size_t buflen, int *errnop, int *h_errnop);
-extern enum nss_status _nss_mdns4_gethostbyname_r (const char *name, struct hostent * result,
- char *buffer, size_t buflen, int *errnop,
- int *h_errnop);
-
-extern enum nss_status _nss_mdns4_gethostbyname2_r (const char *name, int af, struct hostent * result,
- char *buffer, size_t buflen, int *errnop,
- int *h_errnop);
-extern enum nss_status _nss_mdns4_gethostbyaddr_r (struct in_addr * addr, int len, int type,
- struct hostent * result, char *buffer,
- size_t buflen, int *errnop, int *h_errnop);
-extern enum nss_status _nss_mdns6_gethostbyname_r (const char *name, struct hostent * result,
- char *buffer, size_t buflen, int *errnop,
- int *h_errnop);
-
-extern enum nss_status _nss_mdns6_gethostbyname2_r (const char *name, int af, struct hostent * result,
- char *buffer, size_t buflen, int *errnop,
- int *h_errnop);
-extern enum nss_status _nss_mdns6_gethostbyaddr_r (struct in_addr * addr, int len, int type,
- struct hostent * result, char *buffer,
- size_t buflen, int *errnop, int *h_errnop);
-
typedef enum nss_status (*_bsd_nsstub_fn_t)(const char *, struct hostent *, char *, size_t, int *, int *);
/* XXX: FreeBSD 5.x is not supported. */
@@ -219,22 +189,8 @@
* 2. Map hostent to addrinfo.
* 3. Hand-off buffer to libc.
*/
- switch (pai->ai_family) {
- case AF_UNSPEC:
- status = _nss_mdns_gethostbyname_r(name, hp, buffer, mbuflen,
- &_errno, &_h_errno);
- break;
- case AF_INET:
- status = _nss_mdns4_gethostbyname_r(name, hp, buffer, mbuflen,
- &_errno, &_h_errno);
- break;
- case AF_INET6:
- status = _nss_mdns6_gethostbyname_r(name, hp, buffer, mbuflen,
- &_errno, &_h_errno);
- break;
- default:
- break;
- }
+ status = _nss_mdns_gethostbyname2_r(name, pai->ai_family, hp, buffer,
+ mbuflen, &_errno, &_h_errno);
status = __nss_compat_result(status, _errno);
if (status == NS_SUCCESS) {

View File

@ -1,39 +0,0 @@
--- src/nss.c.orig 2008-10-06 23:16:19.000000000 +0100
+++ src/nss.c 2008-10-07 22:15:07.000000000 +0100
@@ -23,6 +23,7 @@
#include <config.h>
#endif
+#include <netinet/in.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
@@ -39,27 +40,7 @@
#include "avahi.h"
#endif
-#if defined(NSS_IPV4_ONLY) && ! defined(MDNS_MINIMAL)
-#define _nss_mdns_gethostbyname2_r _nss_mdns4_gethostbyname2_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_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_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_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_gethostbyname_r _nss_mdns_minimal_gethostbyname_r
-#define _nss_mdns_gethostbyaddr_r _nss_mdns_minimal_gethostbyaddr_r
-#endif
+#include "nss_gethostname_select.h"
/* Maximum number of entries to return */
#define MAX_ENTRIES 16

View File

@ -1,55 +0,0 @@
--- src/nss_gethostname_select.h.orig 2008-10-07 22:27:59.000000000 +0100
+++ src/nss_gethostname_select.h 2008-10-07 22:22:10.000000000 +0100
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/***
+ This file is part of nss-mdns.
+
+ nss-mdns is free software; you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as published
+ by the Free Software Foundation; either version 2 of the License,
+ or (at your option) any later version.
+
+ nss-mdns is distributed in the hope that it will be useful, but1
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with nss-mdns; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ USA.
+***/
+
+#ifndef NSS_GETHOSTNAME_SELECT_H
+#define NSS_GETHOSTNAME_SELECT_H
+
+#if defined(NSS_IPV4_ONLY) && ! defined(MDNS_MINIMAL)
+#define _nss_mdns_gethostbyname2_r _nss_mdns4_gethostbyname2_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_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_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_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_gethostbyname_r _nss_mdns_minimal_gethostbyname_r
+#define _nss_mdns_gethostbyaddr_r _nss_mdns_minimal_gethostbyaddr_r
+#endif
+
+/* prototypes of things in nss.c */
+enum nss_status _nss_mdns_gethostbyaddr_r(const void* addr, int len, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop);
+enum nss_status _nss_mdns_gethostbyname_r(const char *name, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop);
+enum nss_status _nss_mdns_gethostbyname2_r(const char *name, int af, struct hostent *result, char *buffer, size_t buflen, int *errnop, int *h_errnop);
+
+#endif

View File

@ -1,3 +1,5 @@
nss_mdns is a plugin for libc which provides host name resolution via
Multicast DNS, building on Avahi.
Only name resolution is provided; nss_mdns does not advertise services.
WWW: https://github.com/lathiat/nss-mdns