virt-install: add OVMF_CODE_4M.fd
to UEFI x86_64 arch patterns and fix catchall pattern
#493
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Newer versions of the OVMF package in Debian and Ubuntu have started to ship 4M OVMF FW images with
_4M
suffix in their name, and updated the firmware descriptor JSON files to point to them. The problem with that is, virt-install's UEFI x86_64 arch pattern for OVMF does not explicitly cover the_4M
suffix, causing virt-install to fallback to capability based image selection and it picks up an unintended firmware image on Debian and Ubuntu (i.e.,secure boot enforced) as a result. [1]There is an existing catchall
.*OVMF.*
pattern that should've matched to the new name, but it is not a raw string literal (lacks 'r' before dquote) so it does not work as intended.This patch adds the
.*OVMF_CODE_4M\.fd
pattern, and fixes the.*OVMF.*
catchall pattern.Also, added a unit test to verify that
find_uefi_path_for_arch
behaves as intended.[1]: launchpad bug #2004618