[Midnightbsd-cvs] mports: mports/dns: A caching dns proxy

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jun 7 12:58:38 EDT 2008


Log Message:
-----------
A caching dns proxy

Modified Files:
--------------
    mports/dns:
        Makefile (r1.14 -> r1.15)

Added Files:
-----------
    mports/dns/pdnsd:
        Makefile (r1.1)
        distinfo (r1.1)
        pkg-descr (r1.1)
        pkg-install (r1.1)
        pkg-message (r1.1)
        pkg-plist (r1.1)
    mports/dns/pdnsd/files:
        patch-src_conff.h (r1.1)
        patch-src_dns.h (r1.1)
        pdnsd.in (r1.1)

-------------- next part --------------
--- /dev/null
+++ dns/pdnsd/pkg-message
@@ -0,0 +1,2 @@
+You'll need to manually copy ${PREFIX}/etc/pdnsd.conf.sample to
+${PREFIX}/etc/pdnsd.conf and modify it for your needs.
--- /dev/null
+++ dns/pdnsd/pkg-install
@@ -0,0 +1,9 @@
+#!/bin/sh
+PDNSDB=/var/db/pdnsd
+
+mkdir -p ${PDNSDB}
+chown nobody ${PDNSDB}
+chmod 755 ${PDNSDB}
+dd if=/dev/zero of=${PDNSDB}/pdnsd.cache bs=1 count=4 >/dev/null 2>&1
+chown nobody ${PDNSDB}/pdnsd.cache
+chmod 640 ${PDNSDB}/pdnsd.cache
--- /dev/null
+++ dns/pdnsd/pkg-descr
@@ -0,0 +1,19 @@
+pdnsd is a proxy dns server with permanent caching (the cache contents are
+written to hard disk on exit) that is designed to cope with unreachable or
+down dns servers (for example in dial-in networking).
+pdnsd can be used with applications that do dns lookups, eg on startup, and
+can't be configured to change that behavior, to prevent the often minute-long
+hangs (or even crashes) that result from stalled dns queries. Some Netscape
+Navigator versions for Unix, for example, expose this behavior.
+pdnsd is configurable via a file and supports run-time configuration using the
+program pdnsd-ctl that comes with pdnsd. This allows you to set the status
+flags of servers that pdnsd knows (to influence which servers pdnsd will
+query), and the addition, deletion and invalidation of DNS records in pdnsd's
+cache.
+
+Parallel name server queries are supported. This is a technique that allows
+querying several servers at the same time so that very slow or unavailable
+servers will not block the answer for one timeout interval.
+Since version 1.0.0, pdnsd has full IPv6 support.
+
+WWW: http://www.phys.uu.nl/~rombouts/pdnsd.html
--- /dev/null
+++ dns/pdnsd/pkg-plist
@@ -0,0 +1,14 @@
+ at unexec if cmp -s %D/etc/pdnsd.conf %D/etc/pdnsd.conf.sample; then rm %D/etc/pdnsd.conf; fi
+etc/pdnsd.conf.sample
+ at exec [ -f %D/etc/pdnsd.conf ] || install -m 644 %D/etc/pdnsd.conf.sample %D/etc/pdnsd.conf
+sbin/pdnsd
+sbin/pdnsd-ctl
+%%PORTDOCS%%%%DOCSDIR%%/dl.html
+%%PORTDOCS%%%%DOCSDIR%%/doc.html
+%%PORTDOCS%%%%DOCSDIR%%/faq.html
+%%PORTDOCS%%%%DOCSDIR%%/index.html
+%%PORTDOCS%%%%DOCSDIR%%/faq.txt
+%%PORTDOCS%%%%DOCSDIR%%/intro.txt
+%%PORTDOCS%%%%DOCSDIR%%/manual.txt
+%%PORTDOCS%%@dirrm %%DOCSDIR%%
+ at unexec rm -rf /var/db/pdnsd 2>&1 >/dev/null || true
--- /dev/null
+++ dns/pdnsd/Makefile
@@ -0,0 +1,57 @@
+# New ports collection makefile for:	pdnsd
+# Date Created:				27 Oct 2000
+# Whom:					Roman Shterenzon <roman at xpert.com>
+#
+# $MidnightBSD: mports/dns/pdnsd/Makefile,v 1.1 2008/06/07 16:58:36 laffer1 Exp $
+# $FreeBSD: ports/dns/pdnsd/Makefile,v 1.22 2007/09/08 14:55:27 gabor Exp $
+#
+
+PORTNAME=	pdnsd
+PORTVERSION=	1.2.6
+CATEGORIES=	dns ipv6
+MASTER_SITES=	http://www.phys.uu.nl/~rombouts/pdnsd/releases/
+DISTNAME=	${PORTNAME}-${PORTVERSION}-par
+
+MAINTAINER=	ports at MidnightBSD.org
+COMMENT=	Caching (permanently, writes to disk on exit) DNS proxy-server
+LICENSE=	gpl2
+# part is bsd2 but that's "compatible"
+
+GNU_CONFIGURE=	yes
+USE_GMAKE=	yes
+USE_RC_SUBR=	pdnsd
+CONFIGURE_ARGS=	--with-cachedir=${PDNSDB} \
+		--disable-src-addr-disc \
+		--with-target=BSD
+
+OPTIONS=	IPV6	"Enable IPv6 support"	on
+
+WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
+
+MAN5=		pdnsd.conf.5
+MAN8=		pdnsd.8 pdnsd-ctl.8
+
+PDNSDB=		/var/db/pdnsd
+DOCSRCDIR=	${WRKSRC}/doc
+DOC_FILES=	html/dl.html html/doc.html html/faq.html html/index.html
+DOC_FILES+=	txt/faq.txt txt/intro.txt txt/manual.txt
+
+CFLAGS+=	${PTHREAD_LIBS}
+
+OPTIONS=	IPV6	"IPv6 support"	on
+
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_IPV6)
+CONFIGURE_ARGS+=	--enable-ipv6
+.endif
+
+post-install:
+.if !defined(NOPORTDOCS)
+	@${MKDIR} ${DOCSDIR}
+	@${INSTALL_DATA} ${DOC_FILES:S@^@${DOCSRCDIR}/@} ${DOCSDIR}
+.endif
+	@[ -f ${PREFIX}/etc/pdnsd.conf ] || \
+		${INSTALL_DATA} ${PREFIX}/etc/pdnsd.conf.sample ${PREFIX}/etc/pdnsd.conf
+
+.include <bsd.port.post.mk>
--- /dev/null
+++ dns/pdnsd/distinfo
@@ -0,0 +1,3 @@
+MD5 (pdnsd-1.2.6-par.tar.gz) = 65c88e22152a885a0437578eedc8b118
+SHA256 (pdnsd-1.2.6-par.tar.gz) = 84a4165471856f71725e5dc958978d9aee671c33b94a7dca0be09e60d99069ed
+SIZE (pdnsd-1.2.6-par.tar.gz) = 451465
Index: Makefile
===================================================================
RCS file: /home/cvs/mports/dns/Makefile,v
retrieving revision 1.14
retrieving revision 1.15
diff -L dns/Makefile -L dns/Makefile -u -r1.14 -r1.15
--- dns/Makefile
+++ dns/Makefile
@@ -17,5 +17,6 @@
     SUBDIR += nslint
     SUBDIR += p5-Net-DNS
     SUBDIR += p5-Net-DNS-Resolver-Programmable
+    SUBDIR += pdnsd
 
 .include <bsd.port.subdir.mk>
--- /dev/null
+++ dns/pdnsd/files/pdnsd.in
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# PROVIDE: pdnsd
+# REQUIRE: netif
+# BEFORE: LOGIN
+
+. %%RC_SUBR%%
+
+name="pdnsd"
+rcvar=${name}_enable
+command="%%PREFIX%%/sbin/pdnsd"
+command_args="-d"
+required_files="%%PREFIX%%/etc/pdnsd.conf"
+load_rc_config $name
+
+run_rc_command "$1"
--- /dev/null
+++ dns/pdnsd/files/patch-src_conff.h
@@ -0,0 +1,12 @@
+--- src/conff.h.orig	Mon Jun 27 21:57:22 2005
++++ src/conff.h		Sun Oct 30 09:01:08 2005
+@@ -32,6 +32,9 @@
+ #include <config.h>
+ #include <stdio.h>
+ #include <pthread.h>
++#if TARGET==TARGET_BSD
++#include <sys/socket.h>
++#endif
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include "ipvers.h"
--- /dev/null
+++ dns/pdnsd/files/patch-src_dns.h
@@ -0,0 +1,12 @@
+--- src/dns.h.orig	Fri Jul  1 14:33:35 2005
++++ src/dns.h		Sun Oct 30 09:04:28 2005
+@@ -27,6 +27,9 @@
+ 
+ #include <config.h>
+ #include <arpa/inet.h>
++#if TARGET==TARGET_BSD
++#include <sys/socket.h>
++#endif
+ #include <sys/socket.h>
+ #include <net/if.h>
+ #include <sys/types.h>


More information about the Midnightbsd-cvs mailing list