diff --git a/OCI-Update-org.opencontainers.ref.name-to-org.openco.patch b/OCI-Update-org.opencontainers.ref.name-to-org.openco.patch new file mode 100644 index 0000000..45625cc --- /dev/null +++ b/OCI-Update-org.opencontainers.ref.name-to-org.openco.patch @@ -0,0 +1,64 @@ +From 0853089457a3e2ca343ea467dfc703bf99c416b9 Mon Sep 17 00:00:00 2001 +From: "Owen W. Taylor" +Date: Thu, 6 Jul 2017 17:07:08 -0400 +Subject: [PATCH] OCI: Update org.opencontainers.ref.name to + org.opencontainers.image.ref.name + +This annotation was changed in later versions of the OCI Image specification. +(See https://github.com/projectatomic/skopeo/issues/369#issuecomment-310158211) +--- + common/flatpak-json-oci.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/common/flatpak-json-oci.c b/common/flatpak-json-oci.c +index a64a0e0..718e0dc 100644 +--- a/common/flatpak-json-oci.c ++++ b/common/flatpak-json-oci.c +@@ -426,7 +426,7 @@ flatpak_oci_index_add_manifest (FlatpakOciIndex *self, + int count; + + if (desc->annotations != NULL) +- m_ref = g_hash_table_lookup (desc->annotations, "org.opencontainers.ref.name"); ++ m_ref = g_hash_table_lookup (desc->annotations, "org.opencontainers.image.ref.name"); + + if (m_ref != NULL) + flatpak_oci_index_remove_manifest (self, m_ref); +@@ -449,7 +449,7 @@ flatpak_oci_manifest_descriptor_get_ref (FlatpakOciManifestDescriptor *m) + if (m->parent.annotations == NULL) + return NULL; + +- return g_hash_table_lookup (m->parent.annotations, "org.opencontainers.ref.name"); ++ return g_hash_table_lookup (m->parent.annotations, "org.opencontainers.image.ref.name"); + } + + static int +@@ -703,7 +703,7 @@ flatpak_oci_export_annotations (GHashTable *source, + GHashTable *dest) + { + const char *keys[] = { +- "org.opencontainers.ref.name", ++ "org.opencontainers.image.ref.name", + "org.flatpak.installed-size", + "org.flatpak.download-size", + "org.flatpak.metadata", +@@ -750,7 +750,7 @@ flatpak_oci_add_annotations_for_commit (GHashTable *annotations, + GVariant *commit_data) + { + if (ref) +- add_annotation (annotations,"org.opencontainers.ref.name", ref); ++ add_annotation (annotations,"org.opencontainers.image.ref.name", ref); + + if (commit) + add_annotation (annotations,"org.flatpak.commit", commit); +@@ -809,7 +809,7 @@ flatpak_oci_parse_commit_annotations (GHashTable *annotations, + GHashTableIter iter; + gpointer _key, _value; + +- oci_ref = g_hash_table_lookup (annotations, "org.opencontainers.ref.name"); ++ oci_ref = g_hash_table_lookup (annotations, "org.opencontainers.image.ref.name"); + if (oci_ref != NULL && out_ref != NULL && *out_ref == NULL) + *out_ref = g_strdup (oci_ref); + +-- +2.13.0 + diff --git a/flatpak.spec b/flatpak.spec index edac2b2..f22dbba 100644 --- a/flatpak.spec +++ b/flatpak.spec @@ -3,7 +3,7 @@ Name: flatpak Version: 0.9.7 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Application deployment framework for desktop apps Group: Development/Tools @@ -11,6 +11,8 @@ License: LGPLv2+ URL: http://flatpak.org/ Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz +Patch0: OCI-Update-org.opencontainers.ref.name-to-org.openco.patch + BuildRequires: pkgconfig(fuse) BuildRequires: pkgconfig(gio-unix-2.0) BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.40.0 @@ -104,7 +106,7 @@ This package contains libflatpak. %prep -%setup -q +%autosetup -S git %build @@ -197,6 +199,9 @@ flatpak remote-list --system &> /dev/null || : %changelog +* Thu Jul 6 2017 Owen Taylor - 0.9.7-2 +- Add a patch to fix OCI refname annotation + * Sat Jul 01 2017 David King - 0.9.7-1 - Update to 0.9.7 (#1466970)