From 2dc3626d89fc820841e570bb53238db8be9a7dcc Mon Sep 17 00:00:00 2001 From: Juan <1766933+judavi@users.noreply.github.com> Date: Tue, 24 Mar 2026 10:58:07 +0000 Subject: [PATCH 1/9] system-reinstall-bootc: add progress indication during install steps Signed-off-by: Juan <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 1 + crates/system-reinstall-bootc/Cargo.toml | 3 +++ crates/system-reinstall-bootc/src/main.rs | 3 +++ crates/system-reinstall-bootc/src/podman.rs | 15 +++++++++++++-- 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 140a9e70a..5a745da2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2942,6 +2942,7 @@ dependencies = [ "crossterm", "dialoguer", "fn-error-context", + "indicatif 0.18.3", "indoc", "log", "openssh-keys", diff --git a/crates/system-reinstall-bootc/Cargo.toml b/crates/system-reinstall-bootc/Cargo.toml index 921698e54..eef813543 100644 --- a/crates/system-reinstall-bootc/Cargo.toml +++ b/crates/system-reinstall-bootc/Cargo.toml @@ -32,6 +32,9 @@ tempfile = { workspace = true } tracing = { workspace = true } uzers = { workspace = true } +# Workspace dependencies (additional) +indicatif = { workspace = true } + # Crate-specific dependencies crossterm = "0.29.0" dialoguer = "0.12.0" diff --git a/crates/system-reinstall-bootc/src/main.rs b/crates/system-reinstall-bootc/src/main.rs index 3edf8cd49..28171d93d 100644 --- a/crates/system-reinstall-bootc/src/main.rs +++ b/crates/system-reinstall-bootc/src/main.rs @@ -85,6 +85,9 @@ fn run() -> Result<()> { prompt::temporary_developer_protection_prompt()?; + println!("Starting bootc installation. This may take several minutes..."); + println!(); + reinstall_podman_command .run_inherited_with_cmd_context() .context("running reinstall command")?; diff --git a/crates/system-reinstall-bootc/src/podman.rs b/crates/system-reinstall-bootc/src/podman.rs index 60dfefb52..52062dbe2 100644 --- a/crates/system-reinstall-bootc/src/podman.rs +++ b/crates/system-reinstall-bootc/src/podman.rs @@ -4,6 +4,7 @@ use super::ROOT_KEY_MOUNT_POINT; use anyhow::{Context, Result, ensure}; use bootc_utils::CommandRunExt; use fn_error_context::context; +use std::time::Duration; use std::process::Command; use which::which; @@ -80,7 +81,17 @@ pub(crate) fn reinstall_command(opts: &ReinstallOpts, ssh_key_file: &str) -> Res // bootc system for the first time. // This only happens if the bootc version in the image >= 1.1.8 (this is when the cleanup // feature was introduced) - if bootc_has_clean(&opts.image)? { + let spinner = indicatif::ProgressBar::new_spinner(); + spinner.set_style( + indicatif::ProgressStyle::default_spinner() + .template("{spinner} {msg}") + .unwrap(), + ); + spinner.set_message("Checking image capabilities..."); + spinner.enable_steady_tick(Duration::from_millis(150)); + let has_clean = bootc_has_clean(&opts.image)?; + spinner.finish_and_clear(); + if has_clean { bootc_command_and_args.push("--cleanup".to_string()); } @@ -172,4 +183,4 @@ pub(crate) fn ensure_podman_installed() -> Result<()> { ); Ok(()) -} +} \ No newline at end of file From f4f036416a6b47e98c101314814efc2aebeb478f Mon Sep 17 00:00:00 2001 From: Juan <1766933+judavi@users.noreply.github.com> Date: Tue, 24 Mar 2026 11:21:43 +0000 Subject: [PATCH 2/9] Revert changes in cargo file Signed-off-by: Juan <1766933+judavi@users.noreply.github.com> --- crates/tests-integration/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/tests-integration/Cargo.toml b/crates/tests-integration/Cargo.toml index 6306f508e..49a2c7f89 100644 --- a/crates/tests-integration/Cargo.toml +++ b/crates/tests-integration/Cargo.toml @@ -30,13 +30,13 @@ bootc-kernel-cmdline = { path = "../kernel_cmdline", version = "0.0.0" } # This is a git dependency — not published to crates.io. # When updating, also check the bcvk-qemu Cargo.toml for its own # dependency versions (cap-std-ext, etc.) to avoid conflicts. -bcvk-qemu = { git = "https://github.com/bootc-dev/bcvk", rev = "5c42e91250ab87502b7beeb2c7ea94a54ee8f5d9" } +bcvk-qemu = { git = "https://github.com/bootc-dev/bcvk", rev = "3b4dc84453d7ebac9e544d15931f0a9cd3d26215" } data-encoding = "2.9" indicatif = { workspace = true } libtest-mimic = "0.8.0" oci-spec = "0.9.0" rand = "0.10" -rexpect = "0.7" +rexpect = "0.6" scopeguard = "1.2.0" tar = "0.4" tokio = { workspace = true, features = ["rt", "macros"] } From 0aede93c383fe43d2ee0ff846ca7efdf803f09d0 Mon Sep 17 00:00:00 2001 From: Juan <1766933+judavi@users.noreply.github.com> Date: Tue, 24 Mar 2026 11:23:58 +0000 Subject: [PATCH 3/9] Undo cargo.lock changes Signed-off-by: Juan <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5a745da2b..cc1d55a6f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3997,4 +3997,4 @@ checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", -] +] \ No newline at end of file From 227d2d00f56987a9b699044bb8da337ff6db8736 Mon Sep 17 00:00:00 2001 From: Juan <1766933+judavi@users.noreply.github.com> Date: Tue, 24 Mar 2026 11:26:32 +0000 Subject: [PATCH 4/9] Cargo.lock: sync with upstream main Signed-off-by: Juan <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cc1d55a6f..140a9e70a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2942,7 +2942,6 @@ dependencies = [ "crossterm", "dialoguer", "fn-error-context", - "indicatif 0.18.3", "indoc", "log", "openssh-keys", @@ -3997,4 +3996,4 @@ checksum = "91e19ebc2adc8f83e43039e79776e3fda8ca919132d68a1fed6a5faca2683748" dependencies = [ "cc", "pkg-config", -] \ No newline at end of file +] From 35c37665171976a31d519f89729d52e510a6204f Mon Sep 17 00:00:00 2001 From: Juan Gomez <1766933+judavi@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:46:29 +0000 Subject: [PATCH 5/9] Removing Cargo.lock changes Signed-off-by: Juan Gomez <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 140a9e70a..e0d3628e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,7 +170,7 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bcvk-qemu" version = "0.1.0" -source = "git+https://github.com/bootc-dev/bcvk?rev=5c42e91250ab87502b7beeb2c7ea94a54ee8f5d9#5c42e91250ab87502b7beeb2c7ea94a54ee8f5d9" +source = "git+https://github.com/bootc-dev/bcvk?rev=3b4dc84453d7ebac9e544d15931f0a9cd3d26215#3b4dc84453d7ebac9e544d15931f0a9cd3d26215" dependencies = [ "camino", "cap-std-ext 5.1.1", @@ -2553,9 +2553,9 @@ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rexpect" -version = "0.7.0" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e459b12e442eb95f78b7e69bb2c3a64fc96f24d90dbc47fb028d94ffb26ce1e8" +checksum = "9a0ac16ec311879f32b8b1963eb6b81792f30c6bede86d8ce83ad5adfca4698d" dependencies = [ "comma", "nix 0.31.2", @@ -2942,6 +2942,7 @@ dependencies = [ "crossterm", "dialoguer", "fn-error-context", + "indicatif 0.18.3", "indoc", "log", "openssh-keys", From 3d6b7dc11664bc09260329ad640f10d05acf8d10 Mon Sep 17 00:00:00 2001 From: Juan Gomez <1766933+judavi@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:51:26 +0000 Subject: [PATCH 6/9] Removing Cargo.lock Cargo.toml changes Signed-off-by: Juan Gomez <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 6 +++--- crates/tests-integration/Cargo.toml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e0d3628e5..5a745da2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -170,7 +170,7 @@ checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] name = "bcvk-qemu" version = "0.1.0" -source = "git+https://github.com/bootc-dev/bcvk?rev=3b4dc84453d7ebac9e544d15931f0a9cd3d26215#3b4dc84453d7ebac9e544d15931f0a9cd3d26215" +source = "git+https://github.com/bootc-dev/bcvk?rev=5c42e91250ab87502b7beeb2c7ea94a54ee8f5d9#5c42e91250ab87502b7beeb2c7ea94a54ee8f5d9" dependencies = [ "camino", "cap-std-ext 5.1.1", @@ -2553,9 +2553,9 @@ checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rexpect" -version = "0.6.4" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a0ac16ec311879f32b8b1963eb6b81792f30c6bede86d8ce83ad5adfca4698d" +checksum = "e459b12e442eb95f78b7e69bb2c3a64fc96f24d90dbc47fb028d94ffb26ce1e8" dependencies = [ "comma", "nix 0.31.2", diff --git a/crates/tests-integration/Cargo.toml b/crates/tests-integration/Cargo.toml index 49a2c7f89..6306f508e 100644 --- a/crates/tests-integration/Cargo.toml +++ b/crates/tests-integration/Cargo.toml @@ -30,13 +30,13 @@ bootc-kernel-cmdline = { path = "../kernel_cmdline", version = "0.0.0" } # This is a git dependency — not published to crates.io. # When updating, also check the bcvk-qemu Cargo.toml for its own # dependency versions (cap-std-ext, etc.) to avoid conflicts. -bcvk-qemu = { git = "https://github.com/bootc-dev/bcvk", rev = "3b4dc84453d7ebac9e544d15931f0a9cd3d26215" } +bcvk-qemu = { git = "https://github.com/bootc-dev/bcvk", rev = "5c42e91250ab87502b7beeb2c7ea94a54ee8f5d9" } data-encoding = "2.9" indicatif = { workspace = true } libtest-mimic = "0.8.0" oci-spec = "0.9.0" rand = "0.10" -rexpect = "0.6" +rexpect = "0.7" scopeguard = "1.2.0" tar = "0.4" tokio = { workspace = true, features = ["rt", "macros"] } From d6b4f1f098f535fdc32ecf31b25e79556acd33ae Mon Sep 17 00:00:00 2001 From: Juan Gomez <1766933+judavi@users.noreply.github.com> Date: Wed, 25 Mar 2026 12:52:54 +0000 Subject: [PATCH 7/9] Cargo.lock: remove indicatif dependency added by system-reinstall-bootc change Assisted-by: Claude Code (claude-sonnet-4-6) Signed-off-by: Juan Gomez <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 1 - 1 file changed, 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 5a745da2b..140a9e70a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2942,7 +2942,6 @@ dependencies = [ "crossterm", "dialoguer", "fn-error-context", - "indicatif 0.18.3", "indoc", "log", "openssh-keys", From dbf5daccf8c191e2bbb7e18a39f6bc2b263290be Mon Sep 17 00:00:00 2001 From: Juan Gomez <1766933+judavi@users.noreply.github.com> Date: Wed, 25 Mar 2026 13:02:34 +0000 Subject: [PATCH 8/9] Move `bootc_has_clean` out of `reinstall_command` and into `run()` in main.rs, so the pull and capability-check steps are clearly distinct and sequenced Signed-off-by: Juan Gomez <1766933+judavi@users.noreply.github.com> --- crates/system-reinstall-bootc/src/main.rs | 19 +++++++++++++++++-- crates/system-reinstall-bootc/src/podman.rs | 19 ++++++------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/crates/system-reinstall-bootc/src/main.rs b/crates/system-reinstall-bootc/src/main.rs index 28171d93d..d4626456c 100644 --- a/crates/system-reinstall-bootc/src/main.rs +++ b/crates/system-reinstall-bootc/src/main.rs @@ -5,6 +5,7 @@ use bootc_utils::CommandRunExt; use clap::Parser; use fn_error_context::context; use rustix::process::getuid; +use std::time::Duration; mod btrfs; mod config; @@ -54,11 +55,24 @@ fn run() -> Result<()> { podman::ensure_podman_installed()?; - //pull image early so it can be inspected, e.g. to check for cloud-init + // Pull phase: explicitly pull the image before any other operations that use it. + // This ensures no implicit pulls happen in later steps (e.g. capability check). podman::pull_if_not_present(&opts.image)?; println!(); + // Capability check phase: run after the image is guaranteed to be present locally. + let spinner = indicatif::ProgressBar::new_spinner(); + spinner.set_style( + indicatif::ProgressStyle::default_spinner() + .template("{spinner} {msg}") + .expect("Failed to parse spinner template"), + ); + spinner.set_message("Checking image capabilities..."); + spinner.enable_steady_tick(Duration::from_millis(150)); + let has_clean = podman::bootc_has_clean(&opts.image)?; + spinner.finish_and_clear(); + let ssh_key_file = tempfile::NamedTempFile::new()?; let ssh_key_file_path = ssh_key_file .path() @@ -71,7 +85,8 @@ fn run() -> Result<()> { prompt::mount_warning()?; - let mut reinstall_podman_command = podman::reinstall_command(&opts, ssh_key_file_path)?; + let mut reinstall_podman_command = + podman::reinstall_command(&opts, ssh_key_file_path, has_clean)?; println!(); println!("Going to run command:"); diff --git a/crates/system-reinstall-bootc/src/podman.rs b/crates/system-reinstall-bootc/src/podman.rs index 52062dbe2..5c8c43812 100644 --- a/crates/system-reinstall-bootc/src/podman.rs +++ b/crates/system-reinstall-bootc/src/podman.rs @@ -4,12 +4,11 @@ use super::ROOT_KEY_MOUNT_POINT; use anyhow::{Context, Result, ensure}; use bootc_utils::CommandRunExt; use fn_error_context::context; -use std::time::Duration; use std::process::Command; use which::which; #[context("bootc_has_clean")] -fn bootc_has_clean(image: &str) -> Result { +pub(crate) fn bootc_has_clean(image: &str) -> Result { let output = Command::new("podman") .args([ "run", @@ -26,7 +25,11 @@ fn bootc_has_clean(image: &str) -> Result { } #[context("reinstall_command")] -pub(crate) fn reinstall_command(opts: &ReinstallOpts, ssh_key_file: &str) -> Result { +pub(crate) fn reinstall_command( + opts: &ReinstallOpts, + ssh_key_file: &str, + has_clean: bool, +) -> Result { let mut podman_command_and_args = [ // We use podman to run the bootc container. This might change in the future to remove the // podman dependency. @@ -81,16 +84,6 @@ pub(crate) fn reinstall_command(opts: &ReinstallOpts, ssh_key_file: &str) -> Res // bootc system for the first time. // This only happens if the bootc version in the image >= 1.1.8 (this is when the cleanup // feature was introduced) - let spinner = indicatif::ProgressBar::new_spinner(); - spinner.set_style( - indicatif::ProgressStyle::default_spinner() - .template("{spinner} {msg}") - .unwrap(), - ); - spinner.set_message("Checking image capabilities..."); - spinner.enable_steady_tick(Duration::from_millis(150)); - let has_clean = bootc_has_clean(&opts.image)?; - spinner.finish_and_clear(); if has_clean { bootc_command_and_args.push("--cleanup".to_string()); } From 2055c56af0e4be3ae3e274a084b24925fd1b6f83 Mon Sep 17 00:00:00 2001 From: Juan Gomez <1766933+judavi@users.noreply.github.com> Date: Wed, 25 Mar 2026 13:17:44 +0000 Subject: [PATCH 9/9] system-reinstall-bootc: fix formatting and restore indicatif in Cargo.lock Fix missing newline at EOF in podman.rs flagged by cargo fmt. Also restore the indicatif 0.18.3 entry in Cargo.lock which was accidentally dropped when reverting unrelated Cargo.lock changes; indicatif is a real dependency of system-reinstall-bootc. Assisted-by: Claude Code (claude-sonnet-4-6) Signed-off-by: Juan Gomez <1766933+judavi@users.noreply.github.com> --- Cargo.lock | 1 + crates/system-reinstall-bootc/src/podman.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.lock b/Cargo.lock index 140a9e70a..5a745da2b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2942,6 +2942,7 @@ dependencies = [ "crossterm", "dialoguer", "fn-error-context", + "indicatif 0.18.3", "indoc", "log", "openssh-keys", diff --git a/crates/system-reinstall-bootc/src/podman.rs b/crates/system-reinstall-bootc/src/podman.rs index 5c8c43812..7a9e104f8 100644 --- a/crates/system-reinstall-bootc/src/podman.rs +++ b/crates/system-reinstall-bootc/src/podman.rs @@ -176,4 +176,4 @@ pub(crate) fn ensure_podman_installed() -> Result<()> { ); Ok(()) -} \ No newline at end of file +}