summaryrefslogtreecommitdiff
path: root/net-dns
diff options
context:
space:
mode:
Diffstat (limited to 'net-dns')
-rw-r--r--net-dns/Manifest.gzbin7870 -> 7872 bytes
-rw-r--r--net-dns/knot-resolver/Manifest9
-rw-r--r--net-dns/knot-resolver/files/knot-resolver-6.0.11-abs_path_socket.patch385
-rw-r--r--net-dns/knot-resolver/knot-resolver-6.0.11.ebuild (renamed from net-dns/knot-resolver/knot-resolver-6.0.9.ebuild)34
-rw-r--r--net-dns/knot-resolver/metadata.xml3
-rw-r--r--net-dns/knot/Manifest8
-rw-r--r--net-dns/knot/files/knot-1.service17
-rw-r--r--net-dns/knot/files/knot.init41
-rw-r--r--net-dns/knot/knot-3.2.9-r1.ebuild126
-rw-r--r--net-dns/knot/knot-3.4.3-r2.ebuild204
-rw-r--r--net-dns/knot/metadata.xml7
11 files changed, 413 insertions, 421 deletions
diff --git a/net-dns/Manifest.gz b/net-dns/Manifest.gz
index 0831a9397e71..5f2a7db2fa26 100644
--- a/net-dns/Manifest.gz
+++ b/net-dns/Manifest.gz
Binary files differ
diff --git a/net-dns/knot-resolver/Manifest b/net-dns/knot-resolver/Manifest
index c3b8fbe9d31e..e409949c589b 100644
--- a/net-dns/knot-resolver/Manifest
+++ b/net-dns/knot-resolver/Manifest
@@ -1,6 +1,7 @@
AUX knot-resolver-5.5.3-docdir.patch 925 BLAKE2B 9d40a287fe0a6d883d46dbe13fa3ba5f19f73b61fbd8c8eb6ec4061744b8c4b8eeb04533b18cede2051aaa5ddacca96b21432c0dac00f8be9087cb8e5d5fed0d SHA512 18259bc66b1b3ff20ee34a01373017267e1cf76a458c938673e925d972ded8bdc863bb961fd93983e45080d7b0b88ab30c513153e6b2b4323a3d95f6724baff5
AUX knot-resolver-5.5.3-nghttp-openssl.patch 1087 BLAKE2B 4570658d9d358384c435c0b4694995945f9c788249899670e000d3273ae6c2631ff69319660db2d04f4143e24746bc0160295042a7887d30dae09de11556ce8e SHA512 50e8a99aef8bc4ce41ddb4d1760cd96818859b440aa74effdc1482af150c21f4fc3e451fae739a07161fc5a2e0ee2cd093c26950dd4e16de430e6bb8a635dd84
AUX knot-resolver-5.7.4-libsystemd.patch 627 BLAKE2B c59e1ff9e99d11031227725625471a2229fc4143a5e0fdd2946aa35c025322981ad67b0717524cd7bbc0f13ea891906d3f7b74733c4bed534ad9a4ed41b59176 SHA512 2cfa807f2b72664ca6bc4ac7e41701bfe6fdab08b2f44fbd0eadb5aa165b726cb540eeef1480cc095e3b984f15205924984c3039cdc4d6cf1e0068f7524e9f99
+AUX knot-resolver-6.0.11-abs_path_socket.patch 14998 BLAKE2B 83cab45c77fb86fc55c648271ff5d853fa8c96cd5a7ba4a082f32475948863a13f78c3269f42652bcaa6e5c5d3924f92b0f73f1eb5bb75161e7448fef9181fe2 SHA512 e3cbb06a17cdf4aa8a0973116f4f52ca49114c56954648ca5cc59ba46372edba7533f554b2e6737fd43b029824b06951755cf18fb924a57b1d13df4edfeec127
AUX knot-resolver-6.0.9-config-example.patch 992 BLAKE2B 35d2d4705ee916ffba56a4019bf07fddf64b4ec52fe599338a008acf94c6ec418ee8c6ff2b40706eaffe050b52f322cac5bac27956b639e28b53accabfc24869 SHA512 64d70abeb89210d26fa5d0fa56d8ab9a6294b5955704ccd333f83d94d7aa5e312c3342b9d370697c8eb74590e6c38422d23640a1d3806a33e9817ae56a283ec9
AUX knot-resolver-6.0.9-libsystemd.patch 799 BLAKE2B 21c94660986683ed2515320c1e9d75fd62d98947c1accbacc3694431a9baf1d35a72c4f487e3938101e104368b5aefab91162f5909501241eefff3b6d7da8d8b SHA512 71fe41053eb4cfa22a7440da49f4f314acba5b688ef938dd4602b00eb12e0f88fdb4d45a6d8fbf816c4ea1f5363b9973c0d3d7f60286b63a7dfa071b7f016046
AUX knot-resolver-6.0.9-pytest_tomli.patch 929 BLAKE2B 1a0349c2bfbe945411c2220e50be2c93fb917d3c81c8f506576ce7457595da932ab1a717b812656b76b1abc928bd0276327cd37d524a402410016d092d5f71dc SHA512 643e208b9c12156b8a5173afe2d46e489c9f9eb396847c825a484594f3fe3fe7395bd15083a0940e3de36a0b5e6a866364e8dc32297f0e9a4fafde5088ade002
@@ -14,9 +15,9 @@ DIST knot-resolver-5.7.4.tar.xz 1931124 BLAKE2B 670bd0bac1417fde0f7b6a02797e49e2
DIST knot-resolver-5.7.4.tar.xz.asc 833 BLAKE2B 6432bc23ff779998eb351d57db34bcd9e41ea928fa5d83463122012d8adad16edec7afbcbfb0f0b41789c7797c895216b793ced2d6a01d69fdc3b0f2d12879cb SHA512 d34a0e1fd8be372c325199ace5bb6f20b2b395a4fb5a6f6f4c2c89f29741ecfd36234900b0e836c174df831716012589231551b13426a6728e37aba6c74c197f
DIST knot-resolver-6.0.10.tar.xz 2138660 BLAKE2B 9a80e76272b4cb7a30b75b832627529dfbdec7114ef25a576c9a590221e21ef17efef23ec328783f2b687e8f2e0d0cee5b54048a37a0d08a35004ba3e510e14c SHA512 63d5c7a45ca52f02616ac6374625ccddd631cd71a5b6ebc99498e0c28f581eefef1dd5bbb0d8676f1ec53c2023f2b28cebc432e981c51b6166b4b3b1d8443704
DIST knot-resolver-6.0.10.tar.xz.asc 833 BLAKE2B 5bd7baba40d6577764b3f0d985a2ee7edaff99ce7fc1cd89f42488504c657f1be2a5bf7267eaed225281be6f8154fb21c92ab7ee1d34b844b3001b7ad391d5b6 SHA512 26b8faffe10529559ec9081a567d6c740a9c61f81edf766ea1c32b01129edf9a4049a2844df0c27cb0fd5008e299d6431b099b0a09ac5624f24155d8b1a3b53f
-DIST knot-resolver-6.0.9.tar.xz 2127432 BLAKE2B 185a78737f6830b4ff036a537f2ceb032388e50ef050c239f0ce21d84a1fa2d1632aa95802a73d4ff80bcb18cef23f444a10b594121cd449cee3c12182dcab2e SHA512 98b3074927d9cb484738592a6cad84b818130aafd91473ee6e17458884c3ff5cb528e22d020d8b8b92b429feb2e3432e9cb77574f505bdf2e5f6f286009ecd59
-DIST knot-resolver-6.0.9.tar.xz.asc 833 BLAKE2B 10c9c895bd3a728b8a9d3769cb72ccc5dbf5c17164df388d1519c5e4734e21ee568c079191ada6ff76f1a150be911d79c5d1ebb02597c32d1aa5003a5ceaf02d SHA512 b46a9346deda328fbe6638657e2d87903052ac36b11ff5d4f68bd145487687c1c2f43a7b62e40585f5853816b7ed66b1af3b98642e882f72e36cf521f5eb1bce
+DIST knot-resolver-6.0.11.tar.xz 2139448 BLAKE2B 0d96790ce3ecb85d9466d90683de77d46f75d360f032ae94d18a7b493eedb58c86f6274a5de2eaed4eca792b3ef6ff673120c3a7526e9167d404b8dd0ccd20f3 SHA512 7a3dd8e925a8ba44c66d00175fd689b4daddacde8ffb96712c3770dbaf1c54a2cb90dda340fe674dc11e1222fdd3e4112aa3df72270f422b4c8d2c60f9af9cea
+DIST knot-resolver-6.0.11.tar.xz.asc 833 BLAKE2B 3e959798699c1dc0698cdb6e0c8509ba8a3287eab485511b18e01cc80e906149095ca9a537b3b4c45969c338022b61afd6377f106506b59f969fdf44d5e729be SHA512 cf6b034a9ad0daf118c18179dea1c32c9de604581735d89127c9c0fe80122a6159b49ec6176bee0955114d12f8ad20e29958a841c9b6464551e3def69d2e3932
EBUILD knot-resolver-5.7.4-r1.ebuild 2106 BLAKE2B c55d805cc0b34c3d7e6e5144233dd125db2d354c012c8ddb43fd5cd8baddf52b0cf1a67426ef4988cf47a80b79ffde3ee87daf90ac62428158944588b930f23d SHA512 04d439202f6739424a2c28b5379e86cd17aaa6f3841e26a8045ee44a49ccf53a2aad72561decf1cb661bfa0325e96f72dfa85750b4d9128ce2af2c01cf0a880a
EBUILD knot-resolver-6.0.10.ebuild 4913 BLAKE2B c87dee12d38e03c544e83492056e6c371d54b42c80a9de0fb9f595b00c9524910cf20c22a6c6834fdb5adf40fe023bb1c8a1d1436bdccd8fa3a41ebb4a43e70c SHA512 79bb22cc2fe91f5e013d3c17696db3715c580c44fde929e22d66bed2e5db1129499bf5421795e0588204bec2ab6f1f521f1ba7c9a980605105adb68839f68c2c
-EBUILD knot-resolver-6.0.9.ebuild 4507 BLAKE2B a7b80173423dfae9a72b513500a8dfcc8947bf494532906aac1ce5fbb6d0062c11f92fcfcfaeb527986ff5f0d3d49999f615345f103cb410c25be25f6a18f28e SHA512 a1bfb7fe71bb32687853bb1252d0c37b53afeefa2a9145a87d0348ed99f23bfd4313a3201c38f1c1131c1f334d89ab6e77c076be167e56fe7dc27be0cc0f2fa8
-MISC metadata.xml 903 BLAKE2B 133ef2134ad5cb5a8dd624a9d9cc293665bafae61a5a6b358c73c5304d19f64a567d869bac077641e2218325e8e9cc2908c570c3c493844d2233cb9b32117a46 SHA512 84c77fa859e93a0754e6e5acd3dcc33cc728b08adf3bcdc166cc3e55e5795e3a80e5c247b8c0ce6c9b8e2e2c0f62828777804f5efb03e251fbc0d2dc836eadd7
+EBUILD knot-resolver-6.0.11.ebuild 5003 BLAKE2B dc10ccf7888e52396f947aabfe45ad424fdfa4b7603633abb92e2cd99b3ce49995915ca0e4efdeb41e3308658a81d168913ba8f9364bf7bc70c1d31ed520a3d1 SHA512 e7f5bfc5fd4d535a11a84a00e96399b02cc30af5218bb6ffa19015afad07318570877403f462a6db75030780a5ecf025ac0a9d9d30b2f06bf45f27a5b2019393
+MISC metadata.xml 832 BLAKE2B 006e679fa64a03348302e0a0f1bdc565f2c0bebe8add8a37c7397a1c4ae058fc536917713511c7c3e541349c964a011b46182a23afe9c8f69e8f82b5ea492ea1 SHA512 57206528c668b603a1d343dffee54c077bda1ef9aacfd0a6073ab2024b417d75c85ff7abf66cd493d58eb9dbd32cbc02be2ca4aa0025716df34cb56468ab2fee
diff --git a/net-dns/knot-resolver/files/knot-resolver-6.0.11-abs_path_socket.patch b/net-dns/knot-resolver/files/knot-resolver-6.0.11-abs_path_socket.patch
new file mode 100644
index 000000000000..dea7a243bb44
--- /dev/null
+++ b/net-dns/knot-resolver/files/knot-resolver-6.0.11-abs_path_socket.patch
@@ -0,0 +1,385 @@
+https://gitlab.nic.cz/knot/knot-resolver/-/merge_requests/1664.patch
+From a009365df3f0429edfd181d0109372aca1892298 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ale=C5=A1=20Mr=C3=A1zek?= <ales.mrazek@nic.cz>
+Date: Fri, 28 Feb 2025 10:07:08 +0100
+Subject: [PATCH 1/5] Revert "python: constants: added API_SOCKET_NAME"
+
+This reverts commit cee2250c5a52a4d67ea2a37cc97761ba530f856b.
+---
+ python/knot_resolver/constants.py | 9 +++------
+ python/knot_resolver/constants.py.in | 9 +++------
+ 2 files changed, 6 insertions(+), 12 deletions(-)
+
+diff --git a/python/knot_resolver/constants.py b/python/knot_resolver/constants.py
+index 525e8629c..d65c24acb 100644
+--- a/python/knot_resolver/constants.py
++++ b/python/knot_resolver/constants.py
+@@ -5,18 +5,15 @@ VERSION = "6.0.11"
+ USER = "knot-resolver"
+ GROUP = "knot-resolver"
+
+-# default files names
+-API_SOCK_NAME = "kres-api.sock"
+-
+-# default dirs paths
++# dirs paths
+ RUN_DIR = Path("/run/knot-resolver")
+ ETC_DIR = Path("/etc/knot-resolver")
+ SBIN_DIR = Path("/usr/sbin")
+ CACHE_DIR = Path("/var/cache/knot-resolver")
+
+-# default files paths
++# files paths
+ CONFIG_FILE = ETC_DIR / "config.yaml"
+-API_SOCK_FILE = RUN_DIR / API_SOCK_NAME
++API_SOCK_FILE = RUN_DIR / "kres-api.sock"
+
+ # executables paths
+ KRESD_EXECUTABLE = SBIN_DIR / "kresd"
+diff --git a/python/knot_resolver/constants.py.in b/python/knot_resolver/constants.py.in
+index 8c2974a58..35c25ac64 100644
+--- a/python/knot_resolver/constants.py.in
++++ b/python/knot_resolver/constants.py.in
+@@ -5,18 +5,15 @@ VERSION = "@version@"
+ USER = "@user@"
+ GROUP = "@group@"
+
+-# default files names
+-API_SOCK_NAME = "kres-api.sock"
+-
+-# default dirs paths
++# dirs paths
+ RUN_DIR = Path("@run_dir@")
+ ETC_DIR = Path("@etc_dir@")
+ SBIN_DIR = Path("@sbin_dir@")
+ CACHE_DIR = Path("@cache_dir@")
+
+-# default files paths
++# files paths
+ CONFIG_FILE = ETC_DIR / "config.yaml"
+-API_SOCK_FILE = RUN_DIR / API_SOCK_NAME
++API_SOCK_FILE = RUN_DIR / "kres-api.sock"
+
+ # executables paths
+ KRESD_EXECUTABLE = SBIN_DIR / "kresd"
+--
+GitLab
+
+
+From 2b312097f4ed0c0240b70fb365ac5d1f515812bc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ale=C5=A1=20Mr=C3=A1zek?= <ales.mrazek@nic.cz>
+Date: Fri, 28 Feb 2025 10:07:35 +0100
+Subject: [PATCH 2/5] Revert "datamodel: management socket default based on
+ rundir"
+
+This reverts commit 10fb87547af05cd78e76dfb94951c34f4554d090.
+---
+ doc/_static/config.schema.json | 4 +--
+ python/knot_resolver/client/command.py | 35 +++++--------------
+ .../knot_resolver/datamodel/config_schema.py | 17 +++------
+ tests/manager/datamodel/test_config_schema.py | 23 ------------
+ 4 files changed, 15 insertions(+), 64 deletions(-)
+
+diff --git a/doc/_static/config.schema.json b/doc/_static/config.schema.json
+index a429b15dd..0bedbbc4e 100644
+--- a/doc/_static/config.schema.json
++++ b/doc/_static/config.schema.json
+@@ -54,7 +54,7 @@
+ "default": 256
+ },
+ "management": {
+- "description": "Configuration of management HTTP API. By default, unix-socket is located in 'rundir'.",
++ "description": "Configuration of management HTTP API.",
+ "type": "object",
+ "properties": {
+ "unix-socket": {
+@@ -75,7 +75,7 @@
+ }
+ },
+ "default": {
+- "unix_socket": "kres-api.sock",
++ "unix_socket": "/run/knot-resolver/kres-api.sock",
+ "interface": null
+ }
+ },
+diff --git a/python/knot_resolver/client/command.py b/python/knot_resolver/client/command.py
+index 464eb16e6..3966f8ca9 100644
+--- a/python/knot_resolver/client/command.py
++++ b/python/knot_resolver/client/command.py
+@@ -4,7 +4,7 @@ from pathlib import Path
+ from typing import Dict, List, Optional, Set, Tuple, Type, TypeVar
+ from urllib.parse import quote
+
+-from knot_resolver.constants import API_SOCK_FILE, API_SOCK_NAME, CONFIG_FILE, RUN_DIR
++from knot_resolver.constants import API_SOCK_FILE, CONFIG_FILE
+ from knot_resolver.datamodel.types import IPAddressPort
+ from knot_resolver.utils.modeling import parsing
+ from knot_resolver.utils.modeling.exceptions import DataValidationError
+@@ -154,38 +154,21 @@ def get_socket_from_config(config: Path, optional_file: bool) -> Optional[Socket
+ try:
+ with open(config, "r", encoding="utf8") as f:
+ data = parsing.try_to_parse(f.read())
+-
+- rkey = "rundir"
+- rundir = Path(data[rkey]) if rkey in data else RUN_DIR
+-
+ mkey = "management"
+ if mkey in data:
+ management = data[mkey]
+-
+- ikey = "interface"
+- if ikey in data[mkey]:
+- ip = IPAddressPort(data[mkey][ikey], object_path=f"/{mkey}/{ikey}")
++ if "unix-socket" in management:
+ return SocketDesc(
+- f"http://{ip.addr}:{ip.port}",
+- f'Key "/management/interface" in "{config}" file',
++ f'http+unix://{quote(management["unix-socket"], safe="")}/',
++ f'Key "/management/unix-socket" in "{config}" file',
+ )
+-
+- skey = "unix-socket"
+- if skey in management:
+- socket = Path(management[skey])
+- if not socket.is_absolute():
+- socket = rundir / socket
++ if "interface" in management:
++ ip = IPAddressPort(management["interface"], object_path=f"/{mkey}/interface")
+ return SocketDesc(
+- f'http+unix://{quote(str(socket), safe="")}/',
+- f'Key "/management/unix-socket" in "{config}" file',
++ f"http://{ip.addr}:{ip.port}",
++ f'Key "/management/interface" in "{config}" file',
+ )
+-
+- socket = rundir / API_SOCK_NAME
+- return SocketDesc(
+- f'http+unix://{quote(str(socket), safe="")}/',
+- f'Key "/rundir" in "{config}" file',
+- )
+-
++ return None
+ except ValueError as e:
+ raise DataValidationError(*e.args) from e # pylint: disable=no-value-for-parameter
+ except OSError as e:
+diff --git a/python/knot_resolver/datamodel/config_schema.py b/python/knot_resolver/datamodel/config_schema.py
+index f8733cb11..410e94d7c 100644
+--- a/python/knot_resolver/datamodel/config_schema.py
++++ b/python/knot_resolver/datamodel/config_schema.py
+@@ -1,10 +1,9 @@
+ import logging
+ import os
+ import socket
+-from pathlib import Path
+ from typing import Any, Dict, List, Literal, Optional, Tuple, Union
+
+-from knot_resolver.constants import API_SOCK_NAME, RUN_DIR, VERSION
++from knot_resolver.constants import API_SOCK_FILE, RUN_DIR, VERSION
+ from knot_resolver.datamodel.cache_schema import CacheSchema
+ from knot_resolver.datamodel.defer_schema import DeferSchema
+ from knot_resolver.datamodel.dns64_schema import Dns64Schema
+@@ -96,7 +95,7 @@ class KresConfig(ConfigSchema):
+ rundir: Directory where the resolver can create files and which will be it's cwd.
+ workers: The number of running kresd (Knot Resolver daemon) workers. If set to 'auto', it is equal to number of CPUs available.
+ max_workers: The maximum number of workers allowed. Cannot be changed in runtime.
+- management: Configuration of management HTTP API. By default, unix-socket is located in 'rundir'.
++ management: Configuration of management HTTP API.
+ webmgmt: Configuration of legacy web management endpoint.
+ options: Fine-tuning global parameters of DNS resolver operation.
+ network: Network connections and protocols configuration.
+@@ -119,7 +118,7 @@ class KresConfig(ConfigSchema):
+ rundir: WritableDir = lazy_default(WritableDir, str(RUN_DIR))
+ workers: Union[Literal["auto"], IntPositive] = IntPositive(1)
+ max_workers: IntPositive = IntPositive(WORKERS_MAX)
+- management: ManagementSchema = lazy_default(ManagementSchema, {"unix-socket": str(API_SOCK_NAME)})
++ management: ManagementSchema = lazy_default(ManagementSchema, {"unix-socket": str(API_SOCK_FILE)})
+ webmgmt: Optional[WebmgmtSchema] = None
+ options: OptionsSchema = OptionsSchema()
+ network: NetworkSchema = NetworkSchema()
+@@ -174,14 +173,6 @@ class KresConfig(ConfigSchema):
+ )
+ return obj.workers
+
+- def _management(self, obj: Raw) -> Any:
+- if obj.management.unix_socket:
+- soc = Path(obj.management.unix_socket.serialize())
+- if soc.is_absolute():
+- return obj.management
+- return ManagementSchema({"unix-socket": str(obj.rundir.to_path() / soc)})
+- return obj.management
+-
+ def _dnssec(self, obj: Raw) -> Any:
+ if obj.dnssec is True:
+ return DnssecSchema()
+@@ -268,7 +259,7 @@ def kres_config_json_schema() -> Dict[str, Any]:
+ """
+
+ context = get_global_validation_context()
+- set_global_validation_context(Context(RUN_DIR, False))
++ set_global_validation_context(Context(None, False))
+
+ schema = KresConfig.json_schema(
+ schema_id=f"https://www.knot-resolver.cz/documentation/v{VERSION}/_static/config.schema.json",
+diff --git a/tests/manager/datamodel/test_config_schema.py b/tests/manager/datamodel/test_config_schema.py
+index 437cade8d..9ec2b31b2 100644
+--- a/tests/manager/datamodel/test_config_schema.py
++++ b/tests/manager/datamodel/test_config_schema.py
+@@ -1,9 +1,7 @@
+ import inspect
+ import json
+-import os
+ from typing import Any, Dict, Type, cast
+
+-from knot_resolver.constants import API_SOCK_FILE, API_SOCK_NAME, RUN_DIR
+ from knot_resolver.datamodel import KresConfig
+ from knot_resolver.datamodel.lua_schema import LuaSchema
+ from knot_resolver.utils.modeling import BaseSchema
+@@ -51,31 +49,10 @@ def test_config_check_str_type():
+ def test_config_defaults():
+ config = KresConfig()
+
+- # Management API default
+- assert config.management.unix_socket.to_path() == API_SOCK_FILE
+-
+ # DNS64 default
+ assert config.dns64 == False
+
+
+-def test_management_unix_socket():
+- cwd = os.getcwd()
+- config = KresConfig({"rundir": cwd})
+- assert str(config.management.unix_socket) == f"{cwd}/{API_SOCK_NAME}"
+-
+- my_soc = "my-new.soc"
+- config = KresConfig({"management": {"unix-socket": my_soc}})
+- assert str(config.management.unix_socket) == f"{RUN_DIR}/{my_soc}"
+-
+-
+-def test_management_interface():
+- cwd = os.getcwd()
+- config = KresConfig({"rundir": cwd, "management": {"interface": "127.0.0.1@5000"}})
+-
+- assert config.management.unix_socket == None
+- assert str(config.management.interface) == "127.0.0.1@5000"
+-
+-
+ def test_dnssec_false():
+ config = KresConfig({"dnssec": False})
+
+--
+GitLab
+
+
+From c1f8f7bc043ca31b9aac96c13411769fad17f6b2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ale=C5=A1=20Mr=C3=A1zek?= <ales.mrazek@nic.cz>
+Date: Fri, 28 Feb 2025 10:14:22 +0100
+Subject: [PATCH 3/5] datamodel: management: warning that the unix-socket is
+ not located in rundir
+
+---
+ python/knot_resolver/datamodel/config_schema.py | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/python/knot_resolver/datamodel/config_schema.py b/python/knot_resolver/datamodel/config_schema.py
+index 410e94d7c..713c4a3e2 100644
+--- a/python/knot_resolver/datamodel/config_schema.py
++++ b/python/knot_resolver/datamodel/config_schema.py
+@@ -184,6 +184,14 @@ class KresConfig(ConfigSchema):
+ return obj.dns64
+
+ def _validate(self) -> None:
++ # warn about '/management/unix-socket' not located in '/rundir'
++ if self.management.unix_socket and self.management.unix_socket.to_path().parent != self.rundir.to_path():
++ logger.warning(
++ f"The management API unix-socket '{self.management.unix_socket}'"
++ f" is not located in the resolver's rundir '{self.rundir}'."
++ " This can lead to permissions issues."
++ )
++
+ # enforce max-workers config
+ workers_max = _workers_max_count()
+ if int(self.workers) > workers_max:
+--
+GitLab
+
+
+From 2c467aceded3cfa6eb077439d63b8637d17155c3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ale=C5=A1=20Mr=C3=A1zek?= <ales.mrazek@nic.cz>
+Date: Fri, 28 Feb 2025 10:17:17 +0100
+Subject: [PATCH 4/5] client: command: get_socket_from_config improved
+
+---
+ python/knot_resolver/client/command.py | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/python/knot_resolver/client/command.py b/python/knot_resolver/client/command.py
+index 3966f8ca9..7a679885a 100644
+--- a/python/knot_resolver/client/command.py
++++ b/python/knot_resolver/client/command.py
+@@ -5,7 +5,7 @@ from typing import Dict, List, Optional, Set, Tuple, Type, TypeVar
+ from urllib.parse import quote
+
+ from knot_resolver.constants import API_SOCK_FILE, CONFIG_FILE
+-from knot_resolver.datamodel.types import IPAddressPort
++from knot_resolver.datamodel.types import IPAddressPort, WritableFilePath
+ from knot_resolver.utils.modeling import parsing
+ from knot_resolver.utils.modeling.exceptions import DataValidationError
+ from knot_resolver.utils.requests import SocketDesc
+@@ -154,16 +154,21 @@ def get_socket_from_config(config: Path, optional_file: bool) -> Optional[Socket
+ try:
+ with open(config, "r", encoding="utf8") as f:
+ data = parsing.try_to_parse(f.read())
++
+ mkey = "management"
+ if mkey in data:
+ management = data[mkey]
+- if "unix-socket" in management:
++
++ skey = "unix-socket"
++ if skey in management:
++ sock = WritableFilePath(management[skey], object_path=f"/{mkey}/{skey}")
+ return SocketDesc(
+- f'http+unix://{quote(management["unix-socket"], safe="")}/',
++ f'http+unix://{quote(str(sock), safe="")}/',
+ f'Key "/management/unix-socket" in "{config}" file',
+ )
+- if "interface" in management:
+- ip = IPAddressPort(management["interface"], object_path=f"/{mkey}/interface")
++ ikey = "interface"
++ if ikey in data[mkey]:
++ ip = IPAddressPort(management[ikey], object_path=f"/{mkey}/{ikey}")
+ return SocketDesc(
+ f"http://{ip.addr}:{ip.port}",
+ f'Key "/management/interface" in "{config}" file',
+--
+GitLab
+
+
+From f9a75b65cc3664294188de8a5cb93909ea58cadd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ale=C5=A1=20Mr=C3=A1zek?= <ales.mrazek@nic.cz>
+Date: Fri, 28 Feb 2025 10:18:04 +0100
+Subject: [PATCH 5/5] NEWS: update about revert
+
+---
+ NEWS | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+diff --git a/NEWS b/NEWS
+index 70f5db2f0..614177308 100644
+--- a/NEWS
++++ b/NEWS
+@@ -1,3 +1,11 @@
++Knot Resolver 6.0.12 (2025-0m-dd)
++=================================
++
++Bugfixes
++--------
++- /management/unix-socket: revert to absolute path (#926, !1664)
++
++
+ Knot Resolver 6.0.11 (2025-02-26)
+ =================================
+
+--
+GitLab
+
diff --git a/net-dns/knot-resolver/knot-resolver-6.0.9.ebuild b/net-dns/knot-resolver/knot-resolver-6.0.11.ebuild
index 1475584ef940..c7cbc691b42a 100644
--- a/net-dns/knot-resolver/knot-resolver-6.0.9.ebuild
+++ b/net-dns/knot-resolver/knot-resolver-6.0.11.ebuild
@@ -10,10 +10,11 @@ DISTUTILS_SINGLE_IMPL=1
DISTUTILS_USE_PEP517=poetry
PYTHON_COMPAT=( python3_{10..13} )
-inherit distutils-r1 lua-single meson tmpfiles verify-sig
+inherit distutils-r1 lua-single meson optfeature 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 )
@@ -23,7 +24,7 @@ LICENSE="Apache-2.0 BSD CC0-1.0 GPL-3+ LGPL-2.1+ MIT"
SLOT="0"
KEYWORDS="~amd64"
-IUSE="caps dnstap jemalloc +manager nghttp2 prometheus systemd test xdp"
+IUSE="caps dnstap jemalloc +manager nghttp2 systemd test xdp"
RESTRICT="!test? ( test )"
REQUIRED_USE="
${LUA_REQUIRED_USE}
@@ -52,7 +53,6 @@ RDEPEND="
dev-python/jinja2[${PYTHON_USEDEP}]
dev-python/pyyaml[${PYTHON_USEDEP}]
dev-python/typing-extensions[${PYTHON_USEDEP}]
- prometheus? ( dev-python/prometheus-client[${PYTHON_USEDEP}] )
')
)
nghttp2? ( net-libs/nghttp2:= )
@@ -87,8 +87,9 @@ PATCHES=(
"${FILESDIR}"/${PN}-5.5.3-nghttp-openssl.patch
"${FILESDIR}"/${PN}-6.0.9-libsystemd.patch
"${FILESDIR}"/${PN}-6.0.9-config-example.patch
- "${FILESDIR}"/${PN}-6.0.9-sd_notify_alt.patch
"${FILESDIR}"/${PN}-6.0.9-pytest_tomli.patch
+ # to be removed at next release 6.0.12
+ "${FILESDIR}"/${PN}-6.0.11-abs_path_socket.patch
)
pkg_setup() {
@@ -106,7 +107,7 @@ src_configure() {
--localstatedir "${EPREFIX}"/var # double lib
# https://bugs.gentoo.org/870019
-Dauto_features=disabled
- # requires non-gentoo lua modules (basexx, cqueues)
+ # post-install tests
-Dconfig_tests=disabled
-Ddoc=disabled
-Ddocdir="${EPREFIX}"/usr/share/doc/${PF}
@@ -156,20 +157,29 @@ src_install() {
pkg_postinst() {
tmpfiles_process knot-resolver.conf
if use manager; then
- elog "You choose the new way, called the manager, to start Knot Resolver :"
+ elog "You choose the new way, called the manager, to start Knot Resolver:"
use systemd && elog " systemctl start knot-resolver.service"
use !systemd && elog " /etc/init.d/knot-resolver start"
- elog "Configuration file : /etc/knot-resolver/config.yaml"
+ elog "Configuration file: /etc/knot-resolver/config.yaml"
elog ""
- elog "The older way, without the manager, is still available :"
+ elog "The older way, without the manager, is still available:"
else
- elog "You choose the older way, without the manager, to start Knot Resolver :"
+ elog "You choose the older way, without the manager, to start Knot Resolver:"
fi
use systemd && elog " systemctl start kresd@N.service"
use !systemd && elog " /etc/init.d/kresd start"
- elog "Configuration file : /etc/knot-resolver/kresd.conf"
- elog ""
- elog "Optional garbage collector : /etc/init.d/kres-cache-gc"
+ elog "Configuration file: /etc/knot-resolver/kresd.conf"
+ elog "Optional garbage collector: /etc/init.d/kres-cache-gc"
elog ""
use !manager && elog "The new way is available with the useflag manager."
+ elog ""
+
+ optfeature_header "This package is recommended with Knot Resolver:"
+ optfeature "asynchronous execution, especially with policy module" dev-lua/cqueues
+ elog ""
+ optfeature_header "Other packages may also be useful:"
+ use manager && optfeature "Prometheus metrics (need manager)" dev-python/prometheus-client
+ use manager && optfeature "auto-reload TLS certificate files (need manager)" dev-python/watchdog
+ optfeature "legacy doh and webmgmt (metrics, tracking)" dev-lua/lua-http
+ optfeature "server map with geoIP database (webmgmt)" dev-lua/lua-mmdb
}
diff --git a/net-dns/knot-resolver/metadata.xml b/net-dns/knot-resolver/metadata.xml
index 426f3c4d16c2..02d7316545d4 100644
--- a/net-dns/knot-resolver/metadata.xml
+++ b/net-dns/knot-resolver/metadata.xml
@@ -22,9 +22,6 @@
<flag name="nghttp2">
DNS-over-HTTPS support
</flag>
- <flag name="prometheus">
- Metrics exported in Prometheus
- </flag>
<flag name="xdp">
Enable eXpress Data Path
</flag>
diff --git a/net-dns/knot/Manifest b/net-dns/knot/Manifest
index 7b324a4c16cd..05a12680bff8 100644
--- a/net-dns/knot/Manifest
+++ b/net-dns/knot/Manifest
@@ -1,12 +1,6 @@
-AUX knot-1.service 337 BLAKE2B a6645b2ab92612f3c6640f4e9601cefe087a519d8a40b222e05dbd44c8b8c5c87a01d500d5ac328fdee1cae3f9dd126448a8b82b979e13a4ff5285fa48b983d5 SHA512 58c4186e57ebd00b86dae34d5d208ed8801c0376da40cccb23b3d4542a7ee04a1003a12a4b89347b76a384b50eae4a61f96164bf22ec987ce05b1c65691659e7
AUX knot-3.init 943 BLAKE2B 068a152efe75d2871d87edf4ff9f52e05e0f0d1ce22fed6bffaf2b5d19d1fbeb7bf706d442b7103aea932fb6eada0c13df935d7c16e43b3906cbf9916c078ff8 SHA512 bc6f35acc9ef9f0555ba59549d9fdb0e6fc2bbb311dd6ce220b0a7afc26835f699fd3ec6c451f250937f5384cddc4c168f172daec9461747e18fc78d8d38c4e8
AUX knot.confd 194 BLAKE2B 9ff11bcd85f98f461a991b757023238bb18258617387e120e7b15902d8e42668e48980ad5dbfd730b07adcae6acf868f6249d5e7d8a6ee15ba5e4df78dd2443d SHA512 ae0da92420c61ba6b68aef33eb9ff993dd3c86d7cac96421511a6278a235790651ac2696582f7be757e6aaceb82d65d34054fe63063ea3bff74bba8227617bbe
-AUX knot.init 861 BLAKE2B 30ffe287f4f83058407ceab00b2113dade3b60b38d76c86f156cc31c33cc4f2ec8cf7f22172823755b71385ca18cc1044605b5479c9de05284f911d500b5dc40 SHA512 e5faa96cbee618e9042bdfd0628f06c4bc4d23c7295521771e16f6eae715835a240799e8425317b03b1ea162966defb5d6b6592139cb1d9d61b47a24961ec9b9
AUX knot.tmpfile 58 BLAKE2B a107ca27b8d47253409c319d0e69ab151237844d10840155e6ceeb37b8c63268de52c161f63ca27b6c3ec4092c7759fc46d325d4cd79063caa33ef82e23e119e SHA512 db13a4108ce820032a72aa788e6cf79c6bb0870ec457f454dea9102f07255dd5c1543723436665da92236c093ee97161f72298131f80dff09d5faf6aba24bde8
-DIST knot-3.2.9.tar.xz 1642600 BLAKE2B 2c81b2afa96c6077778c3458b2ddeeb8b47ea99607ba755a904278f9755a32171738418ea442b1e6b4afcebe0db2c86e68845d38f8e78342b8354411d1e34af8 SHA512 baf8da222e38198c85fa62e45e71b29ddac7c90433b811710ace1e0395e6e7b5d63547ce8f3a62792ee11259ec2e36d6ddd8fff999416f9171671444a95086cf
-DIST knot-3.4.3.tar.xz 1637080 BLAKE2B d5d96a69b2464d75e4f2d3231339c1dedccc1cd95febc8bd5950f68c89a277d002d09a60e629a74b378bc7f765370aaef05bf41fd497e740be6c0a349c27f731 SHA512 c05a214a9e5564d09257aff44c0f42e9d084d47536197c95dff7aa125a8b53ed99e26c90affaa6833779778cd8d37af9cc473f108ab6acf7230c476b5858c03f
DIST knot-3.4.4.tar.xz 1641460 BLAKE2B d477a4a368b0c6d6c1003a52041403d17bab4e3ecb6e532130b633894d4ee88711038b94e1d4cf12406eb281b800d701c00e40414d458b7bdefb1d632a779821 SHA512 bf8e80d430336934083c1f7c304306de78b254fba5d3b9dd8b44065a0f1527cd78b74d498d994822ed2d364b66091ad967d3cd991bde380fbba67ea34a1ee33f
-EBUILD knot-3.2.9-r1.ebuild 2555 BLAKE2B 02d1a07d3760efbc94b595f76a0dab1c2d9027ed793199faff2cc2fe38ef6dcd89dc4ccf5bcdfaffcd282ded88c691b8195ffa7151cc3195a7f9eb9ab2312950 SHA512 97bdef94775b6810a9fda091ba9b5041aa233394953ffd05bfa7237b68c5e72b410165bdd1f6d3ddecf5e96456e738d629a1a54bc92e7bae88d80fbb832cc647
-EBUILD knot-3.4.3-r2.ebuild 4401 BLAKE2B f2989d7c9ecfc0e5a9cbebffd2f3c88e484f752f0907563f200b3e0be143bdf454f28fddc205adb6f835f4d73ce32b3b95411cbae66e2b3ac6eb28657e6d0f66 SHA512 0f64660da37cd8fdc6cffd848de88e692373cd842c7400b0c0bb94e4994d1a7668ae87bad74bdf49d455d9066d7561b0dfd47349e908542876279d4f66086ad7
EBUILD knot-3.4.4.ebuild 4102 BLAKE2B 7cc30a08b82136eb55e878670e24099fabbce1ca0d6804fb30a57e634bc6ffbd647004ca2c58bffc2831020ffb3ccac6f4e685a8232c5ff4cc4814981141da8c SHA512 9b8a8de74c7c56da11c999a3564716674d9930eb15b1b1ff850348b5807300a875e9561ca8e1ef97605fc41858cd45d8533da44d21851c56103641f1f9d3bcf1
-MISC metadata.xml 2452 BLAKE2B fc04ac109dd8d20ff3dac313f04891f7933f1111a4f3f04a6103b6b911267b28a68cf7ac38ddbbcca2dba4ace087cd963587718f2faf1cf552c6a5ef56be83a5 SHA512 4036658162e3286fa5d8490f72e9e2a15946e4a379c356f1cabf933e219966ef07d9c417c4638eeb506898e566bf2dfe915771a256c5a9432d868c175a0401b4
+MISC metadata.xml 2238 BLAKE2B 4fb25c18c046e5048d8f2e5106cef5520dc914b6d197d4d3352bd55421d62d60c80cf1104ab93b70691ccb2ba6123e7b739aa60472b7849a5606025ff1e13ff7 SHA512 b699955dcf80ae2d9b7eabd5666a0476fc6ea5e0edae6ff0f83049c258854f37bb5b41d6b83beca177f89ea05a97a6a4628d2ef1effc16421eb2573f332a80c0
diff --git a/net-dns/knot/files/knot-1.service b/net-dns/knot/files/knot-1.service
deleted file mode 100644
index 14a34a2b211f..000000000000
--- a/net-dns/knot/files/knot-1.service
+++ /dev/null
@@ -1,17 +0,0 @@
-[Unit]
-Description=Knot high-performance DNS Server
-After=network.target
-
-[Service]
-ExecStart=/usr/sbin/knotd
-ExecReload=/usr/sbin/knotc reload
-ExecStop=/usr/sbin/knotc stop
-PrivateTmp=true
-User=knot
-Group=knot
-RuntimeDirectory=knot
-RuntimeDirectoryMode=750
-AmbientCapabilities=CAP_NET_BIND_SERVICE
-
-[Install]
-WantedBy=multi-user.target
diff --git a/net-dns/knot/files/knot.init b/net-dns/knot/files/knot.init
deleted file mode 100644
index 8dc460c31cd4..000000000000
--- a/net-dns/knot/files/knot.init
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/sbin/openrc-run
-# Copyright 1999-2013 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-command=/usr/sbin/knotd
-command_args="-d"
-pidfile=/var/run/knot/knot.pid
-required_files=/etc/knot/knot.conf
-extra_started_commands="reload"
-description_reload="Reload configuration and changed zones."
-
-depend() {
- need net
-}
-
-start() {
- checkpath -d -m 0750 -o knot:knot /var/run/knot/ /var/lib/knot/
-
- ebegin "Starting knot"
- start-stop-daemon --start \
- --pidfile $pidfile --exec $command -- $command_args
- eend $?
-}
-
-stop() {
- ebegin "Stoping knot"
- /usr/sbin/knotc stop >/dev/null 2>&1
- # In case remote control is not working
- if [ "$?" != 0 ]; then
- if [ -f $pidfile ]; then
- start-stop-daemon --stop --pidfile $pidfile
- fi
- fi
- ewend $?
-}
-
-reload() {
- ebegin "Reloading knot"
- /usr/sbin/knotc reload >/dev/null
- eend $?
-}
diff --git a/net-dns/knot/knot-3.2.9-r1.ebuild b/net-dns/knot/knot-3.2.9-r1.ebuild
deleted file mode 100644
index eba5990f6fb6..000000000000
--- a/net-dns/knot/knot-3.2.9-r1.ebuild
+++ /dev/null
@@ -1,126 +0,0 @@
-# Copyright 1999-2025 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit flag-o-matic systemd
-
-# subslot: libknot major.libdnssec major.libzscanner major
-KNOT_SUBSLOT="13.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"
-
-S="${WORKDIR}/${P/_/-}"
-
-LICENSE="GPL-3+"
-SLOT="0/${KNOT_SUBSLOT}"
-KEYWORDS="amd64 ~riscv x86"
-
-KNOT_MODULES=(
- "+cookies"
- "+dnsproxy"
- "dnstap"
- "geoip"
- "+noudp"
- "+onlinesign"
- "+queryacl"
- "+rrl"
- "+stats"
- "+synthrecord"
- "+whoami"
-)
-IUSE="doc caps doh +fastparser idn +libidn2 quic systemd +utils xdp ${KNOT_MODULES[@]}"
-
-RDEPEND="
- acct-group/knot
- acct-user/knot
- dev-db/lmdb:=
- dev-libs/libedit
- dev-libs/userspace-rcu:=
- dev-python/lmdb:=
- net-libs/gnutls:=
- caps? ( sys-libs/libcap-ng )
- dnstap? (
- dev-libs/fstrm
- dev-libs/protobuf-c:=
- )
- doh? ( net-libs/nghttp2:= )
- geoip? ( dev-libs/libmaxminddb:= )
- idn? (
- !libidn2? ( net-dns/libidn:0= !net-dns/libidn2 )
- libidn2? ( net-dns/libidn2:= )
- )
- quic? ( >=net-libs/ngtcp2-0.13.1:=[gnutls] )
- systemd? ( sys-apps/systemd:= )
- xdp? (
- >=dev-libs/libbpf-1.0:=
- net-libs/libmnl:=
- net-libs/xdp-tools
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- doc? ( dev-python/sphinx )
-"
-
-# 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 )
-
-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 fastparser)
- $(use_enable dnstap)
- $(use_enable doc documentation)
- $(use_enable quic)
- $(use_enable utils utilities)
- $(use_enable xdp)
- --enable-systemd=$(usex systemd)
- $(use_with idn libidn)
- $(use_with doh libnghttp2)
- )
-
- for u in "${KNOT_MODULES[@]#+}"; do
- my_conf+=("$(use_with ${u} module-${u})")
- done
-
- if use riscv; then
- append-libs -latomic
- fi
-
- econf "${my_conf[@]}"
-}
-
-src_compile() {
- default
-
- use doc && emake -C doc html
-}
-
-src_test() {
- emake check
-}
-
-src_install() {
- use doc && local HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
-
- default
-
- rmdir "${D}/var/run/${PN}" "${D}/var/run/" || die
-
- newinitd "${FILESDIR}/knot.init" knot
- if use systemd; then
- systemd_newunit "${FILESDIR}/knot-1.service" knot.service
- fi
-
- find "${D}" -name '*.la' -delete || die
-
- keepdir /var/lib/knot
-}
diff --git a/net-dns/knot/knot-3.4.3-r2.ebuild b/net-dns/knot/knot-3.4.3-r2.ebuild
deleted file mode 100644
index 7802470727a0..000000000000
--- a/net-dns/knot/knot-3.4.3-r2.ebuild
+++ /dev/null
@@ -1,204 +0,0 @@
-# Copyright 1999-2024 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..13} )
-
-inherit python-single-r1 flag-o-matic systemd tmpfiles
-
-# 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"
-
-S="${WORKDIR}/${P/_/-}"
-
-LICENSE="GPL-3+"
-SLOT="0/${KNOT_SUBSLOT}"
-KEYWORDS="~amd64 ~riscv ~x86"
-
-KNOT_MODULES=(
- "+authsignal"
- "+cookies"
- "+dnsproxy"
- "dnstap"
- "geoip"
- "+noudp"
- "+onlinesign"
- "+queryacl"
- "+rrl"
- "+stats"
- "+synthrecord"
- "+whoami"
-)
-
-IUSE="caps +daemon dbus +doc doh +fastparser +idn pkcs11 prometheus python quic systemd test +utils xdp ${KNOT_MODULES[@]}"
-RESTRICT="!test? ( test )"
-REQUIRED_USE="
- prometheus? ( python )
- python? ( ${PYTHON_REQUIRED_USE} )
-"
-
-COMMON_DEPEND="
- dev-libs/libedit
- dnstap? (
- dev-libs/fstrm
- dev-libs/protobuf-c:=
- )
- quic? ( net-libs/ngtcp2[gnutls] )
-"
-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:= )
- )
- utils? (
- ${COMMON_DEPEND}
- doh? ( net-libs/nghttp2:= )
- idn? ( net-dns/libidn2:= )
- )
- python? ( ${PYTHON_DEPS} )
- prometheus? (
- $(python_gen_cond_dep '
- dev-python/prometheus-client[${PYTHON_USEDEP}]
- dev-python/psutil[${PYTHON_USEDEP}]
- ')
- )
- xdp? (
- >=dev-libs/libbpf-1.0:=
- net-libs/xdp-tools
- utils? ( net-libs/libmnl:= )
- )
-"
-DEPEND="${RDEPEND}"
-BDEPEND="
- virtual/pkgconfig
- doc? ( dev-python/sphinx )
- python? (
- ${PYTHON_DEPS}
- )
- test? (
- pkcs11? ( dev-libs/softhsm )
- )
-"
-
-# 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 )
-
-pkg_setup() {
- use python && python-single-r1_pkg_setup
-}
-
-src_prepare() {
- # https://gitlab.nic.cz/knot/knot-dns/-/issues/946
- cat > tests/contrib/test_atomic.c <<-_EOF_ || die
- #include <tap/basic.h>
- int main(int argc, char *argv[])
- {
- skip_all("not supported");
- return 0;
- }
- _EOF_
- cp tests/contrib/test_{atomic,spinlock}.c || die
- default
-}
-
-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)
- $(use_enable fastparser)
- $(use_enable dnstap)
- $(use_enable doc documentation)
- $(use_with doh libnghttp2)
- $(use_enable geoip maxminddb)
- $(use_with idn libidn)
- $(use_enable quic)
- $(use_enable systemd)
- $(use_enable utils utilities)
- $(use_enable xdp)
- )
-
- # modules (except dnstap forced by use_enable if set with utils) are only used by daemon
- if use daemon; then
- for u in "${KNOT_MODULES[@]#+}"; 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 !dbus && use !systemd; then
- my_conf+=("--enable-dbus=no")
- elif use !dbus && use systemd; then
- my_conf+=("--enable-dbus=systemd")
- fi
-
- if use riscv; then
- append-libs -latomic
- fi
-
- econf "${my_conf[@]}"
-}
-
-src_compile() {
- default
-
- use doc && emake -C doc html
-}
-
-src_install() {
- use doc && local HTML_DOCS=( doc/_build/html/{*.html,*.js,_sources,_static} )
-
- if use python; then
- python_domodule python/libknot/libknot
- newdoc python/libknot/README.md README.python.md
- fi
-
- if use prometheus; then
- python_domodule python/knot_exporter/knot_exporter
- python_scriptinto /usr/sbin
- 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
- rmdir "${D}/var/run/${PN}" "${D}/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
-}
diff --git a/net-dns/knot/metadata.xml b/net-dns/knot/metadata.xml
index c402c8ad3c89..6a8f6b760ceb 100644
--- a/net-dns/knot/metadata.xml
+++ b/net-dns/knot/metadata.xml
@@ -33,13 +33,6 @@
Use a zone file parser that is faster, but requires
more memory and CPU time to compile
</flag>
- <flag name="geoip">
- Enable the Geography-based responses module
- </flag>
- <flag name="libidn2">
- If IDN support is enabled, use <pkg>net-dns/libidn2</pkg> instead
- of <pkg>net-dns/libidn</pkg>
- </flag>
<flag name="noudp">
Enable the module which can send empty truncated
responses to UDP queries