summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfhajny <fhajny@pkgsrc.org>2015-06-10 14:22:29 +0000
committerfhajny <fhajny@pkgsrc.org>2015-06-10 14:22:29 +0000
commit85ceabdd41eadf8b6f7c06d806e5f8972e03d67d (patch)
tree3f9d2d749c6d3d123549159b555a7aefba375faf
parent743a0c9937b210e997df4c787a9f4c899175f4df (diff)
downloadpkgsrc-85ceabdd41eadf8b6f7c06d806e5f8972e03d67d.tar.gz
Update net/powerdns-recursor to 3.7.3.
Add SMF support. Defuzz patches. PowerDNS Recursor 3.7.3 - Limit the maximum length of a qname - pdnssec: check for glue and delegations in parent zones PowerDNS Recursor 3.7.2 - Fix handling of forward references in label compressed packets; fixes CVE-2015-1868. - Minor improvements and bugfixes. PowerDNS Recursor 3.7.1 - New root-nx-trust flag makes PowerDNS generalize NXDOMAIN responses from the root-servers - getregisteredname() for Lua, which turns 'www.bbc.co.uk' into 'bbc.co.uk' - Lua preoutquery filter - Lua IP-based filter (ipfilter) before parsing packets - iputils class for Lua, to quickly process IP addresses and netmasks in their native format - getregisteredname function for Lua, to find the registered domain for a given name - Various new ringbuffers: top-servfail-remotes, top-largeanswer-remotes, top-servfail-queries - Minor improvements and bugfixes. PowerDNS Recursor 3.6.2 - Minor improvements and bugfixes. PowerDNS Recursor 3.6.1 - Fix for a crash under a specific sequence of packets. PowerDNS Recursor 3.6.0 - Implement minimum-ttl-override config setting, plus runtime configurability via 'rec_control set-minimum-ttl'. - Lots of work on the JSON API, which is exposed via Aki Tuomi's 'yahttp'. - Lua modules can now use 'pdnslog(INFO..') - Adopt any-to-tcp feature to the recursor. - Implement built-in statistics dumper using the 'carbon' protocol, which is also understood by metronome (our mini-graphite). Use 'carbon-server', 'carbon-ourname' and 'carbon-interval' settings. - New setting 'udp-truncation-threshold' to configure from how many bytes we should truncate. commit a09a8ce. - Proper support for CHaos class for CHAOS TXT queries. - Added support for Lua scripts to drop queries w/o further processing. - Kevin Holly added qtype statistics to recursor and rec_control. - Add support for include-files in configuration, also reload ACLs and zones defined in them. - Paulo Anes contributed server-down-max-fails which helps combat Recursive DNS based amplification attacks. - Implement "followCNAMERecords" feature in the Lua hooks. - Minor improvements and bugfixes. PowerDNS Recursor 3.5.3 - This is a bugfix and performance update to 3.5.2. It brings serious performance improvements for dual stack users. PowerDNS Recursor 3.5.2 - This is a stability and bugfix update to 3.5.1. It contains important fixes that improve operation for certain domains. PowerDNS Recursor 3.5.1 - This is a stability and bugfix update to 3.5. PowerDNS Recursor 3.5 - The local zone server now understands wildcards. - The Lua postresolve and nodata hooks. - A new feature, rec_control trace-regex allows the tracing of lookups for specific names - A new setting, export-etc-hosts-search-suffix, adds a configurable suffix to names imported from /etc/hosts - Minor improvements & bugfixes PowerDNS Recursor 3.3.1 - Small number of important fixes, adds some memory usage statistics, but no new features
-rw-r--r--net/powerdns-recursor/Makefile25
-rw-r--r--net/powerdns-recursor/distinfo43
-rw-r--r--net/powerdns-recursor/options.mk3
-rw-r--r--net/powerdns-recursor/patches/patch-CVE-2014-860160
-rw-r--r--net/powerdns-recursor/patches/patch-Makefile.in (renamed from net/powerdns-recursor/patches/patch-Makefile)56
-rw-r--r--net/powerdns-recursor/patches/patch-brg_endian.h14
-rw-r--r--net/powerdns-recursor/patches/patch-cachecleaner.hh24
-rw-r--r--net/powerdns-recursor/patches/patch-dns.hh15
-rw-r--r--net/powerdns-recursor/patches/patch-dnsparser.cc10
-rw-r--r--net/powerdns-recursor/patches/patch-dnsparser.hh10
-rw-r--r--net/powerdns-recursor/patches/patch-iputils.hh17
-rw-r--r--net/powerdns-recursor/patches/patch-kqueuemplexer.cc6
-rw-r--r--net/powerdns-recursor/patches/patch-namespaces.hh8
-rw-r--r--net/powerdns-recursor/patches/patch-pdns__recursor.152
-rw-r--r--net/powerdns-recursor/patches/patch-pdns__recursor.cc115
-rw-r--r--net/powerdns-recursor/patches/patch-rec__channel.cc26
-rw-r--r--net/powerdns-recursor/patches/patch-rec__channel__rec.cc20
-rw-r--r--net/powerdns-recursor/patches/patch-rec__control.152
-rw-r--r--net/powerdns-recursor/patches/patch-recpacketcache.hh15
-rw-r--r--net/powerdns-recursor/patches/patch-recursor__cache.cc19
-rw-r--r--net/powerdns-recursor/patches/patch-recursor__cache.hh13
-rw-r--r--net/powerdns-recursor/patches/patch-reczones.cc10
-rw-r--r--net/powerdns-recursor/patches/patch-syncres.cc70
-rw-r--r--net/powerdns-recursor/patches/patch-syncres.hh13
-rw-r--r--net/powerdns-recursor/patches/patch-sysdeps_SunOS.inc14
25 files changed, 252 insertions, 458 deletions
diff --git a/net/powerdns-recursor/Makefile b/net/powerdns-recursor/Makefile
index d1f7f8193fb..be1983dc13a 100644
--- a/net/powerdns-recursor/Makefile
+++ b/net/powerdns-recursor/Makefile
@@ -1,8 +1,7 @@
-# $NetBSD: Makefile,v 1.16 2014/12/11 20:18:17 roy Exp $
+# $NetBSD: Makefile,v 1.17 2015/06/10 14:22:29 fhajny Exp $
#
-DISTNAME= pdns-recursor-3.3
-PKGREVISION= 5
+DISTNAME= pdns-recursor-3.7.2
CATEGORIES= net
MASTER_SITES= http://downloads.powerdns.com/releases/
EXTRACT_SUFX= .tar.bz2
@@ -12,29 +11,22 @@ HOMEPAGE= http://www.powerdns.com/
COMMENT= PowerDNS resolver/recursing nameserver
LICENSE= gnu-gpl-v2
-MAKE_JOBS_SAFE= no
-
-USE_TOOLS= gmake
+HAS_CONFIGURE= yes
USE_LANGUAGES= c c++
+USE_TOOLS+= gmake
RCD_SCRIPTS+= pdns_recursor
EGDIR= ${PREFIX}/share/examples/pdns-recursor
-BUILD_MAKE_FLAGS+= CONFIGDIR=${PKG_SYSCONFDIR} OPTFLAGS=
+BUILD_MAKE_FLAGS+= SYSCONFDIR=${PKG_SYSCONFDIR} OPTFLAGS=
INSTALL_MAKE_FLAGS+= BINDIR=${PREFIX}/bin SBINDIR=${PREFIX}/sbin
-INSTALL_MAKE_FLAGS+= CONFIGDIR=${EGDIR} MANDIR=${PREFIX}/${PKGMANDIR}
+INSTALL_MAKE_FLAGS+= SYSCONFDIR=${EGDIR} MANDIR=${PREFIX}/${PKGMANDIR}
CONF_FILES+= ${EGDIR}/recursor.conf-dist \
${PKG_SYSCONFDIR}/recursor.conf
-SUBST_CLASSES+= whitespace
-SUBST_STAGE.whitespace= pre-configure
-SUBST_MESSAGE.whitespace= Fixing C++ semantic whitespace.
-SUBST_FILES.whitespace= pdns_recursor.cc
-SUBST_SED.whitespace= -e 's|"VERSION"|" VERSION "|'
-
.include "../../mk/compiler.mk"
.if !empty(PKGSRC_COMPILER:Mclang)
CXXFLAGS+= -std=c++11 -Wno-c++11-narrowing
@@ -42,10 +34,7 @@ CXXFLAGS+= -std=c++11 -Wno-c++11-narrowing
.include "options.mk"
-post-patch:
- ${SED} -e "s:/etc/powerdns:${PKG_SYSCONFDIR}:" \
- ${WRKSRC}/config.h >${WRKSRC}/config.h.new
- ${MV} ${WRKSRC}/config.h.new ${WRKSRC}/config.h
+pre-configure:
${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
diff --git a/net/powerdns-recursor/distinfo b/net/powerdns-recursor/distinfo
index d68af517ed5..bec0eb4ca04 100644
--- a/net/powerdns-recursor/distinfo
+++ b/net/powerdns-recursor/distinfo
@@ -1,25 +1,20 @@
-$NetBSD: distinfo,v 1.12 2014/12/11 20:18:17 roy Exp $
+$NetBSD: distinfo,v 1.13 2015/06/10 14:22:29 fhajny Exp $
-SHA1 (pdns-recursor-3.3.tar.bz2) = 2f42955b8b8de355709e9072da2d5dbfadd7ffac
-RMD160 (pdns-recursor-3.3.tar.bz2) = 17bd7ac68892c3fca218c3dc3e70074dd9e748d6
-Size (pdns-recursor-3.3.tar.bz2) = 145785 bytes
-SHA1 (patch-CVE-2014-8601) = dae3dec54e53022183a8889eb1c741b00d08cd0b
-SHA1 (patch-Makefile) = 840d0be6dd7decf4b037efc4f9da05a97815ce8e
-SHA1 (patch-brg_endian.h) = 2fb9d3231e969b2be57d160b0952e11091ae6e26
-SHA1 (patch-cachecleaner.hh) = e9a9ade3fe63160eb897df959f6921b791122499
-SHA1 (patch-dns.hh) = 4d24a3c2bad973e05ed4b1c20bacce3b70992e5a
-SHA1 (patch-dnsparser.cc) = 257072b44d3d68ccd3b773cd4db7d0495f67d874
-SHA1 (patch-dnsparser.hh) = 85dad11c65d242630244a600ab5d857af591db9f
-SHA1 (patch-kqueuemplexer.cc) = e67ca0cc9703e5ba5f89f85eefd457c72495ca52
-SHA1 (patch-namespaces.hh) = 3c9b7c68a8576fd63747b6773549b98f30cba1a0
-SHA1 (patch-pdns__recursor.1) = 33170dd8ec13b0607ebf2ef8366656c565ca4664
-SHA1 (patch-pdns__recursor.cc) = 02baa1f54035aae06d241f1732bd165af60dd584
-SHA1 (patch-rec__channel.cc) = 3bd902cf9152cb90c3cb934263dd0482cac16d16
-SHA1 (patch-rec__channel__rec.cc) = a183984d31aad6d1665d11c40e872511c18bd740
-SHA1 (patch-rec__control.1) = e6ea8e7b93e23cd37bddb272e7cd64858cdf7f83
-SHA1 (patch-recpacketcache.hh) = aef8dbc00cfdd45e75f357b20e48e89ad26d5317
-SHA1 (patch-recursor__cache.cc) = b3ff1ae80e6ec592feb037cfa3964bcbc3798938
-SHA1 (patch-recursor__cache.hh) = f56f189f851fd1e764476851055f2a21e5acbb06
-SHA1 (patch-reczones.cc) = a8d0770d7db449e703e3d66fabfb21bcd02e049e
-SHA1 (patch-syncres.cc) = ca3ba23a8d36ca54832452dab47ceb50754e2c35
-SHA1 (patch-syncres.hh) = 4a85e102a2da9a3533ac019e394594834d430214
+SHA1 (pdns-recursor-3.7.2.tar.bz2) = 1780b34c7a0d38cc62f5581484cf25de91bbe1ca
+RMD160 (pdns-recursor-3.7.2.tar.bz2) = a87ac0783da412e24a00a6fca9f42fd70f63c706
+Size (pdns-recursor-3.7.2.tar.bz2) = 244582 bytes
+SHA1 (patch-Makefile.in) = 4aa3fc487afab1795532cc6a09975fa6580625fe
+SHA1 (patch-dns.hh) = 7e9c1b10a066a605b74ebdbee2d894aed50f6c68
+SHA1 (patch-dnsparser.cc) = acd60fbeaa5ad3aa09db306eeaddb1071bbedfb7
+SHA1 (patch-dnsparser.hh) = 289e271629969a50b41e805ae9f092ce75a1483f
+SHA1 (patch-iputils.hh) = 01134b045189653046036d7cb081a2f4d1ed27e4
+SHA1 (patch-kqueuemplexer.cc) = 1e3923aec5f81400eaedffa07c50762da7bdd5c8
+SHA1 (patch-namespaces.hh) = b7abe73b649569819fb070e10d3c926c95589bfb
+SHA1 (patch-pdns__recursor.1) = de3c561e770558850a9f1bdf13f60570d90a5643
+SHA1 (patch-pdns__recursor.cc) = b1d6ba1d1abfbd2759431caffc113bca22513abd
+SHA1 (patch-rec__channel.cc) = dee9fba4bbe240ca2070cdf8a8f303bb2e3bce61
+SHA1 (patch-rec__channel__rec.cc) = b0b277167fff8a080528f6a5cc75a81658f7c66f
+SHA1 (patch-rec__control.1) = 6a38b768cf5ab6f91fcf6eb7e4d5f0c62824f723
+SHA1 (patch-recursor__cache.cc) = c2f86bd695ed01ae6b415a61a099696c87f78d63
+SHA1 (patch-reczones.cc) = f187de66d755a8e134804282ceb7723aa9bd392e
+SHA1 (patch-sysdeps_SunOS.inc) = e2087d1469437c88266bc30566cf9d7415e7af69
diff --git a/net/powerdns-recursor/options.mk b/net/powerdns-recursor/options.mk
index a231ba87776..dece1270cd0 100644
--- a/net/powerdns-recursor/options.mk
+++ b/net/powerdns-recursor/options.mk
@@ -1,4 +1,4 @@
-# $NetBSD: options.mk,v 1.3 2014/05/03 13:01:24 alnsn Exp $
+# $NetBSD: options.mk,v 1.4 2015/06/10 14:22:29 fhajny Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.powerdns-recursor
PKG_SUPPORTED_OPTIONS= lua
@@ -9,7 +9,6 @@ PKG_SUPPORTED_OPTIONS= lua
### Build with Lua scripting support
###
.if !empty(PKG_OPTIONS:Mlua)
-LUA_VERSIONS_INCOMPATIBLE= 52
MAKE_ENV+= LUA=1
MAKE_ENV+= LUA_LIBS_CONFIG=-llua
MAKE_ENV+= LUA_CPPFLAGS_CONFIG=-I${PREFIX}/${LUA_INCDIR}
diff --git a/net/powerdns-recursor/patches/patch-CVE-2014-8601 b/net/powerdns-recursor/patches/patch-CVE-2014-8601
deleted file mode 100644
index 0b8542215df..00000000000
--- a/net/powerdns-recursor/patches/patch-CVE-2014-8601
+++ /dev/null
@@ -1,60 +0,0 @@
-$NetBSD: patch-CVE-2014-8601,v 1.1 2014/12/11 20:18:17 roy Exp $
-
-Upstream backported fix for CVE-2014-8601
-
-commit 62d189c81359c70821523d7ba9831d0f6e57b012
-Author: Your Name <you@example.com>
-Date: Tue Dec 2 08:50:41 2014 +0000
-
- backport query limiter to 3.3
-
-diff --git pdns_recursor.cc pdns_recursor.cc
-index 0f9b08f..3bb71e0 100644
---- pdns_recursor.cc
-+++ pdns_recursor.cc
-@@ -522,7 +522,14 @@ void startDoResolve(void *p)
- bool variableAnswer = false;
- // if there is a PowerDNSLua active, and it 'took' the query in preResolve, we don't launch beginResolve
- if(!t_pdl->get() || !(*t_pdl)->preresolve(dc->d_remote, g_listenSocketsAddresses[dc->d_socket], dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), ret, res, &variableAnswer)) {
-- res = sr.beginResolve(dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), dc->d_mdp.d_qclass, ret);
-+ try {
-+ res = sr.beginResolve(dc->d_mdp.d_qname, QType(dc->d_mdp.d_qtype), dc->d_mdp.d_qclass, ret);
-+ }
-+ catch(ImmediateServFailException &e) {
-+ L<<Logger::Error<<"Sending SERVFAIL during resolve of '"<<dc->d_mdp.d_qname<<"' because: "<<e.reason<<endl;
-+
-+ res = RCode::ServFail;
-+ }
-
- if(t_pdl->get()) {
- if(res == RCode::NXDomain)
-diff --git a/syncres.cc b/syncres.cc
-index 4b05acf..08b2930 100644
---- syncres.cc
-+++ syncres.cc
-@@ -874,6 +874,7 @@ int SyncRes::doResolveAt(set<string, CIStringCompare> nameservers, string auth,
- }
- else {
- s_outqueries++; d_outqueries++;
-+ if(d_outqueries > 50) throw ImmediateServFailException("more than 50 queries sent while resolving "+qname);
- TryTCP:
- if(doTCP) {
- LOG<<prefix<<qname<<": using TCP with "<< remoteIP->toStringWithPort() <<endl;
-diff --git a/syncres.hh b/syncres.hh
-index e3249d2..6c151e0 100644
---- syncres.hh
-+++ syncres.hh
-@@ -502,6 +502,13 @@ private:
- static AtomicCounter s_currentConnections; //!< total number of current TCP connections
- };
-
-+class ImmediateServFailException
-+{
-+public:
-+ ImmediateServFailException(string r){reason=r;};
-+
-+ string reason; //! Print this to tell the user what went wrong
-+};
-
- struct RemoteKeeper
- {
diff --git a/net/powerdns-recursor/patches/patch-Makefile b/net/powerdns-recursor/patches/patch-Makefile.in
index 882185480fd..221dd36e902 100644
--- a/net/powerdns-recursor/patches/patch-Makefile
+++ b/net/powerdns-recursor/patches/patch-Makefile.in
@@ -1,10 +1,9 @@
-$NetBSD: patch-Makefile,v 1.1 2012/02/28 10:49:27 roy Exp $
+$NetBSD: patch-Makefile.in,v 1.1 2015/06/10 14:22:29 fhajny Exp $
-Support conigurable installation location.
-Man pages belong in section 8.
+Use proper locations and install scripts.
---- Makefile.orig 2010-09-21 16:22:09.000000000 +0000
-+++ Makefile
+--- Makefile.in.orig 2015-04-21 13:02:57.000000000 +0000
++++ Makefile.in
@@ -1,6 +1,8 @@
# user editable stuff:
-SBINDIR=/usr/sbin/
@@ -13,10 +12,10 @@ Man pages belong in section 8.
+SBINDIR=$(PREFIX)/sbin/
+BINDIR=$(PREFIX)/bin/
+MANDIR=$(PREFIX)/share/man
- CONFIGDIR="/etc/powerdns/"
+ SYSCONFDIR=/etc/powerdns/
+ LOCALSTATEDIR=/var/run/
OPTFLAGS?=-O3
- CXXFLAGS:= $(CXXFLAGS) -Wall $(OPTFLAGS) $(PROFILEFLAGS) $(ARCHFLAGS) -pthread
-@@ -10,6 +12,13 @@ LDFLAGS:=$(LDFLAGS) $(ARCHFLAGS) -pthrea
+@@ -12,6 +14,13 @@ STRIP_BINARIES?=1
LINKCC=$(CXX)
CC?=gcc
@@ -30,18 +29,27 @@ Man pages belong in section 8.
# Lua 5.1 settings
# static dependencies
-@@ -25,7 +34,7 @@ REC_CONTROL_OBJECTS=rec_channel.o rec_co
+@@ -30,7 +39,7 @@ REC_CONTROL_OBJECTS=rec_channel.o rec_co
unix_utility.o logger.o qtype.o
# what we need
--all: message pdns_recursor rec_control
-+all: message pdns_recursor rec_control recursor.conf-dist
+-all: message version_generated.h build
++all: message version_generated.h build recursor.conf-dist
# OS specific instructions
-include sysdeps/$(shell uname).inc
-@@ -52,6 +61,10 @@ endif
+@@ -71,7 +80,7 @@ CFLAGS += -DSYSCONFDIR='"$(SYSCONFDIR)"'
- LDFLAGS += $(PROFILEFLAGS) $(STATICFLAGS)
+ # Version
+ build_date := $(shell LC_TIME=C date '+%Y%m%d%H%M%S')
+-build_host := $(shell id -u -n)@$(shell hostname -f)
++build_host := $(shell id -u -n)@$(shell hostname)
+
+ .PHONY: version_generated.h
+ version_generated.h:
+@@ -89,6 +98,10 @@ endef
+
+ export create_version_generated_h
+recursor.conf-dist: pdns_recursor
+ @# Not cross-compile friendly :/
@@ -50,32 +58,36 @@ Man pages belong in section 8.
message:
@echo
@echo PLEASE READ: If you get an error mentioning \#include '<boost/something.hpp>', please read README
-@@ -70,16 +83,14 @@ basic_checks:
+@@ -107,20 +120,14 @@ basic_checks:
fi
- install: all
+ install: build-stamp
- -mkdir -p $(DESTDIR)/$(SBINDIR)
-- mv pdns_recursor $(DESTDIR)/$(SBINDIR)
+- cp pdns_recursor $(DESTDIR)/$(SBINDIR)
+-ifeq ($(STRIP_BINARIES), 1)
- strip $(DESTDIR)/$(SBINDIR)/pdns_recursor
+-endif
- mkdir -p $(DESTDIR)/$(BINDIR)
-- mv rec_control $(DESTDIR)/$(BINDIR)
+- cp rec_control $(DESTDIR)/$(BINDIR)
+-ifeq ($(STRIP_BINARIES), 1)
- strip $(DESTDIR)/$(BINDIR)/rec_control
-- -mkdir -p $(DESTDIR)/$(CONFIGDIR)
-- $(DESTDIR)/$(SBINDIR)/pdns_recursor --config > $(DESTDIR)/$(CONFIGDIR)/recursor.conf-dist
+-endif
+- -mkdir -p $(DESTDIR)/$(SYSCONFDIR)
+- $(DESTDIR)/$(SBINDIR)/pdns_recursor --config > $(DESTDIR)/$(SYSCONFDIR)/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)/$(SYSCONFDIR)
++ $(INSTALL_DATA) recursor.conf-dist $(DESTDIR)/$(SYSCONFDIR)
+ $(INSTALL_DIR) $(DESTDIR)/$(MANDIR)/man8
+ $(INSTALL_MAN) pdns_recursor.8 rec_control.8 $(DESTDIR)/$(MANDIR)/man8
$(OS_SPECIFIC_INSTALL)
clean: binclean
-@@ -94,7 +105,7 @@ dep:
+@@ -135,7 +142,7 @@ dep:
-include dep
optional:
diff --git a/net/powerdns-recursor/patches/patch-brg_endian.h b/net/powerdns-recursor/patches/patch-brg_endian.h
deleted file mode 100644
index 05f8882eafc..00000000000
--- a/net/powerdns-recursor/patches/patch-brg_endian.h
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-brg_endian.h,v 1.1 2012/08/07 23:31:03 marino Exp $
-
---- brg_endian.h.orig 2010-09-21 16:22:09.000000000 +0000
-+++ brg_endian.h
-@@ -34,7 +34,8 @@
- /* Include files where endian defines and byteswap functions may reside */
- #if defined( __sun )
- # include <sys/isa_defs.h>
--#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ )
-+#elif defined( __FreeBSD__ ) || defined( __OpenBSD__ ) || defined( __NetBSD__ ) || \
-+ defined( __DragonFly__ )
- # include <sys/endian.h>
- #elif defined( BSD ) && ( BSD >= 199103 ) || defined( __APPLE__ ) || \
- defined( __CYGWIN32__ ) || defined( __DJGPP__ ) || defined( __osf__ )
diff --git a/net/powerdns-recursor/patches/patch-cachecleaner.hh b/net/powerdns-recursor/patches/patch-cachecleaner.hh
deleted file mode 100644
index dd5416c76c7..00000000000
--- a/net/powerdns-recursor/patches/patch-cachecleaner.hh
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-cachecleaner.hh,v 1.1 2013/06/26 15:52:22 joerg Exp $
-
---- cachecleaner.hh.orig 2010-09-21 16:22:09.000000000 +0000
-+++ cachecleaner.hh
-@@ -18,7 +18,7 @@ template <typename T> void pruneCollecti
- // cout<<"Need to trim "<<toTrim<<" from cache to meet target!\n";
-
- typedef typename T::template nth_index<1>::type sequence_t;
-- sequence_t& sidx=collection.get<1>();
-+ sequence_t& sidx=get<1>(collection);
-
- unsigned int tried=0, lookAt, erased=0;
-
-@@ -62,8 +62,8 @@ template <typename T> void pruneCollecti
- template <typename T> void moveCacheItemToFrontOrBack(T& collection, typename T::iterator& iter, bool front)
- {
- typedef typename T::template nth_index<1>::type sequence_t;
-- sequence_t& sidx=collection.get<1>();
-- typename sequence_t::iterator si=collection.project<1>(iter);
-+ sequence_t& sidx=get<1>(collection);
-+ typename sequence_t::iterator si=project<1>(collection, iter);
- if(front)
- sidx.relocate(sidx.begin(), si); // at the beginning of the delete queue
- else
diff --git a/net/powerdns-recursor/patches/patch-dns.hh b/net/powerdns-recursor/patches/patch-dns.hh
index 9d4db67dc3e..3c231f6da7a 100644
--- a/net/powerdns-recursor/patches/patch-dns.hh
+++ b/net/powerdns-recursor/patches/patch-dns.hh
@@ -1,18 +1,11 @@
-$NetBSD: patch-dns.hh,v 1.2 2012/08/07 23:31:03 marino Exp $
+$NetBSD: patch-dns.hh,v 1.3 2015/06/10 14:22:29 fhajny Exp $
Only attempt to define byte order if unset.
-Add DragonFly support
---- dns.hh.orig 2012-08-07 23:18:28.526524000 +0000
+--- dns.hh.orig 2015-04-21 13:02:57.000000000 +0000
+++ dns.hh
-@@ -176,12 +176,12 @@ enum {
- #ifdef WIN32
- #define BYTE_ORDER 1
- #define LITTLE_ENDIAN 1
--#elif __FreeBSD__ || __APPLE__
-+#elif defined(__FreeBSD__) || defined(__APPLE__) || defined(__DragonFly__)
- #include <machine/endian.h>
- #elif __linux__
+@@ -149,7 +149,7 @@ struct EDNS0Record
+ #elif __linux__ || __GNU__
# include <endian.h>
-#else // with thanks to <arpa/nameser.h>
diff --git a/net/powerdns-recursor/patches/patch-dnsparser.cc b/net/powerdns-recursor/patches/patch-dnsparser.cc
index 66707c99be2..aa40a3fa14b 100644
--- a/net/powerdns-recursor/patches/patch-dnsparser.cc
+++ b/net/powerdns-recursor/patches/patch-dnsparser.cc
@@ -1,8 +1,10 @@
-$NetBSD: patch-dnsparser.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-dnsparser.cc,v 1.2 2015/06/10 14:22:29 fhajny Exp $
---- dnsparser.cc.orig 2010-09-21 16:22:09.000000000 +0000
+Straighten Boost namespace.
+
+--- dnsparser.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ dnsparser.cc
-@@ -106,7 +106,7 @@ static const string EncodeDNSLabel(const
+@@ -109,7 +109,7 @@ static const string EncodeDNSLabel(const
}
@@ -11,7 +13,7 @@ $NetBSD: patch-dnsparser.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
{
dnsheader dnsheader;
memset(&dnsheader, 0, sizeof(dnsheader));
-@@ -140,7 +140,7 @@ shared_ptr<DNSRecordContent> DNSRecordCo
+@@ -143,7 +143,7 @@ shared_ptr<DNSRecordContent> DNSRecordCo
memcpy(&packet[pos], serialized.c_str(), serialized.size()); pos+=(uint16_t)serialized.size();
MOADNSParser mdp((char*)&*packet.begin(), (unsigned int)packet.size());
diff --git a/net/powerdns-recursor/patches/patch-dnsparser.hh b/net/powerdns-recursor/patches/patch-dnsparser.hh
index 3fbf101c6d9..6f39f1e3e14 100644
--- a/net/powerdns-recursor/patches/patch-dnsparser.hh
+++ b/net/powerdns-recursor/patches/patch-dnsparser.hh
@@ -1,8 +1,10 @@
-$NetBSD: patch-dnsparser.hh,v 1.1 2013/06/10 18:59:09 joerg Exp $
+$NetBSD: patch-dnsparser.hh,v 1.2 2015/06/10 14:22:29 fhajny Exp $
---- dnsparser.hh.orig 2013-05-10 14:52:18.000000000 +0000
+Straighten Boost namespace.
+
+--- dnsparser.hh.orig 2015-04-21 13:02:57.000000000 +0000
+++ dnsparser.hh
-@@ -167,7 +167,7 @@ public:
+@@ -183,7 +183,7 @@ public:
return record;
}
@@ -11,7 +13,7 @@ $NetBSD: patch-dnsparser.hh,v 1.1 2013/06/10 18:59:09 joerg Exp $
void doRecordCheck(const struct DNSRecord&){}
-@@ -305,9 +305,9 @@ public:
+@@ -327,9 +327,9 @@ public:
//! All answers contained in this packet
answers_t d_answers;
diff --git a/net/powerdns-recursor/patches/patch-iputils.hh b/net/powerdns-recursor/patches/patch-iputils.hh
new file mode 100644
index 00000000000..e3f01525612
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-iputils.hh
@@ -0,0 +1,17 @@
+$NetBSD: patch-iputils.hh,v 1.1 2015/06/10 14:22:29 fhajny Exp $
+
+IP_PKTINFO structure different on NetBSD than expected.
+
+--- iputils.hh.orig 2015-04-21 13:02:57.000000000 +0000
++++ iputils.hh
+@@ -38,6 +38,10 @@
+ #include <boost/tuple/tuple_comparison.hpp>
+ #include <boost/lexical_cast.hpp>
+
++#if defined(IP_PKTINFO) && defined(__NetBSD__)
++#undef IP_PKTINFO
++#endif
++
+ #include "namespaces.hh"
+
+ union ComboAddress {
diff --git a/net/powerdns-recursor/patches/patch-kqueuemplexer.cc b/net/powerdns-recursor/patches/patch-kqueuemplexer.cc
index 0268f631b50..906a42f4ca7 100644
--- a/net/powerdns-recursor/patches/patch-kqueuemplexer.cc
+++ b/net/powerdns-recursor/patches/patch-kqueuemplexer.cc
@@ -1,14 +1,14 @@
-$NetBSD: patch-kqueuemplexer.cc,v 1.1 2012/02/28 10:49:28 roy Exp $
+$NetBSD: patch-kqueuemplexer.cc,v 1.2 2015/06/10 14:22:29 fhajny Exp $
kqueue systems normally have sys/event.h
---- kqueuemplexer.cc.orig 2010-09-21 16:22:09.000000000 +0000
+--- kqueuemplexer.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ kqueuemplexer.cc
@@ -6,9 +6,7 @@
#include <boost/lexical_cast.hpp>
#include "syncres.hh"
#include <sys/types.h>
--#ifdef __FreeBSD__
+-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
#include <sys/event.h>
-#endif
#include <sys/time.h>
diff --git a/net/powerdns-recursor/patches/patch-namespaces.hh b/net/powerdns-recursor/patches/patch-namespaces.hh
index 89069b3d667..1992739217f 100644
--- a/net/powerdns-recursor/patches/patch-namespaces.hh
+++ b/net/powerdns-recursor/patches/patch-namespaces.hh
@@ -1,8 +1,10 @@
-$NetBSD: patch-namespaces.hh,v 1.1 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-namespaces.hh,v 1.2 2015/06/10 14:22:29 fhajny Exp $
---- namespaces.hh.orig 2010-09-21 16:22:09.000000000 +0000
+Straighten Boost namespace.
+
+--- namespaces.hh.orig 2015-04-21 13:02:57.000000000 +0000
+++ namespaces.hh
-@@ -16,9 +16,7 @@ using boost::tie;
+@@ -46,9 +46,7 @@ using boost::tie;
using boost::shared_ptr;
using boost::shared_array;
using boost::scoped_array;
diff --git a/net/powerdns-recursor/patches/patch-pdns__recursor.1 b/net/powerdns-recursor/patches/patch-pdns__recursor.1
index b96b94e42d9..a85ff331922 100644
--- a/net/powerdns-recursor/patches/patch-pdns__recursor.1
+++ b/net/powerdns-recursor/patches/patch-pdns__recursor.1
@@ -1,33 +1,29 @@
-$NetBSD: patch-pdns__recursor.1,v 1.1 2012/02/28 10:49:29 roy Exp $
+$NetBSD: patch-pdns__recursor.1,v 1.2 2015/06/10 14:22:29 fhajny Exp $
-Man page lives in section 8.
+Man pages belong to man8.
---- pdns_recursor.1.orig 2010-09-21 16:22:09.000000000 +0000
+--- pdns_recursor.1.orig 2015-04-21 13:02:57.000000000 +0000
+++ pdns_recursor.1
-@@ -7,7 +7,7 @@
- .\" Source: [FIXME: source]
- .\" Language: English
- .\"
--.TH "PDNS_RECURSOR" "1" "02/10/2010" "[FIXME: source]" "[FIXME: manual]"
-+.TH "PDNS_RECURSOR" "8" "02/10/2010" "[FIXME: source]" "[FIXME: manual]"
- .\" -----------------------------------------------------------------
- .\" * set default formatting
- .\" -----------------------------------------------------------------
-@@ -25,7 +25,7 @@ pdns_recursor \- high\-performance, simp
- \fIpdns_recursor\fR [\-\-daemon] [\-\-local\-address] [\-\-help, \-h] [\-\-allow\-from]
- .SH "DESCRIPTION"
- .sp
--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
-@@ -264,7 +264,7 @@ Written by PowerDNS\&.COM BV, bert huber
- Website: \m[blue]\fBhttp://wiki\&.powerdns\&.com\fR\m[], \m[blue]\fBhttp://www\&.powerdns\&.com\fR\m[]
- .SH "SEE ALSO"
- .sp
+@@ -1,4 +1,4 @@
+-.TH PDNS_RECURSOR 1 "March 2008"
++.TH PDNS_RECURSOR 8 "March 2008"
+ .SH NAME
+ .PP
+ \f[B]pdns_recursor\f[] - high-performance, simple and secure recursing
+@@ -8,7 +8,7 @@ nameserver
+ \f[B]pdns_recursor\f[] [\f[I]OPTION\f[]]...
+ .SH DESCRIPTION
+ .PP
+-pdns_recursor(1) is a high performance, simple and secure recursing
++pdns_recursor(8) is a high performance, simple and secure recursing
+ nameserver.
+ It currently powers over two million internet connections.
+ .PP
+@@ -251,6 +251,6 @@ File new ones at https://github.com/Powe
+ Website: http://www.powerdns.com, https://github.com/PowerDNS/pdns
+ .SH SEE ALSO
+ .PP
-rec_control(1)
+rec_control(8)
- .SH "COPYING"
- .sp
- 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\&.
+ .SH AUTHORS
+ PowerDNS.COM BV.
diff --git a/net/powerdns-recursor/patches/patch-pdns__recursor.cc b/net/powerdns-recursor/patches/patch-pdns__recursor.cc
index 7538a728cb9..af9c0c05703 100644
--- a/net/powerdns-recursor/patches/patch-pdns__recursor.cc
+++ b/net/powerdns-recursor/patches/patch-pdns__recursor.cc
@@ -1,26 +1,27 @@
-$NetBSD: patch-pdns__recursor.cc,v 1.3 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-pdns__recursor.cc,v 1.4 2015/06/10 14:22:29 fhajny Exp $
+Straighten Boost namespace.
Cast to int so we use the correct overload.
-Fix C++ semantic whitespace.
-Caution: this file is also SUBST'd at pre-configure time to insert
-more C++ semantic whitespace around the VERSION macro. Don't roll
-those changes back into the pkgsrc patch as one of them contains
-an rcsid string. (sigh)
-
---- pdns_recursor.cc.orig 2010-09-21 16:22:09.000000000 +0000
+--- pdns_recursor.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ pdns_recursor.cc
-@@ -76,7 +76,7 @@ __thread unsigned int t_id;
- unsigned int g_maxTCPPerClient;
- unsigned int g_networkTimeoutMsec;
+@@ -80,12 +80,12 @@ uint64_t g_latencyStatSize;
bool g_logCommonErrors;
--__thread shared_ptr<PowerDNSLua>* t_pdl;
-+__thread boost::shared_ptr<PowerDNSLua>* t_pdl;
- __thread RemoteKeeper* t_remotes;
+ bool g_anyToTcp;
+ uint16_t g_udpTruncationThreshold;
+-__thread shared_ptr<RecursorLua>* t_pdl;
++__thread boost::shared_ptr<RecursorLua>* t_pdl;
+
+ __thread addrringbuf_t* t_remotes, *t_servfailremotes, *t_largeanswerremotes;
+
+ __thread boost::circular_buffer<pair<std::string, uint16_t> >* t_queryring, *t_servfailqueryring;
+-__thread shared_ptr<Regex>* t_traceRegex;
++__thread boost::shared_ptr<Regex>* t_traceRegex;
RecursorControlChannel s_rcc; // only active in thread 0
-@@ -147,7 +147,7 @@ struct DNSComboWriter {
- ComboAddress d_remote;
+
+@@ -169,7 +169,7 @@ struct DNSComboWriter {
+ ComboAddress d_remote, d_local;
bool d_tcp;
int d_socket;
- shared_ptr<TCPConnection> d_tcpConnection;
@@ -28,7 +29,7 @@ an rcsid string. (sigh)
};
-@@ -551,7 +551,7 @@ void startDoResolve(void *p)
+@@ -661,7 +661,7 @@ void startDoResolve(void *p)
IpToU32(i->content, &ip);
pw.xfr32BitInt(htonl(ip));
} else {
@@ -36,8 +37,8 @@ an rcsid string. (sigh)
+ boost::shared_ptr<DNSRecordContent> drc(DNSRecordContent::mastermake(i->qtype.getCode(), i->qclass, i->content));
drc->toPacket(pw);
}
- if(!dc->d_tcp && pw.size() > maxudpsize) {
-@@ -685,7 +685,7 @@ void makeControlChannelSocket()
+ if(pw.size() > maxanswersize) {
+@@ -814,7 +814,7 @@ void makeControlChannelSocket(int proces
void handleRunningTCPQuestion(int fd, FDMultiplexer::funcparam_t& var)
{
@@ -46,7 +47,7 @@ an rcsid string. (sigh)
if(conn->state==TCPConnection::BYTE0) {
int bytes=recv(conn->getFD(), conn->data, 2, 0);
-@@ -784,7 +784,7 @@ void handleNewTCPQuestion(int fd, FDMult
+@@ -919,7 +919,7 @@ void handleNewTCPQuestion(int fd, FDMult
}
Utility::setNonBlocking(newsock);
@@ -55,7 +56,7 @@ an rcsid string. (sigh)
tc->state=TCPConnection::BYTE0;
t_fdm->addReadFD(tc->getFD(), handleRunningTCPQuestion, tc);
-@@ -882,7 +882,7 @@ void handleNewUDPQuestion(int fd, FDMult
+@@ -1081,7 +1081,7 @@ void handleNewUDPQuestion(int fd, FDMult
}
@@ -64,7 +65,7 @@ an rcsid string. (sigh)
deferredAdd_t deferredAdd;
void makeTCPServerSockets()
-@@ -1065,7 +1065,7 @@ void doStats(void)
+@@ -1273,7 +1273,7 @@ void doStats(void)
time_t now = time(0);
if(lastOutputTime && lastQueryCount && now != lastOutputTime) {
@@ -73,42 +74,48 @@ an rcsid string. (sigh)
}
lastOutputTime = now;
lastQueryCount = SyncRes::s_queries;
-@@ -1485,7 +1485,7 @@ void* doReloadLuaScript()
- L<<Logger::Error<<t_id<<" Unloaded current lua script"<<endl;
+@@ -1734,7 +1734,7 @@ string* doReloadLuaScript()
+ return new string("unloaded\n");
}
else {
-- *t_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
-+ *t_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(fname));
+- *t_pdl = shared_ptr<RecursorLua>(new RecursorLua(fname));
++ *t_pdl = boost::shared_ptr<RecursorLua>(new RecursorLua(fname));
}
}
catch(std::exception& e) {
-@@ -1592,9 +1592,9 @@ int serviceMain(int argc, char*argv[])
- L<<Logger::Error<<"Unknown logging facility "<<::arg().asNum("logging-facility") <<endl;
+@@ -1762,7 +1762,7 @@ try
+ return new string("unset\n");
}
-
-- L<<Logger::Warning<<"PowerDNS recursor "<<VERSION<<" (C) 2001-2010 PowerDNS.COM BV ("<<__DATE__", "__TIME__;
-+ L<<Logger::Warning<<"PowerDNS recursor "<<VERSION<<" (C) 2001-2010 PowerDNS.COM BV ("<<__DATE__ << ", " << __TIME__;
- #ifdef __GNUC__
-- L<<", gcc "__VERSION__;
-+ L<<", gcc " << __VERSION__;
- #endif // add other compilers here
- #ifdef _MSC_VER
- L<<", MSVC "<<_MSC_VER;
-@@ -1776,11 +1776,11 @@ try
+ else {
+- (*t_traceRegex) = shared_ptr<Regex>(new Regex(newRegex));
++ (*t_traceRegex) = boost::shared_ptr<Regex>(new Regex(newRegex));
+ return new string("ok\n");
+ }
+ }
+@@ -2096,11 +2096,11 @@ try
+
L<<Logger::Warning<<"Done priming cache with root hints"<<endl;
- t_RC->d_followRFC2181=::arg().mustDo("auth-can-lower-ttl");
-- t_pdl = new shared_ptr<PowerDNSLua>();
-+ t_pdl = new boost::shared_ptr<PowerDNSLua>();
+- t_pdl = new shared_ptr<RecursorLua>();
++ t_pdl = new boost::shared_ptr<RecursorLua>();
try {
if(!::arg()["lua-dns-script"].empty()) {
-- *t_pdl = shared_ptr<PowerDNSLua>(new PowerDNSLua(::arg()["lua-dns-script"]));
-+ *t_pdl = boost::shared_ptr<PowerDNSLua>(new PowerDNSLua(::arg()["lua-dns-script"]));
+- *t_pdl = shared_ptr<RecursorLua>(new RecursorLua(::arg()["lua-dns-script"]));
++ *t_pdl = boost::shared_ptr<RecursorLua>(new RecursorLua(::arg()["lua-dns-script"]));
L<<Logger::Warning<<"Loaded 'lua' script from '"<<::arg()["lua-dns-script"]<<"'"<<endl;
}
-
-@@ -1832,7 +1832,7 @@ try
+ }
+@@ -2109,7 +2109,7 @@ try
+ _exit(99);
+ }
+
+- t_traceRegex = new shared_ptr<Regex>();
++ t_traceRegex = new boost::shared_ptr<Regex>();
+ unsigned int ringsize=::arg().asNum("stats-ringbuffer-entries") / g_numWorkerThreads;
+ if(ringsize) {
+ t_remotes = new addrringbuf_t();
+@@ -2176,7 +2176,7 @@ try
expired_t expired=t_fdm->getTimeouts(g_now);
for(expired_t::iterator i=expired.begin() ; i != expired.end(); ++i) {
@@ -117,21 +124,3 @@ an rcsid string. (sigh)
if(g_logCommonErrors)
L<<Logger::Warning<<"Timeout from remote TCP client "<< conn->d_remote.toString() <<endl;
t_fdm->removeReadFD(i->first);
-@@ -1990,7 +1990,7 @@ int main(int argc, char **argv)
-
-
- ::arg().setCmd("help","Provide a helpful message");
-- ::arg().setCmd("version","Print version string ("VERSION")");
-+ ::arg().setCmd("version","Print version string (" VERSION ")");
- ::arg().setCmd("config","Output blank configuration");
- L.toConsole(Logger::Info);
- ::arg().laxParse(argc,argv); // do a lax parse
-@@ -2017,7 +2017,7 @@ int main(int argc, char **argv)
- exit(99);
- }
- if(::arg().mustDo("version")) {
-- cerr<<"version: "VERSION<<endl;
-+ cerr<<"version: " VERSION <<endl;
- exit(99);
- }
-
diff --git a/net/powerdns-recursor/patches/patch-rec__channel.cc b/net/powerdns-recursor/patches/patch-rec__channel.cc
index b8abbe763d9..97d883a03c5 100644
--- a/net/powerdns-recursor/patches/patch-rec__channel.cc
+++ b/net/powerdns-recursor/patches/patch-rec__channel.cc
@@ -1,8 +1,8 @@
-$NetBSD: patch-rec__channel.cc,v 1.2 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-rec__channel.cc,v 1.3 2015/06/10 14:22:29 fhajny Exp $
We need to include cstring
---- rec_channel.cc.orig 2010-09-21 16:22:09.000000000 +0000
+--- rec_channel.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ rec_channel.cc
@@ -4,6 +4,7 @@
#include "misc.hh"
@@ -13,20 +13,20 @@ We need to include cstring
#include <sys/types.h>
#include <sys/stat.h>
@@ -46,7 +47,7 @@ int RecursorControlChannel::listen(const
- d_local.sun_family=AF_UNIX;
- strcpy(d_local.sun_path, fname.c_str());
+ if(makeUNsockaddr(fname, &d_local))
+ throw PDNSException("Unable to bind to controlsocket, path '"+fname+"' is not a valid UNIX socket path.");
- if(bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0)
+ if(::bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0)
- throw AhuException("Unable to bind to controlsocket '"+fname+"': "+string(strerror(errno)));
+ throw PDNSException("Unable to bind to controlsocket '"+fname+"': "+stringerror());
return d_fd;
-@@ -84,7 +85,7 @@ void RecursorControlChannel::connect(con
- if(err < 0 && errno!=ENOENT)
- throw AhuException("Unable to remove local controlsocket: "+string(strerror(errno)));
+@@ -79,7 +80,7 @@ void RecursorControlChannel::connect(con
+ if(err < 0 && errno!=ENOENT)
+ throw PDNSException("Unable to remove local controlsocket: "+stringerror());
-- if(bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0) {
-+ if(::bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0) {
- unlink(d_local.sun_path);
- close(d_fd);
- d_fd=-1;
+- if(bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0)
++ if(::bind(d_fd, (sockaddr*)&d_local,sizeof(d_local))<0)
+ throw PDNSException("Unable to bind to local temporary file: "+stringerror());
+
+ if(chmod(d_local.sun_path,0666)<0) // make sure that pdns can reply!
diff --git a/net/powerdns-recursor/patches/patch-rec__channel__rec.cc b/net/powerdns-recursor/patches/patch-rec__channel__rec.cc
index be46a968dcd..6445007fc71 100644
--- a/net/powerdns-recursor/patches/patch-rec__channel__rec.cc
+++ b/net/powerdns-recursor/patches/patch-rec__channel__rec.cc
@@ -1,9 +1,11 @@
-$NetBSD: patch-rec__channel__rec.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-rec__channel__rec.cc,v 1.2 2015/06/10 14:22:29 fhajny Exp $
---- rec_channel_rec.cc.orig 2010-09-21 16:22:09.000000000 +0000
+Straighten Boost namespace.
+
+--- rec_channel_rec.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ rec_channel_rec.cc
-@@ -27,7 +27,7 @@ using namespace std;
- #include "namespaces.hh"
+@@ -31,7 +31,7 @@ pthread_mutex_t g_carbon_config_lock=PTH
+
map<string, const uint32_t*> d_get32bitpointers;
map<string, const uint64_t*> d_get64bitpointers;
-map<string, function< uint32_t() > > d_get32bitmembers;
@@ -11,7 +13,7 @@ $NetBSD: patch-rec__channel__rec.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
void addGetStat(const string& name, const uint32_t* place)
{
-@@ -37,7 +37,7 @@ void addGetStat(const string& name, cons
+@@ -41,7 +41,7 @@ void addGetStat(const string& name, cons
{
d_get64bitpointers[name]=place;
}
@@ -20,12 +22,12 @@ $NetBSD: patch-rec__channel__rec.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
{
d_get32bitmembers[name]=f;
}
-@@ -61,7 +61,7 @@ string getAllStats()
- string ret;
+@@ -66,7 +66,7 @@ map<string,string> getAllStatsMap()
+
pair<string, const uint32_t*> the32bits;
pair<string, const uint64_t*> the64bits;
- pair<string, function< uint32_t() > > the32bitmembers;
+ pair<string, boost::function< uint32_t() > > the32bitmembers;
+
BOOST_FOREACH(the32bits, d_get32bitpointers) {
- ret += the32bits.first + "\t" + lexical_cast<string>(*the32bits.second) + "\n";
- }
+ ret.insert(make_pair(the32bits.first, lexical_cast<string>(*the32bits.second)));
diff --git a/net/powerdns-recursor/patches/patch-rec__control.1 b/net/powerdns-recursor/patches/patch-rec__control.1
index 33785a23ac1..a0117c256f5 100644
--- a/net/powerdns-recursor/patches/patch-rec__control.1
+++ b/net/powerdns-recursor/patches/patch-rec__control.1
@@ -1,33 +1,29 @@
-$NetBSD: patch-rec__control.1,v 1.1 2012/02/28 10:49:29 roy Exp $
+$NetBSD: patch-rec__control.1,v 1.2 2015/06/10 14:22:29 fhajny Exp $
-Man page lives in section 8.
+Man pages belong to man8.
---- rec_control.1.orig 2010-09-21 16:22:09.000000000 +0000
+--- rec_control.1.orig 2015-04-21 13:02:57.000000000 +0000
+++ rec_control.1
-@@ -7,7 +7,7 @@
- .\" Source: [FIXME: source]
- .\" Language: English
- .\"
--.TH "REC_CONTROL" "1" "08/30/2010" "[FIXME: source]" "[FIXME: manual]"
-+.TH "REC_CONTROL" "8" "08/30/2010" "[FIXME: source]" "[FIXME: manual]"
- .\" -----------------------------------------------------------------
- .\" * set default formatting
- .\" -----------------------------------------------------------------
-@@ -25,7 +25,7 @@ rec_control \- control pdns_recursor
- \fIrec_control\fR [\-\-help] [\-\-socket\-dir] [\-\-socket\-pid] command \&.\&.
- .SH "DESCRIPTION"
- .sp
--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 \m[blue]\fBhttp://doc\&.powerdns\&.com/rec\-control\&.html\fR\m[]
- .SH "EXAMPLES"
-@@ -133,7 +133,7 @@ Written by PowerDNS\&.COM BV, bert huber
- Website: \m[blue]\fBhttp://wiki\&.powerdns\&.com\fR\m[], \m[blue]\fBhttp://www\&.powerdns\&.com\fR\m[]
- .SH "SEE ALSO"
- .sp
+@@ -1,4 +1,4 @@
+-.TH REC_CONTROL 1 "April 2006"
++.TH REC_CONTROL 8 "April 2006"
+ .SH NAME
+ .PP
+ rec_control - control pdns_recursor
+@@ -8,7 +8,7 @@ rec_control - control pdns_recursor
+ \f[I]COMMAND\f[] [\f[I]COMMAND-OPTION\f[]]...
+ .SS DESCRIPTION
+ .PP
+-rec_control(1) allows the operator to control a running instance of the
++rec_control(8) allows the operator to control a running instance of the
+ pdns_recursor.
+ .PP
+ The commands that can be passed to the recursor are described on
+@@ -185,6 +185,6 @@ File new ones at https://github.com/Powe
+ Website: http://wiki.powerdns.com, http://www.powerdns.com
+ .SH SEE ALSO
+ .PP
-pdns_recursor(1)
+pdns_recursor(8)
- .SH "COPYING"
- .sp
- 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\&.
+ .SH AUTHORS
+ PowerDNS.COM BV.
diff --git a/net/powerdns-recursor/patches/patch-recpacketcache.hh b/net/powerdns-recursor/patches/patch-recpacketcache.hh
deleted file mode 100644
index 82a00b37411..00000000000
--- a/net/powerdns-recursor/patches/patch-recpacketcache.hh
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-recpacketcache.hh,v 1.1 2013/06/26 15:52:22 joerg Exp $
-
---- recpacketcache.hh.orig 2010-09-21 16:22:09.000000000 +0000
-+++ recpacketcache.hh
-@@ -60,8 +60,8 @@ inline bool RecursorPacketCache::Entry::
- const struct dnsheader*
- dh=(const struct dnsheader*) d_packet.c_str(),
- *rhsdh=(const struct dnsheader*)rhs.d_packet.c_str();
-- if(make_tuple(dh->opcode, dh->rd, dh->qdcount) <
-- make_tuple(rhsdh->opcode, rhsdh->rd, rhsdh->qdcount))
-+ if(boost::make_tuple(dh->opcode, dh->rd, dh->qdcount) <
-+ boost::make_tuple(rhsdh->opcode, rhsdh->rd, rhsdh->qdcount))
- return true;
-
- return dnspacketLessThan(d_packet, rhs.d_packet);
diff --git a/net/powerdns-recursor/patches/patch-recursor__cache.cc b/net/powerdns-recursor/patches/patch-recursor__cache.cc
index b0c96478ede..6ae809a3bf1 100644
--- a/net/powerdns-recursor/patches/patch-recursor__cache.cc
+++ b/net/powerdns-recursor/patches/patch-recursor__cache.cc
@@ -1,8 +1,10 @@
-$NetBSD: patch-recursor__cache.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-recursor__cache.cc,v 1.2 2015/06/10 14:22:29 fhajny Exp $
---- recursor_cache.cc.orig 2010-09-21 16:22:09.000000000 +0000
+Straighten Boost namespace.
+
+--- recursor_cache.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ recursor_cache.cc
-@@ -52,7 +52,7 @@ DNSResourceRecord String2DNSRR(const str
+@@ -53,7 +53,7 @@ DNSResourceRecord String2DNSRR(const str
rr.content=".";
}
else {
@@ -11,7 +13,7 @@ $NetBSD: patch-recursor__cache.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
rr.content=regen->getZoneRepresentation();
}
rr.content.reserve(0);
-@@ -78,7 +78,7 @@ string DNSRR2String(const DNSResourceRec
+@@ -79,7 +79,7 @@ string DNSRR2String(const DNSResourceRec
return simpleCompress(rr.content, rr.qname);
else {
string ret;
@@ -20,12 +22,3 @@ $NetBSD: patch-recursor__cache.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
ret=drc->serialize(rr.qname);
// cerr<<"stored '"<<rr.qname<<" '"<<rr.qtype.getName()<<"' '"<<rr.content<<"' as "<<ret.size()<<" bytes"<<endl;
return ret;
-@@ -186,7 +186,7 @@ bool MemRecursorCache::attemptToRefreshN
- void MemRecursorCache::replace(time_t now, const string &qname, const QType& qt, const set<DNSResourceRecord>& content, bool auth)
- {
- d_cachecachevalid=false;
-- tuple<string, uint16_t> key=make_tuple(qname, qt.getCode());
-+ boost::tuple<string, uint16_t> key=boost::make_tuple(qname, qt.getCode());
- cache_t::iterator stored=d_cache.find(key);
-
- bool isNew=false;
diff --git a/net/powerdns-recursor/patches/patch-recursor__cache.hh b/net/powerdns-recursor/patches/patch-recursor__cache.hh
deleted file mode 100644
index b704abcaa8f..00000000000
--- a/net/powerdns-recursor/patches/patch-recursor__cache.hh
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-recursor__cache.hh,v 1.1 2013/06/10 18:59:09 joerg Exp $
-
---- recursor_cache.hh.orig 2013-05-10 14:51:37.000000000 +0000
-+++ recursor_cache.hh
-@@ -64,7 +64,7 @@ private:
-
- struct CacheEntry
- {
-- CacheEntry(const tuple<string, uint16_t>& key, const vector<StoredRecord>& records, bool auth) :
-+ CacheEntry(const boost::tuple<string, uint16_t>& key, const vector<StoredRecord>& records, bool auth) :
- d_qname(key.get<0>()), d_qtype(key.get<1>()), d_auth(auth), d_records(records)
- {}
-
diff --git a/net/powerdns-recursor/patches/patch-reczones.cc b/net/powerdns-recursor/patches/patch-reczones.cc
index 3b55d90e9f1..e40cf383483 100644
--- a/net/powerdns-recursor/patches/patch-reczones.cc
+++ b/net/powerdns-recursor/patches/patch-reczones.cc
@@ -1,9 +1,11 @@
-$NetBSD: patch-reczones.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
+$NetBSD: patch-reczones.cc,v 1.2 2015/06/10 14:22:29 fhajny Exp $
---- reczones.cc.orig 2010-09-21 16:22:09.000000000 +0000
+Straighten Boost namespace.
+
+--- reczones.cc.orig 2015-04-21 13:02:57.000000000 +0000
+++ reczones.cc
-@@ -343,7 +343,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
- throw AhuException("Error opening forward-zones-file '"+::arg()["forward-zones-file"]+"': "+stringerror());
+@@ -378,7 +378,7 @@ SyncRes::domainmap_t* parseAuthAndForwar
+ throw PDNSException("Error opening forward-zones-file '"+::arg()["forward-zones-file"]+"': "+stringerror());
}
- shared_ptr<FILE> fp=shared_ptr<FILE>(rfp, fclose);
diff --git a/net/powerdns-recursor/patches/patch-syncres.cc b/net/powerdns-recursor/patches/patch-syncres.cc
deleted file mode 100644
index cc9695a010c..00000000000
--- a/net/powerdns-recursor/patches/patch-syncres.cc
+++ /dev/null
@@ -1,70 +0,0 @@
-$NetBSD: patch-syncres.cc,v 1.1 2013/06/26 15:52:22 joerg Exp $
-
---- syncres.cc.orig 2010-09-21 16:22:09.000000000 +0000
-+++ syncres.cc
-@@ -162,7 +162,7 @@ bool SyncRes::doOOBResolve(const string
- }
- if(somedata) {
- LOG<<prefix<<qname<<": found record in '"<<authdomain<<"', but nothing of the right type, sending SOA"<<endl;
-- ziter=iter->second.d_records.find(make_tuple(authdomain, QType(QType::SOA)));
-+ ziter=iter->second.d_records.find(boost::make_tuple(authdomain, QType(QType::SOA)));
- if(ziter!=iter->second.d_records.end()) {
- DNSResourceRecord rr=*ziter;
- rr.d_place=DNSResourceRecord::AUTHORITY;
-@@ -177,7 +177,7 @@ bool SyncRes::doOOBResolve(const string
- string nsdomain(qname);
-
- while(chopOffDotted(nsdomain) && !pdns_iequals(nsdomain, iter->first)) {
-- range=iter->second.d_records.equal_range(make_tuple(nsdomain,QType(QType::NS)));
-+ range=iter->second.d_records.equal_range(boost::make_tuple(nsdomain,QType(QType::NS)));
- if(range.first==range.second)
- continue;
-
-@@ -189,7 +189,7 @@ bool SyncRes::doOOBResolve(const string
- }
- if(ret.empty()) {
- LOG<<prefix<<qname<<": no NS match in zone '"<<authdomain<<"' either, handing out SOA"<<endl;
-- ziter=iter->second.d_records.find(make_tuple(authdomain, QType(QType::SOA)));
-+ ziter=iter->second.d_records.find(boost::make_tuple(authdomain, QType(QType::SOA)));
- if(ziter!=iter->second.d_records.end()) {
- DNSResourceRecord rr=*ziter;
- rr.d_place=DNSResourceRecord::AUTHORITY;
-@@ -862,7 +862,7 @@ int SyncRes::doResolveAt(set<string, CIS
- LOG<<prefix<<qname<<": Trying IP "<< remoteIP->toStringWithPort() <<", asking '"<<qname<<"|"<<qtype.getName()<<"'"<<endl;
- extern NetmaskGroup* g_dontQuery;
-
-- if(t_sstorage->throttle.shouldThrottle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()))) {
-+ if(t_sstorage->throttle.shouldThrottle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()))) {
- LOG<<prefix<<qname<<": query throttled "<<endl;
- s_throttledqueries++; d_throttledqueries++;
- continue;
-@@ -904,9 +904,9 @@ int SyncRes::doResolveAt(set<string, CIS
- t_sstorage->nsSpeeds[*tns].submit(*remoteIP, 1000000, &d_now); // 1 sec
- }
- if(resolveret==-1)
-- t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable
-+ t_sstorage->throttle.throttle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100); // unreachable
- else
-- t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 20, 5); // timeout
-+ t_sstorage->throttle.throttle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()), 20, 5); // timeout
- }
- continue;
- }
-@@ -914,7 +914,7 @@ int SyncRes::doResolveAt(set<string, CIS
- break; // this IP address worked!
- wasLame:; // well, it didn't
- LOG<<prefix<<qname<<": status=NS "<<*tns<<" ("<< remoteIP->toString() <<") is lame for '"<<auth<<"', trying sibling IP or NS"<<endl;
-- t_sstorage->throttle.throttle(d_now.tv_sec, make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100);
-+ t_sstorage->throttle.throttle(d_now.tv_sec, boost::make_tuple(*remoteIP, qname, qtype.getCode()), 60, 100);
- }
- }
-
-@@ -933,7 +933,7 @@ int SyncRes::doResolveAt(set<string, CIS
-
- if(lwr.d_rcode==RCode::ServFail) {
- LOG<<prefix<<qname<<": "<<*tns<<" returned a ServFail, trying sibling IP or NS"<<endl;
-- t_sstorage->throttle.throttle(d_now.tv_sec,make_tuple(*remoteIP, qname, qtype.getCode()),60,3);
-+ t_sstorage->throttle.throttle(d_now.tv_sec,boost::make_tuple(*remoteIP, qname, qtype.getCode()),60,3);
- continue;
- }
- LOG<<prefix<<qname<<": Got "<<(unsigned int)lwr.d_result.size()<<" answers from "<<*tns<<" ("<< remoteIP->toString() <<"), rcode="<<lwr.d_rcode<<", in "<<lwr.d_usec/1000<<"ms"<<endl;
diff --git a/net/powerdns-recursor/patches/patch-syncres.hh b/net/powerdns-recursor/patches/patch-syncres.hh
deleted file mode 100644
index fd2d6f0df51..00000000000
--- a/net/powerdns-recursor/patches/patch-syncres.hh
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-syncres.hh,v 1.1 2013/06/10 18:59:09 joerg Exp $
-
---- syncres.hh.orig 2013-05-10 14:51:02.000000000 +0000
-+++ syncres.hh
-@@ -321,7 +321,7 @@ public:
- typedef map<string, AuthDomain, CIStringCompare> domainmap_t;
-
-
-- typedef Throttle<tuple<ComboAddress,string,uint16_t> > throttle_t;
-+ typedef Throttle<boost::tuple<ComboAddress,string,uint16_t> > throttle_t;
-
- struct timeval d_now;
- static unsigned int s_maxnegttl;
diff --git a/net/powerdns-recursor/patches/patch-sysdeps_SunOS.inc b/net/powerdns-recursor/patches/patch-sysdeps_SunOS.inc
new file mode 100644
index 00000000000..a3b1965a0f6
--- /dev/null
+++ b/net/powerdns-recursor/patches/patch-sysdeps_SunOS.inc
@@ -0,0 +1,14 @@
+$NetBSD: patch-sysdeps_SunOS.inc,v 1.1 2015/06/10 14:22:29 fhajny Exp $
+
+Do not bother with init.d scripts on SunOS.
+
+--- sysdeps/SunOS.inc.orig 2015-04-21 13:02:57.000000000 +0000
++++ sysdeps/SunOS.inc
+@@ -3,7 +3,6 @@ ifeq ($(CC),cc)
+ endif
+
+ LDFLAGS+=-lresolv -lsocket -lnsl -ldl
+-OS_SPECIFIC_INSTALL=mkdir -p $(DESTDIR)/etc/init.d ; cp pdns-recursor.init.d $(DESTDIR)/etc/init.d/pdns-recursor
+
+ LUA_LIBS_CONFIG ?= -llua
+