From fb2a78eadf76e048cfbd6c5b38c880c728b93c5c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Diego=20Elio=20Petten=C3=B2?= Date: Tue, 9 Mar 2010 15:39:08 +0000 Subject: [PATCH] =?utf8?q?Version=20bump,=20with=20a=20few=20changes:=20in?= =?utf8?q?it=20script=20is=20no=20longer=20totally=20quiet=20(you'd=20miss?= =?utf8?q?=20on=20the=20errors)=20and=20will=20create=20the=20cache=20dire?= =?utf8?q?ctory=20if=20missing;=20the=20configuration=20file=20for=20pdnsd?= =?utf8?q?=20does=20no=20longer=20contain=20the=20whole=20help=20text=20(s?= =?utf8?q?aves=20from=20etc-update=20and=20fixes=20cross-compilation);=20t?= =?utf8?q?he=20test=20function=20should=20work=20even=20if=20no=20network?= =?utf8?q?=20is=20available=20(and=20will=20no=20longer=20happen=20?= =?utf8?q?=E2=80=9Cautomagically=E2=80=9D,=20as=20it=20depends=20on=20dig?= =?utf8?q?=20being=20present=20now);=20ipv6=20is=20enabled=20automatically?= =?utf8?q?=20on=20the=20build=20rather=20than=20by=20parameter,=20with=20t?= =?utf8?q?he=20USE=20flag=20set;=20drop=20underscores=20USE=20flag=20(obso?= =?utf8?q?leted,=20upstream=20no=20longer=20supports=20it),=20enable=20ura?= =?utf8?q?ndom=20by=20default=20(avoids=20sapping=20entropy=20by=20default?= =?utf8?q?,=20most=20users=20will=20be=20comfortable=20with=20that=20defau?= =?utf8?q?lt);=20drop=20nptl=20USE=20flag=20(leave=20it=20to=20be=20auto-c?= =?utf8?q?onfigured,=20which=20is=20good).=20To=20do=20for=20the=20next=20?= =?utf8?q?revision:=20install=20the=20dhcp2pdnsd=20script=20properly,=20an?= =?utf8?q?d=20write=20an=20init=20script=20for=20that.=20Package-Manager:?= =?utf8?q?=20portage-2.2=5Frc66/cvs/Linux=20x86=5F64?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- net-dns/pdnsd/ChangeLog | 22 +++++- net-dns/pdnsd/Manifest | 13 ++-- net-dns/pdnsd/files/pdnsd.rc6.1 | 44 ++++++++++++ net-dns/pdnsd/pdnsd-1.2.8.ebuild | 119 +++++++++++++++++++++++++++++++ 4 files changed, 191 insertions(+), 7 deletions(-) create mode 100644 net-dns/pdnsd/files/pdnsd.rc6.1 create mode 100644 net-dns/pdnsd/pdnsd-1.2.8.ebuild 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ò +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 -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 < "${T}"/confd/pdnsd < "${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" +} -- 2.26.2