You are not logged in.

#1 2004-08-12 16:25:49

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

powerdns pkgbuild - a dns deamon supporting many backends

I made this some time ago and almost forgot to post it :-)

It's a very nice dns daemon with support  for many many backends like postgresql, mysql, sqlite, ldap, bind, pipes and even more (like random backend :-)). You can read all about it in powerdns docs on their website.

Currently I removed sqlite support from pkgbuild because of this http://bugs.archlinux.org/index.php?do=details&id=1134 When sqlite2 will come out of testing to other repos it will be possible to add gsqlite module (and probably its include path - check it in ./configure --help output what to add). The modules are configured to be loaded dynamically. If you change --with-dynmodules to --with-modules then they will be builtin.

Meanwhile arch glibc package was updated which unfortunatelly made me unable to recompile powerdns :-( (notice the lack of the depends line in the pkgbuild - I'll change it when I'm able to recompile it again). ATM If you want to compile it you will have to probably downgrade your glibc or check if someone finds a solution on powerdns-users mailing list (http://mailman.powerdns.com/pipermail/p … 01806.html) or use black magic... (tell me if you know the correct spell please).

powerdns PKGBUILD

pkgname=powerdns
pkgver=2.9.16
pkgrel=1
pkgdesc="DNS daemon supporting many backends including sql databases, ldap and bind"
url="http://www.powerdns.com"
makedepends=('libpqpp' 'mysql' 'openldap')
source=(http://downloads.powerdns.com/releases/pdns-${pkgver}.tar.gz)
md5sums=('7e9a859a5a21996dbf7b31cd61731dbc')

build() {
  cd $startdir/src/pdns-$pkgver
  ./configure --prefix=/usr --enable-recursor 
  --sysconfdir=/etc 
  --with-pgsql-includes=/usr/include 
  --with-dynmodules="gpgsql gmysql ldap pipe pdns"
  make || return 1
  make DESTDIR=$startdir/pkg install
  mv $startdir/pkg/etc/pdns.conf-dist $startdir/pkg/etc/pdns.conf
  install -D -m755 $startdir/src/pdns-$pkgver/pdns/pdns 
        $startdir/pkg/etc/rc.d/pdns
  install -D -m755 $startdir/src/pdns-$pkgver/pdns/precursor 
        $startdir/pkg/etc/rc.d/precursor
}

You will need libpqpp if you want to build postgresql backend module
libpqpp PKGBUILD

pkgname=libpqpp
pkgver=4.0
pkgrel=1
pkgdesc="Old C++ wrapper for the libpq Postgresql library"
url="http://gborg.postgresql.org/project/libpqpp/projdisplay.php"
depends=('gcc' 'postgresql')
install=install.libpqpp
source=(ftp://gborg.postgresql.org/pub/libpqpp/stable/libpq++-4.0.tar.gz)
md5sums=('da71cb79ef45cef55f4bc97a33a0857d')

build() {
  cd $startdir/src/libpq++-4.0
  sed -i "s/POSTGRES_HOME=/usr/local/pgsql/POSTGRES_HOME=/usr/g" 
        $startdir/src/libpq++-4.0/Makefile
  make || return 1
  install -D -m755 $startdir/src/libpq++-4.0/libpq++.so.4.0 
        $startdir/pkg/usr/lib/libpq++.so.4.0
  install -D -m644 $startdir/src/libpq++-4.0/libpq++.h 
        $startdir/pkg/usr/include/libpq++.h
  install -D -m644 $startdir/src/libpq++-4.0/pgconnection.h 
        $startdir/pkg/usr/include/libpq++/pgconnection.h
  install -D -m644 $startdir/src/libpq++-4.0/pgdatabase.h 
        $startdir/pkg/usr/include/libpq++/pgdatabase.h
  install -D -m644 $startdir/src/libpq++-4.0/pgtransdb.h 
        $startdir/pkg/usr/include/libpq++/pgtransdb.h
  install -D -m644 $startdir/src/libpq++-4.0/pgcursordb.h 
        $startdir/pkg/usr/include/libpq++/pgcursordb.h
  install -D -m644 $startdir/src/libpq++-4.0/pglobject.h 
        $startdir/pkg/usr/include/libpq++/pglobject.h
}

libpqpp.install

post_install() {
  cd /usr/lib
  ln -s /usr/lib/libpq++.so.4.0 libpq++.so
}

post_upgrade() {
  cd /usr/lib
  rm -f /usr/lib/libpq++.so
  ln -s /usr/lib/libpq++.so.4.0 libpq++.so
}

pre_remove() {
  /bin/true
}

post_remove() {
  rm -f /usr/lib/libpq++.so
}

op=$1
shift
$op $*

Offline

#2 2004-11-22 18:05:01

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: powerdns pkgbuild - a dns deamon supporting many backends

Added powerdns to the extra repository:

pdns, the base package with bind zonefile backend included
pdns-ldap, LDAP backend module
pdns-mysql, mysql backend module (with bug in description :X)
pdns-pgsql, postgrsql backend module

Hope I didn't miss anything important with this release.

Offline

#3 2004-11-23 08:59:09

lanrat
Member
From: Poland
Registered: 2003-10-28
Posts: 1,274

Re: powerdns pkgbuild - a dns deamon supporting many backends

Thanks. I was going to provide a new pkgbuild because now powerdns compiles fine with the latest gcc but unfortunatelly last friday my wireless internet connection from home was completly destroyed by a snow strom :-( (I really hate winter...). Since it's cold and snowing/raining all the time and provider's access point/antenna (which is most probably broken) is located in a place hard to reach I have no idea when I'll have internet (if at all...).

Once I get back fully online I'll try to check the new package.

BTW There is also another interesting project for dns database backends. It's called bind-dlz
http://bind-dlz.sourceforge.net/

DLZ (Dynamically Loadable Zones) is a patch for BIND version 9 that simplifies BIND administration and reduces memory usage and startup time. DLZ allows you to store your zone data in a database. Unlike using scripts, the changes in your database are immediately reflected in BIND's response to DNS queries, so there is no need to reload or restart BIND. You see, BIND "dynamically loads" the "zone" data it needs to answer a query from the database.

DLZ currently supports postgreSQL, MySQL, Berkeley DB, ODBC, LDAP and a "file system" database.

Because of DLZ's support for ODBC and flexible schema support, virtually any modern relational database could be used with DLZ.

The "file system" database allows the hierarchal nature of a standard file system to be used as a database for DNS data. This driver is extremely simple to set up--it is also quite performant when used with a high performance file system, like the memory file system or ReiserFS.

So far I didn't have time to try it though.

Offline

Board footer

Powered by FluxBB