public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/systemd-boot] rawhide: Hardlink binary as /usr/lib/efi/systemd-boot/<evr>/EFI/fedora/grub<efi-arch>.efi
@ 2026-08-11  9:47 Pragyan Poudyal
  0 siblings, 0 replies; only message in thread
From: Pragyan Poudyal @ 2026-08-11  9:47 UTC (permalink / raw)
  To: git-commits

            A new commit has been pushed.

            Repo   : rpms/systemd-boot
            Branch : rawhide
            Commit : e4ce7b433bc1e0afb0f0c77145d8cca6ba773ef3
            Author : Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
            Date   : 2026-08-11T11:41:20+02:00
            Stats  : +8/-0 in 1 file(s)
            URL    : https://src.fedoraproject.org/rpms/systemd-boot/c/e4ce7b433bc1e0afb0f0c77145d8cca6ba773ef3?branch=rawhide

            Log:
            Hardlink binary as /usr/lib/efi/systemd-boot/<evr>/EFI/fedora/grub<efi-arch>.efi

We want to do this for compatibility with bootupd
(https://github.com/coreos/bootupd) which expects bootloaders to be
present in '/usr/lib/efi/<name>/<evr>/EFI/fedora'.

The new name is 'grub<efi-arch>.efi', as that's the name baked into
shim and is required for secure boot. We could update efivars to use a
different name, but that's not possible when building generic disk
images.

The reasoning behind hardlinking and not symlinking is due to fact
that bootupd uses openat syscalls to stay confined within the "root"
dir. A symlink (relative or absolute) would escape the root directory
of '/usr/lib/efi' resulting in an error.

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>

---
diff --git a/systemd-boot.spec b/systemd-boot.spec
index c90204e..3fa72f7 100644
--- a/systemd-boot.spec
+++ b/systemd-boot.spec
@@ -67,6 +67,10 @@ cp -a %{_prefix}/lib/systemd/boot/efi/linux%{efi_arch}.efi.stub \
 cp -a %{_prefix}/lib/systemd/boot/efi/addon%{efi_arch}.efi.stub \
    %{buildroot}%{_prefix}/lib/systemd/boot/efi/addon%{efi_arch}.efi.stub.alt
 
+install -dm 0755 %{buildroot}%{_prefix}/lib/efi/systemd-boot/%{version}-%{release}
+ln %{buildroot}%{_prefix}/lib/systemd/boot/efi/systemd-boot%{efi_arch}.efi.signed \
+   %{buildroot}%{_prefix}/lib/efi/systemd-boot/%{version}-%{release}/grub%{efi_arch}.efi
+
 install -m0644 -Dt %{buildroot}%{_licensedir}/%{name}/ %{_datadir}/licenses/systemd/LICENSE.LGPL2.1
 
 %postun
@@ -84,6 +88,10 @@ fi
 %attr(0644,-,-) %{_prefix}/lib/systemd/boot/efi/systemd-boot%{efi_arch}.efi.signed
 %{_prefix}/lib/systemd/boot/efi/linux%{efi_arch}.efi.stub.alt
 %{_prefix}/lib/systemd/boot/efi/addon%{efi_arch}.efi.stub.alt
+%dir %{_prefix}/lib/efi
+%dir %{_prefix}/lib/efi/systemd-boot
+%dir %{_prefix}/lib/efi/systemd-boot/%{version}-%{release}
+%{_prefix}/lib/efi/systemd-boot/%{version}-%{release}/grub%{efi_arch}.efi
 
 # Man pages are provided by systemd-udev subpackage.
 # If we copied them to this package, we'd need to either rename them

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-08-11  9:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11  9:47 [rpms/systemd-boot] rawhide: Hardlink binary as /usr/lib/efi/systemd-boot/<evr>/EFI/fedora/grub<efi-arch>.efi Pragyan Poudyal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox