Skip to content

Commit

Permalink
Merge pull request #609 from cgwalters/static-trace
Browse files Browse the repository at this point in the history
model: Add tracking of our own static config versions
  • Loading branch information
jmarrero authored Jan 31, 2024
2 parents d1e8f87 + fa9924e commit 3464b3d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@ jobs:
-v /var/lib/containers:/var/lib/containers \
localhost/bootupd:latest bootc install to-filesystem --skip-fetch-check \
--disable-selinux --replace=alongside /target
# Verify we injected static configs
jq -re '.["static-configs"].version' /boot/bootupd-state.json
2 changes: 2 additions & 0 deletions src/bootupd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ pub(crate) fn install(

match configs.enabled_with_uuid() {
Some(uuid) => {
let self_meta = crate::packagesystem::query_files("/", ["/usr/bin/bootupctl"])?;
state.static_configs = Some(self_meta);
#[cfg(any(
target_arch = "x86_64",
target_arch = "aarch64",
Expand Down
2 changes: 2 additions & 0 deletions src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ pub(crate) struct SavedState {
pub(crate) installed: BTreeMap<String, InstalledContent>,
/// Maps a component name to an in progress update
pub(crate) pending: Option<BTreeMap<String, ContentMetadata>>,
/// If static bootloader configs are enabled, this contains the version
pub(crate) static_configs: Option<ContentMetadata>,
}

/// The status of an individual component.
Expand Down

0 comments on commit 3464b3d

Please sign in to comment.