public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/
@ 2017-06-14  7:48 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2017-06-14  7:48 UTC (permalink / raw
  To: gentoo-commits

commit:     e5a542cc6b37b5cc2f02c228118ec9db7a0bba3a
Author:     bgo <bgo <AT> 9dt <DOT> de>
AuthorDate: Tue Jun 13 13:14:27 2017 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Wed Jun 14 07:48:43 2017 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5a542cc

net-dns/dnsdist: drop readline support

Closes: https://github.com/gentoo/gentoo/pull/4921

 ...nsdist-1.1.0.ebuild => dnsdist-1.1.0-r1.ebuild} | 21 +++---------------
 net-dns/dnsdist/dnsdist-9999.ebuild                | 21 +++---------------
 net-dns/dnsdist/files/dnsdist-readline.patch       | 25 ----------------------
 3 files changed, 6 insertions(+), 61 deletions(-)

diff --git a/net-dns/dnsdist/dnsdist-1.1.0.ebuild b/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild
similarity index 77%
rename from net-dns/dnsdist/dnsdist-1.1.0.ebuild
rename to net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild
index 4b025151e37..074be54e645 100644
--- a/net-dns/dnsdist/dnsdist-1.1.0.ebuild
+++ b/net-dns/dnsdist/dnsdist-1.1.0-r1.ebuild
@@ -24,17 +24,15 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="dnscrypt luajit readline regex remote-logging +ssl test"
-RESTRICT="readline? ( bindist )"
+IUSE="dnscrypt luajit regex remote-logging +ssl test"
 REQUIRED_USE="dnscrypt? ( ssl )"
 
 DEPEND="
 	>=dev-libs/boost-1.35:=
+	dev-libs/libedit:=
 	luajit? ( dev-lang/luajit:= )
 	!luajit? ( >=dev-lang/lua-5.1:= )
 	remote-logging? ( dev-libs/protobuf:= )
-	readline? ( sys-libs/readline:0= )
-	!readline? ( dev-libs/libedit:= )
 	regex? ( dev-libs/re2:= )
 	ssl? ( dev-libs/libsodium:= )
 "
