Commit graph

5156 commits

Author SHA1 Message Date
Ondřej Budai
0359647a82 go.mod: update to Go 1.18
Fedora 35 support was dropped, so we can update to a newer Go.

Stable RHEL 8 and 9 and Fedora 36 ships Go 1.18, so let's switch to it.

"//go:build" directives are now apparently enforced by go fmt, so that's why
there were added.

Also, all the github actions were adjusted to use Go 1.18.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-09 14:03:18 +01:00
Sanne Raymaekers
6ca12a493d osbuild-worker: add dnf-json error reason to depsolve job error 2023-01-06 13:55:04 +01:00
Ondřej Budai
4bafe1ead9 remove Fedora 35 support
Fedora 35 is going EOL on Tue 2022-12-13. At the time of writing this commit
message, that's the next day. As we do releases on Wednesdays, the next
release will never find its way to F35 and thus, there's no point in keeping
support for it.

Let's delete everything that relates to Fedora 35. If there's something that
cannot be deleted (e.g. CI containers based on F35), let's upgrade it to F37.

TestCrossArchDepsolve now uses CentOS Stream 8 because RHEL 8.4 cannot read
F37 repository metadata. This is a similar issue to
https://bugzilla.redhat.com/show_bug.cgi?id=2004853 . Basically, newer
repositories can be only read by libmodulemd >= 2.11.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-06 11:34:50 +01:00
Ondřej Budai
8c4689f082 workflows: mark the working directory safe for git
Github actions have a peculiar behaviour: The "job root" directory is owned
by user with ID 1001 whereas many containers (like the Fedora one) run as root
by default. This causes git to freak out because repositories owned by
different users aren't considered safe anymore and must be explicitly allow-
listed.

This becomes a problem when we switch to Go 1.18 because it stamps build with
Git information which fails because the repository technically isn't safe.

Let's fix this by marking the repository as a safe one.

Note that the actions/checkout action has a set-safe-directory feature, but
this one is not permanent. After the action is done, the setting is removed.
See https://github.com/actions/checkout/pull/762

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-06 11:34:50 +01:00
Ondřej Budai
1f782900f0 tools/koji-composer: add encoding to open()
Newer versions of pylint complain about a missing encoding in the open()
function.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2023-01-06 11:34:50 +01:00
Achilleas Koutsou
d968765c64 Schutzfile: update osbuild version to latest build (v75) 2023-01-05 19:32:25 +01:00
Miroslav Suchý
1dd513c44a Migrate to SPDX license
See https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_1
2023-01-05 11:34:47 +01:00
schutzbot
20143b66c7 Post release version bump
[skip ci]
2022-12-28 08:21:37 +00:00
Lukáš Zapletal
13fdf04839 Update building instructions
Looks like `build/` is not even in `.gitignore`. What happened there? :-)
2022-12-19 10:49:37 +01:00
Tomáš Hozza
5e0c66e008 RHEL-9: add missing Azure aarch64 image manifests
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
e217c6069e distro/rhel9: update image type lists in tests 2022-12-16 15:40:09 +01:00
Achilleas Koutsou
a5c1f8e98c test: generate new manifests: Azure aarch64
Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
a9842d5e9c test-case-generators: enable azure aarch64 manifest generation
Add the rhui-azure rpmrepo snapshots to aarch64 repositories.
The repos are labelled as x86_64 but they're actually 'noarch' and we
name them x86_64 when creating the snapshots.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
d3b0b2218b distro/rhel9: add Azure aarch64 platform and include image types
Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
2a0e935fc3 distro/rhel9: add partition table for aarch64 azure-rhui
Copy of the x86_64 partition table with BIOS partition removed.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
617ec35c57 distro/rhel9: clarify partition table error message
The previous error didn't make it clear where the issue was coming from.
Now it explains that the problem is that a partition table for a given
architecture isn't specified on the image type.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Achilleas Koutsou
ee7429880f distro/rhel9: remove arch-dependent packages from Azure common
These are already added by the platform.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-12-16 15:40:09 +01:00
Irene Diez
f711219f0a tests: update si tests with ignition blueprint
Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Irene Diez
76728818c9 internal/distro/rhel9: handle ignition.embedded for edge
Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Irene Diez
428dd169e4 internal/distro/rhel9: handle ignition.firstboot for edge
Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Irene Diez
2f2ef709cd internal/blueprint: add ignition customizations
This allows a user to configure the system via `edge-simplified-installer`
using an ignition configuration specified in the blueprint.

This ignition config can be embedded in the ISO as a Base64
encoded file (ignition.embedded.data) or as a file
containing the URL where the ignition config file is served
(ignition.embedded.url).

The user can also instead specify an URL serving an ignition
config file that will passed as a karg and be fetched at first
boot (ignition.firstboot.url).

