Commit graph

2197 commits

Author SHA1 Message Date
Tomas Hozza
f06e66b94b osbuild2: support for servers option in org.osbuild.chrony
Add support for the newly added `servers` option in the
`org.osbuild.chrony` osbuild stage [1]. The option allows one to
specify timeservers to be used by chrony, including a subset of
lower-level configuration options per each server.

Implement a custom JSON marshaller method for `ChronyStageOptions` to
ensure that exactly one of 'timeservers' or 'servers' is specified, as
mandated by the stage schema.

Optional values in `ChronyConfigServer` are declared as pointers to
distinguish the case when the value was explicitly set by the user from
the default value when the structure instance is created. All of these
options should be omitted from the JSON, but only when not explicitly
set, not when their value us "0" for int or "false" for bool. Downside
of this approach is that one can not easily use pointer to a basic
type literal in the struct literal. Passing the basic type literal has
to be workarounded using an intermediate variable, which address is
used in the struct literal.

Add unit test cases for the added functionality.

[1] https://github.com/osbuild/osbuild/pull/692

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
8367542f25 osbuild2: support for subscription-manager option in org.osbuild.rhsm
Add support for the newly added `subscription-manager` option in the
`org.osbuild.rhsm` osbuild stage [1]. The option allows one to
create configure subset of subscription-manager options in its
configuration file `/etc/rhsm/rhsm.conf`.

Add unit test cases for the added functionality.

[1] https://github.com/osbuild/osbuild/pull/659

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
29ade764ce osbuild2: support for unit-dropins option in org.osbuild.systemd
Add support for the newly added `unit-dropins` option in the
`org.osbuild.systemd` osbuild stage [1]. The stage allows one to
create `.service` unit files drop-in configuration files under
`/usr/lib/systemd/system/`.

Add unit test cases for the added functionality.

[1] https://github.com/osbuild/osbuild/pull/664

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
20e1cfeba4 osbuild2: add support for org.osbuild.cloud-init stage
Add support for the `org.osbuild.cloud-init` osbuild stage [1],
which allows one to configure cloud-init by creating
configuration files under `/etc/cloud/cloud.cfg.d/`.

Add unit test cases for the newly added stage.

[1] https://github.com/osbuild/osbuild/pull/689

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
9957f378ca osbuild2: support for network-scripts option in org.osbuild.sysconfig
Add support for the newly added `network-scripts` option in the
`org.osbuild.sysconfig` osbuild stage [1]. The stage allows one to
create `ifcfg` configuration files under
`/etc/sysconfig/network-scripts`.

Add unit test cases for the added functionality as well as for other
options of the stage, which were missing.

[1] https://github.com/osbuild/osbuild/pull/663

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
bef4628a08 osbuild2: add support for org.osbuild.systemd-logind stage
Add support for the `org.osbuild.systemd-logind` osbuild stage [1],
which allows one to configure systemd-logind by creating
configuration drop-ins.

Add unit test cases for the newly added stage.

[1] https://github.com/osbuild/osbuild/pull/668

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
5e97dcf2b3 osbuild2: add missing JSON unmarshaling test for org.osbuild.dracut stage
The `org.osbuild.dracut` stage was previously not tested for JSON
unmarshalling. Add the missing test case and extend Stage's
`UnmarshalJSON()` method.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
92719e05a2 osbuild2: add support for org.osbuild.dracut.conf stage
Add support for the `org.osbuild.dracut.conf` osbuild stage [1], which
allows one to configure dracut by creating configuration files.

Add unit test cases for the newly added stage.

[1] https://github.com/osbuild/osbuild/pull/688

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
c0e8d4bdc4 osbuild2: add support for org.osbuild.modprobe stage
Add support for the `org.osbuild.modprobe` osbuild stage [1], which
allows one to configure modprobe by creating configuration files.

Add unit test cases for the newly added stage.

[1] https://github.com/osbuild/osbuild/pull/670

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Tomas Hozza
9386a02984 internal/common: add helper functions to get pointer to a basic type value
Add two new helper functions `IntToPtr()` and `BoolToPtr()` to the
`internal/common` package, which can be used to conveniently set
basic type literals in a struct literal, in which pointer to the basic
type is expected.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-07-08 19:37:09 +02:00
Ondřej Budai
78ef247042 bump minimum go version to 1.15
The oldest distributions that we now support are RHEL 8.4 and Fedora 33.
They both support go 1.15, let's bump.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-07 17:26:18 +01:00
Ondřej Budai
c036f96cf5 schutzfile: drop osbuild pin for CentOS Stream 8
We already ship 29 in CentOS Stream 8, eb74ddf2 is 28.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-07 13:25:26 +02:00
Xiaofeng Wang
c025c60544 test: Allow a failed dmesg imported by new RT kernel
Due to bz#1979272, the failed dmesg is not caused by osbuild, but
RT kernel itself. Allow this failed dmesg to make test happy.
2021-07-06 11:41:46 +01:00
Ondřej Budai
385648223d spec: drop hacks for Fedora 32
There are not needed anymore, yay!

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-05 11:16:08 +02:00
Ondřej Budai
5ae6203d65 distro: drop Fedora 32
It's EOL.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-05 11:16:08 +02:00
Ondřej Budai
0201822c50 tests: remove all traces of Fedora 32
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-07-05 11:16:08 +02:00
Xiaofeng Wang
4e4012df28 test: Update ostree.sh to cover bz#1896178
For RHEL 8.5, user and ssh key are added in blueprint.
For Fedora 33, RHEL 8.3 and 8.4, user and ssh key have to be
added in ks file due to bz#1896178.

bz#1896178 has been fixed already on RHEL 8.5 only, but still exists
on Fedora 33, RHEL 8.3 and 8.4. This update covers Fedora 33,
RHEL 8.5, RHEL 8.4 and RHEL 8.3.
2021-07-05 11:15:58 +02:00
Achilleas Koutsou
6e22e1de64 test/cases: fix installers test
COMPOSE_ID shouldn't be set but taken from the build response
2021-07-02 17:57:22 +02:00
Achilleas Koutsou
afa07bc87b CI: disable tests on RHEL 8.5
Main image types aren't get supported for RHEL 8.5
Installer test needs more adjustments so disabling for now to keep CI
from blocking other work.
2021-07-02 17:57:22 +02:00
Gianluca Zuccarelli
ea5b7e113a fix: small typo in code comments 2021-07-02 10:38:04 +02:00
Gianluca Zuccarelli
9aa8ebdfff fix: unused function arg 2021-07-02 10:38:04 +02:00
Xiaofeng Wang
a0ec753e05 test: Update check_ostree.yaml to work with RHEL 8.5
There's no any error message in dmesg output on RHEL 8.5 Edge image.
Update playbook to support that.
2021-07-01 13:34:12 +02:00
Xiaofeng Wang
bc76f437a0 Pin osbuild to latest commit to fix bz#1975554 2021-07-01 13:34:12 +02:00
Xiaofeng Wang
f87ce3fa3a Update schutzbot/terraform to point to latest gitlab-ci-terraform
repo commit
2021-07-01 13:34:12 +02:00
Xiaofeng Wang
35263e5ab4 test: Remove fedora 32 test
GitLab CI dropped Fedora 32 support, fedora 32 test should be
removed.
2021-07-01 13:34:12 +02:00
Achilleas Koutsou
f557ab57bf test/data: update edge test manifests
Core stages were updated to include the fix-bls stage.
Updating existing RHEL 8.5 test manifests.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
a304806d7c GitLab CI: Enable RHEL 8.5 and installers.sh
Add RHEL 8.5 runners and run new installers.sh integration test.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
a877326671 test: add installer integration test
Builds a tar-installer, installs the OS, boots it, and checks if the
packages selected in the blueprint are installed.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
c4aeb256a5 test/data: test case for tar x86_64 2021-07-01 12:48:32 +02:00
Achilleas Koutsou
5f53b3865f rhel85: append "boot" package sets to "packages"
If an image type is marked "bootable", append the package set with  name
"boot".
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
e8dd5b3248 rhel85: move package sets to separate file
Package sets shared between multiple image types are statically defined
in functions.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
49df4a70af rhel85: add base build package set to distribution 2021-07-01 12:48:32 +02:00
Achilleas Koutsou
f1e805658c rhel85: distro and arch package sets
Add package sets to the top level distribution and the
architectures. Merge package sets when requested through
`imageType.PackageSets()`.
This allows us to have "cascading" package sets:
    distro > arch > image type

