import CS rust-coreos-installer-0.24.0-3.el9_6

This commit is contained in:
eabdullin 2025-09-16 08:05:57 +00:00
parent 6ed934a59d
commit c918febed9
5 changed files with 196 additions and 17 deletions

4
.gitignore vendored
View File

@ -1,3 +1,3 @@
SOURCES/coreos-installer-0.21.0-vendor.tar.gz
SOURCES/coreos-installer-0.21.0.crate
SOURCES/coreos-installer-0.24.0-vendor.tar.gz
SOURCES/coreos-installer-0.24.0.crate
SOURCES/coreos-installer-dracut-7181733.tar.gz

View File

@ -1,3 +1,3 @@
fe23218c1231918cc4a02ee9f6b523f00f34d083 SOURCES/coreos-installer-0.21.0-vendor.tar.gz
9929a21d59a54ce99cd4b152cd6c473cfc500fee SOURCES/coreos-installer-0.21.0.crate
307f1eb756f210a77b4b2a01b8faa60ea002fc8e SOURCES/coreos-installer-0.24.0-vendor.tar.gz
5510e9d6acbc963085347e8ba60250b186712da1 SOURCES/coreos-installer-0.24.0.crate
81f96c32efa9e32730e1f3bda5a820d33229f006 SOURCES/coreos-installer-dracut-7181733.tar.gz

View File

@ -0,0 +1,67 @@
From dbc41bad9de728f1d42000c5633e3494126f9d6d Mon Sep 17 00:00:00 2001
From: Dusty Mabe <dusty@dustymabe.com>
Date: Thu, 1 May 2025 17:36:39 -0400
Subject: [PATCH] download: format byte unit with 1 decimal place precision
Prior to v0.24.1 the output when processing a stream of disk image
input the output would write with 1 decimal place of precision:
```
Read disk 118.2 MiB/2.6 GiB (4%)
Read disk 157.0 MiB/2.6 GiB (5%)
Read disk 300.1 MiB/2.6 GiB (11%)
Read disk 450.6 MiB/2.6 GiB (16%)
Read disk 515.2 MiB/2.6 GiB (19%)
```
After v0.24.1 it has many decimal places of precision:
```
Read disk 138.2265625 MiB/2.59765625 GiB (5%)
Read disk 265.6722106933594 MiB/2.59765625 GiB (9%)
Read disk 399.67578125 MiB/2.59765625 GiB (15%)
Read disk 519.40625 MiB/2.59765625 GiB (19%)
Read disk 597.5625 MiB/2.59765625 GiB (22%)
```
This is likely due to 68198d0. Let's get back the previous formatting.
---
docs/release-notes.md | 2 +-
src/download.rs | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 42b4974..19b8324 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -8,9 +8,9 @@ nav_order: 8
Major changes:
-
Minor changes:
+- Restore formatting of progress reporting to pre 0.24.0 behavior.
Internal changes:
diff --git a/src/download.rs b/src/download.rs
index f57fca3..e5b967c 100644
--- a/src/download.rs
+++ b/src/download.rs
@@ -456,9 +456,9 @@ impl<'a, R: Read> ProgressReader<'a, R> {
/// Format a size in bytes.
fn format_bytes(count: u64) -> String {
- Byte::from_u64(count)
- .get_appropriate_unit(byte_unit::UnitType::Binary)
- .to_string()
+ let adjusted_byte = Byte::from_u64(count).get_appropriate_unit(byte_unit::UnitType::Binary);
+ // Get a string trimmed to 1 decimal place of precision
+ format!("{adjusted_byte:.1}")
}
}
--
2.47.0

View File

