diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7c4126c201..bf6fbb65eb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,7 +9,7 @@ on: env: CARGO_TERM_COLOR: always GO_VERSION: '1.21' - ACTION_MSRV_TOOLCHAIN: 1.75.0 + ACTION_MSRV_TOOLCHAIN: 1.66.1 NIX_VERSION: '2.21.0' jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1469713fcd..048789ebe7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: env: CARGO_TERM_COLOR: always GO_VERSION: '1.21' - ACTION_MSRV_TOOLCHAIN: 1.75.0 + ACTION_MSRV_TOOLCHAIN: 1.66.1 jobs: build: diff --git a/Cargo.lock b/Cargo.lock index 879fb405ce..2e68d73579 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -52,9 +52,9 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.6" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -284,17 +284,11 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - [[package]] name = "clap" -version = "4.3.8" +version = "4.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9394150f5b4273a1763355bd1c2ec54cc5a2593f790587bcd6b2c947cfa9211" +checksum = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487" dependencies = [ "clap_builder", "clap_derive", @@ -303,13 +297,12 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.8" +version = "4.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a78fbdd3cc2914ddf37ba444114bc7765bbdcb55ec9cbe6fa054f0137400717" +checksum = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e" dependencies = [ "anstream", "anstyle", - "bitflags 1.3.2", "clap_lex", "once_cell", "strsim", @@ -320,9 +313,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.2" +version = "4.3.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8cd2b2a819ad6eec39e8f1d6b53001af1e5469f8c177579cdaeb313115b825f" +checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" dependencies = [ "heck", "proc-macro2", @@ -348,7 +341,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7bb11bd1378bf3731b182997b40cefe00aba6a6cc74042c8318c1b271d3badf7" dependencies = [ - "nix 0.27.1", + "nix", "thiserror", "tokio", ] @@ -380,7 +373,7 @@ dependencies = [ "memchr", "mockall", "multimap", - "nix 0.28.0", + "nix", "notify", "once_cell", "opentelemetry", @@ -501,15 +494,6 @@ dependencies = [ "parking_lot_core", ] -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", -] - [[package]] name = "digest" version = "0.10.7" @@ -1017,9 +1001,9 @@ checksum = "06d198e9919d9822d5f7083ba8530e04de87841eaf21ead9af8f2304efd57c89" [[package]] name = "itertools" -version = "0.12.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" dependencies = [ "either", ] @@ -1101,7 +1085,7 @@ dependencies = [ "hmac", "libc", "log", - "nix 0.27.1", + "nix", "nom", "once_cell", "serde", @@ -1255,19 +1239,6 @@ dependencies = [ "memoffset", ] -[[package]] -name = "nix" -version = "0.28.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" -dependencies = [ - "bitflags 2.4.1", - "cfg-if", - "cfg_aliases", - "libc", - "memoffset", -] - [[package]] name = "nom" version = "7.1.3" @@ -1307,12 +1278,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - [[package]] name = "num-traits" version = "0.2.18" @@ -1508,12 +1473,6 @@ version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.17" @@ -1527,7 +1486,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "059a34f111a9dee2ce1ac2826a68b24601c4298cfeb1a587c3cb493d5ab46f52" dependencies = [ "libc", - "nix 0.28.0", + "nix", ] [[package]] @@ -1591,9 +1550,9 @@ dependencies = [ [[package]] name = "prost" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f5d036824e4761737860779c906171497f6d55681139d8312388f8fe398922" +checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" dependencies = [ "bytes", "prost-derive", @@ -1601,9 +1560,9 @@ dependencies = [ [[package]] name = "prost-derive" -version = "0.12.4" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19de2de2a00075bf566bee3bd4db014b11587e84184d3f7a791bc17f1a8e9e48" +checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", "itertools", @@ -1989,16 +1948,13 @@ dependencies = [ [[package]] name = "time" -version = "0.3.36" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +checksum = "59e399c068f43a5d116fedaf73b203fa4f9c519f17e2b34f63221d3792f81446" dependencies = [ - "deranged", "itoa", "libc", - "num-conv", "num_threads", - "powerfmt", "serde", "time-core", "time-macros", @@ -2006,17 +1962,16 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.2" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" +checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.18" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +checksum = "96ba15a897f3c86766b757e5ac7221554c6750054d74d5b28844fce5fb36a6c4" dependencies = [ - "num-conv", "time-core", ] diff --git a/conmon-rs/server/Cargo.toml b/conmon-rs/server/Cargo.toml index 35038db9bb..511f164b04 100644 --- a/conmon-rs/server/Cargo.toml +++ b/conmon-rs/server/Cargo.toml @@ -11,7 +11,7 @@ path = "src/main.rs" anyhow = "1.0.82" capnp = "0.19.3" capnp-rpc = "0.19.0" -clap = { version = "4.3.8", features = ["color", "cargo", "deprecated", "derive", "deprecated", "env", "string", "unicode", "wrap_help"] } +clap = { version = "=4.3.24", features = ["color", "cargo", "deprecated", "derive", "deprecated", "env", "string", "unicode", "wrap_help"] } command-fds = { version = "0.3.0", features = ["tokio"] } conmon-common = { path = "../common" } futures = "0.3.30" @@ -21,7 +21,7 @@ libc = "0.2.153" libsystemd = "0.7.0" memchr = "2.7.2" multimap = "0.10.0" -nix = { version = "0.28.0", features = ["fs", "hostname", "mount", "sched", "signal", "socket", "term", "user"] } +nix = { version = "=0.27.1", features = ["fs", "hostname", "mount", "sched", "signal", "socket", "term", "user"] } notify = "6.1.1" once_cell = "1.19.0" opentelemetry = "0.22.0" @@ -53,4 +53,4 @@ dashmap = "5.5.3" [dev-dependencies] mockall = "0.12.1" -time = { version = "0.3.36", features = ["parsing"] } +time = { version = "=0.3.23", features = ["parsing"] } diff --git a/conmon-rs/server/src/attach.rs b/conmon-rs/server/src/attach.rs index bc048551cf..72295c8944 100644 --- a/conmon-rs/server/src/attach.rs +++ b/conmon-rs/server/src/attach.rs @@ -5,7 +5,7 @@ use crate::{ use anyhow::{bail, Context, Result}; use nix::{ errno::Errno, - sys::socket::{bind, listen, socket, AddressFamily, Backlog, SockFlag, SockType, UnixAddr}, + sys::socket::{bind, listen, socket, AddressFamily, SockFlag, SockType, UnixAddr}, }; use std::{ os::{ @@ -158,7 +158,7 @@ impl Attach { let mut permissions = metadata.permissions(); permissions.set_mode(0o700); - listen(&fd, Backlog::new(10).context("create backlog")?).context("listen on socket fd")?; + listen(&fd, 10).context("listen on socket fd")?; task::spawn( async move { @@ -246,7 +246,7 @@ impl Attach { debug!("Read {} stdin bytes from client", buf.len()); tx.send(buf).context("send data message")?; } - Err(e) => match Errno::from_raw(e.raw_os_error().context("get OS error")?) { + Err(e) => match Errno::from_i32(e.raw_os_error().context("get OS error")?) { Errno::EIO => { debug!("Stopping read loop because of IO error"); return Ok(()); diff --git a/conmon-rs/server/src/container_io.rs b/conmon-rs/server/src/container_io.rs index 19c555ad1e..8118d6e220 100644 --- a/conmon-rs/server/src/container_io.rs +++ b/conmon-rs/server/src/container_io.rs @@ -279,7 +279,7 @@ impl ContainerIO { } } - Err(e) => match Errno::from_raw(e.raw_os_error().context("get OS error")?) { + Err(e) => match Errno::from_i32(e.raw_os_error().context("get OS error")?) { Errno::EIO => { debug!("Stopping read loop"); attach diff --git a/conmon-rs/server/src/server.rs b/conmon-rs/server/src/server.rs index 3d0a0adbff..42eabeff00 100644 --- a/conmon-rs/server/src/server.rs +++ b/conmon-rs/server/src/server.rs @@ -19,7 +19,7 @@ use conmon_common::conmon_capnp::conmon::{self, CgroupManager}; use futures::{AsyncReadExt, FutureExt}; use getset::Getters; use nix::{ - errno::Errno, + errno, libc::_exit, sys::signal::Signal, unistd::{fork, ForkResult}, @@ -123,7 +123,7 @@ impl Server { // now that we've forked, set self to childreaper prctl::set_child_subreaper(true) - .map_err(Errno::from_raw) + .map_err(errno::from_i32) .context("set child subreaper")?; let enable_tracing = self.config().enable_tracing(); diff --git a/dependencies.yaml b/dependencies.yaml index bef0f21573..e734af33c8 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -11,7 +11,7 @@ dependencies: match: GO_VERSION - name: rust - version: 1.75.0 + version: 1.66.1 refPaths: - path: .github/workflows/ci.yml match: ACTION_MSRV_TOOLCHAIN