mirror of
https://github.com/systemd/systemd
synced 2026-04-24 16:04:51 +02:00
Compare commits
8 Commits
5674b74c4f
...
bab34bc12e
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bab34bc12e | ||
|
|
99d8cbceff | ||
|
|
8f04a1ca2b | ||
|
|
3761002eea | ||
|
|
e16793ee7e | ||
|
|
03b3b55e11 | ||
|
|
9f9be6ea28 | ||
|
|
ffb7406ba9 |
@ -4,6 +4,6 @@ custom_target(
|
|||||||
'README',
|
'README',
|
||||||
input : 'README.in',
|
input : 'README.in',
|
||||||
output : 'README',
|
output : 'README',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : conf.get('HAVE_SYSV_COMPAT') == 1,
|
install : conf.get('HAVE_SYSV_COMPAT') == 1,
|
||||||
install_dir : sysvinit_path)
|
install_dir : sysvinit_path)
|
||||||
|
|||||||
@ -6,6 +6,6 @@ custom_target(
|
|||||||
'locale.conf',
|
'locale.conf',
|
||||||
input : 'locale.conf.in',
|
input : 'locale.conf.in',
|
||||||
output : 'locale.conf',
|
output : 'locale.conf',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : factory_etc_dir)
|
install_dir : factory_etc_dir)
|
||||||
|
|||||||
@ -166,6 +166,7 @@
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
<xi:include href="standard-options.xml" xpointer="help" />
|
<xi:include href="standard-options.xml" xpointer="help" />
|
||||||
|
<xi:include href="standard-options.xml" xpointer="version" />
|
||||||
</variablelist>
|
</variablelist>
|
||||||
</refsect1>
|
</refsect1>
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ custom_entities_ent = custom_target(
|
|||||||
'custom-entities.ent',
|
'custom-entities.ent',
|
||||||
input : 'custom-entities.ent.in',
|
input : 'custom-entities.ent.in',
|
||||||
output : 'custom-entities.ent',
|
output : 'custom-entities.ent',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'])
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
|
||||||
|
|
||||||
man_pages = []
|
man_pages = []
|
||||||
html_pages = []
|
html_pages = []
|
||||||
|
|||||||
28
meson.build
28
meson.build
@ -1826,6 +1826,8 @@ config_h = configure_file(
|
|||||||
|
|
||||||
add_project_arguments('-include', 'config.h', language : 'c')
|
add_project_arguments('-include', 'config.h', language : 'c')
|
||||||
|
|
||||||
|
jinja2_cmdline = [meson_render_jinja2, config_h, version_h]
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
# binaries that have --help and are intended for use by humans,
|
# binaries that have --help and are intended for use by humans,
|
||||||
@ -2113,7 +2115,7 @@ endforeach
|
|||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
dbus_programs += executable(
|
exe = executable(
|
||||||
'systemd',
|
'systemd',
|
||||||
systemd_sources,
|
systemd_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
@ -2124,6 +2126,8 @@ dbus_programs += executable(
|
|||||||
install_rpath : rootlibexecdir,
|
install_rpath : rootlibexecdir,
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
|
dbus_programs += exe
|
||||||
|
public_programs += exe
|
||||||
|
|
||||||
meson.add_install_script(meson_make_symlink,
|
meson.add_install_script(meson_make_symlink,
|
||||||
rootlibexecdir / 'systemd',
|
rootlibexecdir / 'systemd',
|
||||||
@ -2680,7 +2684,7 @@ if conf.get('HAVE_LIBCRYPTSETUP') == 1
|
|||||||
install : true,
|
install : true,
|
||||||
install_dir : systemgeneratordir)
|
install_dir : systemgeneratordir)
|
||||||
|
|
||||||
executable(
|
public_programs += executable(
|
||||||
'systemd-cryptenroll',
|
'systemd-cryptenroll',
|
||||||
systemd_cryptenroll_sources,
|
systemd_cryptenroll_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
@ -3115,7 +3119,7 @@ if conf.get('ENABLE_RANDOMSEED') == 1
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
if conf.get('ENABLE_FIRSTBOOT') == 1
|
if conf.get('ENABLE_FIRSTBOOT') == 1
|
||||||
executable(
|
public_programs += executable(
|
||||||
'systemd-firstboot',
|
'systemd-firstboot',
|
||||||
'src/firstboot/firstboot.c',
|
'src/firstboot/firstboot.c',
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
@ -3605,7 +3609,7 @@ if conf.get('ENABLE_NETWORKD') == 1
|
|||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
|
|
||||||
executable(
|
public_programs += executable(
|
||||||
'systemd-networkd-wait-online',
|
'systemd-networkd-wait-online',
|
||||||
systemd_networkd_wait_online_sources,
|
systemd_networkd_wait_online_sources,
|
||||||
include_directories : includes,
|
include_directories : includes,
|
||||||
@ -3651,6 +3655,15 @@ executable(
|
|||||||
install : true,
|
install : true,
|
||||||
install_dir : rootlibexecdir)
|
install_dir : rootlibexecdir)
|
||||||
|
|
||||||
|
public_programs += custom_target(
|
||||||
|
'kernel-install',
|
||||||
|
input : kernel_install_in,
|
||||||
|
output : 'kernel-install',
|
||||||
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
|
install : want_kernel_install,
|
||||||
|
install_mode : 'rwxr-xr-x',
|
||||||
|
install_dir : bindir)
|
||||||
|
|
||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
runtest_env = custom_target(
|
runtest_env = custom_target(
|
||||||
@ -3891,6 +3904,7 @@ endif
|
|||||||
############################################################
|
############################################################
|
||||||
|
|
||||||
check_help = find_program('tools/check-help.sh')
|
check_help = find_program('tools/check-help.sh')
|
||||||
|
check_version = find_program('tools/check-version.sh')
|
||||||
|
|
||||||
foreach exec : public_programs
|
foreach exec : public_programs
|
||||||
name = exec.full_path().split('/')[-1]
|
name = exec.full_path().split('/')[-1]
|
||||||
@ -3899,6 +3913,12 @@ foreach exec : public_programs
|
|||||||
check_help,
|
check_help,
|
||||||
args : exec.full_path(),
|
args : exec.full_path(),
|
||||||
depends: exec)
|
depends: exec)
|
||||||
|
|
||||||
|
test('check-version-' + name,
|
||||||
|
check_version,
|
||||||
|
args : [exec.full_path(),
|
||||||
|
meson.project_version()],
|
||||||
|
depends: exec)
|
||||||
endif
|
endif
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
|
|||||||
@ -51,7 +51,7 @@ foreach file : rules_in
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : true,
|
install : true,
|
||||||
install_dir : udevrulesdir)
|
install_dir : udevrulesdir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|||||||
@ -14,7 +14,7 @@ custom_target(
|
|||||||
'systemctl',
|
'systemctl',
|
||||||
input : 'systemctl.in',
|
input : 'systemctl.in',
|
||||||
output : 'systemctl',
|
output : 'systemctl',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : bashcompletiondir != 'no',
|
install : bashcompletiondir != 'no',
|
||||||
install_dir : bashcompletiondir)
|
install_dir : bashcompletiondir)
|
||||||
|
|
||||||
|
|||||||
@ -9,7 +9,7 @@ custom_target(
|
|||||||
'_systemctl',
|
'_systemctl',
|
||||||
input : '_systemctl.in',
|
input : '_systemctl.in',
|
||||||
output : '_systemctl',
|
output : '_systemctl',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : zshcompletiondir != 'no',
|
install : zshcompletiondir != 'no',
|
||||||
install_dir : zshcompletiondir)
|
install_dir : zshcompletiondir)
|
||||||
|
|
||||||
|
|||||||
@ -1075,9 +1075,8 @@ static int help(void) {
|
|||||||
" -h --help Show this help\n"
|
" -h --help Show this help\n"
|
||||||
" --version Show version\n"
|
" --version Show version\n"
|
||||||
" --test Determine initial transaction, dump it and exit\n"
|
" --test Determine initial transaction, dump it and exit\n"
|
||||||
" --system In combination with --test: operate as system service manager\n"
|
" --system Combined with --test: operate in system mode\n"
|
||||||
" --user In combination with --test: operate as per-user service manager\n"
|
" --user Combined with --test: operate in user mode\n"
|
||||||
" --no-pager Do not pipe output into a pager\n"
|
|
||||||
" --dump-configuration-items Dump understood unit configuration items\n"
|
" --dump-configuration-items Dump understood unit configuration items\n"
|
||||||
" --dump-bus-properties Dump exposed bus properties\n"
|
" --dump-bus-properties Dump exposed bus properties\n"
|
||||||
" --bus-introspect=PATH Write XML introspection data\n"
|
" --bus-introspect=PATH Write XML introspection data\n"
|
||||||
@ -1087,14 +1086,17 @@ static int help(void) {
|
|||||||
" --crash-reboot[=BOOL] Reboot on crash\n"
|
" --crash-reboot[=BOOL] Reboot on crash\n"
|
||||||
" --crash-shell[=BOOL] Run shell on crash\n"
|
" --crash-shell[=BOOL] Run shell on crash\n"
|
||||||
" --confirm-spawn[=BOOL] Ask for confirmation when spawning processes\n"
|
" --confirm-spawn[=BOOL] Ask for confirmation when spawning processes\n"
|
||||||
" --show-status[=BOOL] Show status updates on the console during bootup\n"
|
" --show-status[=BOOL] Show status updates on the console during boot\n"
|
||||||
" --log-target=TARGET Set log target (console, journal, kmsg, journal-or-kmsg, null)\n"
|
" --log-target=TARGET Set log target (console, journal, kmsg,\n"
|
||||||
" --log-level=LEVEL Set log level (debug, info, notice, warning, err, crit, alert, emerg)\n"
|
" journal-or-kmsg, null)\n"
|
||||||
|
" --log-level=LEVEL Set log level (debug, info, notice, warning,\n"
|
||||||
|
" err, crit, alert, emerg)\n"
|
||||||
" --log-color[=BOOL] Highlight important log messages\n"
|
" --log-color[=BOOL] Highlight important log messages\n"
|
||||||
" --log-location[=BOOL] Include code location in log messages\n"
|
" --log-location[=BOOL] Include code location in log messages\n"
|
||||||
" --log-time[=BOOL] Prefix log messages with current time\n"
|
" --log-time[=BOOL] Prefix log messages with current time\n"
|
||||||
" --default-standard-output= Set default standard output for services\n"
|
" --default-standard-output= Set default standard output for services\n"
|
||||||
" --default-standard-error= Set default standard error output for services\n"
|
" --default-standard-error= Set default standard error output for services\n"
|
||||||
|
" --no-pager Do not pipe output into a pager\n"
|
||||||
"\nSee the %s for details.\n",
|
"\nSee the %s for details.\n",
|
||||||
program_invocation_short_name,
|
program_invocation_short_name,
|
||||||
ansi_highlight(),
|
ansi_highlight(),
|
||||||
|
|||||||
@ -151,7 +151,7 @@ load_fragment_gperf_gperf = custom_target(
|
|||||||
'load-fragment-gperf.gperf',
|
'load-fragment-gperf.gperf',
|
||||||
input : 'load-fragment-gperf.gperf.in',
|
input : 'load-fragment-gperf.gperf.in',
|
||||||
output: 'load-fragment-gperf.gperf',
|
output: 'load-fragment-gperf.gperf',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'])
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'])
|
||||||
|
|
||||||
load_fragment_gperf_c = custom_target(
|
load_fragment_gperf_c = custom_target(
|
||||||
'load-fragment-gperf.c',
|
'load-fragment-gperf.c',
|
||||||
@ -217,7 +217,7 @@ foreach item : in_files
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no'),
|
install : (dir == pkgsysconfdir) ? install_sysconfdir_samples : (dir != 'no'),
|
||||||
install_dir : dir)
|
install_dir : dir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|||||||
@ -984,37 +984,37 @@ static int help(void) {
|
|||||||
|
|
||||||
printf("%s [OPTIONS...]\n\n"
|
printf("%s [OPTIONS...]\n\n"
|
||||||
"Configures basic settings of the system.\n\n"
|
"Configures basic settings of the system.\n\n"
|
||||||
" -h --help Show this help\n"
|
" -h --help Show this help\n"
|
||||||
" --version Show package version\n"
|
" --version Show package version\n"
|
||||||
" --root=PATH Operate on an alternate filesystem root\n"
|
" --root=PATH Operate on an alternate filesystem root\n"
|
||||||
" --image=PATH Operate on an alternate filesystem image\n"
|
" --image=PATH Operate on an alternate filesystem image\n"
|
||||||
" --locale=LOCALE Set primary locale (LANG=)\n"
|
" --locale=LOCALE Set primary locale (LANG=)\n"
|
||||||
" --locale-messages=LOCALE Set message locale (LC_MESSAGES=)\n"
|
" --locale-messages=LOCALE Set message locale (LC_MESSAGES=)\n"
|
||||||
" --keymap=KEYMAP Set keymap\n"
|
" --keymap=KEYMAP Set keymap\n"
|
||||||
" --timezone=TIMEZONE Set timezone\n"
|
" --timezone=TIMEZONE Set timezone\n"
|
||||||
" --hostname=NAME Set hostname\n"
|
" --hostname=NAME Set hostname\n"
|
||||||
" --machine-ID=ID Set machine ID\n"
|
" --machine-ID=ID Set machine ID\n"
|
||||||
" --root-password=PASSWORD Set root password from plaintext password\n"
|
" --root-password=PASSWORD Set root password from plaintext password\n"
|
||||||
" --root-password-file=FILE Set root password from file\n"
|
" --root-password-file=FILE Set root password from file\n"
|
||||||
" --root-password-hashed=HASHED_PASSWORD Set root password from hashed password\n"
|
" --root-password-hashed=HASH Set root password from hashed password\n"
|
||||||
" --root-shell=SHELL Set root shell\n"
|
" --root-shell=SHELL Set root shell\n"
|
||||||
" --prompt-locale Prompt the user for locale settings\n"
|
" --prompt-locale Prompt the user for locale settings\n"
|
||||||
" --prompt-keymap Prompt the user for keymap settings\n"
|
" --prompt-keymap Prompt the user for keymap settings\n"
|
||||||
" --prompt-timezone Prompt the user for timezone\n"
|
" --prompt-timezone Prompt the user for timezone\n"
|
||||||
" --prompt-hostname Prompt the user for hostname\n"
|
" --prompt-hostname Prompt the user for hostname\n"
|
||||||
" --prompt-root-password Prompt the user for root password\n"
|
" --prompt-root-password Prompt the user for root password\n"
|
||||||
" --prompt-root-shell Prompt the user for root shell\n"
|
" --prompt-root-shell Prompt the user for root shell\n"
|
||||||
" --prompt Prompt for all of the above\n"
|
" --prompt Prompt for all of the above\n"
|
||||||
" --copy-locale Copy locale from host\n"
|
" --copy-locale Copy locale from host\n"
|
||||||
" --copy-keymap Copy keymap from host\n"
|
" --copy-keymap Copy keymap from host\n"
|
||||||
" --copy-timezone Copy timezone from host\n"
|
" --copy-timezone Copy timezone from host\n"
|
||||||
" --copy-root-password Copy root password from host\n"
|
" --copy-root-password Copy root password from host\n"
|
||||||
" --copy-root-shell Copy root shell from host\n"
|
" --copy-root-shell Copy root shell from host\n"
|
||||||
" --copy Copy locale, keymap, timezone, root password\n"
|
" --copy Copy locale, keymap, timezone, root password\n"
|
||||||
" --setup-machine-id Generate a new random machine ID\n"
|
" --setup-machine-id Generate a new random machine ID\n"
|
||||||
" --force Overwrite existing files\n"
|
" --force Overwrite existing files\n"
|
||||||
" --delete-root-password Delete root password\n"
|
" --delete-root-password Delete root password\n"
|
||||||
" --welcome=no Disable the welcome text\n"
|
" --welcome=no Disable the welcome text\n"
|
||||||
"\nSee the %s for details.\n",
|
"\nSee the %s for details.\n",
|
||||||
program_invocation_short_name,
|
program_invocation_short_name,
|
||||||
link);
|
link);
|
||||||
|
|||||||
@ -54,7 +54,7 @@ foreach tuple : in_files
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : tuple[1],
|
install : tuple[1],
|
||||||
install_dir : pkgsysconfdir)
|
install_dir : pkgsysconfdir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|||||||
@ -23,11 +23,12 @@ skip_remaining=77
|
|||||||
usage()
|
usage()
|
||||||
{
|
{
|
||||||
echo "Usage:"
|
echo "Usage:"
|
||||||
echo " $0 [OPTIONS...] add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE ...]"
|
echo " kernel-install [OPTIONS...] add KERNEL-VERSION KERNEL-IMAGE [INITRD-FILE...]"
|
||||||
echo " $0 [OPTIONS...] remove KERNEL-VERSION"
|
echo " kernel-install [OPTIONS...] remove KERNEL-VERSION"
|
||||||
echo " $0 [OPTIONS...] inspect"
|
echo " kernel-install [OPTIONS...] inspect"
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " -h, --help Print this help"
|
echo " -h, --help Print this help and exit"
|
||||||
|
echo " --version Print version string and exit"
|
||||||
echo " -v, --verbose Increase verbosity"
|
echo " -v, --verbose Increase verbosity"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,6 +60,13 @@ for i; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
for i; do
|
||||||
|
if [ "$i" = "--version" ]; then
|
||||||
|
echo "kernel-install {{PROJECT_VERSION}} ({{GIT_VERSION}})"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
export KERNEL_INSTALL_VERBOSE=0
|
export KERNEL_INSTALL_VERBOSE=0
|
||||||
if [ "$1" = "--verbose" ] || [ "$1" = "-v" ]; then
|
if [ "$1" = "--verbose" ] || [ "$1" = "-v" ]; then
|
||||||
shift
|
shift
|
||||||
@ -1,10 +1,8 @@
|
|||||||
# SPDX-License-Identifier: LGPL-2.1-or-later
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
|
||||||
if want_kernel_install
|
kernel_install_in = files('kernel-install.in')
|
||||||
install_data('kernel-install',
|
|
||||||
install_mode : 'rwxr-xr-x',
|
|
||||||
install_dir : bindir)
|
|
||||||
|
|
||||||
|
if want_kernel_install
|
||||||
install_data('50-depmod.install',
|
install_data('50-depmod.install',
|
||||||
'90-loaderentry.install',
|
'90-loaderentry.install',
|
||||||
install_mode : 'rwxr-xr-x',
|
install_mode : 'rwxr-xr-x',
|
||||||
|
|||||||
@ -186,7 +186,7 @@ custom_target(
|
|||||||
'libsystemd.pc',
|
'libsystemd.pc',
|
||||||
input : 'libsystemd.pc.in',
|
input : 'libsystemd.pc.in',
|
||||||
output : 'libsystemd.pc',
|
output : 'libsystemd.pc',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : pkgconfiglibdir != 'no',
|
install : pkgconfiglibdir != 'no',
|
||||||
install_dir : pkgconfiglibdir)
|
install_dir : pkgconfiglibdir)
|
||||||
|
|
||||||
|
|||||||
@ -38,7 +38,7 @@ custom_target(
|
|||||||
'libudev.pc',
|
'libudev.pc',
|
||||||
input : 'libudev.pc.in',
|
input : 'libudev.pc.in',
|
||||||
output : 'libudev.pc',
|
output : 'libudev.pc',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : pkgconfiglibdir != 'no',
|
install : pkgconfiglibdir != 'no',
|
||||||
install_dir : pkgconfiglibdir)
|
install_dir : pkgconfiglibdir)
|
||||||
|
|
||||||
|
|||||||
@ -80,7 +80,7 @@ foreach tuple : in_files
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : tuple[2] and install,
|
install : tuple[2] and install,
|
||||||
install_dir : dir)
|
install_dir : dir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|||||||
@ -168,7 +168,7 @@ custom_target(
|
|||||||
'resolved.conf',
|
'resolved.conf',
|
||||||
input : 'resolved.conf.in',
|
input : 'resolved.conf.in',
|
||||||
output : 'resolved.conf',
|
output : 'resolved.conf',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : conf.get('ENABLE_RESOLVE') == 1 and install_sysconfdir_samples,
|
install : conf.get('ENABLE_RESOLVE') == 1 and install_sysconfdir_samples,
|
||||||
install_dir : pkgsysconfdir)
|
install_dir : pkgsysconfdir)
|
||||||
|
|
||||||
|
|||||||
@ -18,7 +18,7 @@ foreach tuple : in_files
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output : file,
|
output : file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : tuple[1],
|
install : tuple[1],
|
||||||
install_dir : tuple.length() > 2 ? tuple[2] : '',
|
install_dir : tuple.length() > 2 ? tuple[2] : '',
|
||||||
build_by_default : true)
|
build_by_default : true)
|
||||||
|
|||||||
@ -39,7 +39,7 @@ custom_target(
|
|||||||
'timesyncd.conf',
|
'timesyncd.conf',
|
||||||
input : 'timesyncd.conf.in',
|
input : 'timesyncd.conf.in',
|
||||||
output : 'timesyncd.conf',
|
output : 'timesyncd.conf',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
|
install : conf.get('ENABLE_TIMESYNCD') == 1 and install_sysconfdir_samples,
|
||||||
install_dir : pkgsysconfdir)
|
install_dir : pkgsysconfdir)
|
||||||
|
|
||||||
|
|||||||
@ -166,7 +166,7 @@ custom_target(
|
|||||||
'udev.pc',
|
'udev.pc',
|
||||||
input : 'udev.pc.in',
|
input : 'udev.pc.in',
|
||||||
output : 'udev.pc',
|
output : 'udev.pc',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : pkgconfigdatadir != 'no',
|
install : pkgconfigdatadir != 'no',
|
||||||
install_dir : pkgconfigdatadir)
|
install_dir : pkgconfigdatadir)
|
||||||
|
|
||||||
|
|||||||
@ -4,6 +4,6 @@ custom_target(
|
|||||||
'90-vconsole.rules',
|
'90-vconsole.rules',
|
||||||
input : '90-vconsole.rules.in',
|
input : '90-vconsole.rules.in',
|
||||||
output : '90-vconsole.rules',
|
output : '90-vconsole.rules',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : conf.get('ENABLE_VCONSOLE') == 1,
|
install : conf.get('ENABLE_VCONSOLE') == 1,
|
||||||
install_dir : udevrulesdir)
|
install_dir : udevrulesdir)
|
||||||
|
|||||||
@ -16,7 +16,7 @@ custom_target(
|
|||||||
'50-coredump.conf',
|
'50-coredump.conf',
|
||||||
input : '50-coredump.conf.in',
|
input : '50-coredump.conf.in',
|
||||||
output : '50-coredump.conf',
|
output : '50-coredump.conf',
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : conf.get('ENABLE_COREDUMP') == 1,
|
install : conf.get('ENABLE_COREDUMP') == 1,
|
||||||
install_dir : sysctldir)
|
install_dir : sysctldir)
|
||||||
|
|
||||||
|
|||||||
@ -33,7 +33,7 @@ foreach tuple : in_files
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output: file,
|
output: file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : tuple[1],
|
install : tuple[1],
|
||||||
install_dir : sysusersdir)
|
install_dir : sysusersdir)
|
||||||
endforeach
|
endforeach
|
||||||
|
|||||||
@ -41,7 +41,7 @@ foreach pair : in_files
|
|||||||
pair[0],
|
pair[0],
|
||||||
input : pair[0] + '.in',
|
input : pair[0] + '.in',
|
||||||
output: pair[0],
|
output: pair[0],
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : enable_tmpfiles,
|
install : enable_tmpfiles,
|
||||||
install_dir : tmpfilesdir)
|
install_dir : tmpfilesdir)
|
||||||
else
|
else
|
||||||
|
|||||||
@ -3,8 +3,8 @@
|
|||||||
set -eu
|
set -eu
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
# Note: `grep ... >/dev/null` instead of just `grep -q` is used intentionally
|
# Note: 'grep ... >/dev/null' instead of just 'grep -q' is used intentionally
|
||||||
# here, since `grep -q` exits on the first match causing SIGPIPE being
|
# here, since 'grep -q' exits on the first match causing SIGPIPE being
|
||||||
# sent to the sender.
|
# sent to the sender.
|
||||||
|
|
||||||
BINARY="${1:?}"
|
BINARY="${1:?}"
|
||||||
@ -24,11 +24,11 @@ fi
|
|||||||
|
|
||||||
# --help prints something. Also catches case where args are ignored.
|
# --help prints something. Also catches case where args are ignored.
|
||||||
if ! "$BINARY" --help | grep . >/dev/null; then
|
if ! "$BINARY" --help | grep . >/dev/null; then
|
||||||
echo "$(basename "$BINARY") --help output is empty."
|
echo "$(basename "$BINARY") --help output is empty"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# no --help output to stdout
|
# no --help output to stderr
|
||||||
if "$BINARY" --help 2>&1 1>/dev/null | grep .; then
|
if "$BINARY" --help 2>&1 1>/dev/null | grep .; then
|
||||||
echo "$(basename "$BINARY") --help prints to stderr"
|
echo "$(basename "$BINARY") --help prints to stderr"
|
||||||
exit 3
|
exit 3
|
||||||
@ -39,3 +39,9 @@ if ! ("$BINARY" --no-such-parameter 2>&1 1>/dev/null || :) | grep . >/dev/null;
|
|||||||
echo "$(basename "$BINARY") with an unknown parameter does not print to stderr"
|
echo "$(basename "$BINARY") with an unknown parameter does not print to stderr"
|
||||||
exit 4
|
exit 4
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# --help and -h are equivalent
|
||||||
|
if ! diff <("$BINARY" -h) <("$BINARY" --help); then
|
||||||
|
echo "$(basename "$BINARY") --help and -h are not identical"
|
||||||
|
exit 5
|
||||||
|
fi
|
||||||
|
|||||||
36
tools/check-version.sh
Executable file
36
tools/check-version.sh
Executable file
@ -0,0 +1,36 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
||||||
|
set -eu
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
# Note: 'grep ... >/dev/null' instead of just 'grep -q' is used intentionally
|
||||||
|
# here, since 'grep -q' exits on the first match causing SIGPIPE being
|
||||||
|
# sent to the sender.
|
||||||
|
|
||||||
|
BINARY="${1:?}"
|
||||||
|
VERSION="${2:?}"
|
||||||
|
export SYSTEMD_LOG_LEVEL=info
|
||||||
|
|
||||||
|
if [[ ! -x "$BINARY" ]]; then
|
||||||
|
echo "$BINARY is not an executable"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# --version prints something. Also catches case where args are ignored.
|
||||||
|
if ! "$BINARY" --version | grep . >/dev/null; then
|
||||||
|
echo "$(basename "$BINARY") --version output is empty"
|
||||||
|
exit 2
|
||||||
|
fi
|
||||||
|
|
||||||
|
# no --version output to stderr
|
||||||
|
if "$BINARY" --version 2>&1 1>/dev/null | grep .; then
|
||||||
|
echo "$(basename "$BINARY") --version prints to stderr"
|
||||||
|
exit 3
|
||||||
|
fi
|
||||||
|
|
||||||
|
# project version appears in version output
|
||||||
|
out="$("$BINARY" --version)"
|
||||||
|
if ! grep -F "$VERSION" >/dev/null <<<"$out"; then
|
||||||
|
echo "$(basename "$BINARY") --version output does not match '$VERSION': $out"
|
||||||
|
exit 4
|
||||||
|
fi
|
||||||
@ -28,9 +28,10 @@ def render(filename, defines):
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
defines = parse_config_h(sys.argv[1])
|
defines = parse_config_h(sys.argv[1])
|
||||||
output = render(sys.argv[2], defines)
|
defines.update(parse_config_h(sys.argv[2]))
|
||||||
with open(sys.argv[3], 'w') as f:
|
output = render(sys.argv[3], defines)
|
||||||
|
with open(sys.argv[4], 'w') as f:
|
||||||
f.write(output)
|
f.write(output)
|
||||||
f.write('\n')
|
f.write('\n')
|
||||||
info = os.stat(sys.argv[2])
|
info = os.stat(sys.argv[3])
|
||||||
os.chmod(sys.argv[3], info.st_mode)
|
os.chmod(sys.argv[4], info.st_mode)
|
||||||
|
|||||||
@ -276,7 +276,7 @@ foreach tuple : in_units
|
|||||||
file,
|
file,
|
||||||
input : file + '.in',
|
input : file + '.in',
|
||||||
output : file,
|
output : file,
|
||||||
command : [meson_render_jinja2, config_h, '@INPUT@', '@OUTPUT@'],
|
command : [jinja2_cmdline, '@INPUT@', '@OUTPUT@'],
|
||||||
install : install,
|
install : install,
|
||||||
install_dir : systemunitdir)
|
install_dir : systemunitdir)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user