Commit graph

1212 commits

Author SHA1 Message Date
Ondřej Budai
eaa4e9b5fa repositories: fix GPG keys
Oh my, we had the Fedora 37 key even in Fedora 38 and 39 repositories. This
commit fixes that.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-06-06 13:04:10 +02:00
Simon de Vlieger
5e6c0642cd fedora: f36 went EOL
Removes all references to Fedora 36 since it went EOL.

See: https://docs.fedoraproject.org/en-US/releases/eol/
2023-06-05 18:14:34 +02:00
Achilleas Koutsou
620813123a gen-manifests: resolve containers after Manifest()
Demonstrate the new workflow for resolving containers.

1. First call Manifest().
2. Get container SourceSpecs from manifest struct.
3. Resolve them.
4. Serialize() with resolved container specs.

The changes in the test manifests are just the information about the
container sources (was a slice but is now a map) and the actual manifest
object isn't affected.

The TestDistro_Manifest test in distro_test_common is adapted
accordingly as well.
2023-05-31 16:40:07 +02:00
Jakub Rusz
686b01d0ba tests/vmware: fix cleanup trap and failure check
The cleanup trap was removed and therefore it never ran. Also changing
the check if the test is successful as before it was passing despite
failures being present.
2023-05-30 16:45:30 +02:00
Jakub Rusz
86d11d9b67 tests/vsphere: report only ipv4 address 2023-05-30 16:45:30 +02:00
Jakub Rusz
a5547a2fa0 vmware: fix typo in cleanup call 2023-05-30 16:45:30 +02:00
Sanne Raymaekers
6335fb38cc test/cases/vmware.sh: add integration test for ova types 2023-05-25 10:14:32 +02:00
Sanne Raymaekers
ce52f658d1 test/data/manifests: regenerate manifests 2023-05-25 10:14:32 +02:00
Tomáš Hozza
f335096f66 distro/rhel9: revert hybrid boot on RHEL EC2 (RHUI) images before 9.3
For backward compatibility, revert changes related to hybrid boot mode
for RHEL (RHUI) EC2 images before 9.3 release.

This change does not affect CentOS Stream 9 AMI images nor the RHEL AMI
build by the service or on-premise.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-23 13:04:31 +02:00
Tomáš Hozza
3eb5779e8b distro/rhel8: revert hybrid boot on RHEL EC2 (RHUI) images before 8.9
For backward compatibility, revert changes related to hybrid boot mode
for RHEL (RHUI) EC2 images before 8.9 release.

This change does not affect CentOS Stream 8 AMI images nor the RHEL AMI
build by the service or on-premise.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-23 13:04:31 +02:00
Paul Whalen
cd5cc08ce6 iot: add fedora-release-iot to iot-installer
Signed-off-by: Paul Whalen <pwhalen@fedoraproject.org>
2023-05-22 17:15:56 +02:00
Tomáš Hozza
2a50092920 Test: add Fedora iot-raw-image test manifests with customizations
Add Fedora iot-raw-image test manifests with supported customizations,
specifically:
 - custom users and groups
 - custom enabled services
 - custom files and directories

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
bf377d81c1 Test/ostree-raw-image: test dirs and files customizations
Extend the `ostree-raw-image.sh` to use the directories and files
customizations for the raw image and test their effect using the ansible
playbook.

Custom files and directories are currently tested only on Fedora,
because they are allowed by policy only there.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
956e3b9b69 Test: reformat parts of ostree-simplified-installer.sh
Reformat calls of `ansible-playbook` by splitting them into multiple
lines. This makes it easier to read.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Tomáš Hozza
34c1594216 Test: reformat parts of ostree-raw-image.sh
Break the execution of `ansible-playbook` into multiple lines to make it
easier to read.

Add a comment on top of the second `ansible-playbook` execution if
Ignitions is availble, explaining what differs. Otherwise this is hard
to spot.

There are 3 places in the script, where there are always 2 executions of
the `ansible-playbook`. First the user from the BP is used. On the
second run, the user created by Ignition is used. This was not the case
for the last 2 executions of `ansible-playbook` at the end of the
script. Adjust the order for consistency with the rest of the script.

The changes should have no effect on the test case.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-22 16:30:14 +02:00
Alexander Todorov
603c44061c Workaround race condition in test
by probbing if the repository is already available via HTTP
2023-05-22 12:59:09 +02:00
Tomáš Hozza
39f42699d2 test/aws.sh: verify AMI boot mode
Extend the Weldr API AWS test to verify the boot mode of the uploaded
AMI.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
4afc5f58d0 test/api.sh/aws: verify AMI boot mode
Extend the Cloud API AWS test case to verify the uploaded AMI boot mode.
For informational purposes, also log the boot mode of the instance
created using the AMI by the test case.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
1d01833153 distro/rhel8: use hybrid boot mode for AMI / EC2 image types
On RHEL-8, the x86_64 AMI / EC2 images used a BIOS-only partition table
layout, because the base partition table unification happened in the
past only on RHEL-9 and Fedora (inherited from RHEL-9).

To make things consistent and uniform across RHEL-8 and RHEL-9, I copied
the base partition table used by RHEL-9 AMI / EC2 images to RHEL-8. This
has a side-effect for aarch64 AMI / EC2, where the `/boot` partition
size changed from 512 MiB to 500 MiB, together with the partition GUID
to "Extended Boot Loader Partition GUID".

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-05-19 13:24:39 +02:00
Tomáš Hozza
2c9b46876e distro/rhel9: use hybrid boot mode for AMI / EC2 image types
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
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