mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
agent-ctl: Bump ttrpc from 0.6.0 to 0.7.1
Fixes: #6646 Signed-off-by: Tim Zhang <tim@hyper.sh>
This commit is contained in:
parent
eb3d20dccb
commit
76d2e30547
@ -156,6 +156,7 @@ fn codegen(path: &str, protos: &[&str], async_all: bool) -> Result<(), std::io::
|
|||||||
.customize(ttrpc_options)
|
.customize(ttrpc_options)
|
||||||
.rust_protobuf()
|
.rust_protobuf()
|
||||||
.rust_protobuf_customize(protobuf_options)
|
.rust_protobuf_customize(protobuf_options)
|
||||||
|
.rust_protobuf_customize_callback(GenSerde)
|
||||||
.run()?;
|
.run()?;
|
||||||
|
|
||||||
let autogen_comment = format!("\n//! Generated by {:?} ({:?})", file!(), module_path!());
|
let autogen_comment = format!("\n//! Generated by {:?} ({:?})", file!(), module_path!());
|
||||||
|
174
src/tools/agent-ctl/Cargo.lock
generated
174
src/tools/agent-ctl/Cargo.lock
generated
@ -31,9 +31,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.51"
|
version = "1.0.70"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b26702f315f53b6071259e15dd9d64528213b44d61de1ec926eca7715d62203"
|
checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "arc-swap"
|
name = "arc-swap"
|
||||||
@ -114,7 +114,7 @@ checksum = "d7d78656ba01f1b93024b7c3a0467f1608e4be67d725749fdcd7d2c7678fd7a2"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -131,7 +131,7 @@ checksum = "061a7acccaa286c011ddc30970520b98fa40e00c9d644633fb26b5fc63a265e3"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -176,7 +176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "fd9e32d7420c85055e8107e5b2463c4eeefeaac18b52359fe9f9c08a18f342b2"
|
checksum = "fd9e32d7420c85055e8107e5b2463c4eeefeaac18b52359fe9f9c08a18f342b2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -340,7 +340,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -351,7 +351,7 @@ checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -398,7 +398,7 @@ checksum = "f58dc3c5e468259f19f2d46304a6b28f1c3d034442e14b322d2b850e36f6d5ae"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -527,7 +527,7 @@ dependencies = [
|
|||||||
"proc-macro-hack",
|
"proc-macro-hack",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -593,9 +593,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hashbrown"
|
name = "hashbrown"
|
||||||
version = "0.11.2"
|
version = "0.12.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e"
|
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "heck"
|
name = "heck"
|
||||||
@ -651,9 +651,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "indexmap"
|
name = "indexmap"
|
||||||
version = "1.7.0"
|
version = "1.9.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5"
|
checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"hashbrown",
|
"hashbrown",
|
||||||
@ -728,7 +728,7 @@ dependencies = [
|
|||||||
"logging",
|
"logging",
|
||||||
"nix 0.23.1",
|
"nix 0.23.1",
|
||||||
"oci",
|
"oci",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"protocols",
|
"protocols",
|
||||||
"rand 0.8.4",
|
"rand 0.8.4",
|
||||||
"rustjail",
|
"rustjail",
|
||||||
@ -1084,11 +1084,11 @@ checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.34"
|
version = "1.0.56"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2f84e92c0f7c9d58328b85a78557813e4bd845130db68d7184635344399423b1"
|
checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-xid",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1129,7 +1129,7 @@ dependencies = [
|
|||||||
"itertools",
|
"itertools",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1144,31 +1144,68 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "protobuf"
|
name = "protobuf"
|
||||||
version = "2.27.1"
|
version = "2.28.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cf7e6d18738ecd0902d30d1ad232c9125985a3422929b16c65517b38adc14f96"
|
checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "protobuf"
|
||||||
|
version = "3.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"once_cell",
|
||||||
"serde_derive",
|
"protobuf-support",
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "protobuf-codegen"
|
name = "protobuf-codegen"
|
||||||
version = "2.27.1"
|
version = "2.28.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "aec1632b7c8f2e620343439a7dfd1f3c47b18906c4be58982079911482b5d707"
|
checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "protobuf-codegen-pure"
|
name = "protobuf-codegen"
|
||||||
version = "2.27.1"
|
version = "3.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "9f8122fdb18e55190c796b088a16bdb70cd7acdcd48f7a8b796b58c62e532cc6"
|
checksum = "0dd418ac3c91caa4032d37cb80ff0d44e2ebe637b2fb243b6234bf89cdac4901"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"anyhow",
|
||||||
"protobuf-codegen",
|
"once_cell",
|
||||||
|
"protobuf 3.2.0",
|
||||||
|
"protobuf-parse",
|
||||||
|
"regex",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "protobuf-parse"
|
||||||
|
version = "3.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"indexmap",
|
||||||
|
"log",
|
||||||
|
"protobuf 3.2.0",
|
||||||
|
"protobuf-support",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror",
|
||||||
|
"which",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "protobuf-support"
|
||||||
|
version = "3.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1176,7 +1213,7 @@ name = "protocols"
|
|||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"oci",
|
"oci",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"ttrpc",
|
"ttrpc",
|
||||||
@ -1185,9 +1222,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.10"
|
version = "1.0.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05"
|
checksum = "4424af4bf778aae2051a77b60283332f386554255d722233d09fbfc7e30da2fc"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@ -1347,7 +1384,7 @@ dependencies = [
|
|||||||
"nix 0.24.2",
|
"nix 0.24.2",
|
||||||
"oci",
|
"oci",
|
||||||
"path-absolutize",
|
"path-absolutize",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"protocols",
|
"protocols",
|
||||||
"regex",
|
"regex",
|
||||||
"rlimit",
|
"rlimit",
|
||||||
@ -1386,22 +1423,22 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde"
|
name = "serde"
|
||||||
version = "1.0.132"
|
version = "1.0.160"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8b9875c23cf305cd1fd7eb77234cbb705f21ea6a72c637a5c6db5fe4b8e7f008"
|
checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde_derive",
|
"serde_derive",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "serde_derive"
|
name = "serde_derive"
|
||||||
version = "1.0.132"
|
version = "1.0.160"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ecc0db5cb2556c0e558887d9bbdcf6ac4471e83ff66cf696e5419024d1606276"
|
checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 2.0.14",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1423,7 +1460,7 @@ checksum = "1fe39d9fbb0ebf5eb2c7cb7e2a47e4f462fad1379f1166b8ae49ad9eae89a7ca"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1552,6 +1589,17 @@ dependencies = [
|
|||||||
"unicode-xid",
|
"unicode-xid",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "syn"
|
||||||
|
version = "2.0.14"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "fcf316d5356ed6847742d036f8a39c3b8435cac10bd528a4bd461928a6ab34d5"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"unicode-ident",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "take_mut"
|
name = "take_mut"
|
||||||
version = "0.2.2"
|
version = "0.2.2"
|
||||||
@ -1598,7 +1646,7 @@ checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1645,7 +1693,7 @@ checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1677,7 +1725,7 @@ checksum = "11c75893af559bc8e10716548bdef5cb2b983f8e637db9d0e15126b61b484ee2"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1691,43 +1739,43 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttrpc"
|
name = "ttrpc"
|
||||||
version = "0.6.0"
|
version = "0.7.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "0c7d6c992964a013c17814c08d31708d577b0aae44ebadb58755659dd824c2d1"
|
checksum = "a35f22a2964bea14afee161665bb260b83cb48e665e0260ca06ec0e775c8b06c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"byteorder",
|
"byteorder",
|
||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"nix 0.23.1",
|
"nix 0.23.1",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"protobuf-codegen-pure",
|
"protobuf-codegen 3.2.0",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttrpc-codegen"
|
name = "ttrpc-codegen"
|
||||||
version = "0.2.0"
|
version = "0.4.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "809eda4e459820237104e4b61d6b41bbe6c9e1ce6adf4057955e6e6722a90408"
|
checksum = "94d7f7631d7a9ebed715a47cd4cb6072cbc7ae1d4ec01598971bbec0024340c2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
"protobuf-codegen",
|
"protobuf-codegen 3.2.0",
|
||||||
"protobuf-codegen-pure",
|
"protobuf-support",
|
||||||
"ttrpc-compiler",
|
"ttrpc-compiler",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttrpc-compiler"
|
name = "ttrpc-compiler"
|
||||||
version = "0.4.1"
|
version = "0.6.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2978ed3fa047d8fd55cbeb4d4a61d461fb3021a90c9618519c73ce7e5bb66c15"
|
checksum = "ec3cb5dbf1f0865a34fe3f722290fe776cacb16f50428610b779467b76ddf647"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive-new",
|
"derive-new",
|
||||||
"prost",
|
"prost",
|
||||||
"prost-build",
|
"prost-build",
|
||||||
"prost-types",
|
"prost-types",
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
"protobuf-codegen",
|
"protobuf-codegen 2.28.0",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1741,6 +1789,12 @@ dependencies = [
|
|||||||
"winapi",
|
"winapi",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "unicode-ident"
|
||||||
|
version = "1.0.8"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "unicode-segmentation"
|
name = "unicode-segmentation"
|
||||||
version = "1.8.0"
|
version = "1.8.0"
|
||||||
@ -1804,7 +1858,7 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1826,7 +1880,7 @@ checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
"wasm-bindgen-backend",
|
"wasm-bindgen-backend",
|
||||||
"wasm-bindgen-shared",
|
"wasm-bindgen-shared",
|
||||||
]
|
]
|
||||||
@ -1981,7 +2035,7 @@ dependencies = [
|
|||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"regex",
|
"regex",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -2018,5 +2072,5 @@ dependencies = [
|
|||||||
"proc-macro-crate",
|
"proc-macro-crate",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn 1.0.82",
|
||||||
]
|
]
|
||||||
|
@ -27,12 +27,12 @@ logging = { path = "../../libs/logging" }
|
|||||||
slog = "2.7.0"
|
slog = "2.7.0"
|
||||||
slog-scope = "4.4.0"
|
slog-scope = "4.4.0"
|
||||||
rand = "0.8.4"
|
rand = "0.8.4"
|
||||||
protobuf = "2.27.0"
|
protobuf = "3.2.0"
|
||||||
|
|
||||||
nix = "0.23.0"
|
nix = "0.23.0"
|
||||||
libc = "0.2.112"
|
libc = "0.2.112"
|
||||||
# XXX: Must be the same as the version used by the agent
|
# XXX: Must be the same as the version used by the agent
|
||||||
ttrpc = { version = "0.6.0" }
|
ttrpc = { version = "0.7.1" }
|
||||||
|
|
||||||
# For parsing timeouts
|
# For parsing timeouts
|
||||||
humantime = "2.1.0"
|
humantime = "2.1.0"
|
||||||
|
@ -268,8 +268,7 @@ fn root_oci_to_ttrpc(bundle_dir: &str, root: &ociRoot) -> Result<ttrpcRoot> {
|
|||||||
let ttrpc_root = ttrpcRoot {
|
let ttrpc_root = ttrpcRoot {
|
||||||
Path: path,
|
Path: path,
|
||||||
Readonly: root.readonly,
|
Readonly: root.readonly,
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(ttrpc_root)
|
Ok(ttrpc_root)
|
||||||
@ -281,9 +280,9 @@ fn process_oci_to_ttrpc(p: &ociProcess) -> ttrpcProcess {
|
|||||||
let mut b = ttrpcBox::new();
|
let mut b = ttrpcBox::new();
|
||||||
b.set_Width(s.width);
|
b.set_Width(s.width);
|
||||||
b.set_Height(s.height);
|
b.set_Height(s.height);
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let oom_score_adj: i64 = match p.oom_score_adj {
|
let oom_score_adj: i64 = match p.oom_score_adj {
|
||||||
@ -298,23 +297,23 @@ fn process_oci_to_ttrpc(p: &ociProcess) -> ttrpcProcess {
|
|||||||
|
|
||||||
// FIXME: Implement RLimits OCI spec handling (copy from p.rlimits)
|
// FIXME: Implement RLimits OCI spec handling (copy from p.rlimits)
|
||||||
//let rlimits = vec![ttrpcPOSIXRlimit::new()];
|
//let rlimits = vec![ttrpcPOSIXRlimit::new()];
|
||||||
let rlimits = protobuf::RepeatedField::new();
|
let rlimits = Vec::new();
|
||||||
|
|
||||||
let capabilities = match &p.capabilities {
|
let capabilities = match &p.capabilities {
|
||||||
Some(c) => {
|
Some(c) => {
|
||||||
let mut gc = ttrpcLinuxCapabilities::new();
|
let mut gc = ttrpcLinuxCapabilities::new();
|
||||||
gc.set_Bounding(protobuf::RepeatedField::from_slice(&c.bounding));
|
gc.set_Bounding(c.bounding.clone());
|
||||||
gc.set_Effective(protobuf::RepeatedField::from_slice(&c.effective));
|
gc.set_Effective(c.effective.clone());
|
||||||
gc.set_Inheritable(protobuf::RepeatedField::from_slice(&c.inheritable));
|
gc.set_Inheritable(c.inheritable.clone());
|
||||||
gc.set_Permitted(protobuf::RepeatedField::from_slice(&c.permitted));
|
gc.set_Permitted(c.permitted.clone());
|
||||||
gc.set_Ambient(protobuf::RepeatedField::from_slice(&c.ambient));
|
gc.set_Ambient(c.ambient.clone());
|
||||||
|
|
||||||
protobuf::SingularPtrField::some(gc)
|
protobuf::MessageField::some(gc)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut env = protobuf::RepeatedField::new();
|
let mut env = Vec::new();
|
||||||
for pair in &p.env {
|
for pair in &p.env {
|
||||||
env.push(pair.to_string());
|
env.push(pair.to_string());
|
||||||
}
|
}
|
||||||
@ -322,8 +321,8 @@ fn process_oci_to_ttrpc(p: &ociProcess) -> ttrpcProcess {
|
|||||||
ttrpcProcess {
|
ttrpcProcess {
|
||||||
Terminal: p.terminal,
|
Terminal: p.terminal,
|
||||||
ConsoleSize: console_size,
|
ConsoleSize: console_size,
|
||||||
User: protobuf::SingularPtrField::some(user),
|
User: protobuf::MessageField::some(user),
|
||||||
Args: protobuf::RepeatedField::from_vec(p.args.clone()),
|
Args: p.args.clone(),
|
||||||
Env: env,
|
Env: env,
|
||||||
Cwd: p.cwd.clone(),
|
Cwd: p.cwd.clone(),
|
||||||
Capabilities: capabilities,
|
Capabilities: capabilities,
|
||||||
@ -332,13 +331,12 @@ fn process_oci_to_ttrpc(p: &ociProcess) -> ttrpcProcess {
|
|||||||
ApparmorProfile: p.apparmor_profile.clone(),
|
ApparmorProfile: p.apparmor_profile.clone(),
|
||||||
OOMScoreAdj: oom_score_adj,
|
OOMScoreAdj: oom_score_adj,
|
||||||
SelinuxLabel: p.selinux_label.clone(),
|
SelinuxLabel: p.selinux_label.clone(),
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mount_oci_to_ttrpc(m: &ociMount) -> ttrpcMount {
|
fn mount_oci_to_ttrpc(m: &ociMount) -> ttrpcMount {
|
||||||
let mut ttrpc_options = protobuf::RepeatedField::new();
|
let mut ttrpc_options = Vec::new();
|
||||||
for op in &m.options {
|
for op in &m.options {
|
||||||
ttrpc_options.push(op.to_string());
|
ttrpc_options.push(op.to_string());
|
||||||
}
|
}
|
||||||
@ -346,17 +344,14 @@ fn mount_oci_to_ttrpc(m: &ociMount) -> ttrpcMount {
|
|||||||
ttrpcMount {
|
ttrpcMount {
|
||||||
destination: m.destination.clone(),
|
destination: m.destination.clone(),
|
||||||
source: m.source.clone(),
|
source: m.source.clone(),
|
||||||
field_type: m.r#type.clone(),
|
type_: m.r#type.clone(),
|
||||||
options: ttrpc_options,
|
options: ttrpc_options,
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn idmaps_oci_to_ttrpc(
|
fn idmaps_oci_to_ttrpc(res: &[oci::LinuxIdMapping]) -> Vec<ttrpcLinuxIDMapping> {
|
||||||
res: &[oci::LinuxIdMapping],
|
let mut ttrpc_idmaps = Vec::new();
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxIDMapping> {
|
|
||||||
let mut ttrpc_idmaps = protobuf::RepeatedField::new();
|
|
||||||
for m in res.iter() {
|
for m in res.iter() {
|
||||||
let mut idmapping = ttrpcLinuxIDMapping::default();
|
let mut idmapping = ttrpcLinuxIDMapping::default();
|
||||||
idmapping.set_HostID(m.host_id);
|
idmapping.set_HostID(m.host_id);
|
||||||
@ -367,10 +362,8 @@ fn idmaps_oci_to_ttrpc(
|
|||||||
ttrpc_idmaps
|
ttrpc_idmaps
|
||||||
}
|
}
|
||||||
|
|
||||||
fn devices_oci_to_ttrpc(
|
fn devices_oci_to_ttrpc(res: &[oci::LinuxDeviceCgroup]) -> Vec<ttrpcLinuxDeviceCgroup> {
|
||||||
res: &[oci::LinuxDeviceCgroup],
|
let mut ttrpc_devices = Vec::new();
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxDeviceCgroup> {
|
|
||||||
let mut ttrpc_devices = protobuf::RepeatedField::new();
|
|
||||||
for d in res.iter() {
|
for d in res.iter() {
|
||||||
let mut device = ttrpcLinuxDeviceCgroup::default();
|
let mut device = ttrpcLinuxDeviceCgroup::default();
|
||||||
device.set_Major(d.major.unwrap_or(0));
|
device.set_Major(d.major.unwrap_or(0));
|
||||||
@ -383,12 +376,10 @@ fn devices_oci_to_ttrpc(
|
|||||||
ttrpc_devices
|
ttrpc_devices
|
||||||
}
|
}
|
||||||
|
|
||||||
fn memory_oci_to_ttrpc(
|
fn memory_oci_to_ttrpc(res: &Option<oci::LinuxMemory>) -> protobuf::MessageField<ttrpcLinuxMemory> {
|
||||||
res: &Option<oci::LinuxMemory>,
|
|
||||||
) -> protobuf::SingularPtrField<ttrpcLinuxMemory> {
|
|
||||||
let memory = if res.is_some() {
|
let memory = if res.is_some() {
|
||||||
let mem = res.as_ref().unwrap();
|
let mem = res.as_ref().unwrap();
|
||||||
protobuf::SingularPtrField::some(ttrpcLinuxMemory {
|
protobuf::MessageField::some(ttrpcLinuxMemory {
|
||||||
Limit: mem.limit.unwrap_or(0),
|
Limit: mem.limit.unwrap_or(0),
|
||||||
Reservation: mem.reservation.unwrap_or(0),
|
Reservation: mem.reservation.unwrap_or(0),
|
||||||
Swap: mem.swap.unwrap_or(0),
|
Swap: mem.swap.unwrap_or(0),
|
||||||
@ -396,16 +387,15 @@ fn memory_oci_to_ttrpc(
|
|||||||
KernelTCP: mem.kernel_tcp.unwrap_or(0),
|
KernelTCP: mem.kernel_tcp.unwrap_or(0),
|
||||||
Swappiness: mem.swappiness.unwrap_or(0),
|
Swappiness: mem.swappiness.unwrap_or(0),
|
||||||
DisableOOMKiller: mem.disable_oom_killer.unwrap_or(false),
|
DisableOOMKiller: mem.disable_oom_killer.unwrap_or(false),
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
protobuf::SingularPtrField::none()
|
protobuf::MessageField::none()
|
||||||
};
|
};
|
||||||
memory
|
memory
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cpu_oci_to_ttrpc(res: &Option<oci::LinuxCpu>) -> protobuf::SingularPtrField<ttrpcLinuxCPU> {
|
fn cpu_oci_to_ttrpc(res: &Option<oci::LinuxCpu>) -> protobuf::MessageField<ttrpcLinuxCPU> {
|
||||||
match &res {
|
match &res {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let mut cpu = ttrpcLinuxCPU::default();
|
let mut cpu = ttrpcLinuxCPU::default();
|
||||||
@ -414,27 +404,25 @@ fn cpu_oci_to_ttrpc(res: &Option<oci::LinuxCpu>) -> protobuf::SingularPtrField<t
|
|||||||
cpu.set_Period(s.period.unwrap_or(0));
|
cpu.set_Period(s.period.unwrap_or(0));
|
||||||
cpu.set_RealtimeRuntime(s.realtime_runtime.unwrap_or(0));
|
cpu.set_RealtimeRuntime(s.realtime_runtime.unwrap_or(0));
|
||||||
cpu.set_RealtimePeriod(s.realtime_period.unwrap_or(0));
|
cpu.set_RealtimePeriod(s.realtime_period.unwrap_or(0));
|
||||||
protobuf::SingularPtrField::some(cpu)
|
protobuf::MessageField::some(cpu)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn pids_oci_to_ttrpc(res: &Option<oci::LinuxPids>) -> protobuf::SingularPtrField<ttrpcLinuxPids> {
|
fn pids_oci_to_ttrpc(res: &Option<oci::LinuxPids>) -> protobuf::MessageField<ttrpcLinuxPids> {
|
||||||
match &res {
|
match &res {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let mut b = ttrpcLinuxPids::new();
|
let mut b = ttrpcLinuxPids::new();
|
||||||
b.set_Limit(s.limit);
|
b.set_Limit(s.limit);
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn hugepage_limits_oci_to_ttrpc(
|
fn hugepage_limits_oci_to_ttrpc(res: &[oci::LinuxHugepageLimit]) -> Vec<ttrpcLinuxHugepageLimit> {
|
||||||
res: &[oci::LinuxHugepageLimit],
|
let mut ttrpc_hugepage_limits = Vec::new();
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxHugepageLimit> {
|
|
||||||
let mut ttrpc_hugepage_limits = protobuf::RepeatedField::new();
|
|
||||||
for h in res.iter() {
|
for h in res.iter() {
|
||||||
let mut hugepage_limit = ttrpcLinuxHugepageLimit::default();
|
let mut hugepage_limit = ttrpcLinuxHugepageLimit::default();
|
||||||
hugepage_limit.set_Limit(h.limit);
|
hugepage_limit.set_Limit(h.limit);
|
||||||
@ -446,28 +434,26 @@ fn hugepage_limits_oci_to_ttrpc(
|
|||||||
|
|
||||||
fn network_oci_to_ttrpc(
|
fn network_oci_to_ttrpc(
|
||||||
res: &Option<oci::LinuxNetwork>,
|
res: &Option<oci::LinuxNetwork>,
|
||||||
) -> protobuf::SingularPtrField<ttrpcLinuxNetwork> {
|
) -> protobuf::MessageField<ttrpcLinuxNetwork> {
|
||||||
match &res {
|
match &res {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let mut b = ttrpcLinuxNetwork::new();
|
let mut b = ttrpcLinuxNetwork::new();
|
||||||
b.set_ClassID(s.class_id.unwrap_or(0));
|
b.set_ClassID(s.class_id.unwrap_or(0));
|
||||||
let mut priorities = protobuf::RepeatedField::new();
|
let mut priorities = Vec::new();
|
||||||
for pr in s.priorities.iter() {
|
for pr in s.priorities.iter() {
|
||||||
let mut lip = ttrpcLinuxInterfacePriority::new();
|
let mut lip = ttrpcLinuxInterfacePriority::new();
|
||||||
lip.set_Name(pr.name.clone());
|
lip.set_Name(pr.name.clone());
|
||||||
lip.set_Priority(pr.priority);
|
lip.set_Priority(pr.priority);
|
||||||
priorities.push(lip);
|
priorities.push(lip);
|
||||||
}
|
}
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn weight_devices_oci_to_ttrpc(
|
fn weight_devices_oci_to_ttrpc(res: &[oci::LinuxWeightDevice]) -> Vec<ttrpcLinuxWeightDevice> {
|
||||||
res: &[oci::LinuxWeightDevice],
|
let mut ttrpc_weight_devices = Vec::new();
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxWeightDevice> {
|
|
||||||
let mut ttrpc_weight_devices = protobuf::RepeatedField::new();
|
|
||||||
for dev in res.iter() {
|
for dev in res.iter() {
|
||||||
let mut device = ttrpcLinuxWeightDevice::default();
|
let mut device = ttrpcLinuxWeightDevice::default();
|
||||||
device.set_Major(dev.blk.major);
|
device.set_Major(dev.blk.major);
|
||||||
@ -489,8 +475,8 @@ fn weight_devices_oci_to_ttrpc(
|
|||||||
|
|
||||||
fn throttle_devices_oci_to_ttrpc(
|
fn throttle_devices_oci_to_ttrpc(
|
||||||
res: &[oci::LinuxThrottleDevice],
|
res: &[oci::LinuxThrottleDevice],
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxThrottleDevice> {
|
) -> Vec<ttrpcLinuxThrottleDevice> {
|
||||||
let mut ttrpc_throttle_devices = protobuf::RepeatedField::new();
|
let mut ttrpc_throttle_devices = Vec::new();
|
||||||
for dev in res.iter() {
|
for dev in res.iter() {
|
||||||
let mut device = ttrpcLinuxThrottleDevice::default();
|
let mut device = ttrpcLinuxThrottleDevice::default();
|
||||||
device.set_Major(dev.blk.major);
|
device.set_Major(dev.blk.major);
|
||||||
@ -503,7 +489,7 @@ fn throttle_devices_oci_to_ttrpc(
|
|||||||
|
|
||||||
fn block_io_oci_to_ttrpc(
|
fn block_io_oci_to_ttrpc(
|
||||||
res: &Option<oci::LinuxBlockIo>,
|
res: &Option<oci::LinuxBlockIo>,
|
||||||
) -> protobuf::SingularPtrField<ttrpcLinuxBlockIO> {
|
) -> protobuf::MessageField<ttrpcLinuxBlockIO> {
|
||||||
match &res {
|
match &res {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let mut b = ttrpcLinuxBlockIO::new();
|
let mut b = ttrpcLinuxBlockIO::new();
|
||||||
@ -529,9 +515,9 @@ fn block_io_oci_to_ttrpc(
|
|||||||
b.set_ThrottleWriteIOPSDevice(throttle_devices_oci_to_ttrpc(
|
b.set_ThrottleWriteIOPSDevice(throttle_devices_oci_to_ttrpc(
|
||||||
&s.throttle_write_iops_device,
|
&s.throttle_write_iops_device,
|
||||||
));
|
));
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,15 +538,12 @@ fn resources_oci_to_ttrpc(res: &oci::LinuxResources) -> ttrpcLinuxResources {
|
|||||||
BlockIO: block_io,
|
BlockIO: block_io,
|
||||||
HugepageLimits: hugepage_limits,
|
HugepageLimits: hugepage_limits,
|
||||||
Network: network,
|
Network: network,
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn namespace_oci_to_ttrpc(
|
fn namespace_oci_to_ttrpc(res: &[oci::LinuxNamespace]) -> Vec<ttrpcLinuxNamespace> {
|
||||||
res: &[oci::LinuxNamespace],
|
let mut ttrpc_namespace = Vec::new();
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxNamespace> {
|
|
||||||
let mut ttrpc_namespace = protobuf::RepeatedField::new();
|
|
||||||
for n in res.iter() {
|
for n in res.iter() {
|
||||||
let mut ns = ttrpcLinuxNamespace::default();
|
let mut ns = ttrpcLinuxNamespace::default();
|
||||||
ns.set_Path(n.path.clone());
|
ns.set_Path(n.path.clone());
|
||||||
@ -570,10 +553,8 @@ fn namespace_oci_to_ttrpc(
|
|||||||
ttrpc_namespace
|
ttrpc_namespace
|
||||||
}
|
}
|
||||||
|
|
||||||
fn linux_devices_oci_to_ttrpc(
|
fn linux_devices_oci_to_ttrpc(res: &[oci::LinuxDevice]) -> Vec<ttrpcLinuxDevice> {
|
||||||
res: &[oci::LinuxDevice],
|
let mut ttrpc_linux_devices = Vec::new();
|
||||||
) -> protobuf::RepeatedField<ttrpcLinuxDevice> {
|
|
||||||
let mut ttrpc_linux_devices = protobuf::RepeatedField::new();
|
|
||||||
for n in res.iter() {
|
for n in res.iter() {
|
||||||
let mut ld = ttrpcLinuxDevice::default();
|
let mut ld = ttrpcLinuxDevice::default();
|
||||||
ld.set_FileMode(n.file_mode.unwrap_or(0));
|
ld.set_FileMode(n.file_mode.unwrap_or(0));
|
||||||
@ -590,22 +571,22 @@ fn linux_devices_oci_to_ttrpc(
|
|||||||
|
|
||||||
fn seccomp_oci_to_ttrpc(sec: &oci::LinuxSeccomp) -> ttrpcLinuxSeccomp {
|
fn seccomp_oci_to_ttrpc(sec: &oci::LinuxSeccomp) -> ttrpcLinuxSeccomp {
|
||||||
let mut ttrpc_seccomp = ttrpcLinuxSeccomp::default();
|
let mut ttrpc_seccomp = ttrpcLinuxSeccomp::default();
|
||||||
let mut ttrpc_arch = protobuf::RepeatedField::new();
|
let mut ttrpc_arch = Vec::new();
|
||||||
for a in &sec.architectures {
|
for a in &sec.architectures {
|
||||||
ttrpc_arch.push(std::string::String::from(a));
|
ttrpc_arch.push(std::string::String::from(a));
|
||||||
}
|
}
|
||||||
ttrpc_seccomp.set_Architectures(ttrpc_arch);
|
ttrpc_seccomp.set_Architectures(ttrpc_arch);
|
||||||
ttrpc_seccomp.set_DefaultAction(sec.default_action.clone());
|
ttrpc_seccomp.set_DefaultAction(sec.default_action.clone());
|
||||||
let mut ttrpc_flags = protobuf::RepeatedField::new();
|
let mut ttrpc_flags = Vec::new();
|
||||||
for f in &sec.flags {
|
for f in &sec.flags {
|
||||||
ttrpc_flags.push(std::string::String::from(f));
|
ttrpc_flags.push(std::string::String::from(f));
|
||||||
}
|
}
|
||||||
ttrpc_seccomp.set_Flags(ttrpc_flags);
|
ttrpc_seccomp.set_Flags(ttrpc_flags);
|
||||||
let mut ttrpc_syscalls = protobuf::RepeatedField::new();
|
let mut ttrpc_syscalls = Vec::new();
|
||||||
for sys in &sec.syscalls {
|
for sys in &sec.syscalls {
|
||||||
let mut ttrpc_sys = ttrpcLinuxSyscall::default();
|
let mut ttrpc_sys = ttrpcLinuxSyscall::default();
|
||||||
ttrpc_sys.set_Action(sys.action.clone());
|
ttrpc_sys.set_Action(sys.action.clone());
|
||||||
let mut ttrpc_args = protobuf::RepeatedField::new();
|
let mut ttrpc_args = Vec::new();
|
||||||
for arg in &sys.args {
|
for arg in &sys.args {
|
||||||
let mut a = ttrpcLinuxSeccompArg::default();
|
let mut a = ttrpcLinuxSeccompArg::default();
|
||||||
a.set_Index(arg.index as u64);
|
a.set_Index(arg.index as u64);
|
||||||
@ -632,9 +613,9 @@ fn linux_oci_to_ttrpc(l: &ociLinux) -> ttrpcLinux {
|
|||||||
let ttrpc_linux_resources = match &l.resources {
|
let ttrpc_linux_resources = match &l.resources {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let b = resources_oci_to_ttrpc(s);
|
let b = resources_oci_to_ttrpc(s);
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let ttrpc_namespaces = namespace_oci_to_ttrpc(&l.namespaces);
|
let ttrpc_namespaces = namespace_oci_to_ttrpc(&l.namespaces);
|
||||||
@ -642,17 +623,17 @@ fn linux_oci_to_ttrpc(l: &ociLinux) -> ttrpcLinux {
|
|||||||
let ttrpc_seccomp = match &l.seccomp {
|
let ttrpc_seccomp = match &l.seccomp {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let b = seccomp_oci_to_ttrpc(s);
|
let b = seccomp_oci_to_ttrpc(s);
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let ttrpc_intel_rdt = match &l.intel_rdt {
|
let ttrpc_intel_rdt = match &l.intel_rdt {
|
||||||
Some(s) => {
|
Some(s) => {
|
||||||
let b = intel_rdt_oci_to_ttrpc(s);
|
let b = intel_rdt_oci_to_ttrpc(s);
|
||||||
protobuf::SingularPtrField::some(b)
|
protobuf::MessageField::some(b)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
ttrpcLinux {
|
ttrpcLinux {
|
||||||
@ -665,38 +646,37 @@ fn linux_oci_to_ttrpc(l: &ociLinux) -> ttrpcLinux {
|
|||||||
Devices: ttrpc_linux_devices,
|
Devices: ttrpc_linux_devices,
|
||||||
Seccomp: ttrpc_seccomp,
|
Seccomp: ttrpc_seccomp,
|
||||||
RootfsPropagation: l.rootfs_propagation.clone(),
|
RootfsPropagation: l.rootfs_propagation.clone(),
|
||||||
MaskedPaths: protobuf::RepeatedField::from_slice(&l.masked_paths),
|
MaskedPaths: l.masked_paths.clone(),
|
||||||
ReadonlyPaths: protobuf::RepeatedField::from_slice(&l.readonly_paths),
|
ReadonlyPaths: l.readonly_paths.clone(),
|
||||||
MountLabel: l.mount_label.clone(),
|
MountLabel: l.mount_label.clone(),
|
||||||
IntelRdt: ttrpc_intel_rdt,
|
IntelRdt: ttrpc_intel_rdt,
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn oci_to_ttrpc(bundle_dir: &str, cid: &str, oci: &ociSpec) -> Result<ttrpcSpec> {
|
fn oci_to_ttrpc(bundle_dir: &str, cid: &str, oci: &ociSpec) -> Result<ttrpcSpec> {
|
||||||
let process = match &oci.process {
|
let process = match &oci.process {
|
||||||
Some(p) => protobuf::SingularPtrField::some(process_oci_to_ttrpc(p)),
|
Some(p) => protobuf::MessageField::some(process_oci_to_ttrpc(p)),
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let root = match &oci.root {
|
let root = match &oci.root {
|
||||||
Some(r) => {
|
Some(r) => {
|
||||||
let ttrpc_root = root_oci_to_ttrpc(bundle_dir, r)?;
|
let ttrpc_root = root_oci_to_ttrpc(bundle_dir, r)?;
|
||||||
|
|
||||||
protobuf::SingularPtrField::some(ttrpc_root)
|
protobuf::MessageField::some(ttrpc_root)
|
||||||
}
|
}
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut mounts = protobuf::RepeatedField::new();
|
let mut mounts = Vec::new();
|
||||||
for m in &oci.mounts {
|
for m in &oci.mounts {
|
||||||
mounts.push(mount_oci_to_ttrpc(m));
|
mounts.push(mount_oci_to_ttrpc(m));
|
||||||
}
|
}
|
||||||
|
|
||||||
let linux = match &oci.linux {
|
let linux = match &oci.linux {
|
||||||
Some(l) => protobuf::SingularPtrField::some(linux_oci_to_ttrpc(l)),
|
Some(l) => protobuf::MessageField::some(linux_oci_to_ttrpc(l)),
|
||||||
None => protobuf::SingularPtrField::none(),
|
None => protobuf::MessageField::none(),
|
||||||
};
|
};
|
||||||
|
|
||||||
if cid.len() < MIN_HOSTNAME_LEN as usize {
|
if cid.len() < MIN_HOSTNAME_LEN as usize {
|
||||||
@ -713,13 +693,12 @@ fn oci_to_ttrpc(bundle_dir: &str, cid: &str, oci: &ociSpec) -> Result<ttrpcSpec>
|
|||||||
Root: root,
|
Root: root,
|
||||||
Hostname: hostname,
|
Hostname: hostname,
|
||||||
Mounts: mounts,
|
Mounts: mounts,
|
||||||
Hooks: protobuf::SingularPtrField::none(),
|
Hooks: protobuf::MessageField::none(),
|
||||||
Annotations: HashMap::new(),
|
Annotations: HashMap::new(),
|
||||||
Linux: linux,
|
Linux: linux,
|
||||||
Solaris: protobuf::SingularPtrField::none(),
|
Solaris: protobuf::MessageField::none(),
|
||||||
Windows: protobuf::SingularPtrField::none(),
|
Windows: protobuf::MessageField::none(),
|
||||||
unknown_fields: protobuf::UnknownFields::new(),
|
..Default::default()
|
||||||
cached_size: protobuf::CachedSize::default(),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok(ttrpc_spec)
|
Ok(ttrpc_spec)
|
||||||
|
104
src/tools/kata-ctl/Cargo.lock
generated
104
src/tools/kata-ctl/Cargo.lock
generated
@ -13,14 +13,14 @@ dependencies = [
|
|||||||
"logging",
|
"logging",
|
||||||
"nix 0.24.3",
|
"nix 0.24.3",
|
||||||
"oci",
|
"oci",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"protocols",
|
"protocols",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"slog",
|
"slog",
|
||||||
"slog-scope",
|
"slog-scope",
|
||||||
"tokio",
|
"tokio",
|
||||||
"ttrpc",
|
"ttrpc 0.7.1",
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -657,7 +657,7 @@ dependencies = [
|
|||||||
"test-utils",
|
"test-utils",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"ttrpc",
|
"ttrpc 0.6.1",
|
||||||
"url",
|
"url",
|
||||||
"vmm-sys-util",
|
"vmm-sys-util",
|
||||||
]
|
]
|
||||||
@ -1108,9 +1108,16 @@ name = "protobuf"
|
|||||||
version = "2.28.0"
|
version = "2.28.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
|
checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "protobuf"
|
||||||
|
version = "3.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "b55bad9126f378a853655831eb7363b7b01b81d19f8cb1218861086ca4a1a61e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"serde",
|
"once_cell",
|
||||||
"serde_derive",
|
"protobuf-support",
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1119,7 +1126,22 @@ version = "2.28.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6"
|
checksum = "033460afb75cf755fcfc16dfaed20b86468082a2ea24e05ac35ab4a099a017d6"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "protobuf-codegen"
|
||||||
|
version = "3.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "0dd418ac3c91caa4032d37cb80ff0d44e2ebe637b2fb243b6234bf89cdac4901"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"once_cell",
|
||||||
|
"protobuf 3.2.0",
|
||||||
|
"protobuf-parse",
|
||||||
|
"regex",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1128,18 +1150,33 @@ version = "2.28.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "95a29399fc94bcd3eeaa951c715f7bea69409b2445356b00519740bcd6ddd865"
|
checksum = "95a29399fc94bcd3eeaa951c715f7bea69409b2445356b00519740bcd6ddd865"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
"protobuf-codegen",
|
"protobuf-codegen 2.28.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "protobuf-codegen-pure3"
|
name = "protobuf-parse"
|
||||||
version = "2.28.1"
|
version = "3.2.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "b0a3cf0a7de7570cb67bfb9a9a585b5841b49790a1be0ef104340a2110b91135"
|
checksum = "9d39b14605eaa1f6a340aec7f320b34064feb26c93aec35d6a9a2272a8ddfa49"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"anyhow",
|
||||||
"protobuf-codegen",
|
"indexmap",
|
||||||
|
"log",
|
||||||
|
"protobuf 3.2.0",
|
||||||
|
"protobuf-support",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror",
|
||||||
|
"which",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "protobuf-support"
|
||||||
|
version = "3.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a5d4d7b8601c814cfb36bcebb79f0e61e45e1e93640cf778837833bbed05c372"
|
||||||
|
dependencies = [
|
||||||
|
"thiserror",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1148,8 +1185,8 @@ version = "0.1.0"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"oci",
|
"oci",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"ttrpc",
|
"ttrpc 0.7.1",
|
||||||
"ttrpc-codegen",
|
"ttrpc-codegen",
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -1774,6 +1811,21 @@ name = "ttrpc"
|
|||||||
version = "0.6.1"
|
version = "0.6.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "2ecfff459a859c6ba6668ff72b34c2f1d94d9d58f7088414c2674ad0f31cc7d8"
|
checksum = "2ecfff459a859c6ba6668ff72b34c2f1d94d9d58f7088414c2674ad0f31cc7d8"
|
||||||
|
dependencies = [
|
||||||
|
"byteorder",
|
||||||
|
"libc",
|
||||||
|
"log",
|
||||||
|
"nix 0.23.2",
|
||||||
|
"protobuf 2.28.0",
|
||||||
|
"protobuf-codegen-pure",
|
||||||
|
"thiserror",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "ttrpc"
|
||||||
|
version = "0.7.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a35f22a2964bea14afee161665bb260b83cb48e665e0260ca06ec0e775c8b06c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
@ -1781,8 +1833,8 @@ dependencies = [
|
|||||||
"libc",
|
"libc",
|
||||||
"log",
|
"log",
|
||||||
"nix 0.23.2",
|
"nix 0.23.2",
|
||||||
"protobuf",
|
"protobuf 3.2.0",
|
||||||
"protobuf-codegen-pure",
|
"protobuf-codegen 3.2.0",
|
||||||
"thiserror",
|
"thiserror",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-vsock",
|
"tokio-vsock",
|
||||||
@ -1790,28 +1842,26 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttrpc-codegen"
|
name = "ttrpc-codegen"
|
||||||
version = "0.2.2"
|
version = "0.4.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "df80affc2cf8c589172b05ba2b8e8a88722ebf4e28b86604615497a8b6fb78c0"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
"protobuf-codegen",
|
"protobuf-codegen 3.2.0",
|
||||||
"protobuf-codegen-pure3",
|
"protobuf-support",
|
||||||
"ttrpc-compiler",
|
"ttrpc-compiler",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ttrpc-compiler"
|
name = "ttrpc-compiler"
|
||||||
version = "0.4.2"
|
version = "0.6.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "8db19ce6af25713061dd805d6733b6f0c45904bd63526ce5d2568c858b7edc71"
|
checksum = "ec3cb5dbf1f0865a34fe3f722290fe776cacb16f50428610b779467b76ddf647"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"derive-new",
|
"derive-new",
|
||||||
"prost",
|
"prost",
|
||||||
"prost-build",
|
"prost-build",
|
||||||
"prost-types",
|
"prost-types",
|
||||||
"protobuf",
|
"protobuf 2.28.0",
|
||||||
"protobuf-codegen",
|
"protobuf-codegen 2.28.0",
|
||||||
"tempfile",
|
"tempfile",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user