Commit graph

6970 commits

Author SHA1 Message Date
Michael Vogt
a9fcf2a411 go.mod: run go mod vendor and add new repos 2025-02-13 14:00:45 +01:00
Michael Vogt
90f069c2eb many: take repositories from the "images" library
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.
2025-02-13 14:00:45 +01:00
Brian C. Lane
74638a9733 workflows: Switch utility workflows to using ubuntu-22.04
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
2025-02-12 13:42:16 +01:00
Brian C. Lane
53d50e875d workflows: Use ubuntu-22.04 for tests.yml
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.
2025-02-12 13:42:16 +01:00
schutzbot
5bfd06e4ce Post release version bump
[skip ci]
2025-02-12 12:38:21 +00:00
Tomáš Hozza
bb43578d92 osbuild-composer: bump rhel-9 distro alias to rhel-9.6
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>
2025-02-12 12:53:36 +01:00
Tomáš Hozza
758870fb15 SPEC: unconditionally undefine gomodulesmode
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>
2025-02-12 12:53:36 +01:00
Brian C. Lane
25e8bb1202 cloudapi: Fix artefact typo 2025-02-11 16:09:27 +01:00
Brian C. Lane
d47102716c v2_test: Add tests for Download
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
2025-02-11 16:09:27 +01:00
Brian C. Lane
a6f48bcd2f cloudapi: Add error information to ErrorUnknownUploadTarget
It can include useful extra details, whether or not the artifacts
directory is setup, whether the file is missing, etc.

Related: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
3781820b45 server: Return the path alongside the error from JobArtifactLocation
Even though the file isn't there it can be useful to have the full path
that it was checking for.

Related: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
d0be06278c cloudapi: Hook up the /composes/{id}/download handler
Resolves: RHEL-60142
2025-02-11 16:09:27 +01:00
Brian C. Lane
1d0d198e67 openapi: Add composes/{id}/download route
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
2025-02-11 16:09:27 +01:00
Tomáš Hozza
bdd2014c44 Add initial CODEOWNERS file
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-06 15:47:53 +01:00
Achilleas Koutsou
85e4efe966 go.mod: update to latest images@v0.115.0 2025-02-06 13:48:59 +01:00
Achilleas Koutsou
7e87d1e124 tools: revert prepare-source.sh to use downloaded go binary
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
2025-02-06 13:48:59 +01:00
Achilleas Koutsou
448b1e276d test/filesystem: print blueprint contents when creating file
Can be useful for troubleshooting and tracing test logs.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
a237447ca0 gitlab: run all versions of filesystem.sh
Run filesystem.sh with all the valid arguments for the customization
type.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
077a56b9ac test/filesystem: minor cleanups
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".
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
96269e454e test/filesystem: support various layouts
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.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
8e765ad97d test/filesystem: remove conditions on v94
Version 94 of osbuild-composer is over a year old now.  It should be
fine to test these unconditionally.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
4241c1d5a7 test/filesystem: move blueprint writing to function
Move the creation of the blueprint to a function.  We'll then add a
separate blueprint function for the new, alternative partitioning
customization.
2025-02-05 11:32:52 +01:00
Achilleas Koutsou
49271e614b blueprint: test the conversion 2025-02-05 11:32:52 +01:00
Achilleas Koutsou
68dd8699ed blueprint: add local DiskCustomization
Add DiskCustomization and all its children to the internal blueprint.
Add the conversion to the images counterpart to the Convert() function.
2025-02-05 11:32:52 +01:00
schutzbot
da9a911dea Post release version bump
[skip ci]
2025-02-05 08:12:59 +00:00
Brian C. Lane
7622a69d60 v2_test: Add a test for GetDistributionsList
Related: RHEL-60133
2025-02-04 15:15:14 -08:00
Brian C. Lane
44ac65b70c cloudapi: Add /distributions to return distro:arch:image-type
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
2025-02-04 15:15:14 -08:00
schutzbot
4b9f1a4956 schutzfile: Update snapshots to 20250201 2025-02-04 20:46:21 +01:00
schutzbot
01ad496910 Post release version bump
[skip ci]
2025-02-04 09:58:56 +00:00
Brian C. Lane
325a018c75 cloudapi: Return the compose status of all root compose jobs
This returns the status using the same structure as it does for
requesting individual statuses for the jobs.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Brian C. Lane
24b939d4c7 cloudapi: Move most of getComposeStatusImpl into a function
This will make it easier to use the status in responses.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Brian C. Lane
b2d803306c cloudapi: Add /composes route to list root job UUIDs
This will be used to list the top level job UUIDs.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Brian C. Lane
87c0462a33 jobqueue: Add AllRootJobIDs function to jobqueue
This lists the root job UUIDs (the jobs with no dependants).
Currently only implemented by fsjobqueue. The function for
dbjobqueue currently returns nil.

Related: RHEL-60120
2025-02-03 17:27:31 -08:00
Tomáš Hozza
d781b8de6d Makefile: bump golangci-lint to v1.56 for golang 1.22
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-03 19:58:37 +01:00
Tomáš Hozza
8514c95837 Update 'images' to v0.113.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-03 19:58:37 +01:00
Tomáš Hozza
b8c2e4c45c SPEC: bump minimum osbuild-dnf-json-api and osbuild version
This should have been done with the `images` bump to `v0.112.0`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-03 19:58:37 +01:00
Achilleas Koutsou
3e321e3cea go.mod: update to latest images@v0.112.0 2025-02-01 18:15:30 +01:00
Achilleas Koutsou
bec893e37c go.mod: update github.com/vmware/govmomi to v0.48.0
Needs manual change of import paths.
2025-02-01 18:14:18 +01:00
Lukas Zapletal
3a6bea380e build(deps): bump to Go 1.22 2025-01-31 16:57:31 +01:00
Lukas Zapletal
8554d6202d build: use go toolbox instead installing binary 2025-01-31 16:57:31 +01:00
Achilleas Koutsou
083d84f70c test: update all calls to image-info
Call the script without a path since it's now in the PATH.

Drop the SELinux labelling workaround (chcon) from filesystem.sh and
image_tests.sh.  The packaged tool is already labelled correctly.

Install osbuild-tools instead of osbuild-composer-tests in
regression-old-worker-new-composer.sh to get osbuild-image-info.
2025-01-31 08:22:29 +01:00
Achilleas Koutsou
58d16f662f deploy: install osbuild-tools for osbuild-image-info 2025-01-31 08:22:29 +01:00
Achilleas Koutsou
5ba4d3cf9e tools: remove image-info
The image-info tool now lives in osbuild/osbuild.
2025-01-31 08:22:29 +01:00
Achilleas Koutsou
0219b12801 spec: drop image-info from test subpackage 2025-01-31 08:22:29 +01:00
Achilleas Koutsou
e9ddb9f738 Schutzfile: update osbuild commit
Update osbuild commit ID to include image info, which now installs as
/usr/bin/osbuild-image-info.
2025-01-31 08:22:29 +01:00
Brian C. Lane
a613e8cb37 DepsolveJobResult: Remove unused Error and ErrorType
These fields are not set by the depsolve job, they are only set and used
in tests so remove them. Errors are reported in the result.JobError

Related: Related: RHEL-60125
2025-01-30 08:00:12 +01:00
Brian C. Lane
3c2b415e53 jobimpl-depsolve: Always return result
Previously it would not return a result if there was an error. This adds
a deferred function that always returns the current contents of result,
and if there is an error it logs it.

Related: RHEL-60125
2025-01-30 08:00:12 +01:00
Brian C. Lane
29f81a029a v2_test: Add a test for /search/packages
Add a new mockSearch job handler to return static results, add tests for
searching, for distro error, and for arch error.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
17bebb547c v2 tests: Make it easier to add mock handlers to newV2Server
This refactors the server setup, splitting the depsolve and ostree
resolve goroutine creation into helper functions. It also removes the
use of channels, which was always set to "" (and in the case of the
multi-tenancy test an empty list, which acts the same).

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
532f1b0396 cloudapi: Hook up the /search/packages handler
This connects all the pieces needed to implement the search.

If you POST a request to /search/packages like this:

    {
      "packages": [
        "tmux"
      ],
      "distribution": "fedora-41",
      "architecture": "x86_64"
    }

It will return details about the tmux packages that looks like this:

{
  "packages": [
    {
      "arch": "x86_64",
      "buildtime": "2024-10-10T00:19:06Z",
      "description": "tmux is ...",
      "license": "ISC AND BSD-2-Clause AND BSD-3-Clause AND SSH-short AND LicenseRef-Fedora-Public-Domain",
      "name": "tmux",
      "release": "2.fc41",
      "summary": "A terminal multiplexer",
      "url": "https://tmux.github.io/",
      "version": "3.5a"
    }
  ]
}

Resolves: RHEL-60136
2025-01-30 08:00:12 +01:00