libudev_version = '1.7.4'
conf = configuration_data()
-conf.set_quoted('PROJECT_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
+conf.set_quoted('PROJECT_URL', 'https://systemd.io/')
conf.set('PROJECT_VERSION', meson.project_version(),
description : 'Numerical project version (used where a simple number is expected)')
conf.set10('BUILD_MODE_DEVELOPER', get_option('mode') == 'developer',
description : 'tailor build to development or release builds')
+verification = get_option('log-message-verification')
+if verification == 'auto'
+ verification = conf.get('BUILD_MODE_DEVELOPER') == 1
+else
+ verification = verification == 'true'
+endif
+conf.set10('LOG_MESSAGE_VERIFICATION', verification)
want_ossfuzz = get_option('oss-fuzz')
want_libfuzzer = get_option('llvm-fuzz')
skip_deps = want_ossfuzz or get_option('skip-deps')
fuzzer_build = want_ossfuzz or want_libfuzzer
+# If we're building *not* for actual fuzzing, allow input samples of any size
+# (for testing and for reproduction of issues discovered with previously-higher
+# limits).
+conf.set10('FUZZ_USE_SIZE_LIMIT', fuzzer_build)
+
# Create a title-less summary section early, so it ends up first in the output.
# More items are added later after they have been detected.
summary({'build mode' : get_option('mode')})
rootlibdir = get_option('rootlibdir')
if rootlibdir == ''
- rootlibdir = rootprefixdir / libdir.split('/')[-1]
+ # This will be a relative path if libdir is in prefix.
+ rootlibdir = get_option('libdir')
+endif
+if not rootlibdir.startswith('/')
+ # If we have a relative path, add rootprefixdir to the front.
+ rootlibdir = rootprefixdir / rootlibdir
endif
+rootpkglibdir = rootlibdir / 'systemd'
install_sysconfdir = get_option('install-sysconfdir') != 'false'
install_sysconfdir_samples = get_option('install-sysconfdir') == 'true'
userunitdir = prefixdir / 'lib/systemd/user'
userpresetdir = prefixdir / 'lib/systemd/user-preset'
tmpfilesdir = prefixdir / 'lib/tmpfiles.d'
+usertmpfilesdir = prefixdir / 'share/user-tmpfiles.d'
sysusersdir = prefixdir / 'lib/sysusers.d'
sysctldir = prefixdir / 'lib/sysctl.d'
binfmtdir = prefixdir / 'lib/binfmt.d'
memory_accounting_default = get_option('memory-accounting-default')
status_unit_format_default = get_option('status-unit-format-default')
+if status_unit_format_default == 'auto'
+ status_unit_format_default = conf.get('BUILD_MODE_DEVELOPER') == 1 ? 'name' : 'description'
+endif
conf.set_quoted('BINFMT_DIR', binfmtdir)
conf.set_quoted('BOOTLIBDIR', bootlibdir)
conf.set_quoted('SYSTEM_SYSVRCND_PATH', sysvrcnd_path)
conf.set_quoted('SYSUSERS_DIR', sysusersdir)
conf.set_quoted('TMPFILES_DIR', tmpfilesdir)
+conf.set_quoted('USER_TMPFILES_DIR', usertmpfilesdir)
conf.set_quoted('UDEVLIBEXECDIR', udevlibexecdir)
conf.set_quoted('UDEV_HWDB_DIR', udevhwdbdir)
conf.set_quoted('UDEV_RULES_DIR', udevrulesdir)
cc = meson.get_compiler('c')
pkgconfig = import('pkgconfig')
-check_compilation_sh = find_program('tools/check-compilation.sh')
meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
'-Werror=shift-overflow=2',
'-Werror=undef',
'-Wfloat-equal',
+ # gperf prevents us from enabling this because it does not emit fallthrough
+ # attribute with clang.
+ #'-Wimplicit-fallthrough',
'-Wimplicit-fallthrough=5',
'-Winit-self',
'-Wlogical-op',
]
endif
+if get_option('mode') == 'release'
+ # We could enable 'pattern' for developer mode, but that can interfere with
+ # valgrind and sanitizer builds. Also, clang does not zero-initialize unions,
+ # breaking some of our code (https://reviews.llvm.org/D68115).
+ possible_common_cc_flags += '-ftrivial-auto-var-init=zero'
+endif
+
possible_cc_flags = possible_common_cc_flags + [
'-Werror=missing-declarations',
'-Werror=missing-prototypes',
possible_link_flags += '-Wl,--gc-sections'
endif
+if get_option('mode') == 'developer'
+ possible_cc_flags += '-fno-omit-frame-pointer'
+endif
+
add_project_arguments(cc.get_supported_arguments(basic_disabled_warnings), language : 'c')
add_project_arguments(cc.get_supported_arguments(possible_cc_flags), language : 'c')
add_project_link_arguments(cc.get_supported_link_arguments(possible_link_flags), language : 'c')
const char * in_word_set(const char *, @0@);
@1@
'''
-gperf_snippet_format = 'echo foo,bar | @0@ -L ANSI-C'
-gperf_snippet = run_command(sh, '-c', gperf_snippet_format.format(gperf.path()),
+gperf_snippet = run_command(sh, '-c', 'echo foo,bar | "$1" -L ANSI-C', '_', gperf,
check : true)
gperf_test = gperf_test_format.format('size_t', gperf_snippet.stdout())
if cc.compiles(gperf_test)
conf.set_quoted('NTP_SERVERS', ntp_servers)
default_locale = get_option('default-locale')
-if default_locale == ''
- if not meson.is_cross_build()
- choose_default_locale_sh = find_program('tools/choose-default-locale.sh')
- default_locale = run_command(choose_default_locale_sh,
- check : true).stdout().strip()
- else
- default_locale = 'C.UTF-8'
- endif
-endif
conf.set_quoted('SYSTEMD_DEFAULT_LOCALE', default_locale)
+nspawn_locale = get_option('nspawn-locale')
+conf.set_quoted('SYSTEMD_NSPAWN_LOCALE', nspawn_locale)
+
localegen_path = get_option('localegen-path')
if localegen_path != ''
conf.set_quoted('LOCALEGEN_PATH', localegen_path)
libbpf = dependency('libbpf', required : bpf_framework_required, version : '>= 0.2')
conf.set10('HAVE_LIBBPF', libbpf.found())
-if want_bpf_framework == 'false' or not libbpf.found()
- conf.set10('BPF_FRAMEWORK', 0)
+if want_bpf_framework == 'false' or not libbpf.found() or skip_deps
+ conf.set10('BPF_FRAMEWORK', false)
else
- # Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
- # (like clang-10/llvm-strip-10)
- if meson.is_cross_build() or cc.get_id() != 'clang' or cc.cmd_array()[0].contains('afl-clang') or cc.cmd_array()[0].contains('hfuzz-clang')
- r = find_program('clang', required : bpf_framework_required, version : '>= 10.0.0')
- clang_found = r.found()
- if clang_found
- if meson.version().version_compare('>= 0.55')
- clang = [r.full_path()]
- else
- clang = [r.path()]
+ bpf_compiler = get_option('bpf-compiler')
+ clang_found = false
+ clang_supports_bpf = false
+ bpf_gcc_found = false
+ deps_found = false
+
+ if bpf_compiler == 'clang'
+ # Support 'versioned' clang/llvm-strip binaries, as seen on Debian/Ubuntu
+ # (like clang-10/llvm-strip-10)
+ if meson.is_cross_build() or cc.get_id() != 'clang' or cc.cmd_array()[0].contains('afl-clang') or cc.cmd_array()[0].contains('hfuzz-clang')
+ r = find_program('clang', required : bpf_framework_required, version : '>= 10.0.0')
+ clang_found = r.found()
+ if clang_found
+ clang = r.path()
endif
+ # Assume that the required flags are supported by the found clang.
+ clang_supports_flags = clang_found
+ else
+ clang_found = true
+ clang = cc.cmd_array()
+ clang_supports_flags = cc.has_argument('-Wno-compare-distinct-pointer-types')
endif
- # Assume that the required flags are supported by the found clang.
- clang_supports_flags = clang_found
- else
- clang_found = true
- clang = cc.cmd_array()
- clang_supports_flags = cc.has_argument('-Wno-compare-distinct-pointer-types')
- endif
- if clang_found
- # Check if 'clang -target bpf' is supported.
- clang_supports_bpf = run_command(clang, '-target', 'bpf', '--print-supported-cpus', check : false).returncode() == 0
- else
- clang_supports_bpf = false
+ if clang_found
+ # Check if 'clang -target bpf' is supported.
+ clang_supports_bpf = run_command(clang, '-target', 'bpf', '--print-supported-cpus', check : false).returncode() == 0
+ endif
+ elif bpf_compiler == 'gcc'
+ warning('GCC BPF Compiler support is experimental and not recommended.')
+ bpf_gcc = find_program('bpf-gcc',
+ required : true,
+ version : '>= 12.1.0')
+ bpf_gcc_found = bpf_gcc.found()
endif
- # Debian installs this in /usr/sbin/ which is not in $PATH.
- # We check for 'bpftool' first, honouring $PATH, and in /usr/sbin/ for Debian.
- # We use 'bpftool gen' subcommand, it was added by 985ead416df39d6fe8e89580cc1db6aa273e0175 (v5.6).
- bpftool = find_program('bpftool',
- '/usr/sbin/bpftool',
- required : false,
- version : '>= 5.13.0')
-
- if bpftool.found()
- bpftool_strip = true
- else
- bpftool_strip = false
+ if clang_supports_bpf or bpf_gcc_found
+ # Debian installs this in /usr/sbin/ which is not in $PATH.
+ # We check for 'bpftool' first, honouring $PATH, and in /usr/sbin/ for Debian.
+ # We use 'bpftool gen object' subcommand for bpftool strip, it was added by d80b2fcbe0a023619e0fc73112f2a02c2662f6ab (v5.13).
bpftool = find_program('bpftool',
'/usr/sbin/bpftool',
- required : bpf_framework_required,
- version : '>= 5.6.0')
- endif
+ required : false,
+ version : '>= 5.13.0')
- if not bpftool_strip
- if not meson.is_cross_build() and clang_found
- llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',
- check : true).stdout().strip()
+ if bpftool.found()
+ bpftool_strip = true
+ deps_found = true
else
- llvm_strip_bin = 'llvm-strip'
+ bpftool_strip = false
+ # We require the 'bpftool gen skeleton' subcommand, it was added by 985ead416df39d6fe8e89580cc1db6aa273e0175 (v5.6).
+ bpftool = find_program('bpftool',
+ '/usr/sbin/bpftool',
+ required : bpf_framework_required,
+ version : '>= 5.6.0')
endif
- llvm_strip = find_program(llvm_strip_bin, required : bpf_framework_required, version : '>= 10.0.0')
- endif
- deps_found = clang_found and clang_supports_bpf and clang_supports_flags and (bpftool_strip or llvm_strip.found()) and bpftool.found()
+ # We use `llvm-strip` as a fallback if `bpftool gen object` strip support is not available.
+ if not bpftool_strip and bpftool.found() and clang_supports_bpf
+ if not meson.is_cross_build()
+ llvm_strip_bin = run_command(clang, '--print-prog-name', 'llvm-strip',
+ check : true).stdout().strip()
+ else
+ llvm_strip_bin = 'llvm-strip'
+ endif
+ llvm_strip = find_program(llvm_strip_bin, required : bpf_framework_required, version : '>= 10.0.0')
+ deps_found = llvm_strip.found()
+ endif
+ endif
# Can build BPF program from source code in restricted C
conf.set10('BPF_FRAMEWORK', deps_found)
conf.set10('HAVE_XKBCOMMON', have)
want_pcre2 = get_option('pcre2')
-if want_pcre2 != 'false'
+if want_pcre2 != 'false' and not skip_deps
libpcre2 = dependency('libpcre2-8',
required : want_pcre2 == 'true')
have = libpcre2.found()
endif
endif
endif
-if dbus_interfaces_dir == dbusdatadir / 'interfaces' or dbus_interfaces_dir == 'no'
- dbus_interfaces_dir_name = 'interfaces'
- dbus_interfaces_dir_parent = dbusdatadir
-else
- elements = dbus_interfaces_dir.split('/')
- dbus_interfaces_dir_name = elements[-1]
- dbus_interfaces_dir_parent = '/'
- foreach elem : elements
- if elem == dbus_interfaces_dir_name and dbus_interfaces_dir == dbus_interfaces_dir_parent / dbus_interfaces_dir_name
- break
- endif
- dbus_interfaces_dir_parent = dbus_interfaces_dir_parent / elem
- endforeach
-endif
# We support one or the other. If gcrypt is available, we assume it's there to
# be used, and use it in preference.
error('Sorry, -Ddns-over-tls=gnutls is not supported when openssl is used as the cryptolib')
endif
- if dns_over_tls == 'openssl' or conf.get('PREFER_OPENSSL') == 1
- have_gnutls = false
+ if dns_over_tls == 'gnutls'
+ have_openssl = false
else
- have_gnutls = (conf.get('HAVE_GNUTLS') == 1 and libgnutls.version().version_compare('>= 3.6.0'))
- if dns_over_tls == 'gnutls' and not have_gnutls
- error('DNS-over-TLS support was requested with gnutls, but dependencies are not available')
+ have_openssl = conf.get('HAVE_OPENSSL') == 1
+ if dns_over_tls == 'openssl' and not have_openssl
+ error('DNS-over-TLS support was requested with openssl, but dependencies are not available')
endif
endif
- if dns_over_tls == 'gnutls' or have_gnutls
- have_openssl = false
+ if dns_over_tls == 'openssl' or have_openssl
+ have_gnutls = false
else
- have_openssl = conf.get('HAVE_OPENSSL') == 1
- if dns_over_tls != 'auto' and not have_openssl
- str = dns_over_tls == 'openssl' ? ' with openssl' : ''
+ have_gnutls = conf.get('HAVE_GNUTLS') == 1 and libgnutls.version().version_compare('>= 3.6.0')
+ if dns_over_tls != 'auto' and not have_gnutls
+ str = dns_over_tls == 'gnutls' ? ' with gnutls' : ''
error('DNS-over-TLS support was requested@0@, but dependencies are not available'.format(str))
endif
endif
subdir('src/libudev')
subdir('src/cryptsetup/cryptsetup-tokens')
+alias_target('devel', libsystemd_pc, libudev_pc)
+
libsystemd = shared_library(
'systemd',
- disable_mempool_c,
version : libsystemd_version,
include_directories : libsystemd_includes,
link_args : ['-shared',
install_tag: 'libsystemd',
install_dir : rootlibdir)
+alias_target('libsystemd', libsystemd)
+
install_libsystemd_static = static_library(
'systemd',
libsystemd_sources,
basic_gcrypt_sources,
basic_compress_sources,
fundamental_sources,
- disable_mempool_c,
include_directories : libsystemd_includes,
build_by_default : static_libsystemd != 'false',
install : static_libsystemd != 'false',
libudev = shared_library(
'udev',
- disable_mempool_c,
version : libudev_version,
include_directories : includes,
link_args : ['-shared',
install_tag: 'libudev',
install_dir : rootlibdir)
+alias_target('libudev', libudev)
+
install_libudev_static = static_library(
'udev',
basic_sources,
shared_sources,
libsystemd_sources,
libudev_sources,
- disable_mempool_c,
include_directories : includes,
build_by_default : static_libudev != 'false',
install : static_libudev != 'false',
tpm2,
versiondep],
link_depends : cryptsetup_token_sym,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : libcryptsetup_plugins_dir)
endif
libfido2,
versiondep],
link_depends : cryptsetup_token_sym,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : libcryptsetup_plugins_dir)
endif
libp11kit,
versiondep],
link_depends : cryptsetup_token_sym,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : libcryptsetup_plugins_dir)
endif
subdir('src/timesync')
subdir('src/tmpfiles')
subdir('src/userdb')
-subdir('src/vconsole')
subdir('src/xdg-autostart-generator')
subdir('src/systemd')
test_dlopen = executable(
'test-dlopen',
test_dlopen_c,
- disable_mempool_c,
include_directories : includes,
link_with : [libbasic],
dependencies : [libdl],
nss = shared_library(
'nss_' + module,
sources,
- disable_mempool_c,
version : '2',
include_directories : incs,
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
librt],
link_depends : sym,
install : true,
+ install_tag : 'nss',
install_dir : rootlibdir)
# We cannot use shared_module because it does not support version suffix.
# Unfortunately shared_library insists on creating the symlink…
meson.add_install_script('sh', '-c',
'rm $DESTDIR@0@/libnss_@1@.so'
- .format(rootlibdir, module))
+ .format(rootlibdir, module),
+ install_tag : 'nss'
+ )
if want_tests != 'false'
test('dlopen-nss_' + module,
libshared],
dependencies : [versiondep,
libseccomp],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
dbus_programs += exe
rootlibexecdir / 'systemd',
rootsbindir / 'init')
-public_programs += executable(
+exe = executable(
'systemd-analyze',
systemd_analyze_sources,
include_directories : core_includes,
libshared],
dependencies : [versiondep,
libseccomp],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : conf.get('ENABLE_ANALYZE'))
+public_programs += exe
+
+if want_tests != 'false'
+ test('test-compare-versions',
+ test_compare_versions_sh,
+ args : exe.full_path())
+endif
executable(
'systemd-journald',
liblz4,
libselinux,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
link_with : [libjournal_core,
libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
liblz4,
libzstd,
libdl],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/getty-generator/getty-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/debug-generator/debug-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/run-generator/run-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/fstab-generator/fstab-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/environment-d-generator/environment-d-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : userenvgeneratordir)
'src/hibernate-resume/hibernate-resume-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/hibernate-resume/hibernate-resume.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : libblkid,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/dissect/dissect.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
endif
libbasic_gcrypt,
libsystemd_resolve_core],
dependencies : systemd_resolved_dependencies,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
lib_openssl_or_gcrypt,
libm,
libidn],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
meson.add_install_script(meson_make_symlink,
libshared],
dependencies : [threads,
libacl],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
liblz4,
libxz,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/login/inhibit.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
libpam_misc],
link_depends : pam_systemd_sym,
install : true,
+ install_tag : 'pam',
install_dir : pamlibdir)
if want_tests != 'false'
user_runtime_dir_sources,
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
'src/user-sessions/user-sessions.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
include_directories : includes,
link_with : [boot_link_with],
dependencies : [libblkid],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
include_directories : includes,
link_with : [boot_link_with],
dependencies : [libblkid],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/boot/bless-boot-generator.c',
include_directories : includes,
link_with : [boot_link_with],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : [libblkid],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
systemctl = executable(
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
public_programs += systemctl
include_directories : includes,
link_with : [libshared],
dependencies : [threads, libselinux],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
endif
systemd_sysext_sources,
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
- install : true,
- install_dir : rootbindir)
+ install_rpath : rootpkglibdir,
+ install : true)
endif
if conf.get('ENABLE_HOMED') == 1
libopenssl,
libfdisk,
libp11kit],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libcrypt,
libopenssl,
libm],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libopenssl,
libp11kit,
libdl],
- install_rpath : rootlibexecdir,
- install : true,
- install_dir : rootbindir)
+ install_rpath : rootpkglibdir,
+ install : true)
if conf.get('HAVE_PAM') == 1
version_script_arg = project_source_root / pam_systemd_home_sym
- pam_systemd = shared_library(
+ pam_systemd_home = shared_library(
'pam_systemd_home',
pam_systemd_home_c,
name_prefix : '',
libcrypt],
link_depends : pam_systemd_home_sym,
install : true,
+ install_tag : 'pam',
install_dir : pamlibdir)
+
+ if want_tests != 'false'
+ test('dlopen-pam_systemd_home',
+ test_dlopen,
+ # path to dlopen must include a slash
+ args : pam_systemd_home.full_path(),
+ depends : pam_systemd_home)
+ endif
endif
endif
'src/backlight/backlight.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
'src/rfkill/rfkill.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
'src/system-update-generator/system-update-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
link_with : [libshared],
dependencies : [libcryptsetup,
libp11kit],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/cryptsetup/cryptsetup-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
include_directories : includes,
link_with : [libshared],
dependencies : [libcryptsetup],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/veritysetup/veritysetup-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
libdl,
libopenssl,
libp11kit],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
executable(
include_directories : includes,
link_with : [libshared],
dependencies : [libcryptsetup],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
['src/integritysetup/integritysetup-generator.c', 'src/integritysetup/integrity-util.c'],
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
endif
'src/sysv-generator/sysv-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
'src/rc-local-generator/rc-local-generator.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : systemgeneratordir)
endif
systemd_xdg_autostart_generator_sources,
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : usergeneratordir)
'src/xdg-autostart-generator/xdg-autostart-condition.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
'src/hostname/hostnamed.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/hostname/hostnamectl.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
endif
include_directories : includes,
link_with : [libshared],
dependencies : deps,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
localectl_sources,
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
endif
'src/timedate/timedated.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
'timedatectl',
'src/timedate/timedatectl.c',
include_directories : includes,
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
link_with : [libshared],
dependencies : [libm],
install : true)
link_with : [libtimesyncd_core],
dependencies : [threads,
libm],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/timesync/wait-sync.c',
include_directories : includes,
link_with : [libtimesyncd_core],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
include_directories : includes,
link_with : [libmachine_core,
libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libz,
libbzip2,
libxz],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libz,
libbzip2,
libxz],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared,
lib_import_common],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libz,
libbzip2,
libxz],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
endif
libxz,
liblz4,
libzstd],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : [],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
endif
'src/binfmt/binfmt.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libblkid,
libfdisk,
libopenssl],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
public_programs += exe
'src/vconsole/vconsole-setup.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
'src/random-seed/random-seed.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : [libcrypt],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
endif
'src/remount-fs/remount-fs.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/machine-id-setup/machine-id-setup-main.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/fsck/fsck.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/partition/growfs.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/partition/makefs.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/sleep/sleep.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/sysctl/sysctl.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/ac-power/ac-power.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/detect-virt/detect-virt.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
'src/delta/delta.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
'src/escape/escape.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/notify/notify.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
link_with : [libshared],
dependencies : [threads,
libopenssl],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/volatile-root/volatile-root.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : conf.get('ENABLE_INITRD') == 1,
install_dir : rootlibexecdir)
'src/cgroups-agent/cgroups-agent.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/id128/id128.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += systemd_id128
'src/path/path.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
'src/ask-password/ask-password.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/reply-password/reply-password.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/tty-ask-password-agent/tty-ask-password-agent.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
'src/cgls/cgls.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
'src/cgtop/cgtop.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
executable(
'src/initctl/initctl.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : (conf.get('HAVE_SYSV_COMPAT') == 1),
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies: [libmount],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
meson.add_install_script(meson_make_symlink,
'src/run/run.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
include_directories : includes,
link_with : [libshared],
dependencies : [versiondep],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
public_programs += executable(
include_directories : includes,
link_with : [libshared],
dependencies : [versiondep],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
if enable_sysusers
'src/sysusers/sysusers.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
public_programs += exe
include_directories : includes,
link_with : [libshared],
dependencies : [libacl],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
public_programs += exe
if want_tests != 'false'
test('hwdb-test',
hwdb_test_sh,
+ suite : 'dist-check',
args : [systemd_hwdb.full_path()],
timeout : 90)
endif
'src/quotacheck/quotacheck.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
endif
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
dependencies : [threads,
libblkid,
libfdisk],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
public_programs += exe
include_directories : includes,
link_with : [libshared],
dependencies : [libmount],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/update-done/update-done.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [libaudit],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : (conf.get('ENABLE_UTMP') == 1),
install_dir : rootlibexecdir)
include_directories : includes,
link_with : [libshared],
dependencies : [libkmod],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
libshared],
dependencies : [libblkid,
libseccomp],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true)
if conf.get('ENABLE_NETWORKD') == 1
libsystemd_network,
networkd_link_with],
dependencies : [threads],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
systemd_networkd_wait_online_sources,
include_directories : includes,
link_with : [networkd_link_with],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
include_directories : libsystemd_network_includes,
link_with : [libsystemd_network,
networkd_link_with],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootbindir)
endif
network_generator_sources,
include_directories : includes,
link_with : [networkd_link_with],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
'src/sulogin-shell/sulogin-shell.c',
include_directories : includes,
link_with : [libshared],
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : true,
install_dir : rootlibexecdir)
type = ''
endif
+ suite = fs.name(fs.parent('@0@'.format(sources[0])))
+ # FIXME: Use str.replace() with meson >= 0.58.0
+ suite = suite.split('sd-')[-1]
+
if condition == '' or conf.get(condition) == 1
exe = executable(
name,
dependencies],
c_args : defs,
build_by_default : want_tests != 'false',
- install_rpath : rootlibexecdir,
+ install_rpath : rootpkglibdir,
install : install_tests,
install_dir : testsdir / type,
link_depends : runtest_env)
elif want_tests != 'false'
test(name, exe,
env : test_env,
- timeout : timeout)
+ timeout : timeout,
+ suite : suite)
endif
else
message('Not compiling @0@ because @1@ is not true'.format(name, condition))
if b == name
test('@0@_@1@'.format(b, c),
exe,
+ suite : 'fuzzers',
args : [project_source_root / p])
endif
endforeach
'docs/TRANSIENT-SETTINGS.md',
'docs/TRANSLATORS.md',
'docs/UIDS-GIDS.md',
- 'docs/GVARIANT-SERIALIZATION.md',
install_dir : docdir)
install_subdir('LICENSES',
if get_option('mode') == 'developer' and want_tests != 'false' and jekyll.found()
test('github-pages',
jekyll,
+ suite : 'dist-check',
args : ['build',
'--source', project_source_root / 'docs',
'--destination', project_build_root / '_site'])
if want_tests != 'false'
test('check-help-' + name,
check_help,
+ suite : 'dist-check',
args : exec.full_path(),
depends: exec)
test('check-version-' + name,
check_version,
+ suite : 'dist-check',
args : [exec.full_path(),
meson.project_version()],
depends: exec)
if want_tests != 'false'
test('check-directives',
check_directives_sh,
+ suite : 'dist-check',
args : [project_source_root, project_build_root])
endif
if fuzz_tests
test('@0@_@1@_@2@'.format(b, c, sanitizer),
env,
+ suite : 'fuzz+san',
env : ['UBSAN_OPTIONS=print_stacktrace=1:print_summary=1:halt_on_error=1'],
timeout : 60,
args : [exe.full_path(),
if not meson.is_cross_build()
custom_target(
'export-dbus-interfaces',
- output : dbus_interfaces_dir_name,
+ output : fs.name(dbus_interfaces_dir),
install : dbus_interfaces_dir != 'no',
- install_dir : dbus_interfaces_dir_parent,
+ install_dir : fs.parent(dbus_interfaces_dir),
command : [export_dbus_interfaces_py, '@OUTPUT@', dbus_programs])
endif
'default net.naming-scheme value' : default_net_naming_scheme,
'default KillUserProcesses value' : kill_user_processes,
'default locale' : default_locale,
+ 'default nspawn locale' : nspawn_locale,
+ 'default status unit format' : status_unit_format_default,
'default user $PATH' :
default_user_path != '' ? default_user_path : '(same as system services)',
'systemd service watchdog' : service_watchdog == '' ? 'disabled' : service_watchdog,