summaryrefslogtreecommitdiff
path: root/net/powerdns-recursor
diff options
context:
space:
mode:
authorroy <roy>2009-04-21 14:16:47 +0000
committerroy <roy>2009-04-21 14:16:47 +0000
commit89503c5f80724df4d05042772bed4d6e35436e8e (patch)
treefb72fb68998ee3f02096a2615658138dac117814 /net/powerdns-recursor
parentbf87454b907e8ba551b5222947dcd08d45d1b339 (diff)
downloadpkgsrc-89503c5f80724df4d05042772bed4d6e35436e8e.tar.gz
Import pdns_recursor-3.1.7
Based on the WIP version by pkgsrc@blackmouse.biz The PowerDNS recursor is part of the source tarball of the main PowerDNS distribution, but it is released separately. Starting from the version 3.0 pre-releases, there are zero known bugs or issues with the recursor. It is known to power the resolving needs of over 2 million internet connections. PowerDNS recursor can gets names from /etc/hosts.
Diffstat (limited to 'net/powerdns-recursor')
-rw-r--r--net/powerdns-recursor/DESCR6
-rw-r--r--net/powerdns-recursor/Makefile40
-rw-r--r--net/powerdns-recursor/PLIST8
-rw-r--r--net/powerdns-recursor/distinfo11
-rw-r--r--net/powerdns-recursor/files/pdns_recursor.sh19
-rw-r--r--net/powerdns-recursor/patches/patch-aa77
-rw-r--r--net/powerdns-recursor/patches/patch-ab17
-rw-r--r--net/powerdns-recursor/patches/patch-ac15
-rw-r--r--net/powerdns-recursor/patches/patch-ad69
-rw-r--r--net/powerdns-recursor/patches/patch-ae33
-rw-r--r--net/powerdns-recursor/patches/patch-af33
11 files changed, 328 insertions, 0 deletions
diff --git a/net/powerdns-recursor/DESCR b/net/powerdns-recursor/DESCR
new file mode 100644
index 00000000000..0b861b76b66
--- /dev/null
+++ b/net/powerdns-recursor/DESCR
@@ -0,0 +1,6 @@
+The PowerDNS recursor is part of the source tarball of the main PowerDNS
+distribution, but it is released separately. Starting from the version 3.0
+pre-releases, there are zero known bugs or issues with the recursor. It is
+known to power the resolving needs of over 2 million internet connections.
+
+PowerDNS recursor can gets names from /etc/hosts.
diff --git a/net/powerdns-recursor/Makefile b/net/powerdns-recursor/Makefile
new file mode 100644
index 00000000000..c86739d5320
--- /dev/null
+++ b/net/powerdns-recursor/Makefile
@@ -0,0 +1,40 @@
+# $NetBSD: Makefile,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+#
+
+DISTNAME= pdns-recursor-3.1.7
+CATEGORIES= net
+LICENSE= gnu-gpl-v2
+MASTER_SITES= http://downloads.powerdns.com/releases/
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= roy@NetBSD.org
+HOMEPAGE= http://www.powerdns.com/
+COMMENT= PowerDNS resolver/recursing nameserver
+
+USE_TOOLS= gmake
+USE_LANGUAGES= c c++
+PKG_DESTDIR_SUPPORT= user-destdir
+
+RCD_SCRIPTS+= pdns_recursor
+
+EGDIR= ${PREFIX}/share/examples/pdns-recursor
+
+BUILD_MAKE_FLAGS+= CONFIGDIR=${PKG_SYSCONFDIR} OPTFLAGS=
+
+INSTALL_MAKE_FLAGS+= BINDIR=${PREFIX}/bin SBINDIR=${PREFIX}/sbin
+INSTALL_MAKE_FLAGS+= CONFIGDIR=${EGDIR} MANDIR=${PREFIX}/${PKGMANDIR}
+
+CONF_FILES+= ${EGDIR}/recursor.conf-dist \
+ ${PKG_SYSCONFDIR}/recursor.conf
+
+post-patch:
+ ${SED} -e "s:/etc/powerdns:${PKG_SYSCONFDIR}:" \
+ ${WRKSRC}/config.h >${WRKSRC}/config.h.new
+ ${MV} ${WRKSRC}/config.h.new ${WRKSRC}/config.h
+ @# TODO Make kqueue work
+ @#${LN} -s FreeBSD.inc ${WRKSRC}/sysdeps/NetBSD.inc
+ ${MV} ${WRKSRC}/pdns_recursor.1 ${WRKSRC}/pdns_recursor.8
+ ${MV} ${WRKSRC}/rec_control.1 ${WRKSRC}/rec_control.8
+
+.include "../../devel/boost-headers/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/powerdns-recursor/PLIST b/net/powerdns-recursor/PLIST
new file mode 100644
index 00000000000..462360dc163
--- /dev/null
+++ b/net/powerdns-recursor/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+bin/rec_control
+man/man8/pdns_recursor.8
+man/man8/rec_control.8
+sbin/pdns_recursor
+share/examples/pdns-recursor/recursor.conf-dist
+share/examples/rc.d/pdns_recursor
+@dirrm share/examples/pdns-recursor
diff --git a/net/powerdns-recursor/distinfo b/net/powerdns-recursor/distinfo
new file mode 100644
index 00000000000..d8bf5b3e3bd
--- /dev/null
+++ b/net/powerdns-recursor/distinfo
@@ -0,0 +1,11 @@
+$NetBSD: distinfo,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+SHA1 (pdns-recursor-3.1.7.tar.bz2) = 3e9c46e432d57edd58f767311247e750350883e9
+RMD160 (pdns-recursor-3.1.7.tar.bz2) = 359b3e3fff942f9fd14bebe4bc16b9d6cd23d0e3
+Size (pdns-recursor-3.1.7.tar.bz2) = 174424 bytes
+SHA1 (patch-aa) = 8ea6d7bd6e4b1625ca5df7fb115085223f8fb147
+SHA1 (patch-ab) = b8607622c082d2168aecf06586818760f1a6035c
+SHA1 (patch-ac) = 618d18ddc212c6aa417d16454a784854f7a327a4
+SHA1 (patch-ad) = a28cdd1a6e860c1c9460c36e2e8acece4b163436
+SHA1 (patch-ae) = 54ce9208671928bf4b63331f2a248b601325541e
+SHA1 (patch-af) = 23b8dbad8f7f69652d7417ca6dcca4dde4a6fe57
diff --git a/net/powerdns-recursor/files/pdns_recursor.sh b/net/powerdns-recursor/files/pdns_recursor.sh
new file mode 100644
index 00000000000..6c4625cf1d0
--- /dev/null
+++ b/net/powerdns-recursor/files/pdns_recursor.sh
@@ -0,0 +1,19 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# $NetBSD: pdns_recursor.sh,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+#
+
+# PROVIDE: pdns_recursor
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="pdns_recursor"
+rcvar=$name
+command="@PREFIX@/sbin/pdns_recursor"
+command_args="--daemon=yes 2>/dev/null"
+pidfile=/var/run/${name}.pid
+required_files="@PKG_SYSCONFDIR@/recursor.conf"
+
+load_rc_config $name
+run_rc_command "$1"
diff --git a/net/powerdns-recursor/patches/patch-aa b/net/powerdns-recursor/patches/patch-aa
new file mode 100644
index 00000000000..e8328948d5c
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-aa
@@ -0,0 +1,77 @@
+$NetBSD: patch-aa,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+--- Makefile (revision 1354)
++++ Makefile-recursor (working copy)
+@@ -1,6 +1,8 @@
+ # user editable stuff:
+-SBINDIR=/usr/sbin/
+-BINDIR=/usr/bin/
++PREFIX?=/usr
++SBINDIR=$(PREFIX)/sbin
++BINDIR=$(PREFIX)/bin
++MANDIR=$(PREFIX)/share/man
+ CONFIGDIR="/etc/powerdns/"
+ OPTFLAGS?=-O3
+ CXXFLAGS:= $(CXXFLAGS) -Wall -DBOOST_SP_DISABLE_THREADS $(OPTFLAGS) $(PROFILEFLAGS)
+@@ -8,6 +10,13 @@
+ LINKCC=$(CXX)
+ CC?=gcc
+
++INSTALL?=install
++SHAREMODE?=644
++MANMODE?=444
++INSTALL_DIR?=$(INSTALL) -d
++INSTALL_DATA?=$(INSTALL) -m $(SHAREMODE)
++INSTALL_MAN?=$(INSTALL) -m $(MANMODE)
++
+ # Lua 5.1 settings
+ LUA_CPPFLAGS_CONFIG ?= -I/usr/include/lua5.1
+ LUA_LIBS_CONFIG ?= -llua5.1
+@@ -28,7 +37,7 @@
+ REC_CONTROL_OBJECTS=rec_channel.o rec_control.o arguments.o
+
+ # what we need
+-all: message pdns_recursor rec_control
++all: message pdns_recursor rec_control recursor.conf-dist
+
+ # OS specific instructions
+ -include sysdeps/$(shell uname).inc
+@@ -72,17 +81,19 @@
+ rm -f dep ; \
+ fi
+
++recursor.conf-dist: pdns_recursor
++ @# Not cross-compile friendly :/
++ ./pdns_recursor --config > $@
++
+ install: all
+- -mkdir -p $(DESTDIR)/$(SBINDIR)
+- mv pdns_recursor $(DESTDIR)/$(SBINDIR)
+- strip $(DESTDIR)/$(SBINDIR)/pdns_recursor
+- mkdir -p $(DESTDIR)/$(BINDIR)
+- mv rec_control $(DESTDIR)/$(BINDIR)
+- strip $(DESTDIR)/$(BINDIR)/rec_control
+- -mkdir -p $(DESTDIR)/$(CONFIGDIR)
+- $(DESTDIR)/$(SBINDIR)/pdns_recursor --config > $(DESTDIR)/$(CONFIGDIR)/recursor.conf-dist
+- -mkdir -p $(DESTDIR)/usr/share/man/man1
+- cp pdns_recursor.1 rec_control.1 $(DESTDIR)/usr/share/man/man1
++ $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
++ $(INSTALL) pdns_recursor $(DESTDIR)/$(SBINDIR)
++ $(INSTALL_DIR) $(DESTDIR)/$(BINDIR)
++ $(INSTALL) rec_control $(DESTDIR)/$(BINDIR)
++ $(INSTALL_DIR) $(DESTDIR)/$(CONFIGDIR)
++ $(INSTALL_DATA) recursor.conf-dist $(DESTDIR)/$(CONFIGDIR)
++ $(INSTALL_DIR) $(DESTDIR)/$(MANDIR)/man8
++ $(INSTALL_MAN) pdns_recursor.8 rec_control.8 $(DESTDIR)/$(MANDIR)/man8
+ $(OS_SPECIFIC_INSTALL)
+
+ clean:
+@@ -94,7 +105,7 @@
+ -include dep
+
+ optional:
+- mkdir optional
++ $(INSTALL_DIR) optional
+
+ pdns_recursor: optional $(OPTIONALS) $(PDNS_RECURSOR_OBJECTS) malloc.o
+ $(LINKCC) $(PDNS_RECURSOR_OBJECTS) $(wildcard optional/*.o) $(LDFLAGS) -o $@
diff --git a/net/powerdns-recursor/patches/patch-ab b/net/powerdns-recursor/patches/patch-ab
new file mode 100644
index 00000000000..31dd9c8fa60
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-ab
@@ -0,0 +1,17 @@
+$NetBSD: patch-ab,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+--- dns.hh.orig 2009-04-20 23:55:30.000000000 +0100
++++ dns.hh 2009-04-20 23:56:45.000000000 +0100
+@@ -166,10 +166,11 @@
+ ns_t_any = 255, /* Wildcard match. */
+ };
+
++#include <sys/param.h>
+ #ifdef WIN32
+ #define BYTE_ORDER 1
+ #define LITTLE_ENDIAN 1
+-#elif __FreeBSD__ || __APPLE__
++#elif BSD
+ #include <machine/endian.h>
+ #elif __linux__
+ # include <endian.h>
diff --git a/net/powerdns-recursor/patches/patch-ac b/net/powerdns-recursor/patches/patch-ac
new file mode 100644
index 00000000000..3553eaddfb5
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-ac
@@ -0,0 +1,15 @@
+$NetBSD: patch-ac,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+Taken from FreeBSD Ports
+
+--- lwres.cc.orig 2008-06-24 22:23:33.000000000 +0400
++++ lwres.cc 2009-03-19 23:25:35.000000000 +0300
+@@ -181,7 +181,7 @@
+
+ return 1;
+ }
+- catch(exception &mde) {
++ catch(std::exception &mde) {
+ if(::arg().mustDo("log-common-errors"))
+ L<<Logger::Notice<<"Unable to parse packet from remote server "<<ip.toString()<<": "<<mde.what()<<endl;
+ }
diff --git a/net/powerdns-recursor/patches/patch-ad b/net/powerdns-recursor/patches/patch-ad
new file mode 100644
index 00000000000..0f18e9dab49
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-ad
@@ -0,0 +1,69 @@
+$NetBSD: patch-ad,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+Taken from FreeBSD ports
+
+--- pdns_recursor.cc.orig 2008-06-24 22:23:33.000000000 +0400
++++ pdns_recursor.cc 2009-03-19 23:27:01.000000000 +0300
+@@ -666,7 +666,7 @@
+ catch(MOADNSException& e) {
+ L<<Logger::Error<<"DNS parser error: "<<dc->d_mdp.d_qname<<", "<<e.what()<<endl;
+ }
+- catch(exception& e) {
++ catch(std::exception& e) {
+ L<<Logger::Error<<"STL error: "<<e.what()<<endl;
+ }
+ catch(...) {
+@@ -1183,7 +1183,7 @@
+ s_rcc.send(answer, &remote);
+ command();
+ }
+- catch(exception& e) {
++ catch(std::exception& e) {
+ L<<Logger::Error<<"Error dealing with control socket request: "<<e.what()<<endl;
+ }
+ catch(AhuException& ae) {
+@@ -1486,7 +1486,7 @@
+ SyncRes::s_negcache.clear();
+ return "ok\n";
+ }
+- catch(exception& e) {
++ catch(std::exception& e) {
+ L<<Logger::Error<<"Had error reloading zones, keeping original data: "<<e.what()<<endl;
+ }
+ catch(AhuException& ae) {
+@@ -1525,7 +1525,7 @@
+ string tmp=DNSRR2String(rr);
+ rr=String2DNSRR(rr.qname, rr.qtype, tmp, rr.ttl);
+ }
+- catch(exception &e) {
++ catch(std::exception &e) {
+ throw AhuException("Error parsing record '"+rr.qname+"' of type "+rr.qtype.getName()+" in zone '"+headers.first+"' from file '"+headers.second+"': "+e.what());
+ }
+ catch(...) {
+@@ -1647,7 +1647,7 @@
+ }
+ }
+ }
+- catch(exception& e) {
++ catch(std::exception& e) {
+ L<<Logger::Error<<"Retaining current script, error from '"<<fname<<"': "<< e.what() <<endl;
+ return string("Retaining current script, error from '"+fname+"': "+string(e.what())+"\n");
+ }
+@@ -1771,7 +1771,7 @@
+ }
+
+ }
+- catch(exception &e) {
++ catch(std::exception &e) {
+ L<<Logger::Error<<"Failed to load 'lua' script from '"<<::arg()["lua-dns-script"]<<"': "<<e.what()<<endl;
+ exit(99);
+ }
+@@ -2060,7 +2060,7 @@
+ L<<Logger::Error<<"Exception: "<<ae.reason<<endl;
+ ret=EXIT_FAILURE;
+ }
+- catch(exception &e) {
++ catch(std::exception &e) {
+ L<<Logger::Error<<"STL Exception: "<<e.what()<<endl;
+ ret=EXIT_FAILURE;
+ }
diff --git a/net/powerdns-recursor/patches/patch-ae b/net/powerdns-recursor/patches/patch-ae
new file mode 100644
index 00000000000..10156adfb75
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-ae
@@ -0,0 +1,33 @@
+$NetBSD: patch-ae,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+Taken from FreeBSD ports
+
+--- pdns_recursor.1.orig 2008-03-30 22:41:26.000000000 +0200
++++ pdns_recursor.1 2008-04-02 00:15:05.000000000 +0200
+@@ -5,7 +5,7 @@
+ .\" Manual:
+ .\" Source:
+ .\"
+-.TH "PDNS_RECURSOR" "1" "03/22/2008" "" ""
++.TH "PDNS_RECURSOR" "8" "03/22/2008" "" ""
+ .\" disable hyphenation
+ .nh
+ .\" disable justification (adjust text to left margin only)
+@@ -16,7 +16,7 @@
+ \fIpdns_recursor\fR [\-\-daemon] [\-\-local\-address] [\-\-help, \-h] [\-\-allow\-from]
+ .sp
+ .SH "DESCRIPTION"
+-pdns_recursor(1) is a high performance, simple and secure recursing nameserver. It currently powers over two million internet connections.
++pdns_recursor(8) is a high performance, simple and secure recursing nameserver. It currently powers over two million internet connections.
+ .sp
+ The recursor is configured via a configuration file, but each item in that file can be overridden on the command line.
+ .sp
+@@ -243,7 +243,7 @@
+ Website: http://wiki.powerdns.com, http://www.powerdns.com
+ .sp
+ .SH "SEE ALSO"
+-rec_control(1)
++rec_control(8)
+ .sp
+ .SH "COPYING"
+ Copyright \(co 2006 PowerDNS.COM BV. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 2.
diff --git a/net/powerdns-recursor/patches/patch-af b/net/powerdns-recursor/patches/patch-af
new file mode 100644
index 00000000000..d64629a8748
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-af
@@ -0,0 +1,33 @@
+$NetBSD: patch-af,v 1.1.1.1 2009/04/21 14:16:47 roy Exp $
+
+Taken from FreeBSD ports
+
+--- rec_control.1.orig 2008-03-30 22:41:26.000000000 +0200
++++ rec_control.1 2008-04-02 00:15:23.000000000 +0200
+@@ -5,7 +5,7 @@
+ .\" Manual:
+ .\" Source:
+ .\"
+-.TH "REC_CONTROL" "1" "03/16/2008" "" ""
++.TH "REC_CONTROL" "8" "03/16/2008" "" ""
+ .\" disable hyphenation
+ .nh
+ .\" disable justification (adjust text to left margin only)
+@@ -16,7 +16,7 @@
+ \fIrec_control\fR [\-\-help] [\-\-socket\-dir] [\-\-socket\-pid] command ..
+ .sp
+ .SH "DESCRIPTION"
+-rec_control(1) allows the operator to control a running instance of the pdns_recursor.
++rec_control(8) allows the operator to control a running instance of the pdns_recursor.
+ .sp
+ The commands that can be passed to the recursor are described on http://doc.powerdns.com/rec\-control.html
+ .sp
+@@ -105,7 +105,7 @@
+ Website: http://wiki.powerdns.com, http://www.powerdns.com
+ .sp
+ .SH "SEE ALSO"
+-pdns_recursor(1)
++pdns_recursor(8)
+ .sp
+ .SH "COPYING"
+ Copyright \(co 2006 PowerDNS.COM BV. Free use of this software is granted under the terms of the GNU General Public License (GPL) version 2.