many: drop custom distrodefs and use images library#1066
Closed
mvo5 wants to merge 6 commits intoosbuild:mainfrom
Closed
many: drop custom distrodefs and use images library#1066mvo5 wants to merge 6 commits intoosbuild:mainfrom
distrodefs and use images library#1066mvo5 wants to merge 6 commits intoosbuild:mainfrom
Conversation
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 28, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. This is used by osbuild/bootc-image-builder#1066
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 28, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
945a411 to
7cd20c3
Compare
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
a86d875 to
5745939
Compare
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
distrodefs and use images DistroYAMLdistrodefs and use images library
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Oct 29, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
github-merge-queue bot
pushed a commit
to osbuild/images
that referenced
this pull request
Nov 4, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
github-merge-queue bot
pushed a commit
to osbuild/images
that referenced
this pull request
Nov 4, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
github-merge-queue bot
pushed a commit
to osbuild/images
that referenced
this pull request
Nov 4, 2025
This commits adds a new `bootc-rpm-installer` image type that contains only the rpm packages lists and installer config for now so that bootc-image-builder can use the images library to get what rpm package it needs to install to build a bootable ISO. The advantage is that we can retire the code in bib that the YAML loading for the pacakge lists and that we have one central location when we need to update image definitions. The other advantage is that all the syntax for conditions on the exact version works. Note that this image type is not visible by default because the loader will skip image types that have no filename set. This is used by osbuild/bootc-image-builder#1066
5ab0689 to
848ef51
Compare
thozza
previously approved these changes
Nov 5, 2025
| if err != nil { | ||
| return nil, err | ||
| } | ||
| // XXX: or "bootc-legacy-installer"? |
Member
There was a problem hiding this comment.
or bootc-package-installer based on "image mode" vs. "package mode"... I have no preference.
Member
There was a problem hiding this comment.
I prefer bootc-package-installer to bootc-rpm-installer. But I think legacy might be clearer here as something we want people to start moving away from.
848ef51 to
670c994
Compare
Contributor
Author
|
Sorry, had to force push because of conflicts. |
thozza
approved these changes
Nov 10, 2025
Also update for the renaming of image.NewAnacondaContainerInstaller to image.NewAnacondaContainerInstallerLegacy
Instead of having a separate implementation of the required packages and the required lorax templates and similar we now reuse the images `data/distrodefs` YAML so that all the packages/definitions are maintained in a central place.
This commit adds a fallback check when no direct match for
the distro ID from the bootc image is found. As long as
the bootc container sets a correct `ID_LIKE` we should
automatically have the same behavior as before when
we used symlinks as aliases.
If needed we might need to reintroduce an explicit
mapping like:
```go
// mapping of distro IDs that are compatible with
var distroCompat = map[string]string{
"almalinux": "rhel",
"aurora": "fedora",
"aurora-helium": "rhel",
"bazzite": "fedora",
"bluefin": "fedora",
"heliumos": "rhel",
"rocky": "rhel",
}
```
but lets hope we don't need this.
Note that these tests use the "real" distros.yaml from the images library
so make sure that if rhel-9 goes away the test is updated for rhel-XY
(only the version needs to change)
Reuse the helpers from the `images` library for to do: - labelForISO() - getDistroAndRunner() This code moved into images as part of osbuild/images#1906 and we can now reuse it here instead of duplicating it.
Workloads are no longer used in the images library. This NullWorkload is also no longer used so drop it.
670c994 to
1de1ad1
Compare
Contributor
Author
|
I'm closing this in favor of osbuild/image-builder-cli#374 and #1157 - I think instead of this we can focus on making it a multicall binary directly. If it turns out to be too difficult/too much churn in a single go we can revisit/reopen this PR. |
auto-merge was automatically disabled
November 21, 2025 09:56
Pull request was closed
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.
Instead of having a separate implementation of the required
packages and the required lorax templates and similar we
now reuse the images
data/distrodefsYAML so that allthe packages/definitions are maintained in a central place.
The one issue with this is that we no longer support the distrodefs
path concept:
I'm 95% sure this is not used outside of testing but I wanted to call it out.
bib: add support for ID_LIKE when finding the distro YAML
This commit adds a fallback check when no direct match for
the distro ID from the bootc image is found. As long as
the bootc container sets a correct
ID_LIKEwe shouldautomatically have the same behavior as before when
we used symlinks as aliases.
If needed we might need to reintroduce an explicit
mapping like:
but lets hope we don't need this.
Note that these tests use the "real" distros.yaml from the images library
so make sure that if rhel-9 goes away the test is updated for rhel-XY
(only the version needs to change)
bib: use
imageslibrary for shared bootc helpersReuse the helpers from the
imageslibrary for to do:This code moved into images as part of
osbuild/images#1906
and we can now reuse it here instead of duplicating it.
bib: drop no-longer used NullWorkload
Workloads are no longer used in the images library. This
NullWorkload is also no longer used so drop it.