diff --git a/0001-modified-ipconfig.json-to-adapt-to-newest-version-of.patch b/0001-modified-ipconfig.json-to-adapt-to-newest-version-of.patch new file mode 100644 index 0000000..2e6b71f --- /dev/null +++ b/0001-modified-ipconfig.json-to-adapt-to-newest-version-of.patch @@ -0,0 +1,25 @@ +From c3013bfda83f3bcdcf518f29ad942bd99b4a356c Mon Sep 17 00:00:00 2001 +From: chengzrz +Date: Thu, 28 Oct 2021 03:18:15 -0400 +Subject: [PATCH 1/2] modified ipconfig.json to adapt to newest version of cni + plugins + +--- + src/json/schema/cni/network/ipconfig.json | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/src/json/schema/cni/network/ipconfig.json b/src/json/schema/cni/network/ipconfig.json +index 4854118..9f3a2fe 100644 +--- a/src/json/schema/cni/network/ipconfig.json ++++ b/src/json/schema/cni/network/ipconfig.json +@@ -16,7 +16,6 @@ + } + }, + "required": [ +- "version", + "address" + ] + } +-- +2.20.1 + diff --git a/0002-disable-lxc_keep-with-oci-image.patch b/0002-disable-lxc_keep-with-oci-image.patch new file mode 100644 index 0000000..2956c19 --- /dev/null +++ b/0002-disable-lxc_keep-with-oci-image.patch @@ -0,0 +1,58 @@ +From 409f5bf06e782fe5cbcf01e463b114c973b33dcb Mon Sep 17 00:00:00 2001 +From: gaohuatao +Date: Thu, 21 Oct 2021 12:11:00 +0800 +Subject: [PATCH 2/2] disable lxc_keep with oci image + +Signed-off-by: gaohuatao +--- + src/lcrcontainer.h | 1 + + src/lcrcontainer_execute.c | 13 +++++++++++++ + 2 files changed, 14 insertions(+) + +diff --git a/src/lcrcontainer.h b/src/lcrcontainer.h +index ecf3655..062d681 100644 +--- a/src/lcrcontainer.h ++++ b/src/lcrcontainer.h +@@ -201,6 +201,7 @@ struct lcr_start_request { + uint32_t start_timeout; + const char *container_pidfile; + const char *exit_fifo; ++ bool image_type_oci; + }; + bool lcr_start(const struct lcr_start_request *request); + +diff --git a/src/lcrcontainer_execute.c b/src/lcrcontainer_execute.c +index 4c8e0e6..d04a467 100644 +--- a/src/lcrcontainer_execute.c ++++ b/src/lcrcontainer_execute.c +@@ -966,7 +966,9 @@ void execute_lxc_start(const char *name, const char *path, const struct lcr_star + { + // should check the size of params when add new params. + char *params[PARAM_NUM] = {NULL}; ++ char buf[PARAM_NUM] = { 0 }; + size_t i = 0; ++ int nret = 0; + + if (lcr_util_check_inherited(true, -1) != 0) { + COMMAND_ERROR("Close inherited fds failed"); +@@ -983,6 +985,17 @@ void execute_lxc_start(const char *name, const char *path, const struct lcr_star + add_array_kv(params, PARAM_NUM, &i, "--in-fifo", request->console_fifos[0]); + add_array_kv(params, PARAM_NUM, &i, "--out-fifo", request->console_fifos[1]); + add_array_kv(params, PARAM_NUM, &i, "--err-fifo", request->console_fifos[2]); ++ ++ nret = snprintf(buf, sizeof(buf), "%s=true", LXC_IMAGE_OCI_KEY); ++ if (nret < 0 || (size_t)nret >= sizeof(buf)) { ++ COMMAND_ERROR("Format KEY=VAL of image type error"); ++ exit(EXIT_FAILURE); ++ } ++ ++ if (request->image_type_oci) { ++ add_array_kv(params, PARAM_NUM, &i, "-s", buf); ++ } ++ + if (!request->tty) { + add_array_elem(params, PARAM_NUM, &i, "--disable-pty"); + } +-- +2.20.1 + diff --git a/lcr.spec b/lcr.spec index 425b7bb..82a555a 100644 --- a/lcr.spec +++ b/lcr.spec @@ -1,5 +1,5 @@ %global _version 2.0.6 -%global _release 1 +%global _release 2 %global _inner_name isula_libutils Name: lcr @@ -12,6 +12,9 @@ Group: Applications/System License: LGPLv2.1+ BuildRoot: %{_tmppath}/lcr-%{version} +Patch1: 0001-modified-ipconfig.json-to-adapt-to-newest-version-of.patch +Patch2: 0002-disable-lxc_keep-with-oci-image.patch + %define lxcver 4.0.3-2021012801 BuildRequires: cmake gcc gcc-c++ git @@ -100,11 +103,11 @@ rm -rf %{buildroot} %{_includedir}/%{_inner_name}/*.h %changelog -* Tue Oct 12 2021 wujing - 2.0.6-1 -- Type:sync +* Wed Nov 10 2021 gaohuatao - 2.0.6-2 +- Type:enhancement - ID:NA - SUG:NA -- DESC: upgrade to 2.0.6 +- DESC: update to 2.0.6 * Mon Jun 28 2021 wujing - 2.0.5-20210628.165131.git738752d8 - Type:enhancement diff --git a/v2.0.6.tar.gz b/v2.0.6.tar.gz index 33cf8bc..e42aef1 100644 Binary files a/v2.0.6.tar.gz and b/v2.0.6.tar.gz differ