summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2011-03-27 17:31:46 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2011-03-27 17:31:46 +0000
commitcf5ba042fd8b2109e3fb3708c3896e539821df54 (patch)
tree04c2fa74f6b8470fafe512981b79411e1f6c5a03 /net-dns/pdnsd
parentMove USE="hal" description here from use.desc. (diff)
downloadgentoo-2-cf5ba042fd8b2109e3fb3708c3896e539821df54.tar.gz
gentoo-2-cf5ba042fd8b2109e3fb3708c3896e539821df54.tar.bz2
gentoo-2-cf5ba042fd8b2109e3fb3708c3896e539821df54.zip
Remove old version; update metadata (remove obsolete USE flags, and improve description for 'isdn'); revision bump with new pdnsd.online init script: add support for dash (bug #349335, thanks to René 'Necoro' Neumann), no longer use IFACE variable (use rc_need instead) and avoid depending on a non-existing init script by default.
(Portage version: 2.2.0_alpha28/cvs/Linux x86_64)
Diffstat (limited to 'net-dns/pdnsd')
-rw-r--r--net-dns/pdnsd/ChangeLog15
-rw-r--r--net-dns/pdnsd/files/pdnsd.online.136
-rw-r--r--net-dns/pdnsd/files/pdnsd.rc639
-rw-r--r--net-dns/pdnsd/metadata.xml11
-rw-r--r--net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild101
-rw-r--r--net-dns/pdnsd/pdnsd-1.2.8-r1.ebuild120
6 files changed, 172 insertions, 150 deletions
diff --git a/net-dns/pdnsd/ChangeLog b/net-dns/pdnsd/ChangeLog
index d0ab46d5429c..395b5fbc35e7 100644
--- a/net-dns/pdnsd/ChangeLog
+++ b/net-dns/pdnsd/ChangeLog
@@ -1,6 +1,17 @@
# ChangeLog for net-dns/pdnsd
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/ChangeLog,v 1.99 2010/10/14 16:59:24 ranger Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/ChangeLog,v 1.100 2011/03/27 17:31:42 flameeyes Exp $
+
+*pdnsd-1.2.8-r1 (27 Mar 2011)
+
+ 27 Mar 2011; Diego E. Pettenò <flameeyes@gentoo.org> -pdnsd-1.2.7-r1.ebuild,
+ +pdnsd-1.2.8-r1.ebuild, +files/pdnsd.online.1, -files/pdnsd.rc6,
+ metadata.xml:
+ Remove old version; update metadata (remove obsolete USE flags, and improve
+ description for 'isdn'); revision bump with new pdnsd.online init script: add
+ support for dash (bug #349335, thanks to René 'Necoro' Neumann), no longer
+ use IFACE variable (use rc_need instead) and avoid depending on a
+ non-existing init script by default.
14 Oct 2010; Brent Baude <ranger@gentoo.org> pdnsd-1.2.8.ebuild:
stable ppc, bug 336282
diff --git a/net-dns/pdnsd/files/pdnsd.online.1 b/net-dns/pdnsd/files/pdnsd.online.1
new file mode 100644
index 000000000000..79e7a41e96fb
--- /dev/null
+++ b/net-dns/pdnsd/files/pdnsd.online.1
@@ -0,0 +1,36 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/files/pdnsd.online.1,v 1.1 2011/03/27 17:31:44 flameeyes Exp $
+
+depend() {
+ need pdnsd
+}
+
+wait_for_socket() {
+ local i pdnsd_socket="/var/cache/pdnsd/pdnsd.status"
+ while [ ! -S "${pdnsd_socket}" -a $i -lt 10 ]; do
+ sleep 1s
+ : $((i++))
+ done
+
+ if [ ! -S "${pdnsd_socket}" ]; then
+ eerror "${pdnsd_socket} socket is missing."
+ return 1
+ fi
+
+ return 0
+}
+
+start() {
+ wait_for_socket || return 1
+ ebegin "Starting pdnsd-online"
+ /usr/sbin/pdnsd-ctl -q server all up
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping pdnsd-online"
+ /usr/sbin/pdnsd-ctl -q server all down
+ eend $?
+}
diff --git a/net-dns/pdnsd/files/pdnsd.rc6 b/net-dns/pdnsd/files/pdnsd.rc6
deleted file mode 100644
index 6ae51270141e..000000000000
--- a/net-dns/pdnsd/files/pdnsd.rc6
+++ /dev/null
@@ -1,39 +0,0 @@
-#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/files/pdnsd.rc6,v 1.13 2007/07/13 07:46:00 mrness Exp $
-
-opts="reload"
-
-depend() {
- need net
- provide dns
-}
-
-checkconfig() {
- if [ ! -e /etc/pdnsd/pdnsd.conf ] ; then
- eerror "You need an /etc/pdnsd/pdnsd.conf file first."
- eerror "There is a sample in /etc/pdnsd/pdnsd.conf.sample"
- return 1
- fi
-}
-
-start() {
- checkconfig || return 1
- ebegin "Starting pdnsd"
- start-stop-daemon --start --quiet --exec /usr/sbin/pdnsd \
- -- -s -t -d -p /var/run/pdnsd.pid ${PDNSDCONFIG}
- eend $?
-}
-
-stop() {
- ebegin "Stopping pdnsd"
- start-stop-daemon --stop --quiet --pidfile /var/run/pdnsd.pid
- eend $?
-}
-
-reload() {
- ebegin "Reloading pdnsd.conf"
- /usr/sbin/pdnsd-ctl config
- eend $?
-}
diff --git a/net-dns/pdnsd/metadata.xml b/net-dns/pdnsd/metadata.xml
index df9bbedad964..8fa9717d151c 100644
--- a/net-dns/pdnsd/metadata.xml
+++ b/net-dns/pdnsd/metadata.xml
@@ -12,14 +12,9 @@
networking).
</longdescription>
<use>
- <flag name='isdn'>Enable ISDN features</flag>
- <flag name='underscores'>
- Enable support for domain names containing underscores
- </flag>
- <flag name="nptl">
- Linux-only: override auto-detection of the system threading
- implementation and force usage of the Native Posix Thread
- Library.
+ <flag name='isdn'>
+ Linux-only: check status of ippp interfaces with ISDN-specific
+ system calls.
</flag>
<flag name='urandom'>
Linux-only: use /dev/urandom (pseudo-random number generation)
diff --git a/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild b/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild
deleted file mode 100644
index 4655b3384cf3..000000000000
--- a/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild
+++ /dev/null
@@ -1,101 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild,v 1.3 2009/05/09 13:06:11 mrness Exp $
-
-EAPI="2"
-
-inherit eutils
-
-DESCRIPTION="Proxy DNS server with permanent caching"
-HOMEPAGE="http://www.phys.uu.nl/~rombouts/pdnsd.html"
-SRC_URI="http://www.phys.uu.nl/~rombouts/pdnsd/releases/${P}-par.tar.gz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="alpha amd64 arm ~ia64 ppc s390 sparc x86"
-IUSE="debug ipv6 isdn nptl underscores urandom"
-
-pkg_setup() {
- enewgroup pdnsd
- enewuser pdnsd -1 -1 /var/lib/pdnsd pdnsd
-}
-
-src_configure() {
- local myconf=""
- use debug && myconf="${myconf} --with-debug=3"
- use nptl && myconf="${myconf} --with-thread-lib=NPTL"
- use urandom && myconf="${myconf} --with-random-device=/dev/urandom"
-
- econf \
- --sysconfdir=/etc/pdnsd \
- --with-cachedir=/var/cache/pdnsd \
- --with-default-id=pdnsd \
- $(use_enable ipv6) \
- $(use_enable isdn) \
- $(use_enable underscores) \
- ${myconf} \
- || die "bad configure"
-}
-
-src_install() {
- emake DESTDIR="${D}" install || die "make install failed"
-
- dodoc AUTHORS ChangeLog* NEWS README THANKS TODO README.par
- docinto contrib ; dodoc contrib/{README,dhcp2pdnsd,pdnsd_dhcp.pl}
- docinto html ; dohtml doc/html/*
- docinto txt ; dodoc doc/txt/*
- newdoc doc/pdnsd.conf pdnsd.conf.sample
-
- newinitd "${FILESDIR}/pdnsd.rc6" pdnsd
- newinitd "${FILESDIR}/pdnsd.online" pdnsd-online
-
- dodir /etc/conf.d
- local config="${D}/etc/conf.d/pdnsd-online"
-
- echo -e "# Enter the interface that connects you to the dns servers" >> "${config}"
- echo "# This will correspond to /etc/init.d/net.${IFACE}" >> "${config}"
- echo -e "\n# IMPORTANT: Be sure to run depscan.sh after modifiying IFACE" >> "${config}"
- echo "IFACE=ppp0" >> "${config}"
-
- config="${D}/etc/conf.d/pdnsd"
- "${D}/usr/sbin/pdnsd" --help | sed "s/^/# /g" > "${config}"
- echo "# Command line options" >> "${config}"
- use ipv6 && echo PDNSDCONFIG="-a" >> "${config}" \
- || echo PDNSDCONFIG="" >> "${config}"
-
- # gentoo resolvconf support
- exeinto /etc/resolvconf/update.d
- newexe "${FILESDIR}/pdnsd.resolvconf-r1" pdnsd
-}
-
-src_test() {
- if [ -x /usr/bin/dig ]; then
- mkdir "${T}/pdnsd"
- echo -n -e "pd12\0\0\0\0" > "${T}/pdnsd/pdnsd.cache"
- IPS=$(grep ^nameserver /etc/resolv.conf | sed -e 's/nameserver \(.*\)/\tip=\1;/g' | xargs)
- sed -e "s/\tip=/${IPS}/" -e "s:cache_dir=:cache_dir=${T}/pdnsd:" "${FILESDIR}/pdnsd.conf.test" \
- > "${T}/pdnsd.conf.test"
- src/pdnsd -c "${T}/pdnsd.conf.test" -g -s -d -p "${T}/pid" || die "couldn't start daemon"
- sleep 3
-
- find "${T}" -ls
- [ -s "${T}/pid" ] || die "empty or no pid file created"
- [ -S "${T}/pdnsd/pdnsd.status" ] || die "no socket created"
- src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" server all up || die "failed to start the daemon"
- src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" status || die "failed to communicate with the daemon"
- sleep 3
-
- dig @127.0.0.1 -p 33455 www.gentoo.org | fgrep "status: NOERROR" || die "www.gentoo.org lookup failed"
- kill $(<"${T}/pid") || die "failed to terminate daemon"
- fi
-}
-
-pkg_postinst() {
- elog
- elog "Add pdnsd to your default runlevel - rc-update add pdnsd default"
- elog ""
- elog "Add pdnsd-online to your online runlevel."
- elog "The online interface will be listed in /etc/conf.d/pdnsd-online"
- elog ""
- elog "Sample config file in /etc/pdnsd/pdnsd.conf.sample"
-}
diff --git a/net-dns/pdnsd/pdnsd-1.2.8-r1.ebuild b/net-dns/pdnsd/pdnsd-1.2.8-r1.ebuild
new file mode 100644
index 000000000000..e7204784cc45
--- /dev/null
+++ b/net-dns/pdnsd/pdnsd-1.2.8-r1.ebuild
@@ -0,0 +1,120 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/pdnsd-1.2.8-r1.ebuild,v 1.1 2011/03/27 17:31:42 flameeyes Exp $
+
+EAPI="2"
+
+inherit eutils
+
+DESCRIPTION="Proxy DNS server with permanent caching"
+HOMEPAGE="http://www.phys.uu.nl/~rombouts/pdnsd.html"
+SRC_URI="http://www.phys.uu.nl/~rombouts/pdnsd/releases/${P}-par.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~s390 ~sparc ~x86"
+IUSE="debug ipv6 isdn +urandom test"
+
+RDEPEND="sys-apps/openrc"
+DEPEND="test? ( net-dns/bind-tools )"
+
+pkg_setup() {
+ enewgroup pdnsd
+ enewuser pdnsd -1 -1 /var/lib/pdnsd pdnsd
+}
+
+src_configure() {
+ local myconf=""
+ use debug && myconf="${myconf} --with-debug=3"
+ use urandom && myconf="${myconf} --with-random-device=/dev/urandom"
+
+ econf \
+ --disable-dependency-tracking \
+ --sysconfdir=/etc/pdnsd \
+ --with-cachedir=/var/cache/pdnsd \
+ --with-default-id=pdnsd \
+ $(use_enable ipv6) $(use_enable ipv6 ipv6-startup) \
+ $(use_enable isdn) \
+ ${myconf} \
+ || die "bad configure"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "make install failed"
+
+ dodoc AUTHORS ChangeLog* NEWS README THANKS TODO README.par || die
+ docinto contrib ; dodoc contrib/{README,dhcp2pdnsd,pdnsd_dhcp.pl} || die
+ docinto html ; dohtml doc/html/* || die
+ docinto txt ; dodoc doc/txt/* || die
+ newdoc doc/pdnsd.conf pdnsd.conf.sample || die
+
+ newinitd "${FILESDIR}/pdnsd.rc6.1" pdnsd || die
+ newinitd "${FILESDIR}/pdnsd.online.1" pdnsd-online || die
+
+ mkdir "${T}"/confd
+
+ cat - > "${T}"/confd/pdnsd-online <<EOF
+# Make sure to change the rc_need variable to the service for the
+# interface that connects you to the dns servers.
+#
+# For instance if you use a PPP connection on ppp0 to connect, set
+# rc_need="net.ppp0"
+
+rc_need="net.lo"
+EOF
+
+ # Don't try to do the smart thing and add the --help output here:
+ # it will cause the file to be etc-updated if the help text
+ # changes and fails when cross-compiling.
+ cat - > "${T}"/confd/pdnsd <<EOF
+# Command line options, check pdnsd --help for a list of valid
+# parameters. Note that most of the options that can be given at
+# command-line are also available as configuration parameters in
+# /etc/pdnsd/pdnsd.conf
+PDNSDCONFIG=""
+EOF
+
+ doconfd "${T}"/confd/* || die
+
+ # gentoo resolvconf support
+ exeinto /etc/resolvconf/update.d
+ newexe "${FILESDIR}/pdnsd.resolvconf-r1" pdnsd
+}
+
+src_test() {
+ fail_kill() {
+ kill -9 $(<"${T}"/pid)
+ die "$1"
+ }
+
+ mkdir "${T}/pdnsd"
+ echo -n -e "pd12\0\0\0\0" > "${T}/pdnsd/pdnsd.cache"
+ IPS=$(grep ^nameserver /etc/resolv.conf | sed -e 's/nameserver \(.*\)/\tip=\1;/g' | xargs)
+ sed -e "s/\tip=/${IPS}/" -e "s:cache_dir=:cache_dir=${T}/pdnsd:" "${FILESDIR}/pdnsd.conf.test" \
+ > "${T}/pdnsd.conf.test"
+ src/pdnsd -c "${T}/pdnsd.conf.test" -g -s -d -p "${T}/pid" || die "couldn't start daemon"
+ sleep 3
+
+ find "${T}" -ls
+ [ -s "${T}/pid" ] || die "empty or no pid file created"
+ [ -S "${T}/pdnsd/pdnsd.status" ] || fail_kill "no socket created"
+ src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" server all up || fail_kill "failed to start the daemon"
+ src/pdnsd-ctl/pdnsd-ctl -c "${T}/pdnsd" status || fail_kill "failed to communicate with the daemon"
+ sleep 3
+
+ dig @127.0.0.1 -p 33455 localhost > "${T}"/dig.output 2>&1
+ cat "${T}"/dig.output
+ fgrep -q "status: NOERROR" "${T}"/dig.output || fail_kill "www.gentoo.org lookup failed"
+
+ kill $(<"${T}/pid") || fail_kill "failed to terminate daemon"
+}
+
+pkg_postinst() {
+ elog
+ elog "Add pdnsd to your default runlevel - rc-update add pdnsd default"
+ elog ""
+ elog "Add pdnsd-online to your online runlevel."
+ elog "The online interface will be listed in /etc/conf.d/pdnsd-online"
+ elog ""
+ elog "Sample config file in /etc/pdnsd/pdnsd.conf.sample"
+}