ports/51197: New Port: rendezvous (Apple's ZeroConf implementation)

Andrew andrew at ugh.net.au
Sun Apr 20 21:20:19 UTC 2003


>Number:         51197
>Category:       ports
>Synopsis:       New Port: rendezvous (Apple's ZeroConf implementation)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Apr 20 14:20:17 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     Andrew
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
UgH!
>Environment:
System: FreeBSD amy.local 5.0-CURRENT FreeBSD 5.0-CURRENT #2: Sat Apr 12 19:08:08 EST 2003 andrew at amy.local:/usr/obj/usr/src/sys/AMY i386


	
>Description:

Port of Apple's Rendezvous/multicast DNS stuff. This code allow name
resolution without a DNS server and service discovery without any
special infrastructure. This is an implementation of some of the
ZeroConf requirements.

N.B. this port is marked RESTRICTED becuase you need to agree to the APSL
before you can download the source from Apple however the source and packages
can be distributed according to an email I got from Apple (see the comments in
the Makefile for more info) so conceivably if someone puts them on ftp-master
by hand all the mirrors could carry it.


>How-To-Repeat:
	
>Fix:


# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	rendezvous
#	rendezvous/files
#	rendezvous/files/patch-aa
#	rendezvous/files/patch-ab
#	rendezvous/files/mDNSResponder.sh
#	rendezvous/files/mDNSResponder.conf.sample
#	rendezvous/Makefile
#	rendezvous/pkg-descr
#	rendezvous/pkg-plist
#	rendezvous/distinfo
#	rendezvous/pkg-message
#
echo c - rendezvous
mkdir -p rendezvous > /dev/null 2>&1
echo c - rendezvous/files
mkdir -p rendezvous/files > /dev/null 2>&1
echo x - rendezvous/files/patch-aa
sed 's/^X//' >rendezvous/files/patch-aa << 'END-of-rendezvous/files/patch-aa'
X--- mDNSPosix/Makefile.orig	Fri Sep 20 08:55:24 2002
X+++ mDNSPosix/Makefile	Sat Apr 12 14:32:10 2003
X@@ -12,11 +12,15 @@
X ifeq ($(os),openbsd)
X CFLAGS_OS = -DHAVE_SOCKADDR_SA_LEN -DHAVE_DAEMON -DHAVE_SOCKLEN_T -DHAVE_BROKEN_RECVDSTADDR
X else
X+ifeq ($(os),freebsd)
X+CFLAGS_OS = -DHAVE_SOCKADDR_SA_LEN -DHAVE_DAEMON -DHAVE_SOCKLEN_T
X+else
X ifeq ($(os),osx)
X CFLAGS_OS = -no-cpp-precomp -Wall -DHAVE_SOCKADDR_SA_LEN -DHAVE_DAEMON
X else
X cantbuild:
X-	echo "Error: Must specify target OS on command-line, e.g. \"make os=osx\" or \"make os=linux\""
X+	@echo "Error: Must specify target OS on command-line, e.g. \"make os=osx\" or \"make os=linux\""
X+endif
X endif
X endif
X endif
X@@ -38,13 +42,13 @@
X 	if test ! -d build   ; then mkdir build   ; fi
X 
X Client: setup build/mDNSClientPosix
X-	echo "Client done!"
X+	@echo "Client done!"
X 
X Responder: setup build/mDNSResponderPosix
X-	echo "Responder done!"
X+	@echo "Responder done!"
X 
X ProxyResponder: setup build/mDNSProxyResponderPosix
X-	echo "ProxyResponder done!"
X+	@echo "ProxyResponder done!"
X 
X build/mDNSClientPosix: $(COMMON) objects/Client.c.o
X 	$(CC) $(CFLAGS) $(COMMON) objects/Client.c.o -o build/mDNSClientPosix
END-of-rendezvous/files/patch-aa
echo x - rendezvous/files/patch-ab
sed 's/^X//' >rendezvous/files/patch-ab << 'END-of-rendezvous/files/patch-ab'
X--- mDNSPosix/Responder.c.orig	Sun Sep 22 06:44:53 2002
X+++ mDNSPosix/Responder.c	Sat Apr 12 13:42:31 2003
X@@ -394,7 +394,7 @@
X     // Parse command line options using getopt.
X     
X     do {
X-        ch = getopt(argc, argv, "v:rn:x:t:p:f:dP");
X+        ch = getopt(argc, argv, "v:rn:x:t:p:f:dP:");
X         if (ch != -1) {
X             switch (ch) {
X                 case 'v':
END-of-rendezvous/files/patch-ab
echo x - rendezvous/files/mDNSResponder.sh
sed 's/^X//' >rendezvous/files/mDNSResponder.sh << 'END-of-rendezvous/files/mDNSResponder.sh'
X#!/bin/sh
X
X# configurable items
XPROGRAM='mDNSResponder'
XARGUMENTS='-d' 
XDIRECTORY='sbin'
X
X# determine PREFIX
Xif ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
X    echo "$0: Cannot determine the PREFIX" >&2
X    exit 1
Xfi
X
X# perform requested action
Xcase "$1" in
Xstart)
X	if [ -x ${PREFIX}/${DIRECTORY}/${PROGRAM} ]; then
X
X		# use a config file if they have one (customisation for mDNSResponder)
X		if [ -f ${PREFIX}/etc/${PROGRAM}.conf ]; then
X			FILE=${PREFIX}/etc/${PROGRAM}.conf
X		else
X			FILE=/dev/null
X		fi
X		ARGUMENTS="${ARGUMENTS} -f ${FILE}"
X
X		# fire away
X		${PREFIX}/${DIRECTORY}/${PROGRAM} ${ARGUMENTS} && echo -n ' '${PROGRAM}
X	fi
X	;;
Xstop)
X	kill `cat /var/run/${PROGRAM}.pid`
X	;;
X*)
X	echo "Usage: `basename $0` {start|stop}" >&2
X	exit 64
X	;;
Xesac
X
Xexit 0
END-of-rendezvous/files/mDNSResponder.sh
echo x - rendezvous/files/mDNSResponder.conf.sample
sed 's/^X//' >rendezvous/files/mDNSResponder.conf.sample << 'END-of-rendezvous/files/mDNSResponder.conf.sample'
Xtweedlebug
X_afpovertcp._tcp.
X
X548
X
Xhumphrey
X_ipp._tcp.
Xipp://humphrey.local/laser
X631
END-of-rendezvous/files/mDNSResponder.conf.sample
echo x - rendezvous/Makefile
sed 's/^X//' >rendezvous/Makefile << 'END-of-rendezvous/Makefile'
X# New ports collection makefile for:	rendezvous
X# Date created:	29 December 2002
X# Whom:	Andrew Stevenson <andrew at ugh.net.au>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	rendezvous
XPORTVERSION=	1.0
XCATEGORIES=	net
X# You must agree to the APSL and manually fetch Rendezvous.tar.gz from
X# ${MASTER_SITES}:source
XMASTER_SITES=	http://www.opensource.apple.com/projects/rendezvous/source/:source \
X				ftp://ftp.ugh.net.au/pub/unix/mDNSdocs/:docs \
X				ftp://ftp.megamirror.com/pub/ugh/unix/newmail/:docs \
X				http://ftp.megamirror.com/pub/ugh/unix/newmail/:docs
XDISTFILES=	Rendezvous.tar.gz:source \
X			mDNSdocs-1.0.tar.gz:docs
X
XMAINTAINER=	andrew at ugh.net.au
XCOMMENT=	Apple's multicast DNS responder/client (part of Rendezvous/ZeroConf)
X
X# I've asked Apple about distribution terms. Ron Dumont <rond at apple.com>,
X# Program Manager for open source at Apple, says packages can be distributed
X# "...as long as the license headers are maintained in the files.  The APSL
X# should also be included in the package as a text file...". He said that the
X# conditions were the same for the original source. That said you still need
X# to agree to the APSL at Apple's web site to get a username and password to
X# download Rendezvous.tar.gz in the first place.
XRESTRICTED=	"Must agree to APSL before downloading the source code - http://www.opensource.apple.com/apsl/"
XRESTRICTED_FILES=	Rendezvous.tar.gz
X.if defined(BATCH) || defined(PACKAGE_BUILDING)
XIGNORE=	${RESTRICTED}
X.endif
X
XMAN1=	mDNSClient.1
XMAN8=	mDNSResponder.8 \
X		mDNSProxyResponder.8
X
XUSE_GMAKE=	yes
XWRKSRC=	${WRKDIR}/Rendezvous
XBUILD_WRKSRC=	${WRKSRC}/mDNSPosix
XMAKE_ARGS=	os=freebsd
XPROGRAM_SUFFIX=	Posix
XPROGRAMS_BIN=	mDNSClientPosix
XPROGRAMS_SBIN=	mDNSProxyResponderPosix mDNSResponderPosix
X
Xpre-fetch:
X	@[ -f ${DISTDIR}/${RESTRICTED_FILES} ] || ( \
X	${ECHO} "********************************************************************";	\
X	${ECHO} "Please get ${RESTRICTED_FILES} from";									\
X	${ECHO} "	http://www.opensource.apple.com/projects/rendezvous/source/";		\
X	${ECHO} "and place it in ${DISTDIR}. You will need to agree to the";			\
X	${ECHO} "APSL (Apple Public Source License) first.";							\
X	${ECHO} "********************************************************************";	\
X	${FALSE}																		\
X	)
X
Xdo-install:
X	# install binaries
X.	for directory in bin sbin
X.		for program in ${PROGRAMS_${directory:U}}
X			${INSTALL_PROGRAM} ${BUILD_WRKSRC}/build/${program} ${PREFIX}/${directory}/${program:S/${PROGRAM_SUFFIX}$//}
X.		endfor
X.	endfor
X	# install man pages
X.	for section in 1 2 3 4 5 6 7 8
X.		for page in ${MAN${section}}
X			${INSTALL_MAN} ${WRKDIR}/mDNSdocs/${page} ${MAN${section}PREFIX}/man/man${page:E}/
X.		endfor
X.	endfor
X	# install docs and license
X	@-${MKDIR} ${DOCSDIR}
X	${INSTALL_MAN} ${WRKSRC}/APPLE_LICENSE ${DOCSDIR}
X.	if !defined(NOPORTDOCS)
X		${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/${PORTNAME}
X.	endif
X	# install scripts and examples
X	${INSTALL_DATA} ${FILESDIR}/mDNSResponder.conf.sample ${PREFIX}/etc
X	${INSTALL_SCRIPT} ${FILESDIR}/mDNSResponder.sh ${PREFIX}/etc/rc.d
X
Xpost-install:
X	if [ -f ${MASTERDIR}/pkg-message ]; then		\
X		${CAT} ${MASTERDIR}/pkg-message |			\
X			${SED} "s|%%DOCSDIR%%|${DOCSDIR}|g";	\
X	fi
X
X.include <bsd.port.mk>
END-of-rendezvous/Makefile
echo x - rendezvous/pkg-descr
sed 's/^X//' >rendezvous/pkg-descr << 'END-of-rendezvous/pkg-descr'
XThis is a port of Apple's multicast DNS responder (and client). It allows
Xname to address translation without requiring a DNS and allows for service
Xdiscovery without requiring any other support infrastructure.
X
XApple refer to this technology as Rendezvous and the IETF call it Zeroconf.
X
XN.B. This port does not provide dynamic configuration of IPv4 link-local
Xaddresses.
X
XWWW: http://developer.apple.com/darwin/projects/rendezvous/
X
X- Andrew
Xandrew at ugh.net.au
END-of-rendezvous/pkg-descr
echo x - rendezvous/pkg-plist
sed 's/^X//' >rendezvous/pkg-plist << 'END-of-rendezvous/pkg-plist'
Xbin/mDNSClient
Xsbin/mDNSProxyResponder
Xsbin/mDNSResponder
Xetc/mDNSResponder.conf.sample
Xetc/rc.d/mDNSResponder.sh
X%%DOCSDIR%%/APPLE_LICENSE
X%%PORTDOCS%%%%DOCSDIR%%/README
X at dirrm %%DOCSDIR%%
END-of-rendezvous/pkg-plist
echo x - rendezvous/distinfo
sed 's/^X//' >rendezvous/distinfo << 'END-of-rendezvous/distinfo'
XMD5 (Rendezvous.tar.gz) = 44cfd844d98785a0fbde34ff704764a0
XMD5 (mDNSdocs-1.0.tar.gz) = df051ab199a700c30203989caa758bfe
END-of-rendezvous/distinfo
echo x - rendezvous/pkg-message
sed 's/^X//' >rendezvous/pkg-message << 'END-of-rendezvous/pkg-message'
XPlease note that this software is covered by the Apple Public Source License.
X
XThis license is available on the web at:
X	http://www.opensource.apple.com/apsl/
XThere is also a copy in your filesystem at:
X	%%DOCSDIR%%/APPLE_LICENSE
END-of-rendezvous/pkg-message
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list