@ -0,0 +1,100 @@
From 408459f9af84add0c0e5ab0db1657c8bc7d0a6a5 Mon Sep 17 00:00:00 2001
From: Nikita Dubrovskii <nikita@linux.ibm.com>
Date: Wed, 9 Jul 2025 09:02:07 +0200
Subject: [PATCH] rootmap: use full path for 'root=' karg when rootfs is
directly on multipath
Issue: https://github.com/coreos/fedora-coreos-tracker/issues/1980
This was first observed on s390x builders under high system load, where `ext.config.multipath.resilient`
would intermittently fail during subsequent boot:
```
[ 2.781559] multipathd[321]: sdd [8:48]: path added to devmap 0xcadf6fadb3ee446d
[ 2.853163] multipathd[321]: sdb [8:16]: path added to devmap 0x000000000000000b
[ 3.012431] systemd[1]: Reached target coreos-multipath-wait.target - CoreOS Wait For Multipathed Boot.
[ 3.139605] systemd[1]: Mounting sysroot.mount - /sysroot...
[ 3.450666] mount[806]: mount: /sysroot: fsconfig system call failed: /dev/sdd4: Can't open blockdev.
```
It looks like a race condition between multipathd taking ownership of the root device and systemd trying to
mount /sysroot. This might happen because the udev database isn't ready in time.
Signed-off-by: Nikita Dubrovskii <nikita@linux.ibm.com>
(cherry picked from commit 33a67caa6fd7291c69c1b502d986707bd0d55e23)
---
docs/release-notes.md | 5 +++++
src/bin/rdcore/rootmap.rs | 28 ++++++++++++++++++++++++----
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 32ee5b8..19e89f3 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -14,6 +14,11 @@ Minor changes:
Internal changes:
+- Add initial TMT tests and a new workflow to execute tests on PRs
+- Use release profile for smaller binaries in CI testing
+- Support cryptsetup-2.8.0's UUIDs naming of dm-integrity devices
+- rootmap: Inject `root=/dev/disk/by-uuid/dm-mpath-$UUID` when on multipath
+
Packaging changes:
diff --git a/src/bin/rdcore/rootmap.rs b/src/bin/rdcore/rootmap.rs
index 43b466c..7aff0bd 100644
--- a/src/bin/rdcore/rootmap.rs
+++ b/src/bin/rdcore/rootmap.rs
@@ -41,6 +41,8 @@ pub fn rootmap(config: RootmapConfig) -> Result<()> {
// and from that we can collect all the parent backing devices too
let mut backing_devices = get_blkdev_deps_recursing(&device)?;
+ // check if device's parent (last in the list) is a mpath device
+ let on_multipath = is_on_multipath(&backing_devices)?;
backing_devices.push(device);
// for each of those, convert them to kargs
@@ -51,13 +53,22 @@ pub fn rootmap(config: RootmapConfig) -> Result<()> {
}
}
+ // use full path when the rootfs is directly on multipath;
+ // this prevents race condition between systemd's autogenerated sysroot.mount and multipathd/udev,
+ // see also: https://github.com/coreos/fedora-coreos-tracker/issues/1980
+ let root = if on_multipath {
+ // https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/udev/rules.d/90-coreos-device-mapper.rules#L25
+ format!(
+ "root=/dev/disk/by-uuid/dm-mpath-{}",
+ physical_mount.get_filesystem_uuid()?
+ )
+ } else {
+ format!("root=UUID={}", physical_mount.get_filesystem_uuid()?)
+ };
// we push the root kargs last, this has the nice property that the final order of kargs goes
// from lowest level to highest; see also
// https://github.com/coreos/fedora-coreos-tracker/issues/465
- kargs.push(format!(
- "root=UUID={}",
- physical_mount.get_filesystem_uuid()?
- ));
+ kargs.push(root);
// we need this because with root= it's systemd that takes care of mounting via
// systemd-fstab-generator, and it defaults to read-only otherwise
@@ -307,3 +318,12 @@ fn write_boot_uuid_grub2_dropin<P: AsRef<Path>>(uuid: &str, p: P) -> Result<()>
std::fs::write(p, format!("set BOOT_UUID=\"{uuid}\"\n"))
.with_context(|| format!("writing {}", p.display()))
}
+
+fn is_on_multipath(backing_devices: &[PathBuf]) -> Result<bool> {
+ let blkinfo = match backing_devices.last() {
+ Some(p) => lsblk_single(p)?,
+ _ => return Ok(false),
+ };
+
+ Ok(blkinfo.get("TYPE").is_some_and(|t| t == "mpath"))
+}
--
2.47.1

View File

@ -11,8 +11,8 @@
%global crate coreos-installer
Name: rust-%{crate}
Version: 0.21.0
Release: 1%{?dist}
Version: 0.24.0
Release: 3%{?dist}
Summary: Installer for Fedora CoreOS and RHEL CoreOS
# Upstream license specification: Apache-2.0
@ -23,6 +23,11 @@ Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{
Source1: https://github.com/coreos/%{crate}/releases/download/v%{version}/%{crate}-%{version}-vendor.tar.gz
Source2: https://github.com/coreos/coreos-installer-dracut/archive/%{dracutcommit}/coreos-installer-dracut-%{dracutshortcommit}.tar.gz
# https://github.com/coreos/coreos-installer/pull/1654
Patch0: 0001-download-format-byte-unit-with-1-decimal-place-preci.patch
# https://github.com/coreos/coreos-installer/pull/1677
Patch1: 0002-rootmap-use-full-path-for-root-karg-when-rootfs-is-d.patch
ExclusiveArch: %{rust_arches}
%if 0%{?rhel} && !0%{?eln}
BuildRequires: rust-toolset
@ -84,20 +89,10 @@ Obsoletes: coreos-installer-dracut < 0.0.1
# Hackily enable rdcore manually on RHEL (RHEL macros do not take -f)
sed -i '/^\[features\]/a \ \ default = ["rdcore"]' Cargo.toml
tar xvf %{SOURCE1}
mkdir -p .cargo
cat >.cargo/config << EOF
[source.crates-io]
replace-with = "vendored-sources"
[source.vendored-sources]
directory = "vendor"
EOF
%cargo_prep -v vendor
%else
%cargo_prep
%endif
# Fix SIGSEGV in tests on s390x
# https://bugzilla.redhat.com/show_bug.cgi?id=1883457
sed -i 's/"-Ccodegen-units=1",//' .cargo/config
%if !0%{?rhel} || 0%{?eln}
%generate_buildrequires
@ -183,6 +178,23 @@ from the initramfs.
%endif
%changelog
* Wed Jul 23 2025 Joel Capitao <jcapitao@redhat.com> - 0.24.0-3
- Use the full path for the 'root=' kernel arg when rootfs on mpath
Backport https://github.com/coreos/coreos-installer/pull/1677
* Fri Jul 18 2025 Aashish Radhakrishnan <aaradhak@redhat.com> - 0.24.0-2
- Restore single-decimal precision to stream output
Backport https://github.com/coreos/coreos-installer/pull/1654
* Wed Apr 16 2025 Joel Capitao <jcapitao@redhat.com> - 0.24.0-1
- Update to latest upstream
* Thu Nov 14 2024 Steven Presti <spresti@redhat.com> - 0.23.0-1
- new version
* Fri Jul 26 2024 Packit <hello@packit.dev> - 0.22.1-1
- New upstream release
* Mon Feb 26 2024 Steven Presti <spresti@redhat.com> - 0.21.0-1
- New release