Commit graph

21 commits

Author SHA1 Message Date
Jakub Rusz
d68abf3bb5 Generate RHEL-94 and RHEL-810 manifests + update 2023-11-06 13:39:01 +04:00
Achilleas Koutsou
d3ef361dd5 test: update repos and manifests
Summary of changes:
- ova image type uses ustar format
    - https://github.com/osbuild/images/pull/16
- New image type "minimal-raw"
    - https://github.com/osbuild/images/pull/29
- Fedora repositories and test manifests updated
    - https://github.com/osbuild/images/pull/57
- Distro aliases for major version without minor updated
    - https://github.com/osbuild/images/pull/59
2023-08-03 10:35:21 +02:00
Tomáš Hozza
b36c03f20c manifest/os: move the systemd services stage more to the end
Move the handling of the list of enabled and disabled systemd services
more to the end of the `os` pipeline, just before the SELinux stage.
This has no functional effect on produced images, but it will make it
nicer once the handling of the custom files and directories will be
added to the pipeline. Specifically it should be added right before the
services stage to allow enabling custom service files, but after all
other configurations that are applied to the image.

Regenerate all manifests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2023-02-22 12:17:36 +01:00
Achilleas Koutsou
7f1a0a76b1 test: update manifests for "rhel-8"
The format-request-map is updated to remove the override for the
customized qcow for rhel-8.
The rhel-8 manifests are now identical to the rhel-87 counterparts.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
ae01dc36d8 test: update RHEL 8.x and CS8 qcow2, oci, and openstack manifests
Changes:
- Removed unneeded RPMs from the build root.
- /usr/bin/tar removed from selinux stage: only added on-demand when tar
  is installed and used in a pipeline.
- s390x kernel options: debug added when specified in customizations.
  Previously, kernel customizations were ignored for s390x.
2023-01-18 11:50:35 +01:00
Achilleas Koutsou
4bd2c0cb1d test: regenerate manifests
Regenerate manifests with the added RHSM fact.
RHEL 9 manifests haven't changed because the stage is missing in the OS
pipeline (bug).
2022-11-30 10:04:16 +01:00
Achilleas Koutsou
2b6faea320 Remove image info from all test manifests
We never generated it for the newest distro versions and we don't test
it on any of the old ones.

It's better this way.
2022-07-27 10:01:16 +02:00
Achilleas Koutsou
8676d3342d manifests: generate rhel-8
Manifests for rhel-8 (without minor version).  These are identical to
rhel-86.
2022-07-01 23:52:13 +01:00
Achilleas Koutsou
723c34984c distro: remove rhel8
The rhel8 package represented RHEL 8.3, which is EOL.
The current rhel86 package will be renamed to rhel8 and be responsible
for building all RHEL 8 minor versions.
2022-07-01 23:52:13 +01:00
Achilleas Koutsou
0f0b2072d5 test: update test manifests
Update GPG keys in all RHEL 8.x test manifests.
2022-04-28 09:50:27 +02:00
Tomas Hozza
1273ef7b35 Regenerate all image test cases with the enhanced image-info
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-15 15:56:56 +01:00
Tomas Hozza
2aedd3da05 Test: regenerate all image test cases
Fix #1793

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-10-04 10:48:21 +02:00
Tomas Hozza
a2d4ba715f Extend information gathered by image-info tool
This is a preparation for defining EC2 images for RHEL-8.5.0. These
extensions to image-info tool represent modifications done to the
official EC2 images currently produced as RHEL release. It is important
to be able to analyse these aspects of images, before we define them in
osbuild-composer, to ensure that the resulting images will be consistent
with the current state.

- Read non-empty lines from /etc/hosts file and add them to the report.
- Read content of /etc/machine-id and add it to the report.
- Read uncommented key/values from /etc/systemd/logind.conf and add them
  to the report.
- Read all ifcfg-* files from /etc/sysconfig/network-scripts/ and add
  their values to the report.
- Read content of /etc/locale.conf and add it to the report.
- Read SELinux configuration from /etc/selinux/config and add it to the
  report.
- Inspect the filesystem tree for SELinux context mismatches and add
  them to the report.
- Read configuration files from /etc/modprobe.d/ and for now report only
  all blacklisted kernel modules.
- Read RHSM configuration from /etc/rhsm/rhsm.conf and add it to the
  report.
- Read cloud-init configuration from /etc/cloud/cloud.conf and add it to
  the report.
- Read all *.conf files from /etc/dracut.conf.d/ and add their content to
  the report.
- Read VC and X11 keyboard configuration and add it to the report.
- Read specific configuration directives from Chrony configuration and
  add them to the report. Specifically 'server', 'pool', 'peer' and
  'leapsectz'.
- Read drop-in configurations for *.service unit files from
  /etc/systemd/system/ and add them to the report.
- Read all configuration files from /etc/tmpfiles.d/ and add them to the
  report.
- Read all configuration files from /etc/sysctl.d/ and add them to the
  report.
- Read the Tuned active profile and profile mode and add them to the
  report.
- Read all configuration files from /etc/security/limits.d and add them
  to the report.
