diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-03-09 15:39:08 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-03-09 15:39:08 +0000 |
commit | fb2a78eadf76e048cfbd6c5b38c880c728b93c5c (patch) | |
tree | a3222ae8adce8f8246da138132349828c4f0d0bb /net-dns/pdnsd | |
parent | Fix building with libpng14. (diff) | |
download | historical-fb2a78eadf76e048cfbd6c5b38c880c728b93c5c.tar.gz historical-fb2a78eadf76e048cfbd6c5b38c880c728b93c5c.tar.bz2 historical-fb2a78eadf76e048cfbd6c5b38c880c728b93c5c.zip |
Version bump, with a few changes: init script is no longer totally quiet (you'd miss on the errors) and will create the cache directory if missing; the configuration file for pdnsd does no longer contain the whole help text (saves from etc-update and fixes cross-compilation); the test function should work even if no network is available (and will no longer happen “automagically”, as it depends on dig being present now); ipv6 is enabled automatically on the build rather than by parameter, with the USE flag set; drop underscores USE flag (obsoleted, upstream no longer supports it), enable urandom by default (avoids sapping entropy by default, most users will be comfortable with that default); drop nptl USE flag (leave it to be auto-configured, which is good). To do for the next revision: install the dhcp2pdnsd script properly, and write an init script for that.
Package-Manager: portage-2.2_rc66/cvs/Linux x86_64
Diffstat (limited to 'net-dns/pdnsd')
-rw-r--r-- | net-dns/pdnsd/ChangeLog | 22 | ||||
-rw-r--r-- | net-dns/pdnsd/Manifest | 13 | ||||
-rw-r--r-- | net-dns/pdnsd/files/pdnsd.rc6.1 | 44 | ||||
-rw-r--r-- | net-dns/pdnsd/pdnsd-1.2.8.ebuild | 119 |
4 files changed, 191 insertions, 7 deletions
diff --git a/net-dns/pdnsd/ChangeLog b/net-dns/pdnsd/ChangeLog index e1528f8909d1..716c065aadf0 100644 --- a/net-dns/pdnsd/ChangeLog +++ b/net-dns/pdnsd/ChangeLog @@ -1,6 +1,24 @@ # ChangeLog for net-dns/pdnsd -# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/ChangeLog,v 1.91 2009/05/09 13:06:11 mrness Exp $ +# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-dns/pdnsd/ChangeLog,v 1.92 2010/03/09 15:39:06 flameeyes Exp $ + +*pdnsd-1.2.8 (09 Mar 2010) + + 09 Mar 2010; Diego E. Pettenò <flameeyes@gentoo.org> +pdnsd-1.2.8.ebuild, + +files/pdnsd.rc6.1: + Version bump, with a few changes: init script is no longer totally quiet + (you'd miss on the errors) and will create the cache directory if missing; + the configuration file for pdnsd does no longer contain the whole help + text (saves from etc-update and fixes cross-compilation); the test + function should work even if no network is available (and will no longer + happen “automagically”, as it depends on dig being present now); ipv6 + is enabled automatically on the build rather than by parameter, with the + USE flag set; drop underscores USE flag (obsoleted, upstream no longer + supports it), enable urandom by default (avoids sapping entropy by + default, most users will be comfortable with that default); drop nptl USE + flag (leave it to be auto-configured, which is good). To do for the next + revision: install the dhcp2pdnsd script properly, and write an init script + for that. 09 May 2009; Alin Năstac <mrness@gentoo.org> -files/pdnsd.resolvconf, -pdnsd-1.2.6.ebuild, -pdnsd-1.2.6-r1.ebuild, pdnsd-1.2.7-r1.ebuild: diff --git a/net-dns/pdnsd/Manifest b/net-dns/pdnsd/Manifest index 698decc059eb..e2033f12e66e 100644 --- a/net-dns/pdnsd/Manifest +++ b/net-dns/pdnsd/Manifest @@ -4,15 +4,18 @@ Hash: SHA1 AUX pdnsd.conf.test 377 RMD160 fbf25b78728754fa1f9cf5259c43cce9cb22a995 SHA1 bd7fdc0d89873921d5284e8d6713e62a424de704 SHA256 8ef1e68c43cefde86598158d2b624cbdd66d2436d681cabbc6327d34d5886058 AUX pdnsd.online 733 RMD160 22a0107d1521c4f0934c14f9c617a7e0878da5a3 SHA1 94398b67952142548557394fe64d82dc85fafaff SHA256 48479251841f348848c497cdf7e61134da69001d7c611756368746122fc95b7d AUX pdnsd.rc6 850 RMD160 9700c23cbe4a8fb18a6492c04ec4e8d7b8d2c082 SHA1 b7a231bb4c486015895f1efc7fe566c2210fe384 SHA256 4406f536e237fb92547e25373500b16198e6eb1cf6ab6e54e9ed3effa4eaa4ba +AUX pdnsd.rc6.1 942 RMD160 eaf58c47f1b6183dea8466ef1a05f9afbefd4404 SHA1 fcc8392195e0ee20a6f180ca4e6c5fbc413580b8 SHA256 9508b0dd6adbbe1bf5afc5af037d5fa9bd2ee0ab9748892fdf4ed6f12739d2fa AUX pdnsd.resolvconf-r1 17538 RMD160 a79ab764cd96a7203165771d50b14f4bf3907141 SHA1 3afbba4b8eb5fad1e1268dab85cc1fc04b1258b2 SHA256 40bdcc876ba8bb86069d52f8023fed468974004f47c235c202ca7eac88aa0fe3 DIST pdnsd-1.2.7-par.tar.gz 459565 RMD160 5bb73572120ed9e27f7294f21e2f9878671aef41 SHA1 8f2a0ec234efd61d81a2e89559a94568c342b36f SHA256 2777d7317509df7c75c90bcfd7f9ceaec9ea2db164bf00eb797fa54e0b476a00 +DIST pdnsd-1.2.8-par.tar.gz 471303 RMD160 227a550ba210c2454b3cc39e8d8d056960d49b9f SHA1 538849975f29c59b1e7f0dd0756435cc6f0f2b30 SHA256 5f3cade09e445f034430863ba65047a4ab2f581b86f3eab0d0981646e7ec244e EBUILD pdnsd-1.2.7-r1.ebuild 3401 RMD160 c6ca735d0edfb59f2832d5eb3be30764da02196b SHA1 b907768ebbe7f84c40d3caf64713201872d88031 SHA256 4897cef203a2d4976f6a2a238e6bc556b34da5598cbf763787048cec14577672 -MISC ChangeLog 13213 RMD160 65046f75dbef1d467cf477d06c8648628dd58261 SHA1 971d1b061cb5a5754a139d7592a6969702992828 SHA256 34de0b206abec628e8cc891afb650c71c3d7cbfd0fc949fc473156ddf2859d78 +EBUILD pdnsd-1.2.8.ebuild 3739 RMD160 b93773a8f7f19777952ffe9d072cc3094046ef97 SHA1 789ceb2fb1c63bc1ae180ecd5da138524c612c2e SHA256 2f74a679d31da6033652804cd2df519647d870b6ed1edd3d56c7c2f33ac2f8ec +MISC ChangeLog 14246 RMD160 43ec05808c2c44b18e7ec2c444182fa06accf70c SHA1 321bd1eefa2d5138edbfb91d5736195514727035 SHA256 9c461a513a0e945f32da361b9af4670bfb07c343b51767b7630fa72bf8e3a0d7 MISC metadata.xml 621 RMD160 d7eaebaa56a2dd3e927d562918419b07e0fa4c94 SHA1 85d856970c6cbfd03ea75c069f5dea7d872698a8 SHA256 0da353c76674cc5dd161ce927f389662fccea2762fcc632aa48cb754a8d5ae4e -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.10 (GNU/Linux) +Version: GnuPG v2.0.14 (GNU/Linux) -iEYEARECAAYFAkoFm+kACgkQts85UDFmaOVe4wCeOhNsQlRHIE1B4sTAyyKqB+Aj -YrYAnjhgF0YP6U3xhuMwY0qZOvHcP/Da -=agny +iEYEARECAAYFAkuWa6QACgkQAiZjviIA2Xhn6QCgkHbwpc4yMAnEASm9G/JPx8o5 +oWgAnihzRrvTSDG2njnE0tuDPYZHYLAt +=WCyj -----END PGP SIGNATURE----- diff --git a/net-dns/pdnsd/files/pdnsd.rc6.1 b/net-dns/pdnsd/files/pdnsd.rc6.1 new file mode 100644 index 000000000000..1c53664182e6 --- /dev/null +++ b/net-dns/pdnsd/files/pdnsd.rc6.1 @@ -0,0 +1,44 @@ +#!/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.1,v 1.1 2010/03/09 15:39:08 flameeyes 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 + + if [ ! -d /var/cache/pdnsd ] ; then + mkdir /var/cache/pdnsd + chown pdnsd:pdnsd /var/cache/pdnsd + fi +} + +start() { + checkconfig || return 1 + ebegin "Starting pdnsd" + start-stop-daemon --start --exec /usr/sbin/pdnsd \ + -- -s -t -d -p /var/run/pdnsd.pid ${PDNSDCONFIG} + eend $? +} + +stop() { + ebegin "Stopping pdnsd" + start-stop-daemon --stop --pidfile /var/run/pdnsd.pid + eend $? +} + +reload() { + ebegin "Reloading pdnsd.conf" + /usr/sbin/pdnsd-ctl config + eend $? +} diff --git a/net-dns/pdnsd/pdnsd-1.2.8.ebuild b/net-dns/pdnsd/pdnsd-1.2.8.ebuild new file mode 100644 index 000000000000..05f521802da0 --- /dev/null +++ b/net-dns/pdnsd/pdnsd-1.2.8.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2010 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.ebuild,v 1.1 2010/03/09 15:39:06 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="" +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" pdnsd-online || die + + mkdir "${T}"/confd + + cat - > "${T}"/confd/pdnsd-online <<EOF +# Enter the interface that connects you to the dns servers +# This will correspond to /etc/init.d/net.\${IFACE} +# +# IMPORTANT: Be sure to run depscan.sh after modifiying the +# IFACE variable +IFACE=ppp0 +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" +} |