diff options
author | Thomas Haller <thaller@redhat.com> | 2021-02-16 21:33:30 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2021-02-16 21:55:34 +0100 |
commit | ea198096ebe53938f963afe6b737d2eca3979212 (patch) | |
tree | eea0a9f2a045ac1afa8a860750ef0af8ee609f1a | |
parent | ea4c64deea96ba4becab23692cd970d19dd076c8 (diff) |
build: rename build option "--with-polkit-agent-helper-1{-path,}"
Suggested-by: Michael Biebl <biebl@debian.org>
(cherry picked from commit d9968b133b32fbfbc5e726a8fc96e38cc044c831)
-rw-r--r-- | configure.ac | 9 | ||||
-rw-r--r-- | meson.build | 5 | ||||
-rw-r--r-- | meson_options.txt | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 5e7d67c340..9d37ce6d7a 100644 --- a/configure.ac +++ b/configure.ac @@ -642,9 +642,9 @@ fi AC_DEFINE_UNQUOTED(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT, "$enable_polkit", [The default value of the auth-polkit configuration option]) AC_SUBST(NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT, "$enable_polkit") -AC_ARG_WITH([polkit-agent-helper-1-path], - AS_HELP_STRING([--with-polkit-agent-helper-1-path=PATH], - [Path name to the polkit-agent-helper-1 binary from polkit]), +AC_ARG_WITH([polkit-agent-helper-1], + AS_HELP_STRING([--with-polkit-agent-helper-1=/path/to/polkit-agent-helper-1], + [Path to the polkit-agent-helper-1 binary from polkit]), POLKIT_AGENT_HELPER_1_PATH="$withval", POLKIT_AGENT_HELPER_1_PATH="") if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then @@ -658,6 +658,9 @@ if test -z "$POLKIT_AGENT_HELPER_1_PATH" ; then done fi test -z "$POLKIT_AGENT_HELPER_1_PATH" && POLKIT_AGENT_HELPER_1_PATH=/usr/lib/polkit-1/polkit-agent-helper-1 +if test "$POLKIT_AGENT_HELPER_1_PATH" = "${POLKIT_AGENT_HELPER_1_PATH#/}" ; then + AC_MSG_ERROR(["polkit_agent_helper_1 must be an absolute path, but is '$POLKIT_AGENT_HELPER_1_PATH'"]) +fi AC_DEFINE_UNQUOTED([POLKIT_AGENT_HELPER_1_PATH], ["$POLKIT_AGENT_HELPER_1_PATH"], [path to polkit-agent-helper-1 binary]) diff --git a/meson.build b/meson.build index bf6055b41a..1bfe20249d 100644 --- a/meson.build +++ b/meson.build @@ -514,7 +514,7 @@ config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_def enable_modify_system = get_option('modify_system') -polkit_agent_helper_1_path = get_option('polkit_agent_helper_1_path') +polkit_agent_helper_1_path = get_option('polkit_agent_helper_1') foreach p : [ '/usr/libexec/polkit-agent-helper-1', '/usr/lib/polkit-1/polkit-agent-helper-1', '/usr/lib/policykit-1/polkit-agent-helper-1' ] @@ -525,6 +525,9 @@ endforeach if polkit_agent_helper_1_path == '' polkit_agent_helper_1_path = '/usr/lib/polkit-1/polkit-agent-helper-1' endif +if polkit_agent_helper_1_path[0] != '/' + error('polkit_agent_helper_1 must be an absolute path, but is ' + polkit_agent_helper_1_path) +endif config_h.set_quoted('POLKIT_AGENT_HELPER_1_PATH', polkit_agent_helper_1_path) diff --git a/meson_options.txt b/meson_options.txt index 71de3206e6..5100ed71f5 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -16,7 +16,7 @@ option('suspend_resume', type: 'combo', choices: ['upower', 'systemd', 'elogind' option('polkit', type: 'boolean', value: true, description: 'User auth-polkit configuration option.') option('config_auth_polkit_default', type: 'combo', choices: ['default', 'true', 'false', 'root-only'], value: 'default', description: 'Default value for configuration main.auth-polkit.') option('modify_system', type: 'boolean', value: false, description: 'Allow users to modify system connections') -option('polkit_agent_helper_1_path', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') +option('polkit_agent_helper_1', type: 'string', value: '', description: 'Path name to the polkit-agent-helper-1 binary from polkit') option('selinux', type: 'boolean', value: true, description: 'Build with SELinux') option('systemd_journal', type: 'boolean', value: true, description: 'Use systemd journal for logging') option('config_logging_backend_default', type: 'combo', choices: ['default', 'syslog', 'journal'], value: 'default', description: 'Default value for logging.backend') |