From ad56803eba23278a237a9bf4a951f860fed31c8d Mon Sep 17 00:00:00 2001 From: Lu Jingxiao Date: Tue, 30 Sep 2025 12:42:43 +0800 Subject: [PATCH] sync patches from upstream including: 118f068e change pull registry to hub.oepkgs.net a4d1281c fix bug in ci test 0c547ede code improve 5b926bb3 fix error log for verify_cpu_realtime 7d066787 bugfix for setting cpu-rt to a negative value when env not supports cpu-rt e4aa3e0a bugfix of background execution exec error command e9f32090 bugfix for file param verify aeffc88c move shutdown handle after init module f7968674 bugfix for null pointer reference d3268eae add skip test rely on docker.io de06ee3e skip test rely on docker.io Signed-off-by: Lu Jingxiao --- 0214-skip-test-rely-on-docker.io.patch | 57 ++++++++ 0215-add-skip-test-rely-on-docker.io.patch | 45 +++++++ 0216-bugfix-for-null-pointer-reference.patch | 57 ++++++++ ...ve-shutdown-handle-after-init-module.patch | 43 ++++++ 0218-bugfix-for-file-param-verify.patch | 75 +++++++++++ ...kground-execution-exec-error-command.patch | 33 +++++ ...ng-cpu-rt-to-a-negative-value-when-e.patch | 35 +++++ ...ix-error-log-for-verify_cpu_realtime.patch | 26 ++++ 0222-code-improve.patch | 68 ++++++++++ 0223-fix-bug-in-ci-test.patch | 53 ++++++++ ...ange-pull-registry-to-hub.oepkgs.net.patch | 123 ++++++++++++++++++ iSulad.spec | 19 ++- 12 files changed, 633 insertions(+), 1 deletion(-) create mode 100644 0214-skip-test-rely-on-docker.io.patch create mode 100644 0215-add-skip-test-rely-on-docker.io.patch create mode 100644 0216-bugfix-for-null-pointer-reference.patch create mode 100644 0217-move-shutdown-handle-after-init-module.patch create mode 100644 0218-bugfix-for-file-param-verify.patch create mode 100644 0219-bugfix-of-background-execution-exec-error-command.patch create mode 100644 0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch create mode 100644 0221-fix-error-log-for-verify_cpu_realtime.patch create mode 100644 0222-code-improve.patch create mode 100644 0223-fix-bug-in-ci-test.patch create mode 100644 0224-change-pull-registry-to-hub.oepkgs.net.patch diff --git a/0214-skip-test-rely-on-docker.io.patch b/0214-skip-test-rely-on-docker.io.patch new file mode 100644 index 0000000..1e40d54 --- /dev/null +++ b/0214-skip-test-rely-on-docker.io.patch @@ -0,0 +1,57 @@ +From de06ee3e09f816bb17315289c696601af8fed4b8 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 11 Jun 2024 17:14:58 +0800 +Subject: [PATCH 01/19] skip test rely on docker.io + +Signed-off-by: zhongtao +--- + CI/test_cases/container_cases/test_data/daemon.json | 2 +- + CI/test_cases/image_cases/integration_check.sh | 2 +- + CI/test_cases/image_cases/registry.sh | 5 +++-- + 3 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/CI/test_cases/container_cases/test_data/daemon.json b/CI/test_cases/container_cases/test_data/daemon.json +index 2664c6b2..ab7d0360 100644 +--- a/CI/test_cases/container_cases/test_data/daemon.json ++++ b/CI/test_cases/container_cases/test_data/daemon.json +@@ -24,7 +24,7 @@ + "overlay2.override_kernel_check=true" + ], + "registry-mirrors": [ +- "docker.io" ++ "https://3laho3y3.mirror.aliyuncs.com" + ], + "insecure-registries": [ + ], +diff --git a/CI/test_cases/image_cases/integration_check.sh b/CI/test_cases/image_cases/integration_check.sh +index e43369e3..52468760 100755 +--- a/CI/test_cases/image_cases/integration_check.sh ++++ b/CI/test_cases/image_cases/integration_check.sh +@@ -27,7 +27,7 @@ image="busybox" + function test_image_info() + { + local ret=0 +- local uimage="docker.io/library/nats" ++ local uimage="nats" + local test="list && inspect image info test => (${FUNCNAME[@]})" + local lid + local cid +diff --git a/CI/test_cases/image_cases/registry.sh b/CI/test_cases/image_cases/registry.sh +index 9ef22377..3db3f2c1 100755 +--- a/CI/test_cases/image_cases/registry.sh ++++ b/CI/test_cases/image_cases/registry.sh +@@ -77,8 +77,9 @@ function isula_pull() + isula pull hub.c.163.com/public/centos:6.7-tools + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull hub.c.163.com/public/centos:6.7-tools failed" && ((ret++)) + +- isula pull docker.io/library/busybox:latest +- [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull docker.io/library/busybox:latest failed" && ((ret++)) ++ # Unable to pull image from docker.io without agent, skip this test ++ # isula pull docker.io/library/busybox:latest ++ # [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull docker.io/library/busybox:latest failed" && ((ret++)) + + isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox + fn_check_eq "$?" "0" "isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox" +-- +2.23.0 + diff --git a/0215-add-skip-test-rely-on-docker.io.patch b/0215-add-skip-test-rely-on-docker.io.patch new file mode 100644 index 0000000..747ed12 --- /dev/null +++ b/0215-add-skip-test-rely-on-docker.io.patch @@ -0,0 +1,45 @@ +From d3268eae02d9277e5ff154434d1bbe7d81bc6d86 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Thu, 13 Jun 2024 09:30:06 +0800 +Subject: [PATCH 02/19] add skip test rely on docker.io + +Signed-off-by: zhongtao +--- + CI/test_cases/image_cases/image_digest.sh | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh +index e30f29f0..cc8b0e48 100755 +--- a/CI/test_cases/image_cases/image_digest.sh ++++ b/CI/test_cases/image_cases/image_digest.sh +@@ -25,14 +25,14 @@ source ../helpers.sh + function test_image_with_digest() + { + local ret=0 +- local image="busybox" +- local image2="ubuntu" +- local image_digest="busybox@sha256:5cd3db04b8be5773388576a83177aff4f40a03457a63855f4b9cbe30542b9a43" ++ local image="3laho3y3.mirror.aliyuncs.com/library/busybox" ++ local image2="3laho3y3.mirror.aliyuncs.com/library/ubuntu" ++ local image_digest="3laho3y3.mirror.aliyuncs.com/library/busybox@sha256:62ffc2ed7554e4c6d360bce40bbcf196573dd27c4ce080641a2c59867e732dee" + local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." + +- isula pull docker.io/library/${image_digest} ++ isula pull ${image_digest} + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to pull image: ${image}" && return ${FAILURE} + + isula tag ${image_digest} ${image}:digest_test +@@ -71,7 +71,7 @@ function test_image_with_digest() + isula inspect -f '{{.image.repo_tags}}' ${image_digest} | grep "${image}:digest_test" + [[ $? -eq 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - image digest delete error: ${image_digest}" && ((ret++)) + +- isula pull docker.io/library/${image2}:latest ++ isula pull ${image2}:latest + [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - failed to pull image: ${image2}" && return ${FAILURE} + + digest=$(isula inspect "${image2}:latest" | grep "@sha256" | awk -F"\"" '{print $2}') +-- +2.23.0 + diff --git a/0216-bugfix-for-null-pointer-reference.patch b/0216-bugfix-for-null-pointer-reference.patch new file mode 100644 index 0000000..4faaa4c --- /dev/null +++ b/0216-bugfix-for-null-pointer-reference.patch @@ -0,0 +1,57 @@ +From f79686748aff486ddb17d6044854f899c86fb93e Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 18 Jun 2024 16:02:25 +0800 +Subject: [PATCH 03/19] bugfix for null pointer reference + +Signed-off-by: zhongtao +--- + src/daemon/entry/connect/grpc/grpc_service.cc | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) + +diff --git a/src/daemon/entry/connect/grpc/grpc_service.cc b/src/daemon/entry/connect/grpc/grpc_service.cc +index e37117ae..07309235 100644 +--- a/src/daemon/entry/connect/grpc/grpc_service.cc ++++ b/src/daemon/entry/connect/grpc/grpc_service.cc +@@ -94,14 +94,20 @@ public: + { + // Wait for the server to shutdown. Note that some other thread must be + // responsible for shutting down the server for this call to ever return. +- m_server->Wait(); ++ if (m_server != nullptr) { ++ m_server->Wait(); ++ } ++ + m_runtimeRuntimeService.Wait(); + } + + void Shutdown(void) + { +- m_server->Shutdown(); ++ if (m_server != nullptr) { ++ m_server->Shutdown(); ++ } + m_runtimeRuntimeService.Shutdown(); ++ + // Shutdown daemon, this operation should remove socket file. + for (const auto &address : m_socketPath) { + if (address.find(UNIX_SOCKET_PREFIX) == 0) { +@@ -241,10 +247,16 @@ int grpc_server_init(const struct service_arguments *args) + + void grpc_server_wait(void) + { ++ if (g_grpcserver == nullptr) { ++ return; ++ } + g_grpcserver->Wait(); + } + + void grpc_server_shutdown(void) + { ++ if (g_grpcserver == nullptr) { ++ return; ++ } + g_grpcserver->Shutdown(); + } +-- +2.23.0 + diff --git a/0217-move-shutdown-handle-after-init-module.patch b/0217-move-shutdown-handle-after-init-module.patch new file mode 100644 index 0000000..2395a27 --- /dev/null +++ b/0217-move-shutdown-handle-after-init-module.patch @@ -0,0 +1,43 @@ +From aeffc88c7cc0f776fadc7fe19b6db71fc99e763a Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Wed, 19 Jun 2024 10:17:02 +0800 +Subject: [PATCH 04/19] move shutdown handle after init module + +Signed-off-by: zhongtao +--- + src/cmd/isulad/main.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/src/cmd/isulad/main.c b/src/cmd/isulad/main.c +index 58319ad0..7c7421b4 100644 +--- a/src/cmd/isulad/main.c ++++ b/src/cmd/isulad/main.c +@@ -1648,11 +1648,6 @@ static int start_daemon_threads(char **msg) + { + int ret = -1; + +- if (new_shutdown_handler()) { +- *msg = "Create new shutdown handler thread failed"; +- goto out; +- } +- + if (events_module_init(msg) != 0) { + goto out; + } +@@ -1801,6 +1796,13 @@ int main(int argc, char **argv) + goto failure; + } + ++ // after all modules are initialized, enable the shutdown handler to ++ // prevent shutdown handler from cleaning up incompletely initialized modules. ++ if (new_shutdown_handler()) { ++ msg = "Create new shutdown handler thread failed"; ++ goto failure; ++ } ++ + #ifdef ENABLE_PLUGIN + if (start_plugin_manager()) { + msg = "Failed to init plugin_manager"; +-- +2.23.0 + diff --git a/0218-bugfix-for-file-param-verify.patch b/0218-bugfix-for-file-param-verify.patch new file mode 100644 index 0000000..07f3f2f --- /dev/null +++ b/0218-bugfix-for-file-param-verify.patch @@ -0,0 +1,75 @@ +From e9f32090179a188464466d84904bc361cbb94ebc Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Fri, 14 Jun 2024 09:55:28 +0800 +Subject: [PATCH 05/19] bugfix for file param verify + +Signed-off-by: zhongtao +--- + src/cmd/isula/base/create.c | 19 +++++++++++++++++++ + src/cmd/isula/images/load.c | 6 ++++++ + 2 files changed, 25 insertions(+) + +diff --git a/src/cmd/isula/base/create.c b/src/cmd/isula/base/create.c +index 5756e6ad..865be4ed 100644 +--- a/src/cmd/isula/base/create.c ++++ b/src/cmd/isula/base/create.c +@@ -290,6 +290,12 @@ static int append_env_variables_to_conf(const char *env_file, isula_container_co + int ret = 0; + size_t file_size; + ++ if (util_dir_exists(env_file)) { ++ COMMAND_ERROR("Env file is a directory: %s", env_file); ++ ret = -1; ++ goto out; ++ } ++ + if (!util_file_exists(env_file)) { + COMMAND_ERROR("env file not exists: %s", env_file); + ret = -1; +@@ -425,6 +431,12 @@ static int append_labels_to_conf(const char *label_file, isula_container_config_ + int ret = 0; + size_t file_size; + ++ if (util_dir_exists(label_file)) { ++ COMMAND_ERROR("Label file is a directory: %s", label_file); ++ ret = -1; ++ goto out; ++ } ++ + if (!util_file_exists(label_file)) { + COMMAND_ERROR("label file not exists: %s", label_file); + ret = -1; +@@ -2135,6 +2147,13 @@ static int create_check_env_target_file(const struct client_arguments *args) + ret = -1; + goto out; + } ++ ++ if (util_dir_exists(env_path)) { ++ COMMAND_ERROR("Env target file is a directory: %s", env_path); ++ ret = -1; ++ goto out; ++ } ++ + if (!util_file_exists(env_path)) { + goto out; + } +diff --git a/src/cmd/isula/images/load.c b/src/cmd/isula/images/load.c +index 48422438..46e04310 100644 +--- a/src/cmd/isula/images/load.c ++++ b/src/cmd/isula/images/load.c +@@ -162,6 +162,12 @@ int cmd_load_main(int argc, const char **argv) + g_cmd_load_args.file = file; + } + ++ if (util_dir_exists(g_cmd_load_args.file)) { ++ COMMAND_ERROR("Load file is a directory: %s", g_cmd_load_args.file); ++ ret = -1; ++ exit(exit_code); ++ } ++ + if (!util_file_exists(g_cmd_load_args.file)) { + COMMAND_ERROR("File %s is not exist", g_cmd_load_args.file); + exit(exit_code); +-- +2.23.0 + diff --git a/0219-bugfix-of-background-execution-exec-error-command.patch b/0219-bugfix-of-background-execution-exec-error-command.patch new file mode 100644 index 0000000..e12fb18 --- /dev/null +++ b/0219-bugfix-of-background-execution-exec-error-command.patch @@ -0,0 +1,33 @@ +From e4aa3e0a14cb428496af37d99f13543cc17a8236 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 23 Apr 2024 17:44:00 +1400 +Subject: [PATCH 06/19] bugfix of background execution exec error command + +Signed-off-by: zhongtao +--- + src/daemon/modules/runtime/isula/isula_rt_ops.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c +index 949bce7a..5ccead58 100644 +--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c ++++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c +@@ -953,6 +953,15 @@ static int get_container_process_pid(const char *workdir) + util_usleep_nointerupt(100000); + continue; + } ++ // If isulad does not read the container process pid, but isulad-shim reads the pid, ++ // and the container process exits, isulad-shim exits accordingly. ++ // At this time, exec should return true, because the container process has been created successfully ++ // and exec is successful, just because The process executes too fast causing isulad to not be read correctly ++ file_read_int(fname, &pid); ++ if (pid != 0) { ++ DEBUG("Process exit and isulad-shim exit"); ++ return pid; ++ } + ERROR("failed read pid from dead shim %s", workdir); + return -1; + } +-- +2.23.0 + diff --git a/0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch b/0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch new file mode 100644 index 0000000..86316ce --- /dev/null +++ b/0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch @@ -0,0 +1,35 @@ +From 7d066787730856e883a0578c41d723a62c014274 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 23 Apr 2024 20:52:04 +0800 +Subject: [PATCH 07/19] bugfix for setting cpu-rt to a negative value when env + not supports cpu-rt + +Signed-off-by: zhongtao +--- + src/daemon/modules/spec/verify.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/daemon/modules/spec/verify.c b/src/daemon/modules/spec/verify.c +index 2f2d3925..1869baea 100644 +--- a/src/daemon/modules/spec/verify.c ++++ b/src/daemon/modules/spec/verify.c +@@ -380,14 +380,14 @@ static int verify_cpu_realtime(const sysinfo_t *sysinfo, int64_t realtime_period + { + int ret = 0; + +- if (realtime_period > 0 && !(sysinfo->cgcpuinfo.cpu_rt_period)) { ++ if (realtime_period != 0 && !(sysinfo->cgcpuinfo.cpu_rt_period)) { + ERROR("Invalid --cpu-rt-period: Your kernel does not support cgroup rt period"); + isulad_set_error_message("Invalid --cpu-rt-period: Your kernel does not support cgroup rt period"); + ret = -1; + goto out; + } + +- if (realtime_runtime > 0 && !(sysinfo->cgcpuinfo.cpu_rt_runtime)) { ++ if (realtime_runtime != 0 && !(sysinfo->cgcpuinfo.cpu_rt_runtime)) { + ERROR("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime"); + isulad_set_error_message("Invalid --cpu-rt-period: Your kernel does not support cgroup rt runtime"); + ret = -1; +-- +2.23.0 + diff --git a/0221-fix-error-log-for-verify_cpu_realtime.patch b/0221-fix-error-log-for-verify_cpu_realtime.patch new file mode 100644 index 0000000..98675d5 --- /dev/null +++ b/0221-fix-error-log-for-verify_cpu_realtime.patch @@ -0,0 +1,26 @@ +From 5b926bb3b73d2ec85fb7edbac01389076134980a Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Tue, 28 May 2024 17:23:45 +1400 +Subject: [PATCH 08/19] fix error log for verify_cpu_realtime + +Signed-off-by: zhongtao +--- + src/daemon/modules/spec/verify.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/daemon/modules/spec/verify.c b/src/daemon/modules/spec/verify.c +index 1869baea..22a6a395 100644 +--- a/src/daemon/modules/spec/verify.c ++++ b/src/daemon/modules/spec/verify.c +@@ -389,7 +389,7 @@ static int verify_cpu_realtime(const sysinfo_t *sysinfo, int64_t realtime_period + + if (realtime_runtime != 0 && !(sysinfo->cgcpuinfo.cpu_rt_runtime)) { + ERROR("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime"); +- isulad_set_error_message("Invalid --cpu-rt-period: Your kernel does not support cgroup rt runtime"); ++ isulad_set_error_message("Invalid --cpu-rt-runtime: Your kernel does not support cgroup rt runtime"); + ret = -1; + goto out; + } +-- +2.23.0 + diff --git a/0222-code-improve.patch b/0222-code-improve.patch new file mode 100644 index 0000000..215f543 --- /dev/null +++ b/0222-code-improve.patch @@ -0,0 +1,68 @@ +From 0c547ede4927a01e11c115062d9f314cd66d7ce2 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Thu, 30 May 2024 21:30:43 +1400 +Subject: [PATCH 09/19] code improve + +Signed-off-by: zhongtao +--- + src/cmd/isula/volume/prune.c | 2 +- + src/cmd/options/opt_log.c | 2 +- + src/daemon/executor/container_cb/execution_information.c | 2 +- + src/daemon/modules/image/oci/registry_type.c | 2 +- + 4 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/cmd/isula/volume/prune.c b/src/cmd/isula/volume/prune.c +index c8d632ed..3b5bfbf1 100644 +--- a/src/cmd/isula/volume/prune.c ++++ b/src/cmd/isula/volume/prune.c +@@ -79,7 +79,7 @@ out: + + int cmd_volume_prune_main(int argc, const char **argv) + { +- int i = 0; ++ size_t i = 0; + struct isula_libutils_log_config lconf = { 0 }; + int exit_code = 1; + command_t cmd; +diff --git a/src/cmd/options/opt_log.c b/src/cmd/options/opt_log.c +index b1abcfaf..8ffb9966 100644 +--- a/src/cmd/options/opt_log.c ++++ b/src/cmd/options/opt_log.c +@@ -67,7 +67,7 @@ static int log_opt_syslog_facility(const char *key, const char *value, char **pa + "authpriv", "ftp", "local0", "local1", "local2", + "local3", "local4", "local5", "local6", "local7" + }; +- int i; ++ size_t i; + size_t f_len = sizeof(facility_values) / sizeof(const char *); + + for (i = 0; i < f_len; i++) { +diff --git a/src/daemon/executor/container_cb/execution_information.c b/src/daemon/executor/container_cb/execution_information.c +index 6489797d..217741fa 100644 +--- a/src/daemon/executor/container_cb/execution_information.c ++++ b/src/daemon/executor/container_cb/execution_information.c +@@ -249,7 +249,7 @@ static int get_proxy_env(char **proxy, const char *type) + } + *col_pos = '\0'; + nret = snprintf(*proxy, proxy_len, "%s:%s%s", tmp_proxy, mask_str, at_pos); +- if (nret < 0 || nret >= proxy_len) { ++ if (nret < 0 || (size_t)nret >= proxy_len) { + ret = -1; + free(*proxy); + *proxy = NULL; +diff --git a/src/daemon/modules/image/oci/registry_type.c b/src/daemon/modules/image/oci/registry_type.c +index 4556617f..206c58b0 100644 +--- a/src/daemon/modules/image/oci/registry_type.c ++++ b/src/daemon/modules/image/oci/registry_type.c +@@ -62,7 +62,7 @@ void free_layer_blob(layer_blob *layer) + + void free_pull_desc(pull_descriptor *desc) + { +- int i = 0; ++ size_t i = 0; + + if (desc == NULL) { + return; +-- +2.23.0 + diff --git a/0223-fix-bug-in-ci-test.patch b/0223-fix-bug-in-ci-test.patch new file mode 100644 index 0000000..f26e024 --- /dev/null +++ b/0223-fix-bug-in-ci-test.patch @@ -0,0 +1,53 @@ +From a4d1281ccc40dfc51b313d69f800049e99510600 Mon Sep 17 00:00:00 2001 +From: jikai +Date: Tue, 9 Jul 2024 12:31:49 +0000 +Subject: [PATCH 10/19] fix bug in ci test + +Signed-off-by: jikai +--- + CI/test_cases/container_cases/run.sh | 5 ++--- + CI/test_cases/helpers.sh | 5 +++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/CI/test_cases/container_cases/run.sh b/CI/test_cases/container_cases/run.sh +index 80485457..3f1607fa 100755 +--- a/CI/test_cases/container_cases/run.sh ++++ b/CI/test_cases/container_cases/run.sh +@@ -28,9 +28,8 @@ function do_test_t() + containername=test_basic_run + + tid=$(isula run --name $containername -td busybox) +- hostname=$(isula exec -it $containername hostname) +- clean_hostname=$(echo "$hostname" | sed 's/[\x01-\x1F\x7F]//g') +- fn_check_eq "${clean_hostname}" "${tid:0:12}" "default hostname is not id of container" ++ hostname=$(isula exec $containername hostname) ++ fn_check_eq "${hostname}" "${tid:0:12}" "default hostname is not id of container" + isula exec -it $containername env | grep HOSTNAME + fn_check_eq "$?" "0" "check HOSTNAME env failed" + isula stop -t 0 $tid +diff --git a/CI/test_cases/helpers.sh b/CI/test_cases/helpers.sh +index f7bb7c93..3ad024b9 100755 +--- a/CI/test_cases/helpers.sh ++++ b/CI/test_cases/helpers.sh +@@ -46,15 +46,16 @@ function cut_output_lines() { + return $retval + } + ++# use string compare to check the result + function fn_check_eq() { +- if [[ "$1" -ne "$2" ]];then ++ if [[ "x$1" != "x$2" ]];then + echo "$3" + TC_RET_T=$(($TC_RET_T+1)) + fi + } + + function fn_check_ne() { +- if [[ "$1" -eq "$2" ]];then ++ if [[ "x$1" = "x$2" ]];then + echo "$3" + TC_RET_T=$(($TC_RET_T+1)) + fi +-- +2.23.0 + diff --git a/0224-change-pull-registry-to-hub.oepkgs.net.patch b/0224-change-pull-registry-to-hub.oepkgs.net.patch new file mode 100644 index 0000000..65b7c5a --- /dev/null +++ b/0224-change-pull-registry-to-hub.oepkgs.net.patch @@ -0,0 +1,123 @@ +From 118f068e0709c1975881d45c60615b68b9328a19 Mon Sep 17 00:00:00 2001 +From: zhongtao +Date: Fri, 6 Sep 2024 17:45:58 +0800 +Subject: [PATCH 11/19] change pull registry to hub.oepkgs.net + +Signed-off-by: zhongtao +--- + CI/make-and-install.sh | 4 ++-- + .../container_cases/test_data/daemon.json | 2 +- + CI/test_cases/image_cases/image_digest.sh | 6 ++--- + CI/test_cases/image_cases/registry.sh | 22 +++++++++---------- + 4 files changed, 17 insertions(+), 17 deletions(-) + +diff --git a/CI/make-and-install.sh b/CI/make-and-install.sh +index 819f2752..73e6e3ff 100755 +--- a/CI/make-and-install.sh ++++ b/CI/make-and-install.sh +@@ -98,7 +98,7 @@ cmake -DLIB_INSTALL_DIR=${restbuilddir}/lib -DCMAKE_INSTALL_PREFIX=${restbuilddi + make -j $(nproc) + make install + sed -i 's/"log-driver": "stdout"/"log-driver": "file"/g' ${restbuilddir}/etc/isulad/daemon.json +-sed -i "/registry-mirrors/a\ \"https://3laho3y3.mirror.aliyuncs.com\"" ${restbuilddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\"" ${restbuilddir}/etc/isulad/daemon.json + + #build grpc version + cd $ISULAD_COPY_PATH +@@ -113,4 +113,4 @@ fi + make -j $(nproc) + make install + sed -i 's/"log-driver": "stdout"/"log-driver": "file"/g' ${builddir}/etc/isulad/daemon.json +-sed -i "/registry-mirrors/a\ \"https://3laho3y3.mirror.aliyuncs.com\"" ${builddir}/etc/isulad/daemon.json ++sed -i "/registry-mirrors/a\ \"https://hub.oepkgs.net\"" ${builddir}/etc/isulad/daemon.json +diff --git a/CI/test_cases/container_cases/test_data/daemon.json b/CI/test_cases/container_cases/test_data/daemon.json +index ab7d0360..20b001c0 100644 +--- a/CI/test_cases/container_cases/test_data/daemon.json ++++ b/CI/test_cases/container_cases/test_data/daemon.json +@@ -24,7 +24,7 @@ + "overlay2.override_kernel_check=true" + ], + "registry-mirrors": [ +- "https://3laho3y3.mirror.aliyuncs.com" ++ "https://hub.oepkgs.net" + ], + "insecure-registries": [ + ], +diff --git a/CI/test_cases/image_cases/image_digest.sh b/CI/test_cases/image_cases/image_digest.sh +index cc8b0e48..20774e07 100755 +--- a/CI/test_cases/image_cases/image_digest.sh ++++ b/CI/test_cases/image_cases/image_digest.sh +@@ -25,9 +25,9 @@ source ../helpers.sh + function test_image_with_digest() + { + local ret=0 +- local image="3laho3y3.mirror.aliyuncs.com/library/busybox" +- local image2="3laho3y3.mirror.aliyuncs.com/library/ubuntu" +- local image_digest="3laho3y3.mirror.aliyuncs.com/library/busybox@sha256:62ffc2ed7554e4c6d360bce40bbcf196573dd27c4ce080641a2c59867e732dee" ++ local image="hub.oepkgs.net/library/busybox" ++ local image2="hub.oepkgs.net/library/ubuntu" ++ local image_digest="hub.oepkgs.net/library/busybox@sha256:6066ca124f8c2686b7ae71aa1d6583b28c6dc3df3bdc386f2c89b92162c597d9" + local test="pull && inspect && tag image with digest test => (${FUNCNAME[@]})" + + msg_info "${test} starting..." +diff --git a/CI/test_cases/image_cases/registry.sh b/CI/test_cases/image_cases/registry.sh +index 3db3f2c1..ad3276fe 100755 +--- a/CI/test_cases/image_cases/registry.sh ++++ b/CI/test_cases/image_cases/registry.sh +@@ -81,8 +81,8 @@ function isula_pull() + # isula pull docker.io/library/busybox:latest + # [[ $? -ne 0 ]] && msg_err "${FUNCNAME[0]}:${LINENO} - --pull docker.io/library/busybox:latest failed" && ((ret++)) + +- isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox +- fn_check_eq "$?" "0" "isula pull 3laho3y3.mirror.aliyuncs.com/library/busybox" ++ isula pull hub.oepkgs.net/library/busybox ++ fn_check_eq "$?" "0" "isula pull hub.oepkgs.net/library/busybox" + + rm -f /etc/isulad/daemon.json.bak + cp /etc/isulad/daemon.json /etc/isulad/daemon.json.bak +@@ -101,7 +101,7 @@ function isula_pull() + cp /etc/isulad/daemon.json.bak /etc/isulad/daemon.json + rm -f /etc/isulad/daemon.json.bak + +- isula rmi 3laho3y3.mirror.aliyuncs.com/library/busybox ++ isula rmi hub.oepkgs.net/library/busybox + + check_valgrind_log + fn_check_eq "$?" "0" "stop isulad with check valgrind" +@@ -112,12 +112,12 @@ function isula_pull() + + function isula_login() + { +- isula login -u test -p test 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula login -u test -p test 3laho3y3.mirror.aliyuncs.com" ++ isula login -u isulaci -p iSula123 hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula login -u isulaci -p iSula123 hub.oepkgs.net" + + # double login for memory leak check +- isula login -u test -p test 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula login -u test -p test 3laho3y3.mirror.aliyuncs.com" ++ isula login -u isulaci -p iSula123 hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula login -u isulaci -p iSula123 hub.oepkgs.net" + + # use username/password to pull busybox for memmory leak check + isula pull busybox +@@ -126,12 +126,12 @@ function isula_login() + + function isula_logout() + { +- isula logout 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula logout 3laho3y3.mirror.aliyuncs.com" ++ isula logout hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula logout hub.oepkgs.net" + + # double logout for memory leak check +- isula logout 3laho3y3.mirror.aliyuncs.com +- fn_check_eq "$?" "0" "isula logout 3laho3y3.mirror.aliyuncs.com" ++ isula logout hub.oepkgs.net ++ fn_check_eq "$?" "0" "isula logout hub.oepkgs.net" + } + + function do_test_t() +-- +2.23.0 + diff --git a/iSulad.spec b/iSulad.spec index e82ba34..2019c86 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,5 +1,5 @@ %global _version 2.0.18 -%global _release 18 +%global _release 19 %global is_systemd 1 %global enable_shimv2 1 %global is_embedded 1 @@ -226,6 +226,17 @@ Patch0210: 0210-allow-env-variable-has-an-empty-value.patch Patch0211: 0211-bugfix-for-hostname-env-set-only-once.patch Patch0212: 0212-fix-bug-for-invalid-env-write.patch Patch0213: 0213-change-fork-process-exit-mode.patch +Patch0214: 0214-skip-test-rely-on-docker.io.patch +Patch0215: 0215-add-skip-test-rely-on-docker.io.patch +Patch0216: 0216-bugfix-for-null-pointer-reference.patch +Patch0217: 0217-move-shutdown-handle-after-init-module.patch +Patch0218: 0218-bugfix-for-file-param-verify.patch +Patch0219: 0219-bugfix-of-background-execution-exec-error-command.patch +Patch0220: 0220-bugfix-for-setting-cpu-rt-to-a-negative-value-when-e.patch +Patch0221: 0221-fix-error-log-for-verify_cpu_realtime.patch +Patch0222: 0222-code-improve.patch +Patch0223: 0223-fix-bug-in-ci-test.patch +Patch0224: 0224-change-pull-registry-to-hub.oepkgs.net.patch %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) @@ -470,6 +481,12 @@ fi %endif %changelog +* Tue Sep 30 2025 jingxiaolu - 2.0.18-19 +- Type: bugfix +- ID: NA +- SUG: NA +- DESC: sync patches from upstream + * Tue Jun 11 2024 zhongtao - 2.0.18-18 - Type: bugfix - ID: NA -- Gitee