Repository navigation
Conversation
This commit moves the partition tables for RHEL-10 (and by implication Centos-10) into YAML.
This commit removes the hardcoded `size`, `fstab_options` and moves them to a generic reflect based override implementation.
This commit adds support for more partition table override options: `distro_name` and `version_less_than` with the same semantics as for package sets. This will be needed for rhel8.
The rhel8 partition table is slightly more complicated than rhel7
and rhel10. It requires changing the size of the "/boot" partition
depending on the version but only aarch64 systems have a /boot
partition so the existing selection based on partition index to
override does not work. Hence a new `partition_mount_point` selector
is added that can override:
```yaml
partition_table_override:
condition:
version_less_than:
"8.9":
- partition_mount_point: "/boot"
partition_mode: ignore-missing
size: 222_222_222
```
It also adds the ability to control how the selection works, i.e
if not finding the selected partition is an error (the default)
or should be ignored (which we need for rhel8).
Helper as we need to remove the /boot/efi on a bunch of images
The rhel8 partition tables only defines /boot/efi for x86_64 with rhel-8.9 but it always had it for aarch64. So to make things compatible we need yet another ad-hoc selector
For centos/fedora there are no minor versions so centos-9 is always higher than anything 9.x. as "9" translates to "9.0" in semVer we need to hack around this by adding .999
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 1, 2025
This commit exposes the base partition table for `ImageType`s. The rational is that we want to expose those via: ```console $ image-bulder describe-image qcow2 ``` so that the yaml of the partition table is visible. This helps developing our image definitions wihtout having to look at the code and as added benefit it gives a "flattened" version of the partition YAML. As part of the work in fedora the `basePartitionTablesFunc` was removed as it is now fully based on YAML. Once all partition tables in RHEL are also in YAML [0] we can do a similar simplification there. [0] osbuild#1372
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 1, 2025
This commit exposes the base partition table for `ImageType`s. The rational is that we want to expose those via: ```console $ image-bulder describe-image qcow2 ``` so that the yaml of the partition table is visible. This helps developing our image definitions wihtout having to look at the code and as added benefit it gives a "flattened" version of the partition YAML. As part of the work in fedora the `basePartitionTablesFunc` was removed as it is now fully based on YAML. Once all partition tables in RHEL are also in YAML [0] we can do a similar simplification there. [0] osbuild#1372
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 1, 2025
This commit exposes the base partition table for `ImageType`s. The rational is that we want to expose those via: ```console $ image-bulder describe-image qcow2 ``` so that the yaml of the partition table is visible. This helps developing our image definitions wihtout having to look at the code and as added benefit it gives a "flattened" version of the partition YAML. As part of the work in fedora the `basePartitionTablesFunc` was removed as it is now fully based on YAML. Once all partition tables in RHEL are also in YAML [0] we can do a similar simplification there. [0] osbuild#1372
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 2, 2025
This commit exposes the base partition table for `ImageType`s. The rational is that we want to expose those via: ```console $ image-bulder describe-image qcow2 ``` so that the yaml of the partition table is visible. This helps developing our image definitions wihtout having to look at the code and as added benefit it gives a "flattened" version of the partition YAML. As part of the work in fedora the `basePartitionTablesFunc` was removed as it is now fully based on YAML. Once all partition tables in RHEL are also in YAML [0] we can do a similar simplification there. [0] osbuild#1372
mvo5
force-pushed
the
yaml-unmarshal-via-json-6
branch
from
April 2, 2025 15:47
6af7a83 to
5e9e9c1
Compare
github-merge-queue Bot
pushed a commit
that referenced
this pull request
Apr 3, 2025
This commit exposes the base partition table for `ImageType`s. The rational is that we want to expose those via: ```console $ image-bulder describe-image qcow2 ``` so that the yaml of the partition table is visible. This helps developing our image definitions wihtout having to look at the code and as added benefit it gives a "flattened" version of the partition YAML. As part of the work in fedora the `basePartitionTablesFunc` was removed as it is now fully based on YAML. Once all partition tables in RHEL are also in YAML [0] we can do a similar simplification there. [0] #1372
mvo5
added a commit
to mvo5/images
that referenced
this pull request
Apr 3, 2025
This is an alternative implementation of a partition table override implementation that is *very* simple (thanks Achilleas). With the right YAML anchor/alias support this will allow overrides for our current cases. We can look into more complicated schemes (c.f. osbuild#1372) if we ever need them.
Contributor
Author
|
Closing for now in favor of #1388 |
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.
An updated WIP branch that uses the new
partition_table_overrideidea which seems much easier to read then the previous attempt that usedpartition_table_conditional(c.f. #1339). Still very messy but another (small) step into the right direction I think. Opening mostly get give ppl the chance to follow the current evolution of this work.