substs.set('PACKAGE_URL', 'https://www.freedesktop.org/wiki/Software/systemd')
substs.set('PACKAGE_VERSION', meson.project_version())
+want_ossfuzz = get_option('oss-fuzz')
+want_libfuzzer = get_option('llvm-fuzz')
+if want_ossfuzz and want_libfuzzer
+ error('only one of oss-fuzz and llvm-fuzz can be specified')
+endif
+fuzzer_build = want_ossfuzz or want_libfuzzer
+
#####################################################################
# Try to install the git pre-commit hook
conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '',
description : 'SysV init scripts and rcN.d links are supported')
+conf.set10('BUMP_PROC_SYS_FS_FILE_MAX', get_option('bump-proc-sys-fs-file-max'))
+conf.set10('BUMP_PROC_SYS_FS_NR_OPEN', get_option('bump-proc-sys-fs-nr-open'))
+conf.set('HIGH_RLIMIT_NOFILE', 256*1024)
+
# join_paths ignore the preceding arguments if an absolute component is
# encountered, so this should canonicalize various paths when they are
# absolute or relative.
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('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'true' : 'false')
+conf.set10('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default)
conf.set_quoted('MEMORY_ACCOUNTING_DEFAULT_YES_NO', memory_accounting_default ? 'yes' : 'no')
substs.set('prefix', prefixdir)
substs.set('RC_LOCAL_SCRIPT_PATH_START', get_option('rc-local'))
substs.set('RC_LOCAL_SCRIPT_PATH_STOP', get_option('halt-local'))
substs.set('MEMORY_ACCOUNTING_DEFAULT', memory_accounting_default ? 'yes' : 'no')
+substs.set('HIGH_RLIMIT_NOFILE', conf.get('HIGH_RLIMIT_NOFILE'))
#####################################################################
slow_tests = want_tests != 'false' and get_option('slow-tests')
install_tests = get_option('install-tests')
-cxx = find_program('c++', required : false)
+cxx = find_program('c++', required : fuzzer_build)
if cxx.found()
# Used only for tests
add_languages('cpp')
+ cxx_cmd = ' '.join(meson.get_compiler('cpp').cmd_array())
+else
+ cxx_cmd = ''
endif
-want_ossfuzz = get_option('oss-fuzz')
-want_libfuzzer = get_option('llvm-fuzz')
-fuzzer_build = want_ossfuzz or want_libfuzzer
-if want_ossfuzz and want_libfuzzer
- error('only one of oss-fuzz and llvm-fuzz can be specified')
-endif
if want_libfuzzer
fuzzing_engine = meson.get_compiler('cpp').find_library('Fuzzer')
-endif
-if want_ossfuzz
+elif want_ossfuzz
fuzzing_engine = meson.get_compiler('cpp').find_library('FuzzingEngine')
endif
['IFLA_MACVLAN_FLAGS', 'linux/if_link.h'],
['IFLA_IPVLAN_FLAGS', 'linux/if_link.h'],
['IFLA_PHYS_PORT_ID', 'linux/if_link.h'],
- ['IFLA_BOND_AD_INFO', 'linux/if_link.h'],
+ ['IFLA_BOND_AD_ACTOR_SYSTEM', 'linux/if_link.h'],
['IFLA_VLAN_PROTOCOL', 'linux/if_link.h'],
['IFLA_VXLAN_REMCSUM_NOPARTIAL', 'linux/if_link.h'],
['IFLA_VXLAN_GPE', 'linux/if_link.h'],
['VXCAN_INFO_PEER', 'linux/can/vxcan.h'],
['FOU_ATTR_REMCSUM_NOPARTIAL', 'linux/fou.h'],
['FOU_CMD_GET', 'linux/fou.h'],
- ['FOU_ENCAP_GUE', 'linux/fou.h'],
]
prefix = decl.length() > 2 ? decl[2] : ''
have = cc.has_header_symbol(decl[1], decl[0], prefix : prefix)
endif
foreach header : ['crypt.h',
'linux/btrfs.h',
+ 'linux/fou.h',
'linux/memfd.h',
'linux/vm_sockets.h',
'sys/auxv.h',
want_lz4 = get_option('lz4')
if want_lz4 != 'false' and not fuzzer_build
liblz4 = dependency('liblz4',
+ version : '>= 1.3.0',
required : want_lz4 == 'true')
have = liblz4.found()
else
libsystemd_sym_path = '@0@/@1@'.format(meson.current_source_dir(), libsystemd_sym)
libsystemd = shared_library(
'systemd',
- 'src/systemd/sd-id128.h', # pick a header file at random to work around old meson bug
+ disable_mempool_c,
version : libsystemd_version,
include_directories : includes,
link_args : ['-shared',
journal_client_sources,
basic_sources,
basic_gcrypt_sources,
+ disable_mempool_c,
include_directories : includes,
build_by_default : static_libsystemd != 'false',
install : static_libsystemd != 'false',
test_dlopen = executable(
'test-dlopen',
test_dlopen_c,
+ disable_mempool_c,
include_directories : includes,
link_with : [libbasic],
dependencies : [libdl],
nss = shared_library(
'nss_' + module,
'src/nss-@0@/nss-@0@.c'.format(module),
+ disable_mempool_c,
version : '2',
include_directories : includes,
# Note that we link NSS modules with '-z nodelete' so that mempools never get orphaned
args : pam_systemd.full_path())
endif
endif
-endif
-executable('systemd-user-runtime-dir',
- user_runtime_dir_sources,
- include_directories : includes,
- link_with : [libshared, liblogind_core],
- install_rpath : rootlibexecdir,
- install : true,
- install_dir : rootlibexecdir)
+ executable('systemd-user-runtime-dir',
+ user_runtime_dir_sources,
+ include_directories : includes,
+ link_with : [libshared],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+endif
if conf.get('HAVE_PAM') == 1
executable('systemd-user-sessions',
install_rpath : rootlibexecdir,
install : true)
public_programs += exe
+
+ executable('systemd-bless-boot',
+ 'src/boot/bless-boot.c',
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [libblkid],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+
+ executable('systemd-bless-boot-generator',
+ 'src/boot/bless-boot-generator.c',
+ include_directories : includes,
+ link_with : [libshared],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : systemgeneratordir)
endif
+executable('systemd-boot-check-no-failures',
+ 'src/boot/boot-check-no-failures.c',
+ include_directories : includes,
+ link_with : [libshared],
+ dependencies : [libblkid],
+ install_rpath : rootlibexecdir,
+ install : true,
+ install_dir : rootlibexecdir)
+
exe = executable('systemd-socket-activate', 'src/activate/activate.c',
include_directories : includes,
link_with : [libshared],
dependencies : [threads],
install_rpath : rootlibexecdir,
install : true,
- install_dir : rootlibexecdir)
+ install_dir : rootbindir)
public_programs += exe
endif
install : true,
install_dir : rootlibexecdir)
+exe = executable('systemd-id128',
+ 'src/id128/id128.c',
+ include_directories : includes,
+ link_with : [libshared],
+ install_rpath : rootlibexecdir,
+ install : true)
+public_programs += exe
+
exe = executable('systemd-path',
'src/path/path.c',
include_directories : includes,
subdir('docs/sysvinit')
subdir('docs/var-log')
-# FIXME: figure out if the warning is true:
-# https://github.com/mesonbuild/meson/wiki/Reference-manual#install_subdir
install_subdir('factory/etc',
install_dir : factorydir)
-
install_data('xorg/50-systemd-user.sh',
install_dir : xinitrcdir)
install_data('modprobe.d/systemd.conf',
'LICENSE.LGPL2.1',
'NEWS',
'README',
- 'docs/CODING_STYLE',
+ 'docs/CODING_STYLE.md',
'docs/DISTRO_PORTING.md',
'docs/ENVIRONMENT.md',
- 'docs/HACKING',
+ 'docs/HACKING.md',
'docs/TRANSIENT-SETTINGS.md',
'docs/TRANSLATORS.md',
'docs/UIDS-GIDS.md',
test('@0@:@1@:@2@'.format(b, c, sanitizer),
env,
args : [exe.full_path(),
- join_paths(meson.source_root(), 'test/fuzz', p)])
+ join_paths(meson.source_root(), p)])
endif
endforeach
endif
depends : [man, libsystemd, libudev],
command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
+run_target(
+ 'make-index-md',
+ command : ['sh', '@0@/tools/make-index-md.sh'.format(meson.source_root()), meson.source_root()])
+
############################################################
status = [
status += [
'time epoch: @0@ (@1@)'.format(time_epoch, alt_time_epoch)]
+status += [
+ 'static libsystemd: @0@'.format(static_libsystemd),
+ 'static libudev: @0@'.format(static_libudev)]
+
# TODO:
# CFLAGS: ${OUR_CFLAGS} ${CFLAGS}
# CPPFLAGS: ${OUR_CPPFLAGS} ${CPPFLAGS}
['debug mmap cache'],
['valgrind', conf.get('VALGRIND') == 1],
['trace logging', conf.get('LOG_TRACE') == 1],
+ ['link-udev-shared', get_option('link-udev-shared')],
+ ['link-systemctl-shared', get_option('link-systemctl-shared')],
]
if tuple.length() >= 2