-
Notifications
You must be signed in to change notification settings - Fork 5
Esp alternate locations #61
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
base: main
Are you sure you want to change the base?
Esp alternate locations #61
Conversation
71e9035 to
419e4b8
Compare
|
The problem is that the image that the tests proposed here depend on will likely be garbage collected sooner than later. |
lib/src/esp.rs
Outdated
|
|
||
| const ESP_VENDOR_NAMES: [&str; 2] = ["redhat", "fedora"]; | ||
| fn find_efi_bin(root_path: &Path, bin_name: &str) -> io::Result<PathBuf> { | ||
| let glob_path = root_path.join(Path::new("**/EFI/*/").join(bin_name)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That feels a bit too broad. Let search in two places like below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be variable naming thing, root path was supposed to be the root of the search path, not the fs root. I updated the variable name to search_path.
In the end, find_efi_bin will receive "usr/lib/bootupd/updates/" or "usr/lib/efi" based on which of them exists (giving priority to the former/old).
lib/src/rootfs.rs
Outdated
| const RELATIVE_KERNELS_PATH: &str = "usr/lib/modules/"; | ||
| const RELATIVE_ESP_PATH: &str = "usr/lib/bootupd/updates/"; | ||
| const RELATIVE_ESP_OLD: &str = "usr/lib/bootupd/updates/"; | ||
| // From fcos-43 on shim/grub are stored in different directories |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can link to https://fedoraproject.org/wiki/Changes/BootLoaderUpdatesPhase1.
I should be from Fedora 44.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixing...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I missed that coreos/bootupd#995 landed in F43 and that makes this also apply to F43.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's why I probably saw it happen in some testing stream images. It's not yet in stable, right?
From fcos 44, shim and grub are not longer located in /usr/lib/bootupd.. but in /usr/lib/efi/.. This commit adds some changes to be able to find shim and grub binaries both under the old and new image fs hierarchy. Note that as for the kernel images, the first found shim and grub are returned. Signed-off-by: Beñat Gartzia Arruabarrena <[email protected]>
419e4b8 to
9e07661
Compare
Only fetching ociarchive images and then loading them into the local podman registry was allowed. We would also like to directly pull from a registry in some cases though. Try podman pull and fall back into the previous logic if that does not happen to work. Signed-off-by: Beñat Gartzia Arruabarrena <[email protected]>
This is an image that will be likely garbage collected. However, this aims to be a demonstration that the previously added logic works properly on fedora coreos images in which grub and shim images are not longer stored under /usr/lib/bootupd/... Signed-off-by: Beñat Gartzia Arruabarrena <[email protected]>
9e07661 to
3ba9a00
Compare
Fixes #60 and #63