!299 update version to v2.0.12

From: @wangfengtu 
Reviewed-by: @duguhaotian 
Signed-off-by: @duguhaotian
This commit is contained in:
openeuler-ci-bot 2022-03-26 01:27:54 +00:00 committed by Gitee
commit aac8541499
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 8 additions and 1411 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,93 +0,0 @@
From 479c9aa76830236abb135558b57363f8226dba2e Mon Sep 17 00:00:00 2001
From: WangFengTu <wangfengtu@huawei.com>
Date: Sat, 26 Feb 2022 08:55:51 +0800
Subject: [PATCH 2/2] let isulad root path configable when userns-remap
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
src/cmd/isulad/main.c | 16 ++++++++--------
src/daemon/modules/runtime/engines/engine.c | 10 +++++++---
2 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/src/cmd/isulad/main.c b/src/cmd/isulad/main.c
index b6132e12..b4e25988 100644
--- a/src/cmd/isulad/main.c
+++ b/src/cmd/isulad/main.c
@@ -695,7 +695,7 @@ static int update_graph_for_userns_remap(struct service_arguments *args)
goto out;
}
- nret = snprintf(graph, sizeof(graph), "%s/%d.%d", ISULAD_ROOT_PATH, host_uid, host_gid);
+ nret = snprintf(graph, sizeof(graph), "%s/%d.%d", args->json_confs->graph, host_uid, host_gid);
if (nret < 0 || (size_t)nret >= sizeof(graph)) {
ERROR("Path is too long");
ret = -1;
@@ -1154,6 +1154,7 @@ static int isulad_server_pre_init(const struct service_arguments *args, const ch
{
int ret = 0;
char* userns_remap = conf_get_isulad_userns_remap();
+ mode_t mode = CONFIG_DIRECTORY_MODE;
if (check_and_save_pid(args->json_confs->pidfile) != 0) {
ERROR("Failed to save pid");
@@ -1172,19 +1173,18 @@ static int isulad_server_pre_init(const struct service_arguments *args, const ch
goto out;
}
- if (util_mkdir_p(args->json_confs->graph, CONFIG_DIRECTORY_MODE) != 0) {
+ if (userns_remap != NULL) {
+ mode = USER_REMAP_DIRECTORY_MODE;
+ }
+
+ ret = util_mkdir_p(args->json_confs->graph, mode);
+ if (ret != 0) {
ERROR("Unable to create root directory %s.", args->json_confs->graph);
ret = -1;
goto out;
}
if (userns_remap != NULL) {
- if (chmod(ISULAD_ROOT_PATH, USER_REMAP_DIRECTORY_MODE) != 0) {
- ERROR("Failed to chmod isulad root dir '%s' for user remap", ISULAD_ROOT_PATH);
- ret = -1;
- goto out;
- }
-
if (set_file_owner_for_userns_remap(args->json_confs->graph, userns_remap) != 0) {
ERROR("Unable to change root directory %s owner for user remap.", args->json_confs->graph);
ret = -1;
diff --git a/src/daemon/modules/runtime/engines/engine.c b/src/daemon/modules/runtime/engines/engine.c
index ff010dff..648711eb 100644
--- a/src/daemon/modules/runtime/engines/engine.c
+++ b/src/daemon/modules/runtime/engines/engine.c
@@ -123,7 +123,8 @@ static int create_engine_root_path(const char *path)
int ret = -1;
char *tmp_path = NULL;
char *p = NULL;
- char *userns_remap = NULL;
+ char *userns_remap = conf_get_isulad_userns_remap();
+ mode_t mode = CONFIG_DIRECTORY_MODE;
if (path == NULL) {
return ret;
@@ -134,12 +135,15 @@ static int create_engine_root_path(const char *path)
goto out;
}
- if (util_mkdir_p(path, CONFIG_DIRECTORY_MODE) != 0) {
+ if (userns_remap != NULL) {
+ mode = USER_REMAP_DIRECTORY_MODE;
+ }
+
+ if (util_mkdir_p(path, mode) != 0) {
ERROR("Unable to create engine root path: %s", path);
goto out;
}
- userns_remap = conf_get_isulad_userns_remap();
if (userns_remap != NULL) {
if (set_file_owner_for_userns_remap(path, userns_remap) != 0) {
ERROR("Unable to change directory %s owner for user remap.", path);
--
2.25.1

View File

@ -1,28 +0,0 @@
From bb80d2ee9612ae4a80d4ee6d78a44410c2a63370 Mon Sep 17 00:00:00 2001
From: WangFengTu <wangfengtu@huawei.com>
Date: Thu, 17 Mar 2022 10:41:19 +0800
Subject: [PATCH] fix uid/gid error when load image
Signed-off-by: WangFengTu <wangfengtu@huawei.com>
---
src/utils/tar/util_archive.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/utils/tar/util_archive.c b/src/utils/tar/util_archive.c
index afb84a37..5d6ae717 100644
--- a/src/utils/tar/util_archive.c
+++ b/src/utils/tar/util_archive.c
@@ -524,8 +524,8 @@ int archive_unpack_handler(const struct io_read_wrapper *content, const struct a
try_to_replace_exited_dst(dst_path, entry);
- archive_entry_set_uid(entry, options->uid);
- archive_entry_set_gid(entry, options->gid);
+ archive_entry_set_uid(entry, archive_entry_uid(entry) + options->uid);
+ archive_entry_set_gid(entry, archive_entry_gid(entry) + options->gid);
ret = archive_write_header(ext, entry);
if (ret != ARCHIVE_OK) {
--
2.25.1

View File

@ -1,52 +0,0 @@
From b8dd3ac283e66ff10f292224dc90cd90d1d422f2 Mon Sep 17 00:00:00 2001
From: haozi007 <liuhao27@huawei.com>
Date: Thu, 17 Mar 2022 07:36:50 +0000
Subject: [PATCH] remove unnecessary wrong message
Signed-off-by: haozi007 <liuhao27@huawei.com>
---
.../modules/image/oci/storage/image_store/image_store.c | 8 +-------
src/utils/cutils/utils_regex.c | 1 +
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/src/daemon/modules/image/oci/storage/image_store/image_store.c b/src/daemon/modules/image/oci/storage/image_store/image_store.c
index 288d7bd7..727991fe 100644
--- a/src/daemon/modules/image/oci/storage/image_store/image_store.c
+++ b/src/daemon/modules/image/oci/storage/image_store/image_store.c
@@ -1999,7 +1999,6 @@ out:
static bool validate_digest(const char *digest)
{
bool ret = true;
- const char *digest_patten = "^[a-z0-9]+(?:[.+_-][a-z0-9]+)*:[a-zA-Z0-9=_-]+$";
const char *sha256_encode_patten = "^[a-f0-9]{64}$";
char *value = util_strdup_s(digest);
char *index = strchr(value, ':');
@@ -2019,12 +2018,7 @@ static bool validate_digest(const char *digest)
encode = index;
// Currently only support SHA256 algorithm
if (strcmp(alg, "sha256") != 0) {
- if (util_reg_match(digest_patten, digest) != 0) {
- INFO("Invalid checksum digest format");
- ret = false;
- goto out;
- }
- ERROR("Unsupported digest algorithm");
+ DEBUG("Unsupported digest algorithm: %s", alg);
ret = false;
goto out;
}
diff --git a/src/utils/cutils/utils_regex.c b/src/utils/cutils/utils_regex.c
index b17ec5f3..7f7384bd 100644
--- a/src/utils/cutils/utils_regex.c
+++ b/src/utils/cutils/utils_regex.c
@@ -26,6 +26,7 @@
#include "utils_string.h"
/*
+ * do not support greedy matching, like: '(:?xx)'
* return value:
* -1 failed
* 0 match
--
2.20.1

View File

@ -1,5 +1,5 @@
%global _version 2.0.11
%global _release 6
%global _version 2.0.12
%global _release 1
%global is_systemd 1
%global enable_shimv2 1
%global is_embedded 1
@ -13,11 +13,6 @@ URL: https://gitee.com/openeuler/iSulad
Source: https://gitee.com/openeuler/iSulad/repository/archive/v%{version}.tar.gz
BuildRoot: {_tmppath}/iSulad-%{version}
Patch0001: 0001-iSulad-Add-the-function-of-isolating-the-user-namesp.patch
Patch0002: 0002-let-isulad-root-path-configable-when-userns-remap.patch
Patch0003: 0003-fix-uid-gid-error-when-load-image.patch
Patch0004: 0004-remove-unnecessary-wrong-message.patch
%ifarch x86_64 aarch64
Provides: libhttpclient.so()(64bit)
Provides: libisula.so()(64bit)
@ -244,6 +239,12 @@ fi
%endif
%changelog
* Fri Mar 25 2022 wangfengtu <wangfengtu@huawei.com> - 2.0.12-1
- Type: bugfix
- ID: NA
- SUG: NA
- DESC: update version to v2.0.12
* Thu Mar 17 2022 haozi007 <liuhao27@huawei.com> - 2.0.11-6
- Type: bugfix
- ID: NA

Binary file not shown.