want_ossfuzz = get_option('oss-fuzz')
want_libfuzzer = get_option('llvm-fuzz')
-want_fuzzbuzz = get_option('fuzzbuzz')
-if want_ossfuzz + want_libfuzzer + want_fuzzbuzz > 1
- error('only one of oss-fuzz, llvm-fuzz or fuzzbuzz can be specified')
+if want_ossfuzz + want_libfuzzer > 1
+ error('only one of oss-fuzz or llvm-fuzz can be specified')
endif
skip_deps = want_ossfuzz or want_libfuzzer
-fuzzer_build = want_ossfuzz or want_libfuzzer or want_fuzzbuzz
+fuzzer_build = want_ossfuzz or want_libfuzzer
#####################################################################
# Try to install the git pre-commit hook
-git_hook = run_command(join_paths(project_source_root, 'tools/add-git-hook.sh'))
-if git_hook.returncode() == 0
- message(git_hook.stdout().strip())
+add_git_hook_sh = find_program('tools/add-git-hook.sh', required : false)
+if add_git_hook_sh.found()
+ git_hook = run_command(add_git_hook_sh)
+ if git_hook.returncode() == 0
+ message(git_hook.stdout().strip())
+ endif
endif
#####################################################################
status_unit_format_default = get_option('status-unit-format-default')
conf.set_quoted('PKGSYSCONFDIR', pkgsysconfdir)
-conf.set_quoted('SYSTEM_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'system'))
+conf.set_quoted('SYSTEM_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'system'))
conf.set_quoted('SYSTEM_DATA_UNIT_PATH', systemunitdir)
conf.set_quoted('SYSTEM_SYSVINIT_PATH', sysvinit_path)
conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
conf.set('ANSI_OK_COLOR', 'ANSI_' + get_option('ok-color').underscorify().to_upper())
-conf.set_quoted('USER_CONFIG_UNIT_PATH', join_paths(pkgsysconfdir, 'user'))
-conf.set_quoted('USER_DATA_UNIT_PATH', userunitdir)
+conf.set_quoted('USER_CONFIG_UNIT_DIR', join_paths(pkgsysconfdir, 'user'))
+conf.set_quoted('USER_DATA_UNIT_DIR', userunitdir)
conf.set_quoted('CERTIFICATE_ROOT', get_option('certificate-root'))
conf.set_quoted('CATALOG_DATABASE', join_paths(catalogstatedir, 'database'))
conf.set_quoted('SYSTEMD_CGROUP_AGENT_PATH', join_paths(rootlibexecdir, 'systemd-cgroups-agent'))
conf.set_quoted('SYSTEMD_MAKEFS_PATH', join_paths(rootlibexecdir, 'systemd-makefs'))
conf.set_quoted('SYSTEMD_GROWFS_PATH', join_paths(rootlibexecdir, 'systemd-growfs'))
conf.set_quoted('SYSTEMD_SHUTDOWN_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-shutdown'))
-conf.set_quoted('SYSTEMD_SLEEP_BINARY_PATH', join_paths(rootlibexecdir, 'systemd-sleep'))
conf.set_quoted('SYSTEMCTL_BINARY_PATH', join_paths(rootbindir, 'systemctl'))
conf.set_quoted('SYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH', join_paths(rootbindir, 'systemd-tty-ask-password-agent'))
conf.set_quoted('SYSTEMD_STDIO_BRIDGE_BINARY_PATH', join_paths(bindir, 'systemd-stdio-bridge'))
conf.set_quoted('RANDOM_SEED_DIR', randomseeddir)
conf.set_quoted('RANDOM_SEED', join_paths(randomseeddir, 'random-seed'))
conf.set_quoted('SYSTEMD_CRYPTSETUP_PATH', join_paths(rootlibexecdir, 'systemd-cryptsetup'))
-conf.set_quoted('SYSTEM_GENERATOR_PATH', systemgeneratordir)
-conf.set_quoted('USER_GENERATOR_PATH', usergeneratordir)
-conf.set_quoted('SYSTEM_ENV_GENERATOR_PATH', systemenvgeneratordir)
-conf.set_quoted('USER_ENV_GENERATOR_PATH', userenvgeneratordir)
+conf.set_quoted('SYSTEM_GENERATOR_DIR', systemgeneratordir)
+conf.set_quoted('USER_GENERATOR_DIR', usergeneratordir)
+conf.set_quoted('SYSTEM_ENV_GENERATOR_DIR', systemenvgeneratordir)
+conf.set_quoted('USER_ENV_GENERATOR_DIR', userenvgeneratordir)
conf.set_quoted('SYSTEM_SHUTDOWN_PATH', systemshutdowndir)
conf.set_quoted('SYSTEM_SLEEP_PATH', systemsleepdir)
conf.set_quoted('SYSTEMD_KBD_MODEL_MAP', join_paths(pkgdatadir, 'kbd-model-map'))
endif
elif want_ossfuzz
fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine')
-elif want_fuzzbuzz
- fuzzing_engine = meson.get_compiler('cpp').find_library(get_option('fuzzbuzz-engine'), dirs: get_option('fuzzbuzz-engine-dir'))
endif
# Those generate many false positives, and we do not want to change the code to
'DNS_OVER_TLS_' + default_dns_over_tls.underscorify().to_upper())
substs.set('DEFAULT_DNS_OVER_TLS_MODE', default_dns_over_tls)
+default_mdns = get_option('default-mdns')
+conf.set('DEFAULT_MDNS_MODE',
+ 'RESOLVE_SUPPORT_' + default_mdns.to_upper())
+substs.set('DEFAULT_MDNS_MODE', default_mdns)
+
+default_llmnr = get_option('default-llmnr')
+conf.set('DEFAULT_LLMNR_MODE',
+ 'RESOLVE_SUPPORT_' + default_llmnr.to_upper())
+substs.set('DEFAULT_LLMNR_MODE', default_llmnr)
+
want_repart = get_option('repart')
if want_repart != 'false'
have = (conf.get('HAVE_OPENSSL') == 1 and
libmount,
libblkid],
install_rpath : rootlibexecdir,
- install : true)
+ install : get_option('analyze'))
public_programs += exe
executable('systemd-journald',
endif
if conf.get('ENABLE_REPART') == 1
- executable('systemd-repart',
+ exe = executable('systemd-repart',
systemd_repart_sources,
include_directories : includes,
link_with : [libshared],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
+
+ if want_tests != 'false'
+ test('test-repart',
+ test_repart_sh,
+ args : exe.full_path())
+ endif
endif
if conf.get('ENABLE_VCONSOLE') == 1
install_dir : rootbindir)
public_programs += exe
- executable('systemd-network-generator',
+ exe = executable('systemd-network-generator',
network_generator_sources,
include_directories : includes,
link_with : [networkd_link_with],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
+
+ if want_tests != 'false'
+ test('test-network-generator-conversion',
+ test_network_generator_conversion_sh,
+ # https://github.com/mesonbuild/meson/issues/2681
+ args : exe.full_path())
+ endif
endif
executable('systemd-sulogin-shell',
incs = tuple.length() >= 5 ? tuple[4] : includes
link_args = []
- if want_ossfuzz or want_fuzzbuzz
+ if want_ossfuzz
dependencies += fuzzing_engine
elif want_libfuzzer
if fuzzing_engine.found()
sources += 'src/fuzz/fuzz-main.c'
endif
- if want_fuzzbuzz
- sources += 'src/fuzz/fuzzer-entry-point.c'
- endif
-
name = sources[0].split('/')[-1].split('.')[0]
fuzzer_exes += executable(
'default DNSSEC mode: @0@'.format(default_dnssec),
'default DNS-over-TLS mode: @0@'.format(default_dns_over_tls),
+ 'default mDNS mode: @0@'.format(default_mdns),
+ 'default LLMNR mode: @0@'.format(default_llmnr),
'default cgroup hierarchy: @0@'.format(default_hierarchy),
'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme),
'default KillUserProcesses setting: @0@'.format(kill_user_processes),
['debug siphash'],
['valgrind', conf.get('VALGRIND') == 1],
['trace logging', conf.get('LOG_TRACE') == 1],
+ ['install tests', install_tests],
['link-udev-shared', get_option('link-udev-shared')],
['link-systemctl-shared', get_option('link-systemctl-shared')],
['link-networkd-shared', get_option('link-networkd-shared')],
['link-timesyncd-shared', get_option('link-timesyncd-shared')],
+ ['kernel-install', get_option('kernel-install')],
+ ['systemd-analyze', get_option('analyze')],
]
if tuple.length() >= 2