]> granicus.if.org Git - pdns/commitdiff
hmm
authorBert Hubert <bert.hubert@netherlabs.nl>
Fri, 13 Dec 2002 13:24:34 +0000 (13:24 +0000)
committerBert Hubert <bert.hubert@netherlabs.nl>
Fri, 13 Dec 2002 13:24:34 +0000 (13:24 +0000)
git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@73 d19b8d6e-7fed-0310-83ef-9ca221ded41b

README
configure.in
makerelease [new file with mode: 0755]
modules/gmysqlbackend/Makefile.in
modules/gmysqlbackend/gmysqlbackend.cc
pdns/docs/pdns.sgml

diff --git a/README b/README
index dd2a25eafc7e45f669eadf597b4d833302744ccb..383bb142d18c705547ad51596d052e44bcd0772a 100644 (file)
--- 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
 -------------
index dc1ad0a1b73e440ebb181c109b002b04d3c25be0..73ea9b8ecb2a7d3514c68e052f7d5e371059ec9b 100644 (file)
@@ -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 (executable)
index 0000000..e5b214f
--- /dev/null
@@ -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
index a9d42279d59730a6ee50befbdc45a141643083ef..635d06b14bce12cd2434f21978830b3bec39c1ac 100644 (file)
@@ -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)
index 4388d93799dc4202388046e68816bfb15159a092..49c4af835e1583993de5063fd01caf26ffa62630 100644 (file)
@@ -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 <string>
 #include <map>
 
@@ -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)
index 9743ff41006a49cafc8cca9f1a8662f0fae58a91..23f098ef72e3498ed10df87943ab078539f31b37 100644 (file)
@@ -15,7 +15,7 @@
       </affiliation>
     </author>
     
-    <PubDate>v2.1 $Date: 2002/12/12 19:53:20 $</PubDate>
+    <PubDate>v2.1 $Date: 2002/12/13 13:24:34 $</PubDate>
     
     <Abstract>
        <para>  
       </para>
       <sect2 id="changelog-2-9-2"><title>Version 2.9.2</title> 
        <para>
-         Bugfixes galore. Solaris porting created some issues on all platforms. Bugs fixed:
+         Bugfixes galore. Solaris porting created some issues on all platforms. 
        </para>
+       <warning>
+         <para>
+           The Generic MySQL backend, part of the Generic MySQL &amp; 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.
+         </para>
+         <para>
+           To get back the mysql backend, add --with-modules="mysql" or --with-dynmodules="mysql" if you prefer to load your modules at runtime.
+         </para>
+       </warning>
        <para>
+         Bugs fixed:
          <itemizedlist>
            <listitem>
              <para>
            </listitem>
          </itemizedlist>
        </para>
+       <para>
+         Documentation:
+         <itemizedlist>
+           <listitem>
+             <para>
+               Documented the 'random backend', see <xref linkend="randombackend">.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Wichert Akkerman contributed three manpages.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               Building PowerDNS on Unix is now documented somewhat more, see <xref linkend="on-unix">.
+             </para>
+           </listitem>
+         </itemizedlist>
+       </para>
        <para>
          Features:
          <itemizedlist>
            </listitem>
            <listitem>
              <para>
-               Mysterious xdb backend added - see <xref linkend="xdbbackend">.
+               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.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               ODBC backend (for Windows only) was missing from the distribution, now added.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               xdb backend added - see <xref linkend="xdbbackend">. Designed for use by root-server operators.
+             </para>
+           </listitem>
+           <listitem>
+             <para>
+               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. 
              </para>
            </listitem>
          </itemizedlist>
@@ -4413,6 +4461,8 @@ local0.err                        /var/log/pdns.err
              <row><entry>Superslave</entry><entry>No</entry></row>
              <row><entry>Autoserial</entry><entry>No</entry></row>
              <row><entry>Case</entry><entry>Depends</entry></row>
