Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] osbuild: define the minimum osbuild version and enforce it #1194

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

thozza
Copy link
Member

@thozza thozza commented Feb 5, 2025

Define a new variable storing the minimum osbuild version supported
by the module and an exported function to get it. The actual version is
stored in a text file under data/dependencies/ directory and embedded
at compile time. Enforce the minimum version when executing osbuild.

This has the potential to prevent surprises when using older osbuild
with images implementation that relies on changes in a newer version
of osbuild.

This will allow dependent projects to extract the minimum version and
check if their packaging requirements are up to date with the version of
images that they depend on.

This will enable adding a composite GH action that can be used by other
projects depending on osbuild/images to check that their SPEC file
depends at least on the specified osbuild version.

@thozza thozza requested a review from a team as a code owner February 5, 2025 10:57
@thozza thozza marked this pull request as draft February 5, 2025 10:57
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

Ok, this makes sense, I like it.

One thing I would change though is to probably put the minimum version in a text file and compile it in with go:embed, just for visibility and to make it easier to work with in some automated way. For example, if we want to read it during some testing, or if someone is browsing the repo to find it, it would be a lot easier to be able to point to something like res/osbuild-min-version. We could even link to it from the README or some docs without needing to point to specific lines in code.

@thozza
Copy link
Member Author

thozza commented Feb 5, 2025

One thing I would change though is to probably put the minimum version in a text file and compile it in with go:embed, just for visibility and to make it easier to work with in some automated way. For example, if we want to read it during some testing, or if someone is browsing the repo to find it, it would be a lot easier to be able to point to something like res/osbuild-min-version. We could even link to it from the README or some docs without needing to point to specific lines in code.

Great idea!

@thozza thozza force-pushed the check-osbuild-version branch 2 times, most recently from b77f689 to 2a30c5b Compare March 6, 2025 09:18
Define a new variable storing the minimum osbuild version supported
by the module and an exported function to get it. The actual version is
stored in a text file under `data/dependencies/` directory and embedded
at compile time. Enforce the minimum version when executing osbuild.

This has the potential to prevent surprises when using older osbuild
with `images` implementation that relies on changes in a newer version
of osbuild.

This will allow dependent projects to extract the minimum version and
check if their packaging requirements are up to date with the version of
`images` that they depend on.

This will enable adding a composite GH action that can be used by other
projects depending on `osbuild/images` to check that their SPEC file
depends at least on the specified osbuild version.

Signed-off-by: Tomáš Hozza <[email protected]>
@thozza thozza force-pushed the check-osbuild-version branch from 2a30c5b to 352be86 Compare March 6, 2025 09:20
@thozza thozza marked this pull request as ready for review March 6, 2025 10:15
@thozza thozza requested a review from achilleas-k March 6, 2025 15:50
Copy link
Member

@achilleas-k achilleas-k left a comment

Choose a reason for hiding this comment

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

Good stuff!

Copy link
Member

@supakeen supakeen left a comment

Choose a reason for hiding this comment

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

I'd probably call the file osbuild-minimum-version in case we want to also check other stuff later on but we can do that when we want to check other stuff later on.

@supakeen supakeen added this pull request to the merge queue Mar 6, 2025
Merged via the queue into osbuild:main with commit a342901 Mar 6, 2025
18 checks passed
@thozza
Copy link
Member Author

thozza commented Mar 10, 2025

I'd probably call the file osbuild-minimum-version in case we want to also check other stuff later on but we can do that when we want to check other stuff later on.

I initially used the filename that you've suggested, but then decided to use only the dependency name. The reason is that I can then iterate over the files in a custom GH action and take the filename as the name of the dependency and its content as the minimum version.

@thozza thozza deleted the check-osbuild-version branch March 10, 2025 14:31
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