-
Notifications
You must be signed in to change notification settings - Fork 40
Create "direct" install sub command that will be called in a posttrans on package mode installations #1021
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
Conversation
61aad1c to
b867774
Compare
This is part of Fedora BootLoaderUpdatesPhase1: https://fedoraproject.org/wiki/Changes/BootLoaderUpdatesPhase1
df959d6 to
0579cb7
Compare
|
I've added some unit tests for this feature, but I'm not satisfied with the coverage. Are kola tests recommended in this case? |
|
Thank you @yasminvalim for working on this! |
Since this is for package mode, do we want them also working on CoreOS? |
I created a two function helpers to extract duplicate code :) |
I think there is no mention to it in the issue and jira ticket |
Yeah, it's hard for us to cover much here with unit tests. This intersects with the work to add tmt tests here #967 |
Thanks for the context. What do you think about the next steps for this PR? Should I proceed with merging these changes, or wait until we have more tmt test coverage in place? |
|
Might be good to get a test here that installs shim into a container and ensures that the files are properly setup in the right place. |
Extract duplicated ESP mounting, validation, and copying logic from install() and package_mode_copy_to_boot_impl() into shared helper function to eliminate dupe code.
8f70dbd to
54c1720
Compare
I added a unit test to cover this case. Creating shim, installing, ensuring that is being copied, if is a really a file, if the content matches exactly and if the directory structure is correct. I guess we have a little bit more coverage now. |
Addressing review: add unit test that installs shim into a container and ensures that the files are properly setup in the right place
54c1720 to
2496845
Compare
|
@travier the command that we want to use is for package mode, also for image mode, is this right? |
This is part of Fedora BootLoaderUpdatesPhase1: https://fedoraproject.org/wiki/Changes/BootLoaderUpdatesPhase1
Extract duplicated ESP mounting, validation, and copying logic from install() and package_mode_copy_to_boot_impl() into shared helper function to eliminate dupe code.
Addressing review: add unit test that installs shim into a container and ensures that the files are properly setup in the right place
|
Sorry folks, I encountered some issues with the git history on my previous branch, so I've pushed this new branch to resolve it. #1030 |
TICKET: As part of https://fedoraproject.org/wiki/Changes/BootLoaderUpdatesPhase1, for package mode installations, we will update the bootloader (copy from /usr to boot or ESP) as part of the posttrans scriptlet.
This is a slightly different path as the current update path where we have the systemd-run logic, and we notably don't have any prepared metadata.
We can start by creating a command that does a simple copy (like the scripts do) and then iterate on merging the logic between the package mode and the image mode use case.
See change and current sample/basic installation scripts:
https://fedoraproject.org/wiki/Changes/BootLoaderUpdatesPhase1
https://src.fedoraproject.org/rpms/grub2/pull-request/136
https://src.fedoraproject.org/rpms/shim/pull-request/4
See related issue: #926