+             <row><entry>Module name</entry><entry>pipe</entry></row>
+             <row><entry>Lauch name</entry><entry>pipe</entry></row>
            </tbody>
          </tgroup>
        </table>
@@ -4670,6 +4720,17 @@ while(&lt;&gt;)
                  
     </sect1>
     <sect1 id="mysqlbackend"><Title>MySQL backend</title>
+      <para>
+       <warning>
+         <para>
+           This backend is deprecated! Use the Generic MySQL backend which is better in <emphasis>all</emphasis> respects.
+           It does support master/slave operation, this backend does not. See <xref linkend="generic-mypgsql-backends">.
+         </para>
+         <para>
+           So stop reading here unless you already have a database filled with 'mysql' records.
+         </para>
+       </warning>
+      </para>
       <para>
        <table>
          <title>MySQL backend capabilities</title>
@@ -4681,6 +4742,8 @@ while(&lt;&gt;)
              <row><entry>Superslave</entry><entry>No</entry></row>
              <row><entry>Autoserial</entry><entry>Yes</entry></row>
              <row><entry>Case</entry><entry>Insensitive</entry></row>
+             <row><entry>Module name</entry><entry>mysql</entry></row>
+             <row><entry>Lauch name</entry><entry>mysql</entry></row>
            </tbody>
          </tgroup>
        </table>
@@ -4781,6 +4844,53 @@ while(&lt;&gt;)
       </sect2>
       
     </sect1>
+    <sect1 id="randombackend"><title>Random Backend</title>
+      <para>
+       <table>
+         <title>Random Backend capabilities</title>
+         <tgroup cols=2>
+           <tbody>
+             <row><entry>Native</entry><entry>Yes</entry></row>
+             <row><entry>Master</entry><entry>No</entry></row>
+             <row><entry>Slave</entry><entry>No</entry></row>
+             <row><entry>Superslave</entry><entry>No</entry></row>
+             <row><entry>Autoserial</entry><entry>No</entry></row>
+             <row><entry>Case</entry><entry>Depends</entry></row>
+             <row><entry>Module name</entry><entry>built in</entry></row>
+             <row><entry>Lauch name</entry><entry>random</entry></row>
+           </tbody>
+         </tgroup>
+       </table>
+      </para>
+      <para>
+       This is a very silly backend which is discussed in <xref linkend="simple-backends"> as a demonstration on
+       how to write a PowerDNS backend.
+      </para>
+      <para>
+       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.
+      </para>
+      <para>
+       It only makes sense to load the random backend in combination with a regular backend. This can be done by prepending
+       it to the <command>launch=</command> instruction, such as <command>launch=random,gmysql</command>.
+      </para>
+      <para>
+       Variables:
+      </para>
+      <para>
+       <variablelist>
+         <varlistentry>
+           <term>random-hostname</term>
+           <listitem>
+             <para>
+               Hostname for which to supply a random IP address.
+             </para>
+           </listitem>
+         </varlistentry>
+       </variablelist>
+      </para>
+    </sect1>
+
     <sect1 id="pdnsbackend"><Title>MySQL PDNS backend</title>
       <para>
        <table>
@@ -4793,6 +4903,8 @@ while(&lt;&gt;)
              <row><entry>Superslave</entry><entry>No</entry></row>
              <row><entry>Autoserial</entry><entry>Yes</entry></row>
              <row><entry>Case</entry><entry>Insensitive</entry></row>
+             <row><entry>Module name</entry><entry>pdns</entry></row>
+             <row><entry>Lauch name</entry><entry>pdns</entry></row>
            </tbody>
          </tgroup>
        </table>
@@ -4862,13 +4974,14 @@ while(&lt;&gt;)
          <title>Generic PgSQL and MySQL backend capabilities</title>
          <tgroup cols=2>
            <tbody>
