commit: bd56c2f6989823820137fdef6d00e14dfa01f3db
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 5 02:27:14 2026 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Jan 5 02:39:17 2026 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bd56c2f6
net-dns/nsd: add 4.14.0
* Align IUSE defaults w/ new upstream defaults (several options became
default-enabled in the 4.13.0 release).
Some trimming of IUSE may be worth doing in future.
* Wire up xdp with the usual dostrip -x & exec stack dance
* Add --cache-file for configure as simdzone is a nested/recursive
configure file
Signed-off-by: Sam James <sam <AT> gentoo.org>
net-dns/nsd/Manifest | 1 +
net-dns/nsd/metadata.xml | 1 +
net-dns/nsd/{nsd-9999.ebuild => nsd-4.14.0.ebuild} | 54 +++++++++++++++-------
net-dns/nsd/nsd-9999.ebuild | 54 +++++++++++++++-------
4 files changed, 76 insertions(+), 34 deletions(-)
diff --git a/net-dns/nsd/Manifest b/net-dns/nsd/Manifest
index 6d321165abe9..20a4d15da927 100644
--- a/net-dns/nsd/Manifest
+++ b/net-dns/nsd/Manifest
@@ -1,2 +1,3 @@
DIST nsd-4.11.1.tar.gz 1527949 BLAKE2B
82a710a5e484818a6df19dd39d6b6b4cce4c1add0a055771946f040bbdd6dbee35d8bdb1d48f7d906aca85653e6809754749cc74654e182f5a5b07f19dcd9b42
SHA512
50b7d93485f3b9903e0d7ee5ec326f47c8a603d3c143899aa46e7865413f8b7f0ed2edcdae5ac054b3c709ab50acfbe8816e1be41dd008803ef83fa9bc370944
DIST nsd-4.12.0.tar.gz 1531601 BLAKE2B
b8b2353cbddfde5004d3bcd9b373da65b2089579904a9f3cf66f3f5fc8a1dd1b5e6bf13620e26c65597e7b8b7793b02d775ff324ba900d68cb2742245368a107
SHA512
5efdc95407ee2726856233830501821b6843808760e4c9ed580e5266c8b6797b0902c01238dd7d4441021d5f6b1a0b90767693f1b0db76dae4e2f0621bb79bf4
+DIST nsd-4.14.0.tar.gz 1592844 BLAKE2B
5e665d60a111b8b806762b7bdb8b074daa037a5b26105060fbfb8acbe3a62d3053ea951f7e50d162e28e69562522df512485caa6940e9d317d48e8892c7f87e3
SHA512
1ff95098cd5d8061dc6e90ff1ab9becdce33e413bc50025fbe9724711d94c89f8fd7317fc88443d670238c418319227f1bda348855972ed5322ea9a83565b20c
diff --git a/net-dns/nsd/metadata.xml b/net-dns/nsd/metadata.xml
index 6ec888588a4a..d5c92373b362 100644
--- a/net-dns/nsd/metadata.xml
+++ b/net-dns/nsd/metadata.xml
@@ -23,6 +23,7 @@
<flag name="recvmmsg">Enable recvmmsg and sendmmsg compilation,
faster but some kernel versions may have implementation problems for IPv6</flag>
<flag name="simdzone">Leverage SIMD instructions in modern CPUs
to improve throughput</flag>
<flag name="tfo">Enable TCP Fast Open</flag>
+ <flag name="xdp">Enable support for XDP through
<pkg>net-libs/xdp-tools</pkg></flag>
<flag name="year2038">Enables support for 64-bit 'time_t' (sets
D_TIME_BITS=64; glibc only)</flag>
</use>
</pkgmetadata>
diff --git a/net-dns/nsd/nsd-9999.ebuild b/net-dns/nsd/nsd-4.14.0.ebuild
similarity index 76%
copy from net-dns/nsd/nsd-9999.ebuild
copy to net-dns/nsd/nsd-4.14.0.ebuild
index 4bf98b80c2c0..cad0c1377cf8 100644
--- a/net-dns/nsd/nsd-9999.ebuild
+++ b/net-dns/nsd/nsd-4.14.0.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="8"
+EAPI=8
inherit autotools systemd tmpfiles toolchain-funcs
@@ -12,7 +12,7 @@ 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
+ # 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}"
@@ -21,31 +21,38 @@ else
SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
S="${WORKDIR}"/${MY_P}
- KEYWORDS="~amd64 ~x86"
+ KEYWORDS="~amd64 ~arm64 ~x86"
fi
fi
LICENSE="BSD"
SLOT="0"
-IUSE="bind8-stats debug dnstap +ipv6 libevent memclean minimal-responses mmap
munin +nsec3 packed +radix-tree ratelimit recvmmsg +simdzone ssl systemd +tfo"
+IUSE="+bind8-stats debug +dnstap +ipv6 libevent memclean minimal-responses
mmap munin"
+IUSE+=" +nsec3 packed +radix-tree +ratelimit recvmmsg +simdzone ssl systemd
+tfo xdp"
RDEPEND="
acct-group/nsd
acct-user/nsd
dnstap? (
- dev-libs/fstrm
- dev-libs/protobuf-c
+ >=dev-libs/fstrm-0.4
+ dev-libs/protobuf-c:=
)
libevent? ( dev-libs/libevent )
munin? ( net-analyzer/munin )
- ssl? ( dev-libs/openssl:0= )
+ 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=(
@@ -55,6 +62,10 @@ PATCHES=(
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
@@ -65,6 +76,8 @@ src_prepare() {
src_configure() {
local myconf=(
+ --cache-file="${S}"/config.cache
+
$(use_enable bind8-stats)
$(use_enable bind8-stats zone-stats)
$(use_enable debug checking)
@@ -80,13 +93,17 @@ src_configure() {
$(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"
@@ -121,24 +138,27 @@ 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
+ 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
+ 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"
+ 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"
+ rm -r "${ED}"/run || die "Failed to remove /run"
+
+ # BPF
+ dostrip -x /usr/lib/nsd
keepdir "${NSD_DBDIR}"
}
diff --git a/net-dns/nsd/nsd-9999.ebuild b/net-dns/nsd/nsd-9999.ebuild
index 4bf98b80c2c0..cad0c1377cf8 100644
--- a/net-dns/nsd/nsd-9999.ebuild
+++ b/net-dns/nsd/nsd-9999.ebuild
@@ -1,7 +1,7 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="8"
+EAPI=8
inherit autotools systemd tmpfiles toolchain-funcs
@@ -12,7 +12,7 @@ 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
+ # 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}"
@@ -21,31 +21,38 @@ else
SRC_URI="https://www.nlnetlabs.nl/downloads/${PN}/${MY_P}.tar.gz"
S="${WORKDIR}"/${MY_P}
- KEYWORDS="~amd64 ~x86"
+ KEYWORDS="~amd64 ~arm64 ~x86"
fi
fi
LICENSE="BSD"
SLOT="0"
-IUSE="bind8-stats debug dnstap +ipv6 libevent memclean minimal-responses mmap
munin +nsec3 packed +radix-tree ratelimit recvmmsg +simdzone ssl systemd +tfo"
+IUSE="+bind8-stats debug +dnstap +ipv6 libevent memclean minimal-responses
mmap munin"
+IUSE+=" +nsec3 packed +radix-tree +ratelimit recvmmsg +simdzone ssl systemd
+tfo xdp"
RDEPEND="
acct-group/nsd
acct-user/nsd
dnstap? (
- dev-libs/fstrm
- dev-libs/protobuf-c
+ >=dev-libs/fstrm-0.4
+ dev-libs/protobuf-c:=
)
libevent? ( dev-libs/libevent )
munin? ( net-analyzer/munin )
- ssl? ( dev-libs/openssl:0= )
+ 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=(
@@ -55,6 +62,10 @@ PATCHES=(
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
@@ -65,6 +76,8 @@ src_prepare() {
src_configure() {
local myconf=(
+ --cache-file="${S}"/config.cache
+
$(use_enable bind8-stats)
$(use_enable bind8-stats zone-stats)
$(use_enable debug checking)
@@ -80,13 +93,17 @@ src_configure() {
$(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"
@@ -121,24 +138,27 @@ 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
+ 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
+ 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"
+ 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"
+ rm -r "${ED}"/run || die "Failed to remove /run"
+
+ # BPF
+ dostrip -x /usr/lib/nsd
keepdir "${NSD_DBDIR}"
}