# SPDX-License-Identifier: LGPL-2.1+
project('systemd', 'c',
- version : '243',
+ version : '244',
license : 'LGPLv2+',
default_options: [
'c_std=gnu99',
'prefix=/usr',
'sysconfdir=/etc',
'localstatedir=/var',
+ 'warning_level=2',
],
meson_version : '>= 0.46',
)
-libsystemd_version = '0.27.0'
-libudev_version = '1.6.15'
+libsystemd_version = '0.27.1'
+libudev_version = '1.6.16'
# We need the same data in two different formats, ugh!
# Also, for hysterical reasons, we use different variable
conf.set_quoted('VENDOR_KEYRING_PATH', join_paths(rootlibexecdir, 'import-pubring.gpg'))
conf.set_quoted('USER_KEYRING_PATH', join_paths(pkgsysconfdir, 'import-pubring.gpg'))
conf.set_quoted('DOCUMENT_ROOT', join_paths(pkgdatadir, 'gatewayd'))
+conf.set_quoted('SYSTEMD_USERWORK_PATH', join_paths(rootlibexecdir, 'systemd-userwork'))
conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default)
conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', memory_accounting_default ? 'yes' : 'no')
conf.set('STATUS_UNIT_FORMAT_DEFAULT', 'STATUS_UNIT_FORMAT_' + status_unit_format_default.to_upper())
if add_languages('cpp', required : fuzzer_build)
# Used only for tests
- cxx_cmd = ' '.join(meson.get_compiler('cpp').cmd_array())
+ cxx = meson.get_compiler('cpp')
+ cxx_cmd = ' '.join(cxx.cmd_array())
else
cxx_cmd = ''
endif
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
+# avoid them.
+basic_disabled_warnings = [
+ '-Wno-unused-parameter',
+ '-Wno-missing-field-initializers',
+ '-Wno-unused-result',
+ '-Wno-format-signedness',
+]
+if get_option('b_ndebug') == 'true'
+ # With asserts disabled with get a bunch of warnings about variables which
+ # are used only in the asserts. This is not useful at all, so let's just silence
+ # those warnings.
+ basic_disabled_warnings += [
+ '-Wno-unused-variable',
+ '-Wno-unused-but-set-variable',
+ ]
+endif
+
possible_cc_flags = [
- '-Wextra',
'-Werror=undef',
'-Wlogical-op',
'-Wmissing-include-dirs',
'-Wnested-externs',
# negative arguments are correctly detected starting with meson 0.46.
- '-Wno-unused-parameter',
- '-Wno-missing-field-initializers',
- '-Wno-unused-result',
- '-Wno-format-signedness',
'-Wno-error=#warnings', # clang
'-Wno-string-plus-int', # clang
possible_link_flags += '-Wl,--gc-sections'
endif
-if get_option('b_ndebug') == 'true'
- # With asserts disabled with get a bunch of warnings about variables which
- # are used only in the asserts. This is not useful at all, so let's just silence
- # those warnings.
- possible_cc_flags += [
- '-Wno-unused-variable',
- '-Wno-unused-but-set-variable',
- ]
-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')
add_project_arguments('-Werror=shadow', language : 'c')
endif
+if cxx_cmd != ''
+ add_project_arguments(cxx.get_supported_arguments(basic_disabled_warnings), language : 'cpp')
+endif
+
cpp = ' '.join(cc.cmd_array()) + ' -E'
has_wstringop_truncation = cc.has_argument('-Wstringop-truncation')
#include <unistd.h>'''],
['get_mempolicy', '''#include <stdlib.h>
#include <unistd.h>'''],
+ ['pidfd_send_signal', '''#include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <sys/wait.h>'''],
+ ['pidfd_open', '''#include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <sys/wait.h>'''],
+ ['rt_sigqueueinfo', '''#include <stdlib.h>
+ #include <unistd.h>
+ #include <signal.h>
+ #include <sys/wait.h>'''],
]
have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
endif
conf.set10('HAVE_OPENSSL', have)
+want_p11kit = get_option('p11kit')
+if want_p11kit != 'false' and not skip_deps
+ libp11kit = dependency('p11-kit-1',
+ version : '>= 0.23.3',
+ required : want_p11kit == 'true')
+ have = libp11kit.found()
+else
+ have = false
+ libp11kit = []
+endif
+conf.set10('HAVE_P11KIT', have)
+
want_elfutils = get_option('elfutils')
if want_elfutils != 'false' and not skip_deps
libdw = dependency('libdw',
'localed',
'machined',
'portabled',
+ 'userdb',
'networkd',
'timedated',
'timesyncd',
subdir('src/locale')
subdir('src/machine')
subdir('src/portable')
+subdir('src/userdb')
subdir('src/nspawn')
subdir('src/resolve')
subdir('src/timedate')
build_by_default : want_tests != 'false')
foreach tuple : [['myhostname', 'ENABLE_NSS_MYHOSTNAME'],
- ['systemd', 'ENABLE_NSS_SYSTEMD'],
+ ['systemd', 'ENABLE_NSS_SYSTEMD', 'src/nss-systemd/userdb-glue.c src/nss-systemd/userdb-glue.h'],
['mymachines', 'ENABLE_NSS_MYMACHINES'],
['resolve', 'ENABLE_NSS_RESOLVE']]
sym = 'src/nss-@0@/nss-@0@.sym'.format(module)
version_script_arg = join_paths(project_source_root, sym)
+ sources = ['src/nss-@0@/nss-@0@.c'.format(module)]
+ if tuple.length() > 2
+ sources += tuple[2].split()
+ endif
+
nss = shared_library(
'nss_' + module,
- 'src/nss-@0@/nss-@0@.c'.format(module),
+ sources,
disable_mempool_c,
version : '2',
include_directories : includes,
public_programs += exe
endif
+if conf.get('ENABLE_USERDB') == 1
+ executable('systemd-userwork',
+ systemd_userwork_sources,
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [threads],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+
+ executable('systemd-userdbd',
+ systemd_userdbd_sources,
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [threads],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+
+ executable('userdbctl',
+ userdbctl_sources,
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [threads],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootbindir)
+endif
+
foreach alias : ['halt', 'poweroff', 'reboot', 'runlevel', 'shutdown', 'telinit']
meson.add_install_script(meson_make_symlink,
join_paths(rootbindir, 'systemctl'),
install_dir : systemgeneratordir)
if conf.get('HAVE_LIBCRYPTSETUP') == 1
+ systemd_cryptsetup_sources = files('''
+ src/cryptsetup/cryptsetup.c
+ src/cryptsetup/cryptsetup-pkcs11.h
+'''.split())
+
+ if conf.get('HAVE_P11KIT') == 1
+ systemd_cryptsetup_sources += files('src/cryptsetup/cryptsetup-pkcs11.c')
+ endif
+
executable('systemd-cryptsetup',
- 'src/cryptsetup/cryptsetup.c',
+ systemd_cryptsetup_sources,
include_directories : includes,
link_with : [libshared],
- dependencies : [libcryptsetup],
+ dependencies : [libcryptsetup,
+ libp11kit],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
link_with : [libnetworkd_core,
libsystemd_network,
libudev_static,
- libshared],
+ networkd_link_with],
dependencies : [threads],
install_rpath : rootlibexecdir,
install : true,
systemd_networkd_wait_online_sources,
include_directories : includes,
link_with : [libnetworkd_core,
- libshared],
+ networkd_link_with],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
networkctl_sources,
include_directories : includes,
link_with : [libsystemd_network,
- libshared],
+ networkd_link_with],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootbindir)
executable('systemd-network-generator',
network_generator_sources,
include_directories : includes,
- link_with : [libshared],
+ link_with : [networkd_link_with],
install_rpath : rootlibexecdir,
install : true,
install_dir : rootlibexecdir)
make_man_index_py = find_program('tools/make-man-index.py')
xml_helper_py = find_program('tools/xml_helper.py')
hwdb_update_sh = find_program('tools/meson-hwdb-update.sh')
+autosuspend_update_sh = find_program('tools/meson-autosuspend-update.sh')
subdir('sysctl.d')
subdir('sysusers.d')
foreach tuple : [
['libcryptsetup'],
['PAM'],
+ ['p11kit'],
['AUDIT'],
['IMA'],
['AppArmor'],
['logind'],
['machined'],
['portabled'],
+ ['userdb'],
['importd'],
['hostnamed'],
['timedated'],
['trace logging', conf.get('LOG_TRACE') == 1],
['link-udev-shared', get_option('link-udev-shared')],
['link-systemctl-shared', get_option('link-systemctl-shared')],
+ ['link-networkd-shared', get_option('link-networkd-shared')],
]
if tuple.length() >= 2