bootc
bootc copied to clipboard
`bootc status` does not report unlocked status
Running bootc usoverlay is not reflected in bootc status as far as I could see.
How would we want this to look?
I made an attempt at this issue, and implemented something that works. But I also noticed another issue which seems somewhat related (#1044), and I'm not quite sure if the implementation of one would impact another or if they are two distinct features.
❯ sudo ./target/debug/bootc status
[sudo] password for admin:
Staged image: ghcr.io/rsturla/eternal-linux/lumina:42-nvidia-open
Digest: sha256:e53063e967e52c07d7fffd1714fb3d5ff3f97675608ca007419ba1a68d2ba35f
Version: 250403 (2025-04-03T01:44:51Z)
● Booted image: ghcr.io/rsturla/eternal-linux/lumina:42-nvidia-open
Digest: sha256:438654e56f50129441905df1fa72f026478aff6e3850d77ec8c8dda3e5f91ebe
Version: 250401 (2025-04-01T21:48:54Z)
Unlocked: development
Rollback image: ghcr.io/rsturla/eternal-linux/lumina:stable-nvidia-open
Digest: sha256:79403bb8be5515a7937710310a68020724c25488ba687269832189e6375da227
Version: 250329 (2025-03-29T01:44:28Z)
For the above, I'm using the value returned from Deployment.unlocked()
Something like this?
diff --git i/lib/src/spec.rs w/lib/src/spec.rs
index fb784570..975fd11d 100644
--- i/lib/src/spec.rs
+++ w/lib/src/spec.rs
@@ -53,6 +53,15 @@ pub enum Store {
OstreeContainer,
}
+#[derive(
+ clap::ValueEnum, Serialize, Deserialize, Copy, Clone, Debug, PartialEq, Eq, JsonSchema,
+)]
+#[serde(rename_all = "camelCase")]
+pub enum FilesystemOverlay {
+ Readonly,
+ ReadWrite,
+}
+
#[derive(Serialize, Deserialize, Default, Debug, Clone, PartialEq, Eq, JsonSchema)]
#[serde(rename_all = "camelCase")]
/// The host specification
@@ -62,6 +71,9 @@ pub struct HostSpec {
/// If set, and there is a rollback deployment, it will be set for the next boot.
#[serde(default)]
pub boot_order: BootOrder,
+ /// Matches the `ostree admin unlock` state
+ #[serde(default)]
+ usr_overlay: Option<FilesystemOverlay>,
}
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, JsonSchema)]
@@ -157,6 +169,8 @@ pub struct HostStatus {
/// Set to true if the rollback entry is queued for the next boot.
#[serde(default)]
pub rollback_queued: bool,
+ #[serde(default)]
+ pub usr_overlay: Option<FilesystemOverlay>,
/// The detected type of system
#[serde(rename = "type")]
?
I made an attempt at this issue, and implemented something that works.
BTW feel free to drop even raw "git diff" style output in issues or on the chat channel to ask for early feedback too