Commit graph

1008 commits

Author SHA1 Message Date
Tomáš Hozza
dc4ae989e6 cmd: delete unused osbuild-upload-* tools
These tools were usually introduced when we added new upload target
implementation to osbuild-composer. Their main purpose was manual
testing of the upload library. They don't have any real use beyond that.

With the upload code being moved to `osbuild/images` and these tools
having their duplicates in that repository, there is very little sense
in keeping them in osbuild-composer.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-14 18:34:28 +02:00
Tomáš Hozza
992c6365f0 Use gcp upload implementation from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-14 13:23:49 +02:00
Tomáš Hozza
bce2bbf9e1 Use OCI upload implementation from osbuild/images (HMS-9027)
Delete the OCI upload implementation from osbuild-composer and use
the one from osbuild/images.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-13 15:43:26 +02:00
Tomáš Hozza
3db1f88f84 internal/awscloud: use AWS.DeleteEC2Image() from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-13 09:36:58 +02:00
Tomáš Hozza
e7d8431489 internal/awscloud: use AWS.TerminateInstancesEC2() from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-13 09:36:58 +02:00
Tomáš Hozza
bd848727c2 cmd/osbuild-worker: delete the PulpOstree target support
It turned out that the upload target was never adopted by the service,
thus we are removing it as part of upload code consolidation.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 19:42:51 +02:00
Tomáš Hozza
180fd485c1 Delete cmd/osbuild-upload-pulp-ostree
The Pulp upload code is being deleted, so any callers must be deleted
first.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 19:42:51 +02:00
Tomáš Hozza
fe840e1ddf Use VMWare upload implementation from osbuild/images (HMS-9026)
Delete the VMWare upload implementation from osbuild-composer and use
the one from osbuild/images.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 16:22:36 +02:00
Tomáš Hozza
5d73c22bb5 internal/awscloud: use AWS.ShareImage() from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00
Tomáš Hozza
a3937e99ce internal/awscloud: use AWS.Register() from osbuild/images
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00
Tomáš Hozza
cba082b7ae cmd/worker: configure osbuild/images logger
With the upload code consolidation to osbuild/images, we need to make
sure to configure the logger used by the library to keep logging the
same (or similar) messages when running osbuild-composer.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-12 13:15:43 +02:00
Brian C. Lane
78e77ccdd5 tests: Update composer-cli tests for v36.0
The v36.0 release of weldr-client/composer-cli will include support for
cloudapi commands. This adjusts the tests so that they will work with
the new version while maintaining compatibility with the previous
version.

Related: RHEL-60123
2025-08-08 12:27:15 +02:00
Achilleas Koutsou
8d9f52cf1f go.mod: update osbuild/images (v0.172.0) and osbuild/blueprint (v1.12.0)
The internal blueprint implementation has been removed from
osbuild/images.  Conversion from osbuild/blueprint blueprints to
osbuild/images blueprints is no longer necessary.
2025-08-07 20:15:33 +02:00
Tomáš Hozza
19dd832876 go.mod: update osbuild/images to v0.171.0
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 16:33:15 +02:00
Tomáš Hozza
477e04eb55 Many: delete test manifests and gen-manifests command
The test manifests don't have any use in this repository, since the
osbuild-image-tests command has been removed. Likewise, generating
testing manifests is no longer needed in this repository, therefore
remove the gen-manifests command.

Manifests are being generated in the osbuild/images repository and the
necessary tooling to generate them lives there.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 10:22:55 +02:00
Tomáš Hozza
9042ee7806 Many: delete osbuild-image-tests command and related code
Delete the no longer used osbuild-images-tests command. Subsequently,
delete the /internal/boot packages, which were used only by the command
and also depended on its data structures.

Technically, no boot test were done using the code in this repository
for quite some time. And the long term plan is to boot test all images
in the osbuild/images repository.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-08-07 10:22:55 +02:00
Achilleas Koutsou
b3d1e4cf13 Makefile: bump GOLANGCI_LINT_VERSION to v1.61
v1.60 seems to have some issues [1] with something in our dependency
chain.  Update to v1.61 and fix all new issues.

New issues are all instances of potential integer overflow from int ->
uint conversions.  Added guards where appropriate and disabled the check
when when it's not needed.

[1] https://github.com/osbuild/osbuild-composer/actions/runs/16624417387/job/47037518471
2025-07-31 12:34:24 +02:00
Sanne Raymaekers
0e2daa201f many: switch to osbuild/images/pkg/upload for azure
This is part of consolidating all the upload code in images.
2025-07-29 13:10:22 +02:00
Lukas Zapletal
15ec2fc431 go.mod: update sentry
Update sentry dep and code that was required.
2025-07-28 11:44:33 +02:00
Sanne Raymaekers
d7686244cd cmd/osbuild-composer-dbjobqueue-tests: add migration test
Migration 9 alters the result column in the jobs table is relied on for
compose statuses. Because it has to be kept consistent across
migrations, add a test to verify this.

