SUBDIRS=modules pdns
-EXTRA_DIST=TODO WARNING README HACKING INSTALL ChangeLog debian
+EXTRA_DIST=TODO WARNING README HACKING INSTALL ChangeLog debian pdns.spec
install-exec-local:
@echo "***********************************************************"
SOLARIS NOTES
-------------
-You need gcc 3.x, preferably 3.2!
+You need gcc 3.x, preferably 3.2! The 'Sunpro' compiler is currently not
+supported (patches are welcome if not too intrusive).
If you encounter problems with the Solaris make, gmake is advised
IPv6 is currently (2.9.1.) broken in Solaris, awaiting patches!
AC_TYPE_SIGNAL
AC_CHECK_FUNCS(gethostname gettimeofday mkdir mktime select socket strerror)
-AC_CHECK_LIB(resolv, inet_ntop)
+#AC_CHECK_LIB(resolv, inet_ntop)
-dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
+#dnl AC_MSG_NOTICE([Looking in libraries: $LIBS])
-AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop))
-AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
+#AC_CHECK_FUNCS(inet_ntop, , AC_LIBOBJ(lib/inet_ntop))
+#AC_CHECK_FUNCS(inet_pton, , AC_LIBOBJ(lib/inet_pton))
#
fi
fi
+DYNLINKFLAGS=""
case "$host_os" in
-solaris2*)
+solaris2.8 | solaris2.9 )
AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined])
AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype])
- LIBS="-lposix4 -lnsl -lsocket -lpthread $LIBS"
+ AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+ LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS"
+ CXXFLAGS="-D_REENTRANT $CXXFLAGS"
+ ;;
+solaris2.6 | solaris2.7)
+ AC_DEFINE(NEED_POSIX_TYPEDEF,,[If POSIX typedefs need to be defined])
+ AC_DEFINE(NEED_INET_NTOP_PROTO,,[If your OS is so broken that it needs an additional prototype])
+ LIBS="-lposix4 -lresolv -lnsl -lsocket -lpthread $LIBS"
CXXFLAGS="-D_REENTRANT $CXXFLAGS"
;;
linux*)
AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+ DYNLINKFLAGS="-rdynamic"
LDFLAGS="-pthread $LDFLAGS"
CXXFLAGS="-pthread -D_GNU_SOURCE $CXXFLAGS"
;;
*)
AC_DEFINE(HAVE_IPV6,1,[If the host operating system understands IPv6])
+ DYNLINKFLAGS="-rdynamic"
LDFLAGS="-pthread $LDFLAGS"
CXXFLAGS="-pthread $CXXFLAGS"
;;
esac
+AC_SUBST(DYNLINKFLAGS)
+
AC_MSG_CHECKING(whether we will be doing verbose logging)
AC_ARG_ENABLE(verbose-logging,
[ --enable-verbose-logging Do verbose logging],enable_verbose_logging=yes ,enable_verbose_logging=no)
pdns/backends/Makefile pdns/backends/bind/Makefile pdns/pdns \
modules/mysqlbackend/Makefile modules/pdnsbackend/Makefile \
modules/pgmysqlbackend/Makefile modules/db2backend/Makefile \
-modules/pipebackend/Makefile )
+modules/pipebackend/Makefile modules/oraclebackend/Makefile)
+++ /dev/null
-##
-## File : Makefile
-## Author : Stefan Arentz
-## Project : PowerDNS
-## Version : $Id: Makefile,v 1.1 2002/11/27 15:35:52 ahu Exp $
-##
-
-ORACLE_HOME = /opt/oracle
-PDNS_HOME = ../ahudns
-
-INCLUDE = -I$(ORACLE_HOME)/rdbms/demo \
- -I$(ORACLE_HOME)/rdbms/public \
- -I$(PDNS_HOME)
-VERSION=2.1
-
-all: liboraclebackend.so
-
-
-DIRNAME=pdns-oraclebackend-$(VERSION)
-
-dist:
- mkdir $(DIRNAME)
- cp oraclebackend.cc oraclebackend.hh Makefile README LICENSE $(DIRNAME)
-
- tar cvzf $(DIRNAME).tar.gz $(DIRNAME)
- rm -rf $(DIRNAME)
-
-
-liboraclebackend.so: oraclebackend.o
- g++ -shared -o liboraclebackend.so oraclebackend.o -L$(ORACLE_HOME)/lib -lclntsh -lwtc8
-
-liboraclebackend.o: oraclebackend.cc oraclebackend.hh
-
-install: liboraclebackend.so
- cp liboraclebackend.so /usr/lib/powerdns/
-
-.SUFFIXES:
-.SUFFIXES: .cc .o
-
-.cc.o:
- g++ -g -c $(LCFLAGS) $(INCLUDE) $<
-
-clean:
- rm -f *.o *.so
-
--- /dev/null
+##
+## File : Makefile
+## Author : Stefan Arentz
+## Project : PowerDNS
+## Version : $Id: Makefile.in,v 1.1 2002/12/10 13:36:26 ahu Exp $
+##
+
+ORACLE_HOME = /opt/oracle
+PDNS_HOME = ../../pdns
+
+INCLUDE = -I$(ORACLE_HOME)/rdbms/demo \
+ -I$(ORACLE_HOME)/rdbms/public \
+ -I$(PDNS_HOME) -I../..
+VERSION=2.1
+
+all: oraclebackend.o
+
+install:
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+DISTFILES=*.cc *.hh Makefile.in OBJECTFILES OBJECTLIBS
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+ @for file in $(DISTFILES); do \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+ $(mkinstalldirs) "$(distdir)/$$dir"; \
+ fi; \
+ if test -d $$d/$$file; then \
+ cp -pR $$d/$$file $(distdir) \
+ || exit 1; \
+ else \
+ test -f $(distdir)/$$file \
+ || cp -p $$d/$$file $(distdir)/$$file \
+ || exit 1; \
+ fi; \
+ done
+
+
+.cc.o:
+ g++ -g -c $(CXXFLAGS) $(INCLUDE) $<
+
+clean:
+ rm -f *.o *.so *~
+
--- /dev/null
+oraclebackend.o
--- /dev/null
+-ldl -L/opt/oracle/lib -ldl -lclient8 -ldl -lclntst8
\ No newline at end of file
EXTRA_DIST = codedocs/Makefile codedocs/doxygen.conf docs/Makefile \
docs/gslb-operations.sgml docs/powerdns-case.sgml docs/powerdns-install.sgml \
docs/powerdns-overview.sgml docs/powerdns-technical.sgml \
-pdns.spec release-scripts/ docs/pdns.sgml \
-choosepaths mtasker.cc
+ release-scripts/ docs/pdns.sgml mtasker.cc
noinst_SCRIPTS = pdns
sysconf_DATA = pdns.conf-dist
backends/bind/huffman.cc
#
-pdns_server_LDFLAGS=-rdynamic @LIBDL@ @moduleobjects@ @modulelibs@
+pdns_server_LDFLAGS=@DYNLINKFLAGS@ @LIBDL@ @moduleobjects@ @modulelibs@
pdns_server_INCLUDES=
+++ /dev/null
-#!/bin/sh
-IB="dialog --inputbox"
-MB="dialog --msgbox"
-YN="dialog --yesno"
-
-. ./pathconfig
-
-$MB "\nWelcome to the PowerDNS installation program!\n\nPlease select \
-locations for the different PowerDNS files." 11 60
-
-redo=1
-while [ "$redo" = "1" ]
-do
-echo $redo
-
-askPath()
-{
- val=`eval echo \\$$2`
- $IB "$1\n\n" 10 60 $val 2> ./dialog.tmp
- if [ "$?" != "0" ] ; then exit ; fi
- eval $2=`cat ./dialog.tmp`
-}
-
-askPath "Intended location of your init.d scripts" INITDPATH
-askPath "Intended location of your binaries" BINARYPATH
-askPath "Intended location of your configuration files" CONFIGPATH
-askPath "Intended location of the controlsocket directory" SOCKETPATH
-askPath "Intended location of the PowerDNS plugins directory" LIBRARYPATH
-askPath "Intended location of the PowerDNS documentation directory" DOCPATH
-
-$MB "\nPowerDNS can be configured to run as an\n\
-unprivileged user.\n\
-This is highly recommended. You should\n\
-now create a user and a group for PDNS\n\
-to run as and then press enter, \n\
-after which you will be asked for\n\
-the identity." 15 60
-
-askPath "Intended user id for PDNS to run as" PDNSUID
-askPath "Intended group id for PDNS to run as" PDNSGID
-
-$YN "Do you accept these values?\n\ninit.d: $INITDPATH\n\
-binaries: $BINARYPATH\n\
-configuration: $CONFIGPATH\n\
-sockets: $SOCKETPATH\n\
-plugins: $LIBRARYPATH\n\
-documentation: $DOCPATH\n\
-uid: $PDNSUID\n\
-gid: $PDNSGID\n" 15 60
-redo=$?
-echo $ready
-done
-
-mv pathconfig pathconfig.old 2> /dev/null > /dev/null
-
-(echo INITDPATH=$INITDPATH
-echo BINARYPATH=$BINARYPATH
-echo CONFIGPATH=$CONFIGPATH
-echo SOCKETPATH=$SOCKETPATH
-echo LIBRARYPATH=$LIBRARYPATH
-echo PDNSUID=$PDNSUID
-echo DOCPATH=$DOCPATH
-echo PDNSGID=$PDNSGID) > pathconfig
-
-$MB "\nDone recording your directory preferences." 7 70
-
-
</affiliation>
</author>
- <PubDate>v2.1 $Date: 2002/12/09 16:24:17 $</PubDate>
+ <PubDate>v2.1 $Date: 2002/12/10 13:36:26 $</PubDate>
<Abstract>
<para>
Before proceeding, it is advised to check the release notes for your PDNS version, as specified in the name of the distribution
file.
</para>
+ <sect2 id="changelog-2-9-1"><title>Version 2.9.1</title>
+ <para>
+ Thanks to the great enthusiasm from around the world, powerdns is now available for Solaris and FreeBSD users again!
+ Furthermore, the Windows build is back. We are very grateful for the help of:
+ </para>
+ <para>
+ <itemizedlist>
+ <listitem><para>Michel Stol</para></listitem>
+ <listitem><para>Wichert Akkerman</para></listitem>
+ <listitem><para>Edvard Tuinder</para></listitem>
+ <listitem><para>Koos van den Hout</para></listitem>
+ <listitem><para>Niels Bakker</para></listitem>
+ <listitem><para>Erik Bos</para></listitem>
+ <listitem><para>Alex Bleker</para></listitem>
+ <listitem><para>steven stillaway</para></listitem>
+ <listitem><para>Roel van der Made</para></listitem>
+ <listitem><para>Steven Van Steen</para></listitem>
+ </itemizedlist>
+ </para>
+ <para>
+ We are happy to have been able to work with the open source community to improve PowerDNS!
+ </para>
+ <para>
+ Changes:
+ <itemizedlist>
+ <listitem>
+ <para>
+ The monitor command <command>set</command> no longer allows the changing of non-existant variables.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ IBM Universal Database DB2 backend now included in source distribution (untested!)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Oracle backend now included in source distribution (sligthly tested!)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ configure script now searches for postgresql and mysql includes
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Bind parser now no longer dies on records with a ' in them (Erik Bos)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ The pipebackend was accidentally left out of 2.9
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ FreeBSD fixes (with help from Erik Bos, Alex Bleeker, Niels Bakker)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Heap of Solaris work (with help from Edvard Tuinder, Stefan Van Steen, Koos van den Hout, Roel van der Made and
+ especially Mark Bakker).
+ Now compiles in 2.7 and 2.8. May be a bit dysfunctional on 2.7 though - it won't do IPv6 and it won't serve AAAA. Patches
+ welcome!
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Windows 32 build is back! Michel Stol updated his earlier work to the current version.
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ S/Linux (Linux on Sparc) build works now (with help from steven stillaway).
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Silly debugging message ('sd.ttl from cache') removed
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ .debs are back, hopefully in 'sid' soon! (Wichert Akkerman)
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ Removal of bzero and other less portable constructs. Discovered that recent Linux glibc's need -D_GNU_SOURCE (Wichert Akkerman).
+ </para>
+ </listitem>
+ </itemizedlist>
+ </para>
+ </sect2>
<sect2 id="changelog-2-9"><title>Version 2.9</title>
<para>
Open source release. Do not deploy unless you know what you are
</para>
<sect1 id="on-windows"><title>Compiling PowerDNS on Windows</title>
<para>
- By Michael Stol (<email>michael@physos.info</email>).
+ By Michel Stol (<email>michel@powerdns.com</email>).
<sect2><title>Assumptions</title>
<para>
I will assume these things from you:
<para>
If you are pretty sure that it's a bug, either in the PowerDNS sources, the build
- system or in this article, then please send an e-mail to <email>powerdns-dev@mailman.powerdns.com</email> describing your
+ system or in this article, then please send an e-mail to <email>pdns-dev@mailman.powerdns.com</email> describing your
problem. We will then try to fix it.
</para>
<para>
If you have a comment, or a bug report concerning either this document or the PowerDNS sources
- you can contact <email>powerdns-dev@mailman.powerdns.com</email>
+ you can contact <email>pdns-dev@mailman.powerdns.com</email>
</para>
<para>
<para>
If you want to praise my work, ask me to marry you, deposit $1.000.000 on my bank account or flame me to death, then
- you can mail me at <email>michel@physos.info</email> :)
+ you can mail me at <email>michel@powerdns.com</email> :)
</para>
</sect3>
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-// $Id: nameserver.cc,v 1.2 2002/12/09 16:24:17 ahu Exp $
+// $Id: nameserver.cc,v 1.3 2002/12/10 13:36:26 ahu Exp $
#include "utility.hh"
#include <cstdio>
#include <cstring>
int s;
for(vector<string>::const_iterator i=locals.begin();i!=locals.end();++i) {
string localname(*i);
- struct sockaddr_in6 locala;
s=socket(AF_INET6,SOCK_DGRAM,0);
if(s<0)
throw AhuException("Unable to acquire a UDPv6 socket: "+string(strerror(errno)));
- memset(&locala,0,sizeof(locala));
- locala.sin6_family=AF_INET6;
-
if(localname=="::0") {
L<<Logger::Warning<<"It is advised to bind to explicit addresses with the --local-ipv6 option"<<endl;
}
- struct hostent *h;
-
- h=gethostbyname2(localname.c_str(),AF_INET6);
-
- if(!h)
- throw AhuException("Unable to resolve local IPv6 address");
-
- memcpy(&locala.sin6_addr.s6_addr,h->h_addr,16);
+ sockaddr_in6 locala;
+ locala.sin6_port=ntohs(arg().asNum("local-port"));
+ if(!inet_pton(AF_INET6, localname.c_str(), (void *)&locala.sin6_addr)) {
+ addrinfo *addrinfos;
+ addrinfo hints;
+ memset(&hints,0,sizeof(hints));
+ hints.ai_socktype=SOCK_DGRAM;
+ hints.ai_family=AF_INET6;
+
+ if(getaddrinfo(localname.c_str(),arg()["local-port"].c_str(),&hints,&addrinfos))
+ throw AhuException("Unable to resolve local IPv6 address '"+localname+"'");
+ memcpy(&locala,addrinfos->ai_addr,addrinfos->ai_addrlen);
+ }
- locala.sin6_port=htons(arg().asNum("local-port"));
-
- if(bind(s, (sockaddr*)&locala,sizeof(locala))<0) {
+ if(bind(s, (sockaddr*)&locala, sizeof(locala))<0) {
L<<Logger::Error<<"binding to UDP ipv6 socket: "<<strerror(errno)<<endl;
throw AhuException("Unable to bind to UDP ipv6 socket");
}
// TODO: Implement ipv6
#if !WIN32 && HAVE_IPV6
for(vector<string>::const_iterator laddr=locals6.begin();laddr!=locals6.end();++laddr) {
- struct sockaddr_in6 local;
int s=socket(AF_INET6,SOCK_STREAM,0);
if(s<0)
throw AhuException("Unable to acquire TCPv6 socket: "+stringerror());
-
- memset(&local,0,sizeof(local));
- local.sin6_family=AF_INET6;
- struct hostent *h;
- h=gethostbyname2(laddr->c_str(),AF_INET6);
-
- if(!h)
- throw AhuException("Unable to resolve local address '"+*laddr+"'");
+
+ sockaddr_in6 locala;
+ locala.sin6_port=ntohs(arg().asNum("local-port"));
+
+ if(!inet_pton(AF_INET6, laddr->c_str(), (void *)&locala.sin6_addr)) {
+ addrinfo *addrinfos;
+ addrinfo hints;
+ memset(&hints,0,sizeof(hints));
+ hints.ai_socktype=SOCK_STREAM;
+ hints.ai_family=AF_INET6;
- memcpy(&local.sin6_addr.s6_addr,h->h_addr,16);
- local.sin6_port=htons(arg().asNum("local-port"));
+ if(getaddrinfo(laddr->c_str(),arg()["local-port"].c_str(),&hints,&addrinfos))
+ throw AhuException("Unable to resolve local IPv6 address '"+*laddr+"'");
+
+ memcpy(&locala,addrinfos->ai_addr,addrinfos->ai_addrlen);
+ }
int tmp=1;
if(setsockopt(s,SOL_SOCKET,SO_REUSEADDR,(char*)&tmp,sizeof tmp)<0) {
exit(1);
}
- if(bind(s, (sockaddr*)&local,sizeof(local))<0) {
+ if(bind(s, (const sockaddr*)&locala, sizeof(locala))<0) {
L<<Logger::Error<<"binding to TCP socket: "<<strerror(errno)<<endl;
throw AhuException("Unable to bind to TCPv6 socket");
}