Permalink
Browse files

Added net-dns/nsd-3.2.12 (has a security bugfix)

  • Loading branch information...
1 parent 56f49f0 commit 9c97490d0a5ea8bb9c1b56d9e88521adeacc883b @xHire committed Jul 21, 2012
View
@@ -0,0 +1,9 @@
+# ChangeLog for net-dns/nsd
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: $
+
+*nsd-3.2.12 (21 Jul 2012)
+
+ 21 Jul 2012; xHire <xhire@mujmalysvet.cz> +nsd-3.2.12.ebuild:
+ version bump
+
View
@@ -0,0 +1,7 @@
+AUX nsd.confd 104 RMD160 cd15a20757fd4db72a2da5327d68f4d6561bb271 SHA1 5fab374d008609d8aba9adb2a6eb0574f4ea4596 SHA256 de3c05a7b898b86f544ebc5804540dbf9736695cb21d614964561294533f2050
+AUX nsd.cron 262 RMD160 3fd5de5c7a3496d14705a5bb83d4632ce097b276 SHA1 6fc62e72e16fffd1d6e996cf616c9beb534a207d SHA256 c7b1d0141be64800fe88054b589afa0dc25d21ab42f40ee46e5b1ec659bfc8da
+AUX nsd.initd 1837 RMD160 5eb74375e3fa3ceda3dc98a021fcf104dbdb96d8 SHA1 22cbb5f30696e97d01b48014986830d6abd415b8 SHA256 d94d993e4a6ef5fdb7ba08123d04dd23e7d1b4f92d367915cc346b5011a9bd76
+DIST nsd-3.2.12.tar.gz 889490 RMD160 e73cb29c51d7bec6fd83b3a8571a72773ea5696e SHA1 dd8606a05525f6a493dfacb7ddfa7e1fa3c6a85b SHA256 73d78e3de88efdf5ebb0106fe3580cb887f5d2adc9ab147d15cf835de7de508e
+EBUILD nsd-3.2.12.ebuild 2085 RMD160 7f6b2100befab5bb709e85e5a4835bf494905e2a SHA1 b33fca668edc0f3e6d4b9433e8011c7a729beaec SHA256 80dc5c7f216fe76b14e2cf60de816f589a9ac0333e5ff790c51d9d1069802cbf
+MISC ChangeLog 219 RMD160 91d657f5d08da71945df0b3f092f99a5bfbd0f19 SHA1 50d89b7aa28568fb2d308ba6ed774952d5f8c1ec SHA256 0f9cad9dd676e21240b654b065256d9d204b1691c7f32d593b2400116c9e2887
+MISC metadata.xml 472 RMD160 a598246ecb755ea526707cd20a3950929edb602b SHA1 5a4e9c06700d13b9fd7d92e2c65b3bcab66eee5b SHA256 84691567761773c3ccf9e9cc7a26edec1ceccf9a0a4596863779404380b0b0e9
@@ -0,0 +1,2 @@
+# Location of the nsd configuration file. Leave empty for the default.
+#config_file="/etc/nsd/nsd.conf"
View
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+my_nsdc="/usr/sbin/nsdc"
+
+if test -x ${my_nsdc} && ${my_nsdc} running 1> /dev/null; then
+ ${my_nsdc} patch 1> /dev/null
+fi
@@ -0,0 +1,85 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+#
+extra_commands="rebuild"
+extra_started_commands="reload"
+description="NSD is an authoritative only, high performance, open source name server"
+description_rebuild="Rebuild zone database"
+description_reload="Rebuild zone database and reload it"
+
+config_file=${config_file:-/etc/nsd/nsd.conf}
+my_nsdc="/usr/sbin/nsdc"
+my_nsd_checkconf="/usr/sbin/nsd-checkconf"
+
+depend() {
+ need net
+ use logger
+ provide auth-dns
+}
+
+_checkconf() {
+ if ! test -e "${config_file}"; then
+ eerror "You need to create an appropriate config file."
+ eerror "An example can be found in /etc/nsd/nsd.conf.sample"
+ return 1
+ fi
+
+ if ! ${my_nsd_checkconf} "${config_file}"; then
+ eerror "You have errors in your configfile (${config_file})"
+ return 1
+ fi
+ return 0
+}
+
+_checkdb() {
+ local database=$(${my_nsd_checkconf} -o database ${config_file})
+ if ! test -f $database; then
+ eerror "You have no database file in ${database}, will try to rebuild"
+ _rebuild
+ fi
+ return 0
+}
+
+_patch() {
+ local difffile=$(${my_nsd_checkconf} -o difffile ${config_file})
+ if test -s ${difffile}; then
+ ebegin "Patching NSD zone files"
+ ${my_nsdc} patch > /dev/null
+ eend $?
+ fi
+}
+
+rebuild() {
+ ebegin "Rebuilding NSD zone database"
+ if ! ${my_nsdc} rebuild > /dev/null; then
+ eerror "There was an error rebuilding the database. Please review your zone files."
+ return 1
+ fi
+ eend $?
+}
+
+start() {
+ ebegin "Starting NSD"
+ _checkconf || return 1
+ _checkdb || rebuild || return 1
+ ${my_nsdc} start
+ ${my_nsdc} running
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping NSD"
+ _patch
+ ${my_nsdc} stop
+ eend $?
+}
+
+reload() {
+ _checkconf || return 1
+ rebuild || return 1
+ ebegin "Reloading NSD zone database"
+ ${my_nsdc} reload
+ eend $?
+}
View
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer><email>maintainer-wanted@gentoo.org</email></maintainer>
+ <use>
+ <flag name='bind8-stats'>Enables BIND8 like NSTATS and
+ XSTATS</flag>
+ <flag name='nsec3'>Enable NSEC3 support</flag>
+ <flag name='root-server'>Configure NSD as a root server</flag>
+ <flag name='runtime-checks'>Enable runtime checks</flag>
+ </use>
+</pkgmetadata>
@@ -0,0 +1,79 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=4
+
+inherit eutils versionator
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bind8-stats ipv6 nsec3 root-server runtime-checks"
+
+DEPEND="dev-libs/openssl"
+RDEPEND=${DEPEND}
+
+pkg_setup() {
+ if use runtime-checks; then
+ ewarn "You enabled runtime-checks USE flag, this could lead to a reduced service level"
+ fi
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+}
+
+src_configure() {
+ # ebuild.sh sets localstatedir to /var/lib, but nsd expects /var in several locations
+ # some of these cannot be changed by arguments to econf/configure, f.i. logfile
+ econf \
+ --localstatedir="${EPREFIX}/var" \
+ --with-pidfile="${EPREFIX}/var/run/nsd/nsd.pid" \
+ --with-zonesdir="${EPREFIX}/var/lib/nsd" \
+ --enable-largefile \
+ $(use_enable bind8-stats) \
+ $(use_enable ipv6) \
+ $(use_enable nsec3) \
+ $(use_enable root-server) \
+ $(use_enable runtime-checks checking)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ insinto /usr/share/nsd
+ doins contrib/nsd.zones2nsd.conf
+
+ exeinto /etc/cron.daily
+ doexe "${FILESDIR}/nsd.cron"
+
+ newinitd "${FILESDIR}"/nsd.initd nsd
+ newconfd "${FILESDIR}"/nsd.confd nsd
+
+ # database directory, writable by nsd for ixfr.db file
+ dodir /var/db/nsd
+ fowners nsd:nsd /var/db/nsd
+ fperms 750 /var/db/nsd
+
+ # zones directory, writable by root for 'nsdc patch'
+ dodir /var/lib/nsd
+ fowners root:nsd /var/lib/nsd
+ fperms 750 /var/lib/nsd
+
+ # pid dir, writable by nsd
+ dodir /var/run/nsd
+ fowners nsd:nsd /var/run/nsd
+}
+
+pkg_postinst() {
+ version_compare "3.2.9" "${REPLACING_VERSIONS}"
+ if test $? -eq 3; then
+ ewarn "In ${PN}-3.2.9, the database format was changed."
+ ewarn "Please run '/etc/init.d/nsd rebuild' to rebuild the database, then restart nsd."
+ fi
+}

0 comments on commit 9c97490

Please sign in to comment.