From 724623be5c03bbf38f634c00493c7807ba3b1919 Mon Sep 17 00:00:00 2001 From: haozi007 Date: Thu, 3 Dec 2020 18:57:18 +0800 Subject: [PATCH] sync from openeuler 1. support default container log options 2. fix bugs 3. add relate of isulad docs Signed-off-by: haozi007 --- 0001-support-local-volume.patch | 4 +- ...ove-extension-json-config-of-cni-net.patch | 4 +- 0003-fix-ctest-error-when-use-make.patch | 4 +- ...rintf-error-when-with-rootfs-options.patch | 29 +++++++++++++ ...upport-default-container-log-options.patch | 42 +++++++++++++++++++ 0006-update-describe-of-lcr.patch | 26 ++++++++++++ 0007-add-run-count-of-fuzz-test.patch | 26 ++++++++++++ lcr.spec | 12 +++++- 8 files changed, 140 insertions(+), 7 deletions(-) create mode 100644 0004-rootfs-fix-snprintf-error-when-with-rootfs-options.patch create mode 100644 0005-support-default-container-log-options.patch create mode 100644 0006-update-describe-of-lcr.patch create mode 100644 0007-add-run-count-of-fuzz-test.patch diff --git a/0001-support-local-volume.patch b/0001-support-local-volume.patch index 50aaadf..0140e53 100644 --- a/0001-support-local-volume.patch +++ b/0001-support-local-volume.patch @@ -1,7 +1,7 @@ From 14c30632d33cdce2d3b0bb5072bf8af823003e63 Mon Sep 17 00:00:00 2001 From: WangFengTu Date: Thu, 3 Sep 2020 10:46:38 +0800 -Subject: [PATCH 1/3] support local volume +Subject: [PATCH 1/7] support local volume Signed-off-by: WangFengTu --- @@ -308,5 +308,5 @@ index 0000000..035451f + } +} -- -2.20.1 +2.25.1 diff --git a/0002-remove-extension-json-config-of-cni-net.patch b/0002-remove-extension-json-config-of-cni-net.patch index f438cad..f5fafce 100644 --- a/0002-remove-extension-json-config-of-cni-net.patch +++ b/0002-remove-extension-json-config-of-cni-net.patch @@ -1,7 +1,7 @@ From 5ef0ddb02783bbe5abeb0998fe8b65b9138268df Mon Sep 17 00:00:00 2001 From: haozi007 Date: Tue, 27 Oct 2020 11:15:31 +0800 -Subject: [PATCH 2/3] remove extension json config of cni net +Subject: [PATCH 2/7] remove extension json config of cni net Signed-off-by: haozi007 --- @@ -91,5 +91,5 @@ index 89427ae..7a03a3f 100644 "$ref": "../defs.json#/definitions/mapStringBool" } -- -2.20.1 +2.25.1 diff --git a/0003-fix-ctest-error-when-use-make.patch b/0003-fix-ctest-error-when-use-make.patch index 7ea0a7b..9e2b774 100644 --- a/0003-fix-ctest-error-when-use-make.patch +++ b/0003-fix-ctest-error-when-use-make.patch @@ -1,7 +1,7 @@ From 88f2a60d014299241b6e53f60340b2debc1adc10 Mon Sep 17 00:00:00 2001 From: haozi007 Date: Tue, 3 Nov 2020 17:23:57 +0800 -Subject: [PATCH 3/3] fix ctest error when use make +Subject: [PATCH 3/7] fix ctest error when use make Signed-off-by: haozi007 --- @@ -22,5 +22,5 @@ index 8110f10..39d0270 100644 # run ut and gcov if (ENABLE_GCOV) -- -2.20.1 +2.25.1 diff --git a/0004-rootfs-fix-snprintf-error-when-with-rootfs-options.patch b/0004-rootfs-fix-snprintf-error-when-with-rootfs-options.patch new file mode 100644 index 0000000..fc2a1dd --- /dev/null +++ b/0004-rootfs-fix-snprintf-error-when-with-rootfs-options.patch @@ -0,0 +1,29 @@ +From 59f7c9a721e67edef1eae3b669232eaf298c80b1 Mon Sep 17 00:00:00 2001 +From: lifeng68 +Date: Tue, 17 Nov 2020 18:34:01 +0800 +Subject: [PATCH 4/7] rootfs: fix snprintf error when with rootfs options + +Signed-off-by: lifeng68 +--- + src/conf.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/src/conf.c b/src/conf.c +index 8bbdcbe..505985e 100644 +--- a/src/conf.c ++++ b/src/conf.c +@@ -796,8 +796,9 @@ static int trans_oci_root_rootfs_options(const oci_runtime_spec_root *root, stru + goto out; + } + value = tmpvalue; +- nret = snprintf(value + strlen(value), newsize - strlen(value), ",%s", linux->rootfs_propagation); +- if (nret < 0 || (size_t)nret >= (newsize - strlen(value))) { ++ size_t tmp = newsize - strlen(value); ++ nret = snprintf(value + strlen(value), tmp, ",%s", linux->rootfs_propagation); ++ if (nret < 0 || (size_t)nret >= tmp) { + ERROR("Failed to print string"); + goto out; + } +-- +2.25.1 + diff --git a/0005-support-default-container-log-options.patch b/0005-support-default-container-log-options.patch new file mode 100644 index 0000000..a659d82 --- /dev/null +++ b/0005-support-default-container-log-options.patch @@ -0,0 +1,42 @@ +From 72cb0bb9f6102751965ec5c4d5216120c75beccb Mon Sep 17 00:00:00 2001 +From: haozi007 +Date: Thu, 19 Nov 2020 16:38:35 +0800 +Subject: [PATCH 5/7] support default container log options + +Signed-off-by: haozi007 +--- + src/json/schema/isulad-daemon-configs.json | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/src/json/schema/isulad-daemon-configs.json b/src/json/schema/isulad-daemon-configs.json +index 5991f00..27fd916 100644 +--- a/src/json/schema/isulad-daemon-configs.json ++++ b/src/json/schema/isulad-daemon-configs.json +@@ -26,6 +26,17 @@ + "log-opts": { + "$ref": "defs.json#/definitions/mapStringString" + }, ++ "container-log": { ++ "type": "object", ++ "properties": { ++ "driver": { ++ "type": "string" ++ }, ++ "opts": { ++ "$ref": "defs.json#/definitions/mapStringString" ++ } ++ } ++ }, + "storage-driver": { + "type": "string" + }, +@@ -149,4 +160,4 @@ + "type": "boolean" + } + } +-} +\ No newline at end of file ++} +-- +2.25.1 + diff --git a/0006-update-describe-of-lcr.patch b/0006-update-describe-of-lcr.patch new file mode 100644 index 0000000..35762cb --- /dev/null +++ b/0006-update-describe-of-lcr.patch @@ -0,0 +1,26 @@ +From 9f1b1b3d10e09b173d345b89a340eb2f61fef682 Mon Sep 17 00:00:00 2001 +From: haozi007 +Date: Thu, 26 Nov 2020 15:04:18 +0800 +Subject: [PATCH 6/7] update describe of lcr + +Signed-off-by: haozi007 +--- + README.md | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/README.md b/README.md +index a1289c5..8a45755 100644 +--- a/README.md ++++ b/README.md +@@ -1,7 +1,7 @@ + # lcr + + `lcr`(Lightweight Container Runtime) is CLI tool for spawning and running containers according to OCI specification. +-It is based on `liblxc` and written by `C`. ++It is based on `liblxc` and written by `C`. It can use by container engine: [iSulad](https://gitee.com/openeuler/iSulad). [iSulad](https://gitee.com/openeuler/iSulad) use `ldopen` to call functions defined in lcr. + + ## How to Contribute + +-- +2.25.1 + diff --git a/0007-add-run-count-of-fuzz-test.patch b/0007-add-run-count-of-fuzz-test.patch new file mode 100644 index 0000000..6d0d8be --- /dev/null +++ b/0007-add-run-count-of-fuzz-test.patch @@ -0,0 +1,26 @@ +From 3d3111e54bd129e85dd506964efd6fe0f91cb436 Mon Sep 17 00:00:00 2001 +From: haozi007 +Date: Wed, 2 Dec 2020 11:29:56 +0800 +Subject: [PATCH 7/7] add run count of fuzz test + +Signed-off-by: haozi007 +--- + tests/fuzz/fuzz.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/fuzz/fuzz.sh b/tests/fuzz/fuzz.sh +index 6f80cab..d71be7c 100755 +--- a/tests/fuzz/fuzz.sh ++++ b/tests/fuzz/fuzz.sh +@@ -23,7 +23,7 @@ + #!/bin/bash + + LIB_FUZZING_ENGINE="/lib64/libFuzzer.a" +-FUZZ_OPTION="corpus -dict=./dict/log_fuzz.dict -runs=100000 -max_total_time=3600" ++FUZZ_OPTION="corpus -dict=./dict/log_fuzz.dict -runs=10000000 -max_total_time=3600" + + if [ ! -f "$LIB_FUZZING_ENGINE" ];then + echo "$LIB_FUZZING_ENGINE not exist, pls check" +-- +2.25.1 + diff --git a/lcr.spec b/lcr.spec index c3e7546..82a6574 100644 --- a/lcr.spec +++ b/lcr.spec @@ -1,5 +1,5 @@ %global _version 2.0.4 -%global _release 20201112.184125.gite8506076 +%global _release 20201203.185548.gitcc470dc1 %global _inner_name isula_libutils Name: lcr @@ -15,6 +15,10 @@ BuildRoot: %{_tmppath}/lcr-%{version} Patch9001: 0001-support-local-volume.patch Patch9002: 0002-remove-extension-json-config-of-cni-net.patch Patch9003: 0003-fix-ctest-error-when-use-make.patch +Patch9004: 0004-rootfs-fix-snprintf-error-when-with-rootfs-options.patch +Patch9005: 0005-support-default-container-log-options.patch +Patch9006: 0006-update-describe-of-lcr.patch +Patch9007: 0007-add-run-count-of-fuzz-test.patch BuildRequires: cmake BuildRequires: lxc @@ -103,6 +107,12 @@ rm -rf %{buildroot} %changelog +* Thu Dec 3 2020 haozi007 - 2.0.4-20201203.185548.gitcc470dc1 +- Type:update from master +- ID:NA +- SUG:NA +- DESC: update from master + * Thu Nov 12 2020 gaohuatao - 2.0.4-20201112.184125.gite8506076 - Type:update from master - ID:NA