Skip to content

refactor: Use versioning in tags consistent with mkosi's internal $IMAGE_VERSION - #310

Draft
Smujb wants to merge 3 commits into
zirconium-dev:mainfrom
Smujb:image-version
Draft

Smujb wants to merge 3 commits into
zirconium-dev:mainfrom
Smujb:image-version

Conversation

@Smujb

@Smujb Smujb commented Jun 27, 2026

Copy link
Copy Markdown

Switch to an image naming scheme similar to Universal Blue, where images are named YYYYMMDD.V instead of simply YYYYMMDD. The V is a version number for disambiguation and it increments by 1 for every build on the same day.

mkosi.bump has been rewritten in Python to first check the existing mkosi.version and increment it if necessary according to this versioning scheme. Index starts at 0, so the first image built on any given day will be YYYYMMDD.0. This phases out the messy hack that was used before of using YYYYMMDDHHMMSS as the version mkosi.bump would return and then separately versioning the image itself.

Features:

  • /etc/os-release now has the version of the currently booted image under IMAGE_VERSION
  • bootc status will list the version associated with every deployment
  • All of this versioning is consistent with the tags on Github, so users know exactly which image they are on
  • Every build that succeeds, CI or local, will have a new version ID. This will be the case even when multiple images are built on the same day.

NOTE: This is a draft PR. I have tested that it builds and bumps correctly locally, but I have not been able to test the CI or a live system myself. It is worth testing this to make sure the change didn't break anything, however I have made very similar changes to Amethyris and Apollo and did most of my troubleshooting there.

Smujb added 3 commits June 27, 2026 18:24
The internal mkosi naming scheme has been changed from YYYYMMDDHHMMSS to YYYYMMDD.V where the V is an internal version number that increments by 1 each time a new image is built. This is in line with how Universal Blue (in particular Aurora) tags their image versions.

Additionally, the $IMAGE_VERSION variable is now exported to os-release.

Signed-off-by: SmuJB <smujaybdev@protonmail.com>
Signed-off-by: SmuJB <smujaybdev@protonmail.com>
build_push instead of generate_matrix

Signed-off-by: SmuJB <smujaybdev@protonmail.com>
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.

1 participant