From 149c2939c32a0c4e0c1576cf7e8aa57723c5282c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 07:20:14 +0000 Subject: [PATCH 1/2] Bump log from 0.4.21 to 0.4.22 Bumps [log](https://github.com/rust-lang/log) from 0.4.21 to 0.4.22. - [Release notes](https://github.com/rust-lang/log/releases) - [Changelog](https://github.com/rust-lang/log/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/log/compare/0.4.21...0.4.22) --- updated-dependencies: - dependency-name: log dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- northstar-runtime/Cargo.toml | 2 +- northstar-stress/Cargo.toml | 2 +- northstar-tests/Cargo.toml | 2 +- northstar/Cargo.toml | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 7ebb3e1ad..a63e34d08 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -776,7 +776,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -819,7 +819,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.52", + "syn 2.0.58", ] [[package]] @@ -1409,9 +1409,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" dependencies = [ "serde", ] diff --git a/northstar-runtime/Cargo.toml b/northstar-runtime/Cargo.toml index c49808b4c..2cf0b5dff 100644 --- a/northstar-runtime/Cargo.toml +++ b/northstar-runtime/Cargo.toml @@ -32,7 +32,7 @@ inotify = { version = "0.10.2", features = ["stream"], optional = true } itertools = { version = "0.12.1", optional = true } lazy_static = { version = "1.4.0", optional = true } libc = { version = "0.2.155", optional = true } -log = { version = "0.4.21", features = [ "serde", "max_level_trace", "release_max_level_debug"] } +log = { version = "0.4.22", features = [ "serde", "max_level_trace", "release_max_level_debug"] } memchr = "2.6.2" memfd = { version = "0.6.4", optional = true } memoffset = { version = "0.9.0", optional = true } diff --git a/northstar-stress/Cargo.toml b/northstar-stress/Cargo.toml index e0b84dd01..e9ce60503 100644 --- a/northstar-stress/Cargo.toml +++ b/northstar-stress/Cargo.toml @@ -14,7 +14,7 @@ clap = { version = "4.4.18", features = ["derive"] } env_logger = "0.10.2" futures = { version = "0.3.29", default-features = false } humantime = "2.1.0" -log = "0.4.21" +log = "0.4.22" northstar-client = { path = "../northstar-client" } rand = "0.8.5" tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "net", "time", "signal"] } diff --git a/northstar-tests/Cargo.toml b/northstar-tests/Cargo.toml index 88d93f332..0af93fbcc 100644 --- a/northstar-tests/Cargo.toml +++ b/northstar-tests/Cargo.toml @@ -13,7 +13,7 @@ anyhow = { version = "1.0.80", features = ["backtrace"] } env_logger = "0.10.2" futures = { version = "0.3.29", default-features = false } lazy_static = "1.4.0" -log = "0.4.21" +log = "0.4.22" memfd = "0.6.4" nanoid = "0.4.0" nix = { version = "0.29.0", features = ["sched"], default-features = false } diff --git a/northstar/Cargo.toml b/northstar/Cargo.toml index 168b748bf..c24710d0b 100644 --- a/northstar/Cargo.toml +++ b/northstar/Cargo.toml @@ -12,7 +12,7 @@ rust-version.workspace = true [dependencies] anyhow = { version = "1.0.80", features = ["backtrace"] } clap = { version = "4.4.18", features = ["derive"] } -log = { version = "0.4.21", features = ["std"] } +log = { version = "0.4.22", features = ["std"] } nix = { version = "0.29.0", default-features = false, features = ["sched", "mount"] } northstar-runtime = { version = "^0.9.2-pre", path = "../northstar-runtime", features = ["runtime", "rexec"] } tokio = { version = "1.32.0", features = ["rt-multi-thread", "macros", "signal"] } From 71a063ca006853edd449839e59d8a79cb25a1a67 Mon Sep 17 00:00:00 2001 From: Felix Obenhuber Date: Tue, 9 Jul 2024 21:38:36 +0200 Subject: [PATCH 2/2] Fix clippy --- .../src/runtime/fork/init/builder.rs | 39 +++++++------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/northstar-runtime/src/runtime/fork/init/builder.rs b/northstar-runtime/src/runtime/fork/init/builder.rs index 22c8952f4..788eda4ca 100644 --- a/northstar-runtime/src/runtime/fork/init/builder.rs +++ b/northstar-runtime/src/runtime/fork/init/builder.rs @@ -9,7 +9,7 @@ use crate::{ seccomp, }; use itertools::Itertools; -use log::warn; +use log::{debug, warn}; use nix::mount::MsFlags; use std::{ ffi::{c_void, CString}, @@ -157,7 +157,7 @@ async fn prepare_mounts<'a, I: Iterator + Clone>( } fn proc(root: &Path, target: &Path) -> Mount { - log::debug!( + debug!( "Adding proc on {} with options ro, nosuid, noexec and nodev", target.display() ); @@ -169,7 +169,7 @@ fn proc(root: &Path, target: &Path) -> Mount { } fn sysfs(root: &Path, target: &Path) -> Mount { - log::debug!( + debug!( "Adding sysfs on {} with options ro, nosuid, noexec and nodev", target.display() ); @@ -181,7 +181,7 @@ fn sysfs(root: &Path, target: &Path) -> Mount { } fn sockets(socket_dir: &Path, root: &Path, target: &Path) -> Mount { - log::debug!("Adding sockets on {}", target.display()); + debug!("Adding sockets on {}", target.display()); let target = root.join_strip(target); Mount::new( Some(socket_dir.to_owned()), @@ -196,21 +196,12 @@ fn bind(root: &Path, target: &Path, host: &Path, options: &mount::MountOptions) if host.exists() { let rw = options.contains(&mount::MountOption::Rw); let mut mounts = Vec::with_capacity(if rw { 2 } else { 1 }); - if options.is_empty() { - log::debug!( - "Adding {} on {} with flags {}", - host.display(), - target.display(), - options - ); - } else { - log::debug!( - "Adding {} on {} with flags {}", - host.display(), - target.display(), - options - ); - } + debug!( + "Adding {} on {} with flags {}", + host.display(), + target.display(), + options + ); let source = host.to_owned(); let target = root.join_strip(target); let mut flags = options_to_flags(options); @@ -224,7 +215,7 @@ fn bind(root: &Path, target: &Path, host: &Path, options: &mount::MountOptions) )); if !rw { - log::debug!( + debug!( "Adding read only remount of {} on {}", host.display(), target.display() @@ -235,7 +226,7 @@ fn bind(root: &Path, target: &Path, host: &Path, options: &mount::MountOptions) } mounts } else { - log::debug!( + debug!( "Skipping bind mount of nonexistent source {} to {}", host.display(), target.display() @@ -254,7 +245,7 @@ async fn persist( // upgrades with persistent data migration let source = config.data_dir.join(manifest.name.as_ref()); - log::debug!( + debug!( "Adding {} on {} with options nodev, nosuid and noexec", source.display(), target.display(), @@ -296,7 +287,7 @@ fn resource( src }; - log::debug!( + debug!( "Mounting {} on {} with {}", src.display(), target.display(), @@ -315,7 +306,7 @@ fn resource( } fn tmpfs(root: &Path, target: &Path, size: u64) -> Mount { - log::debug!( + debug!( "Mounting tmpfs with size {} on {}", bytesize::ByteSize::b(size), target.display()