@@ -47,19 +45,11 @@ RDEPEND="${DEPEND}"
 "
 
 src_prepare() {
-	eapply "${FILESDIR}/${PN}-readline.patch"
-	eapply_user
-
+	default
 	[[ ${PV} == 9999 ]] && eautoreconf
 }
 
 src_configure() {
-	if use readline ; then
-		local -x LIBEDIT_CFLAGS="-I/usr/include/readline"
-		local -x LIBEDIT_LIBS="-lreadline -lcurses"
-		append-cxxflags -DREADLINE
-	fi
-
 	econf \
 		--sysconfdir=/etc/dnsdist \
 		$(use_enable ssl libsodium) \
@@ -91,9 +81,4 @@ pkg_postinst() {
 	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."
-
-	if use readline ; then
-		ewarn "dnsdist (GPLv2) was linked against readline (GPLv3)."
-		ewarn "A binary distribution should therefore not happen."
-	fi
 }

diff --git a/net-dns/dnsdist/dnsdist-9999.ebuild b/net-dns/dnsdist/dnsdist-9999.ebuild
index a0571422096..10e8fc26584 100644
--- a/net-dns/dnsdist/dnsdist-9999.ebuild
+++ b/net-dns/dnsdist/dnsdist-9999.ebuild
@@ -24,17 +24,15 @@ fi
 
 LICENSE="GPL-2"
 SLOT="0"
-IUSE="dnscrypt luajit readline regex remote-logging snmp +ssl test"
-RESTRICT="readline? ( bindist )"
+IUSE="dnscrypt luajit regex remote-logging snmp +ssl test"
 REQUIRED_USE="dnscrypt? ( ssl )"
 
 DEPEND="
 	>=dev-libs/boost-1.35:=
+	dev-libs/libedit:=
 	luajit? ( dev-lang/luajit:= )
 	!luajit? ( >=dev-lang/lua-5.1:= )
 	remote-logging? ( dev-libs/protobuf:= )
-	readline? ( sys-libs/readline:0= )
-	!readline? ( dev-libs/libedit:= )
 	regex? ( dev-libs/re2:= )
 	snmp? ( net-analyzer/net-snmp:= )
 	ssl? ( dev-libs/libsodium:= )
@@ -48,19 +46,11 @@ RDEPEND="${DEPEND}"
 "
 
 src_prepare() {
-	eapply "${FILESDIR}/${PN}-readline.patch"
-	eapply_user
-
+	default
 	[[ ${PV} == 9999 ]] && eautoreconf
 }
 
 src_configure() {
-	if use readline ; then
-		local -x LIBEDIT_CFLAGS="-I/usr/include/readline"
-		local -x LIBEDIT_LIBS="-lreadline -lcurses"
-		append-cxxflags -DREADLINE
-	fi
-
 	econf \
 		--sysconfdir=/etc/dnsdist \
 		$(use_enable ssl libsodium) \
@@ -93,9 +83,4 @@ pkg_postinst() {
 	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."
-
-	if use readline ; then
-		ewarn "dnsdist (GPLv2) was linked against readline (GPLv3)."
-		ewarn "A binary distribution should therefore not happen."
-	fi
 }

diff --git a/net-dns/dnsdist/files/dnsdist-readline.patch b/net-dns/dnsdist/files/dnsdist-readline.patch
deleted file mode 100644
index d6e031feb4f..00000000000
--- a/net-dns/dnsdist/files/dnsdist-readline.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff -Naur dnsdist-1.1.0/dnsdist.cc dnsdist-1.1.0-gentoo/dnsdist.cc
---- dnsdist-1.1.0/dnsdist.cc	2016-12-29 13:45:46.000000000 +0100
-+++ dnsdist-1.1.0-gentoo/dnsdist.cc	2017-05-21 15:09:10.414951426 +0200
-@@ -29,6 +29,8 @@
- 
- #if defined (__OpenBSD__)
- #include <readline/readline.h>
-+#elif defined READLINE
-+#include <readline/readline.h>
- #else
- #include <editline/readline.h>
- #endif
-diff -Naur dnsdist-1.1.0/dnsdist-console.cc dnsdist-1.1.0-gentoo/dnsdist-console.cc
---- dnsdist-1.1.0/dnsdist-console.cc	2016-12-29 13:45:46.000000000 +0100
-+++ dnsdist-1.1.0-gentoo/dnsdist-console.cc	2017-05-21 15:09:24.758950947 +0200
-@@ -25,6 +25,9 @@
- #if defined (__OpenBSD__)
- #include <readline/readline.h>
- #include <readline/history.h>
-+#elif defined READLINE
-+#include <readline/readline.h>
-+#include <readline/history.h>
- #else
- #include <editline/readline.h>
- #endif


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/
@ 2023-04-19  0:34 Arsen Arsenović
  0 siblings, 0 replies; 4+ messages in thread
From: Arsen Arsenović @ 2023-04-19  0:34 UTC (permalink / raw
  To: gentoo-commits

commit:     61450918ac12732055abb52082fba09837abab8e
Author:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
AuthorDate: Wed Apr 19 00:10:57 2023 +0000
Commit:     Arsen Arsenović <arsen <AT> gentoo <DOT> org>
CommitDate: Wed Apr 19 00:19:00 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61450918

net-dns/dnsdist: Fix building on GCC 13

Closes: https://bugs.gentoo.org/895094
Signed-off-by: Arsen Arsenović <arsen <AT> gentoo.org>

 net-dns/dnsdist/dnsdist-1.7.3-r1.ebuild         |  4 ++
 net-dns/dnsdist/files/dnsdist-1.7.3-gcc13.patch | 62 +++++++++++++++++++++++++
 2 files changed, 66 insertions(+)

diff --git a/net-dns/dnsdist/dnsdist-1.7.3-r1.ebuild b/net-dns/dnsdist/dnsdist-1.7.3-r1.ebuild
index c0ec5088ac0e..72f5311ffcfb 100644
--- a/net-dns/dnsdist/dnsdist-1.7.3-r1.ebuild
+++ b/net-dns/dnsdist/dnsdist-1.7.3-r1.ebuild
@@ -45,6 +45,10 @@ RDEPEND="acct-group/dnsdist
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
+PATCHES=(
+	"${FILESDIR}"/"${PN}"-1.7.3-gcc13.patch
+)
+
 src_configure() {
 	# bug #822855
 	append-lfs-flags

diff --git a/net-dns/dnsdist/files/dnsdist-1.7.3-gcc13.patch b/net-dns/dnsdist/files/dnsdist-1.7.3-gcc13.patch
new file mode 100644
index 000000000000..339887ca4a19
--- /dev/null
+++ b/net-dns/dnsdist/files/dnsdist-1.7.3-gcc13.patch
@@ -0,0 +1,62 @@
+Altered slightly from upstream counterparts in order to make them apply to
+the dist tarball (updated context and filenames to match the dist).
+
+https://github.com/PowerDNS/pdns/commit/f407319cb7374baf06698786f4f39d431a36a3cc
+https://github.com/PowerDNS/pdns/commit/d8b4ea24dc5dbe7c53c24bfffba24bcae7f58e02
+
+From d8b4ea24dc5dbe7c53c24bfffba24bcae7f58e02 Mon Sep 17 00:00:00 2001
+From: Peter van Dijk <peter.van.dijk@powerdns.com>
+Date: Mon, 23 Jan 2023 14:54:09 +0100
+Subject: [PATCH] lock.hh: include <stdexcept>
+
+---
+ pdns/lock.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pdns/lock.hh b/pdns/lock.hh
+index e8bd82988da..a08951a266d 100644
+--- a/lock.hh
++++ b/lock.hh
+@@ -22,6 +22,7 @@
+ #pragma once
+ #include <mutex>
+ #include <shared_mutex>
++#include <stdexcept>
+ 
+ /*
+   This file provides several features around locks:
+From f407319cb7374baf06698786f4f39d431a36a3cc Mon Sep 17 00:00:00 2001
+From: Sander Hoentjen <shoentjen@antagonist.nl>
+Date: Mon, 20 Feb 2023 16:51:07 +0100
+Subject: [PATCH] dnsdist-protocols.hh: include <cstdint>
+
+This fixes building dnsdist with gcc13:
+```
+In file included from dnsdist-protocols.cc:26:
+dnsdist-protocols.hh:32:8: error: use of enum 'typeenum' without previous declaration
+   32 |   enum typeenum : uint8_t
+      |        ^~~~~~~~
+dnsdist-protocols.hh:32:19: error: 'uint8_t' was not declared in this scope
+   32 |   enum typeenum : uint8_t
+      |                   ^~~~~~~
+dnsdist-protocols.hh:25:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
+   24 | #include <vector>
+  +++ |+#include <cstdint>
+   25 | #include <string>
+```
+---
+ pdns/dnsdist-protocols.hh | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/pdns/dnsdist-protocols.hh b/pdns/dnsdist-protocols.hh
+index c5c5743908d..bd2a4bb8ad1 100644
+--- a/dnsdist-protocols.hh
++++ b/dnsdist-protocols.hh
+@@ -22,6 +22,7 @@
+ #pragma once
+ 
+ #include <vector>
++#include <cstdint>
+ #include <string>
+ 
+ namespace dnsdist


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/
@ 2025-03-27 12:05 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-03-27 12:05 UTC (permalink / raw
  To: gentoo-commits

commit:     4b330dc703c321fd16cb69031891072a5ec667a4
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Tue Feb 18 09:59:20 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Mar 27 12:04:43 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4b330dc7

net-dns/dnsdist: add patch for net-libs/quiche >= 0.23.0

Closes: https://bugs.gentoo.org/949896
Signed-off-by: Holger Hoffstätte <holger <AT> applied-asynchrony.com>
Signed-off-by: Sam James <sam <AT> gentoo.org>

 net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild       | 117 ++++++++++++++++++++++++++
 net-dns/dnsdist/files/1.9.8-quiche-0.23.patch |  52 ++++++++++++
 2 files changed, 169 insertions(+)

diff --git a/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild b/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild
new file mode 100644
index 000000000000..01609de7f573
--- /dev/null
+++ b/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild
@@ -0,0 +1,117 @@
+# 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://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"
+
+PATCHES=( "${FILESDIR}/1.9.8-quiche-0.23.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."
+}

diff --git a/net-dns/dnsdist/files/1.9.8-quiche-0.23.patch b/net-dns/dnsdist/files/1.9.8-quiche-0.23.patch
new file mode 100644
index 000000000000..a99897a691a3
--- /dev/null
+++ b/net-dns/dnsdist/files/1.9.8-quiche-0.23.patch
@@ -0,0 +1,52 @@
+
+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])
++          ], [ : ])
++        ])
+       ])
+     ])
+   ])


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/
@ 2025-03-28 15:06 Sam James
  0 siblings, 0 replies; 4+ messages in thread
From: Sam James @ 2025-03-28 15:06 UTC (permalink / raw
  To: gentoo-commits

commit:     c9bcc34ea9b8c2a5d2b9c0e5261ec8de6b3c3edf
Author:     Holger Hoffstätte <holger <AT> applied-asynchrony <DOT> com>
AuthorDate: Fri Mar 28 11:52:56 2025 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Mar 28 15:04:05 2025 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c9bcc34e

net-dns/dnsdist: fix compatibility with boost::lockfree >=1.87.0

Revbump since the new patch changes the generated code.

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

 ...ist-1.9.8-r1.ebuild => dnsdist-1.9.8-r2.ebuild} |  5 +-
 ...9.8-fix-compat-with-boost-lockfree-1.87.0.patch | 90 ++++++++++++++++++++++
 2 files changed, 94 insertions(+), 1 deletion(-)

diff --git a/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild b/net-dns/dnsdist/dnsdist-1.9.8-r2.ebuild
similarity index 95%
rename from net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild
rename to net-dns/dnsdist/dnsdist-1.9.8-r2.ebuild
index b51d68a3dba2..bebf3ec0d2ed 100644
--- a/net-dns/dnsdist/dnsdist-1.9.8-r1.ebuild
+++ b/net-dns/dnsdist/dnsdist-1.9.8-r2.ebuild
@@ -49,7 +49,10 @@ RDEPEND="acct-group/dnsdist
 DEPEND="${RDEPEND}"
 BDEPEND="virtual/pkgconfig"
 
-PATCHES=( "${FILESDIR}/1.9.8-quiche-0.23.patch" )
+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

diff --git a/net-dns/dnsdist/files/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch b/net-dns/dnsdist/files/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch
new file mode 100644
index 000000000000..69b03b1047df
--- /dev/null
+++ b/net-dns/dnsdist/files/1.9.8-fix-compat-with-boost-lockfree-1.87.0.patch
@@ -0,0 +1,90 @@
+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;


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-03-28 15:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-14  7:48 [gentoo-commits] repo/gentoo:master commit in: net-dns/dnsdist/, net-dns/dnsdist/files/ Michał Górny
  -- strict thread matches above, loose matches on Subject: below --
2023-04-19  0:34 Arsen Arsenović
2025-03-27 12:05 Sam James
2025-03-28 15:06 Sam James

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox