diff --git a/SOURCES/0003-install-check-if-firstboot-args-are-defined-and-add-.patch b/SOURCES/0003-install-check-if-firstboot-args-are-defined-and-add-.patch new file mode 100644 index 0000000..5e20313 --- /dev/null +++ b/SOURCES/0003-install-check-if-firstboot-args-are-defined-and-add-.patch @@ -0,0 +1,39 @@ +From 60fc80116f4dac5c16e294116424c0d8934d1f7e Mon Sep 17 00:00:00 2001 +From: yasminvalim +Date: Mon, 13 Oct 2025 10:44:55 -0300 +Subject: [PATCH 2/2] install: check if firstboot args are defined and add them + manually if necessary + +--- + src/cmdline/install.rs | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/src/cmdline/install.rs b/src/cmdline/install.rs +index 7e9dc34..915db59 100644 +--- a/src/cmdline/install.rs ++++ b/src/cmdline/install.rs +@@ -272,7 +272,7 @@ impl InstallConfig { + return Ok(self); + } + +- let args = self ++ let mut args = self + .config_file + .iter() + .map(|path| { +@@ -295,6 +295,12 @@ impl InstallConfig { + ) + .collect::>(); + ++ // If firstboot-args is defined, add it manually ++ if let Some(firstboot_args) = &self.firstboot_args { ++ args.push("--firstboot-args".to_string()); ++ args.push(firstboot_args.clone()); ++ } ++ + println!("Running with arguments: {}", args.join(" ")); + Self::from_args(&args) + } +-- +2.52.0 + diff --git a/SOURCES/0004-install-add-unit-tests.patch b/SOURCES/0004-install-add-unit-tests.patch new file mode 100644 index 0000000..66fd71a --- /dev/null +++ b/SOURCES/0004-install-add-unit-tests.patch @@ -0,0 +1,48 @@ +From 93600e433259e13f13fece1dfb0d1f05dbb7c807 Mon Sep 17 00:00:00 2001 +From: yasminvalim +Date: Mon, 13 Oct 2025 11:42:48 -0300 +Subject: [PATCH 1/2] install: add unit tests + +(cherry picked from commit 26094bf552f5ddf3fec974c1f7e7b468bbe4b9e6) +--- + src/cmdline/install.rs | 26 ++++++++++++++++++++++++++ + 1 file changed, 26 insertions(+) + +diff --git a/src/cmdline/install.rs b/src/cmdline/install.rs +index 885ca73..7e9dc34 100644 +--- a/src/cmdline/install.rs ++++ b/src/cmdline/install.rs +@@ -578,4 +578,30 @@ dest-device: u + .expand_config_files() + .unwrap_err(); + } ++ ++ /// Test that firstboot-args is manually added to args list when defined ++ #[test] ++ fn test_firstboot_args_manually_added() { ++ let mut f = NamedTempFile::new().unwrap(); ++ f.as_file_mut().write_all(b"dest-device: /dev/sda").unwrap(); ++ ++ let config = InstallConfig::from_args(&[ ++ "--config-file", ++ f.path().to_str().unwrap(), ++ "--firstboot-args", ++ "ip=dhcp", ++ ]) ++ .unwrap(); ++ ++ // Verify firstboot-args is defined ++ assert!(config.firstboot_args.is_some()); ++ assert_eq!(config.firstboot_args.as_ref().unwrap(), "ip=dhcp"); ++ ++ // Test expand_config_files to verify manual addition ++ let expanded = config.expand_config_files().unwrap(); ++ ++ // Should still have firstboot-args ++ assert!(expanded.firstboot_args.is_some()); ++ assert_eq!(expanded.firstboot_args.unwrap(), "ip=dhcp"); ++ } + } +-- +2.52.0 + diff --git a/SOURCES/0005-blockdev.rs-uses-blkid-p-instead-of-lsblk-to-bypass-.patch b/SOURCES/0005-blockdev.rs-uses-blkid-p-instead-of-lsblk-to-bypass-.patch new file mode 100644 index 0000000..a811297 --- /dev/null +++ b/SOURCES/0005-blockdev.rs-uses-blkid-p-instead-of-lsblk-to-bypass-.patch @@ -0,0 +1,30 @@ +From bb0435e3f3a934aece6ed08058ba0f767e9cbd78 Mon Sep 17 00:00:00 2001 +From: yasminvalim +Date: Fri, 5 Sep 2025 17:50:32 -0300 +Subject: [PATCH] blockdev.rs: uses blkid -p instead of lsblk to bypass the + cache + +release-notes: add notes and comment for more context +(cherry picked from commit d7b39b91268406e391f8fff246d81a7160cbc5d9) +--- + src/blockdev.rs | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/blockdev.rs b/src/blockdev.rs +index 504a5a7..63d6522 100644 +--- a/src/blockdev.rs ++++ b/src/blockdev.rs +@@ -494,7 +494,9 @@ impl Mount { + } + + pub fn get_filesystem_uuid(&self) -> Result { +- let devinfo = lsblk_single(Path::new(&self.device))?; ++ // We used to use lsblk_single, but its cache may be stale after mkfs. ++ // blkid_single doesn't use cache. ++ let devinfo = blkid_single(Path::new(&self.device))?; + devinfo + .get("UUID") + .map(String::from) +-- +2.52.0 + diff --git a/SPECS/rust-coreos-installer.spec b/SPECS/rust-coreos-installer.spec index 9c239dd..13dc5e4 100644 --- a/SPECS/rust-coreos-installer.spec +++ b/SPECS/rust-coreos-installer.spec @@ -12,7 +12,7 @@ Name: rust-%{crate} Version: 0.24.0 -Release: 3%{?dist} +Release: 5%{?dist} Summary: Installer for Fedora CoreOS and RHEL CoreOS # Upstream license specification: Apache-2.0 @@ -27,6 +27,10 @@ Source2: https://github.com/coreos/coreos-installer-dracut/archive/%{drac 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 +Patch2: 0003-install-check-if-firstboot-args-are-defined-and-add-.patch +Patch3: 0004-install-add-unit-tests.patch +# https://github.com/coreos/coreos-installer/pull/1692 +Patch4: 0005-blockdev.rs-uses-blkid-p-instead-of-lsblk-to-bypass-.patch ExclusiveArch: %{rust_arches} %if 0%{?rhel} && !0%{?eln} @@ -178,6 +182,14 @@ from the initramfs. %endif %changelog +* Thu Jan 22 2026 Yasmin Valim - 0.24.0-5 +- Uses blkid -p instead of lsblk to bypass the cache + Backport https://github.com/coreos/coreos-installer/pull/1692 + +* Wed Dec 24 2025 Yasmin Valim - 0.24.0-4 +- Check if firstboot args are defined and add them manually + Backport https://github.com/coreos/coreos-installer/pull/1699 + * 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