--- /dev/null
+See /usr/share/doc/quilt/README.source
--- /dev/null
+Source: pdns-recursor
+Section: net
+Priority: extra
+Standards-Version: 4.1.2
+Maintainer: PowerDNS.COM BV <powerdns.support@powerdns.com>
+Build-Depends: debhelper (>= 9~),
+ dh-autoreconf,
+ dh-systemd,
+ libboost-all-dev,
+ libluajit-5.1-dev,
+ libprotobuf-dev,
+ libsnmp-dev,
+ libsodium-dev,
+ libssl-dev,
+ libsystemd-dev [linux-any],
+ pkg-config,
+ protobuf-compiler,
+ ragel
+Homepage: https://www.powerdns.com/
+
+Package: pdns-recursor
+Architecture: any
+Depends: adduser,
+ dns-root-data,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Description: PowerDNS Recursor
+ High-performance resolving name server, utilizing multiple
+ processor and including Lua scripting capabilities.
+
+Package: pdns-recursor-dbg
+Section: debug
+Architecture: any
+Depends: pdns-recursor (= ${binary:Version}), ${misc:Depends}
+Description: debugging symbols for PowerDNS recursor
+ PowerDNS is a versatile nameserver which supports a large number
+ of different backends ranging from simple zonefiles to relational
+ databases and load balancing/failover algorithms.
+ PowerDNS tries to emphasize speed and security.
+ .
+ This package contains debugging symbols for PowerDNS to assist in
+ debugging, such as with gdb. It is not required for normal operation.
--- /dev/null
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: PowerDNS
+Source: https://www.powerdns.com/downloads.html
+
+Files: *
+Copyright: 2002 - 2015 PowerDNS.COM BV and contributors
+License: GPL-2 with OpenSSL Exception
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ as published by the Free Software Foundation
+ .
+ In addition, for the avoidance of any doubt, permission is granted to
+ link this program with OpenSSL and to (re)distribute the binaries
+ produced as the result of such linking.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2002 - 2004 Wichert Akkermann <wichert@wiggy.net>
+ 2004 - 2013 Matthijs Möhlmann <matthijs@cacholong.nl>
+ 2012 - 2013 Marc Haber <mh+debian-packages@zugschlus.de>
+ 2014 - 2016 Christian Hofstaedtler <zeha@debian.org>
+ 2016 PowerDNS.COM BV and contributors
+License: GPL-2
+
+Files: ext/yahttp/*
+Copyright: 2014 Aki Tuomi
+License: Expat
+
+Files: ext/json11/*
+Copyright: 2013 Dropbox, Inc.
+License: Expat
+
+Files: ext/luawrapper/*
+Copyright: 2013, Pierre KRIEGER
+License: BSD-3
+
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: GPL-2
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
--- /dev/null
+[DEFAULT]
+pristine-tar = True
+multimaint-merge = True
+patch-numbers = False
--- /dev/null
+# Variables for PowerDNS recursor init script.
+# Not honored when systemd is the running init.
+#
+# Set START to yes to start the pdns-recursor
+START=yes
+# Run resolvconf? (Deprecated feature.)
+RESOLVCONF=no
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: pdns-recursor
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: PowerDNS Recursor - Recursive DNS Server
+# Description: PowerDNS Recursor - Recursive DNS Server
+### END INIT INFO
+
+#
+# Authors: Matthijs Möhlmann <matthijs@cacholong.nl>
+# Christoph Haas <haas@debian.org>
+#
+# Thanks to:
+# Thomas Hood <jdthood@aglu.demon.nl>
+#
+# initscript for PowerDNS recursor
+
+# Load lsb stuff for systemd redirection (if available).
+if [ -e /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+fi
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="PowerDNS Recursor"
+NAME=pdns_recursor
+DAEMON=/usr/sbin/$NAME
+# Derive the socket-dir setting from /etc/powerdns/recursor.conf
+# or fall back to the default /var/run if not specified there.
+PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/powerdns/recursor.conf)
+if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
+PIDFILE=$PIDDIR/$NAME.pid
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+# Read config file if it is present.
+if [ -r /etc/default/pdns-recursor ]; then
+ . /etc/default/pdns-recursor
+fi
+
+start() {
+# Return
+# 0 if daemon has been started / was already running
+# >0 if daemon could not be started
+ start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 0
+ start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON -- --daemon=yes || return 2
+}
+
+start_resolvconf() {
+ if [ "X$RESOLVCONF" = "Xyes" ] && [ -x /sbin/resolvconf ]; then
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.pdns-recursor
+ fi
+ return 0
+}
+
+stop() {
+# Return
+# 0 if daemon has been stopped
+# 1 if daemon was already stopped
+# 2 if daemon could not be stopped
+# other if a failure occured
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+stop_resolvconf() {
+ if [ "X$RESOLVCONF" = "Xyes" ] && [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -d lo.pdns-recursor
+ fi
+ return 0
+}
+
+isrunning()
+{
+ /usr/bin/rec_control ping > /dev/null
+ return $?
+}
+
+case "$1" in
+ start)
+ if [ "$START" != "yes" ]; then
+ echo "Not starting $DESC -- disabled."
+ exit 0
+ fi
+ echo -n "Starting $DESC: $NAME ..."
+ start
+ case "$?" in
+ 0)
+ start_resolvconf
+ echo done
+ break
+ ;;
+ 1)
+ echo "already running"
+ break
+ ;;
+ *)
+ echo "failed"
+ exit 1
+ ;;
+ esac
+ ;;
+ stop)
+ stop_resolvconf
+ echo -n "Stopping $DESC: $NAME ..."
+ stop
+ case "$?" in
+ 0)
+ echo done
+ break
+ ;;
+ 1)
+ echo "not running"
+ break
+ ;;
+ *)
+ echo "failed"
+ exit 1
+ ;;
+ esac
+ ;;
+ restart|force-reload)
+ if [ "$START" != "yes" ]; then
+ $0 stop
+ exit 0
+ fi
+ echo -n "Restarting $DESC ..."
+ stop
+ case "$?" in
+ 0|1)
+ start
+ case "$?" in
+ 0)
+ echo done
+ exit 0
+ ;;
+ 1)
+ echo "failed -- old process still running"
+ exit 1
+ ;;
+ *)
+ echo "failed to start"
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "failed to stop"
+ exit 1
+ ;;
+ esac
+ ;;
+ status)
+ if isrunning; then
+ echo "$NAME is running"
+ exit 0
+ else
+ echo "$NAME is not running or not responding"
+ exit 3
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
+ exit 3
+ ;;
+esac
+
+exit 0
+
--- /dev/null
+usr/sbin/pdns_recursor
+usr/bin/rec_control
+etc/powerdns
--- /dev/null
+# Source carries OpenSSL Exception
+pdns-recursor: possible-gpl-code-linked-with-openssl
+# We load lsb-functions conditionally.
+pdns-recursor: init.d-script-needs-depends-on-lsb-base
--- /dev/null
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ pdns_recursor\[[0-9]+\]: stats: .*
--- /dev/null
+pdns_recursor.1
+rec_control.1
--- /dev/null
+#!/bin/sh
+set -e
+
+case "$1" in
+ configure)
+ addgroup --system pdns
+ adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# Startup errors should never cause dpkg to fail.
+initscript_error() {
+ return 0
+}
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh
+set -e
+
+# Startup errors should never cause dpkg to fail.
+initscript_error() {
+ return 0
+}
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/usr/bin/make -f
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+# Enable hardening features for daemons
+# Note: blhc (build log hardening check) will find these false positivies: CPPFLAGS 2 missing, LDFLAGS 1 missing
+export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
+DPKG_EXPORT_BUILDFLAGS = 1
+# Include buildflags.mk so we can append to the vars it sets.
+include /usr/share/dpkg/buildflags.mk
+
+# Disable systemd integration on non-linux archs
+ifeq ($(DEB_HOST_ARCH_OS),linux)
+CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+DH_ARGS += --with systemd
+else
+CONFIGURE_ARGS += --disable-systemd
+endif
+
+
+# Use new build system
+%:
+ dh $@ \
+ --with autoreconf \
+ $(DH_ARGS)
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ --sysconfdir=/etc/powerdns \
+ --enable-unit-tests \
+ --with-luajit \
+ --enable-libsodium \
+ --with-protobuf=yes \
+ --with-net-snmp \
+ --disable-silent-rules \
+ $(CONFIGURE_ARGS)
+
+override_dh_auto_install:
+ dh_auto_install -- STRIP_BINARIES=0
+ rm -f debian/tmp/etc/powerdns/recursor.conf-dist
+ ./pdns_recursor --no-config --config | sed \
+ -e 's!# config-dir=.*!config-dir=/etc/powerdns!' \
+ -e 's!# local-address=.*!local-address=127.0.0.1!' \
+ -e 's!# quiet=.*!quiet=yes!' \
+ -e 's!# setgid=.*!setgid=pdns!' \
+ -e 's!# setuid=.*!setuid=pdns!' \
+ -e 's!# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \
+ -e 's!# security-poll-suffix=.*!&\nsecurity-poll-suffix=!' \
+ > debian/tmp/etc/powerdns/recursor.conf
+
+override_dh_strip:
+ dh_strip --dbg-package=pdns-recursor-dbg
+
+override_dh_installinit:
+ dh_installinit --error-handler=initscript_error
+
+override_dh_gencontrol:
+ dh_gencontrol -- $(SUBSTVARS)
--- /dev/null
+# Source is in html/js/d3.js
+pdns-recursor source: source-is-missing html/js/d3.v3.js line length is 32005 characters (>512)
--- /dev/null
+3.0 (quilt)
--- /dev/null
+Tests: smoke
+Depends: @, dnsutils
+Restrictions: needs-root
--- /dev/null
+#!/bin/bash
+exec 2>&1
+set -ex
+
+cat <<EOF >>/etc/powerdns/recursor.conf
+auth-zones=example.org=/etc/powerdns/example.org.zone
+EOF
+
+cat <<EOF >/etc/powerdns/example.org.zone
+example.org. 172800 IN SOA ns1.example.org. dns.example.org. 1 10800 3600 604800 3600
+example.org. 172800 IN NS ns1.example.org.
+smoke.example.org. 172800 IN A 127.0.0.123
+EOF
+
+service pdns-recursor restart
+
+TMPFILE=$(mktemp)
+cleanup() {
+ rm -f "$TMPFILE"
+}
+trap cleanup EXIT
+
+dig @127.0.0.1 smoke.example.org 2>&1 | tee "$TMPFILE"
+
+if grep -c '127\.0\.0\.123' "$TMPFILE"; then
+ echo success
+else
+ echo smoke could not be resolved
+ exit 1
+fi
+
--- /dev/null
+# Site Directory Pattern Version Script
+version=3
+opts="pgpsigurlmangle=s/$/.asc/,versionmangle=s/-(alpha|beta|rc)/~$1/" https://downloads.powerdns.com/releases/ pdns-recursor-(.*)\.tar\.bz2 debian uupdate
Section: net
Priority: extra
Standards-Version: 4.1.2
-Maintainer: Debian DNS Packaging <pkg-dns-devel@lists.alioth.debian.org>
-Uploaders: Chris Hofstaedtler <zeha@debian.org>,
- Marc Haber <mh+debian-packages@zugschlus.de>
+Maintainer: PowerDNS.COM BV <powerdns.support@powerdns.com>
Build-Depends: debhelper (>= 10~),
+ dh-autoreconf,
+ dh-systemd [linux-any],
libboost-all-dev,
libluajit-5.1-dev,
libprotobuf-dev,
# Disable systemd integration on non-linux archs
ifeq ($(DEB_HOST_ARCH_OS),linux)
CONFIGURE_ARGS += --enable-systemd --with-systemd=/lib/systemd/system
+DH_ARGS += --with systemd
else
CONFIGURE_ARGS += --disable-systemd
endif
# Use new build system
%:
- dh $@
+ dh $@ \
+ --with autoreconf \
+ $(DH_ARGS)
override_dh_auto_configure:
dh_auto_configure -- \
--enable-libsodium \
--with-protobuf=yes \
--without-net-snmp \
+ --disable-silent-rules \
$(CONFIGURE_ARGS)
override_dh_auto_install:
--- /dev/null
+See /usr/share/doc/quilt/README.source
--- /dev/null
+Source: pdns-recursor
+Section: net
+Priority: extra
+Standards-Version: 4.1.2
+Maintainer: PowerDNS.COM BV <powerdns.support@powerdns.com>
+Build-Depends: debhelper (>= 9~),
+ dh-autoreconf,
+ libboost-all-dev,
+ libluajit-5.1-dev,
+ libprotobuf-dev,
+ libsnmp-dev,
+ libssl-dev,
+ pkg-config,
+ protobuf-compiler,
+ ragel
+Homepage: https://www.powerdns.com/
+
+Package: pdns-recursor
+Architecture: any
+Depends: adduser,
+ dns-root-data,
+ ${misc:Depends},
+ ${shlibs:Depends}
+Description: PowerDNS Recursor
+ High-performance resolving name server, utilizing multiple
+ processor and including Lua scripting capabilities.
+
+Package: pdns-recursor-dbg
+Section: debug
+Architecture: any
+Depends: pdns-recursor (= ${binary:Version}), ${misc:Depends}
+Description: debugging symbols for PowerDNS recursor
+ PowerDNS is a versatile nameserver which supports a large number
+ of different backends ranging from simple zonefiles to relational
+ databases and load balancing/failover algorithms.
+ PowerDNS tries to emphasize speed and security.
+ .
+ This package contains debugging symbols for PowerDNS to assist in
+ debugging, such as with gdb. It is not required for normal operation.
--- /dev/null
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: PowerDNS
+Source: https://www.powerdns.com/downloads.html
+
+Files: *
+Copyright: 2002 - 2015 PowerDNS.COM BV and contributors
+License: GPL-2 with OpenSSL Exception
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License version 2
+ as published by the Free Software Foundation
+ .
+ In addition, for the avoidance of any doubt, permission is granted to
+ link this program with OpenSSL and to (re)distribute the binaries
+ produced as the result of such linking.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
+
+Files: debian/*
+Copyright: 2002 - 2004 Wichert Akkermann <wichert@wiggy.net>
+ 2004 - 2013 Matthijs Möhlmann <matthijs@cacholong.nl>
+ 2012 - 2013 Marc Haber <mh+debian-packages@zugschlus.de>
+ 2014 - 2016 Christian Hofstaedtler <zeha@debian.org>
+ 2016 PowerDNS.COM BV and contributors
+License: GPL-2
+
+Files: ext/yahttp/*
+Copyright: 2014 Aki Tuomi
+License: Expat
+
+Files: ext/json11/*
+Copyright: 2013 Dropbox, Inc.
+License: Expat
+
+Files: ext/luawrapper/*
+Copyright: 2013, Pierre KRIEGER
+License: BSD-3
+
+License: BSD-3
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions are met:
+ * Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ * Neither the name of the <organization> nor the
+ names of its contributors may be used to endorse or promote products
+ derived from this software without specific prior written permission.
+ .
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
+ DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+License: Expat
+ Permission is hereby granted, free of charge, to any person obtaining a copy
+ of this software and associated documentation files (the "Software"), to deal
+ in the Software without restriction, including without limitation the rights
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ copies of the Software, and to permit persons to whom the Software is
+ furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included in
+ all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ THE SOFTWARE.
+
+License: GPL-2
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 2 can be found in the file
+ `/usr/share/common-licenses/GPL-2'.
--- /dev/null
+[DEFAULT]
+pristine-tar = True
+multimaint-merge = True
+patch-numbers = False
--- /dev/null
+# Variables for PowerDNS recursor init script.
+# Not honored when systemd is the running init.
+#
+# Set START to yes to start the pdns-recursor
+START=yes
+# Run resolvconf? (Deprecated feature.)
+RESOLVCONF=no
--- /dev/null
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: pdns-recursor
+# Required-Start: $network $remote_fs $syslog
+# Required-Stop: $network $remote_fs $syslog
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: PowerDNS Recursor - Recursive DNS Server
+# Description: PowerDNS Recursor - Recursive DNS Server
+### END INIT INFO
+
+#
+# Authors: Matthijs Möhlmann <matthijs@cacholong.nl>
+# Christoph Haas <haas@debian.org>
+#
+# Thanks to:
+# Thomas Hood <jdthood@aglu.demon.nl>
+#
+# initscript for PowerDNS recursor
+
+# Load lsb stuff for systemd redirection (if available).
+if [ -e /lib/lsb/init-functions ]; then
+ . /lib/lsb/init-functions
+fi
+
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+DESC="PowerDNS Recursor"
+NAME=pdns_recursor
+DAEMON=/usr/sbin/$NAME
+# Derive the socket-dir setting from /etc/powerdns/recursor.conf
+# or fall back to the default /var/run if not specified there.
+PIDDIR=$(awk -F= '/^socket-dir=/ {print $2}' /etc/powerdns/recursor.conf)
+if [ -z "$PIDDIR" ]; then PIDDIR=/var/run; fi
+PIDFILE=$PIDDIR/$NAME.pid
+
+# Gracefully exit if the package has been removed.
+test -x $DAEMON || exit 0
+
+# Read config file if it is present.
+if [ -r /etc/default/pdns-recursor ]; then
+ . /etc/default/pdns-recursor
+fi
+
+start() {
+# Return
+# 0 if daemon has been started / was already running
+# >0 if daemon could not be started
+ start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON --test > /dev/null || return 0
+ start-stop-daemon --start --oknodo --quiet --pidfile $PIDFILE --exec $DAEMON -- --daemon=yes || return 2
+}
+
+start_resolvconf() {
+ if [ "X$RESOLVCONF" = "Xyes" ] && [ -x /sbin/resolvconf ]; then
+ echo "nameserver 127.0.0.1" | /sbin/resolvconf -a lo.pdns-recursor
+ fi
+ return 0
+}
+
+stop() {
+# Return
+# 0 if daemon has been stopped
+# 1 if daemon was already stopped
+# 2 if daemon could not be stopped
+# other if a failure occured
+ start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME
+ RETVAL="$?"
+ [ "$RETVAL" = 2 ] && return 2
+ rm -f $PIDFILE
+ return "$RETVAL"
+}
+
+stop_resolvconf() {
+ if [ "X$RESOLVCONF" = "Xyes" ] && [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -d lo.pdns-recursor
+ fi
+ return 0
+}
+
+isrunning()
+{
+ /usr/bin/rec_control ping > /dev/null
+ return $?
+}
+
+case "$1" in
+ start)
+ if [ "$START" != "yes" ]; then
+ echo "Not starting $DESC -- disabled."
+ exit 0
+ fi
+ echo -n "Starting $DESC: $NAME ..."
+ start
+ case "$?" in
+ 0)
+ start_resolvconf
+ echo done
+ break
+ ;;
+ 1)
+ echo "already running"
+ break
+ ;;
+ *)
+ echo "failed"
+ exit 1
+ ;;
+ esac
+ ;;
+ stop)
+ stop_resolvconf
+ echo -n "Stopping $DESC: $NAME ..."
+ stop
+ case "$?" in
+ 0)
+ echo done
+ break
+ ;;
+ 1)
+ echo "not running"
+ break
+ ;;
+ *)
+ echo "failed"
+ exit 1
+ ;;
+ esac
+ ;;
+ restart|force-reload)
+ if [ "$START" != "yes" ]; then
+ $0 stop
+ exit 0
+ fi
+ echo -n "Restarting $DESC ..."
+ stop
+ case "$?" in
+ 0|1)
+ start
+ case "$?" in
+ 0)
+ echo done
+ exit 0
+ ;;
+ 1)
+ echo "failed -- old process still running"
+ exit 1
+ ;;
+ *)
+ echo "failed to start"
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ echo "failed to stop"
+ exit 1
+ ;;
+ esac
+ ;;
+ status)
+ if isrunning; then
+ echo "$NAME is running"
+ exit 0
+ else
+ echo "$NAME is not running or not responding"
+ exit 3
+ fi
+ ;;
+ *)
+ echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
+ exit 3
+ ;;
+esac
+
+exit 0
+
--- /dev/null
+usr/sbin/pdns_recursor
+usr/bin/rec_control
+etc/powerdns
--- /dev/null
+# Source carries OpenSSL Exception
+pdns-recursor: possible-gpl-code-linked-with-openssl
+# We load lsb-functions conditionally.
+pdns-recursor: init.d-script-needs-depends-on-lsb-base
--- /dev/null
+^\w{3} [ :0-9]{11} [._[:alnum:]-]+ pdns_recursor\[[0-9]+\]: stats: .*
--- /dev/null
+pdns_recursor.1
+rec_control.1
--- /dev/null
+#!/bin/sh
+set -e
+
+case "$1" in
+ configure)
+ addgroup --system pdns
+ adduser --system --home /var/spool/powerdns --shell /bin/false --ingroup pdns --disabled-password --disabled-login --gecos "PowerDNS" pdns
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
+esac
+
+# Startup errors should never cause dpkg to fail.
+initscript_error() {
+ return 0
+}
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/bin/sh
+set -e
+
+# Startup errors should never cause dpkg to fail.
+initscript_error() {
+ return 0
+}
+
+#DEBHELPER#
+
+exit 0
--- /dev/null
+#!/usr/bin/make -f
+DEB_HOST_ARCH_OS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_OS)
+
+# Enable hardening features for daemons
+# Note: blhc (build log hardening check) will find these false positivies: CPPFLAGS 2 missing, LDFLAGS 1 missing
+export DEB_BUILD_MAINT_OPTIONS=hardening=+bindnow,+pie
+DPKG_EXPORT_BUILDFLAGS = 1
+# Include buildflags.mk so we can append to the vars it sets.
+include /usr/share/dpkg/buildflags.mk
+
+# Use new build system
+%:
+ dh $@ \
+ --with autoreconf \
+ --parallel
+
+override_dh_auto_configure:
+ dh_auto_configure -- \
+ --sysconfdir=/etc/powerdns \
+ --enable-unit-tests \
+ --with-luajit \
+ --with-protobuf=yes \
+ --with-net-snmp \
+ --disable-silent-rules \
+ --disable-systemd
+
+override_dh_auto_install:
+ dh_auto_install -- STRIP_BINARIES=0
+ rm -f debian/tmp/etc/powerdns/recursor.conf-dist
+ ./pdns_recursor --no-config --config | sed \
+ -e 's!# config-dir=.*!config-dir=/etc/powerdns!' \
+ -e 's!# local-address=.*!local-address=127.0.0.1!' \
+ -e 's!# quiet=.*!quiet=yes!' \
+ -e 's!# setgid=.*!setgid=pdns!' \
+ -e 's!# setuid=.*!setuid=pdns!' \
+ -e 's!# hint-file=.*!&\nhint-file=/usr/share/dns/root.hints!' \
+ -e 's!# security-poll-suffix=.*!&\nsecurity-poll-suffix=!' \
+ > debian/tmp/etc/powerdns/recursor.conf
+
+override_dh_strip:
+ dh_strip --dbg-package=pdns-recursor-dbg
+
+override_dh_installinit:
+ dh_installinit --error-handler=initscript_error
+
+override_dh_gencontrol:
+ dh_gencontrol -- $(SUBSTVARS)
--- /dev/null
+# Source is in html/js/d3.js
+pdns-recursor source: source-is-missing html/js/d3.v3.js line length is 32005 characters (>512)
--- /dev/null
+3.0 (quilt)
--- /dev/null
+Tests: smoke
+Depends: @, dnsutils
+Restrictions: needs-root
--- /dev/null
+#!/bin/bash
+exec 2>&1
+set -ex
+
+cat <<EOF >>/etc/powerdns/recursor.conf
+auth-zones=example.org=/etc/powerdns/example.org.zone
+EOF
+
+cat <<EOF >/etc/powerdns/example.org.zone
+example.org. 172800 IN SOA ns1.example.org. dns.example.org. 1 10800 3600 604800 3600
+example.org. 172800 IN NS ns1.example.org.
+smoke.example.org. 172800 IN A 127.0.0.123
+EOF
+
+service pdns-recursor restart
+
+TMPFILE=$(mktemp)
+cleanup() {
+ rm -f "$TMPFILE"
+}
+trap cleanup EXIT
+
+dig @127.0.0.1 smoke.example.org 2>&1 | tee "$TMPFILE"
+
+if grep -c '127\.0\.0\.123' "$TMPFILE"; then
+ echo success
+else
+ echo smoke could not be resolved
+ exit 1
+fi
+
--- /dev/null
+# Site Directory Pattern Version Script
+version=3
+opts="pgpsigurlmangle=s/$/.asc/,versionmangle=s/-(alpha|beta|rc)/~$1/" https://downloads.powerdns.com/releases/ pdns-recursor-(.*)\.tar\.bz2 debian uupdate
ADD builder-support/debian/authoritative/debian-jessie/ pdns-${BUILDER_VERSION}/debian/
@ENDIF
+@IF [ ! -z "$M_recursor" ]
+ADD builder-support/debian/recursor/debian-jessie/ pdns-recursor-${BUILDER_VERSION}/debian/
+@ENDIF
+
@IF [ ! -z "$M_dnsdist" ]
ADD builder-support/debian/dnsdist/debian-jessie/ dnsdist-${BUILDER_VERSION}/debian/
@ENDIF
ADD builder-support/debian/authoritative/ubuntu-trusty/ pdns-${BUILDER_VERSION}/debian/
@ENDIF
+@IF [ ! -z "$M_recursor" ]
+ADD builder-support/debian/recursor/ubuntu-trusty/ pdns-recursor-${BUILDER_VERSION}/debian/
+@ENDIF
+
@IF [ ! -z "$M_dnsdist" ]
ADD builder-support/debian/dnsdist/ubuntu-trusty/ dnsdist-${BUILDER_VERSION}/debian/
@ENDIF
ADD builder-support/debian/authoritative/debian-jessie/ pdns-${BUILDER_VERSION}/debian/
@ENDIF
+@IF [ ! -z "$M_recursor" ]
+ADD builder-support/debian/recursor/debian-jessie/ pdns-recursor-${BUILDER_VERSION}/debian/
+@ENDIF
+
@IF [ ! -z "$M_dnsdist" ]
ADD builder-support/debian/dnsdist/debian-jessie/ dnsdist-${BUILDER_VERSION}/debian/
@ENDIF