diff --git a/0001-isulad-shim-fix-probabilistic-bad-fd.patch b/0001-isulad-shim-fix-probabilistic-bad-fd.patch deleted file mode 100644 index caf3d61..0000000 --- a/0001-isulad-shim-fix-probabilistic-bad-fd.patch +++ /dev/null @@ -1,157 +0,0 @@ -From 5fc7f3cd19ef0f22f47d31e45bf7d103568d1ae2 Mon Sep 17 00:00:00 2001 -From: leizhongkai -Date: Thu, 18 Jun 2020 12:06:12 +0800 -Subject: [PATCH 01/12] isulad-shim: fix probabilistic bad fd - -1. fix `epoll_ctl()` probabilistic returns bad fd when the epfd not read -2. fix typos - -Signed-off-by: leizhongkai ---- - src/cmd/isulad-shim/process.c | 36 +++++++++++++++++++++++------------ - src/cmd/isulad-shim/process.h | 1 + - 2 files changed, 25 insertions(+), 12 deletions(-) - -diff --git a/src/cmd/isulad-shim/process.c b/src/cmd/isulad-shim/process.c -index cf31535..da9bdb6 100644 ---- a/src/cmd/isulad-shim/process.c -+++ b/src/cmd/isulad-shim/process.c -@@ -242,7 +242,7 @@ static void* task_io_copy(void *data) - - for (;;) { - memset(buf, 0, DEFAULT_IO_COPY_BUF); -- sem_wait(&(io_thd->sem_thd)); -+ (void)sem_wait(&(io_thd->sem_thd)); - if (io_thd->is_stdin && io_thd->shutdown) { - break; - } -@@ -295,10 +295,10 @@ static void do_io_copy(int fd, uint32_t event, void *data) - } - - if (event & EPOLLIN) { -- sem_post(&thd->sem_thd); -+ (void)sem_post(&thd->sem_thd); - } else if (event & EPOLLHUP) { - thd->shutdown = true; -- sem_post(&thd->sem_thd); -+ (void)sem_post(&thd->sem_thd); - } - - return; -@@ -325,7 +325,7 @@ static int process_io_start(process_t *p, int std_id) - if (io_thd == NULL) { - goto failure; - } -- if (sem_init(&io_thd->sem_thd, 0, 0) == -1) { -+ if (sem_init(&io_thd->sem_thd, 0, 0) != 0) { - write_message(g_log_fd, ERR_MSG, "sem init failed:%d", SHIM_SYS_ERR(errno)); - goto failure; - } -@@ -373,7 +373,7 @@ static int start_io_copy_threads(process_t *p) - return SHIM_OK; - } - --static void destory_io_thread(process_t *p, int std_id) -+static void destroy_io_thread(process_t *p, int std_id) - { - io_thread_t *io_thd = p->io_threads[std_id]; - if (io_thd == NULL) { -@@ -381,7 +381,7 @@ static void destory_io_thread(process_t *p, int std_id) - } - - io_thd->shutdown = true; -- sem_post(&io_thd->sem_thd); -+ (void)sem_post(&io_thd->sem_thd); - pthread_join(io_thd->tid, NULL); - if (io_thd->ioc != NULL) { - free(io_thd->ioc); -@@ -422,7 +422,7 @@ static int connect_to_isulad(process_t *p, int std_id, const char *isulad_stdio, - } - - // if no I/O source is available, the I/O thread nead to be destroyed -- destory_io_thread(p, std_id); -+ destroy_io_thread(p, std_id); - - return SHIM_OK; - } -@@ -461,7 +461,7 @@ static void* task_console_accept(void *data) - } - - // if the terminal is used, we do not need to active the io copy of stderr pipe -- destory_io_thread(ac->p, stdid_err); -+ destroy_io_thread(ac->p, stdid_err); - - out: - // release listen socket -@@ -491,6 +491,7 @@ static void* task_io_loop(void *data) - write_message(g_log_fd, ERR_MSG, "epoll create failed:%d", SHIM_SYS_ERR(errno)); - exit(EXIT_FAILURE); - } -+ (void)sem_post(&p->sem_mainloop); - - // begin wait - while (1) { -@@ -762,11 +763,15 @@ process_t* new_process(char *id, char *bundle, char *runtime) - if (p == NULL) { - return NULL; - } -+ -+ ret = sem_init(&p->sem_mainloop, 0, 0); -+ if (ret != 0) { -+ goto failure; -+ } -+ - ret = terminal_init(&(p->terminal), p_state); - if (ret != SHIM_OK) { -- free(p); -- p = NULL; -- return p; -+ goto failure; - } - - p->id = id; -@@ -786,6 +791,11 @@ process_t* new_process(char *id, char *bundle, char *runtime) - } - - return p; -+ -+failure: -+ free(p); -+ p = NULL; -+ return NULL; - } - - int open_io(process_t *p) -@@ -813,6 +823,8 @@ int process_io_init(process_t *p) - if (ret != SHIM_OK) { - return SHIM_SYS_ERR(errno); - } -+ (void)sem_wait(&p->sem_mainloop); -+ (void)sem_destroy(&p->sem_mainloop); - - return SHIM_OK; - } -@@ -1087,7 +1099,7 @@ int process_signal_handle_routine(process_t *p) - (void)write_nointr(p->exit_fd, &status, sizeof(int)); - } - for (i = 0; i < 3; i ++) { -- destory_io_thread(p, i); -+ destroy_io_thread(p, i); - } - return status; - } -diff --git a/src/cmd/isulad-shim/process.h b/src/cmd/isulad-shim/process.h -index 6d0fb19..71bc20c 100644 ---- a/src/cmd/isulad-shim/process.h -+++ b/src/cmd/isulad-shim/process.h -@@ -75,6 +75,7 @@ typedef struct process { - stdio_t *shim_io; - io_thread_t *io_threads[3];// stdin,stdout,stderr - shim_client_process_state *state; -+ sem_t sem_mainloop; - } process_t; - - typedef struct { --- -2.20.1 - diff --git a/0002-iSulad-resolve-coredump-of-isula-inspect.patch b/0002-iSulad-resolve-coredump-of-isula-inspect.patch deleted file mode 100644 index e358bf2..0000000 --- a/0002-iSulad-resolve-coredump-of-isula-inspect.patch +++ /dev/null @@ -1,37 +0,0 @@ -From e822b71ddcc50611e0718304ab2f93e41632ca66 Mon Sep 17 00:00:00 2001 -From: jikui -Date: Tue, 23 Jun 2020 20:59:09 +0800 -Subject: [PATCH 02/12] iSulad: resolve coredump of isula inspect "" - -Signed-off-by: jikui ---- - src/cmd/isula/information/inspect.c | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/src/cmd/isula/information/inspect.c b/src/cmd/isula/information/inspect.c -index e9b6ff6..fe011ad 100644 ---- a/src/cmd/isula/information/inspect.c -+++ b/src/cmd/isula/information/inspect.c -@@ -199,8 +199,9 @@ static int client_inspect_container(const struct isula_inspect_request *request, - - ret = ops->container.inspect(request, response, config); - if (ret != 0) { -- if ((strstr(response->errmsg, "Inspect invalid name") != NULL) || -- (strstr(response->errmsg, "No such image or container or accelerator") != NULL)) { -+ if ((response->errmsg != NULL) && -+ (strstr(response->errmsg, "Inspect invalid name") != NULL || -+ strstr(response->errmsg, "No such image or container or accelerator") != NULL)) { - return CONTAINER_NOT_FOUND; - } - -@@ -814,6 +815,7 @@ int cmd_inspect_main(int argc, const char **argv) - free(filter_string); - - if (status) { -+ COMMAND_ERROR("Inspec error: No such object:%s", g_cmd_inspect_args.name); - exit(ECOMMON); - } - exit(EXIT_SUCCESS); --- -2.20.1 - diff --git a/0003-Add-Pull-Request-Template-And-Issue-Template.patch b/0003-Add-Pull-Request-Template-And-Issue-Template.patch deleted file mode 100644 index 1d02dcc..0000000 --- a/0003-Add-Pull-Request-Template-And-Issue-Template.patch +++ /dev/null @@ -1,120 +0,0 @@ -From edcab5958f38a7924700fa39b9142ad21062c79b Mon Sep 17 00:00:00 2001 -From: wujing -Date: Wed, 24 Jun 2020 11:11:45 +0800 -Subject: [PATCH 03/12] Add Pull Request Template And Issue Template - -Signed-off-by: wujing ---- - .gitee/ISSUE_TEMPLATE.en.md | 13 +++++++++++++ - .gitee/ISSUE_TEMPLATE.zh-CN.md | 16 ++++++++++++++++ - .gitee/PULL_REQUEST_TEMPLATE.en.md | 16 ++++++++++++++++ - .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md | 15 +++++++++++++++ - .gitignore | 3 +++ - 5 files changed, 63 insertions(+) - create mode 100644 .gitee/ISSUE_TEMPLATE.en.md - create mode 100644 .gitee/ISSUE_TEMPLATE.zh-CN.md - create mode 100644 .gitee/PULL_REQUEST_TEMPLATE.en.md - create mode 100644 .gitee/PULL_REQUEST_TEMPLATE.zh-CN.md - -diff --git a/.gitee/ISSUE_TEMPLATE.en.md b/.gitee/ISSUE_TEMPLATE.en.md -new file mode 100644 -index 0000000..a00edf1 ---- /dev/null -+++ b/.gitee/ISSUE_TEMPLATE.en.md -@@ -0,0 +1,13 @@ -+## [DT/Function Test/Code Review] -+ -+### What version of iSulad and which branch are you using? -+ -+ -+### What operating system (Linux, Windows,...) and version? What compiler are you using? -+ -+ -+### What did you do and what did you see? -+ -+ -+### What did you expect to see? -+ -diff --git a/.gitee/ISSUE_TEMPLATE.zh-CN.md b/.gitee/ISSUE_TEMPLATE.zh-CN.md -new file mode 100644 -index 0000000..aac2216 ---- /dev/null -+++ b/.gitee/ISSUE_TEMPLATE.zh-CN.md -@@ -0,0 +1,16 @@ -+## 【开发者测试/功能测试/代码检视】 -+ -+### iSula版本信息及项目分支 -+ -+ -+ -+### 操作系统版本及编译器版本 -+ -+ -+ -+### 问题描述及重现步骤 -+ -+ -+ -+### 预期结果 -+ -diff --git a/.gitee/PULL_REQUEST_TEMPLATE.en.md b/.gitee/PULL_REQUEST_TEMPLATE.en.md -new file mode 100644 -index 0000000..911ad96 ---- /dev/null -+++ b/.gitee/PULL_REQUEST_TEMPLATE.en.md -@@ -0,0 +1,16 @@ -+### Description -+ -+### Related Issue -+ -+### Type of change -+ -+- Bug Fix -+- New Feature -+- Breaking Change -+- Code Refactoring -+- Interface Change -+- Documentation Update -+ -+### Test Case -+ -+### Validation Report -diff --git a/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md -new file mode 100644 -index 0000000..a842cab ---- /dev/null -+++ b/.gitee/PULL_REQUEST_TEMPLATE.zh-CN.md -@@ -0,0 +1,15 @@ -+### 描述 -+ -+### 关联issue -+ -+### 修改类型 -+ -+- 问题修复 -+- 新特性开发 -+- 代码重构 -+- 接口变更 -+- 文档更新 -+ -+### 测试用例 -+ -+### 验证报告 -diff --git a/.gitignore b/.gitignore -index 11cbe8e..7e1bcf6 100644 ---- a/.gitignore -+++ b/.gitignore -@@ -2,7 +2,10 @@ build - *.pyc - .deps - .dirstamp -+.clangd - GPATH - GRTAGS - GTAGS - iSula-libutils -+compile_commands.json -+tags --- -2.20.1 - diff --git a/0004-fix-bug-of-creating-symlink-for-etc-mtab-when-etc-sy.patch b/0004-fix-bug-of-creating-symlink-for-etc-mtab-when-etc-sy.patch deleted file mode 100644 index 0567454..0000000 --- a/0004-fix-bug-of-creating-symlink-for-etc-mtab-when-etc-sy.patch +++ /dev/null @@ -1,59 +0,0 @@ -From 3907941db7dc79e980a26639c17e05d1d0ab912a Mon Sep 17 00:00:00 2001 -From: gaohuatao -Date: Tue, 23 Jun 2020 06:40:17 -0400 -Subject: [PATCH 04/12] fix bug of creating symlink for /etc/mtab when /etc - symlink exists - -Signed-off-by: gaohuatao ---- - src/services/execution/execute/execution.c | 23 ++++++++++------------ - 1 file changed, 10 insertions(+), 13 deletions(-) - -diff --git a/src/services/execution/execute/execution.c b/src/services/execution/execute/execution.c -index 19b6a75..4ffcde7 100644 ---- a/src/services/execution/execute/execution.c -+++ b/src/services/execution/execute/execution.c -@@ -818,30 +818,27 @@ static int create_mtab_link(const oci_runtime_spec *oci_spec) - goto out; - } - -- if (!util_dir_exists(dir)) { -- ret = util_mkdir_p(dir, ETC_FILE_MODE); -- if (ret != 0) { -- ERROR("Unable to create mtab directory %s.", dir); -- goto out; -- } -+ if (unlink(dir) != 0) { -+ WARN("Failed to delete \"%s\": %s", dir, strerror(errno)); - } - - if (util_file_exists(slink)) { - goto out; - } - -- ret = symlink(pathname, slink); -- if (ret < 0 && errno != EEXIST) { -- if (errno == EROFS) { -- WARN("Failed to create link %s for target %s. Read-only filesystem", slink, pathname); -- } else { -- SYSERROR("Failed to create \"%s\"", slink); -+ if (!util_dir_exists(dir)) { -+ if (util_mkdir_p(dir, ETC_FILE_MODE) != 0) { - ret = -1; -+ ERROR("Unable to create mtab directory %s.", dir); - goto out; - } - } - -- ret = 0; -+ if (symlink(pathname, slink) != 0) { -+ ret = -1; -+ SYSERROR("Failed to create \"%s\"", slink); -+ goto out; -+ } - - out: - free(slink); --- -2.20.1 - diff --git a/0005-fix-label-file-reading-bug.patch b/0005-fix-label-file-reading-bug.patch deleted file mode 100644 index 1e12621..0000000 --- a/0005-fix-label-file-reading-bug.patch +++ /dev/null @@ -1,89 +0,0 @@ -From ae7350ce59d092667a7777232b5364cc5c01115f Mon Sep 17 00:00:00 2001 -From: wujing -Date: Wed, 24 Jun 2020 12:07:39 +0800 -Subject: [PATCH 05/12] fix label-file reading bug - -Signed-off-by: wujing ---- - src/cmd/isula/base/create.c | 11 +++-------- - src/services/execution/spec/selinux_label.c | 6 +----- - 2 files changed, 4 insertions(+), 13 deletions(-) - -diff --git a/src/cmd/isula/base/create.c b/src/cmd/isula/base/create.c -index 6fbc294..148eea1 100644 ---- a/src/cmd/isula/base/create.c -+++ b/src/cmd/isula/base/create.c -@@ -26,6 +26,7 @@ - #include "arguments.h" - #include "isula_libutils/log.h" - #include "utils.h" -+#include "utils_string.h" - #include "console.h" - #include "create.h" - #include "commands.h" -@@ -433,7 +434,6 @@ static int read_label_from_file(const char *path, size_t file_size, isula_contai - FILE *fp = NULL; - char *buf = NULL; - size_t len; -- ssize_t num; - - if (file_size == 0) { - return 0; -@@ -444,14 +444,10 @@ static int read_label_from_file(const char *path, size_t file_size, isula_contai - return -1; - } - __fsetlocking(fp, FSETLOCKING_BYCALLER); -- num = getline(&buf, &len, fp); -- while (num != -1) { -- size_t len = strlen(buf); -- if (len == 1) { -- num = getline(&buf, &len, fp); -+ while (getline(&buf, &len, fp) != -1) { -+ if (strlen(util_trim_space(buf)) == 0) { - continue; - } -- buf[len - 1] = '\0'; - if (!validate_label(buf)) { - COMMAND_ERROR("Invalid label '%s': empty name", buf); - ret = -1; -@@ -462,7 +458,6 @@ static int read_label_from_file(const char *path, size_t file_size, isula_contai - ret = -1; - goto out; - } -- num = getline(&buf, &len, fp); - } - - out: -diff --git a/src/services/execution/spec/selinux_label.c b/src/services/execution/spec/selinux_label.c -index 203ee29..5732880 100644 ---- a/src/services/execution/spec/selinux_label.c -+++ b/src/services/execution/spec/selinux_label.c -@@ -125,7 +125,6 @@ static void find_selinux_fs_among_mounts(char **fs) - char *buf = NULL; - char **fields = NULL; - size_t len; -- ssize_t num; - - fp = fopen("/proc/self/mountinfo", "re"); - if (fp == NULL) { -@@ -134,16 +133,13 @@ static void find_selinux_fs_among_mounts(char **fs) - } - __fsetlocking(fp, FSETLOCKING_BYCALLER); - -- num = getline(&buf, &len, fp); -- while (num != -1) { -+ while (getline(&buf, &len, fp) != -1) { - if (!strstr(buf, " - selinuxfs ")) { -- num = getline(&buf, &len, fp); - continue; - } - fields = util_string_split((const char *)buf, ' '); - if (fields == NULL || util_array_len((const char **)fields) < MOUNT_POOINT_FIFTH_FIELD + 1) { - util_free_array(fields); -- num = getline(&buf, &len, fp); - continue; - } - if (verify_selinuxfs_mount(fields[MOUNT_POOINT_FIFTH_FIELD - 1])) { --- -2.20.1 - diff --git a/0006-CI-add-testcases-use-host-rootfs.patch b/0006-CI-add-testcases-use-host-rootfs.patch deleted file mode 100644 index 32eb313..0000000 --- a/0006-CI-add-testcases-use-host-rootfs.patch +++ /dev/null @@ -1,44 +0,0 @@ -From 2b84ea779f90ded53c7f070feacd8defd0c9e333 Mon Sep 17 00:00:00 2001 -From: lifeng68 -Date: Wed, 24 Jun 2020 17:25:50 +0800 -Subject: [PATCH 06/12] CI: add testcases use host rootfs / - -Signed-off-by: lifeng68 ---- - CI/test_cases/basic_cases/run.bash | 13 ++++++++++++- - 1 file changed, 12 insertions(+), 1 deletion(-) - -diff --git a/CI/test_cases/basic_cases/run.bash b/CI/test_cases/basic_cases/run.bash -index 9b57c2e..8db3f1e 100755 ---- a/CI/test_cases/basic_cases/run.bash -+++ b/CI/test_cases/basic_cases/run.bash -@@ -50,7 +50,7 @@ function do_test_t() - - echo AA > /tmp/test_run_env - -- isula run --name $containername -itd -e AA=BB -e AA --env-file /tmp/test_run_env busybox -+ isula run --name $containername -itd -e AAA=BB -e BAA --env-file /tmp/test_run_env busybox - fn_check_eq "$?" "0" "run failed" - testcontainer $containername running - -@@ -61,6 +61,17 @@ function do_test_t() - isula rm $containername - fn_check_eq "$?" "0" "rm failed" - -+ isula run --name $containername -itd --external-rootfs / --read-only none sh -+ fn_check_eq "$?" "0" "run container with host rootfs failed" -+ testcontainer $containername running -+ -+ isula stop -t 0 $containername -+ fn_check_eq "$?" "0" "stop failed" -+ testcontainer $containername exited -+ -+ isula rm $containername -+ fn_check_eq "$?" "0" "rm failed" -+ - return $TC_RET_T - } - --- -2.20.1 - diff --git a/0007-add-d-disk-param-for-CI.patch b/0007-add-d-disk-param-for-CI.patch deleted file mode 100644 index 79744ee..0000000 --- a/0007-add-d-disk-param-for-CI.patch +++ /dev/null @@ -1,50 +0,0 @@ -From d796113df9573d123a147709dbdb8df66277c1d2 Mon Sep 17 00:00:00 2001 -From: gaohuatao -Date: Wed, 1 Jul 2020 14:13:03 +0800 -Subject: [PATCH 07/12] add -d/--disk param for CI - -Signed-off-by: gaohuatao ---- - CI/build.sh | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/CI/build.sh b/CI/build.sh -index fddde51..c599991 100755 ---- a/CI/build.sh -+++ b/CI/build.sh -@@ -34,6 +34,7 @@ LXC_LOCK_DIR_HOST="/tmp/lxc_mount_dir" - KEEP_CONTAINERS_ALIVE_DIR="/tmp/containerslock" - TESTCASE_ASSIGN="${CIDIR}/testcase_assign" - BASE_IMAGE="" -+disk=NULL - - rm -rf ${TESTCASE_ASSIGN}_* - -@@ -52,6 +53,7 @@ function usage() { - echo " -n, --container-num Multiple containers execute scripts in parallel" - echo " -g, --enable-gcov Enable gcov for code coverage analysis" - echo " -i, --ignore-ci Not running testcase" -+ echo " -d, --disk Specify the disk to create isulad-thinpool" - echo " --rm Auto remove containers after testcase run success" - echo " -h, --help Script help information" - } -@@ -60,7 +62,7 @@ function err() { - echo "[$(date +'%Y-%m-%dT%H:%M:%S%z')]: $@" >&2 - } - --args=`getopt -o m:n:g:i:h --long module:,container-num:,enable-gcov:,ignore-ci:,help -- "$@"` -+args=`getopt -o m:n:g:i:d:h --long module:,container-num:,enable-gcov:,ignore-ci:,disk:,help -- "$@"` - if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi - eval set -- "$args" - -@@ -70,6 +72,7 @@ while true; do - -n|--container-num) container_nums=${2} ; shift 2 ;; - -g|--enable-gcov) enable_gcov=${2} ; shift 2 ;; - -i|--ignore-ci) ignore_ci=${2} ; shift 2 ;; -+ -d|--disk) disk=${2} ; shift 2 ;; - -h|--help) usage ; exit 0 ;; - --) shift ; break ;; - *) err "invalid parameter" ; exit -1 ;; --- -2.20.1 - diff --git a/0008-events-fix-wrong-format-of-exec-command.patch b/0008-events-fix-wrong-format-of-exec-command.patch deleted file mode 100644 index ad3f6f4..0000000 --- a/0008-events-fix-wrong-format-of-exec-command.patch +++ /dev/null @@ -1,254 +0,0 @@ -From 031a8aae207e1481c4a9698c8247ea1fe0e6c190 Mon Sep 17 00:00:00 2001 -From: lifeng68 -Date: Wed, 1 Jul 2020 11:31:14 +0800 -Subject: [PATCH 08/12] events: fix wrong format of exec command - -Signed-off-by: lifeng68 ---- - src/cmd/isula/information/inspect.c | 2 +- - .../execution/execute/execution_stream.c | 77 +++++++------------ - 2 files changed, 30 insertions(+), 49 deletions(-) - -diff --git a/src/cmd/isula/information/inspect.c b/src/cmd/isula/information/inspect.c -index fe011ad..c3b0f19 100644 ---- a/src/cmd/isula/information/inspect.c -+++ b/src/cmd/isula/information/inspect.c -@@ -201,7 +201,7 @@ static int client_inspect_container(const struct isula_inspect_request *request, - if (ret != 0) { - if ((response->errmsg != NULL) && - (strstr(response->errmsg, "Inspect invalid name") != NULL || -- strstr(response->errmsg, "No such image or container or accelerator") != NULL)) { -+ strstr(response->errmsg, "No such image or container or accelerator") != NULL)) { - return CONTAINER_NOT_FOUND; - } - -diff --git a/src/services/execution/execute/execution_stream.c b/src/services/execution/execute/execution_stream.c -index ea57403..4576898 100644 ---- a/src/services/execution/execute/execution_stream.c -+++ b/src/services/execution/execute/execution_stream.c -@@ -58,8 +58,7 @@ static char *create_single_fifo(const char *statepath, const char *subpath, cons - return NULL; - } - -- nret = console_fifo_name(statepath, subpath, stdflag, fifo_name, PATH_MAX, -- fifo_path, sizeof(fifo_path), true); -+ nret = console_fifo_name(statepath, subpath, stdflag, fifo_name, PATH_MAX, fifo_path, sizeof(fifo_path), true); - if (nret != 0) { - ERROR("Failed to get console fifo name."); - free(fifo_name); -@@ -76,8 +75,8 @@ out: - return fifo_name; - } - --static int do_create_daemon_fifos(const char *statepath, const char *subpath, bool attach_stdin, -- bool attach_stdout, bool attach_stderr, char *fifos[]) -+static int do_create_daemon_fifos(const char *statepath, const char *subpath, bool attach_stdin, bool attach_stdout, -+ bool attach_stderr, char *fifos[]) - { - int ret = -1; - -@@ -144,8 +143,8 @@ int create_daemon_fifos(const char *id, const char *runtime, bool attach_stdin, - goto cleanup; - } - -- nret = snprintf(subpath, PATH_MAX, "%s/%s/%u_%u_%u", id, operation, -- (unsigned int)tid, (unsigned int)now.tv_sec, (unsigned int)(now.tv_nsec)); -+ nret = snprintf(subpath, PATH_MAX, "%s/%s/%u_%u_%u", id, operation, (unsigned int)tid, (unsigned int)now.tv_sec, -+ (unsigned int)(now.tv_nsec)); - if (nret >= PATH_MAX || nret < 0) { - ERROR("Failed to print string"); - goto cleanup; -@@ -497,8 +496,7 @@ err_out: - return NULL; - } - --static int exec_container(container_t *cont, const char *runtime, char * const console_fifos[], -- defs_process_user *puser, -+static int exec_container(container_t *cont, const char *runtime, char * const console_fifos[], defs_process_user *puser, - const container_exec_request *request, int *exit_code) - { - int ret = 0; -@@ -615,9 +613,8 @@ static int exec_prepare_console(container_t *cont, const container_exec_request - const char *id = cont->common_config->id; - - if (request->attach_stdin || request->attach_stdout || request->attach_stderr) { -- if (create_daemon_fifos(id, cont->runtime, request->attach_stdin, -- request->attach_stdout, request->attach_stderr, -- "exec", fifos, fifopath)) { -+ if (create_daemon_fifos(id, cont->runtime, request->attach_stdin, request->attach_stdout, -+ request->attach_stderr, "exec", fifos, fifopath)) { - ret = -1; - goto out; - } -@@ -628,8 +625,8 @@ static int exec_prepare_console(container_t *cont, const container_exec_request - ret = -1; - goto out; - } -- if (ready_copy_io_data(*sync_fd, false, request->stdin, request->stdout, request->stderr, -- stdinfd, stdout_handler, stderr_handler, (const char **)fifos, thread_id)) { -+ if (ready_copy_io_data(*sync_fd, false, request->stdin, request->stdout, request->stderr, stdinfd, -+ stdout_handler, stderr_handler, (const char **)fifos, thread_id)) { - ret = -1; - goto out; - } -@@ -673,8 +670,8 @@ static int get_exec_user_info(const container_t *cont, const char *username, def - ERROR("Out of memory"); - return -1; - } -- ret = im_get_user_conf(cont->common_config->image_type, cont->common_config->base_fs, -- cont->hostconfig, username, *puser); -+ ret = im_get_user_conf(cont->common_config->image_type, cont->common_config->base_fs, cont->hostconfig, username, -+ *puser); - if (ret != 0) { - ERROR("Get user failed with '%s'", username ? username : ""); - ret = -1; -@@ -683,28 +680,17 @@ static int get_exec_user_info(const container_t *cont, const char *username, def - out: - return ret; - } --static void get_exec_command(const container_config *conf, const container_exec_request *request, -- char *exec_command, size_t len) -+static void get_exec_command(const container_exec_request *request, char *exec_command, size_t len) - { - size_t i; - bool should_abbreviated = false; - size_t start = 0; - size_t end = 0; - -- for (i = 0; i < conf->entrypoint_len; i++) { -- if (strlen(conf->entrypoint[i]) < len - strlen(exec_command)) { -- (void)strcat(exec_command, conf->entrypoint[i]); -- (void)strcat(exec_command, " "); -- } else { -- should_abbreviated = true; -- goto out; -- } -- } -- - for (i = 0; i < request->argv_len; i++) { - if (strlen(request->argv[i]) < len - strlen(exec_command)) { - (void)strcat(exec_command, request->argv[i]); -- if (i != request->argv_len) { -+ if (i != (request->argv_len - 1)) { - (void)strcat(exec_command, " "); - } - } else { -@@ -729,8 +715,8 @@ out: - } - } - --static int container_exec_cb(const container_exec_request *request, container_exec_response **response, -- int stdinfd, struct io_write_wrapper *stdout_handler, struct io_write_wrapper *stderr_handler) -+static int container_exec_cb(const container_exec_request *request, container_exec_response **response, int stdinfd, -+ struct io_write_wrapper *stdout_handler, struct io_write_wrapper *stderr_handler) - { - int exit_code = 0; - int sync_fd = -1; -@@ -741,7 +727,7 @@ static int container_exec_cb(const container_exec_request *request, container_ex - pthread_t thread_id = 0; - container_t *cont = NULL; - defs_process_user *puser = NULL; -- char exec_command[ARGS_MAX] = {0x00}; -+ char exec_command[ARGS_MAX] = { 0x00 }; - - DAEMON_CLEAR_ERRMSG(); - if (request == NULL || response == NULL) { -@@ -757,7 +743,7 @@ static int container_exec_cb(const container_exec_request *request, container_ex - isula_libutils_set_log_prefix(id); - EVENT("Event: {Object: %s, Type: execing}", id); - -- get_exec_command(cont->common_config->config, request, exec_command, sizeof(exec_command)); -+ get_exec_command(request, exec_command, sizeof(exec_command)); - (void)isulad_monitor_send_container_event(id, EXEC_CREATE, -1, 0, exec_command, NULL); - - if (gc_is_gc_progress(id)) { -@@ -911,8 +897,8 @@ static int attach_prepare_console(const container_t *cont, const container_attac - goto out; - } - -- if (ready_copy_io_data(-1, true, request->stdin, request->stdout, request->stderr, -- stdinfd, stdout_handler, stderr_handler, (const char **)fifos, tid)) { -+ if (ready_copy_io_data(-1, true, request->stdin, request->stdout, request->stderr, stdinfd, stdout_handler, -+ stderr_handler, (const char **)fifos, tid)) { - ret = -1; - goto out; - } -@@ -1003,8 +989,7 @@ pack_response: - } - - static int copy_from_container_cb_check(const struct isulad_copy_from_container_request *request, -- struct isulad_copy_from_container_response **response, -- container_t **cont) -+ struct isulad_copy_from_container_response **response, container_t **cont) - { - int ret = -1; - char *name = NULL; -@@ -1046,8 +1031,8 @@ out: - } - - static int archive_and_send_copy_data(const stream_func_wrapper *stream, -- struct isulad_copy_from_container_response *response, -- const char *resolvedpath, const char *abspath) -+ struct isulad_copy_from_container_response *response, const char *resolvedpath, -+ const char *abspath) - { - int ret = -1; - int nret; -@@ -1188,8 +1173,7 @@ cleanup: - return stat; - } - --static int copy_from_container_send_path_stat(const stream_func_wrapper *stream, -- const container_path_stat *stat) -+static int copy_from_container_send_path_stat(const stream_func_wrapper *stream, const container_path_stat *stat) - { - int ret = -1; - char *json = NULL; -@@ -1386,8 +1370,7 @@ pack_response: - return ret; - } - --static int copy_to_container_cb_check(const container_copy_to_request *request, -- container_t **cont) -+static int copy_to_container_cb_check(const container_copy_to_request *request, container_t **cont) - { - int ret = -1; - char *name = NULL; -@@ -1516,8 +1499,8 @@ cleanup: - return dstdir; - } - --static int copy_to_container_resolve_path(const container_t *cont, const char *dstdir, -- char **resolvedpath, char **abspath) -+static int copy_to_container_resolve_path(const container_t *cont, const char *dstdir, char **resolvedpath, -+ char **abspath) - { - int ret = -1; - char *joined = NULL; -@@ -1586,8 +1569,7 @@ cleanup: - return ret; - } - --static int copy_to_container_cb(const container_copy_to_request *request, -- stream_func_wrapper *stream, char **err) -+static int copy_to_container_cb(const container_copy_to_request *request, stream_func_wrapper *stream, char **err) - { - int ret = -1; - int nret; -@@ -2281,7 +2263,7 @@ static int container_logs_cb(const struct isulad_logs_request *request, stream_f - char *id = NULL; - container_t *cont = NULL; - struct container_log_config *log_config = NULL; -- struct last_log_file_position last_pos = {0}; -+ struct last_log_file_position last_pos = { 0 }; - Container_Status status = CONTAINER_STATUS_UNKNOWN; - - *response = (struct isulad_logs_response *)util_common_calloc_s(sizeof(struct isulad_logs_response)); -@@ -2376,4 +2358,3 @@ void container_stream_callback_init(service_container_callback_t *cb) - cb->copy_to_container = copy_to_container_cb; - cb->logs = container_logs_cb; - } -- --- -2.20.1 - diff --git a/0009-fix-create-mtab-bug-to-use-lstat.patch b/0009-fix-create-mtab-bug-to-use-lstat.patch deleted file mode 100644 index b98c930..0000000 --- a/0009-fix-create-mtab-bug-to-use-lstat.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 8e5863fc9dd9795bcfa5a11b3c1d609e4f73465e Mon Sep 17 00:00:00 2001 -From: gaohuatao -Date: Thu, 2 Jul 2020 10:16:19 +0800 -Subject: [PATCH 09/12] fix create mtab bug to use lstat - -Signed-off-by: gaohuatao ---- - src/cutils/utils_file.c | 18 ++++++++++++++++++ - src/cutils/utils_file.h | 2 ++ - src/services/execution/execute/execution.c | 2 +- - 3 files changed, 21 insertions(+), 1 deletion(-) - -diff --git a/src/cutils/utils_file.c b/src/cutils/utils_file.c -index f543145..1969d38 100644 ---- a/src/cutils/utils_file.c -+++ b/src/cutils/utils_file.c -@@ -51,6 +51,24 @@ bool util_dir_exists(const char *path) - return S_ISDIR(s.st_mode); - } - -+// This function is identical to "util_file_exists",except that if f is a symbolic file, return true -+bool util_fileself_exists(const char *f) -+{ -+ struct stat buf; -+ int nret; -+ -+ if (f == NULL) { -+ return false; -+ } -+ -+ nret = lstat(f, &buf); -+ if (nret < 0) { -+ return false; -+ } -+ return true; -+} -+ -+// When f is a symbolic file, if the file that it refers to not exits ,return false - bool util_file_exists(const char *f) - { - struct stat buf; -diff --git a/src/cutils/utils_file.h b/src/cutils/utils_file.h -index 11f702f..6944a4a 100644 ---- a/src/cutils/utils_file.h -+++ b/src/cutils/utils_file.h -@@ -27,6 +27,8 @@ extern "C" { - - bool util_dir_exists(const char *path); - -+bool util_fileself_exists(const char *f); -+ - bool util_file_exists(const char *f); - - int util_path_remove(const char *path); -diff --git a/src/services/execution/execute/execution.c b/src/services/execution/execute/execution.c -index 4ffcde7..e6ce152 100644 ---- a/src/services/execution/execute/execution.c -+++ b/src/services/execution/execute/execution.c -@@ -822,7 +822,7 @@ static int create_mtab_link(const oci_runtime_spec *oci_spec) - WARN("Failed to delete \"%s\": %s", dir, strerror(errno)); - } - -- if (util_file_exists(slink)) { -+ if (util_fileself_exists(slink)) { - goto out; - } - --- -2.20.1 - diff --git a/0010-init-struct.patch b/0010-init-struct.patch deleted file mode 100644 index 614170c..0000000 --- a/0010-init-struct.patch +++ /dev/null @@ -1,41 +0,0 @@ -From 219d340263a0791be24ce7a9a8f300bc9342a4ec Mon Sep 17 00:00:00 2001 -From: haozi007 -Date: Thu, 2 Jul 2020 19:55:18 +0800 -Subject: [PATCH 10/12] init struct - -Signed-off-by: haozi007 ---- - src/services/execution/execute/execution_stream.c | 3 ++- - src/services/execution/manager/container_unix.c | 2 +- - 2 files changed, 3 insertions(+), 2 deletions(-) - -diff --git a/src/services/execution/execute/execution_stream.c b/src/services/execution/execute/execution_stream.c -index 4576898..5b3ad4e 100644 ---- a/src/services/execution/execute/execution_stream.c -+++ b/src/services/execution/execute/execution_stream.c -@@ -496,7 +496,8 @@ err_out: - return NULL; - } - --static int exec_container(container_t *cont, const char *runtime, char * const console_fifos[], defs_process_user *puser, -+static int exec_container(container_t *cont, const char *runtime, char * const console_fifos[], -+ defs_process_user *puser, - const container_exec_request *request, int *exit_code) - { - int ret = 0; -diff --git a/src/services/execution/manager/container_unix.c b/src/services/execution/manager/container_unix.c -index f18ed15..a3578e7 100644 ---- a/src/services/execution/manager/container_unix.c -+++ b/src/services/execution/manager/container_unix.c -@@ -591,7 +591,7 @@ static int container_save_config_v2(const container_t *cont) - int ret = 0; - char *json_v2 = NULL; - parser_error err = NULL; -- container_config_v2 config_v2; -+ container_config_v2 config_v2 = {0}; - - if (cont == NULL) { - return -1; --- -2.20.1 - diff --git a/0011-Fix-stuck-problem-caused-by-websocket-traffic-restri.patch b/0011-Fix-stuck-problem-caused-by-websocket-traffic-restri.patch deleted file mode 100644 index f82f662..0000000 --- a/0011-Fix-stuck-problem-caused-by-websocket-traffic-restri.patch +++ /dev/null @@ -1,102 +0,0 @@ -From 47714fbf8944a14c64751af223edcb8a743177cd Mon Sep 17 00:00:00 2001 -From: wujing -Date: Fri, 3 Jul 2020 16:49:06 +0800 -Subject: [PATCH 11/12] Fix stuck problem caused by websocket traffic - restrictions - -Signed-off-by: wujing ---- - src/websocket/service/ws_server.cc | 16 ++-------------- - src/websocket/service/ws_server.h | 16 +++------------- - 2 files changed, 5 insertions(+), 27 deletions(-) - -diff --git a/src/websocket/service/ws_server.cc b/src/websocket/service/ws_server.cc -index 01f1dd3..bd1f39b 100644 ---- a/src/websocket/service/ws_server.cc -+++ b/src/websocket/service/ws_server.cc -@@ -288,18 +288,8 @@ int WebsocketServer::Wswrite(struct lws *wsi, void *in, size_t len) - return 0; - } - --void WebsocketServer::Receive(struct lws *wsi, void *user, void *in, size_t len) -+void WebsocketServer::Receive(struct lws *wsi, void *in, size_t len) - { -- if (user != nullptr) { -- struct per_session_data__echo *pss = (struct per_session_data__echo *)user; -- pss->final = lws_is_final_fragment(wsi); -- pss->binary = lws_frame_is_binary(wsi); -- -- (void)memcpy(&pss->buf[LWS_PRE], in, len); -- pss->len = (unsigned int)len; -- pss->rx += len; -- lws_rx_flow_control(wsi, 0); -- } - if (m_wsis.find(wsi) == m_wsis.end()) { - ERROR("invailed websocket session!"); - return; -@@ -353,13 +343,11 @@ int WebsocketServer::Callback(struct lws *wsi, enum lws_callback_reasons reason, - return -1; - } - WebsocketServer::GetInstance()->SetLwsSendedFlag(wsi, true); -- lws_rx_flow_control(wsi, 1); - } - break; - case LWS_CALLBACK_RECEIVE: { - std::lock_guard lock(m_mutex); -- WebsocketServer::GetInstance()->Receive(wsi, nullptr, (char *)in, len); -- lws_rx_flow_control(wsi, 0); -+ WebsocketServer::GetInstance()->Receive(wsi, (char *)in, len); - } - break; - case LWS_CALLBACK_CLOSED: { -diff --git a/src/websocket/service/ws_server.h b/src/websocket/service/ws_server.h -index 761d7ab..35f0c5f 100644 ---- a/src/websocket/service/ws_server.h -+++ b/src/websocket/service/ws_server.h -@@ -27,7 +27,7 @@ - #include "url.h" - #include "errors.h" - --#define MAX_ECHO_PAYLOAD 1024 -+#define MAX_ECHO_PAYLOAD 4096 - #define MAX_ARRAY_LEN 2 - #define MAX_BUF_LEN 256 - #define MAX_PROTOCOL_NUM 2 -@@ -37,16 +37,6 @@ - #define BUF_BASE_SIZE 1024 - #define LWS_TIMEOUT 50 - --struct per_session_data__echo { -- size_t rx, tx; -- unsigned char buf[LWS_PRE + MAX_ECHO_PAYLOAD + 1]; -- unsigned int len; -- unsigned int index; -- int final; -- int continuation; -- int binary; --}; -- - enum WebsocketChannel { - STDINCHANNEL = 0, - STDOUTCHANNEL, -@@ -95,7 +85,7 @@ private: - std::vector split(std::string str, char r); - static void EmitLog(int level, const char *line); - int CreateContext(); -- inline void Receive(struct lws *client, void *user, void *in, size_t len); -+ inline void Receive(struct lws *client, void *in, size_t len); - int Wswrite(struct lws *wsi, void *in, size_t len); - inline int DumpHandshakeInfo(struct lws *wsi) noexcept; - static int Callback(struct lws *wsi, enum lws_callback_reasons reason, -@@ -110,7 +100,7 @@ private: - volatile int m_force_exit = 0; - std::thread m_pthread_service; - const struct lws_protocols m_protocols[MAX_PROTOCOL_NUM] = { -- { "channel.k8s.io", Callback, sizeof(struct per_session_data__echo), MAX_ECHO_PAYLOAD, }, -+ { "channel.k8s.io", Callback, 0, MAX_ECHO_PAYLOAD, }, - { NULL, NULL, 0, 0 } - }; - RouteCallbackRegister m_handler; --- -2.20.1 - diff --git a/0012-build-add-checkout-LTS-tag-for-third-party-software.patch b/0012-build-add-checkout-LTS-tag-for-third-party-software.patch deleted file mode 100644 index 0c629e4..0000000 --- a/0012-build-add-checkout-LTS-tag-for-third-party-software.patch +++ /dev/null @@ -1,127 +0,0 @@ -From 153a5e686f40870f16924fa643290704994bc95e Mon Sep 17 00:00:00 2001 -From: lifeng68 -Date: Thu, 9 Jul 2020 19:17:05 +0800 -Subject: [PATCH 12/12] build: add checkout LTS tag for third party software - -Signed-off-by: lifeng68 ---- - Dockerfile | 9 ++++++++- - docs/build_guide.md | 5 +++++ - 2 files changed, 13 insertions(+), 1 deletion(-) - -diff --git a/Dockerfile b/Dockerfile -index 67c2272..11d31de 100644 ---- a/Dockerfile -+++ b/Dockerfile -@@ -118,7 +118,7 @@ RUN set -x && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/cmake.git && \ - cd cmake && \ -- git checkout origin/openEuler-20.03-LTS && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf cmake-3.12.1.tar.gz && \ - cd cmake-3.12.1 && \ - ./bootstrap && make && make install && \ -@@ -131,6 +131,7 @@ RUN set -x && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/protobuf.git && \ - cd protobuf && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf protobuf-all-3.9.0.tar.gz && \ - cd protobuf-3.9.0 && \ - ./autogen.sh && \ -@@ -145,6 +146,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/c-ares.git && \ - cd c-ares && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf c-ares-1.15.0.tar.gz && \ - cd c-ares-1.15.0 && \ - autoreconf -if && \ -@@ -159,6 +161,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/grpc.git && \ - cd grpc && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf grpc-1.22.0.tar.gz && \ - cd grpc-1.22.0 && \ - make -j $(nproc) && \ -@@ -171,6 +174,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/libevent.git && \ - cd libevent && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf libevent-2.1.11-stable.tar.gz && \ - cd libevent-2.1.11-stable && \ - ./autogen.sh && \ -@@ -185,6 +189,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/libevhtp.git && \ - cd libevhtp && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf libevhtp-1.2.18.tar.gz && \ - cd libevhtp-1.2.18 && \ - patch -p1 -F1 -s < ../0001-decrease-numbers-of-fd-for-shared-pipe-mode.patch && \ -@@ -205,6 +210,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/http-parser.git && \ - cd http-parser && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf http-parser-2.9.2.tar.gz && \ - cd http-parser-2.9.2 && \ - make -j CFLAGS="-Wno-error" && \ -@@ -217,6 +223,7 @@ RUN export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH && \ - cd ~ && \ - git clone https://gitee.com/src-openeuler/libwebsockets.git && \ - cd libwebsockets && \ -+ git checkout openEuler-20.03-LTS-tag && \ - tar -xzvf libwebsockets-2.4.2.tar.gz && \ - cd libwebsockets-2.4.2 && \ - patch -p1 -F1 -s < ../libwebsockets-fix-coredump.patch && \ -diff --git a/docs/build_guide.md b/docs/build_guide.md -index 6d19b87..310071b 100644 ---- a/docs/build_guide.md -+++ b/docs/build_guide.md -@@ -29,6 +29,7 @@ $ sudo -E echo "/usr/local/lib" >> /etc/ld.so.conf - ``` - $ git clone https://gitee.com/src-openeuler/protobuf.git - $ cd protobuf -+$ git checkout openEuler-20.03-LTS-tag - $ tar -xzvf protobuf-all-3.9.0.tar.gz - $ cd protobuf-3.9.0 - $ sudo -E ./autogen.sh -@@ -42,6 +43,7 @@ $ sudo -E ldconfig - ``` - $ git clone https://gitee.com/src-openeuler/c-ares.git - $ cd c-ares -+$ git checkout openEuler-20.03-LTS-tag - $ tar -xzvf c-ares-1.15.0.tar.gz - $ cd c-ares-1.15.0 - $ sudo -E autoreconf -if -@@ -55,6 +57,7 @@ $ sudo -E ldconfig - ``` - $ git clone https://gitee.com/src-openeuler/grpc.git - $ cd grpc -+$ git checkout openEuler-20.03-LTS-tag - $ tar -xzvf grpc-1.22.0.tar.gz - $ cd grpc-1.22.0 - $ sudo -E make -j $(nproc) -@@ -66,6 +69,7 @@ $ sudo -E ldconfig - ``` - $ git clone https://gitee.com/src-openeuler/http-parser.git - $ cd http-parser -+$ git checkout openEuler-20.03-LTS-tag - $ tar -xzvf http-parser-2.9.2.tar.gz - $ cd http-parser-2.9.2 - $ sudo -E make -j CFLAGS="-Wno-error" -@@ -77,6 +81,7 @@ $ sudo -E ldconfig - ``` - $ git clone https://gitee.com/src-openeuler/libwebsockets.git - $ cd libwebsockets -+$ git checkout openEuler-20.03-LTS-tag - $ tar -xzvf libwebsockets-2.4.2.tar.gz - $ cd libwebsockets-2.4.2 - $ patch -p1 -F1 -s < ../libwebsockets-fix-coredump.patch --- -2.20.1 - diff --git a/iSulad.spec b/iSulad.spec index fbdfa49..602c781 100644 --- a/iSulad.spec +++ b/iSulad.spec @@ -1,34 +1,21 @@ -%global _version 2.0.3 -%global _release 20200902.114727.git6d945f26 +%global _version 2.0.5 +%global _release 20200904.114315.gitff1761c3 %global is_systemd 1 -%global debug_package %{nil} Name: iSulad Version: %{_version} Release: %{_release} Summary: Lightweight Container Runtime Daemon License: Mulan PSL v2 -URL: https://gitee.com/openeuler/iSuladd40006-CI-add-testcases-use-host-rootfs.patch -Source0: https://gitee.com/openeuler/iSulad/repository/archive/v%{version}.tar.gz +URL: https://gitee.com/openeuler/iSulad +Source: https://gitee.com/openeuler/iSulad/repository/archive/v%{version}.tar.gz BuildRoot: {_tmppath}/iSulad-%{version} ExclusiveArch: x86_64 aarch64 -Patch9000: 0001-isulad-shim-fix-probabilistic-bad-fd.patch -Patch9001: 0002-iSulad-resolve-coredump-of-isula-inspect.patch -Patch9002: 0003-Add-Pull-Request-Template-And-Issue-Template.patch -Patch9003: 0004-fix-bug-of-creating-symlink-for-etc-mtab-when-etc-sy.patch -Patch9004: 0005-fix-label-file-reading-bug.patch -Patch9005: 0006-CI-add-testcases-use-host-rootfs.patch -Patch9006: 0007-add-d-disk-param-for-CI.patch -Patch9007: 0008-events-fix-wrong-format-of-exec-command.patch -Patch9008: 0009-fix-create-mtab-bug-to-use-lstat.patch -Patch9009: 0010-init-struct.patch -Patch9010: 0011-Fix-stuck-problem-caused-by-websocket-traffic-restri.patch -Patch9011: 0012-build-add-checkout-LTS-tag-for-third-party-software.patch - %ifarch x86_64 aarch64 Provides: libhttpclient.so()(64bit) Provides: libisula.so()(64bit) +Provides: libisulad_img.so()(64bit) %endif %if 0%{?is_systemd} @@ -44,16 +31,16 @@ Requires(preun): initscripts BuildRequires: cmake gcc-c++ lxc lxc-devel lcr-devel yajl-devel clibcni-devel BuildRequires: grpc grpc-plugins grpc-devel protobuf-devel -BuildRequires: libcurl libcurl-devel sqlite-devel +BuildRequires: libcurl libcurl-devel sqlite-devel libarchive-devel device-mapper-devel BuildRequires: http-parser-devel BuildRequires: libseccomp-devel libcap-devel libselinux-devel libwebsockets libwebsockets-devel BuildRequires: systemd-devel git -Requires: iSulad-img lcr lxc clibcni +Requires: lcr lxc clibcni Requires: grpc protobuf Requires: libcurl Requires: sqlite http-parser libseccomp -Requires: libcap libselinux libwebsockets +Requires: libcap libselinux libwebsockets libarchive device-mapper Requires: systemd %description @@ -66,7 +53,7 @@ Runtime Daemon, written by C. %build mkdir -p build cd build -%cmake -DDEBUG=OFF -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr ../ +%cmake -DDEBUG=ON -DLIB_INSTALL_DIR=%{_libdir} -DCMAKE_INSTALL_PREFIX=/usr ../ %make_build %install @@ -74,7 +61,11 @@ rm -rf %{buildroot} cd build install -d $RPM_BUILD_ROOT/%{_libdir} install -m 0644 ./src/libisula.so %{buildroot}/%{_libdir}/libisula.so -install -m 0644 ./src/http/libhttpclient.so %{buildroot}/%{_libdir}/libhttpclient.so +install -m 0644 ./src/utils/http/libhttpclient.so %{buildroot}/%{_libdir}/libhttpclient.so +install -m 0644 ./src/daemon/modules/image/libisulad_img.so %{buildroot}/%{_libdir}/libisulad_img.so +chmod +x %{buildroot}/%{_libdir}/libisula.so +chmod +x %{buildroot}/%{_libdir}/libhttpclient.so +chmod +x %{buildroot}/%{_libdir}/libisulad_img.so install -d $RPM_BUILD_ROOT/%{_libdir}/pkgconfig install -m 0640 ./conf/isulad.pc %{buildroot}/%{_libdir}/pkgconfig/isulad.pc @@ -85,12 +76,12 @@ install -m 0755 ./src/isulad-shim %{buildroot}/%{_bindir}/isulad-shim install -m 0755 ./src/isulad %{buildroot}/%{_bindir}/isulad install -d $RPM_BUILD_ROOT/%{_includedir}/isulad -install -m 0644 ../src/libisula.h %{buildroot}/%{_includedir}/isulad/libisula.h -install -m 0644 ../src/connect/client/isula_connect.h %{buildroot}/%{_includedir}/isulad/isula_connect.h -install -m 0644 ../src/container_def.h %{buildroot}/%{_includedir}/isulad/container_def.h -install -m 0644 ../src/cutils/types_def.h %{buildroot}/%{_includedir}/isulad/types_def.h -install -m 0644 ../src/cutils/error.h %{buildroot}/%{_includedir}/isulad/error.h -install -m 0644 ../src/engines/engine.h %{buildroot}/%{_includedir}/isulad/engine.h +install -m 0644 ../src/client/libisula.h %{buildroot}/%{_includedir}/isulad/libisula.h +install -m 0644 ../src/client/connect/isula_connect.h %{buildroot}/%{_includedir}/isulad/isula_connect.h +install -m 0644 ../src/utils/cutils/utils_timestamp.h %{buildroot}/%{_includedir}/isulad/utils_timestamp.h +install -m 0644 ../src/utils/cutils/error.h %{buildroot}/%{_includedir}/isulad/error.h +install -m 0644 ../src/daemon/modules/runtime/engines/engine.h %{buildroot}/%{_includedir}/isulad/engine.h +install -m 0644 ../src/daemon/modules/api/image_api.h %{buildroot}/%{_includedir}/isulad/image_api.h install -d $RPM_BUILD_ROOT/%{_sysconfdir}/isulad install -m 0640 ../src/contrib/config/daemon.json %{buildroot}/%{_sysconfdir}/isulad/daemon.json @@ -224,6 +215,12 @@ fi %endif %changelog +* Fri Sep 04 2020 zhangxiaoyu - 2.0.5-20200904.114315.gitff1761c3 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: upgrade from v2.0.3 to v2.0.5 + * Wed Sep 02 2020 YoungJQ - 2.0.3-20200902.114727.git6d945f26 - Type:enhancement - ID:NA diff --git a/v2.0.3.tar.gz b/v2.0.3.tar.gz deleted file mode 100644 index 4ca38bd..0000000 Binary files a/v2.0.3.tar.gz and /dev/null differ diff --git a/v2.0.5.tar.gz b/v2.0.5.tar.gz new file mode 100644 index 0000000..5354c66 Binary files /dev/null and b/v2.0.5.tar.gz differ