Commit 984b6f0c authored by Tomas Krizek's avatar Tomas Krizek

meson: remove MODULEDIR

parent 22e22cd1
......@@ -29,5 +29,5 @@ install_data([
trust_anchors,
files('zonefile.lua'),
],
install_dir: modules_dir,
install_dir: lib_dir,
)
......@@ -59,7 +59,6 @@ struct args {
fd_array_t tls_fd_set;
char *keyfile;
int keyfile_unmanaged;
const char *moduledir;
const char *config;
int control_fd;
const char *rundir;
......@@ -386,7 +385,6 @@ static void help(int argc, char *argv[])
" -c, --config=[path] Config file path (relative to [rundir]) (default: config).\n"
" -k, --keyfile=[path] File with root domain trust anchors (DS or DNSKEY), automatically updated.\n"
" -K, --keyfile-ro=[path] File with read-only root domain trust anchors, for use with an external updater.\n"
" -m, --moduledir=[path] Override the default module path (" MODULEDIR ").\n"
" -f, --forks=N Start N forks sharing the configuration.\n"
" -q, --quiet No command prompt in interactive mode.\n"
" -v, --verbose Run in verbose mode."
......@@ -517,7 +515,6 @@ static void args_init(struct args *args)
array_init(args->tls_set);
array_init(args->fd_set);
array_init(args->tls_fd_set);
args->moduledir = MODULEDIR;
args->control_fd = -1;
args->interactive = true;
args->quiet = false;
......@@ -547,7 +544,6 @@ static int parse_args(int argc, char **argv, struct args *args)
{"keyfile", required_argument, 0, 'k'},
{"keyfile-ro", required_argument, 0, 'K'},
{"forks", required_argument, 0, 'f'},
{"moduledir", required_argument, 0, 'm'},
{"verbose", no_argument, 0, 'v'},
{"quiet", no_argument, 0, 'q'},
{"version", no_argument, 0, 'V'},
......@@ -590,9 +586,6 @@ static int parse_args(int argc, char **argv, struct args *args)
}
args->keyfile = optarg;
break;
case 'm':
args->moduledir = optarg;
break;
case 'v':
kr_verbose_set(true);
#ifdef NOVERBOSELOG
......@@ -787,7 +780,7 @@ int main(int argc, char **argv)
}
/* Start the scripting engine */
engine_set_moduledir(&engine, args.moduledir);
engine_set_moduledir(&engine, LIBDIR);
if (engine_load_sandbox(&engine) != 0) {
ret = EXIT_FAILURE;
......
......@@ -26,8 +26,6 @@
.IR keyfile ]
.RB [ \-K | \-\-keyfile\-ro
.IR keyfile ]
.RB [ \-m | \-\-moduledir
.IR path ]
.RB [ \-f | \-\-forks
.IR N ]
.RB [ \-q | \-\-quiet ]
......@@ -138,9 +136,6 @@ and is compatible with Unbound and BIND 9 root key files.
Default: "@keyfile_default@" (can be empty if your distribution did not provide one)
.TP
.B \-m\fI path\fR, \fB\-\-moduledir=\fI<path>
Override the directory that is searched for modules. Default: @modules_dir@
.TP
.B \-f\fI N\fR, \fB\-\-forks=\fI<N>
With this option, the daemon is started in non-interactive mode and instead creates a
UNIX socket in \fIrundir\fR that the operator can connect to for interactive session.
......
......@@ -5,7 +5,6 @@ man_config = configuration_data()
man_config.set('version', meson.project_version())
man_config.set('date', run_command('../scripts/get-date.sh', check: true).stdout())
man_config.set('keyfile_default', keyfile_default)
man_config.set('modules_dir', modules_dir)
# TODO use correct systemd man page
man_config.set('man_seealso_systemd', '')
......
......@@ -41,17 +41,14 @@ data_dir = join_paths(prefix, get_option('datadir'), 'knot-resolver')
doc_dir = join_paths(prefix, get_option('datadir'), 'doc', 'knot-resolver')
examples_dir = join_paths(doc_dir, 'examples')
etc_dir = join_paths(prefix, get_option('sysconfdir'), 'knot-resolver')
lib_dir = join_paths(prefix, get_option('libdir'), 'knot-resolver')
modules_dir = join_paths(lib_dir, 'kres_modules')
sbin_dir = join_paths(prefix, get_option('sbindir'))
systemd_work_dir = ''
run_dir = ''
systemd_unit_dir = ''
systemd_tmpfiles_dir = ''
modules_dir = get_option('modules_dir')
if modules_dir == ''
modules_dir = join_paths(prefix, get_option('libdir'), 'knot-resolver')
endif
## Trust anchors
managed_ta = get_option('managed_ta').enabled()
keyfile_default = get_option('keyfile_default')
......@@ -137,7 +134,7 @@ run_target(
# kresconfig.h
conf_data = configuration_data()
conf_data.set_quoted('PACKAGE_VERSION', meson.project_version())
conf_data.set_quoted('MODULEDIR', modules_dir)
conf_data.set_quoted('LIBDIR', lib_dir)
conf_data.set_quoted('ROOTHINTS', '@0@/root.hints'.format(etc_dir)) # TODO allow custom ROOTHINTS with build option?
conf_data.set_quoted('LIBEXT', libext)
conf_data.set_quoted('libzscanner_SONAME',
......@@ -197,7 +194,9 @@ message('''
paths
prefix: @0@'''.format(prefix) + '''
modules_dir: @0@'''.format(modules_dir) + '''
lib_dir: @0@'''.format(lib_dir) + '''
etc_dir: @0@'''.format(etc_dir) + '''
sbin_dir: @0@'''.format(sbin_dir) + '''
trust_anchors
keyfile_default: @0@'''.format(keyfile_default) + '''
......
......@@ -19,12 +19,6 @@ option(
description: 'creates kresd.conf in config directory',
)
option(
'modules_dir',
type: 'string',
description: 'path to kres modules directory',
)
option(
'user',
type: 'string',
......@@ -62,13 +56,6 @@ option(
description: 'build kresc client binary'
)
option(
'daemon',
type: 'feature',
value: 'enabled',
description: 'build kresd daemon binary'
)
option(
'doc',
type: 'feature',
......
......@@ -45,6 +45,6 @@ subdir('view')
foreach mod : lua_mod_src
install_data(
mod,
install_dir: join_path(modules_dir, 'kres_modules'),
install_dir: modules_dir,
)
endforeach
......@@ -4,8 +4,8 @@
systemd_work_dir = join_paths(
prefix, get_option('localstatedir'), 'cache', 'knot-resolver')
run_dir = join_paths('/run', 'knot-resolver')
systemd_unit_dir = join_paths(prefix, get_option('libdir'), 'systemd', 'system')
systemd_tmpfiles_dir = join_paths(prefix, get_option('libdir'), 'tmpfiles.d')
systemd_unit_dir = join_paths(lib_dir, 'systemd', 'system')
systemd_tmpfiles_dir = join_paths(lib_dir, 'tmpfiles.d')
## configuration
systemd_config = configuration_data()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment