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

osbuild: update org.osbuild.systemd.unit.create stage #1191

Merged
merged 6 commits into from
Feb 5, 2025

Conversation

achilleas-k
Copy link
Member

This PR updates the org.osbuild.systemd.unit.create stage to match the options in osbuild, especially the new sections for mount and socket unit types.
Tests added to cover all validation failures.

The struct for these options is named MountSection because Mount is
already defined for osbuild Mount modules.
Rename all the types that are used for systemd.unit.create stage options
for consistency.
@achilleas-k achilleas-k requested a review from a team as a code owner February 4, 2025 17:21
Split the stage option validation based on the filename extension and
validate each separately.
The SystemdUnit type holds options for all unit types: service, mount,
and socket.  Rename it from SystemdServiceUnit so that it doesn't imply
only one of the three is supported.
@achilleas-k achilleas-k force-pushed the update/systemd.unit.create branch from ef0299c to e8310ec Compare February 4, 2025 17:30
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.

Random thought but it'd be quite nice if we could partially codegen validate functions based on schemas.

Copy link
Member

@thozza thozza left a comment

Choose a reason for hiding this comment

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

Thanks.

We should really somehow mark the minimum osbuild version for images version, to not generate manifests that will fail with old osbuild and also auto-detect (by some kind of test) in all places that use images, that we need to bump the dependency in the SPEC.

@thozza thozza added this pull request to the merge queue Feb 5, 2025
Merged via the queue into osbuild:main with commit e8310ec Feb 5, 2025
30 checks passed
@achilleas-k achilleas-k deleted the update/systemd.unit.create branch February 5, 2025 16:34
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