From 4b65552ce2a8bbd0cf50ab9736770c85731e70b9 Mon Sep 17 00:00:00 2001 From: 3405691582 Date: Mon, 1 Sep 2025 15:22:48 -0400 Subject: [PATCH 1/3] Optionalize bash completion. To allow for a low-dependency installation of cloud-init, optionalize the bash-completion dependency, defaulted to true. This means behaviorally nothing changes, but that the bash-completion features can be easily turned off if not desired. --- meson.build | 22 ++++++++++++---------- meson_options.txt | 1 + 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/meson.build b/meson.build index 5b1851dbe1d..61f08beadb6 100644 --- a/meson.build +++ b/meson.build @@ -28,16 +28,18 @@ install_subdir( ) # Binaries and script entrypoints -bash_completions_dir = dependency('bash-completion').get_variable( - pkgconfig: 'completionsdir', - default_value: get_option('datadir') / 'bash-completion' / 'completions', -) -install_data( - 'bash_completion/cloud-init', - install_dir: bash_completions_dir, - install_mode: 'rw-r--r--', - install_tag: 'bin', -) +if get_option('bash-completion') + bash_completions_dir = dependency('bash-completion').get_variable( + pkgconfig: 'completionsdir', + default_value: get_option('datadir') / 'bash-completion' / 'completions', + ) + install_data( + 'bash_completion/cloud-init', + install_dir: bash_completions_dir, + install_mode: 'rw-r--r--', + install_tag: 'bin', + ) +endif install_data( [ diff --git a/meson_options.txt b/meson_options.txt index f75f408778a..eab32be9f89 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,3 +1,4 @@ option('init_system', type: 'string', value: 'systemd', description: 'Set target init system.') option('distro_templates', type: 'array', value: [], description: 'Distro template files to install. WARNING: Templates may change in the future. If using this option, be sure to check new releases for template file changes.') option('disable_sshd_keygen', type: 'boolean', value: false, description: 'Provide systemd service to disable sshd-keygen if present to avoid races with cloud-init.') +option('bash-completion', type: 'boolean', value: true, description: 'Bash completion for cloud-init.') From b3e2afadcc45ebc1d9a09b9f103ea2d4f54a05e3 Mon Sep 17 00:00:00 2001 From: 3405691582 Date: Wed, 3 Sep 2025 18:50:13 -0400 Subject: [PATCH 2/3] Update meson.build Co-authored-by: Chad Smith --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 61f08beadb6..db58e1d11f3 100644 --- a/meson.build +++ b/meson.build @@ -28,7 +28,7 @@ install_subdir( ) # Binaries and script entrypoints -if get_option('bash-completion') +if get_option('bash_completion') bash_completions_dir = dependency('bash-completion').get_variable( pkgconfig: 'completionsdir', default_value: get_option('datadir') / 'bash-completion' / 'completions', From 3cd44213106bd394b127bfd40d8d6dbcfbade36d Mon Sep 17 00:00:00 2001 From: 3405691582 Date: Wed, 3 Sep 2025 18:50:23 -0400 Subject: [PATCH 3/3] Update meson_options.txt Co-authored-by: Chad Smith --- meson_options.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson_options.txt b/meson_options.txt index eab32be9f89..13de1f8cd39 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,4 +1,4 @@ option('init_system', type: 'string', value: 'systemd', description: 'Set target init system.') option('distro_templates', type: 'array', value: [], description: 'Distro template files to install. WARNING: Templates may change in the future. If using this option, be sure to check new releases for template file changes.') option('disable_sshd_keygen', type: 'boolean', value: false, description: 'Provide systemd service to disable sshd-keygen if present to avoid races with cloud-init.') -option('bash-completion', type: 'boolean', value: true, description: 'Bash completion for cloud-init.') +option('bash_completion', type: 'boolean', value: true, description: 'Bash completion for cloud-init.')