diff --git a/net-dns/knot/Manifest b/net-dns/knot/Manifest index bc5e6515d20cb..1b45c0b06469f 100644 --- a/net-dns/knot/Manifest +++ b/net-dns/knot/Manifest @@ -1,3 +1,6 @@ +DIST knot-3.4.10-manpages.tar.xz 38344 BLAKE2B a80cbfdfc14d93e714425e65fe26f77ed64c1507930f0954a63fcf4e34d367ebc4cfc9c9ec5bae17efb3628271f0ee387d518f4f8bad89e5680d79b6e0b3eeab SHA512 19ff1b167471ab85370c4ce319df24716b9756bfafa520e43457e3dc1b5897e8da7bd0f64d066d5835e3e85bd34cc50af1e0d0dae8aa5d76d777f8ee66838f49 +DIST knot-3.4.10.tar.xz 1664412 BLAKE2B 6c1e2c9d66551002fd8534b40714790e8ce455c6e91f198bfd50a98ef2edbf0d6ace8aa3055e006ba0869ac8e62f06ec06523051d452dacd6d5e31e6b5d42721 SHA512 836fd79f0db00013450056d01490c560cd6b195438a1b07024db802354a85b638b81937f9f738c45055626e48d84db3069865ecb2509f87a3a3deca7c9e1eeb1 +DIST knot-3.4.10.tar.xz.asc 833 BLAKE2B c9faf63c4f679698d6175e99859107e9bb2de7936e8ddf70ed2aefa778864cc6463cd3f68366115a45a568dbfdba1fb2930f50dc053b7acdba33f316023e3aa9 SHA512 648a2b6827505d43f244b64e34899805029558a2b4e059259e925852aea0203d4c2299a98cf656b36e4474000ba43cf399c957742831251614e77be19b5a63ef DIST knot-3.4.9-manpages.tar.xz 38044 BLAKE2B 274e53e1eea937c653fba1df4c3de858428c1d791d547c815a4a23c20173cdca8dcb5b43f09c463a13d5dbaa7782c9cb7202cb779be1e7f75152be9bfaad3a06 SHA512 183739249acfc4152631eb2227497d5f366a557762268af2800f641c1562a7b7a9b4135bf20ae834168994215bc528962dd87752a86fd92cda3f0a4e00644cd2 DIST knot-3.4.9.tar.xz 1622872 BLAKE2B 8188c3230fda2991a59157ab3168a156b42943be092e097b9f415879cb33d1d93ac989b1148793ad8a6900889ab88c0e7f288b96f3b52531e8b5b9636cc57703 SHA512 295bf54a28c98019fdcc4eb4382b27083b4239993624fdaab505afe2d00ec35d5e6f480ad5987a33e95cd604c5fbdf05ac2552377c7e0c389bbb0de35c658045 DIST knot-3.4.9.tar.xz.asc 833 BLAKE2B e6104ac0c20f83f472f5b7fd9cb9c214f1708f4f451ef00022bf256774c43655314f0f749cc82797f11e2d048e598f2342b36e0b62fbe5b3c9cac9a7ef341c5e SHA512 6d5898c8c04b9e50453cc8787cae533988b069b1d2dbbbe3f99a970de090d0790460fd28b7c88e3b194e3341f915cb4cf299ad7b32adc79fdb84b3c0eecb1a62 diff --git a/net-dns/knot/knot-3.4.10.ebuild b/net-dns/knot/knot-3.4.10.ebuild new file mode 100644 index 0000000000000..121ac81ae2fcf --- /dev/null +++ b/net-dns/knot/knot-3.4.10.ebuild @@ -0,0 +1,235 @@ +# Copyright 1999-2026 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{11..14} ) +inherit autotools python-r1 systemd tmpfiles verify-sig + +# subslot: libknot major.libdnssec major.libzscanner major +KNOT_SUBSLOT="15.9.4" + +DESCRIPTION="High-performance authoritative-only DNS server" +HOMEPAGE="https://www.knot-dns.cz/ https://gitlab.nic.cz/knot/knot-dns" +SRC_URI=" + https://knot-dns.nic.cz/release/${P}.tar.xz + !doc? ( https://raw.githubusercontent.com/PPN-SD/gentoo-manpages/refs/tags/${P}/${P}-manpages.tar.xz ) + verify-sig? ( https://knot-dns.nic.cz/release/${P}.tar.xz.asc ) +" +LICENSE="GPL-3+" +SLOT="0/${KNOT_SUBSLOT}" +KEYWORDS="~amd64 ~arm64 ~riscv ~x86" + +# Modules without dep. Built unconditionally. +KNOT_MODULES=( + "authsignal" + "cookies" + "dnsproxy" + "noudp" + "onlinesign" + "queryacl" + "rrl" + "stats" + "synthrecord" + "whoami" +) + +KNOT_MODULES_OPT=( + "dnstap" + "geoip" +) + +IUSE="caps +daemon dbus doc doh +fastparser +idn pkcs11 prometheus python quic selinux systemd test +utils xdp ${KNOT_MODULES_OPT[@]}" +RESTRICT="!test? ( test )" +REQUIRED_USE=" + prometheus? ( python ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +COMMON_DEPEND=" + dev-libs/libedit + dnstap? ( + dev-libs/fstrm + dev-libs/protobuf-c:= + ) +" +RDEPEND=" + dev-db/lmdb:= + net-libs/gnutls:=[pkcs11?] + daemon? ( + ${COMMON_DEPEND} + acct-group/knot + acct-user/knot + dev-libs/userspace-rcu:= + caps? ( sys-libs/libcap-ng ) + dbus? ( sys-apps/dbus ) + geoip? ( dev-libs/libmaxminddb:= ) + systemd? ( sys-apps/systemd:= ) + ) + prometheus? ( + dev-python/prometheus-client[${PYTHON_USEDEP}] + dev-python/psutil[${PYTHON_USEDEP}] + ) + python? ( ${PYTHON_DEPS} ) + quic? ( net-libs/ngtcp2[gnutls] ) + selinux? ( sec-policy/selinux-knot ) + utils? ( + ${COMMON_DEPEND} + doh? ( net-libs/nghttp2:= ) + idn? ( net-dns/libidn2:= ) + ) + xdp? ( + >=dev-libs/libbpf-1.0:= + net-libs/xdp-tools + utils? ( net-libs/libmnl:= ) + ) +" +DEPEND="${RDEPEND}" +BDEPEND=" + virtual/pkgconfig + doc? ( + $(python_gen_any_dep ' + dev-python/sphinx[${PYTHON_USEDEP}] + dev-python/sphinx-panels[${PYTHON_USEDEP}] + ') + ) + dnstap? ( + dev-libs/protobuf[protoc(+)] + dev-libs/protobuf-c + ) + python? ( ${PYTHON_DEPS} ) + test? ( + pkcs11? ( dev-libs/softhsm ) + ) + verify-sig? ( sec-keys/openpgp-keys-knot ) +" + +PATCHES=( + # PR 1830 merged + "${FILESDIR}"/${PN}-3.5.2-fix_automagic_pkcs11.patch +) + +VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/${PN}.asc + +# Used to check cpuset_t in sched.h with NetBSD. +# False positive because linux have sched.h too but with cpu_set_t +QA_CONFIG_IMPL_DECL_SKIP=( cpuset_create cpuset_destroy ) + +python_check_deps() { + use doc || return 0 + python_has_version "dev-python/sphinx[${PYTHON_USEDEP}]" \ + "dev-python/sphinx-panels[${PYTHON_USEDEP}]" +} + +pkg_setup() { + if use doc || use python; then + python_setup + fi +} + +src_unpack() { + if use verify-sig; then + verify-sig_verify_detached "${DISTDIR}"/${P}.tar.xz{,.asc} + fi + default +} + +src_prepare() { + default + # avoid the old ltmain.sh modified by upstream which causes a linking issue + # reproduced with test and musl + eautoreconf +} + +src_configure() { + local u + local my_conf=( + --with-storage="${EPREFIX}/var/lib/${PN}" + --with-rundir="${EPREFIX}/var/run/${PN}" + $(use_enable caps cap_ng) + $(use_enable daemon) + # enable-dnstap defines support for kdig only + $(use_enable dnstap dnstap $(usex utils)) + $(use_enable doc documentation) + $(use_with doh libnghttp2) + $(use_enable fastparser) + $(use_enable geoip maxminddb) + $(use_with idn libidn) + $(use_enable pkcs11) + $(use_enable quic) + $(use_enable systemd) + $(use_enable utils utilities) + $(use_enable xdp) + ) + # modules are only used by daemon + # module-dnstap defines support for knotd only + if use daemon; then + for u in "${KNOT_MODULES[@]}"; do + my_conf+=( --with-module-${u} ) + done + for u in "${KNOT_MODULES_OPT[@]#+}"; do + my_conf+=( $(use_with ${u} module-${u}) ) + done + else + my_conf+=( --disable-modules ) + fi + + if use !daemon; then + my_conf+=( --enable-dbus=no ) + elif use dbus; then + my_conf+=( --enable-dbus=libdbus ) + elif use systemd; then + my_conf+=( --enable-dbus=systemd ) + else + my_conf+=( --enable-dbus=no ) + fi + + econf "${my_conf[@]}" +} + +src_compile() { + default + + use doc && emake -C doc html +} + +src_install() { + if use doc; then + local HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} ) + else + doman "${WORKDIR}"/man/* + fi + + if use python; then + python_foreach_impl python_domodule python/libknot/libknot + newdoc python/libknot/README.md README.python.md + fi + + if use prometheus; then + python_foreach_impl python_domodule python/knot_exporter/knot_exporter + python_scriptinto /usr/sbin + python_foreach_impl python_newscript python/knot_exporter/knot_exporter/knot_exporter.py knot-exporter + newdoc python/knot_exporter/README.md README.knot_exporter.md + fi + + default + + if use daemon; then + rm -r "${ED}"/var/run/ || die + + newinitd "${FILESDIR}"/knot-3.init knot + newconfd "${FILESDIR}"/knot.confd knot + + newtmpfiles "${FILESDIR}"/${PN}.tmpfile ${PN}.conf + + use systemd && systemd_newunit distro/common/knot.service knot.service + fi + + find "${D}" -name '*.la' -delete || die + + keepdir /var/lib/knot +} + +pkg_postinst() { + use daemon && tmpfiles_process ${PN}.conf +}