diff --git a/common/flatpak-dir.c b/common/flatpak-dir.c index c8c28db2..34e25630 100644 --- a/common/flatpak-dir.c +++ b/common/flatpak-dir.c @@ -12931,9 +12931,13 @@ _flatpak_dir_get_remote_state (FlatpakDir *self, return NULL; } + /* For OCI remotes, the collection ID is local configuration only: + * In the future we could add it to the index format. + */ if (state->collection_id != NULL && state->summary != NULL && - !_validate_summary_for_collection_id (state->summary, state->collection_id, error)) + !(flatpak_dir_get_remote_oci (self, state->remote_name) || + _validate_summary_for_collection_id (state->summary, state->collection_id, error))) return NULL; if (flatpak_dir_get_remote_oci (self, remote_or_uri)) diff --git a/common/flatpak-repo-utils.c b/common/flatpak-repo-utils.c index cfe048a4..21348ee4 100644 --- a/common/flatpak-repo-utils.c +++ b/common/flatpak-repo-utils.c @@ -2929,7 +2929,10 @@ flatpak_parse_repofile (const char *remote_name, FLATPAK_REPO_COLLECTION_ID_KEY); if (collection_id != NULL) { - if (gpg_key == NULL) + /* We don't support signatures for OCI remotes, but Collection ID's are + * still useful for preinstallation. + */ + if (gpg_key == NULL && !g_str_has_prefix (uri, "oci+")) { flatpak_fail_error (error, FLATPAK_ERROR_INVALID_DATA, _("Collection ID requires GPG key to be provided")); return NULL;