This commit is contained in:
2023-09-10 22:09:18 +02:00
27 changed files with 2767 additions and 12 deletions

View File

@@ -0,0 +1,83 @@
# Created by: sten@blinkenlights.nl
# $FreeBSD: head/dns/powerdns-recursor/Makefile 390622 2015-06-26 09:10:07Z robak $
PORTNAME= recursor
PORTVERSION= 4.8.3
CATEGORIES= dns
MASTER_SITES= http://downloads.powerdns.com/releases/
PKGNAMEPREFIX= powerdns-
DISTNAME= pdns-${PORTNAME}-${PORTVERSION}
MAINTAINER= tremere@cainites.net
COMMENT= Advanced DNS recursor
BUILD_DEPENDS+= lua:lang/lua53
RUN_DEPENDS+= lua:lang/lua53
LIB_DEPENDS+= libprotobuf.so:devel/protobuf
LIB_DEPENDS+= libboost_thread.so:devel/libboost64
LIB_DEPENDS+= libboost_system.so:devel/libboost64
BUILD_DEPENDS+= ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/libboost64
USES= gmake tar:bzip2
GNU_CONFIGURE= yes
CFLAGS+= -I${PREFIX}/include
CXXFLAGS+= -I${PREFIX}/include
LDFLAGS+= -L${PREFIX}/lib
CONFIGURE_ARGS+= --sysconfdir=${PREFIX}/etc/pdns
#CONFIGURE_ARGS+= --with-protobuf
CONFIGURE_ARGS+= --without-net-snmp
CXXFLAGS+= -D_GLIBCXX_USE_C99
#CONFIGURE_ARGS+= --without-luajit
#CONFIGURE_ARGS+= --without-lua
MAKE_ARGS+= OPTFLAGS="${CFLAGS}"
SUB_FILES= pkg-message
.include <bsd.port.options.mk>
.if ${ARCH} == "sparc64"
BROKEN= Does not compile on sparc64
.endif
USE_RC_SUBR+= pdns-recursor
PDNS_OWNER= pdns
PDNS_GROUP= pdns
PDNS_OWNER_ID= 120
PDNS_GROUP_ID= 120
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
SUB_FILES+= pkg-install pkg-deinstall
SUB_LIST+= PDNS_OWNER=${PDNS_OWNER}
SUB_LIST+= PDNS_GROUP=${PDNS_GROUP}
SUB_LIST+= PDNS_OWNER_ID=${PDNS_OWNER_ID}
SUB_LIST+= PDNS_GROUP_ID=${PDNS_GROUP_ID}
SUB_LIST+= PREFIX=${PREFIX}
post-patch:
# ${REINPLACE_CMD} -e 's;SBINDIR=/usr/sbin/;SBINDIR=${PREFIX}/sbin/;' \
# -e 's;BINDIR=/usr/bin/;BINDIR=${PREFIX}/bin/;' \
# -e 's;SYSCONFDIR=/etc/powerdns/;SYSCONFDIR=${PREFIX}/etc/pdns/;' \
# -e 's;/usr/share;${MANPREFIX};' \
# ${WRKSRC}/Makefile.in
cd ${WRKSRC} && autoreconf
${REINPLACE_CMD} \
-e 's,boost-lib-version = BOOST_LIB_VERSION,boost-lib-version = 1_64,' \
${WRKSRC}/configure
PORTEXAMPLES= *
post-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${FILESDIR}/recursor.conf ${STAGEDIR}${EXAMPLESDIR}/recursor.conf.example
.include <bsd.port.mk>
#EO

View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1681540073
SHA256 (pdns-recursor-4.8.3.tar.bz2) = 37b91a5458c54411f4e38e2d1263ecf41e751e43c5fd66e813100d9978f02505
SIZE (pdns-recursor-4.8.3.tar.bz2) = 1525607

View File

