endif
rootprefixdir_noslash = rootprefixdir == '/' ? '' : rootprefixdir
+have_standalone_binaries = get_option('standalone-binaries')
+
sysvinit_path = get_option('sysvinit-path')
sysvrcnd_path = get_option('sysvrcnd-path')
conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '',
want_tests = get_option('tests')
slow_tests = want_tests != 'false' and get_option('slow-tests')
+fuzz_tests = want_tests != 'false' and get_option('fuzz-tests')
install_tests = get_option('install-tests')
if add_languages('cpp', required : fuzzer_build)
want_apparmor = get_option('apparmor')
if want_apparmor != 'false' and not skip_deps
libapparmor = dependency('libapparmor',
+ version : '>= 2.13',
required : want_apparmor == 'true')
have = libapparmor.found()
else
conf.set10('HAVE_CRYPT_SET_METADATA_SIZE',
have and cc.has_function('crypt_set_metadata_size', dependencies : libcryptsetup))
+ conf.set10('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY',
+ have and cc.has_function('crypt_activate_by_signed_key', dependencies : libcryptsetup))
else
have = false
libcryptsetup = []
endif
conf.set10('HAVE_P11KIT', have)
+want_libfido2 = get_option('libfido2')
+if want_libfido2 != 'false' and not skip_deps
+ libfido2 = dependency('libfido2',
+ required : want_libfido2 == 'true')
+ have = libfido2.found()
+else
+ have = false
+ libfido2 = []
+endif
+conf.set10('HAVE_LIBFIDO2', have)
+
want_elfutils = get_option('elfutils')
if want_elfutils != 'false' and not skip_deps
libdw = dependency('libdw',
if want_xz != 'false' and not skip_deps
libxz = dependency('liblzma',
required : want_xz == 'true')
- have = libxz.found()
+ have_xz = libxz.found()
else
- have = false
+ have_xz = false
libxz = []
endif
-conf.set10('HAVE_XZ', have)
+conf.set10('HAVE_XZ', have_xz)
want_lz4 = get_option('lz4')
if want_lz4 != 'false' and not skip_deps
liblz4 = dependency('liblz4',
version : '>= 1.3.0',
required : want_lz4 == 'true')
- have = liblz4.found()
+ have_lz4 = liblz4.found()
else
- have = false
+ have_lz4 = false
liblz4 = []
endif
-conf.set10('HAVE_LZ4', have)
+conf.set10('HAVE_LZ4', have_lz4)
want_zstd = get_option('zstd')
if want_zstd != 'false' and not skip_deps
libzstd = dependency('libzstd',
required : want_zstd == 'true',
version : '>= 1.4.0')
- have = libzstd.found()
+ have_zstd = libzstd.found()
else
- have = false
+ have_zstd = false
libzstd = []
endif
-conf.set10('HAVE_ZSTD', have)
+conf.set10('HAVE_ZSTD', have_zstd)
+
+conf.set10('HAVE_COMPRESSION', have_xz or have_lz4 or have_zstd)
want_xkbcommon = get_option('xkbcommon')
if want_xkbcommon != 'false' and not skip_deps
'tmpfiles',
'hwdb',
'rfkill',
+ 'xdg-autostart',
'ldconfig',
'efi',
'tpm',
'src/libudev',
'src/core',
'src/shutdown',
+ 'src/xdg-autostart-generator',
'src/libsystemd/sd-bus',
'src/libsystemd/sd-device',
'src/libsystemd/sd-event',
subdir('src/resolve')
subdir('src/timedate')
subdir('src/timesync')
+subdir('src/tmpfiles')
subdir('src/vconsole')
subdir('src/boot/efi')
build_by_default : want_tests != 'false')
foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
- ['systemd', 'ENABLE_NSS_SYSTEMD', 'src/nss-systemd/userdb-glue.c src/nss-systemd/userdb-glue.h'],
+ ['systemd', 'ENABLE_NSS_SYSTEMD', 'src/nss-systemd/userdb-glue.c src/nss-systemd/userdb-glue.h src/nss-systemd/nss-systemd.h'],
['mymachines', 'ENABLE_NSS_MYMACHINES'],
['resolve', 'ENABLE_NSS_RESOLVE']]
libcrypt,
libopenssl,
libfdisk,
- libp11kit],
+ libp11kit,
+ libfido2],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
libcrypt,
libopenssl,
libp11kit,
+ libfido2,
libpwquality],
install_rpath : rootlibexecdir,
install : true,
endif
endif
-foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit']
+foreach alias : (['halt', 'poweroff', 'reboot', 'shutdown'] +
+ (conf.get('HAVE_SYSV_COMPAT') == 1 ? ['runlevel', 'telinit'] : []))
meson.add_install_script(meson_make_symlink,
join_paths(rootbindir, 'systemctl'),
join_paths(rootsbindir, alias))
endforeach
+meson.add_install_script(meson_make_symlink,
+ join_paths(rootbindir, 'udevadm'),
+ join_paths(rootlibexecdir, 'systemd-udevd'))
+
if conf.get('ENABLE_BACKLIGHT') == 1
executable(
'systemd-backlight',
install_dir : systemgeneratordir)
endif
+if conf.get('ENABLE_XDG_AUTOSTART') == 1
+ executable(
+ 'systemd-xdg-autostart-generator',
+ 'src/xdg-autostart-generator/xdg-autostart-generator.c',
+ 'src/xdg-autostart-generator/xdg-autostart-service.c',
+ include_directories : includes,
+ link_with : [libshared],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : usergeneratordir)
+
+ executable(
+ 'systemd-xdg-autostart-condition',
+ 'src/xdg-autostart-generator/xdg-autostart-condition.c',
+ include_directories : includes,
+ link_with : [libshared],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+endif
+
if conf.get('ENABLE_HOSTNAMED') == 1
executable(
'systemd-hostnamed',
include_directories : includes,
link_with : [libshared],
install_rpath : rootlibexecdir,
- install : true,
+ install : (conf.get('HAVE_SYSV_COMPAT') == 1),
install_dir : rootlibexecdir)
public_programs += executable(
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
+
+ if have_standalone_binaries
+ public_programs += executable(
+ 'systemd-sysusers.standalone',
+ 'src/sysusers/sysusers.c',
+ include_directories : includes,
+ link_with : [libshared_static,
+ libbasic,
+ libbasic_gcrypt,
+ libsystemd_static,
+ libjournal_client],
+ install : true,
+ install_dir : rootbindir)
+ endif
endif
if conf.get('ENABLE_TMPFILES') == 1
exe = executable(
'systemd-tmpfiles',
- 'src/tmpfiles/tmpfiles.c',
- 'src/tmpfiles/offline-passwd.c',
- 'src/tmpfiles/offline-passwd.h',
+ systemd_tmpfiles_sources,
include_directories : includes,
link_with : [libshared],
dependencies : [libacl],
# https://github.com/mesonbuild/meson/issues/2681
args : exe.full_path())
endif
+
+ if have_standalone_binaries
+ public_programs += executable(
+ 'systemd-tmpfiles.standalone',
+ systemd_tmpfiles_sources,
+ include_directories : includes,
+ link_with : [libshared_static,
+ libbasic,
+ libbasic_gcrypt,
+ libsystemd_static,
+ libjournal_client],
+ dependencies : [libacl],
+ install : true,
+ install_dir : rootbindir)
+ endif
endif
if conf.get('ENABLE_HWDB') == 1
install : true,
install_dir : rootlibexecdir)
-public_programs += executable(
- 'systemd-udevd',
- systemd_udevd_sources,
- include_directories : includes,
- c_args : '-DLOG_REALM=LOG_REALM_UDEV',
- link_with : [libudev_core,
- libsystemd_network,
- libudev_static],
- dependencies : [versiondep,
- threads,
- libkmod,
- libidn,
- libacl,
- libblkid],
- install_rpath : udev_rpath,
- install : true,
- install_dir : rootlibexecdir)
-
public_programs += executable(
'udevadm',
udevadm_sources,
if name != prev
if want_tests == 'false'
message('Not compiling @0@ because tests is set to false'.format(name))
- elif slow_tests
+ elif slow_tests or fuzz_tests
exe = custom_target(
name,
output : name,
'@OUTPUT@'],
build_by_default : true)
else
- message('Not compiling @0@ because slow-tests is set to false'.format(name))
+ message('Not compiling @0@ because slow-tests/fuzz-tests is set to false'.format(name))
endif
endif
prev = name
- if want_tests != 'false' and slow_tests
+ if want_tests != 'false' and (slow_tests or fuzz_tests)
test('@0@:@1@:@2@'.format(b, c, sanitizer),
env,
env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
['pwquality'],
['libfdisk'],
['p11kit'],
+ ['libfido2'],
['AUDIT'],
['IMA'],
['AppArmor'],
['randomseed'],
['backlight'],
['rfkill'],
+ ['xdg-autostart'],
['logind'],
['machined'],
['portabled'],