From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Apr 10 00:00:41 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4D65A16A4D0 for ; Sat, 10 Apr 2004 00:00:41 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 37C7043D49 for ; Sat, 10 Apr 2004 00:00:41 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i3A70ebv089205 for ; Sat, 10 Apr 2004 00:00:40 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i3A70elm089204; Sat, 10 Apr 2004 00:00:40 -0700 (PDT) (envelope-from gnats) Resent-Date: Sat, 10 Apr 2004 00:00:40 -0700 (PDT) Resent-Message-Id: <200404100700.i3A70elm089204@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Paul Chvostek Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 85FDD16A4CE for ; Fri, 9 Apr 2004 23:53:30 -0700 (PDT) Received: from haggis.it.ca (haggis.it.ca [216.126.86.9]) by mx1.FreeBSD.org (Postfix) with ESMTP id 185D543D5C for ; Fri, 9 Apr 2004 23:53:30 -0700 (PDT) (envelope-from paul@foo.it.ca) Received: from foo.it.ca (CPE0000c082467e-CM014070226115.cpe.net.cable.rogers.com [24.156.131.43]) by haggis.it.ca (8.12.11/8.12.11) with ESMTP id i3A6rRMC044908; Sat, 10 Apr 2004 02:53:28 -0400 (EDT) (envelope-from paul@foo.it.ca) Received: from foo.it.ca (localhost [127.0.0.1]) by foo.it.ca (8.12.10/8.12.6) with ESMTP id i3A6rM5x054234; Sat, 10 Apr 2004 02:53:22 -0400 (EDT) (envelope-from paul@foo.it.ca) Received: (from root@localhost) by foo.it.ca (8.12.10/8.12.6/Submit) id i3A6rLlo054233; Sat, 10 Apr 2004 02:53:21 -0400 (EDT) Message-Id: <200404100653.i3A6rLlo054233@foo.it.ca> Date: Sat, 10 Apr 2004 02:53:21 -0400 (EDT) From: Paul Chvostek To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: Paul Chvostek Subject: ports/65392: [maintainer update]: dns/rbldnsd - small, fast RBL dns server X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Paul Chvostek List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Apr 2004 07:00:41 -0000 >Number: 65392 >Category: ports >Synopsis: [maintainer update]: dns/rbldnsd - small, fast RBL dns server >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sat Apr 10 00:00:40 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Paul Chvostek >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD foo.it.ca 4.9-STABLE FreeBSD 4.9-STABLE #0: Sat Nov 15 16:25:16 EST 2003 paul@foo.it.ca:/usr/obj/usr/src/sys/foo i386 >Description: - upgrade version to 0.992 - switch to rc.subr start mechanism - added user/group - added example data on install, target directory - added pkg-message - added more doc files I've done some odd stuff with substring processing in files/rbldnsd.sh, and invite comment. >How-To-Repeat: n/a >Fix: --- rbldnsd.diff.0992 begins here --- diff -ruN /usr/ports/dns/rbldnsd/Makefile ./rbldnsd/Makefile --- /usr/ports/dns/rbldnsd/Makefile Wed Mar 17 14:36:57 2004 +++ ./rbldnsd/Makefile Sat Apr 10 02:36:13 2004 @@ -2,11 +2,11 @@ # Date created: Fri Jun 13 05:30:12 EDT 2003 # Whom: Paul Chvostek # -# $FreeBSD: ports/dns/rbldnsd/Makefile,v 1.4 2004/03/06 11:33:55 kris Exp $ +# $FreeBSD: ports/dns/rbldnsd/Makefile,v 1.2 2004/01/19 18:40:30 krion Exp $ # PORTNAME= rbldnsd -PORTVERSION= 0.991 +PORTVERSION= 0.992 CATEGORIES= dns MASTER_SITES= http://www.corpit.ru/mjt/rbldnsd/:0 \ http://www.it.ca/~paul/src/:0 @@ -23,11 +23,39 @@ IGNOREFILES+= rbldnsd.html .endif +RBLDNSUSER= rbldns +RBLDNSGROUP= ${RBLDNSUSER} +ROOTDIR= ${PREFIX}/etc/rbldnsd/ + MAN8= rbldnsd.8 HAS_CONFIGURE= yes +.include + +.if ${OSVERSION} >= 500038 +RC_SUBR?= /etc/rc.subr +.else +USE_RC_SUBR= yes +.endif + +SED_SCRIPT+= -e 's,%%PREFIX%%,${PREFIX},g' \ + -e 's,%%RC_SUBR%%,${RC_SUBR},g' + +post-build: + @${SED} ${SED_SCRIPT} <${FILESDIR}/rbldnsd.sh >${WRKSRC}/rbldnsd.sh + +pre-install: + @${ECHO} "==> Creating custom user to run rbldnsd..." + ${PKGINSTALL} ${PKGNAME} PRE-INSTALL + do-install: + @if [ ! -d ${ROOTDIR} ]; then \ + ${MKDIR} ${ROOTDIR}; \ + ${CHMOD} 710 ${ROOTDIR}; \ + ${CHGRP} ${RBLDNSGROUP} ${ROOTDIR}; \ + fi + @${INSTALL_DATA} -g ${RBLDNSUSER} -m 640 ${FILESDIR}/example ${PREFIX}/etc/rbldnsd/ @${INSTALL_PROGRAM} ${WRKSRC}/rbldnsd ${PREFIX}/sbin/ @${INSTALL_MAN} ${WRKSRC}/rbldnsd.8 ${PREFIX}/man/man8/ .if !defined(NOPORTDOCS) @@ -35,8 +63,16 @@ @${INSTALL_DATA} ${WRKSRC}/CHANGES-0.81 ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/TODO ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/NEWS ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/debian/changelog ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/debian/copyright ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/debian/rbldnsd.default ${DOCSDIR} + @${INSTALL_DATA} ${WRKSRC}/debian/rbldnsd.init ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/rbldnsd.spec ${DOCSDIR} @${INSTALL_DATA} ${DISTDIR}/rbldnsd.html ${DOCSDIR} .endif + @${INSTALL_SCRIPT} -m 751 ${WRKSRC}/rbldnsd.sh ${PREFIX}/etc/rc.d/rbldnsd.sh + +post-install: + @${SED} ${SED_SCRIPT} < ${PKGMESSAGE} -.include +.include diff -ruN /usr/ports/dns/rbldnsd/distinfo ./rbldnsd/distinfo --- /usr/ports/dns/rbldnsd/distinfo Wed Mar 17 14:36:57 2004 +++ ./rbldnsd/distinfo Fri Apr 9 19:30:46 2004 @@ -1,3 +1,3 @@ -MD5 (rbldnsd_0.991.tar.gz) = f7c3642a92014e8a5712386fb32a2ab0 -SIZE (rbldnsd_0.991.tar.gz) = 78979 +MD5 (rbldnsd_0.992.tar.gz) = d2f3768efe301312abae6b2cbb185e24 +SIZE (rbldnsd_0.992.tar.gz) = 84629 MD5 (rbldnsd.html) = IGNORE diff -ruN /usr/ports/dns/rbldnsd/files/example ./rbldnsd/files/example --- /usr/ports/dns/rbldnsd/files/example Wed Dec 31 19:00:00 1969 +++ ./rbldnsd/files/example Fri Apr 9 20:25:48 2004 @@ -0,0 +1,30 @@ +:127.0.0.2:Open relay, see http://relays.example.com/lookup?$ +# The above is a default or implicit value which is used when no value given +# for an entry. The `$' characters will be replaced by an IP address in +# question. +127.0.0.2 +# A simplest case: single IP address, with default value. +10.8.60.0/24 :127.0.0.3:Address $ is from private IP range +# Netblock - 256 IP addresses with it's own A and TXT records +224/4 Reserved multicast address +# Another netblock, with default A and explitit TXT values. +192.168 Dialup pool, see http://dialups.example.com/lookup?$ for explanations +# IP numbers may be abbreviated, the above is the same as 192.168.0.0/16 +10.10 :5:This network blocked due to massive spam issues +# A value may be abbreviated as well - :5: is the same as :127.0.0.5:. +10.10.5-129:5:Those hosts are nasty +# repeat last octet: 10.10.5.0..10.10.129.255 inclusive +!10.10.1.2 +# exclusion entry +# +# The following examples are for name-based zones. +#example.com :2:This domain has no working postmaster@ address +#*.example.com :2:All subdomains of example.com lacks working abuse@ address +# Simple and wildcarded entry, both will return 127.0.0.2 A record +# +# some specials +$SOA 3000 ns1.example.com admin.example.com 0 600 300 86400 300 +# Start of authority record (TTL 3000), with serial (0) computed as +# a timestamp of data file +$NS 3000 ns1.example.com ns2.example.com +# two nameservers diff -ruN /usr/ports/dns/rbldnsd/files/rbldnsd.sh ./rbldnsd/files/rbldnsd.sh --- /usr/ports/dns/rbldnsd/files/rbldnsd.sh Wed Dec 31 19:00:00 1969 +++ ./rbldnsd/files/rbldnsd.sh Sat Apr 10 02:42:37 2004 @@ -0,0 +1,41 @@ +#!/bin/sh +# +# $Id$ +# + +# PROVIDE: rbldnsd +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown +# +# Add the following lines to /etc/rc.conf to enable rbldnsd: +# +# rbldnsd_enable="YES" +# +# See rbldnsd(8) for flags. +# + +. %%RC_SUBR%% + +name=rbldnsd +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/rbldnsd +pidfile=/var/run/rbldnsd.pid + +stop_postcmd=stop_postcmd + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults, enforce pidfile by making it last option before db + +rbldnsd_enable=${rbldnsd_enable:-"NO"} +rbldnsd_flags=${rbldnsd_flags:-"-r /usr/local/etc/rbldnsd -b 127.0.0.1 bl.example.com:ip4set:example"} +rbldnsd_flags="${rbldnsd_flags% *} -p $pidfile ${rbldnsd_flags##* }" + +load_rc_config $name +run_rc_command "$1" + diff -ruN /usr/ports/dns/rbldnsd/pkg-install ./rbldnsd/pkg-install --- /usr/ports/dns/rbldnsd/pkg-install Wed Dec 31 19:00:00 1969 +++ ./rbldnsd/pkg-install Fri Apr 9 20:52:17 2004 @@ -0,0 +1,30 @@ +#!/bin/sh + +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +RBLDNSUSER=${RBLDNSUSER:-rbldns} +RBLDNSGROUP=${RBLDNSGROUP:-rbldns} + +if ! pw groupshow "$RBLDNSGROUP" 2>/dev/null 1>&2; then + if pw groupadd $RBLDNSGROUP; then + echo "=> Added group \"$RBLDNSGROUP\"." + else + echo "=> Adding group \"$RBLDNSGROUP\" failed..." + exit 1 + fi +fi + +if ! pw usershow "$RBLDNSUSER" 2>/dev/null 1>&2; then + if pw useradd $RBLDNSUSER -g $RBLDNSGROUP -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "rbldnsd pseudo-user"; \ + then + echo "=> Added user \"$RBLDNSUSER\"." + else + echo "=> Adding user \"$RBLDNSUSER\" failed..." + exit 1 + fi +fi +exit 0 diff -ruN /usr/ports/dns/rbldnsd/pkg-message ./rbldnsd/pkg-message --- /usr/ports/dns/rbldnsd/pkg-message Wed Dec 31 19:00:00 1969 +++ ./rbldnsd/pkg-message Sat Apr 10 02:27:39 2004 @@ -0,0 +1,17 @@ +======================================================================== + NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE +======================================================================== + +The rbldnsd port has been installed with an example zone file, located +in %%PREFIX%%/etc/rbldnsd/. + +After starting the daemon with this example data, you should be able to +test the success of your install with the command: + + % host -a 1.1.168.192.bl.example.com. localhost +or + % dig @localhost 1.1.168.192.bl.example.com. any + +If you see a response that mentions 127.0.0.2, the install worked! + +======================================================================== diff -ruN /usr/ports/dns/rbldnsd/pkg-plist ./rbldnsd/pkg-plist --- /usr/ports/dns/rbldnsd/pkg-plist Wed Jan 28 23:46:07 2004 +++ ./rbldnsd/pkg-plist Sat Apr 10 02:34:35 2004 @@ -1,7 +1,14 @@ sbin/rbldnsd +etc/rbldnsd/example +etc/rc.d/rbldnsd.sh %%PORTDOCS%%%%DOCSDIR%%/CHANGES-0.81 %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/TODO +%%PORTDOCS%%%%DOCSDIR%%/changelog +%%PORTDOCS%%%%DOCSDIR%%/copyright +%%PORTDOCS%%%%DOCSDIR%%/rbldnsd.default +%%PORTDOCS%%%%DOCSDIR%%/rbldnsd.init %%PORTDOCS%%%%DOCSDIR%%/rbldnsd.spec %%PORTDOCS%%%%DOCSDIR%%/rbldnsd.html %%PORTDOCS%%@dirrm %%DOCSDIR%% +@unexec rmdir %D/etc/rbldnsd/ 2>/dev/null || true --- rbldnsd.diff.0992 ends here --- >Release-Note: >Audit-Trail: >Unformatted: