Repository navigation
Conversation
This is needed for the YAML-ification of image-config.
This commit adds a new `defs.ImageConfig()` to load per image
type specific image config loading. This allows to write:
```yaml
image_types:
test_type:
image_config:
locale: "C.UTF-8"
timezone: "DefaultTZ"
condition:
version_less_than:
"2":
timezone: "OverrideTZ"
```
This commit moves the `ImageConfig` of each package into the distro.yaml.
We will need this in the osbuild package as well so move it into a common place.
Move the rhel10 ImageConfig into YAML.
mvo5
commented
Apr 24, 2025
| }, | ||
| // E4S/EUS | ||
| // | ||
| // XXX: this must become a declrative option like |
Contributor
Author
There was a problem hiding this comment.
This can/will be fixed once #1464 is merged
This is needed for the YAMLification, we will use need to define the platform in YAML too.
Collaborator
|
This PR changes the images API or behaviour causing integration failures with osbuild-composer. The next update of the images dependency in osbuild-composer will need work to adapt to these changes. This is simply a notice. It will not block this PR from being merged. |
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 28, 2025
This commit moves the `imageType.kernelOptions` option into
`distro.ImageConfig`. The rational is that when we move to
YAML we will need to be able to override the kernel options
based on various conditions.
Here is an example from mkMinimalRawImgType():
```go
if common.VersionGreaterThanOrEqual(d.osVersion, "43") {
it.kernelOptions = []string{"rw"}
}
```
The conditions will be implemented on the imageConfig but
having conditions when defining image types would be a
bit stange. The easiest fix is to move kernelOptions into
ImageConfig. Fwiw, I think conceptually it also makes
sense there so this is probably a worthwhile chage on
its own but it will make the YAML work in
osbuild#1462
easier.
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 28, 2025
This commit moves the `imageType.kernelOptions` option into
`distro.ImageConfig`. The rational is that when we move to
YAML we will need to be able to override the kernel options
based on various conditions.
Here is an example from mkMinimalRawImgType():
```go
if common.VersionGreaterThanOrEqual(d.osVersion, "43") {
it.kernelOptions = []string{"rw"}
}
```
The conditions will be implemented on the imageConfig but
having conditions when defining image types would be a
bit stange. The easiest fix is to move kernelOptions into
ImageConfig. Fwiw, I think conceptually it also makes
sense there so this is probably a worthwhile chage on
its own but it will make the YAML work in
osbuild#1462
easier.
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 28, 2025
This commit moves the `imageType.kernelOptions` option into
`distro.ImageConfig`. The rational is that when we move to
YAML we will need to be able to override the kernel options
based on various conditions.
Here is an example from mkMinimalRawImgType():
```go
if common.VersionGreaterThanOrEqual(d.osVersion, "43") {
it.kernelOptions = []string{"rw"}
}
```
The conditions will be implemented on the imageConfig but
having conditions when defining image types would be a
bit stange. The easiest fix is to move kernelOptions into
ImageConfig. Fwiw, I think conceptually it also makes
sense there so this is probably a worthwhile chage on
its own but it will make the YAML work in
osbuild#1462
easier.
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 29, 2025
When we move ImageConfig into YAML we will need support for `SshdConfigConfig` as it is used in ImageConfig. This commit adds this via the `UnmarshalYAMLviaJSON()` helper. Split out from osbuild#1462
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 29, 2025
When we move ImageConfig into YAML we will need support for `ModprobeStageOptions` as it is used in ImageConfig. This commit adds this via the `UnmarshalYAMLviaJSON()` helper. Split out from osbuild#1462
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 29, 2025
This commit moves the `imageType.kernelOptions` option into
`distro.ImageConfig`. The rational is that when we move to
YAML we will need to be able to override the kernel options
based on various conditions.
Here is an example from mkMinimalRawImgType():
```go
if common.VersionGreaterThanOrEqual(d.osVersion, "43") {
it.kernelOptions = []string{"rw"}
}
```
The conditions will be implemented on the imageConfig but
having conditions when defining image types would be a
bit stange. The easiest fix is to move kernelOptions into
ImageConfig. Fwiw, I think conceptually it also makes
sense there so this is probably a worthwhile chage on
its own but it will make the YAML work in
osbuild#1462
easier.
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 29, 2025
This commit moves the `imageType.kernelOptions` option into
`distro.ImageConfig`. The rational is that when we move to
YAML we will need to be able to override the kernel options
based on various conditions.
Here is an example from mkMinimalRawImgType():
```go
if common.VersionGreaterThanOrEqual(d.osVersion, "43") {
it.kernelOptions = []string{"rw"}
}
```
The conditions will be implemented on the imageConfig but
having conditions when defining image types would be a
bit stange. The easiest fix is to move kernelOptions into
ImageConfig. Fwiw, I think conceptually it also makes
sense there so this is probably a worthwhile chage on
its own but it will make the YAML work in
#1462
easier.
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 29, 2025
When we move ImageConfig into YAML we will need support for `SshdConfigConfig` as it is used in ImageConfig. This commit adds this via the `UnmarshalYAMLviaJSON()` helper. Split out from osbuild#1462
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 29, 2025
When we move ImageConfig into YAML we will need support for `ModprobeStageOptions` as it is used in ImageConfig. This commit adds this via the `UnmarshalYAMLviaJSON()` helper. Split out from osbuild#1462
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 30, 2025
When we move ImageConfig into YAML we will need support for `SshdConfigConfig` as it is used in ImageConfig. This commit adds this via the `UnmarshalYAMLviaJSON()` helper. Split out from #1462
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 30, 2025
When we move ImageConfig into YAML we will need support for `ModprobeStageOptions` as it is used in ImageConfig. This commit adds this via the `UnmarshalYAMLviaJSON()` helper. Split out from #1462
This was referenced May 5, 2025
mvo5
commented
May 7, 2025
| Exports []string | ||
| RequiredPartitionSizes map[string]uint64 `yaml:"required_partition_sizes"` | ||
|
|
||
| Platforms map[string]ImagePlatform |
Contributor
Author
There was a problem hiding this comment.
Fww, this is wrong, platforms must be a list instead of a map[arch]ImagePlatform as it is defined here. We could have mutliple aarch64 images for example with different platform config/boot files etc
This was referenced May 7, 2025
Contributor
Author
|
Closing in favor of #1508 |
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 preview for moving ImageConfig into YAML - this code moves fedora and rhel10 to get a feel for what issue there are.
Some of the challenges we need to resolve:
ResourceDisk.Format,x11-keyboardand singular/plural is often a problem.But overall it is pretty straightforward.
JIRA: HMS-5284