diff options
author | Thomas Haller <thaller@redhat.com> | 2019-12-10 10:01:24 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2019-12-11 13:13:05 +0100 |
commit | d27fcd07541ae6f524115d5b0f36e14673135ca3 (patch) | |
tree | 9612ca9e2d9cd2e03a3eaee945334f55df2e0652 /meson.build | |
parent | 2534be89a178f66bff6cef7a792eb4378c7d4ef5 (diff) | |
download | NetworkManager-d27fcd07541ae6f524115d5b0f36e14673135ca3.tar.gz |
build/meson: allow configuring default for main.auth-polkit setting
We always build PolicyKit support, because it merely depends on some
D-Bus calls. However, there are two things to configure:
- the default value for main.auth-polkit in NetworkManager.conf. This
is now called "-Dconfig_auth_polkit_default=$VAL".
- whether to install the policy file. This is called "-Dpolkit=$VAL".
These settings are mostly independent, so add "config_auth_polkit_default" to
make the default explicitly configurable.
(cherry picked from commit c21c6bc0be2a4467402bc2d8718859dedb10b676)
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 13a5ae1648..bde86bae79 100644 --- a/meson.build +++ b/meson.build @@ -464,8 +464,11 @@ if enable_polkit polkit_gobject_policydir = dependency('polkit-gobject-1').get_pkgconfig_variable('policydir', define_variable: ['prefix', nm_prefix]) endif -config_default_main_auth_polkit = enable_polkit.to_string() -config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_default_main_auth_polkit) +config_auth_polkit_default = get_option('config_auth_polkit_default') +if config_auth_polkit_default == 'default' + config_auth_polkit_default = (enable_polkit ? 'true' : 'false') +endif +config_h.set_quoted('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT', config_auth_polkit_default) enable_modify_system = get_option('modify_system') @@ -784,7 +787,7 @@ data_conf = configuration_data() data_conf.set('DISTRO_NETWORK_SERVICE', (enable_ifcfg_rh ? 'network.service' : '')) data_conf.set('NM_CONFIG_DEFAULT_LOGGING_AUDIT_TEXT', config_default_logging_audit) data_conf.set('NM_CONFIG_DEFAULT_LOGGING_BACKEND_TEXT', config_logging_backend_default) -data_conf.set('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT', config_default_main_auth_polkit) +data_conf.set('NM_CONFIG_DEFAULT_MAIN_AUTH_POLKIT_TEXT', config_auth_polkit_default) data_conf.set('NM_CONFIG_DEFAULT_MAIN_DHCP', config_dhcp_default) data_conf.set('NM_CONFIG_DEFAULT_MAIN_RC_MANAGER', config_dns_rc_manager_default) data_conf.set('NM_MAJOR_VERSION', nm_major_version) @@ -935,10 +938,9 @@ output += ' nmplugindir: ' + nm_plugindir + '\n' output += '\nPlatform:\n' output += ' session tracking: ' + ','.join(session_trackers) + '\n' output += ' suspend/resume: ' + suspend_resume + '\n' -output += ' policykit: ' + enable_polkit.to_string() +output += ' policykit: ' + enable_polkit.to_string() + ' (default: ' + config_auth_polkit_default + ')' if enable_polkit - modify = (enable_modify_system ? 'permissive' : 'restrictive') - output += ' (' + modify + ' modify.system) (default: main.auth-polkit=true)' + output += ' (' + (enable_modify_system ? 'permissive' : 'restrictive') + ' modify.system)' endif output += '\n' output += ' polkit agent: ' + enable_polkit_agent.to_string() + '\n' |