diff options
author | Olivier Mauras <olivier@mauras.ch> | 2016-08-31 16:46:52 +0200 |
---|---|---|
committer | Carlo Landmeter <clandmeter@gmail.com> | 2016-08-31 17:06:37 +0200 |
commit | 5bbcf5621821932748027b7499a107741cdd34f6 (patch) | |
tree | 7357fec9c159be0cbb5617acd7ae8f364d1c25ed /community/pdns | |
parent | 82b5d172b33f1c9d7ac3f4c55b5513511a5db651 (diff) | |
download | aports-5bbcf5621821932748027b7499a107741cdd34f6.tar.bz2 aports-5bbcf5621821932748027b7499a107741cdd34f6.tar.xz |
testing/pdns{-recursor}: Move to community
Diffstat (limited to 'community/pdns')
-rw-r--r-- | community/pdns/APKBUILD | 102 | ||||
-rw-r--r-- | community/pdns/pdns.conf | 337 | ||||
-rw-r--r-- | community/pdns/pdns.initd | 66 | ||||
-rw-r--r-- | community/pdns/pdns.post-deinstall | 4 | ||||
-rw-r--r-- | community/pdns/pdns.pre-install | 6 |
5 files changed, 515 insertions, 0 deletions
diff --git a/community/pdns/APKBUILD b/community/pdns/APKBUILD new file mode 100644 index 0000000000..5d6fd9986e --- /dev/null +++ b/community/pdns/APKBUILD @@ -0,0 +1,102 @@ +# Contributor: Ćukasz Jendrysik <scadu@yandex.com> +# Contributor: Matt Smith <mcs@darkregion.net> +# Contributor: Olivier Mauras <olivier@mauras.ch> +# Maintainer: Matt Smith <mcs@darkregion.net> +pkgname=pdns +pkgver=4.0.1 +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 mariadb-dev + postgresql-dev sqlite-dev" +install="$pkgname.pre-install $pkgname.post-deinstall" +subpackages="$pkgname-doc + $pkgname-backend-bind:backend_bind + $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://downloads.powerdns.com/releases/pdns-$pkgver.tar.bz2 + pdns.initd + pdns.conf + " + +_builddir="$srcdir/$pkgname-$pkgver" + +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/$pkgname \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --localstatedir=/var \ + --libdir=/usr/lib/pdns \ + --with-modules="" \ + --with-dynmodules="bind ldap gmysql gpgsql pipe gsqlite3" \ + --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/$pkgname/$pkgname.conf-dist + install -m600 -D "$srcdir"/$pkgname.conf \ + "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 + chown pdns:pdns "$pkgdir"/etc/$pkgname/$pkgname.conf || return 1 +} + +backend_bind() { _mv_backend bind; } +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" + depends="$pkgname" + + # backend dependencies + if [ -n "${2-}" ]; then + depends="${2-}" + fi + depends="${depends} ${pkgname}" + + mkdir -p "$subpkgdir"/usr/lib/pdns/pdns || return 1 + mv "$pkgdir"/usr/lib/pdns/pdns/lib${backend}backend.so \ + "$subpkgdir"/usr/lib/pdns/pdns/ || return 1 +} + +md5sums="d34a390672aa043f8a287e5bb2284f4a pdns-4.0.1.tar.bz2 +db11dfe72474858f706155c817f2ded5 pdns.initd +351bac7f784a1a40e768466d9e6f1a79 pdns.conf" +sha256sums="d191eed4a6664430e85969f49835c59e810ecbb7b3eb506e64c6b2734091edd7 pdns-4.0.1.tar.bz2 +081835f812e419b153a9cc716ad55b9cb22c6c185b748e0aafc40430fa5e8b5e pdns.initd +5fdf423f829dca0b50bc81bab773d7ec4ee6627e35f861124d8c2ccd79a2f50c pdns.conf" +sha512sums="77fce9963a05198afeb569f92fbb0f6a1cb3426c28dd77b0921128189c80d9a72ebdbfc249dfc0b5b89cc7a65a83887a0388d6cc3461453b1e3096e563afdd1e pdns-4.0.1.tar.bz2 +71257be925fe57b15ebf29a7810cd70581cb867416ab9562300a1bbc3eb94fcb92ea2eb95f15e3ee3bd409468911077c50f90a2501801b0c8c49ed979f41f3a4 pdns.initd +9913551bb4d685aaced806134b1037d85ce759e7d9e780e256e67651d9d346aad5e608b4a45a4933f0ba879605b69d06e579c38b7f917f7a9be37c7797c5953b pdns.conf" diff --git a/community/pdns/pdns.conf b/community/pdns/pdns.conf new file mode 100644 index 0000000000..e0238c0acb --- /dev/null +++ b/community/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/community/pdns/pdns.initd b/community/pdns/pdns.initd new file mode 100644 index 0000000000..b6429bf858 --- /dev/null +++ b/community/pdns/pdns.initd @@ -0,0 +1,66 @@ +#!/sbin/openrc-run +# 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 + +extra_started_commands="dump reload" +extra_commands="monitor" + +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/community/pdns/pdns.post-deinstall b/community/pdns/pdns.post-deinstall new file mode 100644 index 0000000000..f1efa16090 --- /dev/null +++ b/community/pdns/pdns.post-deinstall @@ -0,0 +1,4 @@ +#!/bin/sh + +deluser pdns 2>/dev/null +exit 0 diff --git a/community/pdns/pdns.pre-install b/community/pdns/pdns.pre-install new file mode 100644 index 0000000000..021b1e7e9c --- /dev/null +++ b/community/pdns/pdns.pre-install @@ -0,0 +1,6 @@ +#!/bin/sh + +addgroup -S pdns 2>/dev/null +adduser -S -D -H -h /var/empty -s /bin/false -G pdns -g pdns pdns 2>/dev/null + +exit 0 |