Previously this was only supported for the build packages. The idea is
generalised based on the idea of arbitrary package sets.

Certain package sets have special meaning (for the distro):
- packages: blueprint packages and special option packages are merged
  into this one.
- build: is not expected to be defined on the image type so it is merged
  from the distro and arch explicitly.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
38f5b23e87 rhel85: tar image type
Traditional tar image type.
Pipelines generation function for tar image type uses the same pipelines
and stages as the tar installer, but exports the OS image directly.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
ec381fefb9 rhel85: generalise and simplify tar stage creation 2021-07-01 12:48:32 +02:00
Achilleas Koutsou
7e1ab365c8 rhel85: change kickstart file location
Global const for defining kickstart path for all installer types.
Kernel options added to point to path.

Kickstart file renamed to osbuild.ks for all types and placed in the
bootiso root.

Fixes #1363
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
32c69b3cf9 rhel85: add subscription stage to core pipeline 2021-07-01 12:48:32 +02:00
Achilleas Koutsou
242f6d3c44 rhel85: tar installer main pipeline
Define a core set of packages and stages shared by images.
2021-07-01 12:48:32 +02:00
Achilleas Koutsou
19d15af788 rhel85: new image type tar-installer 2021-07-01 12:48:32 +02:00
Ondřej Budai
e1e4a1f845 distro/rhel90: add s390utils-core to the build pipeline for s390x
A recent update to crypto-policies changed its requirements from:

Recommends: grubby

to:

Recommends: (grubby if kernel)

We don't install kernel in the build pipeline, thus grubby was now no longer
installed. This caused also s390utils-core to not be installed on s390x.
s390utils-core has to be in the build pipeline though because we use
/usr/sbin/zipl from it to install the bootloader to s390x images.

Long story short, images for s390x currently cannot be build because
/usr/sbin/zipl is no longer in the build pipeline. This commit fixes that
by explicitly adding s390utils-core to the package list for s390x.

I verified this fix on an actual s390x machine. The test manifest was
regenerated but it's actually still the same because we use an older
snapshot that doesn't contain the newest crypto-policies change.

Kudos to Tomáš Hozza for helping me out!

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-06-30 14:48:57 +02:00
Yuxin Sun
6cd6e81e85 Add subscription test case and Azure boot up case
Signed-off-by: Yuxin Sun <yuxisun@redhat.com>
2021-06-30 12:29:33 +02:00
Achilleas Koutsou
1e54cd4493 CI: run ostree tests in RHEL 8.5 2021-06-29 17:26:43 +01:00
Achilleas Koutsou
f557bf9a8b test/cases/ostree: test new image types
ostree.sh: add case for RHEL 8.5 edge-commit
ostree-ng.sh: conditional container and installer type and file names
2021-06-29 17:26:43 +01:00
Achilleas Koutsou
034bdaafab distro-arch-imagetype-map: add new distro and types 2021-06-29 17:26:43 +01:00
Achilleas Koutsou
0bac6806f5 tools/provision: set up nightly repos for RHEL 8.5 2021-06-29 17:26:43 +01:00
Achilleas Koutsou
54a811c3f1 schutzbot/mockbuild.sh: RHEL 8.5 support
Add RHEL 8.5 support to the mockbuild script.
2021-06-29 17:26:43 +01:00
Achilleas Koutsou
c8bf77bad8 news: add entry about RHEL 8.5 Edge images 2021-06-29 17:26:43 +01:00
Achilleas Koutsou
0b6452bb34 test: new manifests for RHEL 8.5 edge types 2021-06-29 17:26:43 +01:00
Achilleas Koutsou
779103cb96 rhel85: add tests 2021-06-29 17:26:43 +01:00
Achilleas Koutsou
4651b8ba22 tools: add 8.5 edge types to format request map
For test case generation. These are the new names used by the 8.5 edge
image types.
2021-06-29 17:26:43 +01:00