From d9cfe8996acd9a4e3020ee1bc7d1e6ab95c1a773 Mon Sep 17 00:00:00 2001 From: Alin Năstac Date: Sat, 13 Dec 2008 10:50:00 +0000 Subject: Solve startup error of the pdnsd-online service (#249981). (Portage version: 2.1.4.5, RepoMan options: --force) --- net-dns/pdnsd/ChangeLog | 8 ++- net-dns/pdnsd/files/pdnsd.online | 17 ++++-- net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild | 101 ++++++++++++++++++++++++++++++++++++ net-dns/pdnsd/pdnsd-1.2.7.ebuild | 101 ------------------------------------ 4 files changed, 122 insertions(+), 105 deletions(-) create mode 100644 net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild delete mode 100644 net-dns/pdnsd/pdnsd-1.2.7.ebuild (limited to 'net-dns') diff --git a/net-dns/pdnsd/ChangeLog b/net-dns/pdnsd/ChangeLog index b328c672ba6b..b69b723d9efc 100644 --- a/net-dns/pdnsd/ChangeLog +++ b/net-dns/pdnsd/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-dns/pdnsd # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/ChangeLog,v 1.88 2008/09/19 18:41:54 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/ChangeLog,v 1.89 2008/12/13 10:49:59 mrness Exp $ + +*pdnsd-1.2.7-r1 (13 Dec 2008) + + 13 Dec 2008; Alin Năstac files/pdnsd.online, + -pdnsd-1.2.7.ebuild, +pdnsd-1.2.7-r1.ebuild: + Solve startup error of the pdnsd-online service (#249981). 19 Sep 2008; Tobias Scherbaum pdnsd-1.2.7.ebuild: ppc stable, bug #231285 diff --git a/net-dns/pdnsd/files/pdnsd.online b/net-dns/pdnsd/files/pdnsd.online index b7bef321221a..8db7f6f25690 100644 --- a/net-dns/pdnsd/files/pdnsd.online +++ b/net-dns/pdnsd/files/pdnsd.online @@ -1,20 +1,31 @@ #!/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.online,v 1.4 2004/07/14 23:26:19 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/files/pdnsd.online,v 1.5 2008/12/13 10:50:00 mrness Exp $ depend() { need pdnsd net.${IFACE} } +wait_for_socket() { + local pdnsd_socket="/var/cache/pdnsd/pdnsd.status" + for ((i=0; i < 10; i=$i+1)) ; do + [ -S "${pdnsd_socket}" ] && return 0 + sleep 1s + done + eerror "${pdnsd_socket} socket is missing." + return 1 +} + start() { + wait_for_socket || return 1 ebegin "Starting pdnsd-online" - /usr/sbin/pdnsd-ctl server all up + /usr/sbin/pdnsd-ctl -q server all up eend $? } stop() { ebegin "Stopping pdnsd-online" - /usr/sbin/pdnsd-ctl server all down + /usr/sbin/pdnsd-ctl -q server all down eend $? } diff --git a/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild b/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild new file mode 100644 index 000000000000..e8f60cde2735 --- /dev/null +++ b/net-dns/pdnsd/pdnsd-1.2.7-r1.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2008 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.1 2008/12/13 10:49:59 mrness Exp $ + +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_compile() { + 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" + + emake all || die "compile problem" +} + +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.7.ebuild b/net-dns/pdnsd/pdnsd-1.2.7.ebuild deleted file mode 100644 index 469aafd2ed53..000000000000 --- a/net-dns/pdnsd/pdnsd-1.2.7.ebuild +++ /dev/null @@ -1,101 +0,0 @@ -# Copyright 1999-2008 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.ebuild,v 1.5 2008/09/19 18:41:54 dertobi123 Exp $ - -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_compile() { - 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" - - emake all || die "compile problem" -} - -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" -} -- cgit v1.2.3-65-gdbad