Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 485198 - net-dns/pdns-recursor - Improved chroot support
Summary: net-dns/pdns-recursor - Improved chroot support
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Sven Wegener
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-09-17 14:40 UTC by Thomas Deutschmann
Modified: 2018-05-09 08:44 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
pdns-recursor-3.5.3.ebuild (pdns-recursor-3.5.3.ebuild,1.33 KB, text/plain)
2013-09-17 14:41 UTC, Thomas Deutschmann
Details
Updated init script (pdns-recursor.initd,2.43 KB, text/plain)
2013-09-17 14:41 UTC, Thomas Deutschmann
Details
Added file for /etc/rsyslog.d (pdns-recursor.rsyslog,58 bytes, text/plain)
2013-09-17 14:43 UTC, Thomas Deutschmann
Details
Updated configuration file (recursor.conf,709 bytes, text/plain)
2013-09-17 14:43 UTC, Thomas Deutschmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann gentoo-dev Security 2013-09-17 14:40:07 UTC
Hi,

per default, pdns-recursor is running in a chrooted environment, which is a good thing. But we have to make sure, that this chroot environment is up to date.

Also there is a problem with /dev/log, which will disappear when logs get rotated (=pdns-recursor will stop logging).

I fixed these things. Would be nice if you could add these improvements to the tree.

Reproducible: Always
Comment 1 Thomas Deutschmann gentoo-dev Security 2013-09-17 14:41:04 UTC
Created attachment 358862 [details]
pdns-recursor-3.5.3.ebuild

The symlink loop is now part of the init script.
Comment 2 Thomas Deutschmann gentoo-dev Security 2013-09-17 14:41:34 UTC
Created attachment 358864 [details]
Updated init script
Comment 3 Thomas Deutschmann gentoo-dev Security 2013-09-17 14:43:28 UTC
Created attachment 358866 [details]
Added file for /etc/rsyslog.d

This file will make sure, that /var/lib/pdns-recursor/dev/log will exist, so that pdns-recursor is still able to log, also after logrotation.
Comment 4 Thomas Deutschmann gentoo-dev Security 2013-09-17 14:43:53 UTC
Created attachment 358868 [details]
Updated configuration file
Comment 5 Thomas Deutschmann gentoo-dev Security 2013-09-17 14:47:47 UTC
The attached files are current for today, 2013-09-17, but I don't know when you (the maintainer) will have a look at this bug report, so please check my overlay for any updates, thanks!

https://github.com/Whissi/gentoo-overlay/tree/master/net-dns/pdns-recursor
Comment 6 Jeroen Roovers (RETIRED) gentoo-dev 2013-09-17 15:03:59 UTC
Comment on attachment 358862 [details]
pdns-recursor-3.5.3.ebuild

--- pdns-recursor-3.5.1.ebuild  2013-05-04 22:54:57.000000000 +0200
+++ -   2013-09-17 17:03:50.127424768 +0200
@@ -2,7 +2,7 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: /var/cvsroot/gentoo-x86/net-dns/pdns-recursor/pdns-recursor-3.5.1.ebuild,v 1.1 2013/05/04 20:54:57 swegener Exp $
 
-EAPI="4"
+EAPI="5"
 
 inherit toolchain-funcs flag-o-matic eutils
 
@@ -27,6 +27,7 @@
 
 src_prepare() {
        epatch "${FILESDIR}"/${PN}-3.1.7.2-error-message.patch
+       epatch_user
 
        sed -i -e s:/var/run/:/var/lib/powerdns: "${S}"/config.h || die
 }
@@ -52,9 +53,11 @@
        insinto /etc/powerdns
        doins "${FILESDIR}"/recursor.conf
 
-       doinitd "${FILESDIR}"/precursor
+       insinto /etc/rsyslog.d
+       newins "${FILESDIR}"/pdns-recursor.rsyslog pdns-recursor.conf
 
-       # Pretty ugly, uh?
-       dodir /var/lib/powerdns/var/lib
-       dosym ../.. /var/lib/powerdns/var/lib/powerdns
+       newinitd "${FILESDIR}"/pdns-recursor.initd ${PN}
+
+       keepdir "/var/lib/powerdns"
+       keepdir "/var/lib/powerdns/dev"
 }