summaryrefslogtreecommitdiff
path: root/net-dns/nsd
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2025-01-21 06:42:16 +0000
committerV3n3RiX <venerix@koprulu.sector>2025-01-21 06:42:16 +0000
commit30c47f3c341cb37e4808aaa3842b679d0ca420e8 (patch)
tree30eb5383b9ae93fec49d9a5660b34201e6190933 /net-dns/nsd
parentcd57012a0ef40d302cf7d5a92dd2f3dfae285d2f (diff)
gentoo auto-resync : 21:01:2025 - 06:42:16
Diffstat (limited to 'net-dns/nsd')
-rw-r--r--net-dns/nsd/Manifest7
-rw-r--r--net-dns/nsd/files/nsd.confd-r116
-rw-r--r--net-dns/nsd/files/nsd.initd-r252
-rw-r--r--net-dns/nsd/files/nsd.tmpfilesd-r11
-rw-r--r--net-dns/nsd/nsd-4.11.1.ebuild160
-rw-r--r--net-dns/nsd/nsd-9999.ebuild3
6 files changed, 165 insertions, 74 deletions
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
index eab844c71ec4..a2ed79d92355 100644
--- a/net-dns/nsd/Manifest
+++ b/net-dns/nsd/Manifest
@@ -1,10 +1,9 @@
AUX nsd-4.10.1-simdzone-configure_ac-_mm_popcnt_u64.patch 415 BLAKE2B 5379fee77e8fdcbe2b2b15fd17d0d690e00009fd76f70465e26a13350b6a4316ae28fdc9bec47124bd1cfd14cc081418b2e6c5c351269d2421560e3d19fd223d SHA512 5d7333164e14ec1254a6d92687850fa3fdc0240d02bde5992a4bddc9a00d3b4be74cee7212f1ca8a70a2a65e93cdaa249c74ebf52e38d47aa1d4787100ef814a
AUX nsd-munin-gentoo-paths.patch 542 BLAKE2B 13ff49c41683d5bf505e257cd17bf5f3ad06662c00032d79b36be3f96486eb89fdd62a42b5ed4816ad99835366864603568613e27504894340ebb64057e2b2c3 SHA512 6034086d6b6f6980468766c901e92291fea8a32df179561ede2add5918c37bfe3aabf122735d4ae2e28efece394fd3398f9a0cc4d8fdcc1e5da1ca709d2ba6ae
-AUX nsd.confd-r1 669 BLAKE2B 45ef7846e227566ce2bc2248084598e31a40536f9dbd28ff5964fca34998399253dfd45e1706ddaed566ac4f745264f4f1314ba7394392e637da520ff78470df SHA512 6c9daae27750149e9ee13860b13a9ce7d92159416329098fa60b77982dbe1d0b3ee1c957321b3a459870155d2a4430f1f7796c53b677178f3a6a71a2efc81fdc
-AUX nsd.initd-r2 1312 BLAKE2B 798c8df841f3bf22edb0891f1e350a8636db94e9049ba202b988210ff69ba185b3e0a6ed11347752a452d49560930b5f5fd34d5857b150ffbc1c9691e1202feb SHA512 35320b938a29d34cda2919dfcfc975858d2211bbe8a92af270c2e0806d05a12e893bb13944b75bae27b3db4ab8a74e2408b4d70898f715f785ec00f36a629ea2
AUX nsd.munin-conf 23 BLAKE2B 0b08804b2218d77ea925d4c9e26e73649b453b923d6d7b1e1df39ceb58b92a44c48cb21583a480e622f72d07650f410f2e0703f1d16af08152aed16982ab8da2 SHA512 c06d0b035387e7be79cfa8fedf8afb3900772146c6d4090ac39ea2ef165772d875b222ef467bd73422078ef57818bcc931ca67fa290bd99a7a9456efa5448853
-AUX nsd.tmpfilesd-r1 24 BLAKE2B ae4078bff0e71d9b47d02855f7e7ab2389cc83b40af657221ffec07e52d52c666073d32182dc726dcc3df85a17f7a983a546d6cda98554ebcf7df14a64036eb8 SHA512 bfc1b81f8553f499f8048a26870b0964625cad4c73b84b70afc8c00644b95661e86ad540fd66f88ef072166ff22eef4f18974ba3364d1bd33e1ca7ee348f9188
DIST nsd-4.10.1.tar.gz 1404799 BLAKE2B 7b286ac681c1bb8201654cd2e5fac8a98256f6a595dfbb39bcfed92de63b3337e05d219bc766bab01e4aaf3fb1de3c128d7157caeee3a7f21e4132db9ea72cba SHA512 b0f4bdca8a1c6fbbe99096abc8c5f8b34ef2e66dc0da44da253ab164b35ad0aaef5d05eb682b88cc68d8b1671f7b80abafee242a784ed6deb785adee7f6a53a9
+DIST nsd-4.11.1.tar.gz 1527949 BLAKE2B 82a710a5e484818a6df19dd39d6b6b4cce4c1add0a055771946f040bbdd6dbee35d8bdb1d48f7d906aca85653e6809754749cc74654e182f5a5b07f19dcd9b42 SHA512 50b7d93485f3b9903e0d7ee5ec326f47c8a603d3c143899aa46e7865413f8b7f0ed2edcdae5ac054b3c709ab50acfbe8816e1be41dd008803ef83fa9bc370944
EBUILD nsd-4.10.1-r2.ebuild 4440 BLAKE2B 0744e200430fc393f406fa24dd222decdef968d55a9afeb76d89a6ed3a189d9fe8ea338d0f5b566d715fc76f730c619d904870d8968772e07702392692533923 SHA512 6c515c00ce035efc870d4060ce465b148a84e10b83bb28e702d66b3a569b5b7ffec96733bd1b590845d0c670fb5be99000404cb71965e84213f2ffed4493a9fa
-EBUILD nsd-9999.ebuild 4371 BLAKE2B f9824aa8fb6738371773cc09749ea1e25c0d53d8f3120b5f2d7cdd59a6f7fc6ae244d4302861505d4dd56c87c0585bf6e6fee0928ec7d6457e4075293de36024 SHA512 5dcfb4226afdd58fec3b0450c18155247235b854265421caba587d8b797000bd38bab4ed39b937f9d636a69aba1973488fba50d75e95524e2aa51b0f4de4b81b
+EBUILD nsd-4.11.1.ebuild 4441 BLAKE2B ff239ab055cc140eca08ed2cdf3b7589e5031001e485c7a761eab3fdc36a95cf7c03e1b98f2786a7db42438176c395e50788478641a51bb3d98f8f0898710259 SHA512 ff6e055b661bac721e637452b1b41c13e38bea572c78ab2faff9e1d8e4e8dba1618bd5e1fb9c853ecd3149d1f985e171f118d1b0fc23901b7096a6b4f48a2a29
+EBUILD nsd-9999.ebuild 4441 BLAKE2B ff239ab055cc140eca08ed2cdf3b7589e5031001e485c7a761eab3fdc36a95cf7c03e1b98f2786a7db42438176c395e50788478641a51bb3d98f8f0898710259 SHA512 ff6e055b661bac721e637452b1b41c13e38bea572c78ab2faff9e1d8e4e8dba1618bd5e1fb9c853ecd3149d1f985e171f118d1b0fc23901b7096a6b4f48a2a29
MISC metadata.xml 1984 BLAKE2B e3c44203228f5a114b15966f6d6b06930cecbd2ad10a08ca3166a708f5811117faadd8fae26c98b008dd5080be850db15f93f8ed6477b936206babe880174677 SHA512 9fa4885721b96772df96d25b50005aa0e5028dfe69eff22d32143641d1d4cddabf47ab706eb1c69f8a7d43ac9c09a9c7225de170ee7a537d6b72b4368a5228be
diff --git a/net-dns/nsd/files/nsd.confd-r1 b/net-dns/nsd/files/nsd.confd-r1
deleted file mode 100644
index 7c9a7effb844..000000000000
--- a/net-dns/nsd/files/nsd.confd-r1
+++ /dev/null
@@ -1,16 +0,0 @@
-# /etc/conf.d/nsd
-
-# NSD_ARGS is set by default to run in the foreground (-d) and to not
-# create its own PID file (-P ''), as we let OpenRC handle that instead.
-# It is recommended to keep these defaults and append additional flags
-# to them.
-NSD_ARGS="-d -P ''"
-
-# NSD_CONFBASE sets the base configuration directory for nsd's
-# configuration and, by default, uses the standard '/etc/nsd' path.
-NSD_CONFBASE="/etc/nsd"
-
-# NSD_CONFNAME sets the first part of the nsd config file name to be that
-# of the calling service script name. This allows you to create symlinks
-# that point at '/etc/init.d/nsd' for different instances of nsd.
-NSD_CONFNAME="${RC_SVCNAME}.conf"
diff --git a/net-dns/nsd/files/nsd.initd-r2 b/net-dns/nsd/files/nsd.initd-r2
deleted file mode 100644
index e1825433ac3b..000000000000
--- a/net-dns/nsd/files/nsd.initd-r2
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2024 Gentoo Authors
-# 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_ARGS="${NSD_ARGS:--d -P ''}"
-NSD_CONFBASE="${NSD_CONFBASE:-/etc/nsd}"
-NSD_CONFNAME="${NSD_CONFNAME:-${RC_SVCNAME}.conf}"
-
-# The conf.d defaults shipped with nsd-4.9.1+ will run it in the foreground
-# and tell it not to create a PID file, as we allow OpenRC to handle those
-# details.
-config_file="${NSD_CONFBASE}/${NSD_CONFNAME}"
-checkconf="/usr/sbin/nsd-checkconf"
-command="/usr/sbin/nsd"
-command_args="-c ${config_file} ${NSD_ARGS}"
-command_background=true
-pidfile="/run/${RC_SVCNAME}.pid"
-required_files="${config_file}"
-
-depend() {
- use logger
-}
-
-checkconfig() {
- if ! "${checkconf}" "${config_file}"; then
- eerror "You have errors in your configfile (${config_file})"
- return $?
- fi
- return 0
-}
-
-configtest() {
- ebegin "Checking ${RC_SVCNAME} configuration"
- checkconfig
- eend $?
-}
-
-start_pre() {
- checkconfig || return $?
-}
-
-reload() {
- checkconfig || return $?
- ebegin "Reloading config and zone files"
- start-stop-daemon --signal HUP --pidfile "${pidfile}"
- eend $?
-}
diff --git a/net-dns/nsd/files/nsd.tmpfilesd-r1 b/net-dns/nsd/files/nsd.tmpfilesd-r1
deleted file mode 100644
index 0e2211770cd2..000000000000
--- a/net-dns/nsd/files/nsd.tmpfilesd-r1
+++ /dev/null
@@ -1 +0,0 @@
-d /run/nsd 0750 nsd nsd
diff --git a/net-dns/nsd/nsd-4.11.1.ebuild b/net-dns/nsd/nsd-4.11.1.ebuild
new file mode 100644
index 000000000000..7fe65a15843c
--- /dev/null
+++ b/net-dns/nsd/nsd-4.11.1.ebuild
@@ -0,0 +1,160 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="8"
+
+inherit autotools systemd tmpfiles
+
+DESCRIPTION="An authoritative only, high performance, open source name server"
+HOMEPAGE="https://www.nlnetlabs.nl/projects/nsd"
+
+if [[ ${PV} == *9999 ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/NLnetLabs/nsd.git"
+else
+ # version voodoo needed only for non-release tarballs: 4.0.0_rc1 => 4.0.0rc1
+ MY_PV="${PV/_beta/b}"
+ MY_PV="${MY_PV/_rc/rc}"
+ MY_P="${PN}-${MY_PV}"
+
+ if [[ ${PV} != *_beta* && ${PV} != *_rc* ]] ; then
+ SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
+ S="${WORKDIR}"/${MY_P}
+
+ KEYWORDS="~amd64 ~x86"
+ fi
+fi
+
+LICENSE="BSD"
+SLOT="0"
+IUSE="bind8-stats debug +default-znow dnstap +ipv6 +largefile libevent +lto memclean minimal-responses mmap munin +nsec3 packed +pie +radix-tree ratelimit recvmmsg +simdzone ssl systemd +tfo year2038"
+
+RDEPEND="
+ acct-group/nsd
+ acct-user/nsd
+ dnstap? (
+ dev-libs/fstrm
+ dev-libs/protobuf-c
+ )
+ libevent? ( dev-libs/libevent )
+ munin? ( net-analyzer/munin )
+ ssl? ( dev-libs/openssl:0= )
+ systemd? ( sys-apps/systemd )
+"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ app-alternatives/lex
+ app-alternatives/yacc
+ systemd? ( virtual/pkgconfig )
+"
+
+PATCHES=(
+ "${FILESDIR}/${PN}-munin-gentoo-paths.patch"
+)
+
+NSD_DBDIR="/var/db/nsd" # Default dir for NSD's databases.
+NSD_ZNDIR="/var/lib/nsd" # Default dir for NSD's zone files.
+
+src_prepare() {
+ default
+
+ # Required to get correct pkg-config macros with USE="systemd".
+ # See bugs #663618 & #758050.
+ eautoreconf
+}
+
+src_configure() {
+ local myconf=(
+ $(use_enable bind8-stats)
+ $(use_enable bind8-stats zone-stats)
+ $(use_enable debug checking)
+ $(use_enable default-znow relro-now)
+ $(use_enable dnstap)
+ $(use_enable ipv6)
+ $(use_enable largefile)
+ $(use_enable lto flto)
+ $(use_enable memclean)
+ $(use_enable minimal-responses)
+ $(use_enable mmap)
+ $(use_enable nsec3)
+ $(use_enable packed)
+ $(use_enable pie)
+ $(use_enable radix-tree)
+ $(use_enable ratelimit)
+ $(use_enable recvmmsg)
+ $(use_enable systemd)
+ $(use_enable tfo tcp-fastopen)
+ $(use_with libevent)
+ $(use_with ssl)
+
+ --with-cookiesecretsfile="${EPREFIX}${NSD_DBDIR}/cookiesecrets.txt"
+ --with-dbfile="${EPREFIX}${NSD_DBDIR}/nsd.db"
+ --with-logfile="${EPREFIX}/var/log/nsd.log"
+ --with-pidfile="${EPREFIX}/run/nsd.pid"
+ --with-xfrdfile="${EPREFIX}${NSD_DBDIR}/xfrd.state"
+ --with-xfrdir="${EPREFIX}${NSD_DBDIR}"
+ --with-zonelistfile="${EPREFIX}${NSD_DBDIR}/zone.list"
+ --with-zonesdir="${EPREFIX}${NSD_ZNDIR}"
+ )
+
+ # NSD 4.10.x introduced a new zone parser, "simdzone", which
+ # replaces the older parser that used flex & bison:
+ # https://github.com/NLnetLabs/simdzone
+ # It leverages SSE4.2 and/or AVX2 instruction sets for faster
+ # zone parsing on x86_64 architectures. Other CPU archs will
+ # use a fallback implementation.
+ if use amd64; then
+ myconf+=(
+ $(use_enable simdzone haswell)
+ $(use_enable simdzone westmere)
+ )
+ fi
+
+ # This configure switch only appears on glibc-based userlands.
+ # It enables 64-bit time_t to support timestamps greater than
+ # the year 2038 (D_TIME_BITS=64).
+ if use elibc_glibc; then
+ myconf+=( $(use_enable year2038) )
+ fi
+
+ econf "${myconf[@]}"
+}
+
+src_install() {
+ emake DESTDIR="${D}" install
+
+ dodoc doc/{ChangeLog,CREDITS,NSD-4-features,NSD-FOR-BIND-USERS,README,RELNOTES,REQUIREMENTS}
+ newinitd "contrib/nsd.openrc" nsd
+ newconfd "contrib/nsd.openrc.conf" nsd
+ newtmpfiles "contrib/nsd-tmpfiles.conf" nsd.conf
+
+ # Install munin plugin and config, if requested.
+ 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
+
+ # Use the upstream-provided systemd service file.
+ systemd_dounit "contrib/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"
+
+ keepdir "${NSD_DBDIR}"
+}
+
+pkg_postinst() {
+ # See eclass/tmpfiles.eclass for info.
+ tmpfiles_process nsd.conf
+
+ # Database directory
+ # Writable by nsd:nsd for database updates and zone transfers.
+ install -d -m 750 -o nsd -g nsd "${EROOT}/${NSD_DBDIR}"
+
+ # Zones directory
+ # Writable by nsd:nsd for zone file updates (via 'nsd-control write').
+ install -d -m 750 -o nsd -g nsd "${EROOT}/${NSD_ZNDIR}"
+}
diff --git a/net-dns/nsd/nsd-9999.ebuild b/net-dns/nsd/nsd-9999.ebuild
index 099b81460652..7fe65a15843c 100644
--- a/net-dns/nsd/nsd-9999.ebuild
+++ b/net-dns/nsd/nsd-9999.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI="8"
@@ -87,6 +87,7 @@ src_configure() {
$(use_with libevent)
$(use_with ssl)
+ --with-cookiesecretsfile="${EPREFIX}${NSD_DBDIR}/cookiesecrets.txt"
--with-dbfile="${EPREFIX}${NSD_DBDIR}/nsd.db"
--with-logfile="${EPREFIX}/var/log/nsd.log"
--with-pidfile="${EPREFIX}/run/nsd.pid"