File 0001-patch-filenames-and-paths-to-match-the-choices-of-op.patch of Package bootupd-suse

From 381e43fb4c633f647965563458fc911c3d82f4b8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20H=C3=BCnseler?= <marco@wuthoehle.de>
Date: Sat, 24 May 2025 21:35:40 +0200
Subject: [PATCH] patch filenames and paths to match the choices of opensuse

---
 src/bios.rs | 2 +-
 src/efi.rs  | 7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/bios.rs b/src/bios.rs
index 6e528b8..61196ec 100644
--- a/src/bios.rs
+++ b/src/bios.rs
@@ -44,7 +44,7 @@ pub(crate) struct Bios {}
 impl Bios {
     // Return `true` if grub2-modules installed
     fn check_grub_modules(&self) -> Result<bool> {
-        let usr_path = Path::new("/usr/lib/grub");
+        let usr_path = Path::new("/usr/share/grub2");
         #[cfg(target_arch = "x86_64")]
         {
             usr_path.join("i386-pc").try_exists().map_err(Into::into)
diff --git a/src/efi.rs b/src/efi.rs
index f7a0daa..35536c9 100644
--- a/src/efi.rs
+++ b/src/efi.rs
@@ -34,7 +34,7 @@ const EFIBOOTMGR: &str = "efibootmgr";
 pub(crate) const SHIM: &str = "shimaa64.efi";
 
 #[cfg(target_arch = "x86_64")]
-pub(crate) const SHIM: &str = "shimx64.efi";
+pub(crate) const SHIM: &str = "shim.efi";
 
 /// The ESP partition label on Fedora CoreOS derivatives
 pub(crate) const COREOS_ESP_PART_LABEL: &str = "EFI-SYSTEM";
@@ -378,7 +378,10 @@ impl Component for Efi {
 
         let efidir = openat::Dir::open(&dest_efidir)?;
         let files = crate::util::filenames(&efidir)?.into_iter().map(|mut f| {
-            f.insert_str(0, "/boot/efi/EFI/");
+            if let Some(stripped) = f.strip_prefix("/opensuse/") {
+                f = stripped.to_owned();
+            }
+            f.insert_str(0, "/usr/share/efi/x86_64/");
             f
         });
 
-- 
2.49.0

openSUSE Build Service is sponsored by