- Read sudoers configuration from /etc/sudoers and files in
  /etc/sudoers.d/ and add uncommented lines to the report. No
  sophisticated parsing is done, because the configuration format
  grammar is too complicated for the purpose of image-info.
- Read udev rules configuration files from /etc/udev/rules.d/ and add
  them to the report.
- Read DNF configuration and defined vars and add them to the report.
- Read profile ID and enabled features used by authselect.
- Enable SELinux, extended attributes and POSIX ACLs support when
  unpacking 'tar' image type to prevent potential mismatches

Regenerate all image test cases to reflect changes in the image-info
output. Modify the distro-arch-imagetype-map.json to cover all
combinations currently covered by existing image test cases.

Add doc strings to all read_* functions.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-06-09 18:23:00 +02:00
Christian Kellner
5937b9adca image-info: show format version for qcow2
Change the "image-format" from a string to a dict, with a "type":
$value entry, where $value contains the previous plain string
data.
Additionally, include the qcow2 format version, if the given
image is indeed a qcow2.
Adapt all manifest test accordingly (partly done by Ondřej)

Python 3 script used for conversion of manifest tests:
import os
import json

for name in os.listdir(os.getcwd()):
    if not name.endswith(".json"):
        continue
    print(name)
    with open(name, "r") as old:
        data = json.load(old)
        info = data.get("image-info", {})
        format = info.get("image-format")
        if not format:
            continue
        info["image-format"] = {
            "type": format
        }
        if format != "qcow2":
            continue
        info["image-format"]["compat"] = "1.1"
        with open(name + ".new", "w") as new:
            json.dump(data, new, indent=2)
            new.write("\n")
            new.flush()
    os.rename(name+".new", name)

test: use the new image-info format in all test manifests

The previous commit converted only qcow2 and openstack manifests but this change
is actually needed for all manifests produced by the qemu assembler.

Co-Developed-by: Ondřej Budai <ondrej@budai.cz>
2021-04-10 10:06:11 +02:00
Tom Gundersen
4805eeedf8 test/data/manifests: drop .rpmmd.checksums
These are no longer used.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2021-03-10 11:52:05 +00:00
Tom Gundersen
167fdc44bc test/data/manifests: avoid duplicate booting
We have integration tests that boot most of the image types, let
the image tests focus on the actual content of the images, shaving
off considerable CI time.

The only missing one is OpenStack (which should be ported over) and
tar (which we need to define the integration test for).

Signed-off-by: Tom Gundersen <teg@jklm.no>
2021-03-08 13:22:26 +01:00
Tom Gundersen
59d2f505cc test/data/manifests: add trailing newline
Mostly to avoid future noisy diffs.

Signed-off-by: Tom Gundersen <teg@jklm.no>
2021-03-08 13:22:26 +01:00
Tomas Hozza
af3c572f9a distro: Disable RHSM DNF plugins on RHEL qcow2 images
Modify RHEL 8.3 and 8.4 KVM guest images definition to produce osbuild
manifest with `org.osbuild.rhsm` stage to disable both RHSM DNF plugins
(`product-id` and `subscription-manager`).

Update `/docs/news/unreleased/osbuild-rhsm-stage.md` to note that RHEL
8.3 and 8.4 qcow2 image definitions are updated to disable RHSM DNF
plugins by default.

Enhance `tools/image-info` tool to add RHSM-specific section to its
output in case RHSM DNF plugins configurations exist in the tree.

Regenerate all RHEL image test cases affected by the patch set.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-02-11 11:10:47 +01:00
Tomas Hozza
89df6ab328 image-tests: remove 'subscription' customization, update repos, regenerate
Remove 'subscription' customization from 'format-request-map.json',
because it currently has no effect on image test cases. The reason is
that this customization of image is possible only via Cloud API in
composer and setting imageOptions. However image test cases currently
support image customization only via Blueprint customizations.

Update repo links in 'repos.json' to the latest rpmrepo snapshots.

Regenerate all image test cases affected by updates to 'repos.json'
and 'format-request-map.json'. This includes all `rhel-8` and `rhel-84`
image test cases.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-02-01 23:20:01 +00:00
Jacob Kozol
15969e0adc distro/{rhel8,rhel84}: set systemd default targets
An image only had a systemd stage added if its blueprint contained
services or if its image type contained enabled services. The systemd
stage is now also added if the image type contains disabled services or
a default target.

The RHEL 8.4 qcow2 image type now specifies the multi-user default target.

In order to test this the image-info tool now includes the default
target in its output. Image test manifests are updated to include this
change.
2021-01-21 11:58:06 +01:00
Tom Gundersen
3c7f61c322 test: restructure dir layout
Attempt to clarify the structure of our tests. Each test case is now
encapsulated in a script in `test/cases`. Each of these scripts should
be runnable on a pristine machine and be independent of each other. It
is up to the test-orchestractor to decide if they should be run
consequtively instance, or in parallel on separate instances. Each
script can execute several tests and call whatever helper binaries
is desired. However, each case should be assumed to always run as one.
2020-10-21 09:04:13 +02:00
Renamed from test/data/cases/rhel_8-ppc64le-qcow2-boot.json (Browse further)