ports/63817: Add configuration option for SQLite backend

Ralf van der Enden tremere at cainites.net
Fri Mar 5 22:20:01 UTC 2004


>Number:         63817
>Category:       ports
>Synopsis:       Add configuration option for SQLite backend
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Fri Mar 05 14:20:00 PST 2004
>Closed-Date:
>Last-Modified:
>Originator:     Ralf van der Enden
>Release:        FreeBSD 5.2.1-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD lan.cainites.net 5.2.1-RELEASE-p1 FreeBSD 5.2.1-RELEASE-p1 #0: Wed Mar 3 19:01:05 CET 2004 root at lan.cainites.net:/usr/obj/usr/src/sys/HELLKERNEL i386


	
>Description:
- Add support for the SQLite backend, bump PORTREVISION 
>How-To-Repeat:
	
>Fix:

	

--- pdns-2.9.16_2.diff begins here ---
diff -ruN powerdns.orig/Makefile powerdns/Makefile
--- powerdns.orig/Makefile	Tue Mar  2 20:27:58 2004
+++ powerdns/Makefile	Fri Mar  5 22:09:37 2004
@@ -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="@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 @@
 .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
diff -ruN powerdns.orig/files/configure.powerdns powerdns/files/configure.powerdns
--- powerdns.orig/files/configure.powerdns	Tue Nov 18 14:34:59 2003
+++ powerdns/files/configure.powerdns	Fri Mar  5 22:09:37 2004
@@ -11,7 +11,7 @@
 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 @@
 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.$$
 
@@ -70,6 +71,10 @@
 		\"OpenLDAP22\")
 			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
diff -ruN powerdns.orig/files/patch-modules_gsqlitebackend_Makefile_in powerdns/files/patch-modules_gsqlitebackend_Makefile_in
--- powerdns.orig/files/patch-modules_gsqlitebackend_Makefile_in	Thu Jan  1 01:00:00 1970
+++ powerdns/files/patch-modules_gsqlitebackend_Makefile_in	Fri Mar  5 22:09:37 2004
@@ -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
diff -ruN powerdns.orig/files/patch-modules_gsqlitebackend_ssqlite_cc powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc
--- powerdns.orig/files/patch-modules_gsqlitebackend_ssqlite_cc	Thu Jan  1 01:00:00 1970
+++ powerdns/files/patch-modules_gsqlitebackend_ssqlite_cc	Fri Mar  5 22:09:37 2004
@@ -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>
+ 
diff -ruN powerdns.orig/files/pdns.conf powerdns/files/pdns.conf
--- powerdns.orig/files/pdns.conf	Mon Jan 20 07:10:35 2003
+++ powerdns/files/pdns.conf	Fri Mar  5 22:09:37 2004
@@ -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
 #
diff -ruN powerdns.orig/files/pdns_sqlite.sql powerdns/files/pdns_sqlite.sql
--- powerdns.orig/files/pdns_sqlite.sql	Thu Jan  1 01:00:00 1970
+++ powerdns/files/pdns_sqlite.sql	Fri Mar  5 22:09:37 2004
@@ -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
+);
+
diff -ruN powerdns.orig/pkg-plist powerdns/pkg-plist
--- powerdns.orig/pkg-plist	Sat Feb 28 21:03:50 2004
+++ powerdns/pkg-plist	Fri Mar  5 22:09:37 2004
@@ -15,4 +15,5 @@
 %%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
--- pdns-2.9.16_2.diff ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list