This cleans up the linting results by adding checks for
integer underflow/overflow in several places, suppressing the error in
places where it has been checked, or fixing the types when possible.
Version 1.56 pulls in 1.22.0 which is too low for our go.mod version of
1.22.6 and v1.59 pulls in go v1.22.5
So move to 1.60 which pulls in 1.23, which should work fine after some
new linting complaints are addressed.
Replace ifcfg with net-lib for EL10 and F42 installers.
In RHEL 10 and Fedora 42, the ifcfg module was replaced by net-lib.
This PR removes ifcfg from common anaconda dracut stage modules and adds
either ifcfg or net-lib to each installer based on distro version.
This commit tweaks the `cross-build.sh` to checkout the last release
tag of the images library instead of using main. The issue with using
main is that there are many false positive errors when e.g. a new
fedora release is added to main.
Ideally it would use the tag of the vendored images library but
this particular test looks at the rpm content so the information
what version of images was used is not readily available (we could
fix this but the workaround of this commit is hopefully sufficient).
This commit fixes the failing TestGetImageRequests_BlueprintDistro
test. It fails because fedora-39 is no longer part of the supported
distros and can no longer be build. Move to fedora-42 so that we
have a bit time before we need to update it again.
It also updates TestGetImageRequests_NoRepositories to point to
fedora-42.
This commit updates to images v0.117.0 so that the cross-distro.sh
test works again (images removed fedora-39.json in main but the
uses the previous version of images that includes fedora-39 so
there is a mismatch (we should look into if there is a way to
get github.com/osbuild/images@latest instead of main in the
cross-arch test).
It also updates all the vendor stuff that got pulled via the
new images release (which is giantonormous).
This update requires updating the Go version to 1.22.8
Add more information when the cross-distro.sh test fails. Currently
it prints:
```
DEBUG: ===== ALL_DISTROS ====
rhel-8
...
rhel-8
DEBUG: ===== ALL_EXPECTED_DISTROS ====
fedora-40
...
fedora-42
DEBUG: ===== ALL_REMAINDERS ====
rhel-8
....
rhel-8
DEBUG: ===== END ====
Some distros are missing!
Missing distros:
```
But the most crucial information (i.e. what is installed) is
missing from this debug print (it can be found in a different
output but lets make it easy).
This commit updates osbuild-composer for the new API in images
for the `reporegistry.New()`. The main incompatible change is
that the `/repositories` part is not longer automatically added
inside the library so we need to add it on the call-site.
This needs https://github.com/osbuild/images/pull/1179
Repeat of 8554d6202d.
This is a much nicer (and newer) way of handling the Go version for the
project. The issue that caused the previous revert was that the toolbox
version was being set to 1.22.0, which is older than what some
dependencies require, specifically osbuild/images, so the 'go mod tidy'
would downgrade images to match the required toolbox version.
Setting the go and toolbox version to 1.22.6 should make it all work as
expected.
This reverts commit 7e87d1e124.
Co-authored-by: Lukáš Zapletal <lukas@zapletalovi.com>
This commit updates the cloudapi test that uses the real repositories
to use the version of those from the "images" library. Composer
no longer carries the default repos.
Note that this can most likely be simplified once
https://github.com/osbuild/images/pull/1179
is merged.
This commit changes the spec file so that most of the repositories
are taken from the `images` library. See images PR#1112 for details.
Note that we still need the -no-auth-keys and the centos-stream
symlinks.
We want to use a stable version of ubuntu, not ubuntu-latest which can
change unexpectedly. This switches all the other (non-test) workflows to
use ubuntu-22.04
github is dropping support for 20.04 on 4/1/2025 so move to the next
stable version.
Also, back in commit e8ae7e7cae we removed
use of ubuntu-latest because it can change unexpectedly. Some other uses
crept back in, so this changes those to use 22.04 as well.
The alias in the built-in config is meant for on-prem and needs to be
set to the current in-development minor RHEL version.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Unconditionally undefine `gomodulesmode` rpm macro, which by default
disables the Go modules information in the binary. It used to be defined
only on Fedora, but it is now defined on RHEL.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This enables the artifact directory during the tests, it mocks up a
download artifact, and tests that it can be downloaded. The file
contains JSON because the TestRoute helper expects that as the response.
Related: RHEL-60142
This will download the build artifact from a locally saved osbuild
compose. It will set the filename to the the UUID of the build with the
artifact filename appended. eg. 1dbcc86e-745b-4061-812f-e50f06fa7cbe-disk.qcow2
Related: RHEL-60142
The new script can cause changes to the go.mod when executing
`go get go@version`, downgrading packages that we want to bump, which
can revert changes we want the tool to be tidying.
We can work around this for now, but with the script being part of our
PR checks, we also need to revert the script so we can get module
updates through.
This reverts 8554d6202d
Remove incorrect comment (not an ostree image).
Add a greenprint for depsolving since it can take some time for that to
run and it makes more sense than pausing output on "Preparing
blueprint".
Add separate blueprint creation functions, one for each partitioning
layout:
- disk-plain
- disk-lvm
- disk-btrfs (Fedora only)
The existing 'filesystem' blueprint is also kept.
Each function also sets the $EXPECTED_MOUNTPOINTS variable for the
mountpoint check that happens after the build.
This adds support for listing all of the supported distributions,
their arches, the image types, and their repository details.
This returns 3 nested json objects. The keys for the first layer are the
distribution names. The 2nd layer's keys are the architectures supported
by that distribution, and the 3rd layer's keys are the image types
supported by that distribution:architecture pair. The value of the 3rd
layer is the repository information.
Resolves: RHEL-60133