- Add WITH_SQLITE knob to enable SQLite backend
PR: ports/63817 Submitted by: Ralf van der Enden <tremere@cainites.net> (maintainer)
This commit is contained in:
parent
380b29758f
commit
7a59b9247f
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=103106
14 changed files with 152 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= powerdns
|
||||
PORTVERSION= 2.9.16
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= dns ipv6
|
||||
MASTER_SITES= http://downloads.powerdns.com/releases/
|
||||
DISTNAME= pdns-${PORTVERSION}
|
||||
|
@ -73,6 +73,15 @@ PLIST_SUB+= WITHLDAP=""
|
|||
PLIST_SUB+= WITHLDAP="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_SQLITE)
|
||||
LIB_DEPENDS= sqlite.2:${PORTSDIR}/${SQLITE_PORT}
|
||||
SQLITE_PORT?= databases/sqlite
|
||||
CONFIGURE_ARGS+= --enable-sqlite
|
||||
CONFIGURE_MODULES+= "gsqlite"
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-sqlite
|
||||
.endif
|
||||
|
||||
.if defined(POWERDNS_WITH_RECURSOR)
|
||||
USE_GCC=3.2
|
||||
CONFIGURE_ARGS+= --enable-recursor
|
||||
|
@ -123,7 +132,7 @@ post-install:
|
|||
.endif
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${EXAMPLESDIR}
|
||||
.for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql
|
||||
.for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql pdns_sqlite.sql
|
||||
${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/
|
||||
.endfor
|
||||
.endif
|
||||
|
|
|
@ -11,7 +11,7 @@ if [ "${POWERDNS_OPTIONS}" ]; then
|
|||
else
|
||||
dialog --title "configuration options" --clear \
|
||||
--checklist "\n\
|
||||
Please select desired options:" -1 -1 8 \
|
||||
Please select desired options:" -1 -1 9 \
|
||||
PostgreSQL "PostgreSQL driver" ON \
|
||||
MySQL323 "MySQL 3.23 driver" OFF \
|
||||
MySQL40 "MySQL 4.0 driver" OFF \
|
||||
|
@ -19,6 +19,7 @@ MySQL41 "MySQL 4.1 driver" OFF \
|
|||
OpenLDAP20 "OpenLDAP 2.0 backend" OFF \
|
||||
OpenLDAP21 "OpenLDAP 2.1 backend" OFF \
|
||||
OpenLDAP22 "OpenLDAP 2.2 backend" OFF \
|
||||
SQLite "SQLite backend" OFF \
|
||||
Recursor "Build Recursor" OFF \
|
||||
2> /tmp/checklist.tmp.$$
|
||||
|
||||
|
@ -71,6 +72,10 @@ while [ "$1" ]; do
|
|||
echo WITH_LDAP=YES
|
||||
echo LDAP_PORT?=net/openldap22-client
|
||||
;;
|
||||
\"SQLite\")
|
||||
echo WITH_SQLITE=YES
|
||||
echo SQLITE_PORT?=databases/sqlite
|
||||
;;
|
||||
\"Recursor\")
|
||||
echo POWERDNS_WITH_RECURSOR=YES
|
||||
;;
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- modules/gsqlitebackend/Makefile.in Fri Mar 5 09:59:34 2004
|
||||
+++ modules/gsqlitebackend/Makefile.in Fri Mar 5 10:00:54 2004
|
||||
@@ -193,7 +193,7 @@
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
libgsqlitebackend.la: $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_DEPENDENCIES)
|
||||
- $(CXXLINK) -rpath $(libdir) $(libgsqlitebackend_la_LDFLAGS) $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_LIBADD) $(LIBS)
|
||||
+# $(CXXLINK) -rpath $(libdir) $(libgsqlitebackend_la_LDFLAGS) $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
|
@ -0,0 +1,10 @@
|
|||
--- modules/gsqlitebackend/ssqlite.cc Fri Mar 5 22:06:33 2004
|
||||
+++ modules/gsqlitebackend/ssqlite.cc Fri Mar 5 22:06:56 2004
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "pdns/utility.hh"
|
||||
#include <string>
|
||||
+#include <unistd.h>
|
||||
#include "ssqlite.hh"
|
||||
#include <iostream>
|
||||
|
|
@ -12,6 +12,10 @@
|
|||
#gpgsql-user=pdns
|
||||
#gpgsql-password=pdns
|
||||
|
||||
# SQLite
|
||||
#launch=gsqlite
|
||||
#gsqlite-database=<path to your SQLite database>
|
||||
|
||||
#################################
|
||||
# allow-axfr-ips If disabled, DO allow zonetransfers from these IP addresses
|
||||
#
|
||||
|
|
33
dns/powerdns-devel/files/pdns_sqlite.sql
Normal file
33
dns/powerdns-devel/files/pdns_sqlite.sql
Normal file
|
@ -0,0 +1,33 @@
|
|||
create table domains (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
master VARCHAR(20) DEFAULT NULL,
|
||||
last_check INTEGER DEFAULT NULL,
|
||||
type VARCHAR(6) NOT NULL,
|
||||
notified_serial INTEGER DEFAULT NULL,
|
||||
account VARCHAR(40) DEFAULT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX name_index ON domains(name);
|
||||
|
||||
CREATE TABLE records (
|
||||
id INTEGER PRIMARY KEY,
|
||||
domain_id INTEGER DEFAULT NULL,
|
||||
name VARCHAR(255) DEFAULT NULL,
|
||||
type VARCHAR(6) DEFAULT NULL,
|
||||
content VARCHAR(255) DEFAULT NULL,
|
||||
ttl INTEGER DEFAULT NULL,
|
||||
prio INTEGER DEFAULT NULL,
|
||||
change_date INTEGER DEFAULT NULL
|
||||
);
|
||||
|
||||
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
|
||||
);
|
||||
|
|
@ -15,4 +15,5 @@ etc/rc.d/pdns.sh.sample
|
|||
%%PORTDOCS%%share/examples/powerdns/pdns.conf
|
||||
%%PORTDOCS%%share/examples/powerdns/pdns_mysql.sql
|
||||
%%PORTDOCS%%share/examples/powerdns/pdns_postgresql.sql
|
||||
%%PORTDOCS%%share/examples/powerdns/pdns_sqlite.sql
|
||||
%%PORTDOCS%%@dirrm share/examples/powerdns
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
PORTNAME= powerdns
|
||||
PORTVERSION= 2.9.16
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= dns ipv6
|
||||
MASTER_SITES= http://downloads.powerdns.com/releases/
|
||||
DISTNAME= pdns-${PORTVERSION}
|
||||
|
@ -73,6 +73,15 @@ PLIST_SUB+= WITHLDAP=""
|
|||
PLIST_SUB+= WITHLDAP="@comment "
|
||||
.endif
|
||||
|
||||
.if defined(WITH_SQLITE)
|
||||
LIB_DEPENDS= sqlite.2:${PORTSDIR}/${SQLITE_PORT}
|
||||
SQLITE_PORT?= databases/sqlite
|
||||
CONFIGURE_ARGS+= --enable-sqlite
|
||||
CONFIGURE_MODULES+= "gsqlite"
|
||||
.else
|
||||
CONFIGURE_ARGS+= --disable-sqlite
|
||||
.endif
|
||||
|
||||
.if defined(POWERDNS_WITH_RECURSOR)
|
||||
USE_GCC=3.2
|
||||
CONFIGURE_ARGS+= --enable-recursor
|
||||
|
@ -123,7 +132,7 @@ post-install:
|
|||
.endif
|
||||
.if !defined(NOPORTDOCS)
|
||||
${MKDIR} ${EXAMPLESDIR}
|
||||
.for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql
|
||||
.for i in pdns.conf pdns_mysql.sql pdns_postgresql.sql pdns_sqlite.sql
|
||||
${INSTALL_DATA} ${FILESDIR}/$i ${EXAMPLESDIR}/
|
||||
.endfor
|
||||
.endif
|
||||
|
|
|
@ -11,7 +11,7 @@ if [ "${POWERDNS_OPTIONS}" ]; then
|
|||
else
|
||||
dialog --title "configuration options" --clear \
|
||||
--checklist "\n\
|
||||
Please select desired options:" -1 -1 8 \
|
||||
Please select desired options:" -1 -1 9 \
|
||||
PostgreSQL "PostgreSQL driver" ON \
|
||||
MySQL323 "MySQL 3.23 driver" OFF \
|
||||
MySQL40 "MySQL 4.0 driver" OFF \
|
||||
|
@ -19,6 +19,7 @@ MySQL41 "MySQL 4.1 driver" OFF \
|
|||
OpenLDAP20 "OpenLDAP 2.0 backend" OFF \
|
||||
OpenLDAP21 "OpenLDAP 2.1 backend" OFF \
|
||||
OpenLDAP22 "OpenLDAP 2.2 backend" OFF \
|
||||
SQLite "SQLite backend" OFF \
|
||||
Recursor "Build Recursor" OFF \
|
||||
2> /tmp/checklist.tmp.$$
|
||||
|
||||
|
@ -71,6 +72,10 @@ while [ "$1" ]; do
|
|||
echo WITH_LDAP=YES
|
||||
echo LDAP_PORT?=net/openldap22-client
|
||||
;;
|
||||
\"SQLite\")
|
||||
echo WITH_SQLITE=YES
|
||||
echo SQLITE_PORT?=databases/sqlite
|
||||
;;
|
||||
\"Recursor\")
|
||||
echo POWERDNS_WITH_RECURSOR=YES
|
||||
;;
|
||||
|
|
11
dns/powerdns/files/patch-modules_gsqlitebackend_Makefile_in
Normal file
11
dns/powerdns/files/patch-modules_gsqlitebackend_Makefile_in
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- modules/gsqlitebackend/Makefile.in Fri Mar 5 09:59:34 2004
|
||||
+++ modules/gsqlitebackend/Makefile.in Fri Mar 5 10:00:54 2004
|
||||
@@ -193,7 +193,7 @@
|
||||
clean-libLTLIBRARIES:
|
||||
-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
|
||||
libgsqlitebackend.la: $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_DEPENDENCIES)
|
||||
- $(CXXLINK) -rpath $(libdir) $(libgsqlitebackend_la_LDFLAGS) $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_LIBADD) $(LIBS)
|
||||
+# $(CXXLINK) -rpath $(libdir) $(libgsqlitebackend_la_LDFLAGS) $(libgsqlitebackend_la_OBJECTS) $(libgsqlitebackend_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT) core *.core
|
10
dns/powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc
Normal file
10
dns/powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- modules/gsqlitebackend/ssqlite.cc Fri Mar 5 22:06:33 2004
|
||||
+++ modules/gsqlitebackend/ssqlite.cc Fri Mar 5 22:06:56 2004
|
||||
@@ -6,6 +6,7 @@
|
||||
|
||||
#include "pdns/utility.hh"
|
||||
#include <string>
|
||||
+#include <unistd.h>
|
||||
#include "ssqlite.hh"
|
||||
#include <iostream>
|
||||
|
|
@ -12,6 +12,10 @@
|
|||
#gpgsql-user=pdns
|
||||
#gpgsql-password=pdns
|
||||
|
||||
# SQLite
|
||||
#launch=gsqlite
|
||||
#gsqlite-database=<path to your SQLite database>
|
||||
|
||||
#################################
|
||||
# allow-axfr-ips If disabled, DO allow zonetransfers from these IP addresses
|
||||
#
|
||||
|
|
33
dns/powerdns/files/pdns_sqlite.sql
Normal file
33
dns/powerdns/files/pdns_sqlite.sql
Normal file
|
@ -0,0 +1,33 @@
|
|||
create table domains (
|
||||
id INTEGER PRIMARY KEY,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
master VARCHAR(20) DEFAULT NULL,
|
||||
last_check INTEGER DEFAULT NULL,
|
||||
type VARCHAR(6) NOT NULL,
|
||||
notified_serial INTEGER DEFAULT NULL,
|
||||
account VARCHAR(40) DEFAULT NULL
|
||||
);
|
||||
|
||||
CREATE UNIQUE INDEX name_index ON domains(name);
|
||||
|
||||
CREATE TABLE records (
|
||||
id INTEGER PRIMARY KEY,
|
||||
domain_id INTEGER DEFAULT NULL,
|
||||
name VARCHAR(255) DEFAULT NULL,
|
||||
type VARCHAR(6) DEFAULT NULL,
|
||||
content VARCHAR(255) DEFAULT NULL,
|
||||
ttl INTEGER DEFAULT NULL,
|
||||
prio INTEGER DEFAULT NULL,
|
||||
change_date INTEGER DEFAULT NULL
|
||||
);
|
||||
|
||||
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
|
||||
);
|
||||
|
|
@ -15,4 +15,5 @@ etc/rc.d/pdns.sh.sample
|
|||
%%PORTDOCS%%share/examples/powerdns/pdns.conf
|
||||
%%PORTDOCS%%share/examples/powerdns/pdns_mysql.sql
|
||||
%%PORTDOCS%%share/examples/powerdns/pdns_postgresql.sql
|
||||
%%PORTDOCS%%share/examples/powerdns/pdns_sqlite.sql
|
||||
%%PORTDOCS%%@dirrm share/examples/powerdns
|
||||
|
|
Loading…
Reference in a new issue