From 3a62b7a576b34cd468e35861e94b9b779b38ac48 Mon Sep 17 00:00:00 2001 From: PPN-SD Date: Wed, 16 Oct 2024 21:42:14 +0200 Subject: net-dns/knot-resolver: add 5.7.4 useflag systemd reworked useflag xdp added Signed-off-by: PPN-SD Signed-off-by: Florian Schmaus --- net-dns/knot-resolver/Manifest | 2 + .../files/knot-resolver-5.7.4-libsystemd.patch | 25 ++++++ net-dns/knot-resolver/knot-resolver-5.7.4.ebuild | 92 ++++++++++++++++++++++ net-dns/knot-resolver/metadata.xml | 3 + 4 files changed, 122 insertions(+) create mode 100644 net-dns/knot-resolver/files/knot-resolver-5.7.4-libsystemd.patch create mode 100644 net-dns/knot-resolver/knot-resolver-5.7.4.ebuild (limited to 'net-dns') diff --git a/net-dns/knot-resolver/Manifest b/net-dns/knot-resolver/Manifest index 1cc82c44b65a..a237914c0214 100644 --- a/net-dns/knot-resolver/Manifest +++ b/net-dns/knot-resolver/Manifest @@ -1,2 +1,4 @@ DIST knot-resolver-5.7.2.tar.xz 1928336 BLAKE2B c4f17a050752a5d1ed141bae646f53f313e866b91b80bb72d37c6b2907d365333ca02fbadf4ff49e5559b721b695d1e7af3417a25e0518dbdfdec1860f890408 SHA512 973e9a541b54cee0d230247d279785a83ce2127216b12ee9f314a49adedac3e23e8369900d6f0985b0a666e9bcae7772f29224565e6208ed4988b13530e4ff0b DIST knot-resolver-5.7.2.tar.xz.asc 833 BLAKE2B f73f52d7b2326a58a37b821cd8495d20c93017bd1f7bad2cc828f807f1886fc376dc95405b3b36047719f8566e27d7c1052b7ab11fae3d1d67c5563a293d965e SHA512 cf05ceca455400004cf249b1029b93619a1d5fcf839bca1259a7b411a1ddef1da0aff187ea0023c587de1981e91a8d26af3bb22341cf426e5055e8ca1c4024e2 +DIST knot-resolver-5.7.4.tar.xz 1931124 BLAKE2B 670bd0bac1417fde0f7b6a02797e49e22af081e55b63c23e1fcd8dee369f21b7a2a8997fe641f69e7f0de5cbc7960307f32c939eb85c260fb2de015542dfce1e SHA512 5d8ea5b5b0cba5a1058aaa6e04573c838895d6b2c204e8d09c9ad898fb074c52ef7589afdad164b007edf151167d31fd0f940466edfeec597f96e5bc1cd72171 +DIST knot-resolver-5.7.4.tar.xz.asc 833 BLAKE2B 6432bc23ff779998eb351d57db34bcd9e41ea928fa5d83463122012d8adad16edec7afbcbfb0f0b41789c7797c895216b793ced2d6a01d69fdc3b0f2d12879cb SHA512 d34a0e1fd8be372c325199ace5bb6f20b2b395a4fb5a6f6f4c2c89f29741ecfd36234900b0e836c174df831716012589231551b13426a6728e37aba6c74c197f diff --git a/net-dns/knot-resolver/files/knot-resolver-5.7.4-libsystemd.patch b/net-dns/knot-resolver/files/knot-resolver-5.7.4-libsystemd.patch new file mode 100644 index 000000000000..faa9d33cd464 --- /dev/null +++ b/net-dns/knot-resolver/files/knot-resolver-5.7.4-libsystemd.patch @@ -0,0 +1,25 @@ +--- a/meson_options.txt ++++ b/meson_options.txt +@@ -229,3 +229,10 @@ + value: 'auto', + description: 'add rpath to the knot resolver executables', + ) ++ ++option( ++ 'systemd', ++ type: 'feature', ++ value: 'auto', ++ description: 'systemd watchdog support', ++) + +--- a/meson.build ++++ b/meson.build +@@ -126,7 +126,7 @@ + + ### Systemd + systemd_files = get_option('systemd_files') +-libsystemd = dependency('libsystemd', required: systemd_files == 'enabled') ++libsystemd = dependency('libsystemd', required: get_option('systemd')) + + ### Allocator + # use empty name to disable the dependency, but still compile the dependent kresd diff --git a/net-dns/knot-resolver/knot-resolver-5.7.4.ebuild b/net-dns/knot-resolver/knot-resolver-5.7.4.ebuild new file mode 100644 index 000000000000..6a8533cca0cc --- /dev/null +++ b/net-dns/knot-resolver/knot-resolver-5.7.4.ebuild @@ -0,0 +1,92 @@ +# Copyright 2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +LUA_COMPAT=( luajit ) + +inherit lua-single meson tmpfiles verify-sig + +DESCRIPTION="A scaleable caching DNS resolver" +HOMEPAGE="https://www.knot-resolver.cz https://gitlab.nic.cz/knot/knot-resolver" +SRC_URI=" + https://knot-resolver.nic.cz/release/${P}.tar.xz + verify-sig? ( https://knot-resolver.nic.cz/release/${P}.tar.xz.asc ) +" + +LICENSE="Apache-2.0 BSD CC0-1.0 GPL-3+ LGPL-2.1+ MIT" +SLOT="0" +KEYWORDS="~amd64" + +IUSE="caps dnstap jemalloc kresc nghttp2 systemd test xdp" +RESTRICT="!test? ( test )" +REQUIRED_USE="${LUA_REQUIRED_USE}" + +RDEPEND=" + ${LUA_DEPS} + acct-group/knot-resolver + acct-user/knot-resolver + dev-db/lmdb:= + net-dns/knot:= + dev-libs/libuv:= + net-libs/gnutls:= + caps? ( sys-libs/libcap-ng ) + dnstap? ( + dev-libs/fstrm + dev-libs/protobuf-c:= + ) + jemalloc? ( dev-libs/jemalloc:= ) + kresc? ( dev-libs/libedit ) + nghttp2? ( net-libs/nghttp2:= ) + systemd? ( sys-apps/systemd:= ) + xdp? ( net-dns/knot:=[xdp] ) +" +DEPEND=" + ${RDEPEND} + test? ( dev-util/cmocka ) +" +BDEPEND=" + virtual/pkgconfig + verify-sig? ( >=sec-keys/openpgp-keys-knot-resolver-20240304 ) +" + +PATCHES=( + "${FILESDIR}"/${PN}-5.5.3-docdir.patch + "${FILESDIR}"/${PN}-5.5.3-nghttp-openssl.patch + "${FILESDIR}"/${PN}-5.7.4-libsystemd.patch +) + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/${PN}.gpg + +src_configure() { + local emesonargs=( + --localstatedir "${EPREFIX}"/var # double lib + # https://bugs.gentoo.org/870019 + -Dauto_features=disabled + -Ddoc=disabled + -Ddocdir="${EPREFIX}"/usr/share/doc/${PF} + -Dopenssl=disabled + -Dmalloc=$(usex jemalloc jemalloc disabled) + -Dsystemd_files=enabled + $(meson_feature caps capng) + $(meson_feature dnstap) + $(meson_feature kresc client) + $(meson_feature nghttp2) + $(meson_feature systemd) + $(meson_feature test unit_tests) + ) + + meson_src_configure +} + +src_install() { + meson_src_install + fowners -R ${PN}: /etc/${PN} + + newinitd "${FILESDIR}"/kresd.initd-r1 kresd + newconfd "${FILESDIR}"/kresd.confd-r1 kresd +} + +pkg_postinst() { + tmpfiles_process knot-resolver.conf +} diff --git a/net-dns/knot-resolver/metadata.xml b/net-dns/knot-resolver/metadata.xml index a535381c62c3..c6e3e25b513e 100644 --- a/net-dns/knot-resolver/metadata.xml +++ b/net-dns/knot-resolver/metadata.xml @@ -12,5 +12,8 @@ DNS-over-HTTPS support + + Enable eXpress Data Path + -- cgit v1.2.3-65-gdbad