There are 3 different ways for subscriptions to be setup, test the
pipeline to make sure it includes the correct commands, and check the
package set chain to make sure it includes the packages needed to
support the selected subscription mode.
When rhc is selected it will install the required packages, register
using rhc and always enable insights.
When rhc is not selected it will use subscription manager for
registration, and optionally enable insights. Also installing required
packages.
The rhui-azure-rhel8-sap-ha package is currently missing
the /etc/pki/rpm-gpg/RPM-GPG-KEY-microsoft-azure-release key.
This makes the image type unbuildable, which causes some of our tests
to fail.
Overlay the generic RHUI config, so the missing key isn't imported.
See CLOUDX-336 for more information.
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
This allows verification of repository metadata signatures.
The gpgkeys field is a list of key urls, or the gpg key itself, starting
with '-----BEGIN PGP PUBLIC KEY BLOCK-----'. These will be written to a
temporary file, and that file:// url will be passed to dnf.
DNF supports more than one GPG key. It is possible that one may be used for
signing packages, and another to sign the repository metadata. This
renamed GPGKey to GPGKeys internally. It does not change the on-disk
repository json format.
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.
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>
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>
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.
Rework the stage to not reimplement `FilesInput` as
`RPMStageInput`, but instead use the one common
`FilesInput` implementation and its supported
references.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as
`IgnitionStageInput`, but instead use the one common
`FilesInput` implementation and its supported
references.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as `QEMUStageInput`,
but instead use the one common `FilesInput` implementation and its
supported references.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework the stage to not reimplement `FilesInput` as
`FDOStageInput`, but instead use the one common
`FilesInput` implementation and its supported
references.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The `FilesInputs` was since the beginning an XZ-specific implementation
of the input, but it was implemented in the `files_input.go` in a false
hope that it could be used as a generic stage inputs by any stages. It
turned out that various stages require different implementation of
its input. Specifically there is usually a stage-specific key, which has
assigned a common input type. For XZ stage, the key is `file`.
Remove `FilesInputs` and instead implement `XzStageInputs` which is now
accepted by the XZ stage.
Fix all affected pipeline implementations that use XZ stage.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Rework files input implementation to support all reference types
supported by the input schema. Also implement helper functions to
generate supported reference types. In some cases, the reference
supports e.g. referencing multiple pipelines in the stage inputs, but
this is currently not implemented, since no pipeline in composer uses
it.
Rework the files input unit tests to cover the new functionality.
Adjust all code affected by the changes made to files input.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
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.
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.
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.
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.
- 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.
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.
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.
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.
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.
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>
The default value for the `os.FileMode` is zero, but the actual default
value used by the stage if no value is specified in the options is
`0777`. By using the pointer, we'll allow one to specify `0000`
permissions as a value which won't be omitted from the stage options.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Add support for `exist_ok` stage option added as part of
PR#1224 [1], which allows to gracefully handle existence of a directory
path specified to the stage.
This will be helpful when creating custom directories in the image via
customizations, because one can't know in advance whether the directory
path won't be created by a package installed in the image.
Not bumping the requires on osbuild, because this new option is not yet
used by any image definition or customization.
[1] https://github.com/osbuild/osbuild/pull/1224
Signed-off-by: Tomáš Hozza <thozza@redhat.com>