# SPDX-License-Identifier: LGPL-2.1+
project('systemd', 'c',
- version : '246',
+ version : '247',
license : 'LGPLv2+',
default_options: [
'c_std=gnu99',
meson_version : '>= 0.46',
)
-libsystemd_version = '0.29.0'
+libsystemd_version = '0.30.0'
libudev_version = '1.7.0'
# We need the same data in two different formats, ugh!
project_source_root).stdout().strip()
conf.set_quoted('RELATIVE_SOURCE_PATH', relative_source_path)
-conf.set10('DEVELOPER_MODE', get_option('mode') == 'developer',
- description : 'enable additional checks only suitable in development')
+conf.set('BUILD_MODE', 'BUILD_MODE_' + get_option('mode').to_upper(),
+ description : 'tailor build to development or release builds')
want_ossfuzz = get_option('oss-fuzz')
want_libfuzzer = get_option('llvm-fuzz')
#include <unistd.h>
#include <signal.h>
#include <sys/wait.h>'''],
+ ['mallinfo', '''#include <malloc.h>'''],
+ ['close_range', '''#include <unistd.h>'''],
]
have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
crypt_header = conf.get('HAVE_CRYPT_H') == 1 ? '''#include <crypt.h>''' : '''#include <unistd.h>'''
foreach ident : [
- ['crypt_ra', crypt_header],
- ['crypt_gensalt_ra', crypt_header]]
+ ['crypt_ra', crypt_header],
+ ['crypt_preferred_method', crypt_header],
+ ['crypt_gensalt_ra', crypt_header]]
have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE',
dependencies : libcrypt)
have = have and conf.get('HAVE_PAM') == 1
conf.set10('ENABLE_PAM_HOME', have)
+have = get_option('oomd')
+if have == 'auto'
+ have = get_option('mode') == 'developer'
+else
+ have = have == 'true'
+ if have and get_option('mode') != 'developer'
+ error('oomd is not available in release mode (yet)')
+ endif
+endif
+conf.set10('ENABLE_OOMD', have)
+substs.set10('ENABLE_OOMD', have)
+
want_remote = get_option('remote')
if want_remote != 'false'
have_deps = [conf.get('HAVE_MICROHTTPD') == 1,
have = get_option(term)
name = 'ENABLE_' + term.underscorify().to_upper()
conf.set10(name, have)
+ substs.set10(name, have)
endforeach
enable_sysusers = conf.get('ENABLE_SYSUSERS') == 1
includes = include_directories('src/basic',
'src/boot',
+ 'src/core',
'src/home',
- 'src/shared',
- 'src/systemd',
'src/journal',
'src/journal-remote',
- 'src/nspawn',
- 'src/resolve',
- 'src/timesync',
- 'src/time-wait-sync',
- 'src/login',
- 'src/udev',
- 'src/libudev',
- 'src/core',
- 'src/shutdown',
- 'src/xdg-autostart-generator',
+ 'src/libsystemd-network',
'src/libsystemd/sd-bus',
'src/libsystemd/sd-device',
'src/libsystemd/sd-event',
'src/libsystemd/sd-netlink',
'src/libsystemd/sd-network',
'src/libsystemd/sd-resolve',
- 'src/libsystemd-network',
+ 'src/libudev',
+ 'src/login',
+ 'src/nspawn',
+ 'src/resolve',
+ 'src/shared',
+ 'src/shutdown',
+ 'src/systemd',
+ 'src/time-wait-sync',
+ 'src/timesync',
+ 'src/udev',
+ 'src/xdg-autostart-generator',
'.')
add_project_arguments('-include', 'config.h', language : 'c')
subdir('src/journal-remote')
subdir('src/coredump')
subdir('src/pstore')
+subdir('src/oom')
subdir('src/hostname')
subdir('src/import')
subdir('src/partition')
public_programs += executable(
'systemctl',
+ 'src/systemctl/systemctl-add-dependency.c',
+ 'src/systemctl/systemctl-add-dependency.h',
+ 'src/systemctl/systemctl-cancel-job.c',
+ 'src/systemctl/systemctl-cancel-job.h',
+ 'src/systemctl/systemctl-clean-or-freeze.c',
+ 'src/systemctl/systemctl-clean-or-freeze.h',
+ 'src/systemctl/systemctl-compat-halt.c',
+ 'src/systemctl/systemctl-compat-halt.h',
+ 'src/systemctl/systemctl-compat-runlevel.c',
+ 'src/systemctl/systemctl-compat-runlevel.h',
+ 'src/systemctl/systemctl-compat-shutdown.c',
+ 'src/systemctl/systemctl-compat-shutdown.h',
+ 'src/systemctl/systemctl-compat-telinit.c',
+ 'src/systemctl/systemctl-compat-telinit.h',
+ 'src/systemctl/systemctl-daemon-reload.c',
+ 'src/systemctl/systemctl-daemon-reload.h',
+ 'src/systemctl/systemctl-edit.c',
+ 'src/systemctl/systemctl-edit.h',
+ 'src/systemctl/systemctl-enable.c',
+ 'src/systemctl/systemctl-enable.h',
+ 'src/systemctl/systemctl-is-active.c',
+ 'src/systemctl/systemctl-is-active.h',
+ 'src/systemctl/systemctl-is-enabled.c',
+ 'src/systemctl/systemctl-is-enabled.h',
+ 'src/systemctl/systemctl-is-system-running.c',
+ 'src/systemctl/systemctl-is-system-running.h',
+ 'src/systemctl/systemctl-kill.c',
+ 'src/systemctl/systemctl-kill.h',
+ 'src/systemctl/systemctl-list-dependencies.c',
+ 'src/systemctl/systemctl-list-dependencies.h',
+ 'src/systemctl/systemctl-list-jobs.c',
+ 'src/systemctl/systemctl-list-jobs.h',
+ 'src/systemctl/systemctl-list-machines.c',
+ 'src/systemctl/systemctl-list-machines.h',
+ 'src/systemctl/systemctl-list-unit-files.c',
+ 'src/systemctl/systemctl-list-unit-files.h',
+ 'src/systemctl/systemctl-list-units.c',
+ 'src/systemctl/systemctl-list-units.h',
+ 'src/systemctl/systemctl-log-setting.c',
+ 'src/systemctl/systemctl-log-setting.h',
+ 'src/systemctl/systemctl-logind.c',
+ 'src/systemctl/systemctl-logind.h',
+ 'src/systemctl/systemctl-preset-all.c',
+ 'src/systemctl/systemctl-preset-all.h',
+ 'src/systemctl/systemctl-reset-failed.c',
+ 'src/systemctl/systemctl-reset-failed.h',
+ 'src/systemctl/systemctl-service-watchdogs.c',
+ 'src/systemctl/systemctl-service-watchdogs.h',
+ 'src/systemctl/systemctl-set-default.c',
+ 'src/systemctl/systemctl-set-default.h',
+ 'src/systemctl/systemctl-set-environment.c',
+ 'src/systemctl/systemctl-set-environment.h',
+ 'src/systemctl/systemctl-set-property.c',
+ 'src/systemctl/systemctl-set-property.h',
+ 'src/systemctl/systemctl-show.c',
+ 'src/systemctl/systemctl-show.h',
+ 'src/systemctl/systemctl-start-special.c',
+ 'src/systemctl/systemctl-start-special.h',
+ 'src/systemctl/systemctl-start-unit.c',
+ 'src/systemctl/systemctl-start-unit.h',
+ 'src/systemctl/systemctl-switch-root.c',
+ 'src/systemctl/systemctl-switch-root.h',
+ 'src/systemctl/systemctl-sysv-compat.c',
+ 'src/systemctl/systemctl-sysv-compat.h',
+ 'src/systemctl/systemctl-trivial-method.c',
+ 'src/systemctl/systemctl-trivial-method.h',
+ 'src/systemctl/systemctl-util.c',
+ 'src/systemctl/systemctl-util.c',
+ 'src/systemctl/systemctl-util.h',
'src/systemctl/systemctl.c',
- 'src/systemctl/sysv-compat.h',
- 'src/systemctl/sysv-compat.c',
+ 'src/systemctl/systemctl.h',
include_directories : includes,
link_with : systemctl_link_with,
dependencies : [threads,
install_dir : rootlibexecdir)
endif
+if conf.get('ENABLE_OOMD') == 1
+ executable('systemd-oomd',
+ systemd_oomd_sources,
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+
+ public_programs += executable(
+ 'oomctl',
+ oomctl_sources,
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootbindir)
+endif
+
if conf.get('ENABLE_BINFMT') == 1
public_programs += executable(
'systemd-binfmt',
'systemd-sysusers.standalone',
'src/sysusers/sysusers.c',
include_directories : includes,
+ c_args : '-DSTANDALONE',
link_with : [libshared_static,
libbasic,
libbasic_gcrypt,
'systemd-tmpfiles.standalone',
systemd_tmpfiles_sources,
include_directories : includes,
+ c_args : '-DSTANDALONE',
link_with : [libshared_static,
libbasic,
libbasic_gcrypt,
type = tuple.length() >= 5 ? tuple[4] : ''
defs = tuple.length() >= 6 ? tuple[5] : []
incs = tuple.length() >= 7 ? tuple[6] : includes
+ parallel = tuple.length() >= 8 ? tuple[7] : true
timeout = 30
name = sources[0].split('/')[-1].split('.')[0]
['DNS-over-TLS(openssl)', conf.get('DNS_OVER_TLS_USE_OPENSSL') == 1],
['coredump'],
['pstore'],
+ ['oomd'],
['polkit'],
['legacy pkla', install_polkit_pkla],
['efi'],