Add a patch to fix OCI refname annotation
This commit is contained in:
parent
ea573cb190
commit
a55fbeca42
64
OCI-Update-org.opencontainers.ref.name-to-org.openco.patch
Normal file
64
OCI-Update-org.opencontainers.ref.name-to-org.openco.patch
Normal file
@ -0,0 +1,64 @@
|
|||||||
|
From 0853089457a3e2ca343ea467dfc703bf99c416b9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Owen W. Taylor" <otaylor@fishsoup.net>
|
||||||
|
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
|
||||||
|
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: flatpak
|
Name: flatpak
|
||||||
Version: 0.9.7
|
Version: 0.9.7
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: Application deployment framework for desktop apps
|
Summary: Application deployment framework for desktop apps
|
||||||
|
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
@ -11,6 +11,8 @@ License: LGPLv2+
|
|||||||
URL: http://flatpak.org/
|
URL: http://flatpak.org/
|
||||||
Source0: https://github.com/flatpak/flatpak/releases/download/%{version}/%{name}-%{version}.tar.xz
|
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(fuse)
|
||||||
BuildRequires: pkgconfig(gio-unix-2.0)
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||||
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.40.0
|
BuildRequires: pkgconfig(gobject-introspection-1.0) >= 1.40.0
|
||||||
@ -104,7 +106,7 @@ This package contains libflatpak.
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%autosetup -S git
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
@ -197,6 +199,9 @@ flatpak remote-list --system &> /dev/null || :
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Jul 27 2017 Owen Taylor <otaylor@redhat.com> - 0.9.7-3
|
||||||
|
- Add a patch to fix OCI refname annotation
|
||||||
|
|
||||||
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-2
|
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.7-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user