summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiziano Müller <dev-zero@gentoo.org>2013-05-20 19:05:48 +0000
committerTiziano Müller <dev-zero@gentoo.org>2013-05-20 19:05:48 +0000
commit1e187ab2c298e5620a90a62624d2c39b7fc3adc2 (patch)
treed67392207e3817d5bddfa26706eff533d4cc9fb7 /net-dns/pdns
parentVersion bump. (diff)
downloadgentoo-2-1e187ab2c298e5620a90a62624d2c39b7fc3adc2.tar.gz
gentoo-2-1e187ab2c298e5620a90a62624d2c39b7fc3adc2.tar.bz2
gentoo-2-1e187ab2c298e5620a90a62624d2c39b7fc3adc2.zip
Version bump (bug #456412), add support for using botan or crypto++ as well as lua-, odbc-, remote-, mydns and tinydns-backends. Fixed a lot of build issues in the build-system and depend on in-tree version of PolarSSL instead of the bundled one.
(Portage version: 2.1.11.63/cvs/Linux x86_64, signed Manifest commit with key 0x1E0CA85F!)
Diffstat (limited to 'net-dns/pdns')
-rw-r--r--net-dns/pdns/ChangeLog16
-rw-r--r--net-dns/pdns/files/pdns-3.2-fix-autoconf.patch22
-rw-r--r--net-dns/pdns/files/pdns-3.2-fix-conditional-polarssl.patch30
-rw-r--r--net-dns/pdns/files/pdns-3.2-fix-curl-link.patch10
-rw-r--r--net-dns/pdns/files/pdns-3.2-lib_lua.patch22
-rw-r--r--net-dns/pdns/metadata.xml8
-rw-r--r--net-dns/pdns/pdns-3.2.ebuild154
7 files changed, 259 insertions, 3 deletions
diff --git a/net-dns/pdns/ChangeLog b/net-dns/pdns/ChangeLog
index ae4377004591..481935f3509d 100644
--- a/net-dns/pdns/ChangeLog
+++ b/net-dns/pdns/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for net-dns/pdns
-# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/ChangeLog,v 1.86 2012/11/25 16:12:21 swegener Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/ChangeLog,v 1.87 2013/05/20 19:05:48 dev-zero Exp $
+
+*pdns-3.2 (20 May 2013)
+
+ 20 May 2013; Tiziano Müller <dev-zero@gentoo.org>
+ +files/pdns-3.2-fix-autoconf.patch,
+ +files/pdns-3.2-fix-conditional-polarssl.patch,
+ +files/pdns-3.2-fix-curl-link.patch, +files/pdns-3.2-lib_lua.patch,
+ +pdns-3.2.ebuild, metadata.xml:
+ Version bump (bug #456412), add support for using botan or crypto++ as well as
+ lua-, odbc-, remote-, mydns and tinydns-backends. Fixed a lot of build issues
+ in the build-system and depend on in-tree version of PolarSSL instead of the
+ bundled one.
25 Nov 2012; Sven Wegener <swegener@gentoo.org> pdns-3.0.1.ebuild,
pdns-3.1.ebuild:
diff --git a/net-dns/pdns/files/pdns-3.2-fix-autoconf.patch b/net-dns/pdns/files/pdns-3.2-fix-autoconf.patch
new file mode 100644
index 000000000000..1fb555455982
--- /dev/null
+++ b/net-dns/pdns/files/pdns-3.2-fix-autoconf.patch
@@ -0,0 +1,22 @@
+diff --git a/configure.ac b/configure.ac
+index 1beab82..243b693 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -2,7 +2,7 @@ dnl intro
+ AC_INIT(pdns/receiver.cc)
+ AM_INIT_AUTOMAKE(pdns, 3.2)
+ AC_CANONICAL_HOST
+-AM_CONFIG_HEADER(config.h)
++AC_CONFIG_HEADERS([config.h])
+ AC_C_BIGENDIAN
+ AC_PREREQ(2.52)
+ : ${CXXFLAGS="-Wall -O2"}
+@@ -180,7 +180,7 @@ AC_ARG_WITH([system-polarssl],
+ [system_polarssl=$withval],
+ [system_polarssl=yes])
+ AC_MSG_RESULT($system_polarssl)
+-AM_CONDITIONAL(HAVE_LIBPOLARSSL, false)
++AM_CONDITIONAL(HAVE_LIBPOLARSSL, test x$system_polarssl = xyes)
+ if test x$system_polarssl = xyes; then
+ AC_MSG_CHECKING([PolarSSL version >= 1.1])
+ AC_COMPILE_IFELSE(
diff --git a/net-dns/pdns/files/pdns-3.2-fix-conditional-polarssl.patch b/net-dns/pdns/files/pdns-3.2-fix-conditional-polarssl.patch
new file mode 100644
index 000000000000..26254eb9bb1e
--- /dev/null
+++ b/net-dns/pdns/files/pdns-3.2-fix-conditional-polarssl.patch
@@ -0,0 +1,30 @@
+diff --git a/pdns/Makefile.am b/pdns/Makefile.am
+index 8e7a2eb..57b4a90 100644
+--- a/pdns/Makefile.am
++++ b/pdns/Makefile.am
+@@ -68,8 +68,12 @@ md5.hh signingpipe.cc signingpipe.hh dnslabeltext.cc lua-pdns.cc lua-auth.cc lua
+ ednssubnet.cc ednssubnet.hh cachecleaner.hh json.cc json.hh
+
+ #
+-pdns_server_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_SERIALIZATION_LDFLAGS) -rdynamic
++pdns_server_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_SERIALIZATION_LDFLAGS) -rdynamic
++if HAVE_LIBPOLARSSL
++pdns_server_LDADD= $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
++else
+ pdns_server_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_SERIALIZATION_LIBS) $(LUA_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
++endif
+
+ if BOTAN110
+ pdns_server_SOURCES += botan110signers.cc botansigners.cc
+@@ -106,7 +110,11 @@ pdnssec_SOURCES=pdnssec.cc dbdnsseckeeper.cc sstuff.hh dnsparser.cc dnsparser.hh
+
+
+ pdnssec_LDFLAGS=@moduleobjects@ @modulelibs@ @DYNLINKFLAGS@ @LIBDL@ @THREADFLAGS@ $(BOOST_PROGRAM_OPTIONS_LDFLAGS) $(BOOST_SERIALIZATION_LDFLAGS)
++if HAVE_LIBPOLARSSL
++pdnssec_LDADD= $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
++else
+ pdnssec_LDADD= ext/polarssl-1.1.2/library/libpolarssl.a $(BOOST_PROGRAM_OPTIONS_LIBS) $(BOOST_SERIALIZATION_LIBS) $(SQLITE3_LIBS) $(LIBCURL_LIBS) $(MYSQL_lib)
++endif
+
+ if BOTAN110
+ pdnssec_SOURCES += botan110signers.cc botansigners.cc
diff --git a/net-dns/pdns/files/pdns-3.2-fix-curl-link.patch b/net-dns/pdns/files/pdns-3.2-fix-curl-link.patch
new file mode 100644
index 000000000000..2848179ddee1
--- /dev/null
+++ b/net-dns/pdns/files/pdns-3.2-fix-curl-link.patch
@@ -0,0 +1,10 @@
+diff --git a/modules/remotebackend/Makefile.am b/modules/remotebackend/Makefile.am
+index a47f8bb..670ecbf 100644
+--- a/modules/remotebackend/Makefile.am
++++ b/modules/remotebackend/Makefile.am
+@@ -10,4 +10,4 @@ lib_LTLIBRARIES = libremotebackend.la
+ libremotebackend_la_SOURCES=remotebackend.hh remotebackend.cc unixconnector.cc httpconnector.cc pipeconnector.cc
+
+ libremotebackend_la_LDFLAGS=-module -avoid-version
+-libremotebackend_la_LIBS=$(LIBCURL_LIBS)
++libremotebackend_la_LIBADD=$(LIBCURL_LIBS)
diff --git a/net-dns/pdns/files/pdns-3.2-lib_lua.patch b/net-dns/pdns/files/pdns-3.2-lib_lua.patch
new file mode 100644
index 000000000000..b1d97b8bdaae
--- /dev/null
+++ b/net-dns/pdns/files/pdns-3.2-lib_lua.patch
@@ -0,0 +1,22 @@
+diff --git a/modules/luabackend/Makefile.am b/modules/luabackend/Makefile.am
+index a2374bd..1c7bd9a 100644
+--- a/modules/luabackend/Makefile.am
++++ b/modules/luabackend/Makefile.am
+@@ -1,7 +1,7 @@
+-AM_CPPFLAGS=@THREADFLAGS@
++AM_CPPFLAGS=$(LUA_CFLAGS) @THREADFLAGS@
+ EXTRA_DIST=OBJECTFILES OBJECTLIBS
+
+-INCLUDES=-I/usr/include/lua5.1
++#INCLUDES=-I/usr/include/lua5.1
+ #INCLUDES=-I/usr/local/include/luajit-2.0 -DUSE_LUAJIT
+
+ lib_LTLIBRARIES = libluabackend.la
+@@ -9,5 +9,6 @@ lib_LTLIBRARIES = libluabackend.la
+ libluabackend_la_SOURCES=luabackend.cc luabackend.hh minimal.cc reload.cc lua_functions.cc master.cc private.cc slave.cc supermaster.cc dnssec.cc \
+ lua_functions.hh
+
+-libluabackend_la_LDFLAGS=-module -avoid-version -llua5.1
++libluabackend_la_LDFLAGS=-module -avoid-version
++libluabackend_la_LIBADD=$(LUA_LIBS)
+ #-lluajit-5.1
diff --git a/net-dns/pdns/metadata.xml b/net-dns/pdns/metadata.xml
index 6a4763767ed2..b43f48ecba53 100644
--- a/net-dns/pdns/metadata.xml
+++ b/net-dns/pdns/metadata.xml
@@ -12,6 +12,12 @@ only nameserver. It is written from scratch and conforms to all relevant DNS
standards documents. Furthermore, PowerDNS interfaces with almost any database.
</longdescription>
<use>
- <flag name='opendbx'>Enable the OpenDBX backend</flag>
+ <flag name='botan'>Make it possible to use the <pkg>dev-libs/botan</pkg> library for crypto-related stuff (like DNSSec) which can be significantly faster than PolarSSL.</flag>
+ <flag name='cryptopp'>Make it possible to use the <pkg>dev-libs/crypto++</pkg> library for crypto-related stuff (like DNSSec) which can be significantly faster than PolarSSL.</flag>
+ <flag name='mydns'>Making it possible to use a MyDNS MySQL database with PowerDNS (not recommended for new deployments).</flag>
+ <flag name='opendbx'>Use a database supported by <pkg>dev-db/opendbx</pkg> as backend.</flag>
+ <flag name='remote'>Use a generic socket or pipe as a backend (via JSON RPC requests).</flag>
+ <flag name='remote-http'>Enable remote connections to HTTP as backends (via RESTful JSON requests).</flag>
+ <flag name='tinydns'>Use a TinyDNS CDB database as backend.</flag>
</use>
</pkgmetadata>
diff --git a/net-dns/pdns/pdns-3.2.ebuild b/net-dns/pdns/pdns-3.2.ebuild
new file mode 100644
index 000000000000..4a6afb9afb2c
--- /dev/null
+++ b/net-dns/pdns/pdns-3.2.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns/pdns-3.2.ebuild,v 1.1 2013/05/20 19:05:48 dev-zero Exp $
+
+EAPI=5
+
+inherit autotools eutils multilib systemd user toolchain-funcs
+
+DESCRIPTION="The PowerDNS Daemon"
+HOMEPAGE="http://www.powerdns.com/"
+SRC_URI="http://downloads.powerdns.com/releases/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+
+# other possible flags:
+# db2: we lack the dep
+# oracle: dito (need Oracle Client Libraries)
+# xdb: (almost) dead, surely not supported
+
+# TODO: sort out static deps
+
+IUSE="botan cryptopp debug doc ldap lua mydns mysql odbc opendbx postgres remote
+remote-http sqlite static tinydns"
+
+REQUIRED_USE="mydns? ( mysql )"
+
+RDEPEND="net-libs/polarssl
+ botan? ( =dev-libs/botan-1.10* )
+ cryptopp? ( dev-libs/crypto++ )
+ lua? ( dev-lang/lua )
+ mysql? ( virtual/mysql )
+ postgres? ( dev-db/postgresql-base:= )
+ ldap? ( >=net-nds/openldap-2.0.27-r4 )
+ sqlite? ( dev-db/sqlite:3 )
+ odbc? ( dev-db/unixODBC )
+ opendbx? ( dev-db/opendbx )
+ remote-http? ( net-misc/curl )
+ tinydns? ( dev-db/cdb )
+ !static? ( >=dev-libs/boost-1.34:= )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ static? ( >=dev-libs/boost-1.34[static-libs] )
+ doc? ( app-doc/doxygen )"
+
+src_prepare() {
+ epatch \
+ "${FILESDIR}/${P}-fix-autoconf.patch" \
+ "${FILESDIR}/${P}-fix-curl-link.patch" \
+ "${FILESDIR}/${P}-fix-conditional-polarssl.patch" \
+ "${FILESDIR}/${P}-lib_lua.patch"
+ eautoreconf
+}
+
+src_configure() {
+ local dynmodules="pipe geo" # the default backends, always enabled
+ local modules=""
+
+ #use db2 && dynmodules+=" db2"
+ use ldap && dynmodules+=" ldap"
+ use lua && dynmodules+=" lua"
+ use mydns && dynmodules+=" mydns"
+ use mysql && dynmodules+=" gmysql"
+ use odbc && dynmodules+=" godbc"
+ use opendbx && dynmodules+=" opendbx"
+ #use oracle && dynmodules+=" goracle oracle"
+ use postgres && dynmodules+=" gpgsql"
+ use remote && dynmodules+=" remote"
+ use sqlite && dynmodules+=" gsqlite3"
+ use tinydns && dynmodules+=" tinydns"
+ #use xdb && dynmodules+=" xdb"
+
+ if use static ; then
+ modules="${dynmodules}"
+ dynmodules=""
+ fi
+
+ use botan && myconf+=" --enable-botan1.10"
+ use cryptopp && myconf+=" --enable-cryptopp"
+ use debug && myconf+=" --enable-verbose-logging"
+ use remote-http && myconf+=" --enable-remotebackend-http"
+
+ econf \
+ --disable-static \
+ --sysconfdir=/etc/powerdns \
+ --libdir=/usr/$(get_libdir)/powerdns \
+ --disable-recursor \
+ --with-modules="${modules}" \
+ --with-dynmodules="${dynmodules}" \
+ --with-pgsql-includes=/usr/include \
+ --with-pgsql-lib=/usr/$(get_libdir) \
+ --with-mysql-lib=/usr/$(get_libdir) \
+ $(use_with lua) \
+ $(use_enable static static-binaries) \
+ ${myconf}
+}
+
+src_compile() {
+ default
+ use doc && emake -C codedocs codedocs
+}
+
+src_install () {
+ default
+
+ mv "${D}"/etc/powerdns/pdns.conf{-dist,}
+
+ fperms 0700 /etc/powerdns
+ fperms 0600 /etc/powerdns/pdns.conf
+
+ # set defaults: setuid=pdns, setgid=pdns
+ sed -i \
+ -e 's/^# set\([ug]\)id=$/set\1id=pdns/g' \
+ "${D}"/etc/powerdns/pdns.conf
+
+ doinitd "${FILESDIR}"/pdns
+ systemd_newunit contrib/systemd-pdns.service pdns.service
+
+ keepdir /var/empty
+
+ use doc && dohtml -r codedocs/html/.
+
+ # Install development headers
+ insinto /usr/include/pdns
+ doins pdns/*.hh
+ insinto /usr/include/pdns/backends/gsql
+ doins pdns/backends/gsql/*.hh
+
+ if use ldap ; then
+ insinto /etc/openldap/schema
+ doins "${FILESDIR}"/dnsdomain2.schema
+ fi
+
+ prune_libtool_files --all
+}
+
+pkg_preinst() {
+ enewgroup pdns
+ enewuser pdns -1 -1 /var/empty pdns
+}
+
+pkg_postinst() {
+ elog "PowerDNS provides multiple instances support. You can create more instances"
+ elog "by symlinking the pdns init script to another name."
+ elog
+ elog "The name must be in the format pdns.<suffix> and PowerDNS will use the"
+ elog "/etc/powerdns/pdns-<suffix>.conf configuration file instead of the default."
+
+ if use ldap ; then
+ ewarn "The official LDAP backend module is only compile-tested by upstream."
+ ewarn "Try net-dns/pdns-ldap-backend if you have problems with it."
+ fi
+}