commit: 9d839c3e0a5f5576bb996f5c3e7d8ae61f60fa19 Author: Brett A C Sheffield <bacs <AT> librecast <DOT> net> AuthorDate: Sat Feb 28 18:13:19 2026 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Sun Mar 1 00:00:13 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d839c3e
net-dns/nsd: add 4.14.1 Signed-off-by: Brett A C Sheffield <bacs <AT> librecast.net> Part-of: https://codeberg.org/gentoo/gentoo/pulls/175 Signed-off-by: Sam James <sam <AT> gentoo.org> net-dns/nsd/Manifest | 1 + net-dns/nsd/nsd-4.14.1.ebuild | 177 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 178 insertions(+) diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest index 553eb6d88875..c25466799596 100644 --- a/net-dns/nsd/Manifest +++ b/net-dns/nsd/Manifest @@ -1,2 +1,3 @@ DIST nsd-4.12.0.tar.gz 1531601 BLAKE2B b8b2353cbddfde5004d3bcd9b373da65b2089579904a9f3cf66f3f5fc8a1dd1b5e6bf13620e26c65597e7b8b7793b02d775ff324ba900d68cb2742245368a107 SHA512 5efdc95407ee2726856233830501821b6843808760e4c9ed580e5266c8b6797b0902c01238dd7d4441021d5f6b1a0b90767693f1b0db76dae4e2f0621bb79bf4 DIST nsd-4.14.0.tar.gz 1592844 BLAKE2B 5e665d60a111b8b806762b7bdb8b074daa037a5b26105060fbfb8acbe3a62d3053ea951f7e50d162e28e69562522df512485caa6940e9d317d48e8892c7f87e3 SHA512 1ff95098cd5d8061dc6e90ff1ab9becdce33e413bc50025fbe9724711d94c89f8fd7317fc88443d670238c418319227f1bda348855972ed5322ea9a83565b20c +DIST nsd-4.14.1.tar.gz 1616372 BLAKE2B fbeabc698f47832ee78cd2be9f8ffdc63d60700722095fc8623cc5d9ef9370b590f88d4c617432e6964734712cc0c8582908acb8be326476a524c21cd1a22d04 SHA512 17e5f7c72589a6e7467d1741459b7199a0b12f8eda9022ab64ab700bd6959a009af1d7dac45c352f5209553679462805883c6f3b3f6c8a1fa4c762160b27e766 diff --git a/net-dns/nsd/nsd-4.14.1.ebuild b/net-dns/nsd/nsd-4.14.1.ebuild new file mode 100644 index 000000000000..69acd35fb834 --- /dev/null +++ b/net-dns/nsd/nsd-4.14.1.ebuild @@ -0,0 +1,177 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit autotools systemd tmpfiles toolchain-funcs + +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 ~arm64 ~x86" + fi +fi + +LICENSE="BSD" +SLOT="0" +IUSE="+bind8-stats debug +dnstap +ipv6 libevent memclean minimal-responses mmap munin" +IUSE+=" +nsec3 +radix-tree +ratelimit recvmmsg +simdzone ssl systemd +tfo xdp" + +RDEPEND=" + acct-group/nsd + acct-user/nsd + dnstap? ( + >=dev-libs/fstrm-0.4 + dev-libs/protobuf-c:= + ) + libevent? ( dev-libs/libevent ) + munin? ( net-analyzer/munin ) + ssl? ( dev-libs/openssl:= ) + systemd? ( sys-apps/systemd ) + xdp? ( + dev-libs/libbpf:= + net-libs/xdp-tools + sys-libs/libcap + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + app-alternatives/lex + app-alternatives/yacc + systemd? ( virtual/pkgconfig ) + xdp? ( llvm-core/clang:*[llvm_targets_BPF] ) +" + +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. + +QA_EXECSTACK=" + usr/lib/nsd/xdp-*.o +" + +src_prepare() { + default + + # Required to get correct pkg-config macros with USE="systemd". + # See bugs #663618 & #758050. + eautoreconf +} + +src_configure() { + local myconf=( + --cache-file="${S}"/config.cache + + $(use_enable bind8-stats) + $(use_enable bind8-stats zone-stats) + $(use_enable debug checking) + $(use_enable dnstap) + $(use_enable ipv6) + $(use_enable memclean) + $(use_enable minimal-responses) + $(use_enable mmap) + $(use_enable nsec3) + --disable-packed + $(use_enable radix-tree) + $(use_enable ratelimit) + $(use_enable recvmmsg) + $(use_enable systemd) + $(use_enable tfo tcp-fastopen) + $(use_enable xdp) + $(use_with libevent) + $(use_with ssl) + + --with-cookiesecretsfile="${EPREFIX}${NSD_DBDIR}/cookiesecrets.txt" + --with-dbfile="${EPREFIX}${NSD_DBDIR}/nsd.db" + --with-dbdir="${EPREFIX}${NSD_DBDIR}" + --with-logfile="${EPREFIX}/var/log/nsd.log" + --with-pidfile="${EPREFIX}/run/nsd.pid" + # sharedfilesdir is used for xdp (bpf) objects + --with-sharedfilesdir="${EPREFIX}/usr/lib/nsd" + --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 + + # If the compiler indicates that time_t is at least 64-bits wide, + # then enable it in the package to support timestamps greater than + # the year 2038 (D_TIME_BITS=64). This configure switch only + # appears on glibc-based userlands. + if use elibc_glibc && tc-has-64bit-time_t; then + myconf+=( --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" + + # BPF + dostrip -x /usr/lib/nsd + + 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}" +}
