Commit graph

6513 commits

Author SHA1 Message Date
Tomáš Hozza
ab4dd4995c Remove F37 and F38 test manifest, because they are EOL
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-12 11:29:56 +02:00
Tomáš Hozza
ff433563c0 Remove c8s test manifest, because it is EOL
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-12 11:29:56 +02:00
Tomáš Hozza
30f221401a Repositories: use RH GPG release key signed using SHA256
The RPM GPG release key used by Red Hat to sign its content used to be
signed using SHA-1. SHA-1 is no longer accepted on RHEL-10 / c10s and as
a result, such key can't be imported during image build. The RH GPG
release key has been resigned using SHA256 some time ago. Let's use this
version of the key for all RHEL repositories.

The key is taken from:
https://access.redhat.com/security/team/key

Specifically:
https://access.redhat.com/security/data/fd431d51.txt

The second key (auxiliary key 3) was not changed.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-12 11:29:56 +02:00
schutzbot
08fe4ef4fb Post release version bump
[skip ci]
2024-06-12 08:15:23 +00:00
Sanne Raymaekers
7e89085808 templates/openshift/composer: remove maintenance cronjob
This is now deployed from a separate tempate.
2024-06-12 09:42:27 +02:00
Michael Vogt
2704b18663 obuild-worker: extract workerClientErrorFrom() helper and add tests
Tiny commit to extract a helper from DepsolveJobImpl.Run() that
can then be unit tested.

This should help with https://github.com/osbuild/images/issues/727
2024-06-11 10:42:00 +02:00
Achilleas Koutsou
7abcd279eb go.mod: bump osbuild/images to v0.65.0 2024-06-07 17:11:16 +02:00
Alexander Todorov
c80ca0a64d Temporary disable 2 regression tests on 9.5
Related: COMPOSER-2264
2024-06-07 10:31:54 +02:00
Alexander Todorov
ee1f70ec2e Add self-signed CA files to system trust store
in the hope that dnf in 9.5 will actually trust them and not fail
2024-06-07 10:31:54 +02:00
Alexander Todorov
3860f03d68 Update distro aliases in test 2024-06-07 10:31:54 +02:00
Alexander Todorov
e792bd3c13 Update 9.5 repositories in Schutzfile 2024-06-07 10:31:54 +02:00
Alexander Todorov
74421fa647 Generate manifests for RHEL 9.5 2024-06-07 10:31:54 +02:00
Alexander Todorov
537fe1a033 Define 9.5 repositories for gen-manifests 2024-06-07 10:31:54 +02:00
Alexander Todorov
8d0eb8b0cb Replace 9.4 conditions with 9.5 conditions inside test scripts 2024-06-07 10:31:54 +02:00
Alexander Todorov
4bee7cffb9 Replace 9.4 with 9.5 runners 2024-06-07 10:31:54 +02:00
Alexander Todorov
39370abce4 Define rhel-9.5 repos
Related: COMPOSER-2227
2024-06-07 10:31:54 +02:00
Michael Vogt
a691df2353 osbuild-worker-executor: fix order of assert.Equal() in tests
The `assert.Equal()` expects that the "expected" value is put
first. Which is not what I'm used to. It's also slightly inconsistent
because `assert.EqualError()` expects the "actual" err first and
then the expected string. But this commit is not about ranting :)

This commit fixes the order in the tests assert.Equal() so that
mismatches actually are displayed correctly.
2024-06-07 08:17:32 +02:00
Michael Vogt
61bf0c3235 osbuild-worker: do not use error in clienterror.Error.Details
This is an alternative/complementary fix for PR#4137. It is very
simple so should be uncontroverisal.

It fixes an issue that @schuellerf discovered, i.e. that when an error
interface is passed into clienterrors.Error.Details the details get
lost because the json.Marshaler will not know how to handler an
error interface.

To find the problematic uses of `error` a custom vet checker was
build in https://github.com/mvo5/osbuild-cvet. With that the
result is:
```
$ go run github.com/mvo5/osbuild-cvet@latest ./...
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-depsolve.go:93:26: do not pass 'error' to WorkerClientError() details, use error.Error() instead
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:404:31: do not pass 'error' to WorkerClientError() details, use error.Error() instead
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:519:31: do not pass 'error' to WorkerClientError() details, use error.Error() instead
/home/mvogt/devel/osbuild/osbuild-composer/cmd/osbuild-worker/jobimpl-osbuild.go:556:31: do not pass '[]error' to WorkerClientError() details, use []string instead
```
and once this commit is in no more errors.

Just like PR#4137 this is not perfect because it will not do a
recursive check for the passed argument.
2024-06-07 01:19:11 +02:00
Michael Vogt
8ebefbdbc9 main: rework the way the mock logger is passed
Pass the mock logger directly to `run()` instead of mocking
`logrus.New`. Doing the later leads to a data race when multiple
parallel tests modify the (global) `var logrusNew logrus.New`.

Thanks to Tomas Hozza for reporting.
2024-06-06 21:14:31 +02:00
Michael Vogt
95b4a9e250 osbuild-worker-executor: make test output silent again
Do not use the global logger but pass instead the locally created
logger. This means the test output is silent again.

Sadly using the global logger is difficult because it is a global
resource so replacing it in tests means all tests (that are
potentially run in parallel) will write to it which makes testing
specific log output hard.
2024-06-06 16:16:33 +02:00
Michael Vogt
a634868793 all: run ./tools/prepare-source.sh 2024-06-05 18:26:08 +02:00
Michael Vogt
e34728b466 osbuild-worker-executor: appease errcheck 2024-06-05 18:26:08 +02:00
Michael Vogt
138bc73e37 osbuild-worker-executor: appease gosec
Note that gosec IMHO is a bit silly here, the heuristics used are
note very good, i.e. the code is already validating the external
inputs and it's not clear to me that "filepath.Clean()" will help
but it seems to supress the error. I hope gosec provides value
in other places, here it seems to be adding work :/

I also excluded "gosec" from any _test.go files, I do not see
why we should gosec tests?
2024-06-05 18:26:08 +02:00
Sanne Raymaekers
b0543e89f4 osbuild-worker-executor: fix lint warnings/errors
The osbuild-composer linting found a bunch of issues that this
commit fixes.
2024-06-05 18:26:08 +02:00
Sanne Raymaekers
01cfb93956 osbuild-worker-executor: integrate into build system/spec files
Add the osbuild-worker-executor to the build system and add it
to the spec file.
2024-06-05 18:26:08 +02:00
Michael Vogt
0a0e8e27ae vendor: add vendor/github.com/sirupsen/logrus/hooks/test
This is needed by the new `osbuild-worker-executor`.
2024-06-05 18:26:08 +02:00
Michael Vogt
cbb8d79baf c/osbuild-worker-executor: update to match new name
Update the imports/names to match the new name
"osbuild-worker-executor".
2024-06-05 18:26:08 +02:00
Michael Vogt
372d9f07dd cmd/osbuild-worker-executor: import verbatim from mvo5/oaas
This commit imports the repository https://github.com/mvo5/oaas
without keeping the history. The history is largely unimportant
and can be looked up in https://github.com/mvo5/oaas/commits/main
if needed.
2024-06-05 18:26:08 +02:00
Tomáš Hozza
fa416e4545 Test: re-enable snapshot URL check (COMPOSER-2263)
Enumerating snapshots now works after the cleanup of EOL releases.

Fixes https://issues.redhat.com/browse/COMPOSER-2263

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 17:17:19 +02:00
Tomáš Hozza
f3e83a3838 Tools/provision.sh: adjust conditional EPEL installation for el10
EPEL-10 can't be installed on any of c10s and el10. Previously, the
script would try to install EPEL repositories package on el10 and fail.

