Rewrite container handling internals to drop graphdriver and gpgme dependencies [RHEL-56367] - #2607
Open
achilleas-k wants to merge 18 commits into
Open
Rewrite container handling internals to drop graphdriver and gpgme dependencies [RHEL-56367]#2607achilleas-k wants to merge 18 commits into
achilleas-k wants to merge 18 commits into
Conversation
achilleas-k
force-pushed
the
drop-dep/containers-image/part2
branch
6 times, most recently
from
August 20, 2026 19:01
540ac2e to
5bf4948
Compare
Set up the test container registry using github.com/distribution/distribution. This delegates more of the registry handling to third party libraries, but will allow us to build a more complete test registry so we can test both pushing and resolving.
Add a method to the new registry that adds a manifest list with 4 random images for testing.
Rewrite the resolver tests to use the new test registry functionality.
Return the image IDs that were created by the PopulateWithManifestList() function alongside the digests for the new images.
Rewrite the container client tests to use the new test registry functionality.
Rewrite the blocking resolver tests to use the new test registry functionality.
Adapt the blocking resolver test that resolves multiple containers at once to test the async resolver as well.
Drop the old registry implementation that maintained its own internal container repositories. Everything is handled by the new implementation now.
Use the new testregistry to upload a container using osbuild-upload-container and verify that it was uploaded successfully by resolving the container using our own resolver. The main() function of the osbuild-upload-resolver is split into an upload() function that does the main work so it can be testable. The main() function now only handles command line flags and then calls into the new function.
Support starting the registry with basic auth (username and password).
Test uploading a container with credentials (username and password).
Rewrite the container UploadImage() function to shell out to skopeo copy. It takes care of all the options we currently support by converting them to command line options. The functionality is tested by the new osbuild-upload-container tests.
Drop the parseImageName() function and the policy property of the client. They're not needed anymore.
On RHEL and CentOS, the exclude_graphdriver_btrfs tag was needed to compile without support for the btrfs driver from the containers/image dependency. That dependency is now gone and we don't need to specify the tag anymore. The same goes for the other graphdrivers: devicemapper and overlay. Even though we could support those on the two distros, we sometimes specified them to avoid needing the devel package dependency installed.
The containers/image pgp dependency is also gone.
Remove btrfs-progs-devel, device-mapper-devel, and gpgme-devel from the dependency install script.
Remove mentions of btrfs-progs-devel and device-mapper-devel. Also remove mentions of cmd/build. This README should be replaced by the Image Builder readme soon. See HMS-10586
Remove all mentions of: - gpgme-devel - btrfs-progs-devel - device-mapper-devel
achilleas-k
force-pushed
the
drop-dep/containers-image/part2
branch
from
August 20, 2026 19:05
5bf4948 to
5236abc
Compare
Member
Author
|
copr builds are failing on |
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR rewrites container-related things in order to drop our dependency on graphdrivers and gpgme. It finishes the work I started in #2346, where I changed the container resolver internals to use
skopeo.Changes in this PR, in order:
osbuild-upload-containerwith the new test registry. The upload code wasn't being tested at all before, so any testing here is an improvement.osbuild-upload-containerto useskopeo copyinternally.With these rewrites, we rely on
skopeofor almost all of our interactions with container registries, which means we don't depend on any of the filesystem libraries or gpgme.