-
Notifications
You must be signed in to change notification settings - Fork 317
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
Add UnifiedKernelImageFormat=
(attempt 2)
#2733
Conversation
I now have an untested commit that keeps Type1 by default organized how it is now, but if The other option might be to replace all |
a482f49
to
b01009e
Compare
I now added support for Type1. For now I made it replace all |
73a4329
to
f2bcdbd
Compare
f2bcdbd
to
8e2b6ef
Compare
0b711c5
to
1287ec8
Compare
@NekkoDroid Can you merge the 2nd, 3rd and 4th commits? makes it easier to review |
1287ec8
to
8e2a0c5
Compare
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.
So I read the boot loader spec again, and type1/type2 entries are different enough after all that this option shouldn't be used for both (my bad).
So let's rename this back to UnifiedKernelImageName= and not make it apply to type1 after all. If we introduce a separate type1 name setting later, it should likely take a full path relative to $BOOT instead of just a filename, but we can figure that out later.
26dd22f
to
5c976b1
Compare
BootloaderEntryFormat=
UnifiedKernelImageFormat=
(attempt 2)
5c976b1
to
7b6143a
Compare
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.
Can you write a few unit tests for expand_kernel_specifiers()
? Aside from that LGTM
This can be used to control the name to use for the UKI during image generation. Special `&` specifiers can be used to include kernel specific information in the filename. This is useful for the `systemd-sysupdate` case, as you can set this to `%i_%v` to use a format that can be parse by its configuration. The current format used includes both a roothash as well as the kernel version which both can't be matched by sysupdate.
7b6143a
to
594b40e
Compare
Thanks for working on this! |
This is currently incomplete as it doesn't handle the Type1 entry case asI'm unsure how the nested directories should be handled as allowing nesting doesn't work with UKI auto discovery, see #2731 (comment). Provisionally-
is replaced by/
for Type1 entries.I'd love some input on how to better formulate the documentation because it seems very superficial right now.
Tested UKI cases:
BootloaderEntryFormat=
->/boot/EFI/Linux/<entry-token>-<kver>-<usrhash>.efi
✅ (have no tries file set)BootloaderEntryFormat=%i_%v
->/boot/EFI/Linux/<image-id>_<image-version>.efi
✅BootloaderEntryFormat=hello~&c+&h-&k-&e
->/boot/EFI/Linux/hello~+<usrhash>-<kver>-<entry-token>.efi
-&c
ignored, expected ✅BootloaderEntryFormat=&e/&k
-> config parse error, expected ✅BootloaderEntryFormat=&&
->/boot/EFI/Linux/&.efi
✅