From owner-freebsd-ports-bugs@FreeBSD.ORG Tue Apr 29 12:30:05 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 115601065684 for ; Tue, 29 Apr 2008 12:30:05 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id B32C78FC1B for ; Tue, 29 Apr 2008 12:30:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m3TCU4oG097857 for ; Tue, 29 Apr 2008 12:30:04 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m3TCU4a6097854; Tue, 29 Apr 2008 12:30:04 GMT (envelope-from gnats) Resent-Date: Tue, 29 Apr 2008 12:30:04 GMT Resent-Message-Id: <200804291230.m3TCU4a6097854@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, Jaap Akkerhuis Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 493371065701 for ; Tue, 29 Apr 2008 12:25:33 +0000 (UTC) (envelope-from jaap@bartok.nlnetlabs.nl) Received: from bartok.nlnetlabs.nl (bartok.nlnetlabs.nl [IPv6:2001:7b8:206:1:216:76ff:feb8:3c02]) by mx1.freebsd.org (Postfix) with ESMTP id 92C468FC0A for ; Tue, 29 Apr 2008 12:25:31 +0000 (UTC) (envelope-from jaap@bartok.nlnetlabs.nl) Received: from bartok.nlnetlabs.nl (localhost [127.0.0.1]) by bartok.nlnetlabs.nl (8.14.2/8.14.2) with ESMTP id m3TCPJ5X082552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 29 Apr 2008 14:25:19 +0200 (CEST) (envelope-from jaap@bartok.nlnetlabs.nl) Received: (from jaap@localhost) by bartok.nlnetlabs.nl (8.14.2/8.14.2/Submit) id m3TCPJgd082551; Tue, 29 Apr 2008 14:25:19 +0200 (CEST) (envelope-from jaap) Message-Id: <200804291225.m3TCPJgd082551@bartok.nlnetlabs.nl> Date: Tue, 29 Apr 2008 14:25:19 +0200 (CEST) From: Jaap Akkerhuis To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: jaap@NLnetLabs.nl Subject: ports/123212: New port: dns/unbound Unbound is a validating, recursive, and caching DNS resolver X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Jaap Akkerhuis List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Apr 2008 12:30:05 -0000 >Number: 123212 >Category: ports >Synopsis: New port: dns/unbound Unbound is a validating, recursive, and caching DNS resolver >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Apr 29 12:30:04 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jaap Akkerhuis >Release: FreeBSD 7.0-STABLE i386 >Organization: NLnet Labs >Environment: System: FreeBSD bartok.nlnetlabs.nl 7.0-STABLE FreeBSD 7.0-STABLE #61: Mon Apr 28 10:21:28 CEST 2008 root@bartok.nlnetlabs.nl:/usr/obj/usr/src/sys/BARTOK i386 >Description: Unbound is a validating, recursive, and caching DNS resolver >How-To-Repeat: >Fix: --- shar begins here --- # 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: # # unbound # unbound/Makefile # unbound/pkg-message # unbound/pkg-install # unbound/pkg-descr # unbound/pkg-deinstall # unbound/distinfo # unbound/files # unbound/files/unbound.in # echo c - unbound mkdir -p unbound > /dev/null 2>&1 echo x - unbound/Makefile sed 's/^X//' >unbound/Makefile << 'END-of-unbound/Makefile' X# New ports collection makefile for: unbound X# Date created: 24 April 2008 X# Whom: Jaap Akkerhuis X# X# $FreeBSD$ X# X XPORTNAME= unbound XPORTVERSION= 0.11 XCATEGORIES= dns XMASTER_SITES= http://unbound.net/downloads/ X XMAINTAINER= jaap@NLnetLabs.nl XCOMMENT= Unbound is a validating, recursive, and caching DNS resolver X XMAN1= unbound-host.1 XMAN3= libunbound.3 XMAN5= unbound.conf.5 XMAN8= unbound.8 unbound-checkconf.8 X XMANCOMPRESSED= no X XWRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION} XUSE_GMAKE= yes XHAS_CONFIGURE= yes XCONFIGURE_ARGS= --prefix=${PREFIX} --mandir=${PREFIX}/man X XUSE_RC_SUBR= ${PORTNAME} X Xpre-install: X @PKG_PREFIX=${PREFIX} ${SH} pkg-install ${PKGNAME} PRE-INSTALL X Xpost-install: X @${CAT} ${PKGMESSAGE} | ${SED} s,%%PREFIX%%,${PREFIX}, X @${PREFIX}/sbin/unbound-checkconf X XPLIST_FILES= sbin/unbound \ X sbin/unbound-checkconf \ X sbin/unbound-host \ X lib/libunbound.la \ X lib/libunbound.so \ X lib/libunbound.a \ X include/unbound.h X XPLIST_DIRS= etc/unbound X X.include END-of-unbound/Makefile echo x - unbound/pkg-message sed 's/^X//' >unbound/pkg-message << 'END-of-unbound/pkg-message' X********************************************************************* X* X* To have syslog work properly you should add to syslogd the arguments: X* "-l %%PREFIX%%/etc/unbound/var/run/log" X* (without the quotes) and restart syslogd X* X********************************************************************* END-of-unbound/pkg-message echo x - unbound/pkg-install sed 's/^X//' >unbound/pkg-install << 'END-of-unbound/pkg-install' X#! /bin/sh X# X# create account, group, etc. X# shamelessly stolen from /usr/ports/sysutil/munin-main/pkg-install X# X Xask() { X local question default answer X X question=$1 X default=$2 X if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then X read -p "${question} [${default}]? " answer X fi X if [ x${answer} = x ]; then X answer=${default} X fi X echo ${answer} X} X Xyesno() { X local dflt question answer X X question=$1 X dflt=$2 X while :; do X answer=$(ask "${question}" "${dflt}") X case "${answer}" in X [Yy]*) return 0;; X [Nn]*) return 1;; X esac X echo "Please answer yes or no." X done X} X Xmake_account() { X local u g gcos X X u=$1 X g=$2 X gcos=$3 X X if pw group show "${g}" >/dev/null 2>&1; then X echo "You already have a group \"${g}\", so I will use it." X else X echo "You need a group \"${g}\"." X if which -s pw && yesno "Would you like me to create it" y; then X pw groupadd ${g} || exit X echo "Done." X else X echo "Please create it, and try again." X if ! /usr/sbin/pw user show ${u} >/dev/null 2>/dev/null; then X echo "While you're at it, please create a user \"${u}\" too," X echo "with a default group of \"${g}\"." X fi X exit 1 X fi X fi X X if pw user show "${u}" >/dev/null 2>&1; then X echo "You already have a user \"${u}\", so I will use it." X else X echo "You need a user \"${u}\"." X if which -s pw && yesno "Would you like me to create it" y; then X pw useradd ${u} -g ${g} -h - \ X -s /usr/sbin/nologin -c "${gcos}" || exit X echo "Done." X else X echo "Please create it, and try again." X exit 1 X fi X fi X} X X######################################################################## X Xcase $2 in X PRE-INSTALL) X make_account unbound unbound "Unbound owner" X ;; Xesac END-of-unbound/pkg-install echo x - unbound/pkg-descr sed 's/^X//' >unbound/pkg-descr << 'END-of-unbound/pkg-descr' XUnbound is a validating, recursive, and caching DNS resolver. X XThe C implementation of Unbound is developed and maintained by NLnet XLabs. It is based on ideas and algorithms taken from a java prototype Xdeveloped by Verisign labs, Nominet, Kirei and ep.net. X XUnbound is designed as a set of modular components, so that also XDNSSEC (secure DNS) validation and stub-resolvers (that do not run Xas a server, but are linked into an application) are easily possible. X XThe source code is under a BSD License. X XWWW: http://unbound.net/ END-of-unbound/pkg-descr echo x - unbound/pkg-deinstall sed 's/^X//' >unbound/pkg-deinstall << 'END-of-unbound/pkg-deinstall' X#! /bin/sh X# X# create account, group, etc. X# shamelessly stolen from /usr/ports/sysutil/munin-main/pkg-install X# X X# Don not blindly remove account, we might be X# updating existing system (and configuration) X Xask() { X local question default answer X X question=$1 X default=$2 X if [ -z "${PACKAGE_BUILDING}" -a -z "${BATCH}" ]; then X read -p "${question} [${default}]? " answer X fi X if [ x${answer} = x ]; then X answer=${default} X fi X echo ${answer} X} X Xyesno() { X local dflt question answer X X question=$1 X dflt=$2 X while :; do X answer=$(ask "${question}" "${dflt}") X case "${answer}" in X [Yy]*) return 0;; X [Nn]*) return 1;; X esac X echo "Please answer yes or no." X done X} X Xdelete_account() { X local u g home X X u=$1 X g=$2 X if pw group show ${g} > /dev/null 2>&1; then X if yesno "Do you want me to remove group \"${g}\"" n; then X pw group del -n ${g} X echo "Done." X else X GID=`pw group show ${g} | awk -F: '{ print $3 }'` X fi X fi X if pw user show ${u} > /dev/null 2>&1; then X if yesno "Do you want me to remove user \"${u}\"" n; then X eval home=~${u} X pw user del -n ${u} -r X echo "Done." X if [ -d "${home}" ]; then X echo "Please remember to remove the home directory \"${home}\"" X fi X X # pw user del may have removed the group, too. X # Put it back if the admin asked us to retain it. X if [ -n "$GID" ]; then X pw group show ${g} > /dev/null 2>&1 X if [ $? -ne 0 ]; then X pw group add ${g} X fi X fi X fi X fi X} X X####################################################################### X Xcase $2 in X POST-DEINSTALL) X delete_account unbound unbound X ;; Xesac END-of-unbound/pkg-deinstall echo x - unbound/distinfo sed 's/^X//' >unbound/distinfo << 'END-of-unbound/distinfo' XMD5 (unbound-0.11.tar.gz) = 2d698050a9ffd492b0abd37b5000680f XSHA256 (unbound-0.11.tar.gz) = f6c44ccae56398273c1f03485f2e2b8e4b612663d501d89c82c8cf9f23422d9f XSIZE (unbound-0.11.tar.gz) = 3543955 END-of-unbound/distinfo echo c - unbound/files mkdir -p unbound/files > /dev/null 2>&1 echo x - unbound/files/unbound.in sed 's/^X//' >unbound/files/unbound.in << 'END-of-unbound/files/unbound.in' X#!/bin/sh X X# PROVIDE: unbound X# REQUIRE: SERVERS X# BEFORE: DAEMON X# KEYWORD: shutdown X Xprefix=%%PREFIX%% X X# Set unbound_enable="YES" in one of these files: X# /etc/rc.conf X# /etc/rc.conf.local X# /etc/rc.conf.d/unbound X# X# DO NOT CHANGE THESE DEFAULT VALUES HERE X# X X. %%RC_SUBR%% X Xname="unbound" Xrcvar=`set_rcvar` X X# %%PREFIX%% X: unbound_enable=${unbound_enable:="NO"} X Xcommand="%%PREFIX%%/sbin/unbound" X Xstart_precmd="unbound_start" Xstop_postcmd="unbound_stop" Xextra_commands="reload" X X: ${unbound_dir:="%%PREFIX%%/etc/unbound/"} Xpidfile="${unbound_dir}/unbound.pid" X Xunbound_start() X{ X /bin/test -d "${unbound_dir}" || /bin/mkdir "${unbound_dir}" X /sbin/umount "${unbound_dir}/dev" 2>/dev/null X X /usr/sbin/mtree -deU -p "${unbound_dir}" <Release-Note: >Audit-Trail: >Unformatted: