net-dns/dnsdist: clean up old

Bug: https://bugs.gentoo.org/955071
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Part-of: https://github.com/gentoo/gentoo/pull/41841
Closes: https://github.com/gentoo/gentoo/pull/41841
Signed-off-by: Sam James <sam@gentoo.org>
This commit is contained in:
Holger Hoffstätte
2025-04-29 13:52:12 +02:00
committed by Sam James
parent 1ec6edbeb8
commit c166366efa
5 changed files with 0 additions and 376 deletions

View File

@@ -1,3 +1 @@
DIST dnsdist-1.9.6.tar.bz2 1598874 BLAKE2B adb56707bb768ceae974cd9b725d2bf1f4beaa6e3edc6ede22a7d93920214614f10c82d71dbb773741f56dff04e0f0aa26dc0a0e2d5d405bee89d8ada1130303 SHA512 8d0c88336864b788df320298678e2a8556d7c4ff468ec1b4165b87c2fe5c6c167a2c75cdd2df433346fac12694d8e39d30910b8d1d4be7f35d9e0d85edd5ef5a
DIST dnsdist-1.9.8.tar.bz2 1593902 BLAKE2B 854344eb6b82f98001171830715fe5cf564628405b4c79c07b43fccdbca0a4c9da7e527a748bc2972261a32ed9c51582eac2e6fdbef5c25bd71b161318a62155 SHA512 b89bc1ba62a2cf009a305a71eaa2553810d6d5f25f71098cb34acd86bfe5632e5f9f4b5ce057ea93665f1f5dd65e6a3d67fa364e8cecf0b648559c73061baddd
DIST dnsdist-1.9.9.tar.bz2 1609983 BLAKE2B 54517c396d8b5b546e9bcc5890f6df0cfa8470b65d9c7dcece0c7d503fff3fc0d4e2898a7bda8e16f9935279849128293967b38865345fa4c963705b9c9b8cad SHA512 addd72f5324d75811601d9efe7af8846a448694172a14066b3ae53c7e53195f6955a038f97411703f66ce6bafd02846bf3c679839c473de6f7fc9ebecb8e6ca9

View File

@@ -1,112 +0,0 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit flag-o-matic lua-single
DESCRIPTION="A highly DNS-, DoS- and abuse-aware loadbalancer"
HOMEPAGE="https://dnsdist.org"
SRC_URI="https://downloads.powerdns.com/releases/${P}.tar.bz2"
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"
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="virtual/pkgconfig"
src_prepare() {
default
# clean up duplicate file
rm -f README.md
}
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
sed 's/hardcode_libdir_flag_spec_CXX='\''$wl-rpath $wl$libdir'\''/hardcode_libdir_flag_spec_CXX='\''$wl-rpath $wl\/$libdir'\''/g' \
-i "${S}/configure"
local myeconfargs=(
--sysconfdir=/etc/dnsdist
--with-lua="${ELUA}"
--without-h2o
--enable-tls-providers
--without-gnutls
$(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)
)
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."
}

View File

@@ -1,120 +0,0 @@
# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
LUA_COMPAT=( lua5-{1..4} luajit )
inherit autotools flag-o-matic lua-single
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.bz2"
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"
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="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/1.9.8-quiche-0.23.patch"
"${FILESDIR}/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch"
)
src_prepare() {
default
# clean up duplicate file
rm -f README.md
# reconfigure
eautoreconf
}
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
sed 's/hardcode_libdir_flag_spec_CXX='\''$wl-rpath $wl$libdir'\''/hardcode_libdir_flag_spec_CXX='\''$wl-rpath $wl\/$libdir'\''/g' \
-i "${S}/configure"
local myeconfargs=(
--sysconfdir=/etc/dnsdist
--with-lua="${ELUA}"
--without-h2o
--enable-tls-providers
--without-gnutls
$(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)
)
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."
}

View File

