summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Smith <mcs@darkregion.net>2011-04-05 07:03:25 -0500
committerMatt Smith <mcs@darkregion.net>2011-04-05 07:06:35 -0500
commit2bf9528b2e0f8350fbd20976efdce0bafb3e4b33 (patch)
treebb4e916718d167a53465c0d7d2ab1d6b23ab644a
parentdcd1f5b67f797d77535a5c9ab53bad11819da64a (diff)
downloadaports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.bz2
aports-2bf9528b2e0f8350fbd20976efdce0bafb3e4b33.tar.xz
testing/pdns: new aport
PowerDNS Authoritative Server http://www.powerdns.com/
-rw-r--r--testing/pdns/0010-disable-execinfo.patch25
-rw-r--r--testing/pdns/APKBUILD113
-rw-r--r--testing/pdns/pdns.conf337
-rw-r--r--testing/pdns/pdns.initd64
-rw-r--r--testing/pdns/pdns.post-deinstall4
-rw-r--r--testing/pdns/pdns.pre-install4
6 files changed, 547 insertions, 0 deletions
diff --git a/testing/pdns/0010-disable-execinfo.patch b/testing/pdns/0010-disable-execinfo.patch
new file mode 100644
index 000000000..23747b31b
--- /dev/null
+++ b/testing/pdns/0010-disable-execinfo.patch
@@ -0,0 +1,25 @@
+--- ./pdns/receiver.cc.orig
++++ ./pdns/receiver.cc
+@@ -375,10 +375,11 @@
+
+
+ #ifdef __linux__
+-#include <execinfo.h>
++//#include <execinfo.h>
+ static void tbhandler(int num)
+ {
+- L<<Logger::Critical<<"Got a signal "<<num<<", attempting to print trace: "<<endl;
++ L<<Logger::Critical<<"Got a signal "<<num<<" (trace printing hard-disabled)"<<endl;
++/*
+ void *array[20]; //only care about last 17 functions (3 taken with tracing support)
+ size_t size;
+ char **strings;
+@@ -389,7 +390,7 @@
+
+ for (i = 0; i < size; i++) //skip useless functions
+ L<<Logger::Error<<strings[i]<<endl;
+-
++*/
+
+ signal(SIGABRT, SIG_DFL);
+ abort();//hopefully will give core
diff --git a/testing/pdns/APKBUILD b/testing/pdns/APKBUILD
new file mode 100644
index 000000000..de457143f
--- /dev/null
+++ b/testing/pdns/APKBUILD
@@ -0,0 +1,113 @@
+# Contributor: Matt Smith <mcs@darkregion.net>
+# Maintainer: Matt Smith <mcs@darkregion.net>
+pkgname=pdns
+pkgver=3.0
+_extver=rc1
+_realver=$pkgver-$_extver
+pkgrel=0
+pkgdesc="PowerDNS Authoritative Server"
+url="http://www.powerdns.com/"
+arch="all"
+license="GPL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev boost-dev lua-dev openldap-dev mysql-dev
+ postgresql-dev sqlite-dev"
+install="$pkgname.pre-install $pkgname.post-deinstall"
+subpackages="$pkgname-doc
+ $pkgname-backend-geo:backend_geo
+ $pkgname-backend-ldap:backend_ldap
+ $pkgname-backend-mysql:backend_mysql
+ $pkgname-backend-pgsql:backend_pgsql
+ $pkgname-backend-pipe:backend_pipe
+ $pkgname-backend-sqlite3:backend_sqlite3
+ "
+pkgusers="pdns"
+pkggroups="pdns"
+source="http://powerdnssec.org/downloads/$pkgname-$_realver.tar.gz
+ 0010-disable-execinfo.patch
+ pdns.initd
+ pdns.conf
+ "
+
+_builddir="$srcdir/$pkgname-$_realver"
+
+prepare() {
+ local i
+ cd "$_builddir"
+ for i in $source; do
+ case $i in
+ *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+ esac
+ done
+}
+
+build() {
+ cd "$_builddir"
+ ./configure --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --localstatedir=/var \
+ --libdir=/usr/lib/pdns \
+ --with-modules="" \
+ --with-dynmodules="geo ldap gmysql gpgsql pipe gsqlite3" \
+ --disable-recursor \
+ --disable-static \
+ || return 1
+ make || return 1
+}
+
+package() {
+ cd "$_builddir"
+ make DESTDIR="$pkgdir" install || return 1
+
+ install -m755 -D "$srcdir"/$pkgname.initd \
+ "$pkgdir"/etc/init.d/$pkgname || return 1
+ rm "$pkgdir"/etc/pdns.conf-dist
+ install -m644 -D "$srcdir"/$pkgname.conf \
+ "$pkgdir"/etc/$pkgname.conf || return 1
+ chown pdns:pdns "$pkgdir"/etc/$pkgname.conf || return 1
+ chmod 600 "$pkgdir"/etc/$pkgname.conf || return 1
+}
+
+doc() {
+ mkdir -p "$subpkgdir"/usr || return 1
+ mv "$pkgdir"/usr/share "$subpkgdir"/usr/ || return 1
+
+ _docs="AUTHORS COPYING ChangeLog HACKING INSTALL NEWS README TODO"
+ mkdir -p "$subpkgdir"/usr/share/doc/$pkgname || return 1
+ for _doc in $_docs; do
+ cp "$_builddir"/$_doc \
+ "$subpkgdir"/usr/share/doc/$pkgname/$_doc || return 1
+ done
+}
+
+backend_geo() { _mv_backend geo; }
+backend_ldap() { _mv_backend ldap openldap; }
+backend_mysql() { _mv_backend gmysql mysql; }
+backend_pgsql() { _mv_backend gpgsql postgresql; }
+backend_pipe() { _mv_backend pipe; }
+backend_sqlite3() { _mv_backend gsqlite3 sqlite; }
+
+_mv_backend() {
+ local backend=$1
+ pkgdesc="${backend} backend module for PowerDNS"
+
+ # backend dependencies
+ if [ -n "${2-}" ]; then
+ depends="${2-}"
+ fi
+ depends="${depends} ${pkgname}"
+
+ mkdir -p "$subpkgdir"/usr/lib/pdns || return 1
+ mv "$pkgdir"/usr/lib/pdns/lib${backend}backend.so \
+ "$subpkgdir"/usr/lib/pdns/ || return 1
+ mv "$pkgdir"/usr/lib/pdns/lib${backend}backend.la \
+ "$subpkgdir"/usr/lib/pdns/ || return 1
+}
+
+md5sums="99a457688dcc246faa43dfb64c65c424 pdns-3.0-rc1.tar.gz
+fd4d14c30bae793072ba7f3fa6cca80e 0010-disable-execinfo.patch
+3c4789e9a7330579d1882344bc10b27c pdns.initd
+351bac7f784a1a40e768466d9e6f1a79 pdns.conf"
diff --git a/testing/pdns/pdns.conf b/testing/pdns/pdns.conf
new file mode 100644
index 000000000..e0238c0ac
--- /dev/null
+++ b/testing/pdns/pdns.conf
@@ -0,0 +1,337 @@
+# Autogenerated configuration file template
+#################################
+# allow-axfr-ips Allow zonetransfers only to these subnets
+#
+# allow-axfr-ips=0.0.0.0/0
+
+#################################
+# allow-recursion List of subnets that are allowed to recurse
+#
+# allow-recursion=0.0.0.0/0
+
+#################################
+# allow-recursion-override Set this so that local data fully overrides the recursor
+#
+# allow-recursion-override=no
+
+#################################
+# cache-ttl Seconds to store packets in the PacketCache
+#
+cache-ttl=60
+
+#################################
+# chroot If set, chroot to this directory for more security
+#
+chroot=/var/empty
+
+#################################
+# config-dir Location of configuration directory (pdns.conf)
+#
+config-dir=/etc
+
+#################################
+# config-name Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# control-console Debugging switch - don't use
+#
+# control-console=no
+
+#################################
+# daemon Operate as a daemon
+#
+daemon=yes
+
+#################################
+# default-soa-name name to insert in the SOA record if none set in the backend
+#
+# default-soa-name=a.misconfigured.powerdns.server
+
+#################################
+# default-ttl Seconds a result is valid if not set otherwise
+#
+# default-ttl=3600
+
+#################################
+# disable-axfr Disable zonetransfers but do allow TCP queries
+#
+# disable-axfr=no
+
+#################################
+# disable-tcp Do not listen to TCP queries
+#
+# disable-tcp=no
+
+#################################
+# distributor-threads Default number of Distributor (backend) threads to start
+#
+distributor-threads=1
+
+#################################
+# do-ipv6-additional-processing Do AAAA additional processing
+#
+# do-ipv6-additional-processing=no
+
+#################################
+# fancy-records Process URL and MBOXFW records
+#
+# fancy-records=no
+
+#################################
+# guardian Run within a guardian process
+#
+guardian=yes
+
+#################################
+# launch Which backends to launch and order to query them in
+#
+# launch=
+
+#################################
+# lazy-recursion Only recurse if question cannot be answered locally
+#
+# lazy-recursion=yes
+
+#################################
+# load-modules Load this module - supply absolute or relative path
+#
+# load-modules=
+
+#################################
+# local-address Local IP addresses to which we bind
+#
+# local-address=0.0.0.0
+
+#################################
+# local-ipv6 Local IP address to which we bind
+#
+# local-ipv6=
+
+#################################
+# local-port The port on which we listen
+#
+local-port=53
+
+#################################
+# log-dns-details If PDNS should log DNS non-erroneous details
+#
+# log-dns-details=
+
+#################################
+# log-failed-updates If PDNS should log failed update requests
+#
+# log-failed-updates=
+
+#################################
+# logfile Logfile to use (Windows only)
+#
+# logfile=pdns.log
+
+#################################
+# logging-facility Log under a specific facility
+#
+# logging-facility=
+
+#################################
+# loglevel Amount of logging. Higher is more. Do not set below 3
+#
+loglevel=3
+
+#################################
+# master Act as a master
+#
+# master=no
+
+#################################
+# max-queue-length Maximum queuelength before considering situation lost
+#
+# max-queue-length=5000
+
+#################################
+# max-tcp-connections Maximum number of TCP connections
+#
+# max-tcp-connections=10
+
+#################################
+# module-dir Default directory for modules
+#
+module-dir=/usr/lib/pdns
+
+#################################
+# negquery-cache-ttl Seconds to store packets in the PacketCache
+#
+negquery-cache-ttl=60
+
+#################################
+# no-shuffle Set this to prevent random shuffling of answers - for regression testing
+#
+# no-shuffle=off
+
+#################################
+# out-of-zone-additional-processing Do out of zone additional processing
+#
+# out-of-zone-additional-processing=yes
+
+#################################
+# pipebackend-abi-version Version of the pipe backend ABI
+#
+# pipebackend-abi-version=1
+
+#################################
+# query-cache-ttl Seconds to store packets in the PacketCache
+#
+# query-cache-ttl=20
+
+#################################
+# query-local-address Source IP address for sending queries
+#
+# query-local-address=
+
+#################################
+# query-logging Hint backends that queries should be logged
+#
+# query-logging=no
+
+#################################
+# queue-limit Maximum number of milliseconds to queue a query
+#
+# queue-limit=1500
+
+#################################
+# recursive-cache-ttl Seconds to store packets in the PacketCache
+#
+# recursive-cache-ttl=10
+
+#################################
+# recursor If recursion is desired, IP address of a recursing nameserver
+#
+# recursor=no
+
+#################################
+# send-root-referral Send out old-fashioned root-referral instead of ServFail in case of no authority
+#
+# send-root-referral=no
+
+#################################
+# setgid If set, change group id to this gid for more security
+#
+setgid=pdns
+
+#################################
+# setuid If set, change user id to this uid for more security
+#
+setuid=pdns
+
+#################################
+# skip-cname Do not perform CNAME indirection for each query
+#
+# skip-cname=no
+
+#################################
+# slave Act as a slave
+#
+# slave=no
+
+#################################
+# slave-cycle-interval Reschedule failed SOA serial checks once every .. seconds
+#
+# slave-cycle-interval=60
+
+#################################
+# smtpredirector Our smtpredir MX host
+#
+# smtpredirector=a.misconfigured.powerdns.smtp.server
+
+#################################
+# soa-expire-default Default SOA expire
+#
+# soa-expire-default=604800
+
+#################################
+# soa-minimum-ttl Default SOA mininum ttl
+#
+# soa-minimum-ttl=3600
+
+#################################
+# soa-refresh-default Default SOA refresh
+#
+# soa-refresh-default=10800
+
+#################################
+# soa-retry-default Default SOA retry
+#
+# soa-retry-default=3600
+
+#################################
+# soa-serial-offset Make sure that no SOA serial is less than this number
+#
+# soa-serial-offset=0
+
+#################################
+# socket-dir Where the controlsocket will live
+#
+socket-dir=/var/run
+
+#################################
+# strict-rfc-axfrs Perform strictly rfc compliant axfrs (very slow)
+#
+# strict-rfc-axfrs=no
+
+#################################
+# trusted-notification-proxy IP address of incoming notification proxy
+#
+# trusted-notification-proxy=
+
+#################################
+# urlredirector Where we send hosts to that need to be url redirected
+#
+# urlredirector=127.0.0.1
+
+#################################
+# use-logfile Use a log file (Windows only)
+#
+use-logfile=no
+
+#################################
+# version-string PowerDNS version in packets - full, anonymous, powerdns or custom
+#
+# version-string=full
+
+#################################
+# webserver Start a webserver for monitoring
+#
+webserver=no
+
+#################################
+# webserver-address IP Address of webserver to listen on
+#
+# webserver-address=127.0.0.1
+
+#################################
+# webserver-password Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port Port of webserver to listen on
+#
+# webserver-port=8081
+
+#################################
+# webserver-print-arguments If the webserver should print arguments
+#
+# webserver-print-arguments=no
+
+#################################
+# wildcard-url Process URL and MBOXFW records
+#
+# wildcard-url=no
+
+#################################
+# wildcards Honor wildcards in the database
+#
+wildcards=yes
+
+
diff --git a/testing/pdns/pdns.initd b/testing/pdns/pdns.initd
new file mode 100644
index 000000000..593d56347
--- /dev/null
+++ b/testing/pdns/pdns.initd
@@ -0,0 +1,64 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/files/pdns,v 1.10 2007/05/07 20:19:18 swegener Exp $
+
+name=pdns
+daemon=/usr/sbin/pdns_server
+pdns_control=/usr/bin/pdns_control
+opts="reload monitor dump"
+
+PDNS_INSTANCE="${SVCNAME#pdns[.-]}"
+PDNS_CONFIG=""
+
+if [ -n "${PDNS_INSTANCE}" ] && [ "${PDNS_INSTANCE}" != "pdns" ]
+then
+ PDNS_CONFIG="--config-name=${PDNS_INSTANCE}"
+else
+ PDNS_INSTANCE="default"
+fi
+
+depend() {
+ need net
+ after firewall
+}
+
+start() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE})"
+ ${daemon} \
+ ${PDNS_CONFIG} \
+ --daemon=yes \
+ --guardian=yes
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping PowerDNS (${PDNS_INSTANCE})"
+ ${pdns_control} ${PDNS_CONFIG} quit &>/dev/null
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading PowerDNS (${PDNS_INSTANCE})"
+ ${pdns_control} ${PDNS_CONFIG} cycle &>/dev/null
+ eend $?
+}
+
+dump() {
+ ebegin "Dumping PowerDNS (${PDNS_INSTANCE}) variables"
+ ${pdns_control} ${PDNS_CONFIG} list
+ eend $?
+}
+
+monitor() {
+ ebegin "Starting PowerDNS (${PDNS_INSTANCE}) in monitor mode"
+ ${daemon} \
+ ${PDNS_CONFIG} \
+ --daemon=no \
+ --guardian=no \
+ --control-console=yes \
+ --loglevel=9 \
+ --log-dns-details=yes \
+ --query-logging=yes
+ eend $?
+}
diff --git a/testing/pdns/pdns.post-deinstall b/testing/pdns/pdns.post-deinstall
new file mode 100644
index 000000000..f1efa1609
--- /dev/null
+++ b/testing/pdns/pdns.post-deinstall
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+deluser pdns 2>/dev/null
+exit 0
diff --git a/testing/pdns/pdns.pre-install b/testing/pdns/pdns.pre-install
new file mode 100644
index 000000000..c9d2d1473
--- /dev/null
+++ b/testing/pdns/pdns.pre-install
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+adduser -H -h /var/empty -D -s /bin/false pdns 2>/dev/null
+exit 0