Skip to content

install/aleph: add .aleph-version.json symlink - #2346

Open
jbtrystram wants to merge 2 commits into
bootc-dev:mainfrom
jbtrystram:aleph-symlink
Open

jbtrystram wants to merge 2 commits into
bootc-dev:mainfrom
jbtrystram:aleph-symlink

Conversation

@jbtrystram

Copy link
Copy Markdown
Contributor

This adds a compatibility symlink along the created .bootc-aleph.json named .aleph-version.json.

This compat symlink allow for an easier migration from osbuild's aleph stage [1] to the aleph provided by bootc install. This also create a precedent for a "standard" aleph well-known filename that isn't tied to the name of the tool creating it.

Note that coreOS and bootupd relies on this aleph file to exist.

[1] https://github.com/osbuild/osbuild/blob/main/stages/org.osbuild.ostree.aleph

See coreos/fedora-coreos-tracker#2187

@bootc-bot
bootc-bot Bot requested a review from jmarrero July 27, 2026 15:36
@github-actions github-actions Bot added area/install Issues related to `bootc install` area/documentation Updates to the documentation labels Jul 27, 2026
@jbtrystram jbtrystram changed the title install/aleph: add aleph-version.json symlink install/aleph: add .aleph-version.json symlink Jul 27, 2026
Comment thread crates/lib/src/install/aleph.rs Outdated
Comment thread crates/lib/src/install/aleph.rs Outdated
/// Path to initially deployed version information
pub(crate) const BOOTC_ALEPH_PATH: &str = ".bootc-aleph.json";
/// Compatibility symlink so the aleph data is also accessible as `.aleph-version.json`
const BOOTC_ALEPH_SYMLINK: &str = ".aleph-version.json";

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

But it's not (IMO) a BOOTC_ALEPH_ anymore right? We've just made up a new file name that's used as a kind of hidden API between osbuild and coreos and bootc right?

While it's accessible via git log anyways, I think the comment here should link to the FCOS tracker issue is I believe that's the canonical thing defining its existence/rationale - it's not directly part of this project.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated

@cgwalters

Copy link
Copy Markdown
Collaborator

I guess I'll just keep repeating that I feel like the aleph stuff was a mistake, but we've also spent way too much time talking about it relative to its importance;

cc coreos/fedora-coreos-tracker#2187 (comment)

So anyways LGTM after issues above are addressed

cgwalters
cgwalters previously approved these changes Jul 28, 2026
Comment thread crates/lib/src/install/aleph.rs Outdated
.context("Writing aleph version")?;
// Create a symlink so the aleph data is also accessible
// at the legacy path.
match root.symlink(BOOTC_ALEPH_PATH, ALEPH_SYMLINK) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would have factored out a little symlink_idempotent helper, something to do for the future

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just did that while addressing the missing DCO and other linter complains :)

@cgwalters
cgwalters enabled auto-merge July 28, 2026 13:32
auto-merge was automatically disabled July 28, 2026 13:56

Head branch was pushed to by a user without write access

@jbtrystram
jbtrystram force-pushed the aleph-symlink branch 3 times, most recently from 62ef6a7 to 29ec82c Compare July 28, 2026 13:58
It will no-op if the symlink already exists and already points to the
correct target, otherwise re-create it.

Signed-off-by: Jean-Baptiste Trystram <jbtrystram@redhat.com>
This adds a compatibility symlink along the created `.bootc-aleph.json`
named `.aleph-version.json`.

This compat symlink allow for an easier migration from osbuild's
aleph stage [1] to the aleph provided by `bootc install`.
This also create a precedent for a "standard" aleph well-known
filename that isn't tied to the name of the tool creating it.

Note that coreOS and bootupd relies on this aleph file to exist.

[1] https://github.com/osbuild/osbuild/blob/main/stages/org.osbuild.ostree.aleph

See coreos/fedora-coreos-tracker#2187

Signed-off-by: Jean-Baptiste Trystram <jbtrystram@redhat.com>
@cgwalters

Copy link
Copy Markdown
Collaborator

Sorry I meant that's something we can do as a separate PR, didn't have to block this one.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation area/install Issues related to `bootc install`

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants