diff options
-rw-r--r-- | net-dns/pdns-recursor/ChangeLog | 10 | ||||
-rw-r--r-- | net-dns/pdns-recursor/files/pdns-recursor-3.1.4-chdir.patch | 14 | ||||
-rw-r--r-- | net-dns/pdns-recursor/files/pdns-recursor-3.1.4-statedir.patch | 10 | ||||
-rw-r--r-- | net-dns/pdns-recursor/files/precursor | 12 | ||||
-rw-r--r-- | net-dns/pdns-recursor/files/recursor.conf | 4 | ||||
-rw-r--r-- | net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild | 15 |
6 files changed, 58 insertions, 7 deletions
diff --git a/net-dns/pdns-recursor/ChangeLog b/net-dns/pdns-recursor/ChangeLog index 57a098977b9a..54577c3aab53 100644 --- a/net-dns/pdns-recursor/ChangeLog +++ b/net-dns/pdns-recursor/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for net-dns/pdns-recursor # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/ChangeLog,v 1.12 2007/03/18 11:27:36 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/ChangeLog,v 1.13 2007/06/08 22:28:14 swegener Exp $ + + 08 Jun 2007; Sven Wegener <swegener@gentoo.org> + +files/pdns-recursor-3.1.4-chdir.patch, + +files/pdns-recursor-3.1.4-statedir.patch, files/precursor, + files/recursor.conf, pdns-recursor-3.1.4.ebuild: + Move chroot location from /var/empty to /var/lib/powerdns, update init + script and example configuration to reflect this. This should fix bug + #181343 and enable full support for rec_control. Thanks to Jefferson Noxon. 18 Mar 2007; Simon Stelling <blubb@gentoo.org> pdns-recursor-3.1.4.ebuild: stable on amd64; bug 169540 diff --git a/net-dns/pdns-recursor/files/pdns-recursor-3.1.4-chdir.patch b/net-dns/pdns-recursor/files/pdns-recursor-3.1.4-chdir.patch new file mode 100644 index 000000000000..25e1c6b73006 --- /dev/null +++ b/net-dns/pdns-recursor/files/pdns-recursor-3.1.4-chdir.patch @@ -0,0 +1,14 @@ +diff -Nur pdns-recursor-3.1.4.orig/pdns_recursor.cc pdns-recursor-3.1.4/pdns_recursor.cc +--- pdns-recursor-3.1.4.orig/pdns_recursor.cc 2006-11-12 16:56:13.000000000 +0000 ++++ pdns-recursor-3.1.4/pdns_recursor.cc 2007-06-08 22:05:35.551419115 +0000 +@@ -1565,6 +1565,10 @@ + } + } + ++ // this is needed to really get into the chroot. and even without chroot ++ // enabled it's nice to not block the directory we're currently in. ++ chdir("/"); ++ + Utility::dropPrivs(newuid, newgid); + g_fdm->addReadFD(s_rcc.d_fd, handleRCC); // control channel + #endif diff --git a/net-dns/pdns-recursor/files/pdns-recursor-3.1.4-statedir.patch b/net-dns/pdns-recursor/files/pdns-recursor-3.1.4-statedir.patch new file mode 100644 index 000000000000..db1a33c01780 --- /dev/null +++ b/net-dns/pdns-recursor/files/pdns-recursor-3.1.4-statedir.patch @@ -0,0 +1,10 @@ +diff -Nur pdns-recursor-3.1.4.orig/config.h pdns-recursor-3.1.4/config.h +--- pdns-recursor-3.1.4.orig/config.h 2006-11-12 16:56:13.000000000 +0000 ++++ pdns-recursor-3.1.4/config.h 2007-06-08 21:54:26.227713454 +0000 +@@ -1,5 +1,5 @@ + #define SYSCONFDIR "/etc/powerdns/" +-#define LOCALSTATEDIR "/var/run/" ++#define LOCALSTATEDIR "/var/run/powerdns" + #define VERSION "3.1.4" + #define RECURSOR + #ifndef WIN32 diff --git a/net-dns/pdns-recursor/files/precursor b/net-dns/pdns-recursor/files/precursor index 1b185ed81d2d..be4f20efc040 100644 --- a/net-dns/pdns-recursor/files/precursor +++ b/net-dns/pdns-recursor/files/precursor @@ -1,7 +1,9 @@ #!/sbin/runscript # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/files/precursor,v 1.3 2006/10/27 16:40:31 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/files/precursor,v 1.4 2007/06/08 22:28:14 swegener Exp $ + +opts="ping" depend() { need net @@ -15,6 +17,12 @@ start() { stop() { ebegin "Stopping PowerDNS Recursor" - start-stop-daemon --stop --quiet --pidfile=/var/run/pdns_recursor.pid + /usr/sbin/rec_control quit &>/dev/null + eend $? +} + +ping() { + ebegin "Pinging PowerDNS Recursor" + /usr/sbin/rec_control ping &>/dev/null eend $? } diff --git a/net-dns/pdns-recursor/files/recursor.conf b/net-dns/pdns-recursor/files/recursor.conf index b4bf3b6d6a78..df3cc2509dfb 100644 --- a/net-dns/pdns-recursor/files/recursor.conf +++ b/net-dns/pdns-recursor/files/recursor.conf @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/files/recursor.conf,v 1.1 2006/04/30 00:14:42 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/files/recursor.conf,v 1.2 2007/06/08 22:28:14 swegener Exp $ # Drop uid setuid=nobody @@ -18,4 +18,4 @@ local-address=127.0.0.1 local-port=53 # Change root for safety -chroot=/var/empty +chroot=/var/lib/powerdns diff --git a/net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild b/net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild index 8edd3ccf5ff9..8c87d1b71125 100644 --- a/net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild +++ b/net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild,v 1.3 2007/03/18 11:27:36 blubb Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/pdns-recursor-3.1.4.ebuild,v 1.4 2007/06/08 22:28:14 swegener Exp $ inherit toolchain-funcs flag-o-matic eutils @@ -17,6 +17,14 @@ DEPEND=">=dev-libs/boost-1.33.1" RDEPEND="${DEPEND} !<net-dns/pdns-2.9.20-r1" +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-statedir.patch + epatch "${FILESDIR}"/${P}-chdir.patch +} + src_compile() { filter-flags -ftree-vectorize @@ -37,5 +45,8 @@ src_install() { doinitd "${FILESDIR}"/precursor || die "doinitd failed" - keepdir /var/empty + # Pretty ugly, uh? + keepdir /var/lib/powerdns/var/run/powerdns + dodir /var/run + dosym /var/lib/powerdns/var/run/powerdns /var/run/powerdns } |