import CS rust-bootupd-0.2.28-3.el9
This commit is contained in:
parent
95781a866c
commit
8823906449
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,2 +1,2 @@
|
|||||||
SOURCES/bootupd-0.2.27-vendor.tar.zstd
|
SOURCES/bootupd-0.2.28-vendor.tar.zstd
|
||||||
SOURCES/bootupd-0.2.27.tar.zstd
|
SOURCES/bootupd-0.2.28.tar.zstd
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
bd5472e5dec9ece6e15ee8b0e234dd147bc77eff SOURCES/bootupd-0.2.27-vendor.tar.zstd
|
5d0158b7862df708674da66de41c764e59ea4710 SOURCES/bootupd-0.2.28-vendor.tar.zstd
|
||||||
560917781f901145a9d17b2b844fb0c898e82752 SOURCES/bootupd-0.2.27.tar.zstd
|
c53785cbafd7bc1a3da45feccd3a53ed3bfd7400 SOURCES/bootupd-0.2.28.tar.zstd
|
||||||
|
@ -0,0 +1,51 @@
|
|||||||
|
From 593b94a1750c1d71f5a37365633afdd99cfb714b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Huijing Hei <hhei@redhat.com>
|
||||||
|
Date: Wed, 25 Jun 2025 12:14:02 +0800
|
||||||
|
Subject: [PATCH] install: attempt to use an already mounted ESP at the target
|
||||||
|
|
||||||
|
Let's attempt to use an already mounted ESP at the target
|
||||||
|
dest_root if one is already mounted there in a known ESP location,
|
||||||
|
if failed, will fallback to mount ESP partition of the device.
|
||||||
|
|
||||||
|
See https://github.com/coreos/coreos-assembler/pull/4161
|
||||||
|
---
|
||||||
|
src/efi.rs | 22 +++++++++++++++-------
|
||||||
|
1 file changed, 15 insertions(+), 7 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/efi.rs b/src/efi.rs
|
||||||
|
index 1adc3d6..b8fc24c 100644
|
||||||
|
--- a/src/efi.rs
|
||||||
|
+++ b/src/efi.rs
|
||||||
|
@@ -345,14 +345,22 @@ impl Component for Efi {
|
||||||
|
let srcdir_name = component_updatedirname(self);
|
||||||
|
let ft = crate::filetree::FileTree::new_from_dir(&src_root.sub_dir(&srcdir_name)?)?;
|
||||||
|
|
||||||
|
- // Using `blockdev` to find the partition instead of partlabel because
|
||||||
|
- // we know the target install toplevel device already.
|
||||||
|
- let esp_device = blockdev::get_esp_partition(device)?
|
||||||
|
- .ok_or_else(|| anyhow::anyhow!("Failed to find ESP device"))?;
|
||||||
|
-
|
||||||
|
- let destpath = &self.ensure_mounted_esp(Path::new(dest_root), Path::new(&esp_device))?;
|
||||||
|
+ // Let's attempt to use an already mounted ESP at the target
|
||||||
|
+ // dest_root if one is already mounted there in a known ESP location.
|
||||||
|
+ let destpath = if let Some(destdir) = self.get_mounted_esp(Path::new(dest_root))? {
|
||||||
|
+ destdir
|
||||||
|
+ } else {
|
||||||
|
+ // Using `blockdev` to find the partition instead of partlabel because
|
||||||
|
+ // we know the target install toplevel device already.
|
||||||
|
+ if device.is_empty() {
|
||||||
|
+ anyhow::bail!("Device value not provided");
|
||||||
|
+ }
|
||||||
|
+ let esp_device = blockdev::get_esp_partition(device)?
|
||||||
|
+ .ok_or_else(|| anyhow::anyhow!("Failed to find ESP device"))?;
|
||||||
|
+ self.mount_esp_device(Path::new(dest_root), Path::new(&esp_device))?
|
||||||
|
+ };
|
||||||
|
|
||||||
|
- let destd = &openat::Dir::open(destpath)
|
||||||
|
+ let destd = &openat::Dir::open(&destpath)
|
||||||
|
.with_context(|| format!("opening dest dir {}", destpath.display()))?;
|
||||||
|
validate_esp_fstype(destd)?;
|
||||||
|
|
||||||
|
--
|
||||||
|
2.49.0
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
%global crate bootupd
|
%global crate bootupd
|
||||||
|
|
||||||
Name: rust-%{crate}
|
Name: rust-%{crate}
|
||||||
Version: 0.2.27
|
Version: 0.2.28
|
||||||
Release: 3%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Bootloader updater
|
Summary: Bootloader updater
|
||||||
|
|
||||||
@ -15,6 +15,8 @@ Source1: %{url}/releases/download/v%{version}/bootupd-%{version}-vendor.t
|
|||||||
ExcludeArch: %{ix86}
|
ExcludeArch: %{ix86}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Patch0: 0001-install-attempt-to-use-an-already-mounted-ESP-at-the.patch
|
||||||
|
|
||||||
BuildRequires: git
|
BuildRequires: git
|
||||||
# For now, see upstream
|
# For now, see upstream
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
|
Loading…
Reference in New Issue
Block a user