Commit Graph

9 Commits

Author SHA1 Message Date
Owen W. Taylor
404aa33ce1 common: Check signatures when installing OCI images
Co-authored-by: Sebastian Wick <sebastian.wick@redhat.com>
2025-12-08 19:09:56 +00:00
Sebastian Wick
b486437c8e image-source: Add a method to get the summary metadata 2025-10-24 16:27:33 +00:00
Sebastian Wick
9551f7d402 image-source: Make flatpak_image_source_new public
And check that the digest is a sha256 hash.

Will be used in the next commits.
2025-10-24 16:27:33 +00:00
Owen W. Taylor
2c7b9342cc image-source: Pass token to flatpak_image_source_new_remote()
Since flatpak_image_source_new_remote() already tries to load files
from the registry, having a separate flatpak_image_source_set_token()
doesn't work - when the token is set, it's already too late to
be passed along with the initial requests.
2025-09-01 10:59:29 +00:00
Owen W. Taylor
609f0ce0a1 common: Move delta_url into the FlatpakImageSource
Instead of passing the delta URL along with the image source, when
we create an image source for a remote registry, if we find a delta
URL in the metadata, set it on the FlatpakImageSource for later use.

Centralize duplicated code for creating an image source for a remote
repository based on a summary lookup into one place.
2025-08-25 15:56:20 +00:00
Owen W. Taylor
a460dd5069 image-source: Support oci-archive: image sources
Add support for `oci-archive:` image sources by temporarily
unpacking the archive using libarchive.

Co-authored-by: Sebastian Wick <sebastian.wick@redhat.com>
2025-08-25 15:56:20 +00:00
Owen W. Taylor
dc56bda820 image-source: Add flatpak_image_source_new_for_location
Which allows one to create an image source from a container location.

It also adds a new FlatpakDockerReference to access different parts of a
docker reference and changes to FlatpakOciIndex to get a manifest for a
specific architecture.

This will become useful in the next commit when we're going to add
support for installing OCI images.
2025-08-25 15:56:20 +00:00
Owen W. Taylor
5950438ca7 image-source: Replace flatpak_oci_parse_commit_labels with getters
Instead of having one function with a pile of out arguments in
arbitrary order, add getters to FlatpakImageSource.
2025-08-25 15:56:20 +00:00
Owen W. Taylor
59ad08e78c image-source: Refactor - add FlatpakImageSource type
To avoid passing around combinations of a FlaptakOciRegistry with
repository and digest, add a FlatpakImageSource type.

This also reduces duplicated code where every place that did
this independently retrieved the repository and image config.
2025-08-25 15:56:20 +00:00