summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--net-dns/nsd/ChangeLog7
-rw-r--r--net-dns/nsd/Manifest6
-rw-r--r--net-dns/nsd/files/nsd.initd80
-rw-r--r--net-dns/nsd/nsd-3.1.0.ebuild78
4 files changed, 126 insertions, 45 deletions
diff --git a/net-dns/nsd/ChangeLog b/net-dns/nsd/ChangeLog
index eabe19551..981a45885 100644
--- a/net-dns/nsd/ChangeLog
+++ b/net-dns/nsd/ChangeLog
@@ -1,7 +1,12 @@
# ChangeLog for net-dns/nsd
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 16 Jul 2008; Tom Hendrikx (whyscream) <tom@whyscream.net>
+ +nsd-3.1.0.ebuild, files/nsd.initd:
+ Version bump with several ebuild changes, incorporating various changes from
+ bug 128246, with thanks to dev tommy for reviewing
+
10 Mar 2007; Markus Ullmann <jokey@gentoo.org> -nsd-2.3.5.ebuild:
Drop old
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
index c28305df4..95d0b39f7 100644
--- a/net-dns/nsd/Manifest
+++ b/net-dns/nsd/Manifest
@@ -1,6 +1,8 @@
AUX nsd.cron 114 RMD160 ff9a08bd8bbe2ec6918e89ae29fa9fb0f9ecc101 SHA1 57834a23d34e1c4bd8e1ba803bf9d19307f46333 SHA256 f389cbfb92ced8968d3e09eb7f1732f09d7077e671ec734b3e918a8007c87d8f
-AUX nsd.initd 997 RMD160 caa73bff535c4853aed3a9d5903a52fc63c39054 SHA1 8b04f26f1db1a16fe6c2d4fd3ef331545109ece3 SHA256 472b74c14caf79659afa60bbcaf2dc0745da2a525e3c5fefb8db2eab0374acfc
+AUX nsd.initd 1140 RMD160 7a9bbe90ebc8984dac71d4f539f1412412fefa1f SHA1 aef7a5de8686a2c0b633e575328c7a80691df21c SHA256 273c4ae5f54f73fe9f8ef2755d09437c4e2306ab8ca5520528164fe502533bf8
DIST nsd-3.0.4.tar.gz 788646 RMD160 169c1d41bba07e7a1d05f0b3ff5ad15fb15379b4 SHA1 e34333450a32d4683216c136218699e7f8c8367d SHA256 cee7417496dcfa88ac7920e85cd1cb92ddff8287e9cec6ba4f98dedaa508100b
+DIST nsd-3.1.0.tar.gz 828565 RMD160 7a07fe759450e01fcd869aa638c6fd16198f9ca8 SHA1 4cf8dea9fcdd2e0f7a5ab8b8a7399e3ebd533cf4 SHA256 d62ae5147489d7b98afe93eea2f771932744947e31b427ccc8722588c93a7bf1
EBUILD nsd-3.0.4.ebuild 1655 RMD160 6b9c879852c8b2bd80c16747f97eabb2b81e99e6 SHA1 c979673aa1d782e8d8beaafe6845e79981d8642d SHA256 545772a69d245dd61f6b8aa41fcf2e8d63939f30056f34d9e37f3bdc9e847da1
-MISC ChangeLog 605 RMD160 c9c86105c322d9654b805a47c6b829c3caf808a8 SHA1 0c52ca13419d0861722f6fef7d746936b7eb183f SHA256 abba94046577e980963e5b8843b59f1a6b22abf8e6eaee9d9c3f19d0417f5d72
+EBUILD nsd-3.1.0.ebuild 2079 RMD160 07f7f0b8a2791fcfa0cd697066c5080a5dce0896 SHA1 2afd5e6bb54a9104ff47e9a20bf4646645ed65b8 SHA256 32b1d59aa8e98de369724b59583b037f18a33b100af38d74b683bda6fcf4ca5b
+MISC ChangeLog 836 RMD160 84fa36db183cb3cc1b061997b579c3524fcd5fad SHA1 676241d65ac962dec025b711a3c8627f87af7e79 SHA256 47b64f02e01a2f56a3914fc45ef81a27a08c473b0de5a948c080c611aedbd0fe
MISC metadata.xml 170 RMD160 645927a396fdc21cdeb089fe42c5397332420ea6 SHA1 ac7f48a14fec325926f9ce1be8fbf1f311b4f2e4 SHA256 d797a2ec6f9dc516c9f9c1a758ee87ad3e8c43101b5dc76c2f872d5bd4639b42
diff --git a/net-dns/nsd/files/nsd.initd b/net-dns/nsd/files/nsd.initd
index 0f8bc0485..bf39e744b 100644
--- a/net-dns/nsd/files/nsd.initd
+++ b/net-dns/nsd/files/nsd.initd
@@ -1,59 +1,55 @@
#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
#
-opts="${opts} rebuild reload status update notify"
+opts="${opts} reload configtest"
+description="NSD is an authoritative only, high performance, open source name server"
+description_start="Start the server"
+description_stop="Stop the server"
+description_configtest="Check the syntax of the configuration file"
+description_reload="Reload the database file"
+
+CONTROL="/usr/sbin/nsdc"
depend() {
- need net
- use logger
+ need net
+ use logger
}
-checkconfig() {
- if [ ! -e "/etc/nsd/nsdc.conf" -a ! -e "/etc/nsd/nsd.zones" ]; then
- eerror "You need to create apropriate configs"
- eerror "in /etc/nsd/ . Examples can be found in /etc/nsd/*.sample"
- return 1
- fi
+configtest() {
+ ebegin "Checking config"
+ if [ ! -e "/etc/nsd/nsd.conf" ]; then
+ eerror "You need to create an appropriate config file"
+ eerror "in /etc/nsd/ . An example can be found in /etc/nsd/nsd.conf.sample"
+ return 1
+ fi
+
+ if ! nsd-checkconf "/etc/nsd/nsd.conf"; then
+ eerror "You have errors in your configfile"
+ return 1
+ fi
+ eend
}
start() {
- ebegin "Starting nsd"
- checkconfig && \
- /usr/sbin/nsdc start &>/dev/null
- eend $?
-}
-
-stop() {
- ebegin "Stopping nsd"
- /usr/sbin/nsdc stop &>/dev/null
- eend $?
-}
-
-reload() {
- ebegin "Reloading nsd"
- /usr/sbin/nsdc reload &>/dev/null
- eend $?
-}
-
-rebuild() {
- ebegin "Rebuild nsd database"
- /usr/sbin/nsdc rebuild &>/dev/null
- eend $?
-}
+ configtest || return 1
-status() {
- ebegin "Check if nsd is running"
- /usr/sbin/nsdc running &>/dev/null
+ ebegin "Starting NSD"
+ ${CONTROL} start
+ ${CONTROL} running
eend $?
-}
+}
-update() {
- ebegin "Updating nsd zones"
- /usr/sbin/nsdc update &>/dev/null
+stop() {
+ ebegin "Stopping NSD"
+ ${CONTROL} stop
eend $?
}
-notify() {
- ebegin "Notify slave servers for zones"
- /usr/sbin/nsdc notify &>/dev/null
+reload() {
+ configtest || return 1
+ ebegin "Reloading NSD"
+ ${CONTROL} reload
eend $?
}
diff --git a/net-dns/nsd/nsd-3.1.0.ebuild b/net-dns/nsd/nsd-3.1.0.ebuild
new file mode 100644
index 000000000..ee48c2de7
--- /dev/null
+++ b/net-dns/nsd/nsd-3.1.0.ebuild
@@ -0,0 +1,78 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+inherit eutils
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+SRC_URI="http://www.nlnetlabs.nl/downloads/nsd/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bind8-stats dnssec ipv6 largefile nsec3 nsid root-server runtime-checks tsig"
+
+DEPEND="tsig? ( >=dev-libs/openssl-0.9.8f )"
+
+pkg_setup() {
+ if use runtime-checks; then
+ ewarn "You enabled runtime-checks USE flag, this could lead to a reduced service level"
+ fi
+ if use nsid; then
+ ewarn "You enabled nsid USE flag, this is still experimental"
+ fi
+
+ enewuser nsd -1 -1 /var/lib/nsd
+}
+
+src_compile() {
+ econf \
+ --with-dbfile=/var/db/nsd/nsd.db \
+ --with-difffile=/var/db/nsd/ixfr.db \
+ --with-pidfile=/var/run/nsd.pid \
+ --with-xfrdfile=/var/db/nsd/xfrd.state \
+ --with-zonesdir=/var/lib/nsd \
+ $(use_enable bind8-stats) \
+ $(use_enable dnssec) \
+ $(use_enable largefile) \
+ $(use_enable ipv6) \
+ $(use_enable nsec3) \
+ $(use_enable nsid) \
+ $(use_enable root-server) \
+ $(use_enable runtime-checks checking) \
+ $(use_enable tsig) || die "econf failed"
+
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+
+ dodoc doc/*
+ dodoc contrib/nsd.zones2nsd.conf
+ dodoc "${FILESDIR}"/nsd.cron
+
+ dobin nsdc.sh
+
+ newinitd "${FILESDIR}"/nsd.initd nsd
+
+ keepdir /var/db/nsd
+ fowners nsd /var/db/nsd
+ fperms 750 /var/db/nsd
+
+ keepdir /var/lib/nsd
+ fowners nsd /var/lib/nsd
+ fperms 750 /var/lib/nsd
+}
+
+pkg_postinst() {
+ elog "If you are using bind and want to convert (or sync) bind zones"
+ elog "you should check out bind2nsd (http://bind2nsd.sourceforge.net)."
+ echo
+ elog "If you are upgrading from NSD 2, take a look at the provided"
+ elog "nsd.zones2nsd.conf script in the doc directory."
+ echo
+ elog "To automatically merge zone transfer changes back to NSD's"
+ elog "zone files using 'nsdc patch', try the nsd.cron in the doc directory"
+}