summaryrefslogtreecommitdiffstats
path: root/dns/powerdns/files
diff options
context:
space:
mode:
Diffstat (limited to 'dns/powerdns/files')
-rw-r--r--dns/powerdns/files/configure.powerdns57
-rw-r--r--dns/powerdns/files/patch-configure11
-rw-r--r--dns/powerdns/files/patch-modules_gmysqlbackend_Makefile_in11
-rw-r--r--dns/powerdns/files/patch-modules_gmysqlbackend_gmysqlbackend_cc23
-rw-r--r--dns/powerdns/files/patch-modules_gpgsqlbackend_Makefile_in29
-rw-r--r--dns/powerdns/files/patch-modules_gpgsqlbackend_OBJECTLIBS5
-rw-r--r--dns/powerdns/files/patch-modules_pipebackend_Makefile_in11
-rw-r--r--dns/powerdns/files/patch-pdns_common_startup_cc15
-rw-r--r--dns/powerdns/files/pdns.conf300
-rw-r--r--dns/powerdns/files/pdns_mysql.sql38
-rw-r--r--dns/powerdns/files/pdns_postgresql.sql40
11 files changed, 540 insertions, 0 deletions
diff --git a/dns/powerdns/files/configure.powerdns b/dns/powerdns/files/configure.powerdns
new file mode 100644
index 0000000..e41c817
--- /dev/null
+++ b/dns/powerdns/files/configure.powerdns
@@ -0,0 +1,57 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then
+ exit
+fi
+
+if [ "${POWERDNS_OPTIONS}" ]; then
+ set ${POWERDNS_OPTIONS}
+else
+ dialog --title "configuration options" --clear \
+ --checklist "\n\
+Please select desired options:" -1 -1 2 \
+PostgreSQL "PostgreSQL driver" ON \
+MySQL "MySQL driver" OFF \
+2> /tmp/checklist.tmp.$$
+
+ retval=$?
+ if [ -s /tmp/checklist.tmp.$$ ]; then
+ set `cat /tmp/checklist.tmp.$$`
+ fi
+ rm -f /tmp/checklist.tmp.$$
+
+ case $retval in
+ 0) if [ -z "$*" ]; then
+ echo "Nothing selected"
+ fi
+ ;;
+ 1) echo "Cancel pressed."
+ exit 1
+ ;;
+ esac
+fi
+
+${MKDIR} ${WRKDIRPREFIX}${CURDIR}
+exec > ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+
+while [ "$1" ]; do
+ case $1 in
+ \"PostgreSQL\")
+ echo WITH_POSTGRESQL_DRIVER=YES
+ ;;
+ \"MySQL\")
+ echo WITH_MYSQL_DRIVER=YES
+ ;;
+ \"nothing\"|true)
+ ;;
+ *)
+ echo "Invalid option(s): $*" > /dev/stderr
+ rm -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc
+ exit 1
+ ;;
+ esac
+ shift
+done
+exec > /dev/stderr
diff --git a/dns/powerdns/files/patch-configure b/dns/powerdns/files/patch-configure
new file mode 100644
index 0000000..f4121d2
--- /dev/null
+++ b/dns/powerdns/files/patch-configure
@@ -0,0 +1,11 @@
+--- configure.orig Mon Dec 16 22:45:46 2002
++++ configure Mon Dec 16 22:45:59 2002
+@@ -10385,7 +10385,7 @@
+ echo "$as_me:$LINENO: result: $PGSQL_incdir" >&5
+ echo "${ECHO_T}$PGSQL_incdir" >&6
+
+-# LIBS="$LIBS -lpq++ -lpq -lssl -lcrypt -lcrypto"
++# LIBS="$LIBS -lpq++ -lpq -lssl -lcrypto"
+ fi
+
+
diff --git a/dns/powerdns/files/patch-modules_gmysqlbackend_Makefile_in b/dns/powerdns/files/patch-modules_gmysqlbackend_Makefile_in
new file mode 100644
index 0000000..dc74b8e
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_gmysqlbackend_Makefile_in
@@ -0,0 +1,11 @@
+--- modules/gmysqlbackend/Makefile.in.orig Tue Dec 17 10:38:38 2002
++++ modules/gmysqlbackend/Makefile.in Tue Dec 17 10:38:39 2002
+@@ -181,7 +181,7 @@
+ clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ libgmysqlbackend.la: $(libgmysqlbackend_la_OBJECTS) $(libgmysqlbackend_la_DEPENDENCIES)
+- $(CXXLINK) -rpath $(libdir) $(libgmysqlbackend_la_LDFLAGS) $(libgmysqlbackend_la_OBJECTS) $(libgmysqlbackend_la_LIBADD) $(LIBS)
++# $(CXXLINK) -rpath $(libdir) $(libgmysqlbackend_la_LDFLAGS) $(libgmysqlbackend_la_OBJECTS) $(libgmysqlbackend_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
diff --git a/dns/powerdns/files/patch-modules_gmysqlbackend_gmysqlbackend_cc b/dns/powerdns/files/patch-modules_gmysqlbackend_gmysqlbackend_cc
new file mode 100644
index 0000000..300ff8a
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_gmysqlbackend_gmysqlbackend_cc
@@ -0,0 +1,23 @@
+--- modules/gmysqlbackend/gmysqlbackend.cc.orig Tue Dec 17 10:56:43 2002
++++ modules/gmysqlbackend/gmysqlbackend.cc Tue Dec 17 11:01:33 2002
+@@ -20,13 +20,14 @@
+
+ gMySQLBackend::gMySQLBackend(const string &mode, const string &suffix) : GSQLBackend(mode,suffix)
+ {
++ const string dbname = getArg ("dbname");
++ const string host = getArg ("host");
++ const string socket = getArg ("socket");
++ const string user = getArg ("user");
++ const string passwd = getArg ("password");
++
+ try {
+- setDB(new SMySQL(getArg("dbname"),
+- getArg("host"),
+- getArg("socket"),
+- getArg("user"),
+- getArg("password")));
+-
++ setDB(new SMySQL(dbname, host, socket, user, passwd));
+ }
+
+ catch(SSqlException &e) {
diff --git a/dns/powerdns/files/patch-modules_gpgsqlbackend_Makefile_in b/dns/powerdns/files/patch-modules_gpgsqlbackend_Makefile_in
new file mode 100644
index 0000000..a634291
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_gpgsqlbackend_Makefile_in
@@ -0,0 +1,29 @@
+--- modules/gpgsqlbackend/Makefile.in.orig Mon Dec 16 22:32:29 2002
++++ modules/gpgsqlbackend/Makefile.in Fri Dec 20 14:24:06 2002
+@@ -95,7 +95,7 @@
+ lib_LTLIBRARIES = libgpgsqlbackend.la
+
+ EXTRA_DIST = OBJECTFILES OBJECTLIBS
+-INCLUDES = -I@PGSQL_incdir@
++INCLUDES = -I@includedir@ -I@PGSQL_incdir@
+
+ libgpgsqlbackend_la_SOURCES = gpgsqlbackend.cc gpgsqlbackend.hh \
+ spgsql.hh spgsql.cc
+@@ -105,7 +105,7 @@
+ -Wl,-Bdynamic
+
+
+-libgpgsqlbackend_la_LIBADD = -lssl -lcrypt -lcrypto
++libgpgsqlbackend_la_LIBADD = -lssl -lcrypto
+ subdir = modules/gpgsqlbackend
+ mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
+ CONFIG_HEADER = $(top_builddir)/config.h
+@@ -184,7 +184,7 @@
+ clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ libgpgsqlbackend.la: $(libgpgsqlbackend_la_OBJECTS) $(libgpgsqlbackend_la_DEPENDENCIES)
+- $(CXXLINK) -rpath $(libdir) $(libgpgsqlbackend_la_LDFLAGS) $(libgpgsqlbackend_la_OBJECTS) $(libgpgsqlbackend_la_LIBADD) $(LIBS)
++# $(CXXLINK) -rpath $(libdir) $(libgpgsqlbackend_la_LDFLAGS) $(libgpgsqlbackend_la_OBJECTS) $(libgpgsqlbackend_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
diff --git a/dns/powerdns/files/patch-modules_gpgsqlbackend_OBJECTLIBS b/dns/powerdns/files/patch-modules_gpgsqlbackend_OBJECTLIBS
new file mode 100644
index 0000000..200a917
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_gpgsqlbackend_OBJECTLIBS
@@ -0,0 +1,5 @@
+--- modules/gpgsqlbackend/OBJECTLIBS.orig Tue Dec 17 08:35:41 2002
++++ modules/gpgsqlbackend/OBJECTLIBS Tue Dec 17 08:35:50 2002
+@@ -1 +1 @@
+--lpq++ -lpq -lssl -lcrypt -lcrypto
++-lpq++ -lpq -lssl -lcrypto
diff --git a/dns/powerdns/files/patch-modules_pipebackend_Makefile_in b/dns/powerdns/files/patch-modules_pipebackend_Makefile_in
new file mode 100644
index 0000000..c166925
--- /dev/null
+++ b/dns/powerdns/files/patch-modules_pipebackend_Makefile_in
@@ -0,0 +1,11 @@
+--- modules/pipebackend/Makefile.in.orig Tue Dec 17 09:39:14 2002
++++ modules/pipebackend/Makefile.in Tue Dec 17 09:39:39 2002
+@@ -181,7 +181,7 @@
+ clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ libpipebackend.la: $(libpipebackend_la_OBJECTS) $(libpipebackend_la_DEPENDENCIES)
+- $(CXXLINK) -rpath $(libdir) $(libpipebackend_la_LDFLAGS) $(libpipebackend_la_OBJECTS) $(libpipebackend_la_LIBADD) $(LIBS)
++# $(CXXLINK) -rpath $(libdir) $(libpipebackend_la_LDFLAGS) $(libpipebackend_la_OBJECTS) $(libpipebackend_la_LIBADD) $(LIBS)
+
+ mostlyclean-compile:
+ -rm -f *.$(OBJEXT) core *.core
diff --git a/dns/powerdns/files/patch-pdns_common_startup_cc b/dns/powerdns/files/patch-pdns_common_startup_cc
new file mode 100644
index 0000000..939539a
--- /dev/null
+++ b/dns/powerdns/files/patch-pdns_common_startup_cc
@@ -0,0 +1,15 @@
+--- pdns/common_startup.cc.orig Tue Dec 17 08:18:41 2002
++++ pdns/common_startup.cc Tue Dec 17 08:19:58 2002
+@@ -270,8 +270,10 @@
+ TN->go(); // tcp nameserver launch
+
+ // fork(); (this worked :-))
+- for(int n=0;n<arg().asNum("receiver-threads");++n) {
+- DNSDistributor *D= new DNSDistributor(arg().asNum("distributor-threads")); // the big dispatcher!
++ int foo1 = arg().asNum("receiver-threads");
++ for(int n=0;n<foo1;++n) {
++ int foo2 = arg().asNum("distributor-threads");
++ DNSDistributor *D= new DNSDistributor(foo2); // the big dispatcher!
+ pthread_create(&qtid,0,qthread,static_cast<void *>(D)); // receives packets
+ }
+
diff --git a/dns/powerdns/files/pdns.conf b/dns/powerdns/files/pdns.conf
new file mode 100644
index 0000000..a452518
--- /dev/null
+++ b/dns/powerdns/files/pdns.conf
@@ -0,0 +1,300 @@
+# MySQL
+#launch=gmysql
+#gmysql-host=127.0.0.1
+#gmysql-dbname=pdns
+#gmysql-user=pdns
+#gmysql-password=pdns
+
+# PostgreSQL
+#launch=gpgsql
+#gpgsql-host=127.0.0.1
+#gpgsql-dbname=pdns
+#gpgsql-user=pdns
+#gpgsql-password=pdns
+
+#################################
+# allow-axfr-ips If disabled, DO allow zonetransfers from these IP addresses
+#
+# allow-axfr-ips=
+
+#################################
+# allow-recursion List of netmasks that are allowed to recurse
+#
+# allow-recursion=
+
+#################################
+# cache-ttl Seconds to store packets in the PacketCache
+#
+# cache-ttl=20
+
+#################################
+# chroot If set, chroot to this directory for more security
+#
+chroot=/var/empty
+
+#################################
+# config-dir Location of configuration directory (pdns.conf)
+#
+# config-dir=/etc
+
+#################################
+# config-name Name of this virtual configuration - will rename the binary image
+#
+# config-name=
+
+#################################
+# control-console Debugging switch - don't use
+#
+# control-console=no
+
+#################################
+# daemon Operate as a daemon
+#
+daemon=yes
+
+#################################
+# default-soa-name name to insert in the SOA record if none set in the backend
+#
+# default-soa-name=ns.example.com
+
+#################################
+# disable-axfr Disable zonetransfers but do allow TCP queries
+#
+# disable-axfr=no
+
+#################################
+# disable-tcp Do not listen to TCP queries
+#
+disable-tcp=no
+
+#################################
+# distributor-threads Default number of Distributor (backend) threads to start
+#
+# distributor-threads=3
+
+#################################
+# fancy-records Process URL and MBOXFW records
+#
+# fancy-records=no
+
+#################################
+# guardian Run within a guardian process
+#
+guardian=yes
+
+#################################
+# launch Which backends to launch and order to query them in
+#
+# launch=
+
+#################################
+# lazy-recursion Only recurse if question cannot be answered locally
+#
+# lazy-recursion=yes
+
+#################################
+# load-modules Load this module - supply absolute or relative path
+#
+# load-modules=
+
+#################################
+# local-address Local IP address to which we bind
+#
+# local-address=0.0.0.0
+
+#################################
+# local-ipv6 Local IP address to which we bind
+#
+# local-ipv6=
+
+#################################
+# local-port The port on which we listen
+#
+# local-port=53
+
+#################################
+# log-dns-details If PDNS should log failed update requests
+#
+# log-dns-details=
+
+#################################
+# log-failed-updates If PDNS should log failed update requests
+#
+# log-failed-updates=
+
+#################################
+# logfile Logfile to use
+#
+# logfile=pdns.log
+
+#################################
+# logging-facility Log under a specific facility
+#
+# logging-facility=
+
+#################################
+# loglevel Amount of logging. Higher is more. Do not set below 3
+#
+# loglevel=4
+
+#################################
+# master Act as a master
+#
+# master=no
+
+#################################
+# max-queue-length Maximum queuelength before considering situation lost
+#
+# max-queue-length=5000
+
+#################################
+# max-tcp-connections Maximum number of TCP connections
+#
+# max-tcp-connections=10
+
+#################################
+# module-dir Default directory for modules
+#
+# module-dir=/usr/local/bin/../lib
+
+#################################
+# negquery-cache-ttl Seconds to store packets in the PacketCache
+#
+# negquery-cache-ttl=60
+
+#################################
+# only-soa Make sure that no SOA serial is less than this number
+#
+# only-soa=org
+
+#################################
+# out-of-zone-additional-processing Do out of zone additional processing
+#
+# out-of-zone-additional-processing=no
+
+#################################
+# query-cache-ttl Seconds to store packets in the PacketCache
+#
+# query-cache-ttl=20
+
+#################################
+# 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 Number of receiver threads to launch
+#
+# receiver-threads=1
+
+#################################
+# recursive-cache-ttl Seconds to store packets in the PacketCache
+#
+# recursive-cache-ttl=10
+
+#################################
+# recursor If recursion is desired, IP address of a recursing nameserver
+#
+# recursor=no
+
+#################################
+# 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=
+
+#################################
+# skip-cname Do not perform CNAME indirection for each query
+#
+# skip-cname=no
+
+#################################
+# slave Act as a slave
+#
+# slave=no
+
+#################################
+# slave-cycle-interval Reschedule failed SOA serial checks once every .. seconds
+#
+# slave-cycle-interval=60
+
+#################################
+# smtpredirector Our smtpredir MX host
+#
+smtpredirector=voodoo.codeninja.nl
+
+#################################
+# soa-minimum-ttl Default SOA mininum ttl
+#
+# soa-minimum-ttl=3600
+
+#################################
+# soa-serial-offset Make sure that no SOA serial is less than this number
+#
+# soa-serial-offset=0
+
+#################################
+# socket-dir Where the controlsocket will live
+#
+# socket-dir=/var/run
+
+#################################
+# strict-rfc-axfrs Perform strictly rfc compliant axfrs (very slow)
+#
+# strict-rfc-axfrs=no
+
+#################################
+# urlredirector Where we send hosts to that need to be url redirected
+#
+# urlredirector=127.0.0.1
+
+#################################
+# use-logfile Use a log file
+#
+# use-logfile=no
+
+#################################
+# webserver Start a webserver for monitoring
+#
+webserver=yes
+
+#################################
+# webserver-address IP Address of webserver to listen on
+#
+webserver-address=127.0.0.1
+
+#################################
+# webserver-password Password required for accessing the webserver
+#
+# webserver-password=
+
+#################################
+# webserver-port Port of webserver to listen on
+#
+webserver-port=8081
+
+#################################
+# webserver-print-arguments If the webserver should print arguments
+#
+# webserver-print-arguments=no
+
+#################################
+# wildcard-url Process URL and MBOXFW records
+#
+# wildcard-url=no
+
+#################################
+# wildcards Honor wildcards in the database
+#
+# wildcards=
+
+
diff --git a/dns/powerdns/files/pdns_mysql.sql b/dns/powerdns/files/pdns_mysql.sql
new file mode 100644
index 0000000..278c5d5
--- /dev/null
+++ b/dns/powerdns/files/pdns_mysql.sql
@@ -0,0 +1,38 @@
+create table domains (
+ id INT auto_increment,
+ name VARCHAR(255) NOT NULL,
+ master VARCHAR(20) DEFAULT NULL,
+ last_check INT DEFAULT NULL,
+ type VARCHAR(6) NOT NULL,
+ notified_serial INT DEFAULT NULL,
+ account VARCHAR(40) DEFAULT NULL,
+ primary key (id)
+)type=InnoDB;
+
+CREATE UNIQUE INDEX name_index ON domains(name);
+
+CREATE TABLE records (
+ id INT auto_increment,
+ domain_id INT DEFAULT NULL,
+ name VARCHAR(255) DEFAULT NULL,
+ type VARCHAR(6) DEFAULT NULL,
+ content VARCHAR(255) DEFAULT NULL,
+ ttl INT DEFAULT NULL,
+ prio INT DEFAULT NULL,
+ change_date INT DEFAULT NULL,
+ primary key(id)
+)type=InnoDB;
+
+CREATE INDEX rec_name_index ON records(name);
+CREATE INDEX nametype_index ON records(name,type);
+CREATE INDEX domain_id ON records(domain_id);
+
+create table supermasters (
+ ip VARCHAR(25) NOT NULL,
+ nameserver VARCHAR(255) NOT NULL,
+ account VARCHAR(40) DEFAULT NULL
+);
+
+GRANT SELECT ON supermasters TO pdns;
+GRANT ALL ON domains TO pdns;
+GRANT ALL ON records TO pdns;
diff --git a/dns/powerdns/files/pdns_postgresql.sql b/dns/powerdns/files/pdns_postgresql.sql
new file mode 100644
index 0000000..c700a2a
--- /dev/null
+++ b/dns/powerdns/files/pdns_postgresql.sql
@@ -0,0 +1,40 @@
+create table domains (
+ id SERIAL PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ master VARCHAR(20) DEFAULT NULL,
+ last_check INT DEFAULT NULL,
+ type VARCHAR(6) NOT NULL,
+ notified_serial INT DEFAULT NULL,
+ account VARCHAR(40) DEFAULT NULL
+);
+CREATE UNIQUE INDEX name_index ON domains(name);
+
+CREATE TABLE records (
+ id SERIAL PRIMARY KEY,
+ domain_id INT DEFAULT NULL,
+ name VARCHAR(255) DEFAULT NULL,
+ type VARCHAR(6) DEFAULT NULL,
+ content VARCHAR(255) DEFAULT NULL,
+ ttl INT DEFAULT NULL,
+ prio INT DEFAULT NULL,
+ change_date INT DEFAULT NULL,
+ CONSTRAINT domain_exists
+ FOREIGN KEY(domain_id) REFERENCES domains(id)
+ ON DELETE CASCADE
+);
+
+CREATE INDEX rec_name_index ON records(name);
+CREATE INDEX nametype_index ON records(name,type);
+CREATE INDEX domain_id ON records(domain_id);
+
+create table supermasters (
+ ip VARCHAR(25) NOT NULL,
+ nameserver VARCHAR(255) NOT NULL,
+ account VARCHAR(40) DEFAULT NULL
+);
+
+GRANT SELECT ON supermasters TO pdns;
+GRANT ALL ON domains TO pdns;
+GRANT ALL ON domains_id_seq TO pdns;
+GRANT ALL ON records TO pdns;
+GRANT ALL ON records_id_seq TO pdns;
OpenPOWER on IntegriCloud