install/aleph: add .aleph-version.json symlink - #2346
Conversation
eb53e87 to
75e4751
Compare
aleph-version.json symlink.aleph-version.json symlink
| /// 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"; |
There was a problem hiding this comment.
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.
|
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 |
75e4751 to
fd07336
Compare
| .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) { |
There was a problem hiding this comment.
I would have factored out a little symlink_idempotent helper, something to do for the future
There was a problem hiding this comment.
I just did that while addressing the missing DCO and other linter complains :)
Head branch was pushed to by a user without write access
62ef6a7 to
29ec82c
Compare
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>
29ec82c to
6abd324
Compare
|
Sorry I meant that's something we can do as a separate PR, didn't have to block this one. |
This adds a compatibility symlink along the created
.bootc-aleph.jsonnamed.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