build: don't enable ifcfg-rh by default on RH distros

Now that the plugin is deprecated, it should be enabled only by
explicit user configuration.
This commit is contained in:
Beniamino Galvani 2023-05-31 09:07:59 +02:00
parent 3ad7e4b7e6
commit 9c90503ffe
3 changed files with 1 additions and 7 deletions

View file

@ -175,7 +175,6 @@ AC_CHECK_FUNCS([__secure_getenv secure_getenv])
AC_ARG_ENABLE(ifcfg-rh, AS_HELP_STRING([--enable-ifcfg-rh], [enable ifcfg-rh configuration plugin (Fedora/RHEL) (deprecated)]))
AC_ARG_ENABLE(ifupdown, AS_HELP_STRING([--enable-ifupdown], [enable ifupdown configuration plugin (Debian/Ubuntu)]))
# Default alternative plugins by distribution
AS_IF([test -z "$enable_ifcfg_rh" -a -d /etc/sysconfig/network-scripts], enable_ifcfg_rh=yes)
AS_IF([test -z "$enable_ifupdown" -a -f /etc/debian_version], enable_ifupdown=yes)
# Otherwise, plugins default to "no"
AS_IF([test -z "$enable_ifcfg_rh"], enable_ifcfg_rh=no)

View file

@ -289,11 +289,6 @@ glib_dep = declare_dependency(
)
enable_ifcfg_rh = get_option('ifcfg_rh')
if enable_ifcfg_rh == 'auto'
enable_ifcfg_rh = (run_command('test', '-e', '/etc/sysconfig/network-scripts').returncode() == 0)
else
enable_ifcfg_rh = (enable_ifcfg_rh != 'false')
endif
enable_ifupdown = get_option('ifupdown')
if enable_ifupdown == 'auto'

View file

@ -45,7 +45,7 @@ option('ebpf', type: 'combo', choices: ['auto', 'true', 'false'], description: '
# configuration plugins
option('config_plugins_default', type: 'string', value: '', description: 'Default configuration option for main.plugins setting, used as fallback if the configuration option is unset')
option('ifcfg_rh', type: 'combo', choices: ['auto', 'true', 'false'], value: 'auto', description: 'enable ifcfg-rh configuration plugin (Fedora/RHEL) (deprecated)')
option('ifcfg_rh', type: 'boolean', value: false, description: 'enable ifcfg-rh configuration plugin (Fedora/RHEL) (deprecated)')
option('ifupdown', type: 'combo', choices:['auto', 'true', 'false'], value: 'auto', description: 'enable ifupdown configuration plugin (Debian/Ubuntu)')
# handlers for resolv.conf