summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Popov <pinkbyte@gentoo.org>2013-06-23 18:40:20 +0000
committerSergey Popov <pinkbyte@gentoo.org>2013-06-23 18:40:20 +0000
commit4fe8eded29fa98b1a300fa3d6ff6f6a3d13e4f9e (patch)
tree71f5906fe4b31f8f8300f56348708aa55a9f2269 /net-dns
parenteapi=5; fixed unclear license, see wrt bug 446218 (diff)
downloadgentoo-2-4fe8eded29fa98b1a300fa3d6ff6f6a3d13e4f9e.tar.gz
gentoo-2-4fe8eded29fa98b1a300fa3d6ff6f6a3d13e4f9e.tar.bz2
gentoo-2-4fe8eded29fa98b1a300fa3d6ff6f6a3d13e4f9e.zip
Drop old revisions by maintainer's request, bug #474510
(Portage version: 2.2.0_alpha181/cvs/Linux x86_64, signed Manifest commit with key 0x1F357D42)
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/djbdns/ChangeLog6
-rw-r--r--net-dns/djbdns/djbdns-1.05-r23.ebuild131
-rw-r--r--net-dns/djbdns/djbdns-1.05-r24.ebuild133
-rw-r--r--net-dns/djbdns/djbdns-1.05-r25.ebuild136
-rw-r--r--net-dns/djbdns/files/djbdns-setup-r17421
5 files changed, 5 insertions, 822 deletions
diff --git a/net-dns/djbdns/ChangeLog b/net-dns/djbdns/ChangeLog
index 08967ee10a53..5a629c6cd876 100644
--- a/net-dns/djbdns/ChangeLog
+++ b/net-dns/djbdns/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for net-dns/djbdns
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/ChangeLog,v 1.138 2013/06/02 10:59:23 pacho Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/ChangeLog,v 1.139 2013/06/23 18:40:19 pinkbyte Exp $
+
+ 23 Jun 2013; Sergey Popov <pinkbyte@gentoo.org> -djbdns-1.05-r23.ebuild,
+ -djbdns-1.05-r24.ebuild, -djbdns-1.05-r25.ebuild, -files/djbdns-setup-r17:
+ Drop old revisions by maintainer's request, bug #474510
02 Jun 2013; Pacho Ramos <pacho@gentoo.org> metadata.xml:
Cleanup due bug #328951
diff --git a/net-dns/djbdns/djbdns-1.05-r23.ebuild b/net-dns/djbdns/djbdns-1.05-r23.ebuild
deleted file mode 100644
index 97867921f703..000000000000
--- a/net-dns/djbdns/djbdns-1.05-r23.ebuild
+++ /dev/null
@@ -1,131 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r23.ebuild,v 1.11 2013/01/05 23:03:04 pinkbyte Exp $
-
-IUSE="doc ipv6 selinux static"
-
-inherit eutils flag-o-matic toolchain-funcs user
-
-DESCRIPTION="Excellent high-performance DNS services"
-HOMEPAGE="http://cr.yp.to/djbdns.html"
-IPV6_PATCH="test23"
-
-SRC_URI="
- http://cr.yp.to/djbdns/${P}.tar.gz
- ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )
-"
-
-SLOT="0"
-LICENSE="public-domain"
-KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86"
-
-RDEPEND="
- virtual/daemontools
- sys-apps/ucspi-tcp
- doc? ( app-doc/djbdns-man )
- selinux? ( sec-policy/selinux-djbdns )
-"
-
-src_unpack() {
- unpack "${P}.tar.gz"
- cd "${S}"
-
- echo
- elog 'Several patches have been dropped from this djbdns ebuild revision.'
- elog 'Please use the DJBDNS_PATCH_DIR variable to specify a directory'
- elog 'of custom patches.'
- elog
- elog 'Some of them can be found at http://tinydns.org/ or'
- elog 'http://homepage.ntlworld.com/jonathan.deboynepollard/Softwares/djbdns/'
- elog
-
- epatch \
- "${FILESDIR}/headtail.patch" \
- "${FILESDIR}/dnsroots.patch" \
- "${FILESDIR}/dnstracesort.patch"
-
- # Fix CVE2009-0858
- epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
-
- if use ipv6; then
- elog "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 "${DISTDIR}/${P}-${IPV6_PATCH}.diff.bz2"
-
- # Fix CVE2008-4392
- epatch \
- "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6.patch" \
- "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch"
-
- cd "${S}-noipv6"
- fi
-
- # Fix CVE2008-4392
- epatch \
- "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \
- "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
-
- epatch "${FILESDIR}/${PV}-errno.patch"
-
- if [[ -n "${DJBDNS_PATCH_DIR}" && -d "${DJBDNS_PATCH_DIR}" ]]
- then
- echo
- ewarn "You enabled custom patches from ${DJBDNS_PATCH_DIR}."
- ewarn "Be warned that you won't get any support when using "
- ewarn "this feature. You're on your own from now!"
- echo
- ebeep
- cd "${S}" && epatch "${DJBDNS_PATCH_DIR}/"*
- fi
-}
-
-src_compile() {
- use static && append-ldflags -static
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
- echo "/usr" > conf-home
- emake -j1 || 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
- elog "Compiling dnstrace without ipv6 support"
- cd "${S}-noipv6"
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
- echo "/usr" > conf-home
- emake -j1 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" || die
- dobin "${FILESDIR}/tinydns-setup" || die
- dobin "${FILESDIR}/djbdns-setup" || die
-}
-
-pkg_setup() {
- # The nofiles group is provided by baselayout
- enewuser dnscache -1 -1 -1 nofiles
- enewuser dnslog -1 -1 -1 nofiles
- enewuser tinydns -1 -1 -1 nofiles
-}
-
-pkg_postinst() {
- elog "Use dnscache-setup & tinydns-setup or djbdns-setup to configure djbdns."
-}
diff --git a/net-dns/djbdns/djbdns-1.05-r24.ebuild b/net-dns/djbdns/djbdns-1.05-r24.ebuild
deleted file mode 100644
index 87eefe0009a3..000000000000
--- a/net-dns/djbdns/djbdns-1.05-r24.ebuild
+++ /dev/null
@@ -1,133 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r24.ebuild,v 1.7 2013/01/05 23:03:04 pinkbyte Exp $
-
-EAPI="2"
-inherit eutils flag-o-matic toolchain-funcs user
-
-DESCRIPTION="Excellent high-performance DNS services"
-HOMEPAGE="http://cr.yp.to/djbdns.html"
-IPV6_PATCH="test23"
-
-SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
- ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )"
-
-SLOT="0"
-LICENSE="public-domain"
-KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="doc ipv6 selinux static"
-
-DEPEND=""
-RDEPEND="${DEPEND}
- virtual/daemontools
- sys-apps/ucspi-tcp
- doc? ( app-doc/djbdns-man )
- selinux? ( sec-policy/selinux-djbdns )
-"
-
-src_prepare() {
- echo
- elog 'Several patches have been dropped from this djbdns ebuild revision.'
- elog 'Please use the DJBDNS_PATCH_DIR variable to specify a directory'
- elog 'of custom patches.'
- elog
- elog 'Some of them can be found at http://tinydns.org/ or'
- elog 'http://homepage.ntlworld.com/jonathan.deboynepollard/Softwares/djbdns/'
- elog
-
- epatch \
- "${FILESDIR}/headtail.patch" \
- "${FILESDIR}/dnsroots.patch" \
- "${FILESDIR}/dnstracesort.patch" \
- "${FILESDIR}/string_length_255.patch"
-
- # Fix CVE2009-0858
- epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
-
- if use ipv6; then
- elog "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 "${DISTDIR}/${P}-${IPV6_PATCH}.diff.bz2"
-
- # Fix CVE2008-4392
- epatch \
- "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6.patch" \
- "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \
- "${FILESDIR}/makefile-parallel.patch"
-
- cd "${S}-noipv6"
- fi
-
- # Fix CVE2008-4392
- epatch \
- "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \
- "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
-
- epatch "${FILESDIR}/${PV}-errno.patch"
-
- if [[ -n "${DJBDNS_PATCH_DIR}" && -d "${DJBDNS_PATCH_DIR}" ]]
- then
- echo
- ewarn "You enabled custom patches from ${DJBDNS_PATCH_DIR}."
- ewarn "Be warned that you won't get any support when using "
- ewarn "this feature. You're on your own from now!"
- echo
- ebeep
- cd "${S}" && epatch "${DJBDNS_PATCH_DIR}/"*
- fi
-}
-
-src_compile() {
- use static && append-ldflags -static
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
- echo "/usr" > conf-home
- #emake -j1 || die "emake failed"
- 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
- elog "Compiling dnstrace without ipv6 support"
- cd "${S}-noipv6"
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
- echo "/usr" > conf-home
- #emake -j1 dnstrace || die "emake failed"
- emake dnstrace || die "emake failed"
- fi
-}
-
-src_install() {
- insinto /etc
- doins dnsroots.global || die
-
- 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 || die
-
- if use ipv6; then
- dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace" || die
- fi
-
- dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION || die
-
- dobin "${FILESDIR}/dnscache-setup" || die
- dobin "${FILESDIR}/tinydns-setup" || die
- dobin "${FILESDIR}/djbdns-setup" || die
-}
-
-pkg_preinst() {
- # The nofiles group is provided by baselayout
- enewuser dnscache -1 -1 -1 nofiles
- enewuser dnslog -1 -1 -1 nofiles
- enewuser tinydns -1 -1 -1 nofiles
-}
-
-pkg_postinst() {
- elog "Use dnscache-setup & tinydns-setup or djbdns-setup to configure djbdns."
-}
diff --git a/net-dns/djbdns/djbdns-1.05-r25.ebuild b/net-dns/djbdns/djbdns-1.05-r25.ebuild
deleted file mode 100644
index cb32c9617471..000000000000
--- a/net-dns/djbdns/djbdns-1.05-r25.ebuild
+++ /dev/null
@@ -1,136 +0,0 @@
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-dns/djbdns/djbdns-1.05-r25.ebuild,v 1.4 2013/01/05 23:03:04 pinkbyte Exp $
-
-EAPI="2"
-inherit eutils flag-o-matic toolchain-funcs user
-
-DESCRIPTION="Excellent high-performance DNS services"
-HOMEPAGE="http://cr.yp.to/djbdns.html"
-IPV6_PATCH="test23"
-
-SRC_URI="http://cr.yp.to/djbdns/${P}.tar.gz
- ipv6? ( http://www.fefe.de/dns/${P}-${IPV6_PATCH}.diff.bz2 )"
-
-SLOT="0"
-LICENSE="public-domain"
-KEYWORDS="~alpha ~amd64 ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86"
-IUSE="doc ipv6 selinux static"
-
-DEPEND=""
-RDEPEND="${DEPEND}
- virtual/daemontools
- sys-apps/ucspi-tcp
- doc? ( app-doc/djbdns-man )
- selinux? ( sec-policy/selinux-djbdns )
-"
-
-src_prepare() {
- echo
- elog 'Several patches have been dropped from this djbdns ebuild revision.'
- elog 'Please use the DJBDNS_PATCH_DIR variable to specify a directory'
- elog 'of custom patches.'
- elog
- elog 'Some of them can be found at http://tinydns.org/ or'
- elog 'http://homepage.ntlworld.com/jonathan.deboynepollard/Softwares/djbdns/'
- elog
-
- epatch \
- "${FILESDIR}/headtail.patch" \
- "${FILESDIR}/dnsroots.patch" \
- "${FILESDIR}/dnstracesort.patch" \
- "${FILESDIR}/string_length_255.patch"
-
- # Fix CVE2009-0858
- epatch "${FILESDIR}/CVE2009-0858_0001-check-response-domain-name-length.patch"
-
- if use ipv6; then
- elog "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 "${DISTDIR}/${P}-${IPV6_PATCH}.diff.bz2"
-
- # Fix CVE2008-4392
- epatch \
- "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries-ipv6.patch" \
- "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records-ipv6.patch" \
- "${FILESDIR}/makefile-parallel.patch"
-
- cd "${S}-noipv6"
- fi
-
- # Fix CVE2008-4392
- epatch \
- "${FILESDIR}/CVE2008-4392_0001-dnscache-merge-similar-outgoing-queries.patch" \
- "${FILESDIR}/CVE2008-4392_0002-dnscache-cache-soa-records.patch"
-
- epatch "${FILESDIR}/${PV}-errno.patch"
-
- if [[ -n "${DJBDNS_PATCH_DIR}" && -d "${DJBDNS_PATCH_DIR}" ]]
- then
- echo
- ewarn "You enabled custom patches from ${DJBDNS_PATCH_DIR}."
- ewarn "Be warned that you won't get any support when using "
- ewarn "this feature. You're on your own from now!"
- echo
- ebeep
- cd "${S}" && epatch "${DJBDNS_PATCH_DIR}/"*
- fi
-}
-
-src_compile() {
- use static && append-ldflags -static
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
- echo "/usr" > conf-home
- #emake -j1 || die "emake failed"
- 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
- elog "Compiling dnstrace without ipv6 support"
- cd "${S}-noipv6"
- echo "$(tc-getCC) ${CFLAGS}" > conf-cc
- echo "$(tc-getCC) ${LDFLAGS}" > conf-ld
- echo "/usr" > conf-home
- #emake -j1 dnstrace || die "emake failed"
- emake dnstrace || die "emake failed"
- fi
-}
-
-src_install() {
- insinto /etc
- doins dnsroots.global || die
-
- 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 || die
-
- if use ipv6; then
- dobin dnsip6 dnsip6q "${S}-noipv6/dnstrace" || die
- fi
-
- dodoc CHANGES FILES README SYSDEPS TARGETS TODO VERSION || die
-
- dobin "${FILESDIR}/dnscache-setup" || die
- dobin "${FILESDIR}/tinydns-setup" || die
- dobin "${FILESDIR}/djbdns-setup" || die
-}
-
-pkg_preinst() {
- # The nofiles group is no longer provided by baselayout.
- # Share it with qmail if possible.
- enewgroup nofiles 200
-
- enewuser dnscache -1 -1 -1 nofiles
- enewuser dnslog -1 -1 -1 nofiles
- enewuser tinydns -1 -1 -1 nofiles
-}
-
-pkg_postinst() {
- elog "Use dnscache-setup & tinydns-setup or djbdns-setup to configure djbdns."
-}
diff --git a/net-dns/djbdns/files/djbdns-setup-r17 b/net-dns/djbdns/files/djbdns-setup-r17
deleted file mode 100644
index ce821975029d..000000000000
--- a/net-dns/djbdns/files/djbdns-setup-r17
+++ /dev/null
@@ -1,421 +0,0 @@
-#!/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: