plugins: kernel plugin fixes and spread tests (#4104)
Install the software-properties-common package, address shell script
issues when running on base core22, and create spread tests for v2 and
craft-parts kernel plugins.
Package installation code from PR #4064 by dbruno74.
Spread tests are set to manual and will run periodically.
cli: add option to enable experimental plugins (#4085)
Experimental plugins are registered only if the environment variable
`SNAPCRAFT_ENABLE_EXPERIMENTAL_PLUGINS` is set to a non-empty value or
if the `--enable-experimental-plugins` global argument is used.
Currently the kernel plugin is an experiemental plugin.
- kernel: use textwrap for complex texts
- plugins: kernel: relocate make_initrd_cmd() to common implementation
- plugins: kernel: relocate add_snappy_ppa() to common implementation
- plugins: kernel: relocate get_post_install_cmd() to common implementation
- plugins: kernel: relocate get_install_command() to common implementation
- plugins: kernel: relocate get_build_commands() to common implementation
- tests: fix test for kernel perf tools directly from kernel tree
- plugins,tests: kernel: start using textwrap.dedent for readability
- plugin: address linter warnings in kernel plugin tests
---------
Signed-off-by: Ondrej Kubik <email address hidden>
Signed-off-by: Isaac True <email address hidden>
Signed-off-by: Claudio Matsuoka <email address hidden>
Co-authored-by: Isaac True <email address hidden>
Co-authored-by: Claudio Matsuoka <email address hidden>
plugins: refactor kernel plugin initrd builder function
Pass parameters to _make_initrd_cmd() instead of using instance
attributes directly in both kernel plugins, preparing it to be
switched to a common function.