Signed-off-by: Irene Diez <idiez@redhat.com>
2022-12-15 11:34:17 +00:00
Sanne Raymaekers
81a5ff1bf6 templates/packer: triple aws polling attempts
AMIs can take a long time to get ready.
2022-12-14 17:10:13 +01:00
schutzbot
99a202fa99 Post release version bump
[skip ci]
2022-12-14 08:26:06 +00:00
Achilleas Koutsou
cc4744b306 test: regenerate manifests - RHEL 9.x and CS9 edge installers
The edge installer manifests for RHEL 9.x and CS9 no longer enable the
Users module in Anaconda.
Note that the 'edge_installer_with_users' manifests are unaffected.  The
module is enabled in these manifests so that the user specified in the
build request can be created during installation.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
83cb043daa distro/rhel9: conditionally enable users module for edge installer
In RHEL 9, for the edge installer, only enable the users module when it
is required for creating a user specified in the blueprint or request.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
e9d01b33c4 test: regenerate manifests - fedora 38 image installer
The only change is in the Fedora 38 image installer manifests where we
had the Users module defined twice and is now only appended to the end
of the list.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
a0528d2e53 osbuild: remove 'users' boolean argument from NewAnacondaStageOptions()
Drop the argument altogether.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
a63fe649cb manifest: don't use the users flag in NewAnacondaStageOptions()
Before we only had one optional kickstart module we would enable that
was Users, so we just had a single boolean for adding it.  Now that we
often need to add multiple modules, keep the default ones in the
NewAnacondaStageOptions() function, but only have a single argument for
adding additional, optional modules.  If the user module needs to be
enabled, add it to the list of additional ones.
2022-12-13 20:33:27 +00:00
Achilleas Koutsou
5485a3cb65 test: update all anaconda manifests
ISOLinux stage removed from all aarch64 installer manifests.
2022-12-13 21:14:55 +01:00
Achilleas Koutsou
6bfa3dd366 image: add ISOLinux stage only for x86_64
The previous fix (9e66ee13e7) only fixed
half the problem with this bug.  The ISOLinux stage was still added to
the iso-tree pipeline for Anaconda builds.

This is now removed.
2022-12-13 21:14:55 +01:00
Sanne Raymaekers
07a8f3d5ea test: adapt to shellcheck v0.9.0 2022-12-13 13:55:53 +01:00
Sanne Raymaekers
86c3036fe3 templates/packer: increase polling delay
A packer build failed due to being rate limited by the aws api.
2022-12-13 13:55:53 +01:00
Achilleas Koutsou
66ce7e326d test: update manifests for edge-raw-image and edge-simplified-installer 2022-12-13 13:24:20 +01:00
Antonio Murdaca
6d15dc144c distro/rhel: make edge images properly sysroot.readonly=true
Make edge raw images (both the raw image type and the same in the edge
simplified installer) mount the /sysroot as read-only.  This was already
done in Fedora 37+ (547f7a66b3).

Copied commit message from 6f89e9d499 to a
comment in all places where the accompanying "rw" kernel option is set
explaining the requirement, since the option is counter-intuitive.

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Signed-off-by: Antonio Murdaca <antoniomurdaca@gmail.com>
Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
2022-12-13 13:24:20 +01:00
Achilleas Koutsou
6bb7de5269 test: update manifests for all Anaconda installer images 2022-12-13 07:49:32 +00:00
Achilleas Koutsou
eaf3dc2ecc manifest: always add inst.stage2 kernel option for Anaconda
The bootiso.mono stage in osbuild that we used until recently adds the
inst.stage2 option unconditionally [1] whereas the current grub2.iso
stage that we use now doesn't.

[1] 8511add169/stages/org.osbuild.bootiso.mono (L369)
2022-12-13 07:49:32 +00:00
Sanne Raymaekers
c71ff0731c test: regenerate manifests 2022-12-12 13:42:52 +01:00
Sanne Raymaekers
369f237d89 gen-manifests: add ostree rhsm option 2022-12-12 13:42:52 +01:00
Sanne Raymaekers
cb127cd1b0 distro/rhel9: add consumer certificates when ostree rhsm is true 2022-12-12 13:42:52 +01:00
Achilleas Koutsou
19ec3be6bd manifest: return inline FDO cert from CoreOSInstaller pipeline
The CoreOSInstaller pipeline supports adding inline data to the tree for
the FDO cert.  This needs to be returned by the pipeline object via the
getInline() method to attach the necessary data to the Sources array in
the manifest.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
351576f362 test: update ostree-simplified-installer test
Uses sed to modify the grub configuration to test http boot and needs to
match the image name on the ISO.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
0f48298811 test: update RHEL 8 and CentOS 8 edge simplified installer manifests
New embedded disk image name.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
2784d5a228 distro/rhel8: rename raw image in simplified installer
Rename the raw image embedded in the simplified-installer ISO to
image.raw.xz for RHEL 8.  This is the same name that's used for the raw
image when built on its own (as edge-raw-image).
The change is made for consistency with RHEL 9 and Fedora as well as for
consistency with the edge-raw-image.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
3fa2da3450 distro/rhel9: remove unused functions
- Pipelines.
- Stage options.
- Manifest and PackageSets implementations for ImageType.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
0a4c078200 test: update edge-simplified-installer manifests
Changes:
- Build packages
- Edge raw image pipelines
- Raw image filename
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
b0c67b3e40 rhel9: update edge simplified installer to new definition
Add the image function and remove the pipeline function.
Remove the build package set: build packages are added to the pipelines
on-demand based on platform, environment, and stage requirements.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
f68ac1d163 image: new image kind: OSTreeSimplifiedInstaller
Define the OSTreeSimplifiedInstaller ImageKind.
This is the top-level image definition.
It uses the raw image pipelines, iso pipelines, and the new coreos
installer pipelines.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
8d36e048bc image: separate raw image pipeline from InstantiateManifest
Make the pipeline code a reusable function so we can use it in multiple
images (edge-raw-image and edge-simplified-installer).
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
bc4583eb81 manifest: new COI bootiso-tree pipeline
New bootiso-tree pipeline specific to the CoreOS Installer.

This is very similar to the Anaconda bootiso-tree pipeline.  Usually we
generalise these pipelines to support both installers.  The bootiso-tree
is different enough that generalising the one for Anaconda would make it
harder to work with.
2022-12-11 12:37:37 +00:00
Achilleas Koutsou
44d12890b8 test: regenerate installer manifests
Dracut module added to RHEL 9 and CS 9 installers.
2022-12-11 12:37:37 +00:00