@@ -1,90 +0,0 @@
Patch from: https://github.com/PowerDNS/pdns/pull/15181
Fixed file paths for dnsdist tarball.
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
From: Remi Gacogne <remi.gacogne@powerdns.com>
Date: Mon, 10 Feb 2025 11:24:28 +0100
Subject: [PATCH] dnsdist-1.9.x: Fix compatibility with boost::lockfree >= 1.87.0
In https://github.com/boostorg/lockfree/pull/90 `boost::lockfree::spsc_queue`
introduced moved semantics, which is great, but added restrictions
to the callback functor that did not exist before, breaking the API.
This PR fixes that by updating our callbacks to expect an object
instead of a reference.
(cherry picked from commit 05543aed8ccff2270a65d3f9b75e6e9d894b8b45)
---
dnsdist-xsk.cc | 6 +++---
xsk.cc | 4 ++--
xsk.hh | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/dnsdist-xsk.cc b/dnsdist-xsk.cc
index 7e83c510093e..dcbd79459796 100644
--- a/dnsdist-xsk.cc
+++ b/dnsdist-xsk.cc
@@ -48,7 +48,7 @@ void XskResponderThread(std::shared_ptr<DownstreamState> dss, std::shared_ptr<Xs
if ((pollfds[0].revents & POLLIN) != 0) {
needNotify = true;
xskInfo->cleanSocketNotification();
- xskInfo->processIncomingFrames([&](XskPacket& packet) {
+ xskInfo->processIncomingFrames([&](XskPacket packet) {
if (packet.getDataLen() < sizeof(dnsheader)) {
xskInfo->markAsFree(packet);
return;
@@ -167,7 +167,7 @@ void XskRouter(std::shared_ptr<XskSocket> xsk)
if ((fds.at(fdIndex).revents & POLLIN) != 0) {
ready--;
const auto& info = xsk->getWorkerByDescriptor(fds.at(fdIndex).fd);
- info->processOutgoingFrames([&](XskPacket& packet) {
+ info->processOutgoingFrames([&](XskPacket packet) {
if ((packet.getFlags() & XskPacket::UPDATE) == 0) {
xsk->markAsFree(packet);
return;
@@ -202,7 +202,7 @@ void XskClientThread(ClientState* clientState)
while (!xskInfo->hasIncomingFrames()) {
xskInfo->waitForXskSocket();
}
- xskInfo->processIncomingFrames([&](XskPacket& packet) {
+ xskInfo->processIncomingFrames([&](XskPacket packet) {
if (XskProcessQuery(*clientState, holders, packet)) {
packet.updatePacket();
xskInfo->pushToSendQueue(packet);
diff --git a/xsk.cc b/xsk.cc
index 5851f1b9b79e..d246a1d72e83 100644
--- a/xsk.cc
+++ b/xsk.cc
@@ -1185,7 +1185,7 @@ bool XskWorker::hasIncomingFrames()
return d_incomingPacketsQueue.read_available() != 0U;
}
-void XskWorker::processIncomingFrames(const std::function<void(XskPacket& packet)>& callback)
+void XskWorker::processIncomingFrames(const std::function<void(XskPacket packet)>& callback)
{
if (d_type == Type::OutgoingOnly) {
throw std::runtime_error("Looking for incoming packets in an outgoing-only XSK Worker");
@@ -1194,7 +1194,7 @@ void XskWorker::processIncomingFrames(const std::function<void(XskPacket& packet
d_incomingPacketsQueue.consume_all(callback);
}
-void XskWorker::processOutgoingFrames(const std::function<void(XskPacket& packet)>& callback)
+void XskWorker::processOutgoingFrames(const std::function<void(XskPacket packet)>& callback)
{
d_outgoingPacketsQueue.consume_all(callback);
}
diff --git a/xsk.hh b/xsk.hh
index 2f3e7c372e35..ff36be5ecd96 100644
--- a/xsk.hh
+++ b/xsk.hh
@@ -312,8 +312,8 @@ public:
void pushToProcessingQueue(XskPacket& packet);
void pushToSendQueue(XskPacket& packet);
bool hasIncomingFrames();
- void processIncomingFrames(const std::function<void(XskPacket& packet)>& callback);
- void processOutgoingFrames(const std::function<void(XskPacket& packet)>& callback);
+ void processIncomingFrames(const std::function<void(XskPacket packet)>& callback);
+ void processOutgoingFrames(const std::function<void(XskPacket packet)>& callback);
void markAsFree(const XskPacket& packet);
// notify worker that at least one packet is available for processing
void notifyWorker() const;

View File

@@ -1,52 +0,0 @@
Manual backport of upstream commit:
https://github.com/PowerDNS/pdns/commit/661b071b347193a66deaa0d5b8350a2c816f6534
Signed-off-by: Holger Hoffstätte <holger@applied-asynchrony.com>
diff -up dnsdist-1.9.8/doh3.cc.orig dnsdist-1.9.8/doh3.cc
--- dnsdist-1.9.8/doh3.cc.orig 2024-12-17 10:14:37.000000000 +0100
+++ dnsdist-1.9.8/doh3.cc 2025-02-18 10:04:11.843950262 +0100
@@ -751,7 +751,11 @@ static void processH3HeaderEvent(ClientS
}
if (headers.at(":method") == "POST") {
+#if defined(HAVE_QUICHE_H3_EVENT_HEADERS_HAS_MORE_FRAMES)
+ if (!quiche_h3_event_headers_has_more_frames(event)) {
+#else
if (!quiche_h3_event_headers_has_body(event)) {
+#endif
handleImmediateError("Empty POST query");
}
return;
diff -up dnsdist-1.9.8/m4/pdns_with_quiche.m4.orig dnsdist-1.9.8/m4/pdns_with_quiche.m4
--- dnsdist-1.9.8/m4/pdns_with_quiche.m4.orig 2024-12-17 10:14:37.000000000 +0100
+++ dnsdist-1.9.8/m4/pdns_with_quiche.m4 2025-02-18 10:04:11.844114375 +0100
@@ -10,16 +10,23 @@ AC_DEFUN([PDNS_WITH_QUICHE], [
AS_IF([test "x$with_quiche" != "xno"], [
AS_IF([test "x$with_quiche" = "xyes" -o "x$with_quiche" = "xauto"], [
- PKG_CHECK_MODULES([QUICHE], [quiche >= 0.22.0], [
+ PKG_CHECK_MODULES([QUICHE], [quiche >= 0.23.0], [
[HAVE_QUICHE=1]
AC_DEFINE([HAVE_QUICHE], [1], [Define to 1 if you have quiche])
+ AC_DEFINE([HAVE_QUICHE_H3_EVENT_HEADERS_HAS_MORE_FRAMES], [1], [Define to 1 if the Quiche API has quiche_h3_event_headers_has_more_frames instead of quiche_h3_event_headers_has_body])
AC_DEFINE([HAVE_QUICHE_STREAM_ERROR_CODES], [1], [Define to 1 if the Quiche API includes error code in quiche_conn_stream_recv and quiche_conn_stream_send])
], [
- # Quiche is older than 0.22.0, or no Quiche at all
- PKG_CHECK_MODULES([QUICHE], [quiche >= 0.15.0], [
+ PKG_CHECK_MODULES([QUICHE], [quiche >= 0.22.0], [
[HAVE_QUICHE=1]
AC_DEFINE([HAVE_QUICHE], [1], [Define to 1 if you have quiche])
- ], [ : ])
+ AC_DEFINE([HAVE_QUICHE_STREAM_ERROR_CODES], [1], [Define to 1 if the Quiche API includes error code in quiche_conn_stream_recv and quiche_conn_stream_send])
+ ], [
+ # Quiche is older than 0.22.0, or no Quiche at all
+ PKG_CHECK_MODULES([QUICHE], [quiche >= 0.15.0], [
+ [HAVE_QUICHE=1]
+ AC_DEFINE([HAVE_QUICHE], [1], [Define to 1 if you have quiche])
+ ], [ : ])
+ ])
])
])
])