--- /dev/null
+py3.install_sources(
+ files(
+ 'completion.py',
+ 'config.py',
+ 'stop.py',
+ ),
+ subdir: manager_module_dir / cli_dir / cmd_dir
+)
--- /dev/null
+if get_option('manager_client') != 'disabled'
+ build_manager_client = true
+endif
+
+if build_manager_client
+
+ cmd_dir = 'cmd'
+ subdir(cmd_dir)
+
+ py3.install_sources(
+ files(
+ '__init__.py',
+ '__main__.py',
+ ),
+ subdir: manager_module_dir / cli_dir
+ )
+
+ # install_data(
+ # sources : 'kresctl',
+ # install_dir: get_option('sbindir'),
+ # )
+
+endif
\ No newline at end of file
--- /dev/null
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'asyncio.py',
+ 'dataclasses.py',
+ ),
+ subdir: manager_module_dir / compat_dir
+)
\ No newline at end of file
--- /dev/null
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'cache_schema.py',
+ 'config_schema.py',
+ 'dns64_schema.py',
+ 'dnssec_schema.py',
+ 'forward_zone_schema.py',
+ 'logging_schema.py',
+ 'lua_schema.py',
+ 'monitoring_schema.py',
+ 'network_schema.py',
+ 'options_schema.py',
+ 'policy_schema.py',
+ 'rpz_schema.py',
+ 'slice_schema.py',
+ 'static_hints_schema.py',
+ 'stub_zone_schema.py',
+ 'view_schema.py',
+ 'webmgmt_schema.py',
+ ),
+ subdir: manager_module_dir / datamodel_dir
+)
+
+templates_dir = 'templates'
+subdir(templates_dir)
+
+types_dir = 'types'
+subdir(types_dir)
\ No newline at end of file
--- /dev/null
+py3.install_sources(
+ files(
+ 'common_macros.lua.j2',
+ 'network_macros.lua.j2',
+ 'policy_macros.lua.j2',
+ 'view_macros.lua.j2',
+ ),
+ subdir: manager_module_dir / datamodel_dir / templates_dir / macros_dir
+)
--- /dev/null
+macros_dir = 'macros'
+subdir(macros_dir)
+
+py3.install_sources(
+ files(
+ 'cache.lua.j2',
+ 'config.lua.j2',
+ 'dns64.lua.j2',
+ 'dnssec.lua.j2',
+ 'forward_zones.lua.j2',
+ 'logging.lua.j2',
+ 'monitoring.lua.j2',
+ 'network.lua.j2',
+ 'options.lua.j2',
+ 'policy.lua.j2',
+ 'rpz.lua.j2',
+ 'slices.lua.j2',
+ 'static_hints.lua.j2',
+ 'stub_zones.lua.j2',
+ 'views.lua.j2',
+ 'webmgmt.lua.j2',
+ ),
+ subdir: manager_module_dir / datamodel_dir / templates_dir
+)
\ No newline at end of file
--- /dev/null
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'base_types.py',
+ 'enums.py',
+ 'types.py',
+ ),
+ subdir: manager_module_dir / datamodel_dir / types_dir
+)
\ No newline at end of file
--- /dev/null
+supervisord_dir = 'supervisord'
+subdir(supervisord_dir)
+
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'interface.py',
+ ),
+ subdir: manager_module_dir / kresd_controller_dir
+)
--- /dev/null
+plugin_dir = 'plugin'
+subdir(plugin_dir)
+
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'config_file.py',
+ 'supervisord.conf.j2'
+ ),
+ subdir: manager_module_dir / kresd_controller_dir / supervisord_dir
+)
--- /dev/null
+py3.extension_module(
+ 'notify',
+ 'notifymodule.c',
+ subdir: manager_module_dir / kresd_controller_dir / supervisord_dir / plugin_dir
+)
+
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'fast_rpcinterface.py',
+ 'manager_lifecycle_monitor.py',
+ 'stdout_pipe_log.py',
+ ),
+ subdir: manager_module_dir / kresd_controller_dir / supervisord_dir / plugin_dir
+)
\ No newline at end of file
--- /dev/null
+cli_dir = 'cli'
+subdir(cli_dir)
+
+compat_dir = 'compat'
+subdir(compat_dir)
+
+datamodel_dir = 'datamodel'
+subdir(datamodel_dir)
+
+kresd_controller_dir = 'kresd_controller'
+subdir(kresd_controller_dir)
+
+utils_dir = 'utils'
+subdir(utils_dir)
+
+py3.install_sources(
+ files(
+ '__init__.py',
+ '__main__.py',
+ 'config_store.py',
+ 'constants.py',
+ 'exceptions.py',
+ 'kres_manager.py',
+ 'log.py',
+ 'main.py',
+ 'server.py',
+ 'statistics.py',
+ ),
+ subdir: manager_module_dir
+)
--- /dev/null
+modeling_dir = 'modeling'
+subdir('modeling')
+
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'async_utils.py',
+ 'custom_atexit.py',
+ 'functional.py',
+ 'requests.py',
+ 'systemd_notify.py',
+ 'which.py',
+ ),
+ subdir: manager_module_dir / utils_dir
+)
\ No newline at end of file
--- /dev/null
+py3.install_sources(
+ files(
+ '__init__.py',
+ 'base_schema.py',
+ 'base_value_type.py',
+ 'exceptions.py',
+ 'parsing.py',
+ 'query.py',
+ 'types.py',
+ ),
+ subdir: manager_module_dir / utils_dir / modeling_dir
+)
\ No newline at end of file
# SPDX-License-Identifier: GPL-3.0-or-later
build_manager = false
+build_manager_client = false
+
if get_option('manager') != 'disabled'
message('--- manager dependencies ---')
- python3 = find_program('python3', version: '>=3.6')
+ python_deps = [
+ # 'jinja2',
+ # 'yaml',
+ # 'aiohttp',
+ # 'prometheus_client',
+ # 'supervisor',
+ # 'typing_extensions',
+ ]
+
+ pymod = import('python')
+ py3 = pymod.find_installation('python3', modules: python_deps)
+ py3_deps = py3.dependency()
+
+ if py3.language_version().version_compare('<3.6')
+ error('At least Python 3.6 is required.')
+ else
+ build_manager = true
+ endif
- build_manager = true
message('----------------------------')
+elif get_option('manager') == 'disabled' and get_option('manager_client') == 'enabled'
+ error('manager client cannot be build without manager')
endif
if build_manager
+
+ manager_module_dir = 'knot_resolver_manager'
+ subdir(manager_module_dir)
+
# YAML config: etc/knot-resolver/config.yml
install_data(
sources: 'etc/knot-resolver/config.yml',
s_managed_ta = managed_ta ? 'enabled' : 'disabled'
s_install_root_keys = install_root_keys ? 'enabled' : 'disabled'
s_build_manager = build_manager ? 'enabled' : 'disabled'
+s_build_manager_client = build_manager_client ? 'enabled' : 'disabled'
s_build_client = build_client ? 'enabled' : 'disabled'
s_build_utils = build_utils ? 'enabled' : 'disabled'
s_build_dnstap = build_dnstap ? 'enabled' : 'disabled'
optional components
manager: @0@'''.format(s_build_manager) + '''
+ manager_client: @0@'''.format(s_build_manager_client) + '''
client: @0@'''.format(s_build_client) + '''
utils: @0@'''.format(s_build_utils) + '''
dnstap: @0@'''.format(s_build_dnstap) + '''
description: 'build manager and its features',
)
+option(
+ 'manager_client',
+ type: 'combo',
+ choices: [
+ 'auto',
+ 'enabled',
+ 'disabled',
+ ],
+ value: 'auto',
+ description: 'build kresctl manager client',
+)
+
option(
'client',
type: 'combo',