From 51526b25a194ae41c1093d74204932bd5206b8f7 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Mon, 20 Mar 2023 12:16:09 +0200 Subject: [PATCH 01/13] Minor cargo clippy fixes. Signed-off-by: Ismo Puustinen --- crates/containerd-shim-wasm/src/sandbox/shim.rs | 4 ++-- crates/oci-tar-builder/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/containerd-shim-wasm/src/sandbox/shim.rs b/crates/containerd-shim-wasm/src/sandbox/shim.rs index d79b39321..22cf3e2fd 100644 --- a/crates/containerd-shim-wasm/src/sandbox/shim.rs +++ b/crates/containerd-shim-wasm/src/sandbox/shim.rs @@ -963,7 +963,7 @@ where // Per the spec, the prestart hook must be called as part of the create operation debug!("call prehook before the start"); - oci::setup_prestart_hooks(&spec.hooks())?; + oci::setup_prestart_hooks(spec.hooks())?; Ok(api::CreateTaskResponse { pid: std::process::id(), @@ -1286,7 +1286,7 @@ fn setup_namespaces(spec: &runtime::Spec) -> Result<()> { for ns in namespaces { if ns.typ() == runtime::LinuxNamespaceType::Network { if let Some(p) = ns.path() { - let f = File::open(&p).map_err(|err| { + let f = File::open(p).map_err(|err| { ShimError::Other(format!( "could not open network namespace {}: {}", p.display(), diff --git a/crates/oci-tar-builder/src/lib.rs b/crates/oci-tar-builder/src/lib.rs index 716608cb9..beb2a00dc 100644 --- a/crates/oci-tar-builder/src/lib.rs +++ b/crates/oci-tar-builder/src/lib.rs @@ -83,7 +83,7 @@ impl Builder { let mut th = tar::Header::new_gnu(); th.set_mode(0o444); - th.set_size(meta.len() as u64); + th.set_size(meta.len()); let p = "blobs/sha256/".to_owned() + &dgst; th.set_path(&p).context("could not set path for layer")?; th.set_cksum(); From cc3c6d51506699080967f2e56ae1119ae4ad51c4 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Tue, 21 Mar 2023 16:49:25 +0000 Subject: [PATCH 02/13] CI: Add rustfmt and cargo clippy to CI Signed-off-by: jiaxiao zhou --- .github/workflows/ci.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 22412a479..5e38ee52d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,24 @@ env: CARGO_TERM_COLOR: always jobs: + fmt: + runs-on: "ubuntu-latest" + steps: + - uses: Swatinem/rust-cache@v2 + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Setup WasmEdge build env + run: | + curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --version=0.11.2 + echo "LD_LIBRARY_PATH=$HOME/.wasmedge/lib" >> $GITHUB_ENV + - name: Run cargo fmt + run: | + cargo fmt --all -- --check + - name: Run cargo clippy + run: | + cargo clippy --all --all-targets --all-features -- -D warnings build: strategy: matrix: From bc8c7a0341f0836d0f8be1a090361452a63a6bf1 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Tue, 21 Mar 2023 16:51:45 +0000 Subject: [PATCH 03/13] run rustfmt Signed-off-by: jiaxiao zhou --- .../src/bin/containerd-wasmedged/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/containerd-shim-wasmedge/src/bin/containerd-wasmedged/main.rs b/crates/containerd-shim-wasmedge/src/bin/containerd-wasmedged/main.rs index c741c4983..af05c113a 100644 --- a/crates/containerd-shim-wasmedge/src/bin/containerd-wasmedged/main.rs +++ b/crates/containerd-shim-wasmedge/src/bin/containerd-wasmedged/main.rs @@ -3,8 +3,8 @@ use std::sync::Arc; use containerd_shim_wasm::sandbox::EngineGetter; use containerd_shim_wasm::sandbox::{Local, ManagerService}; use containerd_shim_wasm::services::sandbox_ttrpc::{create_manager, Manager}; -use log::info; use containerd_shim_wasmedge::instance::Wasi as WasiInstance; +use log::info; use ttrpc::{self, Server}; fn main() { From 556ba005d6ab150e3c79c949f49f4b51315096f6 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Tue, 21 Mar 2023 18:05:27 +0000 Subject: [PATCH 04/13] remove all-features flag from clippy Signed-off-by: jiaxiao zhou --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5e38ee52d..520eb44e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ jobs: cargo fmt --all -- --check - name: Run cargo clippy run: | - cargo clippy --all --all-targets --all-features -- -D warnings + cargo clippy --all --all-targets -- -D warnings build: strategy: matrix: From 669b4637dd89dc7a5a09d59f7882aa7b927daf2e Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Wed, 22 Mar 2023 14:32:31 +0200 Subject: [PATCH 05/13] Fix Clippy-detected issues. Mark unfixed clippy warnings as allowed. The idea is that we'll catch new errors in CI and also we can fix the existing warnings whenever we like. Signed-off-by: Ismo Puustinen --- .../src/sandbox/cgroups/cgroupv1.rs | 4 ++-- .../src/sandbox/cgroups/cgroupv2.rs | 3 +-- .../containerd-shim-wasm/src/sandbox/exec.rs | 1 + .../src/services/sandbox_ttrpc.rs | 1 + .../containerd-shim-wasmedge/src/instance.rs | 22 +++++++++---------- .../containerd-shim-wasmtime/src/instance.rs | 2 +- 6 files changed, 17 insertions(+), 16 deletions(-) diff --git a/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv1.rs b/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv1.rs index 46c3e3955..4ff0d2049 100644 --- a/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv1.rs +++ b/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv1.rs @@ -156,8 +156,8 @@ impl Cgroup for CgroupV1 { } self.controllers - .iter() - .map(|(kind, _subsys)| { + .keys() + .map(|kind| { if kind == "cpuset" { return Ok(()); } diff --git a/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs b/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs index c6376aa9b..94b9cbcb1 100644 --- a/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs +++ b/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs @@ -244,8 +244,7 @@ impl Cgroup for CgroupV2 { if let Some(weight) = blkio.weight() { if weight != 0 { // Use BFQ - if let Err(_) = - ensure_write_file(self.get_file(IO_BFQ_WEIGHT)?, &format!("{}", weight)) + if ensure_write_file(self.get_file(IO_BFQ_WEIGHT)?, &format!("{}", weight)).is_err() { // Fallback to io.weight with a conversion scheme ensure_write_file( diff --git a/crates/containerd-shim-wasm/src/sandbox/exec.rs b/crates/containerd-shim-wasm/src/sandbox/exec.rs index 540ecffa2..958d0ee27 100644 --- a/crates/containerd-shim-wasm/src/sandbox/exec.rs +++ b/crates/containerd-shim-wasm/src/sandbox/exec.rs @@ -143,6 +143,7 @@ pub fn has_cap_sys_admin() -> bool { /// Code that runs in the child must not do things like access locks or other shared state. /// The child should not depend on other threads in the parent process since the new process becomes single threaded. /// +/// # Safety /// This is marked as unsafe because this can effect things like mutex locks or other previously shared state which is no longer shared (with the child process) after the fork. pub unsafe fn fork(cgroup: Option<&dyn Cgroup>) -> Result { let mut builder = Clone3::default(); diff --git a/crates/containerd-shim-wasm/src/services/sandbox_ttrpc.rs b/crates/containerd-shim-wasm/src/services/sandbox_ttrpc.rs index c8f2387cf..17b2a1322 100644 --- a/crates/containerd-shim-wasm/src/services/sandbox_ttrpc.rs +++ b/crates/containerd-shim-wasm/src/services/sandbox_ttrpc.rs @@ -27,6 +27,7 @@ pub struct ManagerClient { } impl ManagerClient { + #[allow(clippy::redundant_field_names)] pub fn new(client: ::ttrpc::Client) -> Self { ManagerClient { client: client, diff --git a/crates/containerd-shim-wasmedge/src/instance.rs b/crates/containerd-shim-wasmedge/src/instance.rs index 8a721fd83..955730ec7 100644 --- a/crates/containerd-shim-wasmedge/src/instance.rs +++ b/crates/containerd-shim-wasmedge/src/instance.rs @@ -131,29 +131,29 @@ pub fn prepare_module( ); debug!("opening stdin"); - let stdin = maybe_open_stdio(&stdin_path).context("could not open stdin")?; - if stdin.is_some() { + let maybe_stdin = maybe_open_stdio(&stdin_path).context("could not open stdin")?; + if let Some(stdin) = maybe_stdin { unsafe { STDIN_FD = Some(dup(STDIN_FILENO)); - dup2(stdin.unwrap(), STDIN_FILENO); + dup2(stdin, STDIN_FILENO); } } debug!("opening stdout"); - let stdout = maybe_open_stdio(&stdout_path).context("could not open stdout")?; - if stdout.is_some() { + let maybe_stdout = maybe_open_stdio(&stdout_path).context("could not open stdout")?; + if let Some(stdout) = maybe_stdout { unsafe { STDOUT_FD = Some(dup(STDOUT_FILENO)); - dup2(stdout.unwrap(), STDOUT_FILENO); + dup2(stdout, STDOUT_FILENO); } } debug!("opening stderr"); - let stderr = maybe_open_stdio(&stderr_path).context("could not open stderr")?; - if stderr.is_some() { + let maybe_stderr = maybe_open_stdio(&stderr_path).context("could not open stderr")?; + if let Some(stderr) = maybe_stderr { unsafe { STDERR_FD = Some(dup(STDERR_FILENO)); - dup2(stderr.unwrap(), STDERR_FILENO); + dup2(stderr, STDERR_FILENO); } } @@ -235,7 +235,7 @@ impl Instance for Wasi { // TODO: How to get exit code? // This was relatively straight forward in go, but wasi and wasmtime are totally separate things in rust. - let _ret = match vm.run_func(Some("main"), "_start", params!()) { + match vm.run_func(Some("main"), "_start", params!()) { Ok(_) => std::process::exit(0), Err(_) => std::process::exit(137), }; @@ -255,7 +255,7 @@ impl Instance for Wasi { let fd = lr .as_ref() .ok_or_else(|| Error::FailedPrecondition("module is not running".to_string()))?; - fd.kill(SIGKILL as i32) + fd.kill(SIGKILL) } fn delete(&self) -> Result<(), Error> { diff --git a/crates/containerd-shim-wasmtime/src/instance.rs b/crates/containerd-shim-wasmtime/src/instance.rs index 83be8a2fb..6d46b6a0d 100644 --- a/crates/containerd-shim-wasmtime/src/instance.rs +++ b/crates/containerd-shim-wasmtime/src/instance.rs @@ -221,7 +221,7 @@ impl Instance for Wasi { // TODO: How to get exit code? // This was relatively straight forward in go, but wasi and wasmtime are totally separate things in rust. - let _ret = match f.call(&mut store, &[], &mut []) { + match f.call(&mut store, &[], &mut []) { Ok(_) => std::process::exit(0), Err(_) => std::process::exit(137), }; From 000e221e03b755e3d651cf441b854a3962c4eec6 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Tue, 28 Mar 2023 20:56:41 +0000 Subject: [PATCH 06/13] Apply rustfmt Signed-off-by: jiaxiao zhou --- crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs b/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs index 94b9cbcb1..addfb7c14 100644 --- a/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs +++ b/crates/containerd-shim-wasm/src/sandbox/cgroups/cgroupv2.rs @@ -244,7 +244,8 @@ impl Cgroup for CgroupV2 { if let Some(weight) = blkio.weight() { if weight != 0 { // Use BFQ - if ensure_write_file(self.get_file(IO_BFQ_WEIGHT)?, &format!("{}", weight)).is_err() + if ensure_write_file(self.get_file(IO_BFQ_WEIGHT)?, &format!("{}", weight)) + .is_err() { // Fallback to io.weight with a conversion scheme ensure_write_file( From a980341c1102bc3a5942b815132b72d673987300 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Wed, 29 Mar 2023 08:14:48 +0300 Subject: [PATCH 07/13] Last clippy fixes. Signed-off-by: Ismo Puustinen --- crates/containerd-shim-wasm/src/sandbox/cgroups/mod.rs | 8 ++++---- crates/containerd-shim-wasm/src/sandbox/exec.rs | 2 +- crates/containerd-shim-wasmedge/src/instance.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/crates/containerd-shim-wasm/src/sandbox/cgroups/mod.rs b/crates/containerd-shim-wasm/src/sandbox/cgroups/mod.rs index a810ad236..36567d076 100644 --- a/crates/containerd-shim-wasm/src/sandbox/cgroups/mod.rs +++ b/crates/containerd-shim-wasm/src/sandbox/cgroups/mod.rs @@ -331,7 +331,7 @@ pub mod tests { format!("{}{}", prefix, rand::random::()) } - fn cgroup_test(cg: Box<&dyn Cgroup>) -> Result<()> { + fn cgroup_test(cg: &dyn Cgroup) -> Result<()> { let s: Spec = json::from_str( r#" { @@ -373,7 +373,7 @@ pub mod tests { debug!("cgroup: {}", cg.version()); - cgroup_test(Box::new(&cg)).unwrap(); + cgroup_test(&cg).unwrap(); if cg.version() == Version::V2 { let fd = cg.open()?; nix::unistd::close(fd)?; @@ -385,7 +385,7 @@ pub mod tests { ); cg.delete_all()?; - cgroup_test(Box::new(&cg)).unwrap(); + cgroup_test(&cg).unwrap(); if cg.version() == Version::V2 { let fd = cg.open()?; nix::unistd::close(fd)?; @@ -396,7 +396,7 @@ pub mod tests { generate_random("/absolute") + "/nested/containerd-wasm-shim-test_cgroup", ); cg.delete_all()?; - cgroup_test(Box::new(&cg)).unwrap(); + cgroup_test(&cg).unwrap(); if cg.version() == Version::V2 { let fd = cg.open()?; nix::unistd::close(fd)?; diff --git a/crates/containerd-shim-wasm/src/sandbox/exec.rs b/crates/containerd-shim-wasm/src/sandbox/exec.rs index 958d0ee27..61c76b582 100644 --- a/crates/containerd-shim-wasm/src/sandbox/exec.rs +++ b/crates/containerd-shim-wasm/src/sandbox/exec.rs @@ -233,7 +233,7 @@ mod tests { match ret { Ok(Context::Parent(tid, pidfd)) => { // Make sure the child has setup signal handlers - let res = read(r, &mut vec![0]); + let res = read(r, &mut [0]); _ = close(r); res.unwrap(); diff --git a/crates/containerd-shim-wasmedge/src/instance.rs b/crates/containerd-shim-wasmedge/src/instance.rs index 955730ec7..d037f1b7f 100644 --- a/crates/containerd-shim-wasmedge/src/instance.rs +++ b/crates/containerd-shim-wasmedge/src/instance.rs @@ -391,7 +391,7 @@ mod wasitest { ))); } }; - return res; + res } #[test] From a445acb528f56141df4fd0719dfb57a5258e4088 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Wed, 26 Apr 2023 18:09:03 +0000 Subject: [PATCH 08/13] Resolve clippy issues Signed-off-by: jiaxiao zhou --- Cargo.lock | 535 ++++++++++-------- .../containerd-shim-wasm/src/sandbox/shim.rs | 2 +- 2 files changed, 308 insertions(+), 229 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8293bf13e..fdf2b22cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,18 +30,18 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" dependencies = [ "memchr", ] [[package]] name = "ambient-authority" -version = "0.0.1" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8ad6edb4840b78c5c3d88de606b22252d552b55f3a4699fbb10fc070ec3049" +checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" [[package]] name = "android_system_properties" @@ -60,13 +60,13 @@ checksum = "7de8ce5e0f9f8d88245311066a578d72b7af3e7088f32783804676302df237e4" [[package]] name = "async-trait" -version = "0.1.67" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86ea188f25f0255d8f92797797c97ebf5631fa88178beb1a46fdf5622c9a00e4" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.15", ] [[package]] @@ -118,18 +118,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c70beb79cbb5ce9c4f8e20849978f34225931f665bb49efa6982875a4d5facb3" - -[[package]] -name = "block-buffer" -version = "0.9.0" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "generic-array", -] +checksum = "24a6904aef64d73cf10ab17ebace7befb918b82164785cb89907993be7f83813" [[package]] name = "block-buffer" @@ -142,9 +133,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "9b1ce199063694f33ffb7dd4e0ee620741495c32833cde5aa08f02a0bf96f0c8" [[package]] name = "byteorder" @@ -160,38 +151,38 @@ checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cap-fs-ext" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07d9cd7dc1d714d59974a6a68bed489c914b7b2620d1d4334d88d5ec9f29ebbd" +checksum = "e1742f5106155d46a41eac5f730ee189bf92fde6ae109fbf2cdb67176726ca5d" dependencies = [ "cap-primitives", "cap-std", - "io-lifetimes 1.0.9", - "windows-sys 0.45.0", + "io-lifetimes 1.0.10", + "windows-sys 0.48.0", ] [[package]] name = "cap-primitives" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e41334d53bab60f94878253f8a950c231596c8bbb99b4f71b13223dd48e18c6" +checksum = "42068f579028e856717d61423645c85d2d216dde8eff62c9b30140e725c79177" dependencies = [ "ambient-authority", - "fs-set-times", + "fs-set-times 0.19.1", "io-extras", - "io-lifetimes 1.0.9", + "io-lifetimes 1.0.10", "ipnet", "maybe-owned", - "rustix 0.36.11", - "windows-sys 0.45.0", + "rustix 0.37.14", + "windows-sys 0.48.0", "winx", ] [[package]] name = "cap-rand" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b5ddc7e3565e7cc4bf20d0c386b328f9e0f1b83fe0bcc0e055a1f08245e2aca" +checksum = "d3be2ededc13f42a5921c08e565b854cb5ff9b88753e2c6ec12c58a24e7e8d4e" dependencies = [ "ambient-authority", "rand", @@ -199,26 +190,25 @@ dependencies = [ [[package]] name = "cap-std" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9dd840c16dee1df417f3985d173a2bb6ef55d48ea3d4deddcef46f31c9e7028" +checksum = "559ad6fab5fedcc9bd5877160e1433fcd481f8af615068d6ca49472b1201cc6c" dependencies = [ "cap-primitives", "io-extras", - "io-lifetimes 1.0.9", - "ipnet", - "rustix 0.36.11", + "io-lifetimes 1.0.10", + "rustix 0.37.14", ] [[package]] name = "cap-time-ext" -version = "1.0.7" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c39790e8e7455a92993bea5a2e947721c395cfbc344b74f092746c55441d76" +checksum = "2a74e04cd32787bfa3a911af745b0fd5d99d4c3fc16c64449e1622c06fa27c8e" dependencies = [ "cap-primitives", "once_cell", - "rustix 0.36.11", + "rustix 0.37.14", "winx", ] @@ -280,9 +270,9 @@ dependencies = [ [[package]] name = "clang-sys" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a" +checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f" dependencies = [ "glob", "libc", @@ -301,9 +291,9 @@ dependencies = [ [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] @@ -439,9 +429,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpp_demangle" @@ -454,9 +444,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58" dependencies = [ "libc", ] @@ -570,9 +560,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c" +checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ "cfg-if 1.0.0", "crossbeam-utils", @@ -633,9 +623,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9c00419335c41018365ddf7e4d5f1c12ee3659ddcf3e01974650ba1de73d038" +checksum = "f61f1b6389c3fe1c316bf8a4dccc90a38208354b330925bce1f74a6c4756eb93" dependencies = [ "cc", "cxxbridge-flags", @@ -645,9 +635,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb8307ad413a98fff033c8545ecf133e3257747b3bae935e7602aab8aa92d4ca" +checksum = "12cee708e8962df2aeb38f594aae5d827c022b6460ac71a7a3e2c3c2aae5a07b" dependencies = [ "cc", "codespan-reporting", @@ -655,24 +645,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.5", + "syn 2.0.15", ] [[package]] name = "cxxbridge-flags" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc52e2eb08915cb12596d29d55f0b5384f00d697a646dbd269b6ecb0fbd9d31" +checksum = "7944172ae7e4068c533afbb984114a56c46e9ccddda550499caa222902c7f7bb" [[package]] name = "cxxbridge-macro" -version = "1.0.93" +version = "1.0.94" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "631569015d0d8d54e6c241733f944042623ab6df7bc3be7466874b05fcdb1c5f" +checksum = "2345488264226bf682893e25de0769f3360aac9957980ec49361b083ddaa5bc5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.15", ] [[package]] @@ -813,22 +803,13 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - [[package]] name = "digest" version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ - "block-buffer 0.10.4", + "block-buffer", "crypto-common", ] @@ -903,6 +884,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "errno" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a" +dependencies = [ + "errno-dragonfly", + "libc", + "windows-sys 0.48.0", +] + [[package]] name = "errno-dragonfly" version = "0.1.2" @@ -930,13 +922,13 @@ dependencies = [ [[package]] name = "fd-lock" -version = "3.0.10" +version = "3.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ef1a30ae415c3a691a4f41afddc2dbcd6d70baf338368d85ebc1e8ed92cedb9" +checksum = "39ae6b3d9530211fb3b12a95374b8b0823be812f53d09e18c5675c0146b09642" dependencies = [ "cfg-if 1.0.0", - "rustix 0.36.11", - "windows-sys 0.45.0", + "rustix 0.37.14", + "windows-sys 0.48.0", ] [[package]] @@ -951,14 +943,14 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.20" +version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412" +checksum = "5cbc844cecaee9d4443931972e1289c8ff485cb4cc2767cb03ca139ed6885153" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", - "windows-sys 0.45.0", + "redox_syscall 0.2.16", + "windows-sys 0.48.0", ] [[package]] @@ -1004,16 +996,27 @@ version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "857cf27edcb26c2a36d84b2954019573d335bb289876113aceacacdca47a4fd4" dependencies = [ - "io-lifetimes 1.0.9", - "rustix 0.36.11", + "io-lifetimes 1.0.10", + "rustix 0.36.13", "windows-sys 0.45.0", ] +[[package]] +name = "fs-set-times" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7833d0f115a013d51c55950a3b09d30e4b057be9961b709acb9b5b17a1108861" +dependencies = [ + "io-lifetimes 1.0.10", + "rustix 0.37.14", + "windows-sys 0.48.0", +] + [[package]] name = "futures" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "531ac96c6ff5fd7c62263c5e3c67a603af4fcaee2e1a0ae5565ba3a11e69e549" +checksum = "23342abe12aba583913b2e62f22225ff9c950774065e4bfb61a19cd9770fec40" dependencies = [ "futures-channel", "futures-core", @@ -1026,9 +1029,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "164713a5a0dcc3e7b4b1ed7d3b433cabc18025386f9339346e8daf15963cf7ac" +checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2" dependencies = [ "futures-core", "futures-sink", @@ -1036,15 +1039,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86d7a0c1aa76363dac491de0ee99faf6941128376f1cf96f07db7603b7de69dd" +checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c" [[package]] name = "futures-executor" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1997dd9df74cdac935c76252744c1ed5794fac083242ea4fe77ef3ed60ba0f83" +checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0" dependencies = [ "futures-core", "futures-task", @@ -1054,38 +1057,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d422fa3cbe3b40dca574ab087abb5bc98258ea57eea3fd6f1fa7162c778b91" +checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-macro" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eb14ed937631bd8b8b8977f2c198443447a8355b6e3ca599f38c975e5a963b6" +checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] name = "futures-sink" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec93083a4aecafb2a80a885c9de1f0ccae9dbd32c2bb54b0c3a65690e0b8d2f2" +checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e" [[package]] name = "futures-task" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd65540d33b37b16542a0438c12e6aeead10d4ac5d05bd3f805b8f35ab592879" +checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65" [[package]] name = "futures-util" -version = "0.3.27" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ef6b17e481503ec85211fed8f39d1970f128935ca1f814cd32ac4a6842e84ab" +checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533" dependencies = [ "futures-channel", "futures-core", @@ -1110,9 +1113,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1120,9 +1123,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "c85e1d9ab2eadba7e5040d4e09cbd6d072b76a557ad64e797c2cb9d4da21d7e4" dependencies = [ "cfg-if 1.0.0", "libc", @@ -1226,9 +1229,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "iana-time-zone" -version = "0.1.54" +version = "0.1.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c17cc76786e99f8d2f055c11159e7f0091c42474dcc3189fbab96072e873e6d" +checksum = "0722cd7114b7de04316e7ea5456a0bbb20e4adb46fd27a3697adb812cff0f37c" dependencies = [ "android_system_properties", "core-foundation-sys", @@ -1266,9 +1269,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", "hashbrown 0.12.3", @@ -1286,12 +1289,12 @@ dependencies = [ [[package]] name = "io-extras" -version = "0.17.2" +version = "0.17.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d79107d6e60d78351e11f0a2dc9d0eaf304a7efb592e92603783afb8479c7d97" +checksum = "fde93d48f0d9277f977a333eca8313695ddd5301dc96f7e02aeddcb0dd99096f" dependencies = [ - "io-lifetimes 1.0.9", - "windows-sys 0.45.0", + "io-lifetimes 1.0.10", + "windows-sys 0.48.0", ] [[package]] @@ -1302,31 +1305,31 @@ checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" [[package]] name = "io-lifetimes" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09270fd4fa1111bc614ed2246c7ef56239a3063d5be0d1ec3b589c505d400aeb" +checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220" dependencies = [ "hermit-abi 0.3.1", "libc", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] name = "ipnet" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" +checksum = "12b6ee2129af8d4fb011108c73d99a1b83a85977f23b82460c0ae2e25bb4b57f" [[package]] name = "is-terminal" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8687c819457e979cc940d09cb16e42a1bf70aa6b60a549de6d3a62a0ee90c69e" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes 1.0.9", - "rustix 0.36.11", - "windows-sys 0.45.0", + "io-lifetimes 1.0.10", + "rustix 0.37.14", + "windows-sys 0.48.0", ] [[package]] @@ -1402,9 +1405,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.141" +version = "0.2.142" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3304a64d199bb964be99741b7a14d26972741915b3649639149b2479bb46f4b5" +checksum = "6a987beff54b60ffa6d51982e1aa1146bc42f19bd26be28b0586f252fccf5317" [[package]] name = "libcgroups" @@ -1427,7 +1430,7 @@ version = "0.0.5" source = "git+https://github.com/containers/youki?rev=edd63c84f903aa09510ef758ea6f617e0cb8b7e1#edd63c84f903aa09510ef758ea6f617e0cb8b7e1" dependencies = [ "anyhow", - "bitflags 2.1.0", + "bitflags 2.2.1", "caps", "chrono", "clone3", @@ -1452,9 +1455,9 @@ dependencies = [ [[package]] name = "libdbus-sys" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f8d7ae751e1cb825c840ae5e682f59b098cdfd213c350ac268b61449a5f58a0" +checksum = "06085512b750d640299b79be4bad3d2fa90a9c00b1fd9e1b46364f66f0485c72" dependencies = [ "pkg-config", ] @@ -1508,6 +1511,12 @@ version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4" +[[package]] +name = "linux-raw-sys" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36eb31c1778188ae1e64398743890d0877fef36d11521ac60406b42016e8c2cf" + [[package]] name = "lock_api" version = "0.4.9" @@ -1550,11 +1559,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.36.11", + "rustix 0.37.14", ] [[package]] @@ -1765,12 +1774,6 @@ version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" -[[package]] -name = "opaque-debug" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" - [[package]] name = "output_vt100" version = "0.1.3" @@ -1798,7 +1801,7 @@ checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall", + "redox_syscall 0.2.16", "smallvec", "windows-sys 0.45.0", ] @@ -1918,9 +1921,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.52" +version = "1.0.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d0e1ae9e836cc3beddd63db0df682593d7e2d3d891ae8c9083d2113e1744224" +checksum = "2b63bdb0cd06f1f4dedf69b254734f9b45af66e4a031e42a7480257d9898b435" dependencies = [ "unicode-ident", ] @@ -1946,7 +1949,7 @@ dependencies = [ "flate2", "hex", "lazy_static", - "rustix 0.36.11", + "rustix 0.36.13", ] [[package]] @@ -2174,6 +2177,15 @@ dependencies = [ "bitflags 1.3.2", ] +[[package]] +name = "redox_syscall" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" +dependencies = [ + "bitflags 1.3.2", +] + [[package]] name = "redox_users" version = "0.4.3" @@ -2181,7 +2193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall", + "redox_syscall 0.2.16", "thiserror", ] @@ -2199,9 +2211,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.7.2" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cce168fea28d3e05f158bda4576cf0c844d5045bc2cc3620fa0292ed5bb5814c" +checksum = "af83e617f331cc6ae2da5443c602dfa5af81e517212d9d611a5b3ba1777b5370" dependencies = [ "aho-corasick", "memchr", @@ -2210,9 +2222,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.29" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" +checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" [[package]] name = "rust-criu" @@ -2228,9 +2240,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -2245,7 +2257,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" dependencies = [ "bitflags 1.3.2", - "errno", + "errno 0.2.8", "io-lifetimes 0.7.5", "libc", "linux-raw-sys 0.0.46", @@ -2254,20 +2266,34 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.11" +version = "0.36.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db4165c9963ab29e422d6c26fbc1d37f15bace6b2810221f9d925023480fcf0e" +checksum = "3a38f9520be93aba504e8ca974197f46158de5dcaa9fa04b57c57cd6a679d658" dependencies = [ "bitflags 1.3.2", - "errno", - "io-lifetimes 1.0.9", - "itoa", + "errno 0.3.1", + "io-lifetimes 1.0.10", "libc", "linux-raw-sys 0.1.4", - "once_cell", "windows-sys 0.45.0", ] +[[package]] +name = "rustix" +version = "0.37.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b864d3c18a5785a05953adeed93e2dca37ed30f18e69bba9f30079d51f363f" +dependencies = [ + "bitflags 1.3.2", + "errno 0.3.1", + "io-lifetimes 1.0.10", + "itoa", + "libc", + "linux-raw-sys 0.3.4", + "once_cell", + "windows-sys 0.48.0", +] + [[package]] name = "ryu" version = "1.0.13" @@ -2288,29 +2314,29 @@ checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1" [[package]] name = "serde" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771d4d9c4163ee138805e12c710dd365e4f44be8be0503cb1bb9eb989425d9c9" +checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.158" +version = "1.0.160" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e801c1712f48475582b7696ac71e0ca34ebb30e09338425384269d9717c62cad" +checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.15", ] [[package]] name = "serde_json" -version = "1.0.94" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea" +checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1" dependencies = [ "itoa", "ryu", @@ -2325,14 +2351,14 @@ checksum = "bcec881020c684085e55a25f7fd888954d56609ef363479dc5a1305eb0d40cab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.15", ] [[package]] name = "serial_test" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "538c30747ae860d6fb88330addbbd3e0ddbe46d662d032855596d8a8ca260611" +checksum = "0e56dd856803e253c8f298af3f4d7eb0ae5e23a737252cd90bb4f3b435033b2d" dependencies = [ "dashmap", "futures", @@ -2344,26 +2370,13 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "1.0.0" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69" +checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "syn 2.0.15", ] [[package]] @@ -2374,17 +2387,17 @@ checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ "cfg-if 1.0.0", "cpufeatures", - "digest 0.10.6", + "digest", ] [[package]] name = "sha256" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328169f167261957e83d82be47f9e36629e257c62308129033d7f7e7c173d180" +checksum = "5f9f8b5de2bac3a4ae28e9b611072a8e326d9b26c8189c0972d4c321fa684f1f" dependencies = [ "hex", - "sha2 0.9.9", + "sha2", ] [[package]] @@ -2473,9 +2486,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.5" +version = "2.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89c2d1c76a26822187a1fbb5964e3fff108bc208f02e820ab9dac1234f6b388a" +checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822" dependencies = [ "proc-macro2", "quote", @@ -2484,9 +2497,9 @@ dependencies = [ [[package]] name = "syscalls" -version = "0.6.9" +version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5370cb0d74115b12ddd7feb517742dbaaf4aae9e3c10ff0edc7c19404935075b" +checksum = "85d5ea5026b593a3da051edb60edd50a6c5b5937c8444c22a125d3fb25517e1c" dependencies = [ "cc", "serde", @@ -2495,17 +2508,17 @@ dependencies = [ [[package]] name = "system-interface" -version = "0.25.4" +version = "0.25.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f355df185d945435f24c51fda9bf01bea6acb6c0b753e1241e5cc05413a659d4" +checksum = "928ebd55ab758962e230f51ca63735c5b283f26292297c81404289cda5d78631" dependencies = [ "bitflags 1.3.2", "cap-fs-ext", "cap-std", "fd-lock", - "io-lifetimes 1.0.9", - "rustix 0.36.11", - "windows-sys 0.45.0", + "io-lifetimes 1.0.10", + "rustix 0.37.14", + "windows-sys 0.48.0", "winx", ] @@ -2528,15 +2541,15 @@ checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "tempfile" -version = "3.4.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95" +checksum = "b9fbec84f381d5795b08656e4912bec604d162bff9291d6189a78f4c8ab87998" dependencies = [ "cfg-if 1.0.0", "fastrand", - "redox_syscall", - "rustix 0.36.11", - "windows-sys 0.42.0", + "redox_syscall 0.3.5", + "rustix 0.37.14", + "windows-sys 0.45.0", ] [[package]] @@ -2565,7 +2578,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.5", + "syn 2.0.15", ] [[package]] @@ -2644,13 +2657,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.15", ] [[package]] @@ -2819,12 +2832,12 @@ dependencies = [ "cap-rand", "cap-std", "cap-time-ext", - "fs-set-times", + "fs-set-times 0.18.1", "io-extras", - "io-lifetimes 1.0.9", + "io-lifetimes 1.0.10", "is-terminal", "once_cell", - "rustix 0.36.11", + "rustix 0.36.13", "system-interface", "tracing", "wasi-common", @@ -2843,7 +2856,7 @@ dependencies = [ "cap-std", "io-extras", "log", - "rustix 0.36.11", + "rustix 0.36.13", "thiserror", "tracing", "wasmtime", @@ -3053,9 +3066,9 @@ dependencies = [ "directories-next", "file-per-thread-logger", "log", - "rustix 0.36.11", + "rustix 0.36.13", "serde", - "sha2 0.10.6", + "sha2", "toml", "windows-sys 0.45.0", "zstd", @@ -3147,7 +3160,7 @@ checksum = "17e35d335dd2461c631ba24d2326d993bd3a4bdb4b0217e5bda4f518ba0e29f3" dependencies = [ "object", "once_cell", - "rustix 0.36.11", + "rustix 0.36.13", ] [[package]] @@ -3178,7 +3191,7 @@ dependencies = [ "memoffset 0.8.0", "paste", "rand", - "rustix 0.36.11", + "rustix 0.36.13", "wasmtime-asm-macros 7.0.0", "wasmtime-environ", "wasmtime-jit-debug", @@ -3222,9 +3235,9 @@ dependencies = [ [[package]] name = "wast" -version = "55.0.0" +version = "56.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4984d3e1406571f4930ba5cf79bd70f75f41d0e87e17506e0bd19b0e5d085f05" +checksum = "6b54185c051d7bbe23757d50fe575880a2426a2f06d2e9f6a10fd9a4a42920c0" dependencies = [ "leb128", "memchr", @@ -3234,11 +3247,11 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af2b53f4da14db05d32e70e9c617abdf6620c575bd5dd972b7400037b4df2091" +checksum = "56681922808216ab86d96bb750f70d500b5a7800e41564290fd46bb773581299" dependencies = [ - "wast 55.0.0", + "wast 56.0.0", ] [[package]] @@ -3327,11 +3340,11 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows" -version = "0.46.0" +version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdacb41e6a96a052c6cb63a144f24900236121c6f63f4f8219fef5977ecb0c25" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets", + "windows-targets 0.48.0", ] [[package]] @@ -3353,12 +3366,12 @@ version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] @@ -3368,7 +3381,16 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets", + "windows-targets 0.42.2", +] + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.0", ] [[package]] @@ -3377,21 +3399,42 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm", + "windows_aarch64_gnullvm 0.42.2", "windows_aarch64_msvc 0.42.2", "windows_i686_gnu 0.42.2", "windows_i686_msvc 0.42.2", "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm", + "windows_x86_64_gnullvm 0.42.2", "windows_x86_64_msvc 0.42.2", ] +[[package]] +name = "windows-targets" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +dependencies = [ + "windows_aarch64_gnullvm 0.48.0", + "windows_aarch64_msvc 0.48.0", + "windows_i686_gnu 0.48.0", + "windows_i686_msvc 0.48.0", + "windows_x86_64_gnu 0.48.0", + "windows_x86_64_gnullvm 0.48.0", + "windows_x86_64_msvc 0.48.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" @@ -3404,6 +3447,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" + [[package]] name = "windows_i686_gnu" version = "0.36.1" @@ -3416,6 +3465,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" +[[package]] +name = "windows_i686_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" + [[package]] name = "windows_i686_msvc" version = "0.36.1" @@ -3428,6 +3483,12 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" +[[package]] +name = "windows_i686_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" @@ -3440,12 +3501,24 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" @@ -3458,15 +3531,21 @@ version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" + [[package]] name = "winx" -version = "0.35.0" +version = "0.35.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "129cd8ee937d535e1a239d9d3c9c0525af0454bc0967d9211a251be062513520" +checksum = "1c52a121f0fbf9320d5f2a9a5d82f6cb7557eda5e8b47fc3e7f359ec866ae960" dependencies = [ "bitflags 1.3.2", - "io-lifetimes 1.0.9", - "windows-sys 0.45.0", + "io-lifetimes 1.0.10", + "windows-sys 0.48.0", ] [[package]] @@ -3517,9 +3596,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.7+zstd.1.5.4" +version = "2.0.8+zstd.1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5" +checksum = "5556e6ee25d32df2586c098bbfa278803692a20d0ab9565e049480d52707ec8c" dependencies = [ "cc", "libc", diff --git a/crates/containerd-shim-wasm/src/sandbox/shim.rs b/crates/containerd-shim-wasm/src/sandbox/shim.rs index ff7d9d80f..383a27186 100644 --- a/crates/containerd-shim-wasm/src/sandbox/shim.rs +++ b/crates/containerd-shim-wasm/src/sandbox/shim.rs @@ -1478,7 +1478,7 @@ where fn create_task_service(&self, publisher: RemotePublisher) -> Self::T { let (tx, rx) = channel::<(String, Box)>(); - forward_events(self.namespace.to_string().clone(), publisher, rx); + forward_events(self.namespace.to_string(), publisher, rx); Local::::new( self.engine.clone(), tx.clone(), From a58a8a183bd65200226b6862001556b0d2b55d81 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Wed, 26 Apr 2023 18:09:17 +0000 Subject: [PATCH 09/13] pin rust version to 1.69.0 in CI Signed-off-by: jiaxiao zhou --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 043f99929..b8113e857 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,8 @@ jobs: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.69.0 + components: rustfmt, clippy - name: Setup WasmEdge build env run: | curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --version=0.11.2 From 9dd0a2a8e77ac07028ece4fb16bb03aefc2c32af Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Wed, 26 Apr 2023 18:10:24 +0000 Subject: [PATCH 10/13] run rustfmt Signed-off-by: jiaxiao zhou --- crates/containerd-shim-wasmedge/src/instance.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/containerd-shim-wasmedge/src/instance.rs b/crates/containerd-shim-wasmedge/src/instance.rs index 79a56a7ac..196873fb2 100644 --- a/crates/containerd-shim-wasmedge/src/instance.rs +++ b/crates/containerd-shim-wasmedge/src/instance.rs @@ -2,9 +2,7 @@ use std::fs::{File, OpenOptions}; use std::io::prelude::*; use std::io::ErrorKind; use std::os::unix::io::{IntoRawFd, RawFd}; -use std::sync::{ - {Arc, Condvar, Mutex}, -}; +use std::sync::{Arc, Condvar, Mutex}; use std::thread; use anyhow::{bail, Context, Result}; From 3b437d05093d3706ab37af1277601f9a05279649 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Wed, 26 Apr 2023 18:24:44 +0000 Subject: [PATCH 11/13] added setup OCI runtime build env in fmt job Signed-off-by: jiaxiao zhou --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b8113e857..a97de5e61 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,10 @@ jobs: with: toolchain: 1.69.0 components: rustfmt, clippy + - name: Setup OCI runtime build env + run: | + sudo apt -y update + sudo apt install -y pkg-config libsystemd-dev libdbus-glib-1-dev build-essential libelf-dev libseccomp-dev libclang-dev - name: Setup WasmEdge build env run: | curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --version=0.11.2 @@ -41,7 +45,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: - toolchain: stable + toolchain: 1.69.0 - name: Setup OCI runtime build env run: | sudo apt -y update From 4476a1e8f980b0a694cb46adadc2c1d6b2cca3d5 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Wed, 26 Apr 2023 18:33:21 +0000 Subject: [PATCH 12/13] remove unneeded return statement to make clippy happy Signed-off-by: jiaxiao zhou --- crates/containerd-shim-wasmedge/src/instance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/containerd-shim-wasmedge/src/instance.rs b/crates/containerd-shim-wasmedge/src/instance.rs index 196873fb2..5aa30c442 100644 --- a/crates/containerd-shim-wasmedge/src/instance.rs +++ b/crates/containerd-shim-wasmedge/src/instance.rs @@ -179,7 +179,7 @@ mod rootdirtest { write!(&opts_file, "{}", serde_json::to_string(&opts)?)?; let root = determine_rootdir(dir.path(), namespace.into())?; assert_eq!(root, rootdir.join(namespace)); - return Ok(()); + Ok(()) } #[test] @@ -191,7 +191,7 @@ mod rootdirtest { root, PathBuf::from(DEFAULT_CONTAINER_ROOT_DIR).join(namespace) ); - return Ok(()); + Ok(()) } } From 256fbc03f06e263cee12b59a01414c79c84bdf65 Mon Sep 17 00:00:00 2001 From: jiaxiao zhou Date: Wed, 26 Apr 2023 18:44:18 +0000 Subject: [PATCH 13/13] Applied clippy suggestions Signed-off-by: jiaxiao zhou --- crates/containerd-shim-wasmtime/src/instance.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/crates/containerd-shim-wasmtime/src/instance.rs b/crates/containerd-shim-wasmtime/src/instance.rs index bacf22e3f..6a1c4c3b0 100644 --- a/crates/containerd-shim-wasmtime/src/instance.rs +++ b/crates/containerd-shim-wasmtime/src/instance.rs @@ -129,10 +129,7 @@ pub fn prepare_module( if let Some(strpd) = stripped { cmd = strpd.to_string(); } - let method = match iterator.next() { - Some(f) => f, - None => "_start", - }; + let method = iterator.next().unwrap_or("_start"); let mod_path = oci::get_root(spec).join(cmd); debug!("loading module from file");