From e07c3a16e5edad891affc948730d8de9c30f2495 Mon Sep 17 00:00:00 2001 From: ziggi Date: Thu, 20 Jul 2023 22:49:09 +0200 Subject: [PATCH] updated go --- lang/go120/Makefile | 2 +- lang/go120/distinfo.amd64 | 6 +- lang/go120/pkg-plist.amd64 | 22 +- net/powerdns-recursor/Makefile | 83 + net/powerdns-recursor/distinfo | 3 + net/powerdns-recursor/files/extrapatch-setuid | 13 + .../files/patch-m4_pdns__check__libcrypto.m4 | 15 + .../files/patch-m4_pdns__with__lua.m4 | 11 + net/powerdns-recursor/files/patch-rec-main.cc | 18 + net/powerdns-recursor/files/pdns-recursor.in | 36 + net/powerdns-recursor/files/pkg-deinstall.in | 12 + net/powerdns-recursor/files/pkg-install.in | 37 + net/powerdns-recursor/files/pkg-message.in | 11 + net/powerdns-recursor/files/recursor.conf | 407 ++++ net/powerdns-recursor/pkg-descr | 4 + net/powerdns-recursor/pkg-plist | 6 + net/powerdns/Makefile | 82 + net/powerdns/distinfo | 3 + net/powerdns/files/pdns.conf | 1827 +++++++++++++++++ net/powerdns/files/pdns.in | 40 + net/powerdns/files/pkg-deinstall.in | 12 + net/powerdns/files/pkg-install.in | 37 + net/powerdns/files/pkg-message.in | 20 + net/powerdns/pkg-descr | 4 + net/powerdns/pkg-plist | 42 + 25 files changed, 2745 insertions(+), 8 deletions(-) create mode 100644 net/powerdns-recursor/Makefile create mode 100644 net/powerdns-recursor/distinfo create mode 100644 net/powerdns-recursor/files/extrapatch-setuid create mode 100644 net/powerdns-recursor/files/patch-m4_pdns__check__libcrypto.m4 create mode 100644 net/powerdns-recursor/files/patch-m4_pdns__with__lua.m4 create mode 100644 net/powerdns-recursor/files/patch-rec-main.cc create mode 100644 net/powerdns-recursor/files/pdns-recursor.in create mode 100644 net/powerdns-recursor/files/pkg-deinstall.in create mode 100644 net/powerdns-recursor/files/pkg-install.in create mode 100644 net/powerdns-recursor/files/pkg-message.in create mode 100644 net/powerdns-recursor/files/recursor.conf create mode 100644 net/powerdns-recursor/pkg-descr create mode 100644 net/powerdns-recursor/pkg-plist create mode 100644 net/powerdns/Makefile create mode 100644 net/powerdns/distinfo create mode 100644 net/powerdns/files/pdns.conf create mode 100644 net/powerdns/files/pdns.in create mode 100644 net/powerdns/files/pkg-deinstall.in create mode 100644 net/powerdns/files/pkg-install.in create mode 100644 net/powerdns/files/pkg-message.in create mode 100644 net/powerdns/pkg-descr create mode 100644 net/powerdns/pkg-plist diff --git a/lang/go120/Makefile b/lang/go120/Makefile index 6dbdea17..356a0bce 100644 --- a/lang/go120/Makefile +++ b/lang/go120/Makefile @@ -2,7 +2,7 @@ # $FreeBSD: head/lang/go/Makefile 470619 2018-05-22 14:32:09Z jlaffaye $ PORTNAME= go -PORTVERSION= 1.20.4 +PORTVERSION= 1.20.6 CATEGORIES= lang MASTER_SITES= https://golang.org/dl/ MASTER_SITES+= https://github.com/dmgk/go-bootstrap/releases/download/${BOOTSTRAP_TAG}/:bootstrap diff --git a/lang/go120/distinfo.amd64 b/lang/go120/distinfo.amd64 index 00c5d50b..31a7f597 100644 --- a/lang/go120/distinfo.amd64 +++ b/lang/go120/distinfo.amd64 @@ -1,5 +1,5 @@ -TIMESTAMP = 1683219183 -SHA256 (go1.20.4.src.tar.gz) = 9f34ace128764b7a3a4b238b805856cc1b2184304df9e5690825b0710f4202d6 -SIZE (go1.20.4.src.tar.gz) = 26185429 +TIMESTAMP = 1689882644 +SHA256 (go1.20.6.src.tar.gz) = 62ee5bc6fb55b8bae8f705e0cb8df86d6453626b4ecf93279e2867092e0b7f70 +SIZE (go1.20.6.src.tar.gz) = 26194491 SHA256 (go-freebsd-amd64-go1.20.tar.xz) = 170f612c4b8a59400f27d642aab37afa831fe2d6df3e7473dec2d4574a59a46c SIZE (go-freebsd-amd64-go1.20.tar.xz) = 34684360 diff --git a/lang/go120/pkg-plist.amd64 b/lang/go120/pkg-plist.amd64 index f2992028..ddb4500b 100644 --- a/lang/go120/pkg-plist.amd64 +++ b/lang/go120/pkg-plist.amd64 @@ -1884,6 +1884,7 @@ lib/go/src/cmd/go/testdata/script/build_cd_gopath_different.txt lib/go/src/cmd/go/testdata/script/build_cgo_consistent_results.txt lib/go/src/cmd/go/testdata/script/build_cgo_error.txt lib/go/src/cmd/go/testdata/script/build_concurrent_backend.txt +lib/go/src/cmd/go/testdata/script/build_cwd_newline.txt lib/go/src/cmd/go/testdata/script/build_darwin_cc_arch.txt lib/go/src/cmd/go/testdata/script/build_dash_n_cgo.txt lib/go/src/cmd/go/testdata/script/build_dash_o_dev_null.txt @@ -1989,6 +1990,7 @@ lib/go/src/cmd/go/testdata/script/fileline.txt lib/go/src/cmd/go/testdata/script/fmt_load_errors.txt lib/go/src/cmd/go/testdata/script/fsys_walk.txt lib/go/src/cmd/go/testdata/script/gccgo_link_c.txt +lib/go/src/cmd/go/testdata/script/gccgo_link_ldflags.txt lib/go/src/cmd/go/testdata/script/gccgo_m.txt lib/go/src/cmd/go/testdata/script/gccgo_mangle.txt lib/go/src/cmd/go/testdata/script/gcflags_patterns.txt @@ -2073,6 +2075,7 @@ lib/go/src/cmd/go/testdata/script/list_compiled_imports.txt lib/go/src/cmd/go/testdata/script/list_compiler_output.txt lib/go/src/cmd/go/testdata/script/list_constraints.txt lib/go/src/cmd/go/testdata/script/list_dedup_packages.txt +lib/go/src/cmd/go/testdata/script/list_empty_import.txt lib/go/src/cmd/go/testdata/script/list_err_cycle.txt lib/go/src/cmd/go/testdata/script/list_err_stack.txt lib/go/src/cmd/go/testdata/script/list_export_e.txt @@ -2353,6 +2356,7 @@ lib/go/src/cmd/go/testdata/script/mod_stale.txt lib/go/src/cmd/go/testdata/script/mod_std_vendor.txt lib/go/src/cmd/go/testdata/script/mod_string_alias.txt lib/go/src/cmd/go/testdata/script/mod_sum_ambiguous.txt +lib/go/src/cmd/go/testdata/script/mod_sum_issue56222.txt lib/go/src/cmd/go/testdata/script/mod_sum_lookup.txt lib/go/src/cmd/go/testdata/script/mod_sum_readonly.txt lib/go/src/cmd/go/testdata/script/mod_sum_replaced.txt @@ -2381,6 +2385,7 @@ lib/go/src/cmd/go/testdata/script/mod_tidy_downgrade_ambiguous.txt lib/go/src/cmd/go/testdata/script/mod_tidy_duplicates.txt lib/go/src/cmd/go/testdata/script/mod_tidy_error.txt lib/go/src/cmd/go/testdata/script/mod_tidy_indirect.txt +lib/go/src/cmd/go/testdata/script/mod_tidy_issue60313.txt lib/go/src/cmd/go/testdata/script/mod_tidy_lazy_self.txt lib/go/src/cmd/go/testdata/script/mod_tidy_newroot.txt lib/go/src/cmd/go/testdata/script/mod_tidy_old.txt @@ -6456,6 +6461,7 @@ lib/go/src/net/fd_windows.go lib/go/src/net/file_plan9.go lib/go/src/net/file_stub.go lib/go/src/net/file_test.go +lib/go/src/net/file_unix_test.go lib/go/src/net/file_unix.go lib/go/src/net/file_windows.go lib/go/src/net/file.go @@ -7314,10 +7320,8 @@ lib/go/src/runtime/export_debug_test.go lib/go/src/runtime/export_debuglog_test.go lib/go/src/runtime/export_linux_test.go lib/go/src/runtime/export_mmap_test.go -lib/go/src/runtime/export_openbsd_test.go lib/go/src/runtime/export_pipe_test.go lib/go/src/runtime/export_pipe2_test.go -lib/go/src/runtime/export_solaris_test.go lib/go/src/runtime/export_test.go lib/go/src/runtime/export_unix_test.go lib/go/src/runtime/export_unix2_test.go @@ -7524,8 +7528,6 @@ lib/go/src/runtime/msize.go lib/go/src/runtime/mspanset.go lib/go/src/runtime/mstats.go lib/go/src/runtime/mwbbuf.go -lib/go/src/runtime/nbpipe_fcntl_libc_test.go -lib/go/src/runtime/nbpipe_fcntl_unix_test.go lib/go/src/runtime/nbpipe_pipe_test.go lib/go/src/runtime/nbpipe_pipe.go lib/go/src/runtime/nbpipe_pipe2.go @@ -7771,6 +7773,12 @@ lib/go/src/runtime/runtime1.go lib/go/src/runtime/runtime2.go lib/go/src/runtime/rwmutex_test.go lib/go/src/runtime/rwmutex.go +lib/go/src/runtime/security_aix.go +lib/go/src/runtime/security_issetugid.go +lib/go/src/runtime/security_linux.go +lib/go/src/runtime/security_nonunix.go +lib/go/src/runtime/security_test.go +lib/go/src/runtime/security_unix.go lib/go/src/runtime/select.go lib/go/src/runtime/sema_test.go lib/go/src/runtime/sema.go @@ -8001,6 +8009,7 @@ lib/go/src/runtime/testdata/testprognet/main.go lib/go/src/runtime/testdata/testprognet/net.go lib/go/src/runtime/testdata/testprognet/signal.go lib/go/src/runtime/testdata/testprognet/signalexec.go +lib/go/src/runtime/testdata/testsuid/main.go lib/go/src/runtime/testdata/testwinlib/main.c lib/go/src/runtime/testdata/testwinlib/main.go lib/go/src/runtime/testdata/testwinlibsignal/dummy.go @@ -8008,6 +8017,8 @@ lib/go/src/runtime/testdata/testwinlibsignal/main.c lib/go/src/runtime/testdata/testwinlibthrow/main.go lib/go/src/runtime/testdata/testwinlibthrow/veh.c lib/go/src/runtime/testdata/testwinsignal/main.go +lib/go/src/runtime/testdata/testwintls/main.c +lib/go/src/runtime/testdata/testwintls/main.go lib/go/src/runtime/textflag.h lib/go/src/runtime/time_fake.go lib/go/src/runtime/time_linux_amd64.s @@ -11030,6 +11041,7 @@ lib/go/test/fixedbugs/issue5963.go lib/go/test/fixedbugs/issue6004.go lib/go/test/fixedbugs/issue6036.go lib/go/test/fixedbugs/issue6055.go +lib/go/test/fixedbugs/issue60601.go lib/go/test/fixedbugs/issue6131.go lib/go/test/fixedbugs/issue6140.go lib/go/test/fixedbugs/issue6247.go @@ -12954,10 +12966,12 @@ lib/go/VERSION @dir lib/go/src/runtime/testdata/testprogcgo/windows @dir lib/go/src/runtime/testdata/testprogcgo @dir lib/go/src/runtime/testdata/testprognet +@dir lib/go/src/runtime/testdata/testsuid @dir lib/go/src/runtime/testdata/testwinlib @dir lib/go/src/runtime/testdata/testwinlibsignal @dir lib/go/src/runtime/testdata/testwinlibthrow @dir lib/go/src/runtime/testdata/testwinsignal +@dir lib/go/src/runtime/testdata/testwintls @dir lib/go/src/runtime/testdata @dir lib/go/src/runtime/trace @dir lib/go/src/runtime diff --git a/net/powerdns-recursor/Makefile b/net/powerdns-recursor/Makefile new file mode 100644 index 00000000..05dfc971 --- /dev/null +++ b/net/powerdns-recursor/Makefile @@ -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 + +.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 +#EO diff --git a/net/powerdns-recursor/distinfo b/net/powerdns-recursor/distinfo new file mode 100644 index 00000000..7246b7b5 --- /dev/null +++ b/net/powerdns-recursor/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1681540073 +SHA256 (pdns-recursor-4.8.3.tar.bz2) = 37b91a5458c54411f4e38e2d1263ecf41e751e43c5fd66e813100d9978f02505 +SIZE (pdns-recursor-4.8.3.tar.bz2) = 1525607 diff --git a/net/powerdns-recursor/files/extrapatch-setuid b/net/powerdns-recursor/files/extrapatch-setuid new file mode 100644 index 00000000..73e728ea --- /dev/null +++ b/net/powerdns-recursor/files/extrapatch-setuid @@ -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! diff --git a/net/powerdns-recursor/files/patch-m4_pdns__check__libcrypto.m4 b/net/powerdns-recursor/files/patch-m4_pdns__check__libcrypto.m4 new file mode 100644 index 00000000..7d4a832a --- /dev/null +++ b/net/powerdns-recursor/files/patch-m4_pdns__check__libcrypto.m4 @@ -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]) diff --git a/net/powerdns-recursor/files/patch-m4_pdns__with__lua.m4 b/net/powerdns-recursor/files/patch-m4_pdns__with__lua.m4 new file mode 100644 index 00000000..ca71a861 --- /dev/null +++ b/net/powerdns-recursor/files/patch-m4_pdns__with__lua.m4 @@ -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]) diff --git a/net/powerdns-recursor/files/patch-rec-main.cc b/net/powerdns-recursor/files/patch-rec-main.cc new file mode 100644 index 00000000..d233469d --- /dev/null +++ b/net/powerdns-recursor/files/patch-rec-main.cc @@ -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"; diff --git a/net/powerdns-recursor/files/pdns-recursor.in b/net/powerdns-recursor/files/pdns-recursor.in new file mode 100644 index 00000000..8c3310be --- /dev/null +++ b/net/powerdns-recursor/files/pdns-recursor.in @@ -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="" +# +# 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" diff --git a/net/powerdns-recursor/files/pkg-deinstall.in b/net/powerdns-recursor/files/pkg-deinstall.in new file mode 100644 index 00000000..fc010d1e --- /dev/null +++ b/net/powerdns-recursor/files/pkg-deinstall.in @@ -0,0 +1,12 @@ +#!/bin/sh + +set -x + +case $2 in + DEINSTALL) + ;; + POST-DEINSTALL) + ;; +esac +exit 0 +#EOF diff --git a/net/powerdns-recursor/files/pkg-install.in b/net/powerdns-recursor/files/pkg-install.in new file mode 100644 index 00000000..67b269f1 --- /dev/null +++ b/net/powerdns-recursor/files/pkg-install.in @@ -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 diff --git a/net/powerdns-recursor/files/pkg-message.in b/net/powerdns-recursor/files/pkg-message.in new file mode 100644 index 00000000..a5480fd5 --- /dev/null +++ b/net/powerdns-recursor/files/pkg-message.in @@ -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. +******************************************************************* + diff --git a/net/powerdns-recursor/files/recursor.conf b/net/powerdns-recursor/files/recursor.conf new file mode 100644 index 00000000..1f97174f --- /dev/null +++ b/net/powerdns-recursor/files/recursor.conf @@ -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 + + diff --git a/net/powerdns-recursor/pkg-descr b/net/powerdns-recursor/pkg-descr new file mode 100644 index 00000000..00d927a7 --- /dev/null +++ b/net/powerdns-recursor/pkg-descr @@ -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 diff --git a/net/powerdns-recursor/pkg-plist b/net/powerdns-recursor/pkg-plist new file mode 100644 index 00000000..f046d90c --- /dev/null +++ b/net/powerdns-recursor/pkg-plist @@ -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 diff --git a/net/powerdns/Makefile b/net/powerdns/Makefile new file mode 100644 index 00000000..7564be61 --- /dev/null +++ b/net/powerdns/Makefile @@ -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 +#EOF \ No newline at end of file diff --git a/net/powerdns/distinfo b/net/powerdns/distinfo new file mode 100644 index 00000000..c779929e --- /dev/null +++ b/net/powerdns/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1680689796 +SHA256 (pdns-4.7.3.tar.bz2) = 8bad351b2e09426f6d4fb0346881a5155fe555497c3d85071e531e7c7afe3e76 +SIZE (pdns-4.7.3.tar.bz2) = 1353333 diff --git a/net/powerdns/files/pdns.conf b/net/powerdns/files/pdns.conf new file mode 100644 index 00000000..82ef825a --- /dev/null +++ b/net/powerdns/files/pdns.conf @@ -0,0 +1,1827 @@ +# Autogenerated configuration file template +################################# +# allow-axfr-ips Allow zonetransfers only to these subnets +# +# allow-axfr-ips=127.0.0.0/8,::1 + +################################# +# allow-dnsupdate-from A global setting to allow DNS updates from these IP ranges. +# +# allow-dnsupdate-from=127.0.0.0/8,::1 + +################################# +# allow-recursion List of subnets that are allowed to recurse +# +# allow-recursion=0.0.0.0/0 + +################################# +# also-notify When notifying a domain, also notify these nameservers +# +# also-notify= + +################################# +# any-to-tcp Answer ANY queries with tc=1, shunting to TCP +# +# any-to-tcp=no + +################################# +# bind-check-interval Interval for zonefile changes +# +# bind-check-interval=0 + +################################# +# bind-config Location of named.conf +# +# bind-config= + +################################# +# bind-dnssec-db Filename to store & access our DNSSEC metadatabase, empty for none +# +# bind-dnssec-db= + +################################# +# bind-hybrid Store DNSSEC metadata in other backend +# +# bind-hybrid=no + +################################# +# bind-ignore-broken-records Ignore records that are out-of-bound for the zone. +# +# bind-ignore-broken-records=no + +################################# +# bind-supermaster-config Location of (part of) named.conf where pdns can write zone-statements to +# +# bind-supermaster-config= + +################################# +# bind-supermaster-destdir Destination directory for newly added slave zones +# +# bind-supermaster-destdir=/usr/local/etc/pdns + +################################# +# bind-supermasters List of IP-addresses of supermasters +# +# bind-supermasters= + +################################# +# cache-ttl Seconds to store packets in the PacketCache +# +# cache-ttl=20 + +################################# +# 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 If set, chroot to this directory for more security +# +# chroot= + +################################# +# config-dir Location of configuration directory (pdns.conf) +# +# config-dir=/usr/local/etc/pdns + +################################# +# 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=no + +################################# +# default-ksk-algorithms Default KSK algorithms +# +# default-ksk-algorithms=rsasha256 + +################################# +# default-ksk-size Default KSK size (0 means default) +# +# default-ksk-size=0 + +################################# +# default-soa-mail mail address to insert in the SOA record if none set in the backend +# +# default-soa-mail= + +################################# +# 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 + +################################# +# default-zsk-algorithms Default ZSK algorithms +# +# default-zsk-algorithms=rsasha256 + +################################# +# default-zsk-size Default ZSK size (0 means default) +# +# default-zsk-size=0 + +################################# +# direct-dnskey Fetch DNSKEY RRs from backend during DNSKEY synthesis +# +# direct-dnskey=no + +################################# +# disable-axfr Disable zonetransfers but do allow TCP queries +# +# disable-axfr=no + +################################# +# disable-axfr-rectify Disable the rectify step during an outgoing AXFR. Only required for regression testing. +# +# disable-axfr-rectify=no + +################################# +# disable-tcp Do not listen to TCP queries +# +# disable-tcp=no + +################################# +# distributor-threads Default number of Distributor (backend) threads to start +# +# distributor-threads=3 + +################################# +# do-ipv6-additional-processing Do AAAA additional processing +# +# do-ipv6-additional-processing=yes + +################################# +# edns-subnet-processing If we should act on EDNS Subnet options +# +# edns-subnet-processing=no + +################################# +# entropy-source If set, read entropy from this file +# +# entropy-source=/dev/urandom + +################################# +# experimental-api-readonly If the JSON API should disallow data modification +# +# experimental-api-readonly=no + +################################# +# experimental-dname-processing If we should support DNAME records +# +# experimental-dname-processing=no + +################################# +# experimental-dnsupdate Enable/Disable DNS update (RFC2136) support. Default is no. +# +# experimental-dnsupdate=no + +################################# +# experimental-json-interface If the webserver should serve JSON data +# +# experimental-json-interface=no + +################################# +# experimental-logfile Filename of the log file for JSON parser +# +# experimental-logfile=/var/log/pdns.log + +################################# +# forward-dnsupdate A global setting to allow DNS update packages that are for a Slave domain, to be forwarded to the master. +# +# forward-dnsupdate=yes + +################################# +# geo-ip-map-zonefile path to the rbldnsd format zonefile +# +# geo-ip-map-zonefile=zz.countries.nerd.dk.rbldnsd + +################################# +# geo-maps list of paths to director maps or directories containing director map files +# +# geo-maps= + +################################# +# geo-ns-records targets of the NS records, comma separated. +# +# geo-ns-records= + +################################# +# geo-ns-ttl TTL value for NS records +# +# geo-ns-ttl=86400 + +################################# +# geo-soa-values values of the SOA master nameserver and hostmaster fields, comma separated +# +# geo-soa-values= + +################################# +# geo-ttl TTL value for geo records +# +# geo-ttl=3600 + +################################# +# geo-zone zonename to be served +# +# geo-zone= + +################################# +# geoip-database-cache Cache mode (standard, memory, index, mmap) +# +# geoip-database-cache=standard + +################################# +# geoip-database-file File to load IPv4 geoip data from +# +# geoip-database-file=/usr/share/GeoIP/GeoIP.dat + +################################# +# geoip-database-file6 File to load IPv6 geoip data from +# +# geoip-database-file6=/usr/share/GeoIP/GeoIPv6.dat + +################################# +# geoip-dnssec-keydir Directory to hold dnssec keys (also turns DNSSEC on) +# +# geoip-dnssec-keydir= + +################################# +# geoip-zones-file YAML file to load zone(s) configuration +# +# geoip-zones-file= + +################################# +# gmysql-activate-domain-key-query +# +# gmysql-activate-domain-key-query=update cryptokeys set active=1 where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d + +################################# +# gmysql-add-domain-key-query +# +# gmysql-add-domain-key-query=insert into cryptokeys (domain_id, flags, active, content) select id, %d, %d, '%s' from domains where name='%s' + +################################# +# gmysql-any-id-query Any with ID query +# +# gmysql-any-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='%s' and domain_id=%d + +################################# +# gmysql-any-query Any query +# +# gmysql-any-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='%s' + +################################# +# gmysql-basic-query Basic query +# +# gmysql-basic-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='%s' and name='%s' + +################################# +# gmysql-clear-domain-all-keys-query +# +# gmysql-clear-domain-all-keys-query=delete from cryptokeys where domain_id=(select id from domains where name='%s') + +################################# +# gmysql-clear-domain-all-metadata-query +# +# gmysql-clear-domain-all-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name='%s') + +################################# +# gmysql-clear-domain-metadata-query +# +# gmysql-clear-domain-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name='%s') and domainmetadata.kind='%s' + +################################# +# gmysql-dbname Pdns backend database name to connect to +# +# gmysql-dbname=powerdns + +################################# +# gmysql-deactivate-domain-key-query +# +# gmysql-deactivate-domain-key-query=update cryptokeys set active=0 where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d + +################################# +# gmysql-delete-comment-rrset-query +# +# gmysql-delete-comment-rrset-query=DELETE FROM comments WHERE domain_id=%d AND name='%s' AND type='%s' + +################################# +# gmysql-delete-comments-query +# +# gmysql-delete-comments-query=DELETE FROM comments WHERE domain_id=%d + +################################# +# gmysql-delete-domain-query +# +# gmysql-delete-domain-query=delete from domains where name='%s' + +################################# +# gmysql-delete-empty-non-terminal-query delete empty non-terminal from zone +# +# gmysql-delete-empty-non-terminal-query=delete from records where domain_id='%d' and name='%s' and type is null + +################################# +# gmysql-delete-names-query +# +# gmysql-delete-names-query=delete from records where domain_id = %d and name='%s' + +################################# +# gmysql-delete-rrset-query +# +# gmysql-delete-rrset-query=delete from records where domain_id=%d and name='%s' and type='%s' + +################################# +# gmysql-delete-tsig-key-query +# +# gmysql-delete-tsig-key-query=delete from tsigkeys where name='%s' + +################################# +# gmysql-delete-zone-query +# +# gmysql-delete-zone-query=delete from records where domain_id=%d + +################################# +# gmysql-dnssec Enable DNSSEC processing +# +# gmysql-dnssec=no + +################################# +# gmysql-get-all-domain-metadata-query +# +# gmysql-get-all-domain-metadata-query=select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='%s' + +################################# +# gmysql-get-all-domains-query Retrieve all domains +# +# gmysql-get-all-domains-query=select domains.id, domains.name, records.content, domains.type, domains.master, domains.notified_serial, domains.last_check from domains LEFT JOIN records ON records.domain_id=domains.id AND records.type='SOA' AND records.name=domains.name WHERE records.disabled=0 OR %d + +################################# +# gmysql-get-domain-metadata-query +# +# gmysql-get-domain-metadata-query=select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='%s' and domainmetadata.kind='%s' + +################################# +# gmysql-get-order-after-query DNSSEC Ordering Query, after +# +# gmysql-get-order-after-query=select min(ordername) from records where ordername > '%s' and domain_id=%d and disabled=0 and ordername is not null + +################################# +# gmysql-get-order-before-query DNSSEC Ordering Query, before +# +# gmysql-get-order-before-query=select ordername, name from records where ordername <= '%s' and domain_id=%d and disabled=0 and ordername is not null order by 1 desc limit 1 + +################################# +# gmysql-get-order-first-query DNSSEC Ordering Query, first +# +# gmysql-get-order-first-query=select ordername, name from records where domain_id=%d and disabled=0 and ordername is not null order by 1 asc limit 1 + +################################# +# gmysql-get-order-last-query DNSSEC Ordering Query, last +# +# gmysql-get-order-last-query=select ordername, name from records where ordername != '' and domain_id=%d and disabled=0 and ordername is not null order by 1 desc limit 1 + +################################# +# gmysql-get-tsig-key-query +# +# gmysql-get-tsig-key-query=select algorithm, secret from tsigkeys where name='%s' + +################################# +# gmysql-get-tsig-keys-query +# +# gmysql-get-tsig-keys-query=select name,algorithm, secret from tsigkeys + +################################# +# gmysql-group Pdns backend MySQL 'group' to connect as +# +# gmysql-group=client + +################################# +# gmysql-host Database backend host to connect to +# +# gmysql-host= + +################################# +# gmysql-id-query Basic with ID query +# +# gmysql-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='%s' and name='%s' and domain_id=%d + +################################# +# gmysql-info-all-master-query +# +# gmysql-info-all-master-query=select id,name,master,last_check,notified_serial,type from domains where type='MASTER' + +################################# +# gmysql-info-all-slaves-query +# +# gmysql-info-all-slaves-query=select id,name,master,last_check,type from domains where type='SLAVE' + +################################# +# gmysql-info-zone-query +# +# gmysql-info-zone-query=select id,name,master,last_check,notified_serial,type from domains where name='%s' + +################################# +# gmysql-innodb-read-committed Use InnoDB READ-COMMITTED transaction isolation level +# +# gmysql-innodb-read-committed=yes + +################################# +# gmysql-insert-comment-query +# +# gmysql-insert-comment-query=INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (%d, '%s', '%s', %d, '%s', '%s') + +################################# +# gmysql-insert-empty-non-terminal-query insert empty non-terminal in zone +# +# gmysql-insert-empty-non-terminal-query=insert into records (domain_id,name,type,disabled,auth) values ('%d','%s',null,0,'1') + +################################# +# gmysql-insert-ent-order-query insert empty non-terminal in zone +# +# gmysql-insert-ent-order-query=insert into records (type,domain_id,disabled,name,ordername,auth) values (null,'%d',0,'%s','%s','%d') + +################################# +# gmysql-insert-ent-query insert empty non-terminal in zone +# +# gmysql-insert-ent-query=insert into records (type,domain_id,disabled,name,auth) values (null,'%d',0,'%s','%d') + +################################# +# gmysql-insert-record-order-query +# +# gmysql-insert-record-order-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,ordername,auth) values ('%s',%d,%d,'%s',%d,%d,'%s','%s','%d') + +################################# +# gmysql-insert-record-query +# +# gmysql-insert-record-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,auth) values ('%s',%d,%d,'%s',%d,%d,'%s','%d') + +################################# +# gmysql-insert-slave-query +# +# gmysql-insert-slave-query=insert into domains (type,name,master,account) values('SLAVE','%s','%s','%s') + +################################# +# gmysql-insert-zone-query +# +# gmysql-insert-zone-query=insert into domains (type,name) values('NATIVE','%s') + +################################# +# gmysql-list-comments-query +# +# gmysql-list-comments-query=SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE domain_id=%d + +################################# +# gmysql-list-domain-keys-query +# +# gmysql-list-domain-keys-query=select cryptokeys.id, flags, active, content from domains, cryptokeys where cryptokeys.domain_id=domains.id and name='%s' + +################################# +# gmysql-list-query AXFR query +# +# gmysql-list-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE (disabled=0 OR %d) and domain_id='%d' order by name, type + +################################# +# gmysql-list-subzone-query Subzone listing +# +# gmysql-list-subzone-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and (name='%s' OR name like '%s') and domain_id='%d' + +################################# +# gmysql-master-zone-query Data +# +# gmysql-master-zone-query=select master from domains where name='%s' and type='SLAVE' + +################################# +# gmysql-nullify-ordername-and-auth-query DNSSEC nullify ordername and auth query +# +# gmysql-nullify-ordername-and-auth-query=update records set ordername=NULL,auth=0 where name='%s' and type='%s' and domain_id='%d' and disabled=0 + +################################# +# gmysql-nullify-ordername-and-update-auth-query DNSSEC nullify ordername and update auth query +# +# gmysql-nullify-ordername-and-update-auth-query=update records set ordername=NULL,auth=%d where domain_id='%d' and name='%s' and disabled=0 + +################################# +# gmysql-password Pdns backend password to connect with +# +# gmysql-password= + +################################# +# gmysql-port Database backend port to connect to +# +# gmysql-port=0 + +################################# +# gmysql-remove-domain-key-query +# +# gmysql-remove-domain-key-query=delete from cryptokeys where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d + +################################# +# gmysql-remove-empty-non-terminals-from-zone-query remove all empty non-terminals from zone +# +# gmysql-remove-empty-non-terminals-from-zone-query=delete from records where domain_id='%d' and type is null + +################################# +# gmysql-set-auth-on-ds-record-query DNSSEC set auth on a DS record +# +# gmysql-set-auth-on-ds-record-query=update records set auth=1 where domain_id='%d' and name='%s' and type='DS' and disabled=0 + +################################# +# gmysql-set-domain-metadata-query +# +# gmysql-set-domain-metadata-query=insert into domainmetadata (domain_id, kind, content) select id, '%s', '%s' from domains where name='%s' + +################################# +# gmysql-set-order-and-auth-query DNSSEC set ordering query +# +# gmysql-set-order-and-auth-query=update records set ordername='%s',auth=%d where name='%s' and domain_id='%d' and disabled=0 + +################################# +# gmysql-set-tsig-key-query +# +# gmysql-set-tsig-key-query=replace into tsigkeys (name,algorithm,secret) values('%s','%s','%s') + +################################# +# gmysql-socket Pdns backend socket to connect to +# +# gmysql-socket= + +################################# +# gmysql-supermaster-name-to-ips +# +# gmysql-supermaster-name-to-ips=select ip,account from supermasters where nameserver='%s' and account='%s' + +################################# +# gmysql-supermaster-query +# +# gmysql-supermaster-query=select account from supermasters where ip='%s' and nameserver='%s' + +################################# +# gmysql-update-kind-query +# +# gmysql-update-kind-query=update domains set type='%s' where name='%s' + +################################# +# gmysql-update-lastcheck-query +# +# gmysql-update-lastcheck-query=update domains set last_check=%d where id=%d + +################################# +# gmysql-update-master-query +# +# gmysql-update-master-query=update domains set master='%s' where name='%s' + +################################# +# gmysql-update-serial-query +# +# gmysql-update-serial-query=update domains set notified_serial=%d where id=%d + +################################# +# gmysql-user Database backend user to connect as +# +# gmysql-user=powerdns + +################################# +# gmysql-zone-lastchange-query +# +# gmysql-zone-lastchange-query=select max(change_date) from records where domain_id=%d + +################################# +# gpgsql-activate-domain-key-query +# +# gpgsql-activate-domain-key-query=update cryptokeys set active=true where domain_id=(select id from domains where name=E'%s') and cryptokeys.id=%d + +################################# +# gpgsql-add-domain-key-query +# +# gpgsql-add-domain-key-query=insert into cryptokeys (domain_id, flags, active, content) select id, %d, (%d = 1), '%s' from domains where name=E'%s' + +################################# +# gpgsql-any-id-query Any with ID query +# +# gpgsql-any-id-query=SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE disabled=false and name=E'%s' and domain_id=%d + +################################# +# gpgsql-any-query Any query +# +# gpgsql-any-query=SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE disabled=false and name=E'%s' + +################################# +# gpgsql-basic-query Basic query +# +# gpgsql-basic-query=SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE disabled=false and type='%s' and name=E'%s' + +################################# +# gpgsql-clear-domain-all-keys-query +# +# gpgsql-clear-domain-all-keys-query=delete from cryptokeys where domain_id=(select id from domains where name=E'%s') + +################################# +# gpgsql-clear-domain-all-metadata-query +# +# gpgsql-clear-domain-all-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name=E'%s') + +################################# +# gpgsql-clear-domain-metadata-query +# +# gpgsql-clear-domain-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name=E'%s') and domainmetadata.kind=E'%s' + +################################# +# gpgsql-dbname Pdns backend database name to connect to +# +# gpgsql-dbname= + +################################# +# gpgsql-deactivate-domain-key-query +# +# gpgsql-deactivate-domain-key-query=update cryptokeys set active=false where domain_id=(select id from domains where name=E'%s') and cryptokeys.id=%d + +################################# +# gpgsql-delete-comment-rrset-query +# +# gpgsql-delete-comment-rrset-query=DELETE FROM comments WHERE domain_id=%d AND name=E'%s' AND type=E'%s' + +################################# +# gpgsql-delete-comments-query +# +# gpgsql-delete-comments-query=DELETE FROM comments WHERE domain_id=%d + +################################# +# gpgsql-delete-domain-query +# +# gpgsql-delete-domain-query=delete from domains where name=E'%s' + +################################# +# gpgsql-delete-empty-non-terminal-query delete empty non-terminal from zone +# +# gpgsql-delete-empty-non-terminal-query=delete from records where domain_id='%d' and name='%s' and type is null + +################################# +# gpgsql-delete-names-query +# +# gpgsql-delete-names-query=delete from records where domain_id=%d and name=E'%s' + +################################# +# gpgsql-delete-rrset-query +# +# gpgsql-delete-rrset-query=delete from records where domain_id=%d and name=E'%s' and type=E'%s' + +################################# +# gpgsql-delete-tsig-key-query +# +# gpgsql-delete-tsig-key-query=delete from tsigkeys where name='%s' + +################################# +# gpgsql-delete-zone-query +# +# gpgsql-delete-zone-query=delete from records where domain_id=%d + +################################# +# gpgsql-dnssec Enable DNSSEC processing +# +# gpgsql-dnssec=no + +################################# +# gpgsql-get-all-domain-metadata-query +# +# gpgsql-get-all-domain-metadata-query=select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=E'%s' + +################################# +# gpgsql-get-all-domains-query Retrieve all domains +# +# gpgsql-get-all-domains-query=select domains.id, domains.name, records.content, domains.type, domains.master, domains.notified_serial, domains.last_check from domains LEFT JOIN records ON records.domain_id=domains.id AND records.type='SOA' AND records.name=domains.name WHERE records.disabled=false OR %d::bool + +################################# +# gpgsql-get-domain-metadata-query +# +# gpgsql-get-domain-metadata-query=select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name=E'%s' and domainmetadata.kind=E'%s' + +################################# +# gpgsql-get-order-after-query DNSSEC Ordering Query, after +# +# gpgsql-get-order-after-query=select ordername from records where disabled=false and ordername ~>~ E'%s' and domain_id=%d and ordername is not null order by 1 using ~<~ limit 1 + +################################# +# gpgsql-get-order-before-query DNSSEC Ordering Query, before +# +# gpgsql-get-order-before-query=select ordername, name from records where disabled=false and ordername ~<=~ E'%s' and domain_id=%d and ordername is not null order by 1 using ~>~ limit 1 + +################################# +# gpgsql-get-order-first-query DNSSEC Ordering Query, last +# +# gpgsql-get-order-first-query=select ordername, name from records where disabled=false and domain_id=%d and ordername is not null order by 1 using ~<~ limit 1 + +################################# +# gpgsql-get-order-last-query DNSSEC Ordering Query, last +# +# gpgsql-get-order-last-query=select ordername, name from records where disabled=false and ordername != '' and domain_id=%d and ordername is not null order by 1 using ~>~ limit 1 + +################################# +# gpgsql-get-tsig-key-query +# +# gpgsql-get-tsig-key-query=select algorithm, secret from tsigkeys where name=E'%s' + +################################# +# gpgsql-get-tsig-keys-query +# +# gpgsql-get-tsig-keys-query=select name,algorithm, secret from tsigkeys + +################################# +# gpgsql-host Pdns backend host to connect to +# +# gpgsql-host= + +################################# +# gpgsql-id-query Basic with ID query +# +# gpgsql-id-query=SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE disabled=false and type='%s' and name=E'%s' and domain_id=%d + +################################# +# gpgsql-info-all-master-query +# +# gpgsql-info-all-master-query=select id,name,master,last_check,notified_serial,type from domains where type='MASTER' + +################################# +# gpgsql-info-all-slaves-query +# +# gpgsql-info-all-slaves-query=select id,name,master,last_check,type from domains where type='SLAVE' + +################################# +# gpgsql-info-zone-query +# +# gpgsql-info-zone-query=select id,name,master,last_check,notified_serial,type from domains where name=E'%s' + +################################# +# gpgsql-insert-comment-query +# +# gpgsql-insert-comment-query=INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (%d, E'%s', E'%s', %d, E'%s', E'%s') + +################################# +# gpgsql-insert-empty-non-terminal-query insert empty non-terminal in zone +# +# gpgsql-insert-empty-non-terminal-query=insert into records (domain_id,name,type,disabled,auth) values ('%d','%s',null,false,true) + +################################# +# gpgsql-insert-ent-order-query insert empty non-terminal in zone +# +# gpgsql-insert-ent-order-query=insert into records (type,domain_id,disabled,name,ordername,auth) values (null,'%d',false,E'%s',E'%s','%d') + +################################# +# gpgsql-insert-ent-query insert empty non-terminal in zone +# +# gpgsql-insert-ent-query=insert into records (type,domain_id,disabled,name,auth) values (null,'%d',false,E'%s','%d') + +################################# +# gpgsql-insert-record-order-query +# +# gpgsql-insert-record-order-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,ordername,auth) values (E'%s',%d,%d,'%s',%d,%d::bool,E'%s',E'%s','%d') + +################################# +# gpgsql-insert-record-query +# +# gpgsql-insert-record-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,auth) values (E'%s',%d,%d,'%s',%d,%d::bool,E'%s','%d') + +################################# +# gpgsql-insert-slave-query +# +# gpgsql-insert-slave-query=insert into domains (type,name,master,account) values('SLAVE',E'%s',E'%s',E'%s') + +################################# +# gpgsql-insert-zone-query +# +# gpgsql-insert-zone-query=insert into domains (type,name) values('NATIVE',E'%s') + +################################# +# gpgsql-list-comments-query +# +# gpgsql-list-comments-query=SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE domain_id=%d + +################################# +# gpgsql-list-domain-keys-query +# +# gpgsql-list-domain-keys-query=select cryptokeys.id, flags, case when active then 1 else 0 end as active, content from domains, cryptokeys where cryptokeys.domain_id=domains.id and name=E'%s' + +################################# +# gpgsql-list-query AXFR query +# +# gpgsql-list-query=SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE (disabled=false OR %d::bool) and domain_id='%d' order by name, type + +################################# +# gpgsql-list-subzone-query Subzone listing +# +# gpgsql-list-subzone-query=SELECT content,ttl,prio,type,domain_id,disabled::int,name,auth::int FROM records WHERE disabled=false and (name=E'%s' OR name like E'%s') and domain_id='%d' + +################################# +# gpgsql-master-zone-query Data +# +# gpgsql-master-zone-query=select master from domains where name=E'%s' and type='SLAVE' + +################################# +# gpgsql-nullify-ordername-and-auth-query DNSSEC nullify ordername and auth query +# +# gpgsql-nullify-ordername-and-auth-query=update records set ordername=NULL,auth=false where name=E'%s' and type=E'%s' and domain_id='%d' and disabled=false + +################################# +# gpgsql-nullify-ordername-and-update-auth-query DNSSEC nullify ordername and update auth query +# +# gpgsql-nullify-ordername-and-update-auth-query=update records set ordername=NULL,auth=%d::bool where domain_id='%d' and name='%s' and disabled=false + +################################# +# gpgsql-password Pdns backend password to connect with +# +# gpgsql-password= + +################################# +# gpgsql-port Database backend port to connect to +# +# gpgsql-port= + +################################# +# gpgsql-remove-domain-key-query +# +# gpgsql-remove-domain-key-query=delete from cryptokeys where domain_id=(select id from domains where name=E'%s') and cryptokeys.id=%d + +################################# +# gpgsql-remove-empty-non-terminals-from-zone-query remove all empty non-terminals from zone +# +# gpgsql-remove-empty-non-terminals-from-zone-query=delete from records where domain_id='%d' and type is null + +################################# +# gpgsql-set-auth-on-ds-record-query DNSSEC set auth on a DS record +# +# gpgsql-set-auth-on-ds-record-query=update records set auth=true where domain_id='%d' and name='%s' and type='DS' and disabled=false + +################################# +# gpgsql-set-domain-metadata-query +# +# gpgsql-set-domain-metadata-query=insert into domainmetadata (domain_id, kind, content) select id, '%s', '%s' from domains where name=E'%s' + +################################# +# gpgsql-set-order-and-auth-query DNSSEC set ordering query +# +# gpgsql-set-order-and-auth-query=update records set ordername=E'%s',auth=%d::bool where name=E'%s' and domain_id='%d' and disabled=false + +################################# +# gpgsql-set-tsig-key-query +# +# gpgsql-set-tsig-key-query=insert into tsigkeys (name,algorithm,secret) values('%s','%s','%s') + +################################# +# gpgsql-supermaster-name-to-ips +# +# gpgsql-supermaster-name-to-ips=select ip,account from supermasters where nameserver=E'%s' and account=E'%s' + +################################# +# gpgsql-supermaster-query +# +# gpgsql-supermaster-query=select account from supermasters where ip='%s' and nameserver=E'%s' + +################################# +# gpgsql-update-kind-query +# +# gpgsql-update-kind-query=update domains set type='%s' where name='%s' + +################################# +# gpgsql-update-lastcheck-query +# +# gpgsql-update-lastcheck-query=update domains set last_check=%d where id=%d + +################################# +# gpgsql-update-master-query +# +# gpgsql-update-master-query=update domains set master='%s' where name='%s' + +################################# +# gpgsql-update-serial-query +# +# gpgsql-update-serial-query=update domains set notified_serial=%d where id=%d + +################################# +# gpgsql-user Pdns backend user to connect as +# +# gpgsql-user= + +################################# +# gpgsql-zone-lastchange-query +# +# gpgsql-zone-lastchange-query=select max(change_date) from records where domain_id=%d + +################################# +# gsqlite3-activate-domain-key-query +# +# gsqlite3-activate-domain-key-query=update cryptokeys set active=1 where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d + +################################# +# gsqlite3-add-domain-key-query +# +# gsqlite3-add-domain-key-query=insert into cryptokeys (domain_id, flags, active, content) select id, %d, %d, '%s' from domains where name='%s' + +################################# +# gsqlite3-any-id-query Any with ID query +# +# gsqlite3-any-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='%s' and domain_id=%d + +################################# +# gsqlite3-any-query Any query +# +# gsqlite3-any-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and name='%s' + +################################# +# gsqlite3-basic-query Basic query +# +# gsqlite3-basic-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='%s' and name='%s' + +################################# +# gsqlite3-clear-domain-all-keys-query +# +# gsqlite3-clear-domain-all-keys-query=delete from cryptokeys where domain_id=(select id from domains where name='%s') + +################################# +# gsqlite3-clear-domain-all-metadata-query +# +# gsqlite3-clear-domain-all-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name='%s') + +################################# +# gsqlite3-clear-domain-metadata-query +# +# gsqlite3-clear-domain-metadata-query=delete from domainmetadata where domain_id=(select id from domains where name='%s') and domainmetadata.kind='%s' + +################################# +# gsqlite3-database Filename of the SQLite3 database +# +# gsqlite3-database=powerdns.sqlite + +################################# +# gsqlite3-deactivate-domain-key-query +# +# gsqlite3-deactivate-domain-key-query=update cryptokeys set active=0 where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d + +################################# +# gsqlite3-delete-comment-rrset-query +# +# gsqlite3-delete-comment-rrset-query=DELETE FROM comments WHERE domain_id=%d AND name='%s' AND type='%s' + +################################# +# gsqlite3-delete-comments-query +# +# gsqlite3-delete-comments-query=DELETE FROM comments WHERE domain_id=%d + +################################# +# gsqlite3-delete-domain-query +# +# gsqlite3-delete-domain-query=delete from domains where name='%s' + +################################# +# gsqlite3-delete-empty-non-terminal-query delete empty non-terminal from zone +# +# gsqlite3-delete-empty-non-terminal-query=delete from records where domain_id='%d' and name='%s' and type is null + +################################# +# gsqlite3-delete-names-query +# +# gsqlite3-delete-names-query=delete from records where domain_id = %d and name='%s' + +################################# +# gsqlite3-delete-rrset-query +# +# gsqlite3-delete-rrset-query=delete from records where domain_id = %d and name='%s' and type='%s' + +################################# +# gsqlite3-delete-tsig-key-query +# +# gsqlite3-delete-tsig-key-query=delete from tsigkeys where name='%s' + +################################# +# gsqlite3-delete-zone-query +# +# gsqlite3-delete-zone-query=delete from records where domain_id=%d + +################################# +# gsqlite3-dnssec Enable DNSSEC processing +# +# gsqlite3-dnssec=no + +################################# +# gsqlite3-get-all-domain-metadata-query +# +# gsqlite3-get-all-domain-metadata-query=select kind,content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='%s' + +################################# +# gsqlite3-get-all-domains-query Retrieve all domains +# +# gsqlite3-get-all-domains-query=select domains.id, domains.name, records.content, domains.type, domains.master, domains.notified_serial, domains.last_check from domains LEFT JOIN records ON records.domain_id=domains.id AND records.type='SOA' AND records.name=domains.name WHERE records.disabled=0 OR %d + +################################# +# gsqlite3-get-domain-metadata-query +# +# gsqlite3-get-domain-metadata-query=select content from domains, domainmetadata where domainmetadata.domain_id=domains.id and name='%s' and domainmetadata.kind='%s' + +################################# +# gsqlite3-get-order-after-query DNSSEC Ordering Query, after +# +# gsqlite3-get-order-after-query=select min(ordername) from records where disabled=0 and ordername > '%s' and domain_id=%d and ordername is not null + +################################# +# gsqlite3-get-order-before-query DNSSEC Ordering Query, before +# +# gsqlite3-get-order-before-query=select ordername, name from records where disabled=0 and ordername <= '%s' and domain_id=%d and ordername is not null order by 1 desc limit 1 + +################################# +# gsqlite3-get-order-first-query DNSSEC Ordering Query, first +# +# gsqlite3-get-order-first-query=select ordername, name from records where disabled=0 and domain_id=%d and ordername is not null order by 1 asc limit 1 + +################################# +# gsqlite3-get-order-last-query DNSSEC Ordering Query, last +# +# gsqlite3-get-order-last-query=select ordername, name from records where disabled=0 and ordername != '' and domain_id=%d and ordername is not null order by 1 desc limit 1 + +################################# +# gsqlite3-get-tsig-key-query +# +# gsqlite3-get-tsig-key-query=select algorithm, secret from tsigkeys where name='%s' + +################################# +# gsqlite3-get-tsig-keys-query +# +# gsqlite3-get-tsig-keys-query=select name,algorithm, secret from tsigkeys + +################################# +# gsqlite3-id-query Basic with ID query +# +# gsqlite3-id-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and type='%s' and name='%s' and domain_id=%d + +################################# +# gsqlite3-info-all-master-query +# +# gsqlite3-info-all-master-query=select id,name,master,last_check,notified_serial,type from domains where type='MASTER' + +################################# +# gsqlite3-info-all-slaves-query +# +# gsqlite3-info-all-slaves-query=select id,name,master,last_check,type from domains where type='SLAVE' + +################################# +# gsqlite3-info-zone-query +# +# gsqlite3-info-zone-query=select id,name,master,last_check,notified_serial,type from domains where name='%s' + +################################# +# gsqlite3-insert-comment-query +# +# gsqlite3-insert-comment-query=INSERT INTO comments (domain_id, name, type, modified_at, account, comment) VALUES (%d, '%s', '%s', %d, '%s', '%s') + +################################# +# gsqlite3-insert-empty-non-terminal-query insert empty non-terminal in zone +# +# gsqlite3-insert-empty-non-terminal-query=insert into records (domain_id,name,type,disabled,auth) values ('%d','%s',null,0,'1') + +################################# +# gsqlite3-insert-ent-order-query insert empty non-terminal in zone +# +# gsqlite3-insert-ent-order-query=insert into records (type,domain_id,disabled,name,ordername,auth) values (null,'%d',0,'%s','%s','%d') + +################################# +# gsqlite3-insert-ent-query insert empty non-terminal in zone +# +# gsqlite3-insert-ent-query=insert into records (type,domain_id,disabled,name,auth) values (null,'%d',0,'%s','%d') + +################################# +# gsqlite3-insert-record-order-query +# +# gsqlite3-insert-record-order-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,ordername,auth) values ('%s',%d,%d,'%s',%d,%d,'%s','%s','%d') + +################################# +# gsqlite3-insert-record-query +# +# gsqlite3-insert-record-query=insert into records (content,ttl,prio,type,domain_id,disabled,name,auth) values ('%s',%d,%d,'%s',%d,%d,'%s',%d) + +################################# +# gsqlite3-insert-slave-query +# +# gsqlite3-insert-slave-query=insert into domains (type,name,master,account) values('SLAVE','%s','%s','%s') + +################################# +# gsqlite3-insert-zone-query +# +# gsqlite3-insert-zone-query=insert into domains (type,name) values('NATIVE','%s') + +################################# +# gsqlite3-list-comments-query +# +# gsqlite3-list-comments-query=SELECT domain_id,name,type,modified_at,account,comment FROM comments WHERE domain_id=%d + +################################# +# gsqlite3-list-domain-keys-query +# +# gsqlite3-list-domain-keys-query=select cryptokeys.id, flags, active, content from domains, cryptokeys where cryptokeys.domain_id=domains.id and name='%s' + +################################# +# gsqlite3-list-query AXFR query +# +# gsqlite3-list-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE (disabled=0 OR %d) and domain_id='%d' order by name, type + +################################# +# gsqlite3-list-subzone-query Subzone listing +# +# gsqlite3-list-subzone-query=SELECT content,ttl,prio,type,domain_id,disabled,name,auth FROM records WHERE disabled=0 and (name='%s' OR name like '%s') and domain_id=%d + +################################# +# gsqlite3-master-zone-query Data +# +# gsqlite3-master-zone-query=select master from domains where name='%s' and type='SLAVE' + +################################# +# gsqlite3-nullify-ordername-and-auth-query DNSSEC nullify ordername and auth query +# +# gsqlite3-nullify-ordername-and-auth-query=update records set ordername=NULL,auth=0 where name='%s' and type='%s' and domain_id='%d' and disabled=0 + +################################# +# gsqlite3-nullify-ordername-and-update-auth-query DNSSEC nullify ordername and update auth query +# +# gsqlite3-nullify-ordername-and-update-auth-query=update records set ordername=NULL,auth=%d where domain_id='%d' and name='%s' and disabled=0 + +################################# +# gsqlite3-pragma-synchronous Set this to 0 for blazing speed +# +# gsqlite3-pragma-synchronous= + +################################# +# gsqlite3-remove-domain-key-query +# +# gsqlite3-remove-domain-key-query=delete from cryptokeys where domain_id=(select id from domains where name='%s') and cryptokeys.id=%d + +################################# +# gsqlite3-remove-empty-non-terminals-from-zone-query remove all empty non-terminals from zone +# +# gsqlite3-remove-empty-non-terminals-from-zone-query=delete from records where domain_id='%d' and type is null + +################################# +# gsqlite3-set-auth-on-ds-record-query DNSSEC set auth on a DS record +# +# gsqlite3-set-auth-on-ds-record-query=update records set auth=1 where domain_id='%d' and name='%s' and type='DS' and disabled=0 + +################################# +# gsqlite3-set-domain-metadata-query +# +# gsqlite3-set-domain-metadata-query=insert into domainmetadata (domain_id, kind, content) select id, '%s', '%s' from domains where name='%s' + +################################# +# gsqlite3-set-order-and-auth-query DNSSEC set ordering query +# +# gsqlite3-set-order-and-auth-query=update records set ordername='%s',auth=%d where name='%s' and domain_id='%d' and disabled=0 + +################################# +# gsqlite3-set-tsig-key-query +# +# gsqlite3-set-tsig-key-query=replace into tsigkeys (name,algorithm,secret) values('%s','%s','%s') + +################################# +# gsqlite3-supermaster-name-to-ips +# +# gsqlite3-supermaster-name-to-ips=select ip,account from supermasters where nameserver='%s' and account='%s' + +################################# +# gsqlite3-supermaster-query +# +# gsqlite3-supermaster-query=select account from supermasters where ip='%s' and nameserver='%s' + +################################# +# gsqlite3-update-kind-query +# +# gsqlite3-update-kind-query=update domains set type='%s' where name='%s' + +################################# +# gsqlite3-update-lastcheck-query +# +# gsqlite3-update-lastcheck-query=update domains set last_check=%d where id=%d + +################################# +# gsqlite3-update-master-query +# +# gsqlite3-update-master-query=update domains set master='%s' where name='%s' + +################################# +# gsqlite3-update-serial-query +# +# gsqlite3-update-serial-query=update domains set notified_serial=%d where id=%d + +################################# +# gsqlite3-zone-lastchange-query +# +# gsqlite3-zone-lastchange-query=select max(change_date) from records where domain_id=%d + +################################# +# guardian Run within a guardian process +# +# guardian=no + +################################# +# include-dir Include *.conf files from this directory +# +# include-dir= + +################################# +# launch Which backends to launch and order to query them in +# +# launch=bind,geo,geoip,gmysql,gpgsql,gsqlite3,lmdb,lua,mydns,opendbx,pipe,tinydns + +################################# +# lmdb-datapath Path to the directory containing the lmdb files +# +# lmdb-datapath=/etc/pdns/data + +################################# +# lmdb-experimental-dnssec Enable experimental DNSSEC processing +# +# lmdb-experimental-dnssec=no + +################################# +# 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-address-nonexist-fail Fail to start if one or more of the local-address's do not exist on this server +# +# local-address-nonexist-fail=yes + +################################# +# local-ipv6 Local IP address to which we bind +# +# local-ipv6= + +################################# +# local-ipv6-nonexist-fail Fail to start if one or more of the local-ipv6 addresses do not exist on this server +# +# local-ipv6-nonexist-fail=yes + +################################# +# 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=no + +################################# +# log-dns-queries If PDNS should log all incoming DNS queries +# +# log-dns-queries=no + +################################# +# logging-facility Log under a specific facility +# +# logging-facility= + +################################# +# loglevel Amount of logging. Higher is more. Do not set below 3 +# +# loglevel=4 + +################################# +# lua-filename Filename of the script for lua backend +# +# lua-filename=powerdns-luabackend.lua + +################################# +# lua-logging-query Logging of the LUA Backend +# +# lua-logging-query=no + +################################# +# lua-prequery-script Lua script with prequery handler +# +# lua-prequery-script= + +################################# +# master Act as a master +# +# master=no + +################################# +# max-cache-entries Maximum number of cache entries +# +# max-cache-entries=1000000 + +################################# +# max-ent-entries Maximum number of empty non-terminals in a zone +# +# max-ent-entries=100000 + +################################# +# max-nsec3-iterations Limit the number of NSEC3 hash iterations +# +# max-nsec3-iterations=500 + +################################# +# max-queue-length Maximum queuelength before considering situation lost +# +# max-queue-length=5000 + +################################# +# max-signature-cache-entries Maximum number of signatures cache entries +# +# max-signature-cache-entries= + +################################# +# max-tcp-connections Maximum number of TCP connections +# +# max-tcp-connections=10 + +################################# +# module-dir Default directory for modules +# +# module-dir=/usr/local/lib/pdns + +################################# +# mydns-dbname Pdns backend database name to connect to +# +# mydns-dbname=mydns + +################################# +# mydns-host Pdns backend host to connect to +# +# mydns-host= + +################################# +# mydns-password Pdns backend password to connect with +# +# mydns-password= + +################################# +# mydns-port Pdns backend host to connect to +# +# mydns-port= + +################################# +# mydns-rr-active Use the active column in the RR table +# +# mydns-rr-active=yes + +################################# +# mydns-rr-table Name of RR table to use +# +# mydns-rr-table=rr + +################################# +# mydns-rr-where Additional WHERE clause for RR +# +# mydns-rr-where=1 = 1 + +################################# +# mydns-soa-active Use the active column in the SOA table +# +# mydns-soa-active=yes + +################################# +# mydns-soa-table Name of SOA table to use +# +# mydns-soa-table=soa + +################################# +# mydns-soa-where Additional WHERE clause for SOA +# +# mydns-soa-where=1 = 1 + +################################# +# mydns-socket Pdns backend socket to connect to +# +# mydns-socket= + +################################# +# mydns-use-minimal-ttl Setting this to 'yes' will make the backend behave like MyDNS on the TTL values. Setting it to 'no' will make it ignore the minimal-ttl of the zone. +# +# mydns-use-minimal-ttl=yes + +################################# +# mydns-user Pdns backend user to connect as +# +# mydns-user=powerdns + +################################# +# negquery-cache-ttl Seconds to store negative query results in the QueryCache +# +# negquery-cache-ttl=60 + +################################# +# no-shuffle Set this to prevent random shuffling of answers - for regression testing +# +# no-shuffle=off + +################################# +# only-notify Only send AXFR NOTIFY to these IP addresses or netmasks +# +# only-notify=0.0.0.0/0,::/0 + +################################# +# opendbx-backend OpenDBX backend +# +# opendbx-backend=mysql + +################################# +# opendbx-database Database name containing the DNS records +# +# opendbx-database=powerdns + +################################# +# opendbx-host deprecated, use host-read and host-write instead +# +# opendbx-host= + +################################# +# opendbx-host-read Name or address of one or more DBMS server to read from +# +# opendbx-host-read=127.0.0.1 + +################################# +# opendbx-host-write Name or address of one or more DBMS server used for updates +# +# opendbx-host-write=127.0.0.1 + +################################# +# opendbx-password Password for connecting to the DBMS +# +# opendbx-password= + +################################# +# opendbx-port Port the DBMS server are listening to +# +# opendbx-port= + +################################# +# opendbx-sql-infomasters Get all updated masters +# +# opendbx-sql-infomasters=SELECT d."id", d."name", d."master", d."last_check", d."notified_serial", d."auto_serial", r."content" FROM "domains" d LEFT JOIN "records" r ON ( d."id"=r."domain_id" AND r."type"='SOA' ) WHERE d."status"='A' AND d."type"='MASTER' + +################################# +# opendbx-sql-infoslaves Get all unfresh slaves +# +# opendbx-sql-infoslaves=SELECT d."id", d."name", d."master", d."last_check", d."notified_serial", d."auto_serial", r."content" FROM "domains" d LEFT JOIN "records" r ON ( d."id"=r."domain_id" AND r."type"='SOA' ) WHERE d."status"='A' AND d."type"='SLAVE' + +################################# +# opendbx-sql-insert-record Feed record into table +# +# opendbx-sql-insert-record=INSERT INTO "records" ( "domain_id", "name", "type", "ttl", "prio", "content" ) VALUES ( %d, '%s', '%s', %d, %d, '%s' ) + +################################# +# opendbx-sql-insert-slave Add slave domain +# +# opendbx-sql-insert-slave=INSERT INTO "domains" ( "name", "type", "master", "account" ) VALUES ( '%s', 'SLAVE', '%s', '%s' ) + +################################# +# opendbx-sql-list AXFR query +# +# opendbx-sql-list=SELECT r."domain_id", r."name", r."type", r."ttl", r."prio", r."content" FROM "records" r WHERE r."domain_id"=:id + +################################# +# opendbx-sql-lookup Lookup query +# +# opendbx-sql-lookup=SELECT r."domain_id", r."name", r."type", r."ttl", r."prio", r."content" FROM "records" r WHERE r."name"=':name' + +################################# +# opendbx-sql-lookupid Lookup query with id +# +# opendbx-sql-lookupid=SELECT r."domain_id", r."name", r."type", r."ttl", r."prio", r."content" FROM "records" r WHERE r."domain_id"=:id AND r."name"=':name' + +################################# +# opendbx-sql-lookupsoa Lookup query for SOA record +# +# opendbx-sql-lookupsoa=SELECT d."id", d."auto_serial", r."ttl", r."content" FROM "records" r JOIN "domains" d ON r."domain_id"=d."id" WHERE r."name"=':name' AND r."type"='SOA' AND d."status"='A' + +################################# +# opendbx-sql-lookuptype Lookup query with type +# +# opendbx-sql-lookuptype=SELECT r."domain_id", r."name", r."type", r."ttl", r."prio", r."content" FROM "records" r WHERE r."name"=':name' AND r."type"=':type' + +################################# +# opendbx-sql-lookuptypeid Lookup query with type and id +# +# opendbx-sql-lookuptypeid=SELECT r."domain_id", r."name", r."type", r."ttl", r."prio", r."content" FROM "records" r WHERE r."domain_id"=:id AND r."name"=':name' AND r."type"=':type' + +################################# +# opendbx-sql-master Get master record for zone +# +# opendbx-sql-master=SELECT d."master" FROM "domains" d WHERE d."name"=':name' AND d."status"='A' AND d."type"='SLAVE' + +################################# +# opendbx-sql-supermaster Get supermaster info +# +# opendbx-sql-supermaster=SELECT s."account" FROM "supermasters" s WHERE s."ip"=':ip' AND s."nameserver"=':ns' + +################################# +# opendbx-sql-transactabort Abort transaction +# +# opendbx-sql-transactabort=ROLLBACK + +################################# +# opendbx-sql-transactbegin Start transaction +# +# opendbx-sql-transactbegin=BEGIN + +################################# +# opendbx-sql-transactend Finish transaction +# +# opendbx-sql-transactend=COMMIT + +################################# +# opendbx-sql-update-lastcheck Set time of last check +# +# opendbx-sql-update-lastcheck=UPDATE "domains" SET "last_check"=%d WHERE "id"=%d + +################################# +# opendbx-sql-update-serial Set zone to notified +# +# opendbx-sql-update-serial=UPDATE "domains" SET "notified_serial"=%d WHERE "id"=%d + +################################# +# opendbx-sql-zonedelete Delete all records for this zone +# +# opendbx-sql-zonedelete=DELETE FROM "records" WHERE "domain_id"=:id + +################################# +# opendbx-sql-zoneinfo Get domain info +# +# opendbx-sql-zoneinfo=SELECT d."id", d."name", d."type", d."master", d."last_check", d."auto_serial", r."content" FROM "domains" d LEFT JOIN "records" r ON ( d."id"=r."domain_id" AND r."type"='SOA' ) WHERE d."name"=':name' AND d."status"='A' + +################################# +# opendbx-username User for connecting to the DBMS +# +# opendbx-username=powerdns + +################################# +# out-of-zone-additional-processing Do out of zone additional processing +# +# out-of-zone-additional-processing=yes + +################################# +# overload-queue-length Maximum queuelength moving to packetcache only +# +# overload-queue-length=0 + +################################# +# pipe-command Command to execute for piping questions to +# +# pipe-command= + +################################# +# pipe-regex Regular exception of queries to pass to coprocess +# +# pipe-regex= + +################################# +# pipe-timeout Number of milliseconds to wait for an answer +# +# pipe-timeout=2000 + +################################# +# pipebackend-abi-version Version of the pipe backend ABI +# +# pipebackend-abi-version=1 + +################################# +# prevent-self-notification Don't send notifications to what we think is ourself +# +# prevent-self-notification=yes + +################################# +# query-cache-ttl Seconds to store query results in the QueryCache +# +# query-cache-ttl=20 + +################################# +# 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 +# +# query-local-address6=:: + +################################# +# 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 + +################################# +# receiver-threads Default number of receiver threads to start +# +# receiver-threads=1 + +################################# +# recursive-cache-ttl Seconds to store packets for recursive queries in the PacketCache +# +# recursive-cache-ttl=10 + +################################# +# recursor If recursion is desired, IP address of a recursing nameserver +# +# recursor=no + +################################# +# retrieval-threads Number of AXFR-retrieval threads for slave operation +# +# retrieval-threads=2 + +################################# +# reuseport Enable higher performance on compliant kernels by using SO_REUSEPORT allowing each receiver thread to open its own socket +# +# reuseport=no + +################################# +# send-root-referral Send out old-fashioned root-referral instead of ServFail in case of no authority +# +# send-root-referral=no + +################################# +# server-id Returned when queried for 'server.id' TXT or NSID, defaults to hostname - disabled or custom +# +# 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= + +################################# +# signing-threads Default number of signer threads to start +# +# signing-threads=3 + +################################# +# slave Act as a slave +# +# slave=no + +################################# +# slave-cycle-interval Reschedule failed SOA serial checks once every .. seconds +# +# slave-cycle-interval=60 + +################################# +# slave-renotify If we should send out notifications for slaved updates +# +# slave-renotify=no + +################################# +# soa-expire-default Default SOA expire +# +# soa-expire-default=604800 + +################################# +# soa-minimum-ttl Default SOA minimum 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 + +################################# +# socket-dir Where the controlsocket will live +# +# socket-dir=/var/run + +################################# +# tcp-control-address If set, PowerDNS can be controlled over TCP on this address +# +# tcp-control-address= + +################################# +# tcp-control-port If set, PowerDNS can be controlled over TCP on this address +# +# tcp-control-port=53000 + +################################# +# tcp-control-range If set, remote control of PowerDNS is possible over these networks only +# +# tcp-control-range=127.0.0.0/8, 10.0.0.0/8, 192.168.0.0/16, 172.16.0.0/12, ::1/128, fe80::/10 + +################################# +# tcp-control-secret If set, PowerDNS can be controlled over TCP after passing this secret +# +# tcp-control-secret= + +################################# +# tinydns-dbfile Location of the cdb data file +# +# tinydns-dbfile=data.cdb + +################################# +# tinydns-ignore-bogus-records The data.cdb file might have some wront record data, this causes PowerDNS to fail, where tinydns would send out truncated data. This option makes powerdns ignore that data! +# +# tinydns-ignore-bogus-records=no + +################################# +# tinydns-locations Enable or Disable location support in the backend. Changing the value to 'no' will make the backend ignore the locations. This then returns all records! +# +# tinydns-locations=yes + +################################# +# tinydns-notify-on-startup Tell the TinyDNSBackend to notify all the slave nameservers on startup. Default is no. +# +# tinydns-notify-on-startup=no + +################################# +# tinydns-tai-adjust This adjusts the TAI value if timestamps are used. These seconds will be added to the start point (1970) and will allow you to adjust for leap seconds. The default is 11. +# +# tinydns-tai-adjust=11 + +################################# +# traceback-handler Enable the traceback handler (Linux only) +# +# traceback-handler=yes + +################################# +# trusted-notification-proxy IP address of incoming notification proxy +# +# trusted-notification-proxy= + +################################# +# udp-truncation-threshold Maximum UDP response size before we truncate +# +# udp-truncation-threshold=1680 + +################################# +# 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-allow-from Webserver access is only allowed from these subnets +# +# webserver-allow-from=0.0.0.0/0,::/0 + +################################# +# 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 + + diff --git a/net/powerdns/files/pdns.in b/net/powerdns/files/pdns.in new file mode 100644 index 00000000..108747ea --- /dev/null +++ b/net/powerdns/files/pdns.in @@ -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="" +# +# 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 diff --git a/net/powerdns/files/pkg-deinstall.in b/net/powerdns/files/pkg-deinstall.in new file mode 100644 index 00000000..fc010d1e --- /dev/null +++ b/net/powerdns/files/pkg-deinstall.in @@ -0,0 +1,12 @@ +#!/bin/sh + +set -x + +case $2 in + DEINSTALL) + ;; + POST-DEINSTALL) + ;; +esac +exit 0 +#EOF diff --git a/net/powerdns/files/pkg-install.in b/net/powerdns/files/pkg-install.in new file mode 100644 index 00000000..67b269f1 --- /dev/null +++ b/net/powerdns/files/pkg-install.in @@ -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 diff --git a/net/powerdns/files/pkg-message.in b/net/powerdns/files/pkg-message.in new file mode 100644 index 00000000..2e7dfb9e --- /dev/null +++ b/net/powerdns/files/pkg-message.in @@ -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 +******************************************************************* + diff --git a/net/powerdns/pkg-descr b/net/powerdns/pkg-descr new file mode 100644 index 00000000..4e448bb1 --- /dev/null +++ b/net/powerdns/pkg-descr @@ -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/ diff --git a/net/powerdns/pkg-plist b/net/powerdns/pkg-plist new file mode 100644 index 00000000..705ec9e8 --- /dev/null +++ b/net/powerdns/pkg-plist @@ -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