@@ -0,0 +1,13 @@
--- pdns_recursor.cc.orig 2017-12-11 13:13:52.274237000 +0100
+++ pdns_recursor.cc 2017-12-11 13:18:42.339569000 +0100
@@ -3325,8 +3325,8 @@
::arg().set("log-timestamp","Print timestamps in log lines, useful to disable when running with a tool that timestamps stdout already")="yes";
::arg().set("log-common-errors","If we should log rather common errors")="no";
::arg().set("chroot","switch to chroot jail")="";
- ::arg().set("setgid","If set, change group id to this gid for more security")="";
- ::arg().set("setuid","If set, change user id to this uid for more security")="";
+ ::arg().set("setgid","If set, change group id to this gid for more security")="pdns";
+ ::arg().set("setuid","If set, change user id to this uid for more security")="pdns_recursor";
::arg().set("network-timeout", "Wait this number of milliseconds for network i/o")="1500";
::arg().set("threads", "Launch this number of threads")="2";
::arg().set("processes", "Launch this number of processes (EXPERIMENTAL, DO NOT CHANGE)")="1"; // if we un-experimental this, need to fix openssl rand seeding for multiple PIDs!

View File

@@ -0,0 +1,15 @@
--- m4/pdns_check_libcrypto.m4.orig 2020-11-16 16:30:04 UTC
+++ m4/pdns_check_libcrypto.m4
@@ -75,8 +75,10 @@ AC_DEFUN([PDNS_CHECK_LIBCRYPTO], [
for ssldir in $ssldirs; do
AC_MSG_CHECKING([for openssl/crypto.h in $ssldir])
if test -f "$ssldir/include/openssl/crypto.h"; then
- LIBCRYPTO_INCLUDES="-I$ssldir/include"
- LIBCRYPTO_LDFLAGS="-L$ssldir/lib"
+ if test $ssldir != /usr; then
+ LIBCRYPTO_INCLUDES="-I$ssldir/include"
+ LIBCRYPTO_LDFLAGS="-L$ssldir/lib"
+ fi
LIBCRYPTO_LIBS="-lcrypto"
found=true
AC_MSG_RESULT([yes])

View File

@@ -0,0 +1,11 @@
--- m4/pdns_with_lua.m4.orig 2020-09-30 10:42:53 UTC
+++ m4/pdns_with_lua.m4
@@ -41,7 +41,7 @@ AC_DEFUN([PDNS_WITH_LUA],[
], [ : ])
AS_IF([test -z "$LUAPC"], [
found_lua=n
- m4_foreach_w([luapc], [lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua], [
+ m4_foreach_w([luapc], [lua5.4 lua-5.4 lua54 lua5.3 lua-5.3 lua53 lua5.2 lua-5.2 lua52 lua5.1 lua-5.1 lua51 lua], [
AS_IF([test "$found_lua" != "y"], [
PKG_CHECK_MODULES([LUA], [luapc >= ${lua_min_version}], [
AC_DEFINE([HAVE_LUA], [1], [Define to 1 if you have lua])

View File

@@ -0,0 +1,18 @@
--- rec-main.cc.orig 2022-12-09 10:46:42 UTC
+++ rec-main.cc
@@ -2609,13 +2609,13 @@ int main(int argc, char** argv)
SYSTEMD_SETID_MSG
#endif
)
- = "";
+ = "pdns";
::arg().set("setuid", "If set, change user id to this uid for more security"
#ifdef HAVE_SYSTEMD
SYSTEMD_SETID_MSG
#endif
)
- = "";
+ = "pdns_recursor";
::arg().set("network-timeout", "Wait this number of milliseconds for network i/o") = "1500";
::arg().set("threads", "Launch this number of threads") = "2";
::arg().set("distributor-threads", "Launch this number of distributor threads, distributing queries to other threads") = "0";

View File

@@ -0,0 +1,36 @@
#!/bin/sh
#
# $$
#
# PROVIDE: pdns_recursor
# REQUIRE: SERVERS cleanvar
# BEFORE: DAEMON
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable pdns_recursor:
#
# pdns_recursor_enable="YES"
# pdns_recursor_flags="<set as needed>"
#
# See pdns_recursor(8) for flags.
#
. /etc/rc.subr
name=pdns_recursor
rcvar=pdns_recursor_enable
command=%%PREFIX%%/sbin/pdns_recursor
# set defaults
pdns_recursor_enable=${pdns_recursor_enable:-"NO"}
pdns_recursor_conf=${pdns_recursor_conf:-"%%PREFIX%%/etc/pdns/recursor.conf"}
load_rc_config ${name}
required_files=${pdns_recursor_conf}
run_rc_command "$1"

View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -x
case $2 in
DEINSTALL)
;;
POST-DEINSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,37 @@
#!/bin/sh
set -x
case $2 in
PRE-INSTALL)
PDNS_GROUP="%%PDNS_GROUP%%"
PDNS_OWNER="%%PDNS_OWNER%%"
PDNS_GROUP_ID="%%PDNS_GROUP_ID%%"
PDNS_OWNER_ID="%%PDNS_OWNER_ID%%"
PKG_PREFIX="%%PREFIX%%"
PDNS_NAME="powerdns"
PDNS_SHELL="/usr/sbin/nologin"
pw group add ${PDNS_GROUP} -g ${PDNS_GROUP_ID}
pw group show ${PDNS_GROUP}
pw user add ${PDNS_OWNER} -u ${PDNS_OWNER_ID} \
-g ${PDNS_GROUP} \
-d ${PKG_PREFIX} \
-s "${PDNS_SHELL}" -u ${PDNS_OWNER_ID} \
-c "${PDNS_NAME}"
pw group mod ${PDNS_GROUP} -M ${PDNS_OWNER}
pw user show ${PDNS_OWNER}
pw group show ${PDNS_GROUP}
# for dir in ${PDNS_LOGDIR} ${PDNS_RUNDIR}; do
# install -d -o ${PDNS_OWNER} -g ${PDNS_GROUP} -m 0750 ${dir}
# done
# install -d -o root -g wheel -m 0755 ${PDNS_DATADIR}
;;
POST-INSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,11 @@
*******************************************************************
If you want to use the powerdns recursor,
you need the following line in /etc/rc.conf(.local)
pdns_recursor_enable="YES"
Configuration templates are available in %%PREFIX%%/etc/pdns
as recursor.conf-dist.
*******************************************************************

View File

@@ -0,0 +1,407 @@
# Autogenerated configuration file template
#################################
# allow-from If set, only allow these comma separated netmasks to recurse
#
# allow-from=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10
#################################
# allow-from-file If set, load allowed netmasks from this file
#
# allow-from-file=
#################################
# any-to-tcp Answer ANY queries with tc=1, shunting to TCP
#
# any-to-tcp=no
#################################
# auth-zones Zones for which we have authoritative data, comma separated domain=file pairs
#
# auth-zones=
#################################
# carbon-interval Number of seconds between carbon (graphite) updates
#
# carbon-interval=30
#################################
# carbon-ourname If set, overrides our reported hostname for carbon stats
#
# carbon-ourname=
#################################
# carbon-server If set, send metrics in carbon (graphite) format to this server
#
# carbon-server=
#################################
# chroot switch to chroot jail
#
# chroot=
#################################
# client-tcp-timeout Timeout in seconds when talking to TCP clients
#
# client-tcp-timeout=2
#################################
# config-dir Location of configuration directory (recursor.conf)
#
# config-dir=/usr/local/etc/pdns/
#################################
# config-name Name of this virtual configuration - will rename the binary image
#
# config-name=
#################################
# daemon Operate as a daemon
#
# daemon=yes
#################################
# delegation-only Which domains we only accept delegations from
#
# delegation-only=
#################################
# disable-edns Disable EDNS - EXPERIMENTAL, LEAVE DISABLED
#
# disable-edns=
#################################
# disable-packetcache Disable packetcache
#
# disable-packetcache=no
#################################
# dont-query If set, do not query these netmasks for DNS data
#
# dont-query=127.0.0.0/8, 10.0.0.0/8, 100.64.0.0/10, 169.254.0.0/16, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fc00::/7, fe80::/10, 0.0.0.0/8, 192.0.0.0/24, 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24, 240.0.0.0/4, ::/96, ::ffff:0:0/96, 100::/64, 2001:db8::/32
#################################
# entropy-source If set, read entropy from this file
#
# entropy-source=/dev/urandom
#################################
# etc-hosts-file Path to 'hosts' file
#
# etc-hosts-file=/etc/hosts
#################################
# experimental-api-config-dir Directory where REST API stores config and zones
#
# experimental-api-config-dir=
#################################
# experimental-api-key REST API Static authentication key (required for API use)
#
# experimental-api-key=
#################################
# experimental-api-readonly If the JSON API should disallow data modification
#
# experimental-api-readonly=no
#################################
# experimental-logfile Filename of the log file for JSON parser
#
# experimental-logfile=/var/log/pdns.log
#################################
# experimental-webserver Start a webserver for monitoring
#
# experimental-webserver=no
#################################
# experimental-webserver-address IP Address of webserver to listen on
#
# experimental-webserver-address=127.0.0.1
#################################
# experimental-webserver-password Password required for accessing the webserver
#
# experimental-webserver-password=
#################################
# experimental-webserver-port Port of webserver to listen on
#
# experimental-webserver-port=8082
#################################
# export-etc-hosts If we should serve up contents from /etc/hosts
#
# export-etc-hosts=off
#################################
# export-etc-hosts-search-suffix Also serve up the contents of /etc/hosts with this suffix
#
# export-etc-hosts-search-suffix=
#################################
# forward-zones Zones for which we forward queries, comma separated domain=ip pairs
#
# forward-zones=
#################################
# forward-zones-file File with (+)domain=ip pairs for forwarding
#
# forward-zones-file=
#################################
# forward-zones-recurse Zones for which we forward queries with recursion bit, comma separated domain=ip pairs
#
# forward-zones-recurse=
#################################
# hint-file If set, load root hints from this file
#
# hint-file=
#################################
# include-dir Include *.conf files from this directory
#
# include-dir=
#################################
# latency-statistic-size Number of latency values to calculate the qa-latency average
#
# latency-statistic-size=10000
#################################
# local-address IP addresses to listen on, separated by spaces or commas. Also accepts ports.
#
# local-address=127.0.0.1
#################################
# local-port port to listen on
#
# local-port=53
#################################
# log-common-errors If we should log rather common errors
#
# log-common-errors=yes
#################################
# logging-facility Facility to log messages as. 0 corresponds to local0
#
# logging-facility=
#################################
# loglevel Amount of logging. Higher is more. Do not set below 3
#
# loglevel=4
#################################
# lua-dns-script Filename containing an optional 'lua' script that will be used to modify dns answers
#
# lua-dns-script=
#################################
# max-cache-entries If set, maximum number of entries in the main cache
#
# max-cache-entries=1000000
#################################
# max-cache-ttl maximum number of seconds to keep a cached entry in memory
#
# max-cache-ttl=86400
#################################
# max-mthreads Maximum number of simultaneous Mtasker threads
#
# max-mthreads=2048
#################################
# max-negative-ttl maximum number of seconds to keep a negative cached entry in memory
#
# max-negative-ttl=3600
#################################
# max-packetcache-entries maximum number of entries to keep in the packetcache
#
# max-packetcache-entries=500000
#################################
# max-qperq Maximum outgoing queries per query
#
# max-qperq=50
#################################
# max-tcp-clients Maximum number of simultaneous TCP clients
#
# max-tcp-clients=128
#################################
# max-tcp-per-client If set, maximum number of TCP sessions per client (IP address)
#
# max-tcp-per-client=0
#################################
# max-total-msec Maximum total wall-clock time per query in milliseconds, 0 for unlimited
#
# max-total-msec=7000
#################################
# minimum-ttl-override Set under adverse conditions, a minimum TTL
#
# minimum-ttl-override=0
#################################
# network-timeout Wait this nummer of milliseconds for network i/o
#
# network-timeout=1500
#################################
# no-shuffle Don't change
#
# no-shuffle=off
#################################
# packetcache-servfail-ttl maximum number of seconds to keep a cached servfail entry in packetcache
#
# packetcache-servfail-ttl=60
#################################
# packetcache-ttl maximum number of seconds to keep a cached entry in packetcache
#
# packetcache-ttl=3600
#################################
# pdns-distributes-queries If PowerDNS itself should distribute queries over threads
#
# pdns-distributes-queries=
#################################
# processes Launch this number of processes (EXPERIMENTAL, DO NOT CHANGE)
#
# processes=1
#################################
# query-local-address Source IP address for sending queries
#
# query-local-address=0.0.0.0
#################################
# query-local-address6 Source IPv6 address for sending queries. IF UNSET, IPv6 WILL NOT BE USED FOR OUTGOING QUERIES
#
# query-local-address6=
#################################
# quiet Suppress logging of questions and answers
#
# quiet=
#################################
# root-nx-trust If set, believe that an NXDOMAIN from the root means the TLD does not exist
#
# root-nx-trust=no
#################################
# security-poll-suffix Domain name from which to query security update notifications
#
# security-poll-suffix=secpoll.powerdns.com.
#################################
# serve-rfc1918 If we should be authoritative for RFC 1918 private IP space
#
# serve-rfc1918=
#################################
# server-down-max-fails Maximum number of consecutive timeouts (and unreachables) to mark a server as down ( 0 => disabled )
#
# server-down-max-fails=64
#################################
# server-down-throttle-time Number of seconds to throttle all queries to a server after being marked as down
#
# server-down-throttle-time=60
#################################
# server-id Returned when queried for 'server.id' TXT or NSID, defaults to hostname
#
# server-id=
#################################
# setgid If set, change group id to this gid for more security
#
# setgid=
#################################
# setuid If set, change user id to this uid for more security
#
# setuid=
#################################
# single-socket If set, only use a single socket for outgoing queries
#
# single-socket=off
#################################
# soa-minimum-ttl Don't change
#
# soa-minimum-ttl=0
#################################
# socket-dir Where the controlsocket will live
#
# socket-dir=/var/run/
#################################
# socket-group Group of socket
#
# socket-group=
#################################
# socket-mode Permissions for socket
#
# socket-mode=
#################################
# socket-owner Owner of socket
#
# socket-owner=
#################################
# spoof-nearmiss-max If non-zero, assume spoofing after this many near misses
#
# spoof-nearmiss-max=20
#################################
# stack-size stack size per mthread
#
# stack-size=200000
#################################
# stats-ringbuffer-entries maximum number of packets to store statistics for
#
# stats-ringbuffer-entries=10000
#################################
# threads Launch this number of threads
#
# threads=2
#################################
# trace if we should output heaps of logging. set to 'fail' to only log failing domains
#
# trace=off
#################################
# udp-truncation-threshold Maximum UDP response size before we truncate
#
# udp-truncation-threshold=1680
#################################
# version-string string reported on version.pdns or version.bind
#
# version-string=PowerDNS Recursor 3.7.3 (jenkins@autotest.powerdns.com built 20160325022915 root@pdns01.lazurit.us)
#################################
# webserver-allow-from Webserver access is only allowed from these subnets
#
# webserver-allow-from=0.0.0.0/0,::/0

View File

@@ -0,0 +1,4 @@
powerdns recursor is a high performance, simple and secure recursing
nameserver. It currently powers over two million internet connections.
WWW: http://www.powerdns.com

View File

@@ -0,0 +1,6 @@
bin/rec_control
man/man1/pdns_recursor.1.gz
man/man1/rec_control.1.gz
sbin/pdns_recursor
share/examples/recursor/recursor.conf.example
@dir share/examples/recursor

82
net/powerdns/Makefile Normal file
View File

@@ -0,0 +1,82 @@
#
# $Id$
#
PORTNAME= powerdns
PORTVERSION= 4.7.3
CATEGORIES= dns
MASTER_SITES= https://downloads.powerdns.com/releases/
DISTNAME= pdns-${PORTVERSION}
MAINTAINER= tremere@cainites.net
COMMENT= Advanced DNS server with multiple backends including SQL
BUILD_DEPENDS+= ${LOCALBASE}/lib/libboost_serialization.a:devel/libboost64
USES+= pgsql
LIB_DEPENDS+= libsqlite3.so:data/sqlite3
LIB_DEPENDS+= libiconv.so:text/libiconv
LIB_DEPENDS+= libintl.so:devel/gettext
USES= gmake tar:bz2
USE_LDCONFIG= yes
USE_SUBMAKE= yes
GNU_CONFIGURE= yes
INSTALL_TARGET= install-strip
CXXFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
CONFIGURE_ARGS+= --disable-static
CONFIGURE_ARGS+= --with-modules=""
CONFIGURE_ARGS+= --with-dynmodules="pipe bind ${MODULES}"
CONFIGURE_ARGS+= --docdir="${PREFIX}/share/pdns"
CONFIGURE_ARGS+= --sysconfdir="${PREFIX}/etc/pdns"
CONFIGURE_ARGS+= --with-boost="${LOCALBASE}/boost72"
CONFIGURE_ARGS+= --with-pgsql=${LOCALBASE}
CONFIGURE_ARGS+= --without-mysql
CONFIGURE_ARGS+= --enable-static-boost
CONFIGURE_ARGS+= --with-sqlite3
CONFIGURE_ARGS+= --with-pgsql-includes=${LOCALBASE}/include/postgresql
#CONFIGURE_ARGS+= --without-system-polarssl
#CONFIGURE_ARGS+= --with-pgsql-config=${LOCALBASE}/bin/pg_config
#CONFIGURE_ARGS+= --enable-tools
#CONFIGURE_ARGS+= --without-luajit
#CONFIGURE_ARGS+= --without-lua
MODULES+= gpgsql gsqlite3 bind
SCRIPTS_ENV+= WRKDIRPREFIX="${WRKDIRPREFIX}"
SCRIPTS_ENV+= CURDIR2="${.CURDIR}"
SCRIPTS_ENV+= MKDIR="${MKDIR}"
SCRIPTS_ENV+= DISTNAME="${DISTNAME}"
SCRIPTS_ENV+= POWERDNS_OPTIONS="${POWERDNS_OPTIONS}"
SUB_FILES= pkg-message
USE_RC_SUBR= pdns
PDNS_OWNER= pdns
PDNS_GROUP= pdns
PDNS_OWNER_ID= 120
PDNS_GROUP_ID= 120
PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install
SUB_FILES+= pkg-install pkg-deinstall
SUB_LIST+= PDNS_OWNER=${PDNS_OWNER}
SUB_LIST+= PDNS_GROUP=${PDNS_GROUP}
SUB_LIST+= PDNS_OWNER_ID=${PDNS_OWNER_ID}
SUB_LIST+= PDNS_GROUP_ID=${PDNS_GROUP_ID}
SUB_LIST+= PREFIX=${PREFIX}
PORTEXAMPLES= *
post-install:
${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
${INSTALL_DATA} ${FILESDIR}/pdns.conf ${STAGEDIR}${EXAMPLESDIR}/pdns.conf.example
.include <bsd.port.mk>
#EOF

3
net/powerdns/distinfo Normal file
View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1680689796
SHA256 (pdns-4.7.3.tar.bz2) = 8bad351b2e09426f6d4fb0346881a5155fe555497c3d85071e531e7c7afe3e76
SIZE (pdns-4.7.3.tar.bz2) = 1353333

1827
net/powerdns/files/pdns.conf Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,40 @@
#!/bin/sh
#
# $FreeBSD: head/dns/powerdns/files/pdns.in 378861 2015-02-12 02:21:02Z brd $
#
# PROVIDE: pdns_server
# REQUIRE: DAEMON SERVERS
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable powerdns:
#
# pdns_enable="YES"
# pdns_flags="<set as needed>"
#
# See pdns_server(8) for flags.
#
. /etc/rc.subr
name=pdns
rcvar=pdns_enable
command=%%PREFIX%%/sbin/pdns_server
# set defaults
pdns_enable=${pdns_enable:-"NO"}
pdns_conf=${pdns_conf:-"%%PREFIX%%/etc/pdns/pdns.conf"}
pdns_flags=${pdns_flags:-"--daemon=yes --guardian=yes"}
load_rc_config ${name}
required_files=${pdns_conf}
monitor_cmd="${command} --daemon=no --guardian=no --control-console --loglevel=9"
extra_commands="monitor"
run_rc_command "$1"
#EOF

View File

@@ -0,0 +1,12 @@
#!/bin/sh
set -x
case $2 in
DEINSTALL)
;;
POST-DEINSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,37 @@
#!/bin/sh
set -x
case $2 in
PRE-INSTALL)
PDNS_GROUP="%%PDNS_GROUP%%"
PDNS_OWNER="%%PDNS_OWNER%%"
PDNS_GROUP_ID="%%PDNS_GROUP_ID%%"
PDNS_OWNER_ID="%%PDNS_OWNER_ID%%"
PKG_PREFIX="%%PREFIX%%"
PDNS_NAME="powerdns"
PDNS_SHELL="/usr/sbin/nologin"
pw group add ${PDNS_GROUP} -g ${PDNS_GROUP_ID}
pw group show ${PDNS_GROUP}
pw user add ${PDNS_OWNER} -u ${PDNS_OWNER_ID} \
-g ${PDNS_GROUP} \
-d ${PKG_PREFIX} \
-s "${PDNS_SHELL}" -u ${PDNS_OWNER_ID} \
-c "${PDNS_NAME}"
pw group mod ${PDNS_GROUP} -M ${PDNS_OWNER}
pw user show ${PDNS_OWNER}
pw group show ${PDNS_GROUP}
# for dir in ${PDNS_LOGDIR} ${PDNS_RUNDIR}; do
# install -d -o ${PDNS_OWNER} -g ${PDNS_GROUP} -m 0750 ${dir}
# done
# install -d -o root -g wheel -m 0755 ${PDNS_DATADIR}
;;
POST-INSTALL)
;;
esac
exit 0
#EOF

View File

@@ -0,0 +1,20 @@
*******************************************************************
Enable powerdns in /etc/rc.conf with the following line:
pdns_enable="YES"
A configuration template is available in %%PREFIX%%/etc/pdns
as pdns.conf-dist.
A pdns.conf with all possible options is available in
%%EXAMPLESDIR%%
---------------------------------------------
IMPORTANT: PowerDNS Authoritive Server 3.4.0+:
---------------------------------------------
This version needs a mandatory schema change for the gmsyql,
gpgsql and gsqlite3 backends. SQL statements are available in
%%DOCSDIR%% or http://doc.powerdns.com
*******************************************************************

4
net/powerdns/pkg-descr Normal file
View File

@@ -0,0 +1,4 @@
PowerDNS is an advanced DNS server, which allows for several different
backends. Current backends include MySQL, PostgreSQL, bind, etc.
WWW: http://www.powerdns.com/

42
net/powerdns/pkg-plist Normal file
View File

@@ -0,0 +1,42 @@
bin/pdns_control
bin/pdnsutil
bin/zone2json
bin/zone2sql
lib/pdns/libbindbackend.la
lib/pdns/libbindbackend.so
lib/pdns/libgpgsqlbackend.la
lib/pdns/libgpgsqlbackend.so
lib/pdns/libgsqlite3backend.la
lib/pdns/libgsqlite3backend.so
lib/pdns/libpipebackend.la
lib/pdns/libpipebackend.so
man/man1/dnsbulktest.1.gz
man/man1/dnstcpbench.1.gz
man/man1/pdns_control.1.gz
man/man1/pdns_server.1.gz
man/man1/pdnsutil.1.gz
man/man1/zone2json.1.gz
man/man1/zone2sql.1.gz
sbin/pdns_server
share/examples/powerdns/pdns.conf.example
share/pdns/3.4.0_to_4.0.0_schema.sqlite3.sql
share/pdns/3.4.0_to_4.1.0_schema.pgsql.sql
share/pdns/4.0.0_to_4.2.0_schema.sqlite3.sql
share/pdns/4.1.0_to_4.2.0_schema.pgsql.sql
share/pdns/4.2.0_to_4.3.0_schema.pgsql.sql
share/pdns/4.2.0_to_4.3.0_schema.sqlite3.sql
share/pdns/4.3.0_to_4.3.1_schema.sqlite3.sql
share/pdns/4.3.0_to_4.7.0_schema.pgsql.sql
share/pdns/4.3.1_to_4.7.0_schema.sqlite3.sql
share/pdns/bind-dnssec.4.2.0_to_4.3.0_schema.sqlite3.sql
share/pdns/bind-dnssec.schema.sqlite3.sql
share/pdns/dnssec-3.x_to_3.4.0_schema.pgsql.sql
share/pdns/dnssec-3.x_to_3.4.0_schema.sqlite3.sql
share/pdns/nodnssec-3.x_to_3.4.0_schema.pgsql.sql
share/pdns/nodnssec-3.x_to_3.4.0_schema.sqlite3.sql
share/pdns/schema.pgsql.sql
share/pdns/schema.sqlite3.sql
@dir lib/pdns
@dir share/examples/powerdns
@dir share/examples
@dir share/pdns