Prepare to support UKIs - #523
Merged
arnaldo2792 merged 5 commits intoAug 14, 2026
Merged
Conversation
Provide the bootloader(efi) RPM capability so newer versions of twoliter and the core kit, which support UKI, can depend on it to select GRUB as the EFI bootloader. Conflict with the uki-image feature, since UKI images require systemd-boot instead of GRUB. Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
arnaldo2792
force-pushed
the
uki-support/kernel-kit
branch
from
August 11, 2026 01:12
e0e2d4f to
7a7e783
Compare
ginglis13
reviewed
Aug 12, 2026
jmt-lab
requested changes
Aug 12, 2026
Comment on lines
+97
to
+98
| find %{_builddir}/build-grub -name '%{mokm_efi_image}' -exec \ | ||
| cp {} "%{buildroot}%{efidir}/%{mokm_efi_image}" \; |
Contributor
There was a problem hiding this comment.
[P2] MokManager is copied only from build-grub but shipped in the base package
%install copies mm*.efi exclusively out of the build-grub tree, and the resulting file is packaged in the base %files list (line 104), which is installed alongside both subpackages.
Concerns:
- Asymmetric build coupling. MokManager doesn't depend on
DEFAULT_LOADER, so both build trees produce it. Sourcing it only frombuild-grubcouples the base package to that specific build. If a follow-up PR conditionally disables the grub build for UKI-only variants (e.g., wraps lines 77, 80-81 in%if !%{uki_only}), the base%fileslist still references%{efidir}/%{mokm_efi_image}and the build breaks non-obviously. find … -exec cpdoesn't signal 'no match'.findreturns 0 whether or not it matched. If the grub build silently stops producingmm*.efiin the future, the failure surfaces later at%files("File not found") rather than at the copy step.
Suggested fix: either copy mm*.efi from build-systemd-boot (identical bits, decoupled from the grub build) or add a brief comment stating that MokManager is loader-independent and either build tree is acceptable, e.g.:
# MokManager is not affected by DEFAULT_LOADER; either build tree is fine.
find %{_builddir}/build-grub -name '%{mokm_efi_image}' -exec \
cp {} "%{buildroot}%{efidir}/%{mokm_efi_image}" \;Confidence: ~60%.
Split shim into two subpackages: one that chain-loads GRUB (installed at the current location, for backwards compatibility) and a new one that chain-loads systemd-boot instead. Older versions of twoliter don't understand the 'uki-image' feature, so the GRUB subpackage's requirements are left unrestricted to remain installable there. To prevent it from being pulled in on UKI images with newer twoliter versions, it instead conflicts with the uki-image feature; the systemd-boot subpackage conflicts with no-uki-image accordingly. Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
The patch prevented systemd-boot from measuring PCR9 Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
The patch prevented systemd-boot from measuring PCR9 Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
The patch prevented systemd-boot from measuring PCR9 Signed-off-by: Arnaldo Garcia Rincon <agarrcia@amazon.com>
arnaldo2792
force-pushed
the
uki-support/kernel-kit
branch
from
August 13, 2026 17:34
7a7e783 to
860c8d6
Compare
ginglis13
approved these changes
Aug 13, 2026
vigh-m
approved these changes
Aug 13, 2026
arnaldo2792
marked this pull request as ready for review
August 14, 2026 21:28
jmt-lab
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of changes:
This series prepares the kernel kit to support Unified Kernel Images.
The first commit in the series prevents
grubfrom being used with a variant that opt-in to use the new UKI format, and makes it provide the%{_cross_os}bootloader(efi)capability.The second commit in the series prepares an extra copy of the
shimthat looks forsystemd-bootinstead of GRUB, and re-structures the spec to resolve either subpackage depending on the features enabled for the variant.The remaining commits in the series drop a patch to don't measure PCR9 in the kernel.
systemd-boottriggering PCR9 measurements in the kernel, but this patch prevented the kernel from actually updating the PCR. The side-effect is that in GRUB-based AMIs, PCR9 measurements will be as follows:Testing done:
Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.