commit:     89bc0b242c7c9d86680f55bf320ebb99cde351f6
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Mon Jul 21 16:27:22 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jul 24 21:27:17 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89bc0b24

net-dns/dnsdist: add 2.0.0

This is a major release with lots of fixes and new features, but
just as stable and reliable as the 1.9.x line; upgrading should be
seamless as existing configurations continue to work without problems.
The new YAML-based configuration is optional since it requires Rust.

In theory the ebuild could have migrated to meson, but to reduce the
risks of the update we continue to use autools for now.

Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/43100
Closes: https://github.com/gentoo/gentoo/pull/43100
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/dnsdist/Manifest             |   2 +
 net-dns/dnsdist/dnsdist-2.0.0.ebuild | 130 +++++++++++++++++++++++++++++++++++
 net-dns/dnsdist/metadata.xml         |   1 +
 3 files changed, 133 insertions(+)

diff --git a/net-dns/dnsdist/Manifest b/net-dns/dnsdist/Manifest
index c1be2328ffc1..15e56df7915a 100644
--- a/net-dns/dnsdist/Manifest
+++ b/net-dns/dnsdist/Manifest
@@ -1,2 +1,4 @@
 DIST dnsdist-1.9.10.tar.bz2 1598472 BLAKE2B 
ea66ca17ef66ecc64fd3a7379b22c2b0448c2a41f325e574a4edb20dfe408315be84a407b78f30a441479fbbcba31a28da2e310c275877739918ad3f9870acd1
 SHA512 
d7249861bb5454dce3d179701e1c686c5c5ed177ca39b07ca6b1f27d2ab7a014d0d255ee6b70153962dc5d9a84545ae4a4a55c53c8e75f308cda5406eed57e9b
 DIST dnsdist-1.9.9.tar.bz2 1609983 BLAKE2B 
54517c396d8b5b546e9bcc5890f6df0cfa8470b65d9c7dcece0c7d503fff3fc0d4e2898a7bda8e16f9935279849128293967b38865345fa4c963705b9c9b8cad
 SHA512 
addd72f5324d75811601d9efe7af8846a448694172a14066b3ae53c7e53195f6955a038f97411703f66ce6bafd02846bf3c679839c473de6f7fc9ebecb8e6ca9
+DIST dnsdist-2.0.0.tar.xz 2275260 BLAKE2B 
890bd555ec539ef5d3e9906e15410006471f1dc4848c768a3c631fe399f35e8b42ffc01a53aa9ff3b2f1248d635b9f9b90c1527f7e391848795b28c065398290
 SHA512 
dee84019ae317bc4e0b4d2f94e38a221bfa94460d3bb8d82ad152eed99bef1e2bd2631f5c1e6930fb9957a928ed9cf891ef8165137cd8ec1902fb734d5aab8fb
+DIST dnsdist-rust-2.0.0-crates.tar.xz 5268364 BLAKE2B 
36b370eacb7332d04de0fa1be2a49983c030c94df00abcc6681180b1ad5fa8bfe3e19744543b3707e305d57649837a632c1400fd4ae1b4626f084310db8f9bad
 SHA512 
a9f1e10a71a9fb2e6879077224823dd278f1a27c5698076e69bc4bcdf89cff5e54ffd0fce90113131358398289400da263b90c895d167cb3c007fcc96654e116

diff --git a/net-dns/dnsdist/dnsdist-2.0.0.ebuild 
b/net-dns/dnsdist/dnsdist-2.0.0.ebuild
new file mode 100644
index 000000000000..839d96f619e2
--- /dev/null
+++ b/net-dns/dnsdist/dnsdist-2.0.0.ebuild
@@ -0,0 +1,130 @@
+# Copyright 1999-2025 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+LUA_COMPAT=( lua5-{1..4} luajit )
+PYTHON_COMPAT=( python3_{11..14} )
+RUST_MIN_VER=1.85.1
+RUST_OPTIONAL=1
+
+inherit cargo flag-o-matic lua-single python-any-r1
+
+DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer"
+HOMEPAGE="https://www.dnsdist.org/index.html";
+SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.xz
+       yaml? ( 
https://www.applied-asynchrony.com/distfiles/${PN}-rust-${PV}-crates.tar.xz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+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:= )
+       dev-libs/boost:=
+       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}"
+BDEPEND="$(python_gen_any_dep 'dev-python/pyyaml[${PYTHON_USEDEP}]')
+       virtual/pkgconfig
+       yaml? ( ${RUST_DEPEND} )
+"
+
+pkg_setup() {
+       lua-single_pkg_setup
+       python-any-r1_pkg_setup
+       rust_pkg_setup
+}
+
+python_check_deps() {
+       python_has_version "dev-python/pyyaml[${PYTHON_USEDEP}]"
+}
+
+src_prepare() {
+       default
+
+       # clean up duplicate file
+       rm -f README.md
+}
+
+src_compile() {
+       emake
+}
+
+src_configure() {
+       # bug #822855
+       append-lfs-flags
+
+       # some things can only be enabled/disabled by defines
+       ! use dnstap && append-cppflags -DDISABLE_PROTOBUF
+       ! use web && append-cppflags -DDISABLE_BUILTIN_HTML
+
+       local myeconfargs=(
+               --sysconfdir=/etc/dnsdist
+               --enable-tls-providers
+               --with-lua="${ELUA}"
+               --without-gnutls
+               --without-h2o
+               $(use_with bpf ebpf)
+               $(use_with cdb cdb)
+               $(use_enable doh dns-over-https)
+               $(use_enable doh3 dns-over-http3)
+               $(use_enable dnscrypt)
+               $(use_enable dnstap)
+               $(use_enable ipcipher)
+               $(use_with lmdb)
+               $(use_enable quic dns-over-quic)
+               $(use_with regex re2)
+               $(use_with snmp net-snmp)
+               $(use_enable ssl dns-over-tls)
+               $(use_enable systemd)
+               $(use_enable test unit-tests)
+               $(use_with xdp xsk)
+               $(use_enable yaml)
+       )
+
+       econf "${myeconfargs[@]}"
+}
+
+src_install() {
+       default
+
+       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."
+}

diff --git a/net-dns/dnsdist/metadata.xml b/net-dns/dnsdist/metadata.xml
index a0aacedd7897..6365a7704929 100644
--- a/net-dns/dnsdist/metadata.xml
+++ b/net-dns/dnsdist/metadata.xml
@@ -25,6 +25,7 @@
                <flag name="ssl">Enable support for and encrypted client-server 
communication via <pkg>dev-libs/libsodium</pkg></flag>
                <flag name="web">Enable support for the web UI</flag>
                <flag name="xdp">Enable support for AF_XDP high performance 
packet processing</flag>
+               <flag name="yaml">Enable support for YAML configuration</flag>
        </use>  
        <upstream>
                <remote-id type="github">PowerDNS/pdns</remote-id>

Reply via email to