-             <row><entry>Module name</entry><entry>gpgsql / gmysql</entry></row>
              <row><entry>Native</entry><entry>Yes - but PostgreSQL does not replicate</entry></row>
              <row><entry>Master</entry><entry>Yes</entry></row>
              <row><entry>Slave</entry><entry>Yes</entry></row>
              <row><entry>Superslave</entry><entry>Yes</entry></row>
              <row><entry>Autoserial</entry><entry>Yes</entry></row>
              <row><entry>Case</entry><entry>All lower</entry></row>
+             <row><entry>Module name</entry><entry>pgmysql</entry></row>
+             <row><entry>Lauch name</entry><entry>gmysql and gpgsql2</entry></row>
            </tbody>
          </tgroup>
        </table>
@@ -4886,12 +4999,6 @@ while(&lt;&gt;)
       </para>
       <sect2><title>MySQL specifics</title>
        <para>
-         <warning>
-           <para>
-             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.
-           </para>
-         </warning>
          <warning>
            <para>
              If using MySQL with 'slave' support enabled in PowerDNS you <emphasis>must</emphasis> run MySQL with a table engine that supports transactions.
@@ -5298,6 +5405,9 @@ GRANT ALL ON records_id_seq TO pdns;
              <row><entry>Slave</entry><entry>No</entry></row>
              <row><entry>Superslave</entry><entry>No</entry></row>
              <row><entry>Autoserial</entry><entry>Yes</entry></row>
+             <row><entry>Module name</entry><entry>oracle</entry></row>
+             <row><entry>Launch name</entry><entry>oracle</entry></row>
+
            </tbody>
          </tgroup>
        </table>
@@ -5502,13 +5612,15 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE
              <row><entry>Slave</entry><entry>No</entry></row>
              <row><entry>Superslave</entry><entry>No</entry></row>
              <row><entry>Autoserial</entry><entry>Yes</entry></row>
+             <row><entry>Module name</entry><entry>db2</entry></row>
+             <row><entry>Launch name</entry><entry>db2</entry></row>
+
            </tbody>
          </tgroup>
        </table>
       </para>
       <para>
-       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. 
       </para>
       <para>
        The DB2 backend executes the following queries:
@@ -5590,6 +5702,8 @@ insert into Records (id,ZoneId, name,type,content,TimeToLive,Priority) select RE
              <row><entry>Slave</entry><entry>Experimental</entry></row>
              <row><entry>Superslave</entry><entry>No</entry></row>
              <row><entry>Autoserial</entry><entry>No</entry></row>
+             <row><entry>Module name</entry><entry>none (built in)</entry></row>
+             <row><entry>Launch</entry><entry>bind</entry></row>
            </tbody>
          </tgroup>
        </table>
@@ -6683,10 +6797,26 @@ static RandomLoader randomloader;
 
   </appendix>
   <appendix id="compiling-powerdns"><title>Compiling PowerDNS</title>
-    <para>
-      For now, see <ulink url="http://www.powerdns.org">the Open Source PowerDNS site</ulink>. 
-      <command>./configure --enable-mysql ; make ; make install</command> will do The Right Thing for most people.
-    </para>
+    <sect1 id="on-unix"><title>Compiling PowerDNS on Unix</title>
+      <para>
+       <note><para>
+           For now, see <ulink url="http://www.powerdns.org">the Open Source PowerDNS site</ulink>. 
+           <command>./configure ; make ; make install</command> will do The Right Thing for most people.
+         </para></note>
+      </para>
+      <para>
+       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.
+      </para>
+      <para>
+       To compile in modules, specify them as <command>--with-modules="mod1 mod2 mod3"</command>, substituting the desired module names.
+       Each backend has a module name in the table at the beginning of its section.
+      </para>
+      <para>
+       To compile a module for inclusion at runtime, which is great if you are a unix vendor, use <command>--with-dynmodules="mod1 mod2 mod3"</command>.
+       These modules then end up as .so files in the compiled libdir. 
+      </para>
+    </sect1>
     <sect1 id="on-windows"><title>Compiling PowerDNS on Windows</title>
       <para>
        By Michel Stol (<email>michel@powerdns.com</email>).