summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Hanselmann <hansmi@gentoo.org>2006-01-21 12:17:05 +0000
committerMichael Hanselmann <hansmi@gentoo.org>2006-01-21 12:17:05 +0000
commit772dd260a7bc14aa1dc05cb588719e023c0e58e2 (patch)
tree6bb2af7f8dafbdea51605572b29cddfc893bf71b /net-dns
parentFixed DEPEND for modular X. (diff)
downloadhistorical-772dd260a7bc14aa1dc05cb588719e023c0e58e2.tar.gz
historical-772dd260a7bc14aa1dc05cb588719e023c0e58e2.tar.bz2
historical-772dd260a7bc14aa1dc05cb588719e023c0e58e2.zip
Added patches for multiple data files (multidata, datadir), replaced useq with use, updated djbdns-setup (bug 118371). Stable on hppa, mips, ppc, sparc. Put myself as maintainer.
Package-Manager: portage-2.1_pre3-r1
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/djbdns/ChangeLog13
-rw-r--r--net-dns/djbdns/Manifest23
-rw-r--r--net-dns/djbdns/djbdns-1.05-r14.ebuild4
-rw-r--r--net-dns/djbdns/djbdns-1.05-r16.ebuild6
-rw-r--r--net-dns/djbdns/djbdns-1.05-r17.ebuild158
-rw-r--r--net-dns/djbdns/files/digest-djbdns-1.05-r1610
-rw-r--r--net-dns/djbdns/files/digest-djbdns-1.05-r1711
-rw-r--r--net-dns/djbdns/files/djbdns-setup-r17421
-rw-r--r--net-dns/djbdns/metadata.xml4
9 files changed, 623 insertions, 27 deletions
diff --git a/net-dns/djbdns/ChangeLog b/net-dns/djbdns/ChangeLog
index a63cd086f9e9..688fff825d28 100644
--- a/net-dns/djbdns/ChangeLog
+++ b/net-dns/djbdns/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-dns/djbdns
-# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/ChangeLog,v 1.67 2005/12/31 13:48:35 flameeyes Exp $
+# Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/ChangeLog,v 1.68 2006/01/21 12:17:05 hansmi Exp $
+
+*djbdns-1.05-r17 (21 Jan 2006)
+
+ 21 Jan 2006; Michael Hanselmann <hansmi@gentoo.org>
+ +files/djbdns-setup-r17, metadata.xml, djbdns-1.05-r16.ebuild,
+ +djbdns-1.05-r17.ebuild:
+ Added patches for multiple data files (multidata, datadir), replaced useq
+ with use, updated djbdns-setup (bug 118371). Stable on hppa, mips, ppc,
+ sparc. Put myself as maintainer.
31 Dec 2005; Diego Pettenò <flameeyes@gentoo.org> djbdns-1.05-r14.ebuild:
Change /bin/false to -1 in enewuser call.
diff --git a/net-dns/djbdns/Manifest b/net-dns/djbdns/Manifest
index 26f1db78c2a9..f5e3ee937b6a 100644
--- a/net-dns/djbdns/Manifest
+++ b/net-dns/djbdns/Manifest
@@ -1,25 +1,18 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-MD5 1e405fd65fb4cb58ea8b2ab5dde36843 ChangeLog 12051
-MD5 8cf029fb28d30f1899ca2b56ac5a0013 djbdns-1.05-r14.ebuild 4678
+MD5 ba9895ab30bb24e03e51b688a4a4ddf0 ChangeLog 12412
+MD5 9cc2cdecdebcf233788fbb7201b49c3b djbdns-1.05-r14.ebuild 4675
MD5 f04b8acc339d82cdf4352c556707395d djbdns-1.05-r15.ebuild 4708
-MD5 83c6d79e4b650aa3b178405482957f86 djbdns-1.05-r16.ebuild 4708
+MD5 61f80f6ade0b48c89bbbafa3c2c7057a djbdns-1.05-r16.ebuild 4701
+MD5 8a1cf8c2d178ba9d2bc15152c95bacac djbdns-1.05-r17.ebuild 5174
MD5 188096855028696985f1b9d839d1643f files/1.05-errno.patch 238
MD5 9127cff20924bbf9dfd84d3896a2510e files/digest-djbdns-1.05-r14 624
MD5 865a37de3e223a3ca61e8c4eedc8e8e6 files/digest-djbdns-1.05-r15 624
-MD5 8a42d55ba5a2b3e8b0c65d11ec73663c files/digest-djbdns-1.05-r16 624
+MD5 ad3a99605afe2fbd3274704040b661cc files/digest-djbdns-1.05-r16 624
+MD5 428829b42df134dd5e5c7c71e77ef6aa files/digest-djbdns-1.05-r17 772
MD5 e978c483e32ec53b3eb8a2b703c89d6d files/djbdns-setup 11152
+MD5 357468f880552fcc6ead17d99cefb3ea files/djbdns-setup-r17 10881
MD5 2804eedf8bf07dacf67d094c5122c723 files/dnscache-setup 6007
MD5 dfd675b2775efcbb604413a84db8bf1a files/dnsroots.patch 349
MD5 46e046747b9dd8a0a1300a52c142f423 files/fwdzone-fix.patch 438
MD5 625d040d68fa3f87d67688c0e15eb2f4 files/headtail.patch 1781
MD5 d1844f9853a9bb56738a6a0eb6e04de4 files/tinydns-setup 3206
-MD5 dffd46174e78b327c834fc3e4b1cf848 metadata.xml 160
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFDtow/AiZjviIA2XgRAq5PAKDvngMqHR6f1Bw1g9c/Pir2o1oRrACfef50
-wo6lcvAw4VLSIIdjWTzi9xk=
-=sIW0
------END PGP SIGNATURE-----
+MD5 126c0768ab916bb5855092f1b55413ab metadata.xml 254
diff --git a/net-dns/djbdns/djbdns-1.05-r14.ebuild b/net-dns/djbdns/djbdns-1.05-r14.ebuild
index 249557dc7fc7..3196e61cdc70 100644
--- a/net-dns/djbdns/djbdns-1.05-r14.ebuild
+++ b/net-dns/djbdns/djbdns-1.05-r14.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r14.ebuild,v 1.16 2005/12/31 13:48:35 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r14.ebuild,v 1.17 2006/01/21 12:17:05 hansmi Exp $
IUSE="aliaschain cnamefix doc fwdzone ipv6 multipleip roundrobin semanticfix static selinux"
diff --git a/net-dns/djbdns/djbdns-1.05-r16.ebuild b/net-dns/djbdns/djbdns-1.05-r16.ebuild
index c60670e25b73..c6fc233f0cf8 100644
--- a/net-dns/djbdns/djbdns-1.05-r16.ebuild
+++ b/net-dns/djbdns/djbdns-1.05-r16.ebuild
@@ -1,6 +1,6 @@
-# Copyright 1999-2005 Gentoo Foundation
+# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r16.ebuild,v 1.1 2005/09/09 09:51:46 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r16.ebuild,v 1.2 2006/01/21 12:17:05 hansmi Exp $
IUSE="aliaschain cnamefix doc fwdzone ipv6 multipleip roundrobin semanticfix static selinux"
@@ -24,7 +24,7 @@ SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
SLOT="0"
LICENSE="as-is"
-KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+KEYWORDS="~alpha ~amd64 hppa mips ppc ~ppc64 sparc ~x86"
RDEPEND=">=sys-process/daemontools-0.70
doc? ( app-doc/djbdns-man )
diff --git a/net-dns/djbdns/djbdns-1.05-r17.ebuild b/net-dns/djbdns/djbdns-1.05-r17.ebuild
new file mode 100644
index 000000000000..27a6b51a62f1
--- /dev/null
+++ b/net-dns/djbdns/djbdns-1.05-r17.ebuild
@@ -0,0 +1,158 @@
+# Copyright 1999-2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r17.ebuild,v 1.1 2006/01/21 12:17:05 hansmi Exp $
+
+IUSE="aliaschain cnamefix doc fwdzone ipv6 \
+ multipleip roundrobin semanticfix static selinux \
+ multidata datadir"
+
+inherit eutils
+
+DESCRIPTION="Excellent high-performance DNS services"
+HOMEPAGE="http://cr.yp.to/djbdns.html"
+URL1="http://www.skarnet.org/software/djbdns-fwdzone"
+URL2="http://homepages.tesco.net/~J.deBoynePollard/Softwares/djbdns"
+URL3="http://dustman.net/andy/djbware/tinydns-datadir"
+IPV6_PATCH="test23"
+
+SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
+ fwdzone? ( ${URL1}/djbdns-1.04-fwdzone.patch )
+ roundrobin? ( http://www.legend.co.uk/djb/dns/round-robin.patch )
+ multipleip? (
+ http://danp.net/djbdns/dnscache-multiple-ip.patch
+ http://www.ohse.de/uwe/patches/djbdns-1.05-multiip.diff
+ )
+ aliaschain? ( ${URL2}/tinydns-alias-chain-truncation.patch )
+ semanticfix? ( ${URL2}/tinydns-data-semantic-error.patch )
+ cnamefix? ( ${URL2}/dnscache-cname-handling.patch )
+ ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )
+ datadir? ( ${URL3}/0.0.0/djbdns-1.0.5-datadir.patch )
+ multidata? (
+ http://js.hu/package/djbdns-conf/djbdns-1.05-multi_tinydns_data.patch
+ )"
+
+SLOT="0"
+LICENSE="as-is"
+KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
+
+RDEPEND=">=sys-process/daemontools-0.70
+ doc? ( app-doc/djbdns-man )
+ sys-apps/ucspi-tcp
+ selinux? ( sec-policy/selinux-djbdns )"
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ use ipv6 && use cnamefix && \
+ eerror "ipv6 cannot currently be used with the cnamefix patch" && \
+ exit -1
+
+ use ipv6 && use multipleip && \
+ eerror "ipv6 cannot currently be used with the multipleip patch" && \
+ exit -1
+
+ use ipv6 && ( use fwdzone || use roundrobin ) && \
+ eerror "ipv6 cannot currently be used with the fwdzone or " && \
+ eerror "roundrobin patch." && \
+ eerror && \
+ eerror "If you would like to see ipv6 support along with one of " && \
+ eerror "those other patches please submit a working patch that " && \
+ eerror "combines ipv6 with either fwdzone or roundrobin but not " && \
+ eerror "both at the same time, since the latter 2 patches are " && \
+ eerror "mutually exclusive according to bug #31238." && exit -1
+
+ use fwdzone && use roundrobin && \
+ eerror "fwdzone and roundrobin do not work together according " && \
+ eerror "to bug #31238" && exit -1
+
+ use datadir && use multidata && \
+ die "The datadir and multidata patches are not compatible with each other" && \
+ exit -1
+
+ use cnamefix && \
+ sed s:'\r'::g < ${DISTDIR}/dnscache-cname-handling.patch \
+ > ${WORKDIR}/dnscache-cname-handling.patch && \
+ epatch ${WORKDIR}/dnscache-cname-handling.patch
+ use aliaschain && \
+ epatch ${DISTDIR}/tinydns-alias-chain-truncation.patch
+ use semanticfix && \
+ epatch ${DISTDIR}/tinydns-data-semantic-error.patch
+
+ use fwdzone && epatch ${DISTDIR}/djbdns-1.04-fwdzone.patch
+ use roundrobin && epatch ${DISTDIR}/round-robin.patch
+ use multipleip && \
+ epatch ${DISTDIR}/dnscache-multiple-ip.patch && \
+ epatch ${DISTDIR}/djbdns-1.05-multiip.diff
+ use datadir && \
+ epatch ${DISTDIR}/djbdns-1.0.5-datadir.patch
+ use multidata && \
+ epatch ${DISTDIR}/djbdns-1.05-multi_tinydns_data.patch
+
+ epatch ${FILESDIR}/headtail.patch
+ epatch ${FILESDIR}/dnsroots.patch
+
+ use ipv6 && {
+ einfo "At present dnstrace does NOT support IPv6. It will " \
+ "be compiled without IPv6 support."
+ cp -pR ${S} ${S}-noipv6
+ # Careful -- >=test21 of the ipv6 patch includes the errno patch
+ epatch ${WORKDIR}/${P}-${IPV6_PATCH}.diff
+ cd ${S}-noipv6
+ epatch ${FILESDIR}/${PV}-errno.patch
+ } || {
+ epatch ${FILESDIR}/${PV}-errno.patch
+ }
+}
+
+src_compile() {
+ LDFLAGS=
+ use static && LDFLAGS="-static"
+ echo "gcc ${CFLAGS}" > conf-cc
+ echo "gcc ${LDFLAGS}" > conf-ld
+ echo "/usr" > conf-home
+ MAKEOPTS="-j1" emake || die "emake failed"
+
+ # If djbdns is compiled with ipv6 support it breaks dnstrace
+ # therefore we must compile dnstrace separately without ipv6
+ # support.
+ if use ipv6; then
+ einfo "Compiling dnstrace without ipv6 support"
+ cd ${S}-noipv6
+ LDFLAGS=
+ use static && LDFLAGS="-static"
+ echo "gcc ${CFLAGS}" > conf-cc
+ echo "gcc ${LDFLAGS}" > conf-ld
+ echo "/usr" > conf-home
+ MAKEOPTS="-j1" emake dnstrace || die "emake failed"
+ fi
+}
+
+src_install() {
+ insinto /etc
+ doins dnsroots.global
+ into /usr
+ dobin *-conf dnscache tinydns walldns rbldns pickdns axfrdns \
+ *-get *-data *-edit dnsip dnsipq dnsname dnstxt dnsmx \
+ dnsfilter random-ip dnsqr dnsq dnstrace dnstracesort
+
+ use ipv6 && dobin dnsip6 dnsip6q ${S}-noipv6/dnstrace
+
+ dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION
+
+ dobin ${FILESDIR}/dnscache-setup
+ use fwdzone && cd ${D}${DESTTREE}/bin && \
+ epatch ${FILESDIR}/fwdzone-fix.patch
+ dobin ${FILESDIR}/tinydns-setup
+ newbin ${FILESDIR}/djbdns-setup-${PR} djbdns-setup
+}
+
+pkg_postinst() {
+ enewgroup nofiles
+ enewuser dnscache -1 -1 /nonexistent nofiles
+ enewuser dnslog -1 -1 /nonexistent nofiles
+ enewuser tinydns -1 -1 /nonexistent nofiles
+
+ einfo "Use (dnscache-setup + tinydns-setup) or djbdns-setup" \
+ "to configure djbdns."
+}
diff --git a/net-dns/djbdns/files/digest-djbdns-1.05-r16 b/net-dns/djbdns/files/digest-djbdns-1.05-r16
index da4d4b05b9f9..9c706025b390 100644
--- a/net-dns/djbdns/files/digest-djbdns-1.05-r16
+++ b/net-dns/djbdns/files/digest-djbdns-1.05-r16
@@ -1,9 +1,9 @@
-MD5 3147c5cd56832aa3b41955c7a51cbeb2 djbdns-1.05.tar.gz 85648
MD5 ac799440bacc9d283e1c228f84cf99d4 djbdns-1.04-fwdzone.patch 6479
-MD5 4c8558be4c763b039de9211368c01b06 round-robin.patch 3239
-MD5 9ff9c640a746331bcb0901d21a0c0e4f dnscache-multiple-ip.patch 7601
MD5 d5c05ae75add84094d45a78a67ab925d djbdns-1.05-multiip.diff 5522
+MD5 dc35e88e20ffe2670cef5bb4d8a2c183 djbdns-1.05-test23.diff.bz2 18480
+MD5 3147c5cd56832aa3b41955c7a51cbeb2 djbdns-1.05.tar.gz 85648
+MD5 847766cb1b2fd57eb0cd97ac44b763c7 dnscache-cname-handling.patch 7569
+MD5 9ff9c640a746331bcb0901d21a0c0e4f dnscache-multiple-ip.patch 7601
+MD5 4c8558be4c763b039de9211368c01b06 round-robin.patch 3239
MD5 ef1b5cfe7a6f90e4ed8b342e4f4f1ded tinydns-alias-chain-truncation.patch 1994
MD5 219cb6b75878d7a7b9500a6e3ded154f tinydns-data-semantic-error.patch 5096
-MD5 847766cb1b2fd57eb0cd97ac44b763c7 dnscache-cname-handling.patch 7569
-MD5 dc35e88e20ffe2670cef5bb4d8a2c183 djbdns-1.05-test23.diff.bz2 18480
diff --git a/net-dns/djbdns/files/digest-djbdns-1.05-r17 b/net-dns/djbdns/files/digest-djbdns-1.05-r17
new file mode 100644
index 000000000000..624b8caee302
--- /dev/null
+++ b/net-dns/djbdns/files/digest-djbdns-1.05-r17
@@ -0,0 +1,11 @@
+MD5 bbe7245413c83a31f08a678588ae5a09 djbdns-1.0.5-datadir.patch 2918
+MD5 ac799440bacc9d283e1c228f84cf99d4 djbdns-1.04-fwdzone.patch 6479
+MD5 3b59e08b6e9d2c5538762ee60c286867 djbdns-1.05-multi_tinydns_data.patch 1616
+MD5 d5c05ae75add84094d45a78a67ab925d djbdns-1.05-multiip.diff 5522
+MD5 dc35e88e20ffe2670cef5bb4d8a2c183 djbdns-1.05-test23.diff.bz2 18480
+MD5 3147c5cd56832aa3b41955c7a51cbeb2 djbdns-1.05.tar.gz 85648
+MD5 847766cb1b2fd57eb0cd97ac44b763c7 dnscache-cname-handling.patch 7569
+MD5 9ff9c640a746331bcb0901d21a0c0e4f dnscache-multiple-ip.patch 7601
+MD5 4c8558be4c763b039de9211368c01b06 round-robin.patch 3239
+MD5 ef1b5cfe7a6f90e4ed8b342e4f4f1ded tinydns-alias-chain-truncation.patch 1994
+MD5 219cb6b75878d7a7b9500a6e3ded154f tinydns-data-semantic-error.patch 5096
diff --git a/net-dns/djbdns/files/djbdns-setup-r17 b/net-dns/djbdns/files/djbdns-setup-r17
new file mode 100644
index 000000000000..ce821975029d
--- /dev/null
+++ b/net-dns/djbdns/files/djbdns-setup-r17
@@ -0,0 +1,421 @@
+#!/bin/bash
+#
+# djbdns-setup
+#
+# Copyright (C) 2004-2006 Kalin KOZHUHAROV <kalin@thinrope.net>
+# The latest version of this script can be accessed at:
+# rsync://rsync.tar.bz/gentoo-portage-pkalin/net-dns/djbdns/files/djbdns-setup
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# http://www.gnu.org/copyleft/gpl.html
+#
+
+# {{{ Rip off the ewarn code from /sbin/functions.sh
+WARN=$'\e[33;01m'
+NORMAL=$'\e[0m'
+ewarn() {
+ echo -e " ${WARN}*${NORMAL} $*"
+ return 0
+}
+# }}}
+
+# {{{ global vars
+S_SEPARATOR="--------------------------------------------------------------------------------"
+D_SEPARATOR="================================================================================"
+
+REQ_GROUP="nofiles"
+REQ_USERS="tinydns dnscache dnslog"
+
+IPs[0]=""
+IPs[1]=""
+IPs[2]=""
+dnscache=0
+tinydns=1
+axfrdns=2
+
+# global vars }}}
+
+# {{{ functions
+check_group_users()
+{
+ echo ": Checking for required group (${REQ_GROUP}) :"
+ grep ${REQ_GROUP} /etc/group &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ ebegin "Adding group ${REQ_GROUP}"
+ /usr/sbin/groupadd ${REQ_GROUP} &>/dev/null && eend 0 || eend 1
+ fi
+
+ echo ": Checking for required users (${REQ_USERS}) :"
+ for user in ${REQ_USERS};
+ do
+ grep ${user} /etc/passwd &> /dev/null
+ if [ $? -ne 0 ]
+ then
+ ebegin "Adding user ${user}"
+ /usr/sbin/useradd -d /dev/null -s /bin/false -g ${REQ_GROUP} ${user} &>/dev/null && eend 0 || eend 1
+ fi
+ done
+ return 0
+}
+
+start_services()
+{
+ local services="$1"
+
+ echo "${SEPARATOR}"
+ echo ": Start services :"
+ echo
+ echo " Your services (${services// /, }) are ready for startup!"
+ echo
+ ewarn " The following requires daemontools to be running!"
+ local answer=""
+ read -p " Would you like ${services// /, } to be started and supervised by daemontools now? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+
+ ebegin "Checking if daemontools are running"
+ ps -A |grep svscanboot &>/dev/null && eend 0 || eend 1
+
+ ebegin "Linking services in /service"
+ # Don't make symbolic links to / !
+ # use ../ instead as it gives trouble in chrooted environments
+ local fixedroot_path=`echo ${mypath} | sed -e 's#^/#../#'`
+ for service in ${services};
+ do
+ for ip in ${IPs[${service}]};
+ do
+ ln -sf ${fixedroot_path}/${service}/${ip} /service/${service}_${ip}
+ done
+ done
+
+ eend 0
+
+ echo
+ ls -l --color=auto /service/
+ echo
+ ebegin "Waiting 5 seconds for services to start"
+ sleep 5 && eend 0
+
+ echo "${SEPARATOR}"
+ echo ": Check services status :"
+ echo
+ for service in ${services};
+ do
+ for ip in ${IPs[${service}]};
+ do
+ svstat /service/${service}_${ip} /service/${service}_${ip}/log
+ done
+ done
+ fi
+ return 0
+}
+
+tinydns_setup()
+{
+ return 0
+}
+
+axfrdns_setup()
+{
+ echo "${S_SEPARATOR}"
+ echo ": Grant access to axfrdns :"
+ echo
+ TCPRULES_DIR="${mypath}/axfrdns/${myip}/control"
+ echo " axfrdns is accessed by your secondary servers and when response cannot fit UDP packet"
+ echo " You have to specify which IP addresses are allowed to access it"
+ echo " in ${TCPRULES_DIR}/tcp.axfrdns"
+ echo
+ echo " Example:"
+ echo " 1.2.3.4 would allow the host 1.2.3.4"
+ echo " 1.2.3. would allow ALL hosts 1.2.3.x (like 1.2.3.4, 1.2.3.100, etc.)"
+ ewarn "Do NOT forget the trailing dot!"
+ echo
+ echo " Press Enter if you do not want to allow any access now."
+ echo
+
+ sed -i -e "s#-x tcp.cdb#-x control/tcp.axfrdns.cdb#g" ${mypath}/axfrdns/${myip}/run
+ if [ -e ${TCPRULES_DIR}/tcp.axfrdns ]
+ then
+ ewarn "${TCPRULES_DIR}/tcp.axfrdns exists."
+ read -p " Do you want it cleared? [y|N]: " answer
+ if [ "${answer}" == "y" ]
+ then
+ echo '# sample line: 1.2.3.4:allow,AXFR="heaven.af.mil/3.2.1.in-addr.arpa"' > ${TCPRULES_DIR}/tcp.axfrdns
+ fi
+ fi
+
+ read -p " IP to allow (press Enter to end)> " ipallow
+
+ while [ "$ipallow" != "" ]
+ do
+ echo "${ipallow}:allow" >> ${TCPRULES_DIR}/tcp.axfrdns
+ read -p " IP to allow (press Enter to end)> " ipallow
+ done
+ echo ":deny" >> ${TCPRULES_DIR}/tcp.axfrdns
+
+ echo " Here are the tcprules created so far:"
+ echo
+ cat ${TCPRULES_DIR}/tcp.axfrdns
+ echo
+ local answer=""
+ read -p " Would you like ${TCPRULES_DIR}/tcp.axfrdns.cdb updated? [Y|n]: " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+ ebegin "Updating ${TCPRULES_DIR}/tcp.axfrdns.cdb"
+ bash -c "cd ${TCPRULES_DIR} && make" && eend 0 || eend 1
+ fi
+ return 0
+}
+
+dnscache_setup()
+{
+ echo ": Configure forwarding :"
+ echo
+ echo " dnscache can be configured to forward queries to another"
+ echo " DNS cache (such as the one your ISP provides) rather than"
+ echo " performing the lookups itself."
+ echo
+ echo " To enable this forwarding-only mode (usually a good idea),"
+ echo " provide the IPs of the caches to forward to."
+ echo " To have dnscache perform the lookups itself, just press Enter."
+ echo
+ read -p " forward-to IP> " myforward
+ echo
+ if [ "$myforward" != "" ]
+ then
+ echo $myforward > ${mypath}/dnscache/${myip}/root/servers/\@
+ echo -n "1" > ${mypath}/dnscache/${myip}/env/FORWARDONLY
+
+ read -p " forward-to IP (press Enter to end)> " myforward
+ while [ "$myforward" != "" ]
+ do
+ echo $myforward >> ${mypath}/dnscache/${myip}/root/servers/\@
+ read -p " forward-to IP (press Enter to end)> " myforward
+ done
+
+ echo
+ echo " Currently all queries will be forwarded to:"
+ echo
+ cat ${mypath}/dnscache/${myip}/root/servers/\@
+ echo
+ fi
+
+ echo "${SEPARATOR}"
+ echo ": Configuring clients :"
+ echo
+ echo " By default dnscache allows only localhost (127.0.0.1) to"
+ echo " access it. You have to specify the IP addresses of the"
+ echo " clients that shall be allowed to use it."
+ echo
+ echo " Example:"
+ echo " 1.2.3.4 would allow only one host: 1.2.3.4"
+ echo " 1.2.3 would allow all hosts 1.2.3.0/24 (e.g. 1.2.3.4, 1.2.3.100, etc.)"
+ echo
+ echo " Press Enter if you do NOT want to allow external clients!"
+ echo
+
+ read -p " Allowed IP> " myclientip
+
+ while [ "$myclientip" != "" ]
+ do
+ touch ${mypath}/dnscache/${myip}/root/ip/${myclientip}
+ read -p " Allowed IP (press Enter to end)> " myclientip
+ done
+
+ echo
+ echo " All queries from the hosts below will be answered:"
+ echo
+ ls -1 ${mypath}/dnscache/${myip}/root/ip
+ echo
+
+ #TODO
+ #configure cachsize - $mypath/env/CACHESIZE
+
+ #TODO
+ #configure datalimit - $mypath/env/DATALIMIT
+ return 0
+}
+
+common_setup()
+{
+ local service_human="$1"
+ local service_machine="$2"
+ local services="$3"
+
+ echo ": ${service_human} setup :"
+ echo
+
+ for service in ${services};
+ do
+ if [ ! -e ${mypath}/${service} ]
+ then
+ ebegin "Creating ${mypath}/${service}"
+ mkdir -p $mypath/${service} && eend 0 || eend 1
+ fi
+ done
+
+ echo "${SEPARATOR}"
+ echo ": IP address to bind to :"
+ echo
+ echo " Specify an address to which the ${service_human} should bind."
+ echo " Currently accessible IPs:"
+ local addrs=`ifconfig -a | grep "inet addr" | cut -f2 -d":" | cut -f1 -d" "`
+ echo " "$addrs
+ echo
+
+ while [ "${myip}" == "" ]
+ do
+ read -p " IP to bind to> " myip
+ done
+ echo
+
+ for service in ${services};
+ do
+ IPs[${service}]="${IPs[${service}]} ${myip}"
+ done
+
+ local dnscache_INSTALL="/usr/bin/dnscache-conf dnscache dnslog ${mypath}/dnscache/${myip} $myip"
+ local tinydns_INSTALL="/usr/bin/tinydns-conf tinydns dnslog ${mypath}/tinydns/${myip} $myip"
+ local axfrdns_INSTALL="\
+ /usr/bin/axfrdns-conf tinydns dnslog ${mypath}/axfrdns/${myip} ${mypath}/tinydns/${myip} $myip &&\
+ mkdir -p ${mypath}/axfrdns/${myip}/control &&\
+ echo -e \"tcp.axfrdns.cdb:\ttcp.axfrdns\n\ttcprules tcp.axfrdns.cdb .tcp.axfrdns.cdb.tmp < tcp.axfrdns\" > ${mypath}/axfrdns/${myip}/control/Makefile &&\
+ rm -f ${mypath}/axfrdns/${myip}/tcp ${mypath}/axfrdns/${myip}/Makefile"
+
+ for service in ${services};
+ do
+ if [ ! -e ${mypath}/${service}/${myip} ]
+ then
+ ebegin "Setting up ${service} in ${mypath}/${service}/${myip}"
+ eval command=\$${service}_INSTALL
+ /bin/bash -c "${command}" && eend 0 || eend 1
+ else
+ ewarn "${service} directory ${mypath}/${service}/${myip} exists, nothing done."
+ fi
+ done
+
+}
+
+# functions }}}
+
+# {{{ main script
+
+if [ `id -u` -ne 0 ]
+then
+ ewarn "You must be root to run this script, sorry."
+ exit 1
+else
+
+ echo "${D_SEPARATOR}"
+ echo ": DJB DNS setup :"
+ echo
+ echo " This script will help you setup the following:"
+ echo
+ echo " DNS server(s): to publish addresses of Internet hosts"
+ echo
+ echo " DNS cache(s) : to find addresses of Internet hosts"
+ echo
+ echo " For further information see:"
+ echo " http://cr.yp.to/djbdns/blurb/overview.html"
+ echo
+ ewarn "If you have already setup your services,"
+ ewarn "either exit now, or setup in different directories."
+ echo
+
+ answer=""
+ read -p " Would you like to continue with setup? [Y|n]> " answer
+ if [ "${answer}" == "n" ] || [ "${answer}" == "N" ]
+ then
+ ewarn "Aborting setup"
+ exit 1
+ fi
+
+ echo "${D_SEPARATOR}"
+ echo ": Choose install location :"
+ echo
+ default_path="/var"
+ echo " The default (${default_path}) will install them"
+ echo " in ${default_path}/\${service}/\${IP_ADDRESS}"
+ echo
+ echo " For example:"
+ echo " /var/tinydns /1.2.3.4"
+ echo " /192.168.33.1"
+ echo " /axfrdns /1.2.3.4"
+ echo " /192.168.33.1"
+ echo " /dnscache/127.0.0.1"
+ echo
+ ewarn "Do NOT enter trailing slash"
+ echo " Where do you want services installed?"
+ read -p "[${default_path}] > " mypath
+ echo
+
+ if [ "${mypath}" == "" ]
+ then
+ mypath=${default_path}
+ fi
+
+ echo "${D_SEPARATOR}"
+ check_group_users
+
+ answer=""
+ another=""
+ until [ "$answer" == "n" ]
+ do
+ echo "${D_SEPARATOR}"
+ answer=""
+ read -p " Would you like to setup ${another}dnscache? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+ myip=""
+ echo "${S_SEPARATOR}"
+ common_setup "DNS cache" "dnscache" "dnscache"
+ if [ $? == 0 ]
+ then
+ dnscache_setup
+ else
+ ewarn "Skipping dnscache specific setup."
+ fi
+ fi
+ another="another "
+ done
+
+ answer=""
+ another=""
+ until [ "$answer" == "n" ]
+ do
+ echo "${D_SEPARATOR}"
+ answer=""
+ read -p " Would you like to setup ${another}DNS server? [Y|n]> " answer
+ if [ "${answer}" == "Y" ] || [ "${answer}" == "" ]
+ then
+ myip=""
+ echo "${S_SEPARATOR}"
+ common_setup "DNS server" "{tinydns,afxrdns}" "tinydns axfrdns"
+ if [ $? == 0 ]
+ then
+ tinydns_setup
+ axfrdns_setup
+ else
+ ewarn "Skipping tinydns and axfrdns specific setup."
+ fi
+ fi
+ another="another "
+ done
+
+ echo "${D_SEPARATOR}"
+
+ start_services "tinydns axfrdns dnscache"
+
+ echo "${D_SEPARATOR}"
+fi
+# main script }}}
+# vim: set ts=4 fenc=utf-8 foldmethod=marker:
diff --git a/net-dns/djbdns/metadata.xml b/net-dns/djbdns/metadata.xml
index 20ce219711a2..9ec9ac17c163 100644
--- a/net-dns/djbdns/metadata.xml
+++ b/net-dns/djbdns/metadata.xml
@@ -2,4 +2,8 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<herd>no-herd</herd>
+<maintainer>
+ <email>hansmi@gentoo.org</email>
+ <name>Michael Hanselmann</name>
+</maintainer>
</pkgmetadata>