Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

virt-install: add OVMF_CODE_4M.fd to UEFI x86_64 arch patterns and fix catchall pattern #493

Conversation

mustafakemalgilor
Copy link

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

…chall

Newer versions of OVMF package in Debian and Ubuntu has 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.

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 an unit test to verify that `find_uefi_path_for_arch` behaves as
intended.

Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
Signed-off-by: Mustafa Kemal Gilor <mustafa.gilor@canonical.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant