summaryrefslogtreecommitdiff
path: root/net-dns/nsd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /net-dns/nsd
reinit the tree, so we can have metadata
Diffstat (limited to 'net-dns/nsd')
-rw-r--r--net-dns/nsd/Manifest11
-rwxr-xr-xnet-dns/nsd/files/nsd.initd-r159
-rw-r--r--net-dns/nsd/files/nsd.munin-conf2
-rw-r--r--net-dns/nsd/files/nsd.service14
-rw-r--r--net-dns/nsd/files/nsd_munin_.patch17
-rw-r--r--net-dns/nsd/metadata.xml25
-rw-r--r--net-dns/nsd/nsd-4.1.16.ebuild101
-rw-r--r--net-dns/nsd/nsd-4.1.17.ebuild101
8 files changed, 330 insertions, 0 deletions
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
new file mode 100644
index 000000000000..c50d67fd7581
--- /dev/null
+++ b/net-dns/nsd/Manifest
@@ -0,0 +1,11 @@
+AUX nsd.initd-r1 1386 SHA256 b98d350d3f417aa5e7f3382d0ab49a5c86c8fd9f2ef45c4de59f0b47b8d5ddc5 SHA512 a8dc5b4dd6b8d763f96e46bb9bc8a43ce7518455c6efaee7061b47b477b380f47d831b993966fc4fe253657f2a3d16077dfda5c900d5788d5b991f5f9d92e618 WHIRLPOOL 0c5721351a856ef15487693671873852f1d7b1e6bf519db252fc1a5ad320299b6fe3126ee9c5d0db109affefc9f825247ac9dba8fc877c4b3f18acecadd53817
+AUX nsd.munin-conf 23 SHA256 313e0bd8841d10962eeb1fc9fec480dce7ea93dae8a673c74e45efc12d3087da SHA512 c06d0b035387e7be79cfa8fedf8afb3900772146c6d4090ac39ea2ef165772d875b222ef467bd73422078ef57818bcc931ca67fa290bd99a7a9456efa5448853 WHIRLPOOL 74509d12b52570d9fe8dcf87820162e3bab5c77650daf352d3769d334f6ba98e63c6bd615d6008959164f219e0873be6012ef167609f8aae7a5b645e9fc52a9d
+AUX nsd.service 272 SHA256 1e3455791495082b122a67f25ff123728e5b87723c37935cd17f26333152b154 SHA512 fbca86887bfc36d61af06992cc98b3f3cb33c39274fbdc1e53d489bdcc767993911fab27a20244c3878b36bacbd1644a552364b2f7bf4d48e6eb247d0eecdf0f WHIRLPOOL 7d652e0db5fca5e277ccbbfed70bdcc1c291e6dcb4419a8cbe7b4db5502f3dd7e8f91ff0270c5c79bdb045b82cb010ee1b105029da7a24dd4b0070df647d24ac
+AUX nsd_munin_.patch 542 SHA256 d5926243c3c4a4ce931a0a56d9b94c5203c762923df71fe2a6b0c5b78063c6a5 SHA512 6034086d6b6f6980468766c901e92291fea8a32df179561ede2add5918c37bfe3aabf122735d4ae2e28efece394fd3398f9a0cc4d8fdcc1e5da1ca709d2ba6ae WHIRLPOOL 0d9e62a8824314c583e0c49980c3ee945531b848b9ca1e348976d041ec5fd4889a7098331975fea3d5dbc7337d1f79fa3c4f83c812622c7dea15fa3df34361a2
+DIST nsd-4.1.16.tar.gz 1088633 SHA256 7f8367ad23cc5cddffa885e7e2f549123c8b4123db9726df41d99f255d6baab2 SHA512 51135bbf412cdc5d6d9be02af9fef16513f0529155c102debfd6bd68b025d289c684777a8fca57de86b25f68bc94aef89d2cfefb871b8d63048d262f6c8eb8e3 WHIRLPOOL 030da2551abef8cb29e16574155605eb9377836f1a43422e200ba5bc6ede319893d4293018cf0be242d1ac0cfad4c3b40f566c7ad587792186c64102d8c9785f
+DIST nsd-4.1.17.tar.gz 1089526 SHA256 107fa506d18ed6fd0a922d1b96774afd9270ec38ec6b17cd7c46fb9433a03a6c SHA512 4cffa261b1832d0daac095e92542359ffd725918f07ec605c78a9346b1cf4a4bc21bdc59ab388eb7324a170bbd8b122cfa75e7448015b38572b47d18add24a8f WHIRLPOOL c8892dca5f5c625d435cfde3f556ccc7518f3e37b7242892f9c101f4ffa5da1a2ea09083a30942bb1dad91ab70b40b2647339b2a4988f08478db9b6dd2b1c3df
+EBUILD nsd-4.1.16.ebuild 2785 SHA256 fdc37080a35ea568446feb2ddcb3fc67841cbbf82077f8157a8a53d85a5495dc SHA512 92ddc87fb87c7534969bb5fa10b6365dcf586d461440c82e8c2d48668a02e1cc314641e4f5230474572c1f176498bcf75a115983d80a33c91061ce0aa2dafe2a WHIRLPOOL b3665312bfae054a093d6597cda9019d8a7a46b9de41fda9632e361b601d39160f0b068219c570873e9408c01f7e65c17d84ecbf5693351f6cba245d6c7b95e8
+EBUILD nsd-4.1.17.ebuild 2787 SHA256 93b9a75c71c13ff1a2c3cef2a67e16515d210e90abda79a4b980c3f08f438cb0 SHA512 2d7fc76f8228583eba7944f490e2f25f6ba8defdff0cc71f7c447b1f1cce1584fddd768371a9fa7f6b0a80eee12e4d9d125f7e03c4417893dfa0acaa3d3c0e26 WHIRLPOOL 106912accb55b68055268d8570471483539bdf9f3a2a118f00876b0c72a6e14559a40610b73cd684a437a1ead46eceb5fe428e915ce70a161640891196cb6c44
+MISC ChangeLog 7402 SHA256 fc31cfd461d2b80126128324e072d7be404f904625b8bcdccbdc4d1da627df93 SHA512 f7c1c027e9dcfc5adf0c11026991e4c790a94d828d5793f5081c78ee0d9b1e2e0f675f4862c28c7bdf87264c82c454e2775926a016ef832493efb10f40e341de WHIRLPOOL 1a5818cd1f496b03b07e073449e62ee907d36e02dea8001e77054a8f2d3afd70b85379b3bdf65d7b7fc42ab23acd682037bdefc889d773b4450f01d1ce3aa156
+MISC ChangeLog-2015 2627 SHA256 441f35743cb95ae536a14f14a68a6dcd0c56cec92a9a17309a433414ed240500 SHA512 89c885fd99bbca04288f6c3e8ac3ff31bc90dd48fb68a0776fe02bbd9dfc8b2342414559e45c9bc88e04a5fb55448c074b99756a8711339870ad3944238d4b41 WHIRLPOOL 562ac8805295b1590b34dc86008aec0249b8fbb4bb48baa69fd2fec5fad0ee6e032641baa11c05d4f4612aa6af71b274cfd490315df3b279845d1f3300ac806b
+MISC metadata.xml 1013 SHA256 0b2cee01846e86109c0064b51d72d905f51b58eeeb6b46018d1d63b11e322705 SHA512 e7c0d6a267fd06546ac58278ffb75280aa0c0ed55ddf0097614906c1863e55cf572ff7660e021ac8861c506ed0de126c0c5e68dd2d88aea1a395be3234607ce5 WHIRLPOOL 62f0478902b36690036cb3345155c12336f7f71d23166faf41ead87ea25b7b0b365306791b9ee55b223dcfe3197cb3f5b8a5b9a51592ddf709be56717230d99b
diff --git a/net-dns/nsd/files/nsd.initd-r1 b/net-dns/nsd/files/nsd.initd-r1
new file mode 100755
index 000000000000..a032cb226fd7
--- /dev/null
+++ b/net-dns/nsd/files/nsd.initd-r1
@@ -0,0 +1,59 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+description="NSD is an authoritative-only, high performance, open source name server"
+extra_commands="configtest"
+extra_started_commands="reload"
+
+# these can be overridden in /etc/conf.d/nsd if necessary
+NSD_CONFIG="${NSD_CONFIG:-/etc/nsd/nsd.conf}"
+NSD_CHECKCONF="${NSD_CHECKCONF:-/usr/sbin/nsd-checkconf}"
+command="${NSD_BINARY:-/usr/sbin/nsd}"
+command_args="-c ${NSD_CONFIG}"
+
+depend() {
+ need net
+ use logger
+}
+
+get_pidfile() {
+ printf '%s' "$("${NSD_CHECKCONF}" -o pidfile "${NSD_CONFIG}")"
+}
+
+checkconfig() {
+ if ! test -e "${NSD_CONFIG}"; then
+ eerror "You need to create an appropriate config file."
+ eerror "An example can be found in /etc/nsd/nsd.conf.sample"
+ return 1
+ elif ! "${NSD_CHECKCONF}" "${NSD_CONFIG}"; then
+ eerror "You have errors in your configfile (${NSD_CONFIG})"
+ return $?
+ fi
+ return 0
+}
+
+configtest() {
+ ebegin "Checking ${SVCNAME} configuration"
+ checkconfig
+ eend $?
+}
+
+start_pre() {
+ checkconfig || return $?
+ pidfile="$(get_pidfile)"
+ checkpath --directory --owner nsd:nsd "${pidfile%/*}" || return 1
+}
+
+stop_pre() {
+ checkconfig || return $?
+ pidfile="$(get_pidfile)"
+}
+
+reload() {
+ checkconfig || return $?
+ pidfile="$(get_pidfile)"
+ ebegin "Reloading config and zone files"
+ kill -s HUP $(cat ${pidfile})
+ eend $?
+}
diff --git a/net-dns/nsd/files/nsd.munin-conf b/net-dns/nsd/files/nsd.munin-conf
new file mode 100644
index 000000000000..2fbec370f336
--- /dev/null
+++ b/net-dns/nsd/files/nsd.munin-conf
@@ -0,0 +1,2 @@
+[nsd_munin*]
+user root
diff --git a/net-dns/nsd/files/nsd.service b/net-dns/nsd/files/nsd.service
new file mode 100644
index 000000000000..8337557faeef
--- /dev/null
+++ b/net-dns/nsd/files/nsd.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=NSD authoritative DNS server
+Wants=network.target
+After=network.target
+
+[Service]
+Type=forking
+ExecStartPre=/usr/bin/install -d -o nsd -g nsd /run/nsd
+ExecStart=/usr/sbin/nsd
+KillMode=mixed
+PIDFile=/run/nsd/nsd.pid
+
+[Install]
+WantedBy=multi-user.target
diff --git a/net-dns/nsd/files/nsd_munin_.patch b/net-dns/nsd/files/nsd_munin_.patch
new file mode 100644
index 000000000000..36162f9a8fb2
--- /dev/null
+++ b/net-dns/nsd/files/nsd_munin_.patch
@@ -0,0 +1,17 @@
+--- a/contrib/nsd_munin_
++++ b/contrib/nsd_munin_
+@@ -87,10 +87,10 @@
+
+ =cut
+
+-state=${statefile:-/usr/local/var/munin/plugin-state/nsd-state}
+-conf=${nsd_conf:-/usr/local/etc/nsd.conf}
+-ctrl=${nsd_control:-/usr/local/sbin/nsd-control}
+-chkconf=${nsd_checkconf:-/usr/local/sbin/nsd-checkconf}
++state=${statefile:-$MUNIN_PLUGSTATE/nsd-state}
++conf=${nsd_conf:-/etc/nsd/nsd.conf}
++ctrl=${nsd_control:-/usr/sbin/nsd-control}
++chkconf=${nsd_checkconf:-/usr/sbin/nsd-checkconf}
+ lock=$state.lock
+
+ # number of seconds between polling attempts.
diff --git a/net-dns/nsd/metadata.xml b/net-dns/nsd/metadata.xml
new file mode 100644
index 000000000000..0d66874728b4
--- /dev/null
+++ b/net-dns/nsd/metadata.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>polynomial-c@gentoo.org</email>
+ <name>Lars Wendler</name>
+ </maintainer>
+ <use>
+ <flag name="bind8-stats">Enables BIND8 like NSTATS and XSTATS</flag>
+ <flag name="libevent">Use libevent or libev, useful when zone
+ count is high</flag>
+ <flag name="minimal-responses">If minimal responses are disabled,
+ responses are more likely to get truncated, resulting in TCP
+ fallback</flag>
+ <flag name="nsec3">Enable NSEC3 support</flag>
+ <flag name="ratelimit">Enables ratelimiting, based on query name,
+ type and source</flag>
+ <flag name="root-server">Configure NSD as a root server</flag>
+ <flag name="runtime-checks">Enable runtime checks, this could lead
+ to a reduced service level</flag>
+ <flag name="munin">
+ Install a plugin for <pkg>net-analyzer/munin</pkg> to graph
+ statistical data from nsd.</flag>
+ </use>
+</pkgmetadata>
diff --git a/net-dns/nsd/nsd-4.1.16.ebuild b/net-dns/nsd/nsd-4.1.16.ebuild
new file mode 100644
index 000000000000..1b7f7b998e3e
--- /dev/null
+++ b/net-dns/nsd/nsd-4.1.16.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+# version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1
+MY_PV=${PV/_rc/rc}
+MY_PV=${MY_PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="bind8-stats ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl libressl"
+
+RDEPEND="
+ virtual/yacc
+ libevent? ( dev-libs/libevent )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ munin? ( net-analyzer/munin )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+"
+
+src_prepare() {
+ # Fix the paths in the munin plugin to match our install
+ eapply "${FILESDIR}"/nsd_munin_.patch
+ eapply_user
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-pie
+ --enable-relro-now
+ --enable-largefile
+ --with-logfile="${EPREFIX}"/var/log/nsd.log
+ --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid
+ --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db
+ --with-xfrdir="${EPREFIX}"/var/db/nsd
+ --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state
+ --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list
+ --with-zonesdir="${EPREFIX}"/var/lib/nsd
+ $(use_enable bind8-stats)
+ $(use_enable bind8-stats zone-stats)
+ $(use_enable ipv6)
+ $(use_enable minimal-responses)
+ $(use_enable mmap)
+ $(use_enable nsec3)
+ $(use_enable ratelimit)
+ $(use_enable root-server)
+ $(use_enable runtime-checks checking)
+ $(use_with libevent)
+ $(use_with ssl)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ newinitd "${FILESDIR}"/nsd.initd-r1 nsd
+
+ # install munin plugin and config
+ if use munin ; then
+ exeinto /usr/libexec/munin/plugins
+ doexe contrib/nsd_munin_
+ insinto /etc/munin/plugin-conf.d
+ newins "${FILESDIR}"/nsd.munin-conf nsd_munin
+ fi
+
+ systemd_dounit "${FILESDIR}"/nsd.service
+
+ # remove the /run directory that usually resides on tmpfs and is
+ # being taken care of by the nsd init script anyway (checkpath)
+ rm -r "${ED}"/run || die "Failed to remove /run"
+}
+
+pkg_postinst() {
+ # Do this in postinst to ensure the uid/gid is consistent for binpkgs
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+
+ # database directory, writable by nsd for database updates and zone transfers
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd
+
+ # zones directory, writable by nsd for zone file updates (nsd-control write)
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/lib/nsd
+}
diff --git a/net-dns/nsd/nsd-4.1.17.ebuild b/net-dns/nsd/nsd-4.1.17.ebuild
new file mode 100644
index 000000000000..23775fc75841
--- /dev/null
+++ b/net-dns/nsd/nsd-4.1.17.ebuild
@@ -0,0 +1,101 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit user systemd
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="http://www.nlnetlabs.nl/projects/nsd"
+# version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1
+MY_PV=${PV/_rc/rc}
+MY_PV=${MY_PV/_beta/b}
+MY_P=${PN}-${MY_PV}
+S="${WORKDIR}/${MY_P}"
+SRC_URI="http://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="bind8-stats ipv6 libevent minimal-responses mmap munin +nsec3 ratelimit root-server runtime-checks ssl libressl"
+
+RDEPEND="
+ virtual/yacc
+ libevent? ( dev-libs/libevent )
+ ssl? (
+ !libressl? ( dev-libs/openssl:0= )
+ libressl? ( dev-libs/libressl:= )
+ )
+ munin? ( net-analyzer/munin )
+"
+DEPEND="
+ ${RDEPEND}
+ sys-devel/flex
+"
+
+src_prepare() {
+ # Fix the paths in the munin plugin to match our install
+ eapply "${FILESDIR}"/nsd_munin_.patch
+ eapply_user
+}
+
+src_configure() {
+ local myeconfargs=(
+ --enable-pie
+ --enable-relro-now
+ --enable-largefile
+ --with-logfile="${EPREFIX}"/var/log/nsd.log
+ --with-pidfile="${EPREFIX}"/run/nsd/nsd.pid
+ --with-dbfile="${EPREFIX}"/var/db/nsd/nsd.db
+ --with-xfrdir="${EPREFIX}"/var/db/nsd
+ --with-xfrdfile="${EPREFIX}"/var/db/nsd/xfrd.state
+ --with-zonelistfile="${EPREFIX}"/var/db/nsd/zone.list
+ --with-zonesdir="${EPREFIX}"/var/lib/nsd
+ $(use_enable bind8-stats)
+ $(use_enable bind8-stats zone-stats)
+ $(use_enable ipv6)
+ $(use_enable minimal-responses)
+ $(use_enable mmap)
+ $(use_enable nsec3)
+ $(use_enable ratelimit)
+ $(use_enable root-server)
+ $(use_enable runtime-checks checking)
+ $(use_with libevent)
+ $(use_with ssl)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+
+ newinitd "${FILESDIR}"/nsd.initd-r1 nsd
+
+ # install munin plugin and config
+ if use munin ; then
+ exeinto /usr/libexec/munin/plugins
+ doexe contrib/nsd_munin_
+ insinto /etc/munin/plugin-conf.d
+ newins "${FILESDIR}"/nsd.munin-conf nsd_munin
+ fi
+
+ systemd_dounit "${FILESDIR}"/nsd.service
+
+ # remove the /run directory that usually resides on tmpfs and is
+ # being taken care of by the nsd init script anyway (checkpath)
+ rm -r "${ED}"/run || die "Failed to remove /run"
+}
+
+pkg_postinst() {
+ # Do this in postinst to ensure the uid/gid is consistent for binpkgs
+ enewgroup nsd
+ enewuser nsd -1 -1 -1 nsd
+
+ # database directory, writable by nsd for database updates and zone transfers
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/db/nsd
+
+ # zones directory, writable by nsd for zone file updates (nsd-control write)
+ install -d -m 750 -o nsd -g nsd "${EROOT%/}"/var/lib/nsd
+}