From: Bert Hubert Date: Fri, 13 Dec 2002 13:24:34 +0000 (+0000) Subject: hmm X-Git-Tag: pdns-2.9.2~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d022a079f8863c4ff8eee3a51a53472f15b4caed;p=pdns hmm git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@73 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/README b/README index dd2a25eaf..383bb142d 100644 --- a/README +++ b/README @@ -1,21 +1,23 @@ PowerDNS is copyright 2002 by PowerDNS.COM BV -To compile a very basic version, use: +To compile a very clean version, use: $ ./configure --with-modules="" $ make # make install This generates a PowerDNS binary with no modules, except the bind backend, -built in. When ./configure is run without --with-modules, the mysql module -is built by default. +built in. When ./configure is run without --with-modules, the mysql and +pgmysql modules is built by default, with the latter only supporting mysql. To add multiple modules, try: -$ ./configure --with-modules="mysql pgmysql" --enable-mysql --enable-pgsql +$ ./configure --with-modules="pipe pgmysql" --enable-mysql --enable-pgsql See http://rtfm.powerdns.com/compiling-powerdns.html for more details. +Please don't use the 'mysql' backend, it is deprecated. Use the 'gmysql' one +that is in the pgmysql Generic PostgreSQL and MySQL module! SOLARIS NOTES ------------- diff --git a/configure.in b/configure.in index dc1ad0a1b..73ea9b8ec 100644 --- a/configure.in +++ b/configure.in @@ -163,7 +163,7 @@ fi -modules="mysql" +modules="pgmysql" AC_ARG_WITH(modules, [ --with-modules Which userbases to compile with ], [ modules="$withval" @@ -184,19 +184,19 @@ AC_ARG_WITH(socketdir, [ --with-socketdir Where the controlsocket lives ], socketdir="$withval" ]) -domysql=yes AC_MSG_CHECKING(whether we to include mysql support in the generic backend) AC_ARG_ENABLE(mysql, - [ --enable-mysql Whether to include MySQL support in generic backend],domysql=yes,domysql=) - -AC_MSG_RESULT($domysql) + [ --enable-mysql Whether to include MySQL support in generic backend],enable_mysql=$enableval,enable_mysql=yes) +AC_MSG_RESULT($enable_mysql) +domysql=$enable_mysql AC_SUBST(domysql) -AC_MSG_CHECKING(whether we to include pgsql support in the generic backend) -AC_ARG_ENABLE(pgsql, - [ --enable-pgsql Whether to include PgSQL support in generic backend],dopgsql=yes,dopgsql=) -AC_MSG_RESULT($dopgsql) +AC_MSG_CHECKING(whether we to include PostgreSQL support in the generic backend) +AC_ARG_ENABLE(pgsql, + [ --enable-pgsql Whether to include PostgreSQL support in generic backend],enable_pgsql=$enableval,enable_pgsql=no) +AC_MSG_RESULT($enable_pgsql) +dopgsql=$enable_pgsql AC_SUBST(dopgsql) @@ -208,11 +208,11 @@ for a in $modules $dynmodules do case "$a" in pgmysql ) - if test "$dopgsql" + if test x"$dopgsql" = xyes then needpgsql=yes fi - if test "$domysql" + if test x"$domysql" = xyes then needmysql=yes fi @@ -347,6 +347,7 @@ then # LIBS="$LIBS -lpq++ -lpq -lssl -lcrypt -lcrypto" fi +rm -f $srcdir/modules/pgmysqlbackend/OBJECTFILES $srcdir/modules/pgmysqlbackend/OBJECTLIBS for a in $modules do @@ -354,19 +355,18 @@ do case "$a" in pgmysql) - rm -f $srcdir/modules/pgmysqlbackend/OBJECTFILES $srcdir/modules/pgmysqlbackend/OBJECTLIBS - echo gmysqlbackend.o > $srcdir/modules/pgmysqlbackend/OBJECTFILES + echo -n "gmysqlbackend.o " > $srcdir/modules/pgmysqlbackend/OBJECTFILES if test -n "$domysql" then - echo smysql.o >> $srcdir/modules/pgmysqlbackend/OBJECTFILES - echo -lmysql >> $srcdir/modules/pgmysqlbackend/OBJECTLIBS + echo -n "smysql.o " >> $srcdir/modules/pgmysqlbackend/OBJECTFILES + echo -n "-lmysql " >> $srcdir/modules/pgmysqlbackend/OBJECTLIBS fi if test -n "$dopgsql" then - echo spgsql.o >> $srcdir/modules/pgmysqlbackend/OBJECTFILES - echo -lpq++ -lpq -lssl -lcrypt -lcrypto >> $srcdir/modules/pgmysqlbackend/OBJECTLIBS + echo -n "spgsql.o " >> $srcdir/modules/pgmysqlbackend/OBJECTFILES + echo -n "-lpq++ -lpq -lssl -lcrypt -lcrypto " >> $srcdir/modules/pgmysqlbackend/OBJECTLIBS fi ;; esac diff --git a/makerelease b/makerelease new file mode 100755 index 000000000..e5b214fed --- /dev/null +++ b/makerelease @@ -0,0 +1,5 @@ +#!/bin/sh +fakeroot debian/rules clean +rm -r debian/*~ +./configure --with-modules="mysql pdns pgmysql oracle db2 xdb odbc xdb pipe" --enable-pgsql +make dist diff --git a/modules/gmysqlbackend/Makefile.in b/modules/gmysqlbackend/Makefile.in index a9d42279d..635d06b14 100644 --- a/modules/gmysqlbackend/Makefile.in +++ b/modules/gmysqlbackend/Makefile.in @@ -9,18 +9,20 @@ PGSQL_INCLUDES = @PGSQL_incdir@ PGSQL_LIB = @PGSQL_lib@ PGSQL_LIBS = -Wl,-Bstatic -lpq++ -lpq -Wl,-Bdynamic -lssl -lcrypt -lcrypto +CXXFLAGS=@CXXFLAGS@ + INCLUDES=-I$(PDNS_HOME) -I../.. dopgsql=@dopgsql@ domysql=@domysql@ -ifneq ($(dopgsql),) +ifneq ($(dopgsql),no) TARGETS:=spgsql.o CXXFLAGS:=-DPDNS_DOPGSQL -I$(PGSQL_INCLUDES) $(CXXFLAGS) ELIBS:=$(PGSQL_LIB) $(PGSQL_LIBS) endif -ifneq ($(domysql),) +ifneq ($(domysql),no) TARGETS:=$(TARGETS) smysql.o CXXFLAGS:=-DPDNS_DOMYSQL -I$(MYSQL_INCLUDES) $(CXXFLAGS) ELIBS:=$(MYSQL_LIB) $(MYSQL_LIBS) $(ELIBS) diff --git a/modules/gmysqlbackend/gmysqlbackend.cc b/modules/gmysqlbackend/gmysqlbackend.cc index 4388d9379..49c4af835 100644 --- a/modules/gmysqlbackend/gmysqlbackend.cc +++ b/modules/gmysqlbackend/gmysqlbackend.cc @@ -1,4 +1,4 @@ -// $Id: gmysqlbackend.cc,v 1.4 2002/12/09 18:34:45 ahu Exp $ +// $Id: gmysqlbackend.cc,v 1.5 2002/12/13 13:24:34 ahu Exp $ #include #include @@ -392,7 +392,7 @@ bool gMySQLBackend::feedRecord(const DNSResourceRecord &r) catch (SSqlException &e) { throw AhuException(e.txtReason()); } - + return true; // XXX FIXME this API should not return 'true' I think -ahu } bool gMySQLBackend::startTransaction(const string &domain, int domain_id) diff --git a/pdns/docs/pdns.sgml b/pdns/docs/pdns.sgml index 9743ff410..23f098ef7 100644 --- a/pdns/docs/pdns.sgml +++ b/pdns/docs/pdns.sgml @@ -15,7 +15,7 @@ - v2.1 $Date: 2002/12/12 19:53:20 $ + v2.1 $Date: 2002/12/13 13:24:34 $ @@ -87,9 +87,20 @@ Version 2.9.2 - Bugfixes galore. Solaris porting created some issues on all platforms. Bugs fixed: + Bugfixes galore. Solaris porting created some issues on all platforms. + + + The Generic MySQL backend, part of the Generic MySQL & PostgreSQL backend, is now the DEFAULT! The previous default, the + 'mysql' backend (note the lack of 'g') is now DEPRECATED. This was the source of much confusion. The 'mysql' backend + does not support MASTER or SLAVE operation. The Generic backends do. + + + To get back the mysql backend, add --with-modules="mysql" or --with-dynmodules="mysql" if you prefer to load your modules at runtime. + + + Bugs fixed: @@ -127,6 +138,26 @@ + + Documentation: + + + + Documented the 'random backend', see . + + + + + Wichert Akkerman contributed three manpages. + + + + + Building PowerDNS on Unix is now documented somewhat more, see . + + + + Features: @@ -137,7 +168,24 @@ - Mysterious xdb backend added - see . + OpenBSD is on its way of becoming a supported platform! As of 2.9.2, PowerDNS compiles on OpenBSD but swiftly crashes. + Help is welcome. + + + + + ODBC backend (for Windows only) was missing from the distribution, now added. + + + + + xdb backend added - see . Designed for use by root-server operators. + + + + + Dynamic modules are back which is good news for distributors who want to make a pdns packages that does not + depend one every database under the sun. @@ -4413,6 +4461,8 @@ local0.err /var/log/pdns.err SuperslaveNo AutoserialNo CaseDepends + Module namepipe + Lauch namepipe @@ -4670,6 +4720,17 @@ while(<>) MySQL backend + + + + This backend is deprecated! Use the Generic MySQL backend which is better in all respects. + It does support master/slave operation, this backend does not. See . + + + So stop reading here unless you already have a database filled with 'mysql' records. + + + MySQL backend capabilities @@ -4681,6 +4742,8 @@ while(<>) SuperslaveNoAutoserialYesCaseInsensitive + Module namemysql + Lauch namemysql
@@ -4781,6 +4844,53 @@ while(<>)
+ Random Backend + + + Random Backend capabilities + + + NativeYes + MasterNo + SlaveNo + SuperslaveNo + AutoserialNo + CaseDepends + Module namebuilt in + Lauch namerandom + + +
+
+ + This is a very silly backend which is discussed in as a demonstration on + how to write a PowerDNS backend. + + + This backend knows about only one hostname, and only about its IP address at that. With every query, + a new random IP address is generated. + + + It only makes sense to load the random backend in combination with a regular backend. This can be done by prepending + it to the launch= instruction, such as launch=random,gmysql. + + + Variables: + + + + + random-hostname + + + Hostname for which to supply a random IP address. + + + + + +
+ MySQL PDNS backend @@ -4793,6 +4903,8 @@ while(<>) SuperslaveNoAutoserialYesCaseInsensitive + Module namepdns + Lauch namepdns
@@ -4862,13 +4974,14 @@ while(<>) Generic PgSQL and MySQL backend capabilities - Module namegpgsql / gmysql NativeYes - but PostgreSQL does not replicate MasterYes SlaveYes SuperslaveYes AutoserialYes CaseAll lower + Module namepgmysql + Lauch namegmysql and gpgsql2 @@ -4886,12 +4999,6 @@ while(<>)
MySQL specifics - - - As of 2.3, the Generic MySQL backend has not been tested a lot. Use the regular MySQL backend if unsure! Especially 'master' support is - very new. - - If using MySQL with 'slave' support enabled in PowerDNS you must run MySQL with a table engine that supports transactions. @@ -5298,6 +5405,9 @@ GRANT ALL ON records_id_seq TO pdns; SlaveNo SuperslaveNo AutoserialYes + Module nameoracle + Launch nameoracle + @@ -5502,13 +5612,15 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE SlaveNo SuperslaveNo AutoserialYes + Module namedb2 + Launch namedb2 + - PowerDNS is currently ascertaining if this backend can be distributed in binary form without violating IBM DB2 licensing. If you have a DB2 license, - please contact pdns@powerdns.com so we can ship you a copy of this driver. + PowerDNS is currently ascertaining if this backend can be distributed in binary form without violating IBM DB2 licensing. The DB2 backend executes the following queries: @@ -5590,6 +5702,8 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE SlaveExperimental SuperslaveNo AutoserialNo + Module namenone (built in) + Launchbind @@ -6683,10 +6797,26 @@ static RandomLoader randomloader; Compiling PowerDNS - - For now, see the Open Source PowerDNS site. - ./configure --enable-mysql ; make ; make install will do The Right Thing for most people. - + Compiling PowerDNS on Unix + + + For now, see the Open Source PowerDNS site. + ./configure ; make ; make install will do The Right Thing for most people. + + + + PowerDNS can becompiled with modules built in, or with modules designed to be loaded at runtime. All that is configured + before compiling using the well known autoconf/automake system. + + + To compile in modules, specify them as --with-modules="mod1 mod2 mod3", substituting the desired module names. + Each backend has a module name in the table at the beginning of its section. + + + To compile a module for inclusion at runtime, which is great if you are a unix vendor, use --with-dynmodules="mod1 mod2 mod3". + These modules then end up as .so files in the compiled libdir. + + Compiling PowerDNS on Windows By Michel Stol (michel@powerdns.com).