From 134774175bbedc0ae3264c56051bf2a08f1f1c30 Mon Sep 17 00:00:00 2001 From: yasminvalim Date: Mon, 13 Oct 2025 08:59:57 -0300 Subject: [PATCH] spec: new upstream version 0.25.0 resolves: #https://issues.redhat.com/browse/RHEL-120387 --- .gitignore | 2 + ...byte-unit-with-1-decimal-place-preci.patch | 67 ------------ ...-path-for-root-karg-when-rootfs-is-d.patch | 100 ------------------ rust-coreos-installer.spec | 12 +-- sources | 4 +- 5 files changed, 9 insertions(+), 176 deletions(-) delete mode 100644 0001-download-format-byte-unit-with-1-decimal-place-preci.patch delete mode 100644 0002-rootmap-use-full-path-for-root-karg-when-rootfs-is-d.patch diff --git a/.gitignore b/.gitignore index 4d75446..1351124 100644 --- a/.gitignore +++ b/.gitignore @@ -47,3 +47,5 @@ /coreos-installer-0.23.0-vendor.tar.gz /coreos-installer-0.24.0.crate /coreos-installer-0.24.0-vendor.tar.gz +/coreos-installer-0.25.0.crate +/coreos-installer-0.25.0-vendor.tar.gz diff --git a/0001-download-format-byte-unit-with-1-decimal-place-preci.patch b/0001-download-format-byte-unit-with-1-decimal-place-preci.patch deleted file mode 100644 index 7fb6e42..0000000 --- a/0001-download-format-byte-unit-with-1-decimal-place-preci.patch +++ /dev/null @@ -1,67 +0,0 @@ -From dbc41bad9de728f1d42000c5633e3494126f9d6d Mon Sep 17 00:00:00 2001 -From: Dusty Mabe -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 - diff --git a/0002-rootmap-use-full-path-for-root-karg-when-rootfs-is-d.patch b/0002-rootmap-use-full-path-for-root-karg-when-rootfs-is-d.patch deleted file mode 100644 index 1b4c324..0000000 --- a/0002-rootmap-use-full-path-for-root-karg-when-rootfs-is-d.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 408459f9af84add0c0e5ab0db1657c8bc7d0a6a5 Mon Sep 17 00:00:00 2001 -From: Nikita Dubrovskii -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 -(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>(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 { -+ 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 - diff --git a/rust-coreos-installer.spec b/rust-coreos-installer.spec index 9c239dd..1587a60 100644 --- a/rust-coreos-installer.spec +++ b/rust-coreos-installer.spec @@ -11,8 +11,8 @@ %global crate coreos-installer Name: rust-%{crate} -Version: 0.24.0 -Release: 3%{?dist} +Version: 0.25.0 +Release: 1%{?dist} Summary: Installer for Fedora CoreOS and RHEL CoreOS # Upstream license specification: Apache-2.0 @@ -23,11 +23,6 @@ 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 @@ -178,6 +173,9 @@ from the initramfs. %endif %changelog +* Mon Oct 13 2025 yasminvalim - 0.25.0-1 +- new version + * Wed Jul 23 2025 Joel Capitao - 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 diff --git a/sources b/sources index 7b9009f..94d6676 100644 --- a/sources +++ b/sources @@ -1,3 +1,3 @@ -SHA512 (coreos-installer-0.24.0.crate) = 4c18467daabb8bb66b1dd959dd0f392153648eaa7591df1e640b7aad5baac70dd269e4bd17f277463c55ca4e19d16b720b95a0ba0aa89920c0147c32f6b6e27b -SHA512 (coreos-installer-0.24.0-vendor.tar.gz) = edfc61e105e8fb68e66f3857f3f77037c5f34b9e1b3def5855fdf31fda03daefce78b802c42a96c3fdb9aee93918e8cc0f55a6b36c3056297a793ecacd53d344 +SHA512 (coreos-installer-0.25.0.crate) = 39ee5582b91e7d940d2ac5f7b36b7f4113a1db625db155291928660a81f96a124afdde9781f552dfb2bc71931f91189b344ee7d1b5c5175e10d8fd45935da8e8 +SHA512 (coreos-installer-0.25.0-vendor.tar.gz) = 4d039c5dd77cc337123de46fbf06c819848d6570eeda6201e3fb1f7afd7e2915b96761c594360ff9b93430637b545d92363190e1150a37d4f5277b042fdf35b8 SHA512 (coreos-installer-dracut-7181733.tar.gz) = a03e3e90f355690eda974335e2189c69837f7f0ceb456a449b2de6ce4b24ca098d3f0ea51ddcab35ab354a5070e4b0525188dfbbff8056cfc62bbcdded10647c