Commit graph

2436 commits

Author SHA1 Message Date
Ondřej Budai
c443df5d20 news: add an entry about RHEL 9
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
3f519ace8a test: update repository snapshot
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
cbe11e280b test/manifests: generate all test manifests for rhel-90
This commit also updates the rpmrepo snapshot for rhel-90 to the latest one.

Note that vmdk and vhd images are currently not buildable, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1989841

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
c0b9382036 ci: pin osbuild for 9.0
We need a newer version there.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
3d7345d445 distro/rhel90: temporarily remove some packages from tar-installer
They don't exist in RHEL 9.0, we need to investigate.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
9e4e734cd3 distro/rhel90: temporarily remove nss-altfiles from edge-commit
It isn't shipped in RHEL 9 yet, see:
https://bugzilla.redhat.com/show_bug.cgi?id=1985020

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
20ef62c3d1 distro/rhel90: add kernel-cmdline stage to all image types
Otherwise, kernel-install will just pick the cmdline from /proc/cmdline
that is actually the host's one. This way, I managed to leak the cmdline
from my Fedora running on btrfs to RHEL 9 image which led to a very weird
results.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
374ac58f51 distro/rhel90: drop dhcp-client from the package set
It wasn't in the previous definition.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
77306faeda distro/rhel90: drop net-tools from the package set
It wasn't in the previous definition.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
7f039e7a7c distro/rhel90: do not exclude fwupd from qcow2
Otherwise, the image type cannot be depsolved because it's hard dependency
of kernel.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
9bbacb885c distro/rhel90: drop dracut-norescue from package sets
It's no longer shipped in rhel-90, its functionality is now just a part
of the dracut package.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
c1acdcc82b distro/rhel90: drop python36 from the basic packageset
python36 is not shipped in RHEL 9, RIP.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
cba29fd221 repositories: use RHEL 9 CDN repositories
We still need to double-check that these are the right addresses. For now,
this is just a best-effort guess.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
afa267cebc distro: fix distro mangling for rhel-90
We want to also mangle RHEL 9 in the same style as we do 8.4+.

RHEL 8.0 => rhel-80
RHEL 8.1 => rhel-81
etc

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
7b03db05c3 distro/rhel90: drop rhel86 alias
It doesn't ever make sense to alias 90 as 86.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
6693ebc59b distro/rhel90: rename everything from 85 to 90
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Ondřej Budai
d6ade6386d distro/rhel90: copy everything from rhel85
rm internal/distro/rhel90/*
cp internal/distro/rhel85/* internal/distro/rhel90/

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-11 11:22:59 +02:00
Achilleas Koutsou
8af0431883 test/casea: trim installer test blueprint 2021-08-11 01:31:47 +02:00
Achilleas Koutsou
280b06381f distro/rhel85: bare metal package set
Used by the image-installer. The package set is intended to replicate a
default RHEL installation, but may need some changes.
2021-08-11 01:31:47 +02:00
Achilleas Koutsou
ab264abd76 distro/rhel85: tar-installer -> image-installer
Renamed tar-installer to image-installer.
This is a more appropriate name:
- It disassociates the image type from the "tar" image type. The two
  should not be perceived to be connected.
- It's more descriptive. The format of the payload (tar) isn't relevant
  to the purpose of the image type.
2021-08-11 01:31:47 +02:00
Achilleas Koutsou
e171977d09 test/data: add test manifest for ppc64le 2021-08-10 22:38:36 +02:00
Achilleas Koutsou
48466ae440 distro/rhel85: offset first partition for ppc
First partition for ppc64le starts at 2048.
2021-08-10 22:38:36 +02:00
Achilleas Koutsou
532ac748cb test/data: add test repos for ppc64le
Also edited s390x to use latest available RPMrepo snapshot.
2021-08-10 22:38:36 +02:00
Martin Sehnoutka
4a8e5e8b19 gitlab-ci: move rhel-8 runners to the internal network
These runners use RPMrepo snapshots which are available only from the
internal network.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
d149d3ab4e test: Make the Satellite test generic over distributions
The test case used to work only on Fedora 33. This patch introduces
support for all future Fedoras and RHEL 8.

It uses a fair bit of magic because it needs to dynamically discover if
a RHEL runner uses the rhel-8.json or the rhel-8-beta.json repository
override. Furthemore it needs to discover a redirection URL, if any, of
the repository override to correctly configure HTTP proxy.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
4ceb0b41da test/data: update rhel 8.3 repository overrides
Use the latest RPMrepo snapshots available.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
4d0dcaeff0 test/data: update rhel 8.5 repository overrides
Use the latest RPMrepo snapshots available.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
0c5a4b3e8b gitlab-ci: enable regression testing on Fedora 33
The "satellite" test works on Fedora so now it makes sense to include
the Fedora runner in the matrix for regression testing.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
d0c0c8791f test/regression: disable excluded pkgs test for Fedora
It is designed for RHEL only. The switch for distros used to live in the
regression.sh script but it was removed so now the tests need to know if
they are running on a compatible system themselves.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
e6737f71d1 test/cases/ostree*: remove mod_ssl configuration file
It clashes with osbuild-composer already running on port 443.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
b244227a2f Schutzfile: pin osbuild to v30
The new RHSM mechanism with a fallback is now available in osbuild > 30.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
130e357268 internal/rhsm: implement fallback to the previous mechanism
It turns out there are edge cases where the previous mechanism worked
and the new one doesn't. Employee subscription is one example, where the
key can be used to access basically any content, yet nothing it written
in the redhat.repo file. This should have no effect on hosts running
RHSM the usual way.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
1227633e7c internal/rpmmd: return helpful error message when subscriptions == nil
It can happen that the system is not subscribed and the user requests a
source with rhsm set to "true". Return useful error message in such case
informing the user what to do about it.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
04a62d677f docs/news: composer works with multiple subscriptions 2021-08-09 12:40:23 +02:00
Martin Sehnoutka
2d75b25ffe test/cases: new case that verifies composer works behind satellite
Introduce a test case where 2 httpd proxies are used to simulate custom
repos with custom subscriptions. That is, every repo requires
client-side tls certificate with its own CA. Make sure both osbuild and
osbuild-composer can use these repositories by issuing an image build.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
ac51c5087f internal/distro: make it possible to use rhsm with fedora
It should be possible to use rhsm with fedora repos as well.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
1ada606ed8 internal/rhsm: introduce package that handles subscriptions
The problem: osbuild-composer used to have a rather uncomplete logic for
selecting client certificates and keys while fetching data from
repositories that use the "subscription model". In this scenario, every
repo requires the user to use a client-side TLS certificate. The problem
is that every repo can use its own CA and require a different pair of
a certificate and a key. This case wasn't handled at all in composer.

Furthermore, osbuild-composer can use remote workers which complicates
things even more.

Assumptions: The problem outlined above is hard to solve in the general
case, but Red Hat Subscription Manager places certain limitations on how
subscriptions might be used. For example, a subscription must be tight to
a host system, so there is no way to use such a repository in osbuild-composer
without it being available on the host system as well.

Also, if a user wishes to use a certain repository in osbuild-composer it
must be available on both hosts: the composer and the worker. It will come
with different pair of a client certificate and a key but otherwise, its
configuration remains the same.

The solution: Expect all the subscriptions to be registered in the
/etc/yum.repos.d/redhat.repo file. Read the mapping of URLs to certificates
and keys from there and use it. Don't change the manifest format and let
osbuild guess the appropriate subscription to use.
2021-08-09 12:40:23 +02:00
Martin Sehnoutka
cc9b74ead6 spec: bump osbuild dependency to >= 29
Version 29 contains the support for the new RHSM lookup alghorithm which
is needed for cooperation with the new algorithm in composer.
2021-08-09 12:40:23 +02:00
Achilleas Koutsou
a49d28dfc4 test/cases: install python3 for installer test
Required by Ansible to run checks
2021-08-09 07:57:15 +02:00
Achilleas Koutsou
d96c72e6f4 test: fix host group name in ansible test file
Host group should be 'guest'. The ansible inventory file in the test
uses the group name 'guest'.

Change package check to tmux since zsh isn't installed.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-09 07:57:15 +02:00
Ondřej Budai
065d068b66 repositories: point to 8.3 in rhel-8 distribution
rhel-8 distribution is in fact RHEL 8.3. As it doesn't make much sense
to build images from 8.3 definitions and 8.4+ content, this commit changes
the repositories for rhel-8 to point at 8.3 content.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-08 15:14:58 +03:00
Ondřej Budai
eb7acdcaca repositories: add a repo file for RHEL 8.5
Since we gained the ability to cross-distro build images, we need to have
a repo file per distribution even for RHEL. This commit adds one for RHEL
8.5.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-08 15:14:58 +03:00
Thomas Lavocat
fd81593026 Tests: Malformed JSON duplicate customization
Fixes #1612
2021-08-06 10:38:20 +02:00
Achilleas Koutsou
5a4d6bdfe7 test/data: add test repos and manifest for s390x
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00
Achilleas Koutsou
fe19d5a1d4 distro/rhel85: prepend kernel cmdline stage
For s390x, prepend a kernel cmdline stage to the start of the OS
pipeline. This is a noop for other architectures for now.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00
Achilleas Koutsou
844f77f7ca distro/rhel85: add zipl.inst stage for s390x
Installs the zipl bootloader on the disk image.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00
Achilleas Koutsou
0ed4f057c2 osbuild2: zipl install stage
New stage: org.osbuild.zipl.inst

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00
Achilleas Koutsou
22faa79880 distro/rhel85: bootloaderInstStage() function
Returns a single stage that installs the bootloader.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00
Achilleas Koutsou
38e88daea6 osbuild2: Don't add nil stages
Do nothing if a nil value is passed to pipeline.AddStage().

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00
Achilleas Koutsou
67ae1acafd distro/rhel85: bootloaderConfigStage() function
Returns a single stage that configures the bootloader, either GRUB or
ZIPL based on architecture.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-06 07:30:05 +02:00