From 3602ca6f0c6c7b79458ab80184b4af5334f3a843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 12 Nov 2019 15:38:19 +0100 Subject: meson: make user $PATH configurable This partially reverts db11487d1062655f17db54c4d710653f16c87313 (the logic to calculate the correct value is removed, we always use the same setting as for the system manager). Distributions have an easy mechanism to override this if they wish. I think making this configurable is better, because different distros clearly want different defaults here, and making this configurable is nice and clean. If we don't make it configurable, distros which either have to carry patches, or what would be worse, rely on some other configuration mechanism, like /etc/profile. Those other solutions do not apply everywhere (they usually require the shell to be used at some point), so it is better if we provide a nice way to override the default. Fixes #13469. --- meson.build | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 56b7bfea70..403705a6b1 100644 --- a/meson.build +++ b/meson.build @@ -824,6 +824,11 @@ conf.set10('ENABLE_DEBUG_SIPHASH', enable_debug_siphash) conf.set10('VALGRIND', get_option('valgrind')) conf.set10('LOG_TRACE', get_option('log-trace')) +default_user_path = get_option('user-path') +if default_user_path != '' + conf.set_quoted('DEFAULT_USER_PATH', default_user_path) +endif + ##################################################################### threads = dependency('threads') @@ -3119,6 +3124,8 @@ status = [ 'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme), 'default KillUserProcesses setting: @0@'.format(kill_user_processes), 'default locale: @0@'.format(default_locale), + 'default user $PATH: @0@'.format( + default_user_path != '' ? default_user_path : '(same as system services)'), 'systemd service watchdog: @0@'.format(watchdog_opt)] alt_dns_servers = '\n '.join(dns_servers.split(' ')) -- cgit v1.2.1 From 5bc655cd20569068fde2f45ecec78c36e8ec38b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 13 Nov 2019 22:22:58 +0100 Subject: meson: avoid ternary op in .format() meson 0.49 can't parse that for some reason. I'm keeping this separate so it can be reverted easily when we bump required meson version. --- meson.build | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'meson.build') diff --git a/meson.build b/meson.build index 403705a6b1..f6771af2c6 100644 --- a/meson.build +++ b/meson.build @@ -827,8 +827,13 @@ conf.set10('LOG_TRACE', get_option('log-trace')) default_user_path = get_option('user-path') if default_user_path != '' conf.set_quoted('DEFAULT_USER_PATH', default_user_path) + default_user_path_display = default_user_path +else + # meson 0.49 fails when ?: is used in .format() + default_user_path_display = '(same as system services)' endif + ##################################################################### threads = dependency('threads') @@ -3124,8 +3129,7 @@ status = [ 'default net.naming-scheme setting: @0@'.format(default_net_naming_scheme), 'default KillUserProcesses setting: @0@'.format(kill_user_processes), 'default locale: @0@'.format(default_locale), - 'default user $PATH: @0@'.format( - default_user_path != '' ? default_user_path : '(same as system services)'), + 'default user $PATH: @0@'.format(default_user_path_display), 'systemd service watchdog: @0@'.format(watchdog_opt)] alt_dns_servers = '\n '.join(dns_servers.split(' ')) -- cgit v1.2.1