Repository navigation
Conversation
mvo5
added a commit
to mvo5/images
that referenced
this pull request
May 20, 2025
This commit makes the `manifest.RootfsType` marshallable via JSON/YAML so that we can use it in the image defintions. This will be useful for: osbuild#1239 osbuild#1537
mvo5
added a commit
to mvo5/images
that referenced
this pull request
May 21, 2025
This commit makes the `manifest.RootfsType` marshallable via JSON/YAML so that we can use it in the image defintions. This will be useful for: osbuild#1239 osbuild#1537
mvo5
force-pushed
the
yaml-distroconfig-3
branch
5 times, most recently
from
May 22, 2025 20:21
3543b54 to
e6e9bb2
Compare
Instead of hard-coding the architectures just build them dynamically from the image type YAML.
This commit goes over the go code and remove parts that are no longer needed/tweaks because the distro loading is now more flexible.
This cleans up various yaml issues like indents, trailing spaces, etc.
This commit moves the `fedora` distro definitions into pure YAML. The goal is to get rid of the `distros/fedora` directory and to be able to fully define arbitrary distros in YAML. Note that this introduces a small maintenance regression (temporarely): when adding a new fedora version it used to be enough to just drop a "fedora-$ver.json" file into the `data/repositories` dir and the factory will take care of providing the distro. With this new YAML 2 extra lines in `defs/distros.yaml` are needed. This will eventually become (almost) as simple as before when we merge the default repositories into `distros.yaml` too (but we are not there yet, for a preview see: https://github.com/osbuild/images/compare/main...mvo5:yaml-distroconfig?expand=1 Moving there will also mean thinking about the "old" way to define/limit what distros are available, i.e. the composer rpm is using /etc/osbuild-composer/repositories to limit what distros are buildable.
This commit moves the fedora code to use the `distros.yaml` file to get the image definitions from there.
This commit adds a new `runner.RunnerConf` that allows to fully define runners in YAML. This will be used as part of the `distros.yaml` when defining a distro in pure YAML.
This is another step into generalizing the distro creation by making use of the new `runner.RunnerConf` to configure the runner via YAML.
Add a note about moving the default distro image config into distros.yaml or keep it in the image types file. Keeping it in the image types file has the advantage that things are "in-sync" naturally, i.e. when having a `rhel-10/images.yaml` and `distros.yaml` like this: ```yaml distros: - name: "centos-10" defs_dir: ./rhel-10 - name: "rhel-10.0" defs_dir: ./rhel-10 ``` there is no need to duplicate the default distro config. OTOH it feels more "natural" to have the DefaultImageConfig as part of the above.
This uses a per distro ISO label to customize the label on the iso images. It needs to be per-distro because the distros have slightly different layouts.
The "distro/fedora" is finally no longer fedora specific, it takes all of the data from the distros.yaml and the <distro_name>/distro.yaml now. Reflect this by renaming "fedora" -> "generic" and update the defs loader to be able to load arbitrary distro names and using the `defs_path` property. Note that this is most likely not the final layout of the code, having pkg/disro/defs and pkg/distro/generic may not be necessary and it might be simpler to just unify them into a single pkg/distro/$name or even just pkg/distro. OTOH having the distro "images" functions in their own pacakge might be nice, so we need to explore this a bit more.
The UEFIVendor on centos/rhel is set based on the distro vendor. To support this this new key is used. We should consider to just remove `UEFIVendor` but for now this is good enough to get centos going.
This commit moves the image types themselfs into pure YAML and also moves rhel10 into a generic distro.
Not all image types are available for centos, we need a way to decide what image types are available where. This is a crude way of doing it, we must go back to it.
We can no longer hardcode the default fstype in the distro specific go code, it needs to come from the YAML. Add support for this.
The `osCustomizations()` for the generic distro (originally fedora) does not know about X11KeymapLayouts customizations. This commit fixes this (also there should be a bigger refactor, the amount of data copying we need to do in osCustomizations() feels a bit much.
This moves the handling of unattended kickstart into YAML, we have drift between the `imageInstallerImage()` and in fedora we set additional kernel options (but also have a note there that it does not work) when the kickstart is set to unattended. But we do not do that on rhel.
This was referenced May 26, 2025
Contributor
Author
|
Closing this in favor of #1577 - most of the points from the original description are addressed there |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a spike/WIP branch of the YAMLlification work to showcase the direction. It is conceptually similar to #1462, i.e. this PR will most likely get closed and individual PRs will be created based on the changes/learnings.
With this PR we have no "pkg/distros/fedora" anymore but instead a new "pkg/distro/generic" that integrates into the distrofactory and will offer any distribution that is found in "pkg/distro/defs/distros.yaml". Here "fedora-{43,..,40}" are defined fully in YAML and as the next step we would take one of the rhels and define it as a generic/pure-YAML distro too.
With that we can add the following to distro/defs/distros.yaml:
and then generate a valid manifest for simonos-1:
There is a bunch of work/open questions of course still: