Commit graph

966 commits

Author SHA1 Message Date
Achilleas Koutsou
2f96cc7051 manifest: fix dracut modules and drivers for Anaconda installers
When the image definitions were updated to the new framework, I failed
to update the dracut modules for Anaconda installers to match the
existing ones.

The changes in the manifest are at commit
c4af0a1886.
The nvdimm module and the additional drivers were removed.

The nvdimm module in particular is required for http boot but should
only be specified for RHEL 9.  In RHEL 8 it is part of the default set
of modules.

See 02bb7a0b4f and
dc95382ba3 for the original commits that
introduced these changes.
2023-01-31 11:03:26 +01:00
Irene Diez
3b62e15d01 internal/distro/rhel8/edge: add sos package for rhel8.6+ and CS8
Similarly to the change made for rhel9, adding the sos package
gives users a built-in way to gather system logs and debug info.

Signed-off-by: Irene Diez <idiez@redhat.com>
2023-01-30 19:26:44 +01:00
Irene Diez
18aee4e465 internal/distro/rhel9/edge: add sos package
Adds the sos package to the edge commit package set so that
users have built-in way to gather system logs and debug info.

Signed-off-by: Irene Diez <idiez@redhat.com>
2023-01-30 19:26:44 +01:00
Achilleas Koutsou
2bdf6c724f distro/rhel8: update distro unit tests 2023-01-30 17:40:18 +01:00
Achilleas Koutsou
2723554b2a distro/rhel8: add Azure aarch64 platform and include image types
The Azure image types require hyperv-daemons which isn't available on
RHEL 8 prior to 8.6.
2023-01-30 17:40:18 +01:00
Achilleas Koutsou
c3d5fd516f distro/rhel8: add partition table for aarch64 azure-rhui
Copy of the partition table for the same image type in RHEL 9.
2023-01-30 17:40:18 +01:00
Achilleas Koutsou
f35d37188b distro/rhel8: clarify partition table error message
The previous error didn't make it clear where the issue was coming from.
Now it explains that the problem is that a partition table for a given
architecture isn't specified on the image type.
2023-01-30 17:40:18 +01:00
Achilleas Koutsou
e56445593c distro/rhel8: remove arch-dependent packages from Azure common 2023-01-30 17:40:18 +01:00
Simon de Vlieger
a8b6fd45ec iot-installer: enable anaconda modules
As noted in #3141 I've enabled the extra modules for Anaconda for the
iot-installer image type.
2023-01-27 10:46:27 +01:00
Achilleas Koutsou
450c44aaff manifest: include yumconfig options in OS customizations
YUMConfig is supported in ImageConfig for RHEL 7.  We now copy the
options over to OSCustomizations and create the stage when necessary.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
d2114d0f9e manifest: support force-relabel for SELinux in image config
The RHEL 7 images need to enable the force_autorelabel option for the
SELinux stage in osbuild.  This option should almost never be used but
it was added specifically for RHEL 7.  With the rewrite to the new
definitions and the sharing of pipeline code between all distros, we
need to add support to all stages of the pipeline generation to be able
to enable it.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
822571e28e manifest: support specifying force_size for VPC
The RHEL 7 vpc subformat in qemu does not support force_size so we need
to be able to disable it.  The parameter in all parts is defined as a
pointer because the default value is 'true'.  Not specifying it will
keep the option in the osbuild stage as 'nil', falling back to 'true' in
osbuild.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
b39d802155 manifest: add support for selecting grub2.legacy
Older OS versions (RHEL 7) with older versions of grub2 don't support
BLS entries.  Setting NoBLS to true configures the bootloader with
traditional menu entries through the grub2.legacy osbuild stage.  This
requires specifying extra information for the OS to the pipeline:
version, product, and nick.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
83fc8218d6 manifest: make the partition tool for raw images configurable
Add the partition tool as an option on the Raw pipeline.  Set it to the
old value (sfdisk) by default.

Expose the option up through the liveImage image kind so that the
distribution can set it if needed.
For RHEL 7, set it to sgdisk.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
1cc53f00f4 distro/rhel7: delete unused functions, types, and constants 2023-01-25 20:37:12 +01:00
Achilleas Koutsou
05094ea5c8 distro/rhel7: update image types to new definitions
- Replace Manifest() and PackageSets() imageType methods with (adapted)
  copies from RHEL 8.
- Replace pipeline functions with liveImage image function.
- Specify xz compression for Azure RHUI.
- Add similar package name overrides as we did in RHEL 8.  For RHEL 7,
  we need to modify the capitalisation of python3-pyyaml.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
79a0d36bf4 distro/rhel7: move qcow2 image type definition to top of file
Moved the qcow2 image type definition to the top of the file for
consistency with the other image type files.
Separated the default image config struct from the base image type
definition to make it easier to read.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
34a38008d9 distro/rhel7: move azure image type definition to top of file
Moved the Azure image type definition to the top of the file for
consistency with the other image type files.
Separated the default image config struct from the base image type
definition to make it easier to read.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
318fdf5ffd distro/rhel7: add osCustomizations() and liveImage()
Copied osCustomizations() and liveImage() functions from RHEL 8 and remove
unneeded customizations and options.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
b5795d18b2 distro/rhel7: update imageType implementation
Add environment, compression, and image fields and define the imageFunc
function type.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
c12f2c61e2 distro/rhel7: and add platforms to image types 2023-01-25 20:37:12 +01:00
Achilleas Koutsou
6fdf917271 distro/rhel7: update distribution implementation
Update the implementation of the distro.Distro interface to match the
one in RHEL 8, 9, and Fedora.  The main change is that the runner is a
runner.Runner and not a string.

The runner name is now rhel79 (changed from rhel7).  This is
functionally equivalent based on osbuild's runner version fallback
logic.
2023-01-25 20:37:12 +01:00
Achilleas Koutsou
a93ae83c5c distro/rhel7: add packageset chains to qcow2
The qcow2 image type for RHEL 7 doesn't have packageset chains defined.
This means that the blueprint packages are never merged into the os
pipeline.

This is unnecessary right now because of the upcoming rewrite, but it
will minimise the differences that will show up in the manifest.

The qcow2-customize manifest has an added block of options for the
grub2.legacy stage because now the dracut-config-rescue package is being
installed in the image.
2023-01-25 20:37:12 +01:00
Sarita Mahajan
0d16e2310e image: add new image type "minimal-raw" for fedora
Signed-off-by: Sarita Mahajan <sarmahaj@redhat.com>
2023-01-25 19:19:45 +01:00
Tomáš Hozza
8624ff65f8 distro/rhel8: ensure the Azure SAP RHUI image uses appropriate config
Azure RHUI and BYOS images use the respective BYOS / RHUI default image
configuration, inheriting the defaults from a common configuration. The
Azure SAP RHUI image was incorrectly using the common configuration and
was not inheriting any settings from the RHUI configuration. As a
result, the Azure SAP RHUI image was missing the following
configuration:
 - Required GPG keys were not imported from the file system as part of
   image build.
 - No RHSM configuration was applied at all.

Add "Rhui" to the image type definition, to make it explicit that it is
RHUI-based. Make sure that the image type default configuration is based
on the common RHUI configuration. Regenerate affected image manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-01-24 19:57:14 +01:00
Achilleas Koutsou
e9d1e8a222 distro: fix pipeline names in Fedora and RHEL 9 image types
Some pipeline lists weren't updated when the image types were rewritten.
Discovered now from the new test and fixed.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
f102ae6b04 distro: add new test for pipeline names on image types
Every image type defines a list of build pipeline names and a list of
payload pipeline names.  These should match the names of the pipelines
that will exist in the manifest when it's generated.  They should match
exactly, otherwise issues can occur when reading the metadata from an
osbuild result.  The cloud API needs to know the names of the pipelines
and specifically the name of the build pipeline and the payload pipeline
in order to differentiated between build and payload packages in the
metadata.

This new test generates every manifest, parses it into a minimal struct,
and compares the pipeline names with the ones reported statically on the
image type definition.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
c617b3b98c distro/rhel8: make rhel-8 point to rhel-87
Make RHEL 8 without a minor version point to RHEL 8.7, the current GA
version.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
e4bb7f4f16 distro: remove packageSetChains from image type in RHEL 8 & 9
Image types no longer report their chains.  Instead, pipelines report
their packages and chains and blueprint packages are added to the
workload.

The distro.ImageType interface retains the PackageSetsChains() methods
for RHEL 7 until that is rewritten as well.

The osbuild-dnf-json-test doesn't use the PackageSetsChains() method
anymore.  Instead, since it only test the centos-8 qcow2 image, it
hardcodes the expected package set names.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
b1d6792b26 distro/rhel9: make rhel-9 point to rhel-91
Make RHEL 9 without a minor version point to RHEL 9.1, the current GA
version.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
ca24ff4d47 distro/rhel8: remove old Manifest and PackageSets functions
Rename new implementations in their place.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
c2984d9832 distro/rhel8: resolve package names for RHEL 8
The python3-toml package is called python3-pytoml in RHEL 8, so the name
must be replaced before depsolving.  The package is defined in
manifest/os.go which does not have access to the distribution name or
version.
This solution is a temporary workaround.  The future solution should
depend on distributions resolving package names based on required
features.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
3b1a51fd0d distro/rhel8: update edge commit and container to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
254623459f distro/rhel8: update edge installer to new definitions
Using the same pipeline functions as Fedora and RHEL 9 and copied the
image function from RHEL 9.  The most notable change is the replacment
of the deprecated bootiso.mono stage with the more granular stages, just
like with the image installer.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
62dcd99a9a distro/rhel8: update image installer to new definitions
Using the same pipeline functions as Fedora and RHEL 9 and copied the
image function from RHEL 9.  The most notable change is the replacement
of the deprecated bootiso.mono stage with the more granular stages.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
b888a170a2 distro/rhel8: update edge simplified installer to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
e2b1baf47c distro/rhel8: update edge raw image to new definitions
Using the same pipeline code as RHEL 9 and Fedora introduces the
following changes to the image:
- ostree.config: moved and uses the stage mount instead of the old
  stage-specific options.
- lock root password like we do in Fedora and RHEL 9.
- set keymap to us and locale to C.UTF-8 like in Fedora and RHEL 9.
- grub2 contains kernel options and unified set to true.  This stage
  also now uses the ostree mount options to set up the deployment when
  running.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
8fa3f6cc5c distro/rhel8: update tar image to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
97ed09cd69 distro/rhel8: update vmdk images to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
d3369d1c76 distro/rhel8: update gce images to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
8443464096 distro/rhel8: gce-specific platform override
The gceX86 platform embeds the X86 platform and overrides the
GetPackages() method to exclude the grub2-pc package.

The gce image is built as UEFI only, does not include 'grub2-pc', but we
enable BIOS in the platform config for all the other side-effects: grub
config options and grub2.inst stage.

See the image type documentation for more information:
d12d9674d6/image-types/rhel8/google-gce.md (rhel-8-byosrhui--rhel-9-byos-image-differences-compared-to-googles-image)
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
91e2a62654 distro/rhel8: make gce rhsm config conditional
We don't have distro-based conditions in the pipeline generator
functions anymore.  All config conditions must be defined at the distro
level.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
9af2b2accf distro/rhel8: update azure images to new definitions
Move image type definitions to the top of the file and convert them to
functions.
Replace the pipeline function with the liveImage image function.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
e1ebb55d0a distro/rhel8: update ami and ec2 images to new definitions 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
0b263d5478 distro/rhel8: update qcow2 and openstack to new definitions
Copy osCustomizations() and liveImage() functions from RHEL 9.
Delete unused functions.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
f0b7528ab6 distro/rhel8: add support for imageFunc on image types
Add image, environment, and compression to the imageType struct.

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.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
a0cf527716 distro/rhel8: image type separation: installer and tar 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
b00aaa06ea distro/rhel8: image type separation: gce 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
801affc26a distro/rhel8: image type separation: vmdk 2023-01-18 11:50:35 +01:00
Achilleas Koutsou
fd93f47d3f distro/rhel8: image type separation: qcow2 and openstack
Continuing image type splitting.

Constructor for qcow2 type requires the distribution object to determine
whether to add RHSM to the image config (RHEL only).
2023-01-18 11:50:35 +01:00