Skip to content

coreos: generalize to any aleph created by bootc - #1124

Merged
Johan-Liebert1 merged 2 commits into
coreos:mainfrom
jbtrystram:generalize-aleph
Jul 27, 2026
Merged

Johan-Liebert1 merged 2 commits into
coreos:mainfrom
jbtrystram:generalize-aleph

Conversation

@jbtrystram

Copy link
Copy Markdown
Member

Rename the coreos module to aleph as bootc install will create an aleph file in all cases except the composefs path.

There is nothing specific to coreOS anymore in this path.

See bootc-dev/bootc@c6112d2 And coreos/fedora-coreos-tracker#2187

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request replaces the CoreOS-specific coreos.rs module with a more generic aleph.rs module to support both CoreOS (.coreos-aleph-version.json) and bootc (.bootc-aleph.json) aleph version files. The feedback suggests improving robustness by falling back to file modification time if creation time is unsupported by the filesystem, and adding error context when parsing the JSON files.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread src/aleph.rs
log::debug!("Found aleph version in {aleph_path}");
return Ok(Some(AlephWithTimestamp {
aleph,
ts: meta.created()?.into(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using metadata.created() can fail on filesystems or operating systems that do not support or expose creation times (returning std::io::ErrorKind::Unsupported or similar). Since this error is propagated with ?, it will cause get_aleph_version to fail entirely, which in turn breaks bootupd status and updates on those systems.

Falling back to metadata.modified() when created() fails makes this much more robust.

Suggested change
ts: meta.created()?.into(),
ts: meta.created().or_else(|_| meta.modified())?.into(),

Comment thread src/aleph.rs Resolved
Pure rename of coreos.rs -> aleph.rs and update of all import
paths. No functional changes, done as a separate commit so git
tracks the rename and subsequent changes show as a diff.

Authored-by: Opencode.ai claude-opus-4-6@default
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Jul 16, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Jul 16, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124
@Johan-Liebert1
Johan-Liebert1 self-requested a review July 23, 2026 08:38

@Johan-Liebert1 Johan-Liebert1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One comment else LGTM

Comment thread src/aleph.rs Resolved
Comment thread src/aleph.rs
let bufr = std::io::BufReader::new(statusf);
let aleph: Aleph = serde_json::from_reader(bufr)?;
log::debug!("Found aleph version in {aleph_path}");
return Ok(Some(AlephWithTimestamp {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're returning as soon as we find a file. Are we sure we won't have one in both the paths?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If both exists, the second will be a symlink to the bootc one anyway.

When this ships, we will drop the compat symlink

@Johan-Liebert1

Copy link
Copy Markdown
Member

Also needs cargo fmt

The aleph module was previously specific to CoreOS
(.coreos-aleph-version.json). bootc install to-filesystem also writes
an aleph file at /sysroot/.bootc-aleph.json. Support both paths,
checking the CoreOS path first for backward compatibility.

Also generalize comments, log messages, and variable names to no
longer be CoreOS-specific, and add tests for the bootc aleph format
including a realistic sample from bootc-dev/bootc@c6112d2.

Authored-by: Opencode.ai claude-opus-4-6@default
@jbtrystram

Copy link
Copy Markdown
Member Author

The jenkins test here will be fixed with coreos/fedora-coreos-config#4261

@Johan-Liebert1
Johan-Liebert1 merged commit 3d63d03 into coreos:main Jul 27, 2026
12 checks passed
@cgwalters

Copy link
Copy Markdown
Member

I think this is fine, but...probably something got missed here in that the aleph stuff was only added to bootupd precisely because before bootupd existed, the aleph data had some (indirect) information about the bootloader state.

No system installed that has a bootc aleph will be missing bootupd data (except those using systemd-boot directly, but those don't have bootupd installed either!).

Rolv-Apneseth pushed a commit to jbtrystram/fedora-coreos-config that referenced this pull request Aug 18, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124
Rolv-Apneseth pushed a commit to jbtrystram/fedora-coreos-config that referenced this pull request Aug 18, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124
dustymabe added a commit to dustymabe/fedora-coreos-config that referenced this pull request Aug 25, 2026
The aleph version wording upstream was changed slightly in [1]
so let's adjust our tests here to just search for 'aleph version'
and ignoring case to accomodate the new output:

```
[core@cosa-devsh ~]$ sudo bootupctl status
Running as unit: bootupd.service
Component BIOS
  Installed: grub2-tools-1:2.12-78.fc46.x86_64
  Update: At latest version
Component EFI
  Installed: grub2-1:2.12-78.fc46,shim-16.1-7
  Update: At latest version
No components are adoptable.
Aleph version: 46.20260825.91.dev1
Boot method: BIOS
```

[1] coreos/bootupd#1124
dustymabe added a commit to coreos/fedora-coreos-config that referenced this pull request Aug 26, 2026
The aleph version wording upstream was changed slightly in [1]
so let's adjust our tests here to just search for 'aleph version'
and ignoring case to accomodate the new output:

```
[core@cosa-devsh ~]$ sudo bootupctl status
Running as unit: bootupd.service
Component BIOS
  Installed: grub2-tools-1:2.12-78.fc46.x86_64
  Update: At latest version
Component EFI
  Installed: grub2-1:2.12-78.fc46,shim-16.1-7
  Update: At latest version
No components are adoptable.
Aleph version: 46.20260825.91.dev1
Boot method: BIOS
```

[1] coreos/bootupd#1124
@Johan-Liebert1 Johan-Liebert1 mentioned this pull request Aug 31, 2026
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Sep 15, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124

Co-authored-by: Rolv Apneseth <[email protected]>
jbtrystram added a commit to jbtrystram/fedora-coreos-config that referenced this pull request Sep 15, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

Also make use of the new bootupd status `--json` flag to make the
parsing more determinstic.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124

Co-authored-by: Rolv Apneseth <[email protected]>
jbtrystram added a commit to coreos/fedora-coreos-config that referenced this pull request Sep 15, 2026
Disk images created by `bootc install` are shipping an aleph file at a
different path than what existed historically.
Update our tests to look for both locations.

Also make use of the new bootupd status `--json` flag to make the
parsing more determinstic.

See coreos/fedora-coreos-tracker#2187
And coreos/bootupd#1124

Co-authored-by: Rolv Apneseth <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants