Commit graph

1292 commits

Author SHA1 Message Date
Tomáš Hozza
e7fdfbaea1 distro/fedora: use hybrid boot mode for AMI image type
The image already used base partition table with necessary layout to
support hybrid boot mode, so the change was just a matter of modifying
the associated platform.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
2c686cc988 distro/rhel: make the GCE image UEFI-only
This was the intention since the beginning (based on images built by
Google. Clean up code and mark the platform associated with GCE image
types as UEFI-only.

The only missing part is the default partition table used by the GCE
image, which is shared with other image types and still contains the
BIOS boot partition. I added a TODO comment to preserve this
information, but kept things as they are for now to not have to
introduce a new set of GCE-specific base partition tables.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
dd26769abc distro/rhel: don't extend image pkg sets with boot packages
Do not extend the image base package set with list of packages needed
for booting the OS, returned by `bootPackageSet()` based on the specific
image type, architecture and its boot type. This duplicated
functionality that is already handled by the platform associated image
and all the necessary packages are provided by the platform's
`GetPackages()` method and added to the base package list.

This reflects changes which were done in Fedora when it was ported to
the "new" image definitions, but were not ported to RHEL.

RHEL-8 GCE image type note:
After a previous change, the image boot type is now determined by the
associated platform and as a result, the GCE image type is marked as
supporting hybrid boot type, although it was meant to be UEFI only. As a
result, the package list returned by `bootPackageSet()` and previously
appended would contain grub2 BIOS-related packages. This is still the
case after this change, because the platform's `GetPackages()` method
will return the same list of packages in this case. However, the
platform used by RHEL-8 GCE image type has its `GetPackages()`
overridden by a different implementation not containing grub2 BIOS
related packages. For some reason, this change is not present in RHEL-9.
As a result, the grub2 BIOS related packages disappeared from the RHEL-8
GCE image package set, while there was no change in RHEL-9.

Keep the GCE image as is for now and make it an UEFI-only in a follow
up.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
dd6f9fdbcf distro/rhel: remove bootType from imageType and architecture
Remove the bootType from imageType and architecture structures and
determine the image boot type based on its associated platform.

This reflects changes which were done in Fedora when it was ported to
the "new" image definitions, but were not ported to RHEL.

GCE image type note:
This change has a side-effect on the GCE image type. It was meant to be
UEFI only, but the previous mixture of bootType set in the imageType and
the platform used for it made it a weird combination of almost hybrid
boot type, but not completely. For now, the grub2 BIOS-related packages
are added to the image content as a result. Eventually, the platform
used for the image should be changed to not support BIOS and the image
should also not have BIOS partition at all.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Achilleas Koutsou
584ae47eca rhel8/azure: remove and disable firewalld from EAP
Remove firewalld from the base package set for Azure and add it to all
the image-specific package sets except EAP (and explicitly exclude it).
Remove firewalld from the base image config for Azure and add it to all
the image-specific configs.

Test manifests updated.
Manifest changes for non-EAP image types is only the enabled-services
reordering: firewalld is last because it is appended to the base config.

See COMPOSER-1859
2023-05-15 21:26:34 +02:00
Achilleas Koutsou
5337b746e4 test: update RHEL 8 EAP manifests
Azure RHUI snapshot was updated but manifests for Azure EAP weren't
updated, probably due to a merge race.
2023-05-15 21:26:34 +02:00
jabia99
7224c896b6 Pass JIRA_PAT env variable to container 2023-05-15 12:18:40 +03:00
Ondřej Budai
156c411836 ostree-simplified-installer.sh: fix waiting loop for fdouser
`ssh grep fdouser /etc/passwd` returns 1 if the user doesn't exist yet.
We run this script with set -euo pipefail, which cause the script to exit
immediately. Thus, the waiting loop isn't actually waiting for anything.

By adding `|| true`, we ensure that the loop is indeed waiting for the fdouser
to be available.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-05-12 11:02:49 +02:00
Sanne Raymaekers
c7d2eaa5f7 test: use non-deprecated gitlab CI variables
CI_BUILD_ID was replaced with CI_JOB_ID in gitlab 9+.
2023-05-12 11:02:49 +02:00
Mario Cattamo
54ce49a852 Test fedora minimal embedded container 2023-04-27 14:01:44 +02:00
Gianluca Zuccarelli
1c25d2792c tests/api: custom repository tests
- remove `custom-repos.sh` integratoin test
- add custom repositories check to `api` tests for supported
  images
- verify custom repositores are added to /etc/yum.repos.d
- verify gpg key is saved to /etc/pki/rpm-gpg (for inline keys)
2023-04-26 14:16:16 +01:00
Alexander Todorov
72d33c8651 Don't execute test on osbuild-composer < 81
New functionality introduced in
https://github.com/osbuild/osbuild-composer/pull/3228
2023-04-25 18:33:37 +02:00
Antonio Murdaca
01e7370c08 test/simplified-installer: fix yq installation on rhel8
Basically use the latest 3.2.1 version because of https://github.com/kislyuk/yq/issues/165

Signed-off-by: Antonio Murdaca <runcom@linux.com>
2023-04-24 14:14:15 +02:00
Gianluca Zuccarelli
e271d1d30d test/cases: add custom repos integration test
Add an integration test for the custom repos feature.
The file resolve feature is also tested as part of this
test.
2023-04-21 17:40:00 +02:00
Gianluca Zuccarelli
376199467c internal/distro: rhel9 repo customizations
Wire up the repository customizations for
rhel9 images.
2023-04-21 17:40:00 +02:00
Gianluca Zuccarelli
febe018733 internal/distro: rhel8 repo customizations
Wire up the repository customizations for
rhel8 images.
2023-04-21 17:40:00 +02:00
Gianluca Zuccarelli
71fd5dafdc internal/distro: rhel7 repo customizations
Wire up the repository customizations for
rhel7 images.
2023-04-21 17:40:00 +02:00
Gianluca Zuccarelli
08c10b51a0 internal/distro: fedora repo customizations
Wire up the repository customizations for
fedora images.
2023-04-21 17:40:00 +02:00
Alexander Todorov
2c23894e2a Conditionally skip container test when using older osbuild version
Introduced in
https://github.com/osbuild/osbuild-composer/pull/3336
2023-04-20 13:22:29 +02:00
Achilleas Koutsou
03b093acb0 test/container-embedding: add checks for container names
Add a local name for the fedora minimal image which includes the tag
`v1`.

Check the image info for the expected names:
1. For the fedora-minimal image, the name as it appears in the blueprint
   should be included in the names list.
2. For the manifest-list-test image, the full source reference should be
   included in the names list since no name was specified in the
   blueprint.
2023-04-19 20:07:40 +02:00
Achilleas Koutsou
140571bf48 test: add "name" to test manifests with container
Add name field to the manifest-list-test container in the test
request.  The value is the same as the source but with a `v1` tag
added.

In the manifests, the name field for the manifest-list-test is added to
the skopeo stage.  The `name` option of the fedora-minimal container in
the skopeo stage is also changed to reflect the full source reference
including the `latest` tag.
2023-04-19 20:07:40 +02:00
Achilleas Koutsou
8b1375bee0 test: regenerate manifests
The PR which added manifest lists and the format-request-map was changed
to include two containers for the `with-container` compose requests [1]
was rebased after the PR which added RHEL 8.9 and RHEL 9.3 was merged
[2].  The test manifests were not updated after the rebase, so they were
never created with the new request.

Updating them now.

[1] https://github.com/osbuild/osbuild-composer/pull/3336
[2] https://github.com/osbuild/osbuild-composer/pull/3350
2023-04-19 20:07:40 +02:00
Tomáš Hozza
c28f8077c1 Revert "distro/rhel8: don't install missing MSFT key into azure-sap-rhui"
This reverts commit 2b1facb44d.

The GPG key is now present in the RHUI client RPM, so there is no need
to not import it during the image build.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-19 15:04:42 +02:00
Tomáš Hozza
7a439ba59d Test/manifests: update Azure RHUI client repo snapshots
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-04-19 15:04:42 +02:00
Ondřej Budai
d8342862d5 customizations: create all groups unconditionally
We had this weird condition in code that prevented composer to create groups
with the same name as a user has. This unfortunately means that you are not
able to create a user with a primary group with a certain GID that has the
same name as the user. There's the gid field in the user customization,
but it requires that the group already exists.

In order to allow that, we need to remove the condition. From now on, it's
possible to create groups with the same name as a user has, which can be used
to create primary groups with a custom gid.

Note that the lorax compatibility behaviour was actually wrong. When lorax was
given a custom gid for a user, it didn't require the gid to exist. When it
didn't, the group was just created. Thus, we still don't have full backward
compatibility, but at least we now have support for this.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-04-19 11:50:49 +02:00
Simon de Vlieger
258f450021 iot: change the copy stages
Split this into two separate copystages so that we are not overriding
types.
2023-04-18 21:21:09 +02:00
Simon de Vlieger
b0fce3bfd1 platform: add the aarch64_iot platform
This platform copies more files into `/boot` which are necessary to be
able to boot IoT on some single board computers.

We also immediately set this on the `Aarch64_IoT` platform which needs
u-boot to be placed in the `/boot`.

This closes #3312.
2023-04-18 21:21:09 +02:00
Simon de Vlieger
8041563a36 manifest: image-tree -> ostree-deployment
Describes much better what the pipeline actually does.
2023-04-18 21:21:09 +02:00
Achilleas Koutsou
d936a8722d test/container-embedding: add container with manifest-list
Add a second container to the container-embedding test.  The digest
refers to a manifest-list to test the new feature.
2023-04-17 18:30:41 +02:00
Achilleas Koutsou
5a455b4406 test: add container source with manifest-list to manifests
Add a second container to the ostree-commit test manifests that refers
to a manifest list on the osbuild-composer registry on gitlab.
2023-04-17 18:30:41 +02:00
Achilleas Koutsou
d41a74475e osbuild/skopeo: helper function for files input
Add a helper function that collects all the manifest list digests from a
list of container specs and returns a FilesInput to be used with the
stage.

Use the function in the OS pipeline when adding containers.  The
manifests input to the stage constructor will be empty if there are no
manifest lists in the container specs.
2023-04-17 18:30:41 +02:00
Alexander Todorov
0330e9c3e1 More robust filtering for unrecognized distros
in order to preserve the value `rhel-93` as unrecognized when
running on 9.2 nightly CI
2023-04-14 10:26:09 +03:00
Alexander Todorov
5cd73ad946 Don't fail cross-distro.sh on nightly CI pipeline
when it discovers "missing distros" b/c this check isn't suitable for
downstream RHEL anyway. See comment in script for more details!

Related: COMPOSER-1943
2023-04-14 10:26:09 +03:00
yih
b90f51ff33 fix cs9 edge-simplified-installer test failure 2023-04-13 21:39:32 +02:00
Gianluca Zuccarelli
da2e80f99f test/cases: update old worker regression version
Update the version of the worker in the old worker/new composer
regression test. The test, up until now, was using a pinned version
of osbuild-worker (v51) which made use of dnf-json as a socket.
Testing a new composer version with such an outdated worker instance
is very unrealistic since the workers and composer are normally
updated in lock step, or in some cases the worker may be a version
behind.

This commit takes the current worker version and then downgrades it
to two versions ago (out of caution) to perform the tests. This
provides a more realistic scenario.
2023-04-12 15:48:03 +02:00
Simon de Vlieger
d94cea9150 fedora/disk: put a filesystem in EFI partition 2023-04-11 17:05:33 +02:00
Alexander Todorov
4890884a0e Parse modules info JSON according to weldr-client version 2023-04-06 09:32:10 +03:00
Alexander Todorov
5e6d47e9d0 Sign RPM package during testing and verify GPG signatures
Related: RHBZ#2177699
2023-04-03 17:36:42 +02:00
Alexander Todorov
58cb12eeaa Fix typo in custom repository field 2023-04-03 17:36:42 +02:00
Achilleas Koutsou
a0698ec359 test: generate RHEL 8 Azure EAP 7 test cases
Azure RHUI test cases updated with new repo image type tags.
2023-03-30 18:40:12 +02:00
Achilleas Koutsou
520e455088 test: add eap7 repo mirror to RHEL 8.6+ tests 2023-03-30 18:40:12 +02:00
Tomáš Hozza
58e3716b89 distro: add support for RHEL-8.9 and RHEL-9.3
Add a basic support for building RHEL-8.9 and RHEL-9.3 images with
composer.

Add 8.9 and 9.3 repositories to the multitude of places where we have
them.

Generate image test manifests for 8.9 and 9.3. No functional testing is
added for 8.9 or 9.3 at this moment.

This change unblocks the RHEL Gating (since unit tests are currently
failing on 8.9 and 9.3 as on unknown distribution).

Related to https://issues.redhat.com/browse/COMPOSER-1924

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-03-27 11:39:24 +02:00
Juan Abia
e3594f7234 Start using CIV config file
This way, all CIV parameters can be provided from a file stored in
gitlab secrets without the need to change the script.
2023-03-24 23:10:55 +01:00
Mario Cattamo
00de277d3a Add Butane test and Ignition logs 2023-03-24 17:07:36 +01:00
Tomáš Hozza
dc637d9a57 Manifest: always set kernel options in grub2 stage
It turned out that when we stopped setting the kernel options in grubenv
file, we also stopped setting them in /etc/default/grub under
`GRUB_CMDLINE_LINUX`. This file is used by grub2-mkconfig when
generating grub configuration.

10_linux script executed by grub2-mkconfig recently started to overwrite
the /etc/kernel/cmdline, if its timestamp is older than the timestamp of
/etc/default/grub [1]. As a result, all kernel options were wiped out from
/etc/kernel/cmdline.

Make sure that we always set the `KernelOptions` in the grub2 stage
options, even if the `WriteCmdLine` is set to `false`.

In addition, unify the way we concatenate kernel options set in the
grub2 stage options. Some pipeline implementations were previously using
space, other were using comma. Space is now used everywhere.

Regenerate all affected image manifests.

[1] https://src.fedoraproject.org/rpms/grub2/c/fc76aed5333f56dd05400521a35b944a5df52ebc

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-03-23 16:32:34 +01:00
Juan Abia
06d83d3c07 Change civ repo name 2023-03-21 11:56:57 +01:00
Jakub Rusz
ecd69ca25b tests/ostree: Change centos-8 BOOT_LOCATION to a working boot.iso
The latest boot.iso stopped working. Changing to an older version to
unblock CI. RHBZ#2180024 opened with this issue.
2023-03-20 17:59:20 -07:00
Simon de Vlieger
6e4893ad78 test/data: regenerate f39 manifests
Since F39 got enabled on `main` after the rebase they have different
sizes in this branch.
2023-03-20 11:04:14 +01:00
Simon de Vlieger
92cdb0f082 iot-raw-image: change partition table to DOS
For parity with ImageFactory built images there should be only a DOS
partition table in the raw images, with a non-standard ID set for the
boot partition for Raspberry Pi compatibility.

This only applies to the aarch64 images.

As noted in #3220.
2023-03-20 11:04:14 +01:00
Simon de Vlieger
39879a9f60 disk: add RequiredSizes to ImageOptions
These RequiredSizes are a map that is passed on to the partition table
logic which had hardcoded defaults. This makes it possible to define
either no RequiredSizes (`nil`) or empty RequiredSizes which means no
further constraint checks or partition resizes will be done.
2023-03-20 11:04:14 +01:00