build: rename build option "--with-polkit-agent-helper-1{-path,}"

Suggested-by: Michael Biebl <biebl@debian.org>
This commit is contained in:
Thomas Haller 2021-02-16 21:33:30 +01:00
parent cd86b462fc
commit d9968b133b
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 11 additions and 5 deletions

View file

@ -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])

View file

@ -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)

View file

@ -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')