In addition, use our "workaround" repository with c10s builds of some
packages (such as koji) also on el10.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 17:17:19 +02:00
Mario Cattamo
ba60b22104 test: update ostree osname in pending test cases 2024-06-04 17:01:53 +02:00
Tomáš Hozza
4267c28ffb Tests: temporarily disable checking of valid snapshot URLs
rpmrepo snapshot enumeration is timing out, which is effectively
blocking GitLab CI from running. Disable the check for now to unblock
CI.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
0174cf5ee3 SPEC/repos: drop EOL c8s
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
88c6e63a8a Schutzfile: drop EOL c8s
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
67f383f3eb .gitlab-ci.yml: stop testing on c8s
c8s is EOL and repos don't work any more.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
6e3a41ae07 Don't run TestMultilibBlueprintDepsolveV0 on el10 / c10s
TestMultilibBlueprintDepsolveV0 unit test relies on 'gsl' package and
the availability of its 32 bit and 64 bit versions in the distribution
repositories. However, the package is no longer available in c10s /
el10. Moreover, there are no 32 bit RPMs in the repositories.
Conditionally compile the test only if 'rhel10' build tag is not
specified. Modify the SPEC file to define 'rhelX' build tag when
compiling tests on RHEL, where X is the major version.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
f9079ae39c Tools/provision.sh: add workarounds for c10s
There is no EPEL for RHEL-10 at this moment. Use our own COPR repository
with c10s builds of some packages required by our tests.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
607b65c67f Templates: update RHEL distro aliases
The latest GA releases are 8.10 and 9.4.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
b01b080565 Update 'rhel-9' distro alias to 'rhel-9.5'
New releases are landing in 9.5 already, so the on-prem version should
reflect that. The service can and does override this using a
configuration.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
695febf39c Define distro alias for 'rhel-10'
Set it to RHEL-10.0.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
f87f555362 Packit: remove EOL c8s
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
6cb4cd9012 Packit: build c9s in COPR on all arches
Build c9s RPMs in COPR for all available architectures.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
5b95e956a6 Packit: add c10s COPR builds on all arches
Build RPMs for c10s using Packit in COPR for all available
architectures.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
80f9410e7f Add c10s and el10.0 repo definitions.
Add the GA repos (which don't obviously work yet for el10.0) and RPMrepo
snapshots for testing.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
c8e8bffd99 SPEC: take c10s and el10 into consideration for repo installation
Previously, the SPEC file was written in the way that c9s and el9 were
the latest major releases of the respective distributions and as such,
they could build images for all previous major versions of the same
distro. With c10s and el10, this is no longer true. Amend the section
which installs repository definitions.

The idea is that:
 - c10s / el10 are the latest major version and can build any previous
   major version of the same distro.
 - Any cs and el distro version can build images for the same major
   version.
 - c9s can build also c8s / el9 can build also el8 images.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Tomáš Hozza
cdf0a5b8cc SPEC/-tests: don't require podman-plugins on F40+ and c10s
The sub-package has been deprecated in podman v5.0.0, which is shipped
in these distributions.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-06-04 13:03:37 +02:00
Mario Cattamo
eb3884f71a test: skip ostree-remount due to issue RHEL-25249 2024-05-31 21:10:51 +02:00
Sanne Raymaekers
4629a31f22 templates/packer: use python3.10 on fedora
Ansible on fedora 40 seems broken, the default python 3.12 interpreter
doesn't work, 3.10 works but then the dnf module breaks.

Use 3.10 and stop using the dnf module.
2024-05-31 13:55:58 +02:00
Sanne Raymaekers
22e15da73c templates/packer: use import_tasks instead of include_tasks
The tags don't get inherited through the dynamic `include_tasks`
command. Use `import_tasks` to preserve the tags.
2024-05-31 13:55:58 +02:00
Tomáš Hozza
8f36b6f26e Explicitly pass rpmlint config when calling it
New version of rpmlint stopped picking the config automatically.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2024-05-30 19:58:34 +02:00