conf.set10('HAVE_SYSV_COMPAT', sysvinit_path != '' and sysvrcnd_path != '',
description : 'SysV init scripts and rcN.d links are supported')
+if get_option('hibernate') and not get_option('initrd')
+ error('hibernate depends on initrd')
+endif
+
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', 512*1024)
cc = meson.get_compiler('c')
pkgconfig = import('pkgconfig')
-check_compilation_sh = find_program('tools/meson-check-compilation.sh')
+check_compilation_sh = find_program('tools/check-compilation.sh')
meson_build_sh = find_program('tools/meson-build.sh')
want_tests = get_option('tests')
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')
+have = cc.has_argument('-Wzero-length-bounds')
+conf.set10('HAVE_ZERO_LENGTH_BOUNDS', have)
+
if cc.compiles('''
#include <time.h>
#include <inttypes.h>
############################################################
-conf.set_quoted('FALLBACK_HOSTNAME', get_option('fallback-hostname'))
+fallback_hostname = get_option('fallback-hostname')
+if fallback_hostname == '' or fallback_hostname[0] == '.' or fallback_hostname[0] == '-'
+ error('Invalid fallback-hostname configuration')
+ # A more extensive test is done in test-hostname-util. Let's catch
+ # the most obvious errors here so we don't fail with an assert later.
+endif
+conf.set_quoted('FALLBACK_HOSTNAME', fallback_hostname)
+
conf.set10('ENABLE_COMPAT_GATEWAY_HOSTNAME', get_option('compat-gateway-hostname'))
gateway_hostnames = ['_gateway'] + (conf.get('ENABLE_COMPAT_GATEWAY_HOSTNAME') == 1 ? ['gateway'] : [])
time_epoch = get_option('time-epoch')
if time_epoch == -1
- NEWS = files('NEWS')
- time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout().to_int()
+ source_date_epoch = run_command('sh', ['-c', 'echo "$SOURCE_DATE_EPOCH"']).stdout().strip()
+ if source_date_epoch != ''
+ time_epoch = source_date_epoch.to_int()
+ else
+ NEWS = files('NEWS')
+ time_epoch = run_command(stat, '-c', '%Y', NEWS).stdout().to_int()
+ endif
endif
conf.set('TIME_EPOCH', time_epoch)
'smack',
'gshadow',
'idn',
+ 'initrd',
'nss-myhostname',
'nss-systemd']
have = get_option(term)
includes = include_directories('src/basic',
'src/boot',
+ 'src/home',
'src/shared',
'src/systemd',
'src/journal',
include_directories : includes,
link_with : [libshared],
install_rpath : rootlibexecdir,
- install : true,
+ install : conf.get('ENABLE_INITRD') == 1,
install_dir : rootlibexecdir)
executable(
exe = executable(
'systemd-tmpfiles',
'src/tmpfiles/tmpfiles.c',
+ 'src/tmpfiles/offline-passwd.c',
+ 'src/tmpfiles/offline-passwd.h',
include_directories : includes,
link_with : [libshared],
dependencies : [libacl],
make_directive_index_py = find_program('tools/make-directive-index.py')
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')
+hwdb_update_sh = find_program('tools/hwdb-update.sh')
+autosuspend_update_sh = find_program('tools/autosuspend-update.sh')
subdir('sysctl.d')
subdir('sysusers.d')
############################################################
-meson_check_help = find_program('tools/meson-check-help.sh')
+check_help = find_program('tools/check-help.sh')
foreach exec : public_programs
name = exec.full_path().split('/')[-1]
if want_tests != 'false'
test('check-help-' + name,
- meson_check_help,
+ check_help,
args : exec.full_path())
endif
endforeach
endif
if git.found()
- meson_git_contrib_sh = find_program('tools/meson-git-contrib.sh')
+ git_contrib_sh = find_program('tools/git-contrib.sh')
run_target(
'git-contrib',
- command : [meson_git_contrib_sh])
+ command : [git_contrib_sh])
endif
if git.found()
############################################################
-meson_check_api_docs_sh = find_program('tools/meson-check-api-docs.sh')
+check_api_docs_sh = find_program('tools/check-api-docs.sh')
run_target(
'check-api-docs',
depends : [man, libsystemd, libudev],
- command : [meson_check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
+ command : [check_api_docs_sh, libsystemd.full_path(), libudev.full_path()])
############################################################
watchdog_opt = service_watchdog == '' ? 'disabled' : service_watchdog
['openssl'],
['libcurl'],
['idn'],
+ ['initrd'],
['libidn2'],
['libidn'],
['libiptc'],