diff --git a/0001-support-local-volume.patch b/0001-support-local-volume.patch new file mode 100644 index 0000000..50aaadf --- /dev/null +++ b/0001-support-local-volume.patch @@ -0,0 +1,312 @@ +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 + +Signed-off-by: WangFengTu +--- + src/json/schema/bind-options.json | 12 +++++++++ + src/json/schema/container/config-v2.json | 3 +++ + src/json/schema/container/inspect.json | 3 +++ + src/json/schema/defs.json | 5 +++- + src/json/schema/docker/types/mount-point.json | 3 +++ + src/json/schema/host-config.json | 9 +++++++ + src/json/schema/mount_spec.json | 27 +++++++++++++++++++ + .../schema/volume/list-volume-request.json | 6 +++++ + .../schema/volume/list-volume-response.json | 18 +++++++++++++ + src/json/schema/volume/options.json | 9 +++++++ + .../schema/volume/prune-volume-request.json | 6 +++++ + .../schema/volume/prune-volume-response.json | 18 +++++++++++++ + .../schema/volume/remove-volume-request.json | 9 +++++++ + .../schema/volume/remove-volume-response.json | 12 +++++++++ + src/json/schema/volume/volume.json | 12 +++++++++ + 15 files changed, 151 insertions(+), 1 deletion(-) + create mode 100644 src/json/schema/bind-options.json + create mode 100644 src/json/schema/mount_spec.json + create mode 100644 src/json/schema/volume/list-volume-request.json + create mode 100644 src/json/schema/volume/list-volume-response.json + create mode 100644 src/json/schema/volume/options.json + create mode 100644 src/json/schema/volume/prune-volume-request.json + create mode 100644 src/json/schema/volume/prune-volume-response.json + create mode 100644 src/json/schema/volume/remove-volume-request.json + create mode 100644 src/json/schema/volume/remove-volume-response.json + create mode 100644 src/json/schema/volume/volume.json + +diff --git a/src/json/schema/bind-options.json b/src/json/schema/bind-options.json +new file mode 100644 +index 0000000..8900361 +--- /dev/null ++++ b/src/json/schema/bind-options.json +@@ -0,0 +1,12 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "Propagation": { ++ "type": "string" ++ }, ++ "selinux-opts": { ++ "type": "string" ++ } ++ } ++} +diff --git a/src/json/schema/container/config-v2.json b/src/json/schema/container/config-v2.json +index ba97bd8..f299f01 100644 +--- a/src/json/schema/container/config-v2.json ++++ b/src/json/schema/container/config-v2.json +@@ -55,6 +55,9 @@ + ".{1,}": { + "type": "object", + "properties": { ++ "Type": { ++ "type": "string" ++ }, + "Destination": { + "type": "string" + }, +diff --git a/src/json/schema/container/inspect.json b/src/json/schema/container/inspect.json +index d1c6288..bf53a59 100644 +--- a/src/json/schema/container/inspect.json ++++ b/src/json/schema/container/inspect.json +@@ -157,6 +157,9 @@ + "Labels": { + "$ref": "../defs.json#/definitions/mapStringString" + }, ++ "Volumes": { ++ "$ref": "../defs.json#/definitions/mapStringObject" ++ }, + "Annotations": { + "$ref": "../defs.json#/definitions/mapStringString" + }, +diff --git a/src/json/schema/defs.json b/src/json/schema/defs.json +index 9512caa..317cab4 100644 +--- a/src/json/schema/defs.json ++++ b/src/json/schema/defs.json +@@ -192,6 +192,9 @@ + "options": { + "$ref": "#/definitions/ArrayOfStrings" + }, ++ "named": { ++ "type": "boolean" ++ }, + "type": { + "type": "string" + } +@@ -1073,4 +1076,4 @@ + } + } + } +-} +\ No newline at end of file ++} +diff --git a/src/json/schema/docker/types/mount-point.json b/src/json/schema/docker/types/mount-point.json +index 33b7768..f204cdc 100644 +--- a/src/json/schema/docker/types/mount-point.json ++++ b/src/json/schema/docker/types/mount-point.json +@@ -2,6 +2,9 @@ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { ++ "Type":{ ++ "type":"string" ++ }, + "Name":{ + "type":"string" + }, +diff --git a/src/json/schema/host-config.json b/src/json/schema/host-config.json +index ac54b40..eb99c87 100644 +--- a/src/json/schema/host-config.json ++++ b/src/json/schema/host-config.json +@@ -2,9 +2,18 @@ + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { ++ "VolumesFrom": { ++ "$ref": "defs.json#/definitions/ArrayOfStrings" ++ }, + "Binds": { + "$ref": "defs.json#/definitions/ArrayOfStrings" + }, ++ "Mounts": { ++ "type": "array", ++ "items": { ++ "$ref": "mount_spec.json" ++ } ++ }, + "NetworkMode": { + "type": "string" + }, +diff --git a/src/json/schema/mount_spec.json b/src/json/schema/mount_spec.json +new file mode 100644 +index 0000000..94aa5b3 +--- /dev/null ++++ b/src/json/schema/mount_spec.json +@@ -0,0 +1,27 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "Type": { ++ "type": "string" ++ }, ++ "Source": { ++ "type": "string" ++ }, ++ "Target": { ++ "type": "string" ++ }, ++ "Readonly": { ++ "type": "boolean" ++ }, ++ "Consistency": { ++ "type": "string" ++ }, ++ "BindOptions": { ++ "$ref": "bind-options.json" ++ }, ++ "VolumeOptions": { ++ "$ref": "volume/options.json" ++ } ++ } ++} +diff --git a/src/json/schema/volume/list-volume-request.json b/src/json/schema/volume/list-volume-request.json +new file mode 100644 +index 0000000..8084880 +--- /dev/null ++++ b/src/json/schema/volume/list-volume-request.json +@@ -0,0 +1,6 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ } ++} +diff --git a/src/json/schema/volume/list-volume-response.json b/src/json/schema/volume/list-volume-response.json +new file mode 100644 +index 0000000..d89f4e2 +--- /dev/null ++++ b/src/json/schema/volume/list-volume-response.json +@@ -0,0 +1,18 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "volumes": { ++ "type": "array", ++ "items": { ++ "$ref": "volume.json" ++ } ++ }, ++ "cc": { ++ "type": "uint32" ++ }, ++ "errmsg": { ++ "type": "string" ++ } ++ } ++} +diff --git a/src/json/schema/volume/options.json b/src/json/schema/volume/options.json +new file mode 100644 +index 0000000..57b3c34 +--- /dev/null ++++ b/src/json/schema/volume/options.json +@@ -0,0 +1,9 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "NoCopy": { ++ "type": "boolean" ++ } ++ } ++} +diff --git a/src/json/schema/volume/prune-volume-request.json b/src/json/schema/volume/prune-volume-request.json +new file mode 100644 +index 0000000..8084880 +--- /dev/null ++++ b/src/json/schema/volume/prune-volume-request.json +@@ -0,0 +1,6 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ } ++} +diff --git a/src/json/schema/volume/prune-volume-response.json b/src/json/schema/volume/prune-volume-response.json +new file mode 100644 +index 0000000..064f839 +--- /dev/null ++++ b/src/json/schema/volume/prune-volume-response.json +@@ -0,0 +1,18 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "volumes": { ++ "type": "array", ++ "items": { ++ "type": "string" ++ } ++ }, ++ "cc": { ++ "type": "uint32" ++ }, ++ "errmsg": { ++ "type": "string" ++ } ++ } ++} +diff --git a/src/json/schema/volume/remove-volume-request.json b/src/json/schema/volume/remove-volume-request.json +new file mode 100644 +index 0000000..788b40d +--- /dev/null ++++ b/src/json/schema/volume/remove-volume-request.json +@@ -0,0 +1,9 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "name": { ++ "type": "string" ++ } ++ } ++} +diff --git a/src/json/schema/volume/remove-volume-response.json b/src/json/schema/volume/remove-volume-response.json +new file mode 100644 +index 0000000..8c398e8 +--- /dev/null ++++ b/src/json/schema/volume/remove-volume-response.json +@@ -0,0 +1,12 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "cc": { ++ "type": "uint32" ++ }, ++ "errmsg": { ++ "type": "string" ++ } ++ } ++} +diff --git a/src/json/schema/volume/volume.json b/src/json/schema/volume/volume.json +new file mode 100644 +index 0000000..035451f +--- /dev/null ++++ b/src/json/schema/volume/volume.json +@@ -0,0 +1,12 @@ ++{ ++ "$schema": "http://json-schema.org/draft-04/schema#", ++ "type": "object", ++ "properties": { ++ "driver": { ++ "type": "string" ++ }, ++ "name": { ++ "type": "string" ++ } ++ } ++} +-- +2.20.1 + diff --git a/0002-remove-extension-json-config-of-cni-net.patch b/0002-remove-extension-json-config-of-cni-net.patch new file mode 100644 index 0000000..f438cad --- /dev/null +++ b/0002-remove-extension-json-config-of-cni-net.patch @@ -0,0 +1,95 @@ +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 + +Signed-off-by: haozi007 +--- + src/json/schema/cni/net_conf.json | 64 ------------------------------- + 1 file changed, 64 deletions(-) + +diff --git a/src/json/schema/cni/net_conf.json b/src/json/schema/cni/net_conf.json +index 89427ae..7a03a3f 100644 +--- a/src/json/schema/cni/net_conf.json ++++ b/src/json/schema/cni/net_conf.json +@@ -43,27 +43,6 @@ + "dns": { + "$ref": "network/dns.json" + }, +- "multi_entry": { +- "type": "int32" +- }, +- "backup_mode": { +- "type": "boolean" +- }, +- "vlanID": { +- "type": "int32" +- }, +- "vlan_inside": { +- "type": "boolean" +- }, +- "vxlanID": { +- "type": "int32" +- }, +- "vxlanID_inside": { +- "type": "boolean" +- }, +- "actions": { +- "type": "string" +- }, + "args": { + "$ref": "net_args.json" + }, +@@ -84,49 +63,6 @@ + } + } + }, +- "log_level": { +- "type": "string" +- }, +- "etcd_endpoints": { +- "type": "string" +- }, +- "etcd_key_file": { +- "type": "string" +- }, +- "etcd_cert_file": { +- "type": "string" +- }, +- "etcd_ca_cert_file": { +- "type": "string" +- }, +- "mtu": { +- "type": "int32" +- }, +- "datastore_type": { +- "type": "string" +- }, +- "nodename": { +- "type": "string" +- }, +- "policy": { +- "type": "object", +- "properties": { +- "type": { +- "type": "string" +- } +- } +- }, +- "kubernetes": { +- "type": "object", +- "properties": { +- "kubeconfig": { +- "type": "string" +- } +- } +- }, +- "snat": { +- "type": "boolean" +- }, + "capabilities": { + "$ref": "../defs.json#/definitions/mapStringBool" + } +-- +2.20.1 + diff --git a/0003-fix-ctest-error-when-use-make.patch b/0003-fix-ctest-error-when-use-make.patch new file mode 100644 index 0000000..7ea0a7b --- /dev/null +++ b/0003-fix-ctest-error-when-use-make.patch @@ -0,0 +1,26 @@ +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 + +Signed-off-by: haozi007 +--- + tests/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt +index 8110f10..39d0270 100644 +--- a/tests/CMakeLists.txt ++++ b/tests/CMakeLists.txt +@@ -83,7 +83,7 @@ target_link_libraries(mock_ut + ${GTEST_LIBRARY} + pthread + ) +-add_dependencies(mock_ut log_ut libocispec_ut) ++add_dependencies(mock_ut log_ut libocispec_ut go_crc64_ut) + + # run ut and gcov + if (ENABLE_GCOV) +-- +2.20.1 + diff --git a/lcr.spec b/lcr.spec index 819f4a9..c3e7546 100644 --- a/lcr.spec +++ b/lcr.spec @@ -1,5 +1,5 @@ %global _version 2.0.4 -%global _release 20201014.151549.gita811a32f +%global _release 20201112.184125.gite8506076 %global _inner_name isula_libutils Name: lcr @@ -12,6 +12,10 @@ Group: Applications/System License: LGPLv2.1+ 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 + BuildRequires: cmake BuildRequires: lxc BuildRequires: lxc-devel @@ -99,6 +103,12 @@ rm -rf %{buildroot} %changelog +* Thu Nov 12 2020 gaohuatao - 2.0.4-20201112.184125.gite8506076 +- Type:update from master +- ID:NA +- SUG:NA +- DESC: update from master + * Wed Oct 14 2020 lifeng - 2.0.4-20201014.151549.gita811a32f - Type:upgrade to v2.0.4 - ID:NA