Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make OCI support in Flatpak labels-only #3192

Open
owtaylor opened this issue Oct 23, 2019 · 1 comment
Open

Make OCI support in Flatpak labels-only #3192

owtaylor opened this issue Oct 23, 2019 · 1 comment
Labels

Comments

@owtaylor
Copy link
Contributor

For our purposes, storing Flatpak metadata in labels in the OCI image is strictly better than annotations, because it allows compatibility with registries and other systems that can only handle docker v2 images, and not OCI images. We don't know any reason that annotations are practically better - it seems unlikely that label support will be dropped from any OCI-supporting system in the foreseeable future, even if annotations were designed as a label replacement.

The current development code tries to handle both annotations and labels, but that means that we need a flag at OCI bundle creation time and even less conveniently, we need a flag when adding a oci+https:// remote - currently done by using an URL ...?index=labels.

OCI's are not widely deployed, and in fact, the only place we need to worry about compatibility is when an older Flatpak client accesses Flatpaks from registry.fedoraproject.org. Given that, we could get considerable simplification by making Flatpak only generate and consume images with metadata in the labels, and handle compatibility Fedora-side, by:

  • Making the build system turn label-only Flatpaks into annotation+label Flatpaks
  • Making registry.fedoraproject.org server up two static indexes, one when the client asks for ?label:org.flatpak.ref:exists and one when the client asks for ?annotation:org.flatpak.ref:exists.
  • In those indexes, only include the Flatpak annotations when the client asks for annotations, and only include the Flatpak labels when the client asks for labels, to avoid doubling the index size.
@alexlarsson
Copy link
Member

@owtaylor What is the status for this in fedora? Are we currently generating labels?

owtaylor added a commit to owtaylor/flatpak-module-tools that referenced this issue May 10, 2024
Instead of assuming that the source image has annotations, handle
the case where the source image only has labels as well. Our new
plan is that Flaptak 1.6 will break strict backwards compatibility
and only generate images with metadata in labels.
(See flatpak/flatpak#3192)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants