Skip to content

Commit 3464b3d

Browse files
authored
Merge pull request #609 from cgwalters/static-trace
model: Add tracking of our own static config versions
2 parents d1e8f87 + fa9924e commit 3464b3d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

.github/workflows/ci.yml

+2
Original file line numberDiff line numberDiff line change
@@ -46,3 +46,5 @@ jobs:
4646
-v /var/lib/containers:/var/lib/containers \
4747
localhost/bootupd:latest bootc install to-filesystem --skip-fetch-check \
4848
--disable-selinux --replace=alongside /target
49+
# Verify we injected static configs
50+
jq -re '.["static-configs"].version' /boot/bootupd-state.json

src/bootupd.rs

+2
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ pub(crate) fn install(
108108

109109
match configs.enabled_with_uuid() {
110110
Some(uuid) => {
111+
let self_meta = crate::packagesystem::query_files("/", ["/usr/bin/bootupctl"])?;
112+
state.static_configs = Some(self_meta);
111113
#[cfg(any(
112114
target_arch = "x86_64",
113115
target_arch = "aarch64",

src/model.rs

+2
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ pub(crate) struct SavedState {
5050
pub(crate) installed: BTreeMap<String, InstalledContent>,
5151
/// Maps a component name to an in progress update
5252
pub(crate) pending: Option<BTreeMap<String, ContentMetadata>>,
53+
/// If static bootloader configs are enabled, this contains the version
54+
pub(crate) static_configs: Option<ContentMetadata>,
5355
}
5456

5557
/// The status of an individual component.

0 commit comments

Comments
 (0)