The org.osbuild.chrony stage was extended to allow additional directives
alongside time servers [1]. The old Timeservers string slice was kept
for backwards compatibility. Removing support for it in
osbuild-composer makes working with the stage's options simpler. Using
the new struct slice Servers field and only specifying a Hostname for
each element is equivalent to the old behaviour, so no functionality is
lost.
This simplifies the chrony stage since no validation is required
anymore.
It also simplifies the propagation of configuration options through the
pipeline generation code which doesn't need to check for both types of
stage options.
[1] https://github.com/osbuild/osbuild/pull/692
Updated all edge image types except the simplified installer to the new
image definitions.
Added the image functions, based on the Fedora counterparts, and removed
the pipeline functions.
Removed the build package from the image definition.
Removed firmware packages from platform: not available in repos.
Add the image function and remove the pipeline function.
Remove the build package set: build packages are added to the pipeline
on-demand based on platform, environment, etc.
Copied the liveImage ImageKind generator from Fedora.
Add image and environment to the imageType struct.
Also define two new methods:
PackageSetsNew() and ManifestNew()
These get called by the corresponding base methods PackageSets() and
Manifest() when imageType.image is defined. They will serve to
transition images to the new framework while also supporting the old
until all image types are updated.
Split image type definitions into separate files by logical groups
(mostly by footprint and cloud platform) for easier navigation.
The image types are now all defined as package globals, like in Fedora.
Image specific package sets are defined in the file for the image type
grouping instead of the package_sets file.
A notable change is in the AWS/AMI types, which have different configs
based on OS version. To get around this, we create each image type with
a function parameterised by the OS version string. This is a bit messy
and inconsistent with other image types, but it's a temporary workaround
which will be cleaned up as the definitions get closer to the new
framework used in the fedora package.
Move the imageType type and its methods to a separate file to make
them easier to manage.
This might get rewritten to have a default implementation for a lot of
the common functions that have simple, straightforward functionality
(e.g., return the value of an internal field).
Move the architecture type and its methods to a separate file to make
them easier to manage.
This might get merged with the other implementations to make a default
one because they're all (basically) the same.
Update the implementation of the distro.Distro interface to match the
one in Fedora. The main change is that the runner is a runner.Runner
and not a string.
The distroMap is replaced by two functions that initialise a
distribution struct from a template (one for CentOS and one for RHEL).
Required for running osbuild modules.
In Fedora, so far, python3 was always pulled by some other build-root
dependency. We should add it explicitly since it's required by all our
runners.
For RHEL and CentOS, the requirement is platform-python.
For RHEL 8 and CentOS 8, we also need to explicitly add python36 and for
RHEL 9 and CentOS 9 python3 because it's used to run the stages in
osbuild [1].
[1] ea8261cad6/runners/org.osbuild.rhel82 (L61)
Previously the blueprint change was only present until a reboot. The
change and its version was recorded, but the actual blueprint was not
saved.
This adds saving the blueprint when it is changed, and loading the old
blueprint versions when they are present in the store.
No version change is needed, if the blueprint is not present it is
loaded as an empty blueprint which was already being detected by
checking the length of the Name.
This will allow specific blueprint changes to be recalled after a
restart of the server.
This also includes tests for the new behavior.
- build simplified installer iso without mentioning FDO section.
- change done for rhel8 and rhel9
- add test case for this use case in test/case/ostree-simplified-installer.shovisioning
- fixed review comments
Signed-off-by: Sarita Mahajan <sarmahaj@redhat.com>
The `/etc/rhsm/ca/redhat-uep.pem` CA is not valid for consumer
certificates.
As a result resolving the ostree ref should use the system's CA cert
pool.
This adds the `fedora-image-installer` and
`fedora-image-installer-preview` images.
The image installer type installs anaconda-webui on Fedora >= 38 to use
the new UI. It also writes its setting to
`/usr/share/anaconda/interactive-defaults.ks` as the current
anaconda-webui has not yet been tested in kickstart mode.
To do so manifest.Anaconda was expanded to take a (subset) of options
for a KickstartStage which is will write into interactive-defaults.ks.
And to take a list of additional modules to enable, so we can set up
Anaconda with all default modules.
When the size of a logical volume is not aligned to the extent size of
the volume group, LVM2 will automatically align it by rounding up[1]:
Rounding up size to full physical extent 29.80 GiB
Rounding up size to full physical extent <3.82 GiB
Since we don't take that into account when we create a new volume or
set the size of an existing one, the size for the whole volume group
will be short by that amount and thus the creation of the last volume
will fail:
Volume group <uuid> has insufficient free space (975 extents): 977 required.
To fix this a new `AlignUp` method is added to the `MountpointCreator`
creator interface. It will align a given size to the requirements of
the implementing container, like e.g. `LVMVolumeGroup`. It is then
used by a new `alignEntityBranch` which takes a size and walks the
entity path, calling `AlignUp` for all entities that implement said
`MountpointCreator` interface; thus the resulting size should fullfil
the alignment requirement for all elements in the path.
NB: `PartitionTable` already had an `AlignUp` method.
Add a corresponding test.
[1]: 8686657664/lib/metadata/metadata.c (L1072)
Co-authored-by: Achilleas Koutsou <achilleas@koutsou.net>
Extract a `CreateLogicalVolume` method from `CreateMountpoint`
and implement the latter via the former. This makes it possible
to create a Logical Volume for an existing payload.
This can be shared between cloud providers so move it out of the EC2 SAP
config into its own file and drop the X86_64 from the name (there is
nothing arch specific in it, even if it is only ever used on X86).
Exclude unwanted packages from the EC2-SAP image. These packages have
been pulled into RHEL-9 image due to the fact that we moved away
from using `@core` package group by default and as a result we dropped
explicit package excludes. However the SAP image includes the
`@Server` package group, which pulls in these unwanted packages, thus
we need to explicitly exclude them in the SAP package set.
Related to COMPOSER-1829
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
`amdgpu` module is causing error to be printed in the system log on AWS
instances. After investigation, it turns out that it is not needed.
Disable it by default on all AWS images.
Related to COMPOSER-1807
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
`amdgpu` module is causing error to be printed in the system log on AWS
instances. After investigation, it turns out that it is not needed.
Disable it by default on all AWS images.
Related to COMPOSER-1807
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
F37 no longer ships sil-scheherazade-fonts, but
sil-scheherazade-new-fonts instead. Let's change this. The repos for
test manifests must have been updated in order to get the new package.
Co-authored-by: Ondřej Budai <ondrej@budai.cz>
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
Previously, this just happened silently and let to extremely odd errors. Let's
just print the error to simplify debugging the next time.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
8fdd158799 modified the Cloud API to resolve
ostree commits using a separate job. This change caused the API handler
to call PackageSets without any ostree options (because they are not resolved
yet).
Unfortunately, the new implementation of PackageSets initializes the manifest.
The initialization checks the options and if the type is iot-installer and
it doesn't have the fetch checksum for IoT, it just returns an error.
To work around this (we need an initialized manifest to create the chains),
this commit just gives the initialization method a dummy checksum. The ostree
options currently don't have any effect on the package sets, so this should
be fine.
In order to make this workaround at least slightly sane, a warning is printed,
there's a new test just for this behaviour and a long comment to remember to
delete these lines.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This can be shared between cloud providers so move it out of the EC2 SAP
config into its own file and drop the X86_64 from the name (there is
nothing arch specific in it, even if it is only ever used on X86).