As a side effect, the test itself handles the migration now, so remove
that part from the tests GHA.
2025-07-25 13:10:10 +02:00
Michael Vogt
57813199cf osbuild-dnf-json-tests: use distrofactory to get centos-9
The test was importing `distro/rhel/rhel9` directly instead
of using the `distrofactory`. This is problematic as the go
module for `rhel9` is going away. This commit fixes this
by going via the `distrofactory` which will keep working.
2025-07-23 12:43:12 +02:00
Tomáš Hozza
3e3f9a0789 Many: move to koji upload implementation from osbuild/images
Delete the `internal/upload/koji` package and replace it with
`pkg/upload/koji` package provided by `osbuild/images`.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-14 17:20:02 +02:00
Tomáš Hozza
97c3460a94 cmd: delete osbuild-koji
Delete the osbuild-koji tools, which is not used by any code or test
case. This also allows to delete the koji.NewFromPlain() function. This
is to minimize the set of exported functions by the koji package, before
moving it to osbuild/images repository.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 22:51:53 +02:00
Tomáš Hozza
651946ae54 upload/koji: don't depend on upload target osbuild artifact structure
Modify the Koji image extra metadata to not depend on the upload target
data structure for the OSBuild Artifact. This is the last dependency on
the internal osbuild-composer package, allowing the move of the Koji
upload code to the osbuild/images repository.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 22:51:53 +02:00
Tomáš Hozza
2ceffb3796 upload/koji: don't depend on upload target results data structures
Modify the Koji image extra metadata to not depend on the upload target
data structures for upload results. The target results are supposed to
be specific to the uploader implementation, which will eventually
change. Moreover, the definition is internal to osbuild-composer, so
this would create a problem once the Koji upload implementation is moved
to osbuild/images.

The Koji upload implementation does not really care about the exact
structure of the upload results. It is just a list of JSON objects.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 22:51:53 +02:00
Tomáš Hozza
0bafc0915d upload/koji: don't depend on rpmmd.RPM for build metadata
The use of rpmmd.RPM is exclusive to the Koji upload implementation.
Consolidate the metadata structure for RPMs into the koji package
codebase, together with any required functions for converting osbuild
stage metadata. The respective code in osbuild/images will be eventually
removed.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 22:51:53 +02:00
Tomáš Hozza
ca1e1dce36 Many: factor out logger implementation from upload/koji
The upload/koji package functions were creating a logger and then were
using it. This is not ideal for a library implementation.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-07-09 22:51:53 +02:00
Lukas Zapletal
1cde7e341b common: fix unclosed logrus logging pipes 2025-07-08 11:38:27 +02:00
Sanne Raymaekers
7dea1bcd01 many: remove jobsite code
This was replaced by `cmd/osbuild-worker-executor`.
2025-06-25 03:01:59 +02:00
Lukas Zapletal
f2bf47814f deps: upgrade go-systemd from v1 to v22 2025-06-16 17:46:45 +02:00
Michael Vogt
acec29dea2 osbuild-store-dump: use distrofactory instead of importing fedora
This commit removes the direct use of `pkg/distro/fedora` and
uses `distrofactory` instead. This is the more generic interface,
it also helps with PR#1563 as `pkg/distro/fedora` goes away.

Note that I did not test this but @bcl was kind enough to
mention how this is used:
```
The output from this is used in Test_upgrade in
internal/store/json_test.go, the files there are manually
created when we change the format of the store and add a new
parser to internal/store/json.go -- which hasn't happened in
a long time :)
```
I updated the cmd/README with a snippet of the above.
2025-06-04 12:41:39 +02:00
Lukas Zapletal
0e5d8a94f2 cmd: use log in service-maintenance 2025-05-12 15:20:16 +02:00
Lukas Zapletal
46f0a71053 cmd: use log in jobsite 2025-05-12 15:20:16 +02:00
Lukas Zapletal
71117f3ccc cmd: use log in koji 2025-05-12 15:20:16 +02:00
Lukas Zapletal
650e7b64c2 cmd: use log in upload-gcp 2025-05-12 15:20:16 +02:00
Lukas Zapletal
b87d3d78ec docs: add README to cmd/ 2025-05-12 15:20:16 +02:00
Achilleas Koutsou
cf956ff5a6 Delete internal/blueprint/ and import from osbuild/blueprint
Import osbuild/blueprint v1.6.0
2025-04-17 11:17:58 +02:00
Sanne Raymaekers
536b7d95c5 go.mod: update osbuild/images to v0.123.0
Includes modularity support.
2025-03-10 17:56:19 +01:00
Tomáš Hozza
985e582953 osbuild-composer/config: update distro aliases for RHEL 9 and 10
Bump the `rhel-9` and `rhel-10` distro aliases to the next
in-development releases, because we don't plan to land any new releases
in 9.6 or 10.0.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-02-28 09:35:23 +01:00
Brian C. Lane
0256e09031 lint: Clean up golangci-lint v1.60 complaints
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.
2025-02-24 04:20:42 -08:00
Michael Vogt
35167ce83f many: update for new reporegistry.New() api (c.f. pr#1179)
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
2025-02-19 19:19:42 +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
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
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
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
d8df7e7cd4 worker: Add search job implementation to worker client
This is similar to the depsolve job, and it shares the solver (which
supports locking, as does DNF itself). This will allow searching for
specific package names, names with globs, or names as substrings of
other names using * as the wildcard.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Brian C. Lane
84c0f79286 osbuild-worker: Add helper to setup Repo SSL
This same operation will be done in a few places, turn it into a
function.

Related: RHEL-60136
2025-01-30 08:00:12 +01:00
Michael Vogt
145f8e9f8a osbuild-store-dump: port to new images API 2025-01-29 18:03:11 +01:00
Michael Vogt
e91f4ba961 gen-manifests: port to new images API 2025-01-29 18:03:11 +01:00
Michael Vogt
40011e35a2 composer: use reporegistry.New() again (see PR#4378)
This commit changes cmd/composer to use the `reporegistry.New`
call again. This is a preparation for
https://github.com/osbuild/images/pull/1179

And undoes parts of https://github.com/osbuild/osbuild-composer/pull/4378
but that is no longer necessary because in
https://github.com/osbuild/images/pull/946 the error is now passed
on from `reporegistry.New()` in the same way as from `LoadRepositories()`.
2025-01-29 13:27:32 +01:00