From: Philipp Rudo <prudo@xxxxxxxxxx> kernel.spec: Fix UKI naming to comply with BLS The Boot Loader Specification (BLS) [1] suggests that type #2 entries (UKIs) shall have the same names like type #1 entries with the exception of the suffix being .efi instead of .conf. In particular this means that the name for installed UKIs should be <entry-token-or-machine-id>-<version>.efi. The same naming convention is used by kernel-installs 90-uki-copy.install [2] in systemd v253. Adjust the workaround to install UKIs in the kernel.spec to follow the same naming convention in order to prevent breaking user space tools that rely on it. [1] https://uapi-group.org/specifications/specs/boot_loader_specification/ [2] https://github.com/systemd/systemd/blob/v253/src/kernel-install/90-uki-copy.install Signed-off-by: Philipp Rudo <prudo@xxxxxxxxxx> diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template index blahblah..blahblah 100644 --- a/redhat/kernel.spec.template +++ b/redhat/kernel.spec.template @@ -3033,10 +3033,12 @@ touch %{_localstatedir}/lib/rpm-state/%{name}/installing_core_%{KVERREL}%{?-v:+% %define kernel_uki_virt_scripts() \ %{expand:%%posttrans %{?1:%{1}-}uki-virt}\ mkdir -p /boot/efi/EFI/Linux\ -cp /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz-virt.efi /boot/efi/EFI/Linux/vmlinuz-%{KVERREL}%{?1:+%{1}}-virt.efi\ +entry_token=$(kernel-install inspect | grep KERNEL_INSTALL_ENTRY_TOKEN: | cut -d ' ' -f2)\ +cp /lib/modules/%{KVERREL}%{?1:+%{1}}/vmlinuz-virt.efi /boot/efi/EFI/Linux/${entry_token}-%{KVERREL}%{?1:+%{1}}.efi\ %{nil}\ %{expand:%%postun %{?1:%{1}-}uki-virt}\ -rm -f /boot/efi/EFI/Linux/vmlinuz-%{KVERREL}%{?1:+%{1}}-virt.efi\ +entry_token=$(kernel-install inspect | grep KERNEL_INSTALL_ENTRY_TOKEN: | cut -d ' ' -f2)\ +rm -f /boot/efi/EFI/Linux/${entry_token}-%{KVERREL}%{?1:+%{1}}.efi\ %{nil} # @@ -3320,7 +3322,7 @@ fi %if %{with_efiuki}\ %{expand:%%files %{?3:%{3}-}uki-virt}\ /lib/modules/%{KVERREL}%{?3:+%{3}}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-virt.efi\ -%ghost /%{image_install_path}/efi/EFI/Linux/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?3:+%{3}}-virt.efi\ +%ghost /%{image_install_path}/efi/EFI/Linux/%{?-k:%{-k*}}%{!?-k:*}-%{KVERREL}%{?3:+%{3}}.efi\ %endif\ %if %{?3:1} %{!?3:0}\ %{expand:%%files %{3}}\ -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2391 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue