net-dns/dnsdist: add 2.0.4

Bug: https://bugs.gentoo.org/973078
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://codeberg.org/gentoo/gentoo/pulls/696
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Holger Hoffstätte
2026-04-22 16:28:57 +01:00
committed by Sam James
parent 8b20b55d92
commit 174a7404d1
2 changed files with 184 additions and 0 deletions
+2
View File
@@ -1,6 +1,8 @@
DIST dnsdist-2.0.2.tar.xz 2284864 BLAKE2B 87a4179f474d7f8117e4e03c4ff680f79207c8056765c6925ee21b3011e4555e47ad9c97950f30ab2876ac0978ee07555017cb1bbc6b93792992c1821f8da27a SHA512 7f53d13bb90b7b70da364341e50473b88be0bc9619e3263e352bed75aa57edbc018824439749956281a2c7a5d32c653e7378fe9d3cbc296042fa8120eee75fae
DIST dnsdist-2.0.3.tar.xz 2285640 BLAKE2B 5f915bfe5201b32956a30440c7b8bde4e9d1862b2c82a2f1124fd846f175e45cf58bd5c78c8ad2b876f8cbf36f9c9109141f2c7ddeff54d9eeac190870387dc5 SHA512 10922b91c39433414fee61e09894fbe1bc4b860558f3f6b4e729db0c561d33a22a17beff4162432bbc0a479b9edbaece735ae1f566a58b7d2da60b7e97b376b9
DIST dnsdist-2.0.4.tar.xz 2287608 BLAKE2B 1794b4f163aac58eb141149b5e7b1a7db42f67f12ffb138ee0a858525e7aba5fe4bebc346b9874891a8da610b82365f63c323b673a2c6adf80dd4d40fa53f7b6 SHA512 abad5eb6d95202700e419e090bde64b9f4117214c0b21df472262a29a066a179a8d93b8684d066f52a4a2a82cba184927be6f8501bffab2a0e89ebe66e881592
DIST dnsdist-docs-2.0.2.tar.xz 1385828 BLAKE2B 79b4bb02f42f9bb3829fec6c6788ea2cc79c3f55d31b462e3c54d32f8afb0dfc84d8b347cbdae6cc3f9d8c9ebd1207a71f097f5201f14b9b2b6b20c72842d6b2 SHA512 ab73d30193bd99b4163962be5564c596fdd1d0c85c20d6606a70ed491ceb8ff801418aa7890c9ad2025ef3c9767f1d8252c0c18cfee5ebf9d845cce7e681f578
DIST dnsdist-rust-2.0.2-crates.tar.xz 5268364 BLAKE2B 36b370eacb7332d04de0fa1be2a49983c030c94df00abcc6681180b1ad5fa8bfe3e19744543b3707e305d57649837a632c1400fd4ae1b4626f084310db8f9bad SHA512 a9f1e10a71a9fb2e6879077224823dd278f1a27c5698076e69bc4bcdf89cff5e54ffd0fce90113131358398289400da263b90c895d167cb3c007fcc96654e116
DIST dnsdist-rust-2.0.3-crates.tar.xz 5268364 BLAKE2B 36b370eacb7332d04de0fa1be2a49983c030c94df00abcc6681180b1ad5fa8bfe3e19744543b3707e305d57649837a632c1400fd4ae1b4626f084310db8f9bad SHA512 a9f1e10a71a9fb2e6879077224823dd278f1a27c5698076e69bc4bcdf89cff5e54ffd0fce90113131358398289400da263b90c895d167cb3c007fcc96654e116
DIST dnsdist-rust-2.0.4-crates.tar.xz 5268364 BLAKE2B 36b370eacb7332d04de0fa1be2a49983c030c94df00abcc6681180b1ad5fa8bfe3e19744543b3707e305d57649837a632c1400fd4ae1b4626f084310db8f9bad SHA512 a9f1e10a71a9fb2e6879077224823dd278f1a27c5698076e69bc4bcdf89cff5e54ffd0fce90113131358398289400da263b90c895d167cb3c007fcc96654e116
DIST dnsdist-rust-9999-630a017b-crates.tar.xz 3275568 BLAKE2B 1185b4c96fb0ec94e96333fea49b1bfee20384cf6515acc9dc95056ae7a759933cbe885175766c2239f2d86524af0df264a92256f7853a6b16c01e257267ad1b SHA512 10221f627bf6733c03882f3f050c2fa40b5d601c6744672d4f2903d863dfa6378b9582feaaa11cdc10b6ca3900db2805bccd84e3bc69a5623eaa24c5d4569047
+182
View File
@@ -0,0 +1,182 @@
# Copyright 1999-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
PYTHON_COMPAT=( python3_{12..14} )
RUST_MIN_VER="1.85.0"
RUST_OPTIONAL=1
inherit cargo flag-o-matic lua-single meson python-any-r1 toolchain-funcs
DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer"
HOMEPAGE="https://www.dnsdist.org/index.html"
if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="https://github.com/PowerDNS/pdns"
EGIT_BRANCH="master"
inherit git-r3
else
SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.xz"
KEYWORDS="~amd64 ~x86"
fi
SRC_URI+="
yaml? ( https://www.applied-asynchrony.com/distfiles/${PN}-rust-${PV}-crates.tar.xz )
"
LICENSE="GPL-2"
SLOT="0"
IUSE="bpf cdb dnscrypt dnstap doh doh3 ipcipher lmdb quic regex snmp +ssl systemd test web xdp yaml"
RESTRICT="!test? ( test )"
REQUIRED_USE="${LUA_REQUIRED_USE}
dnscrypt? ( ssl )
doh? ( ssl )
doh3? ( ssl quic )
ipcipher? ( ssl )
quic? ( ssl )"
RDEPEND="acct-group/dnsdist
acct-user/dnsdist
bpf? ( dev-libs/libbpf:= )
cdb? ( dev-db/tinycdb:= )
sys-libs/libcap
dev-libs/libedit
dev-libs/libsodium:=
dnstap? ( dev-libs/fstrm )
doh? ( net-libs/nghttp2:= )
doh3? ( net-libs/quiche:= )
lmdb? ( dev-db/lmdb:= )
quic? ( net-libs/quiche )
regex? ( dev-libs/re2:= )
snmp? ( net-analyzer/net-snmp:= )
ssl? ( dev-libs/openssl:= )
systemd? ( sys-apps/systemd:0= )
xdp? ( net-libs/xdp-tools )
${LUA_DEPS}
"
DEPEND="${RDEPEND}
dev-libs/boost:=
"
BDEPEND="$(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
virtual/pkgconfig
yaml? ( ${RUST_DEPEND} )
"
# special requirements for live
if [[ ${PV} == *9999* ]] ; then
BDEPEND+=" dev-util/ragel"
S="${S}/pdns/dnsdistdist"
fi
PATCHES=(
"${FILESDIR}"/2.0.2-roundrobin-fast-path.patch
"${FILESDIR}"/2.0.2-speed-up-cache-hits.patch
)
pkg_setup() {
lua-single_pkg_setup
python-any-r1_pkg_setup
use yaml && rust_pkg_setup
}
python_check_deps() {
python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
}
# git-r3 overrides automatic SRC_URI unpacking
src_unpack() {
default
if [[ ${PV} == *9999* ]] ; then
git-r3_src_unpack
fi
}
src_prepare() {
default
# clean up duplicate file
rm -f README.md
}
src_configure() {
# bug #822855
append-lfs-flags
# There is currently no reliable way to handle mixed C++/Rust + LTO
# correctly: https://bugs.gentoo.org/963128
if use yaml && tc-is-lto ; then
ewarn "Disabling LTO because of mixed C++/Rust toolchains."
filter-lto
fi
# some things can only be enabled/disabled by defines
! use dnstap && append-cppflags -DDISABLE_PROTOBUF
! use web && append-cppflags -DDISABLE_BUILTIN_HTML
local emesonargs=(
--sysconfdir="${EPREFIX}/etc/dnsdist"
# always use libsodium
-Dlibsodium=enabled
-Dlua=${ELUA}
# never try to build man pages (virtualenv)
-Dman-pages=false
# never use gnutls (openssl only)
-Dtls-gnutls=disabled
$(meson_feature bpf ebpf)
$(meson_feature cdb)
$(meson_feature dnscrypt)
$(meson_feature dnstap)
$(meson_feature doh dns-over-https)
$(meson_feature doh nghttp2)
$(meson_feature doh3 dns-over-http3)
$(meson_feature ipcipher)
$(meson_feature lmdb)
$(meson_feature quic dns-over-quic)
$(meson_feature regex re2)
$(meson_feature snmp)
$(meson_feature ssl libcrypto)
$(meson_feature ssl tls-libssl)
$(meson_feature ssl dns-over-tls)
$(meson_feature systemd systemd-service)
$(meson_use test unit-tests)
$(meson_feature xdp xsk)
$(meson_feature yaml)
)
meson_src_configure
}
# explicitly implement src_compile/test to override the
# otherwise automagic cargo_src_compile/test phases
src_compile() {
cargo_gen_config
cargo_env meson_src_compile
}
src_test() {
meson_src_test
}
src_install() {
meson_src_install
insinto /etc/dnsdist
doins "${FILESDIR}"/dnsdist.conf.example
newconfd "${FILESDIR}"/dnsdist.confd ${PN}
newinitd "${FILESDIR}"/dnsdist.initd ${PN}
}
pkg_postinst() {
elog "dnsdist provides multiple instances support. You can create more instances"
elog "by symlinking the dnsdist init script to another name."
elog
elog "The name must be in the format dnsdist.<suffix> and dnsdist will use the"
elog "/etc/dnsdist/dnsdist-<suffix>.conf configuration file instead of the default."
}