diff --git a/0001-strip-sha256-prefix-when-decrease-hold-references.patch b/0001-strip-sha256-prefix-when-decrease-hold-references.patch new file mode 100644 index 0000000..5c4e659 --- /dev/null +++ b/0001-strip-sha256-prefix-when-decrease-hold-references.patch @@ -0,0 +1,27 @@ +From 4ccd38e9e17534467eb1add9ee9ed357f2eb9dbd Mon Sep 17 00:00:00 2001 +From: WangFengTu +Date: Tue, 19 Oct 2021 11:14:32 +0800 +Subject: [PATCH] strip sha256 prefix when decrease hold references + +Signed-off-by: WangFengTu +--- + src/daemon/modules/image/oci/registry/registry.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/daemon/modules/image/oci/registry/registry.c b/src/daemon/modules/image/oci/registry/registry.c +index cc5f680..011533f 100644 +--- a/src/daemon/modules/image/oci/registry/registry.c ++++ b/src/daemon/modules/image/oci/registry/registry.c +@@ -1548,7 +1548,8 @@ static int fetch_all(pull_descriptor *desc) + } + free(desc->layer_of_hold_refs); + desc->layer_of_hold_refs = util_strdup_s(list->layers[j]->id); +- if (parent_chain_id != NULL && storage_dec_hold_refs(parent_chain_id) != 0) { ++ if (parent_chain_id != NULL && ++ storage_dec_hold_refs(util_without_sha256_prefix(parent_chain_id)) != 0) { + continue; + } + desc->layers[i].already_exist = true; +-- +2.25.1 + diff --git a/iSulad.spec b/iSulad.spec index 2ec7331..5f17c7d 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.0.9 -%global _release 20210625.165022.git5a088d9c +%global _release 20211019.121837.gitf067b3ce %global is_systemd 1 Name: iSulad @@ -12,6 +12,8 @@ Source: https://gitee.com/openeuler/iSulad/repository/archive/v%{version}.tar BuildRoot: {_tmppath}/iSulad-%{version} ExclusiveArch: x86_64 aarch64 +Patch0001: 0001-strip-sha256-prefix-when-decrease-hold-references.patch + %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) Provides: libisula.so()(64bit) @@ -214,6 +216,12 @@ fi %endif %changelog +* Tue Oct 19 2021 wangfengtu - 2.0.9-20211019.121837.gitf067b3ce +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: strip sha256 prefix when decrease hold references + * Fri Jun 25 2021 wujing - 2.0.9-20210625.165022.git5a088d9c - Type: update to v2.0.9 - ID: NA