From d09e800e7b2529e528ca2228ab74526531aeeedb Mon Sep 17 00:00:00 2001 From: Jason Heath Date: Fri, 31 May 2024 12:06:04 +0000 Subject: [PATCH] Revert "fixes windows 7 support" - reverts commit 97eff719b40c671b24a8518d6700a0169b494bbe - addresses RUSTSEC-2020-0016 and RUSTSEC-2022-0041 Signed-off-by: Jason Heath --- .cargo/audit.toml | 25 -- Cargo.lock | 388 ++++++----------------- components/launcher-client/Cargo.toml | 8 +- components/launcher-client/src/client.rs | 25 +- components/launcher-client/src/error.rs | 40 +-- components/launcher/Cargo.toml | 8 +- 6 files changed, 115 insertions(+), 379 deletions(-) diff --git a/.cargo/audit.toml b/.cargo/audit.toml index 2018f2058c..8db1bbddb5 100644 --- a/.cargo/audit.toml +++ b/.cargo/audit.toml @@ -12,13 +12,11 @@ # # advisory IDs to ignore e.g. ["RUSTSEC-2019-0001", ...] ignore = [ - "RUSTSEC-2020-0016", # Unmaintained: net2 "RUSTSEC-2021-0137", # Unmaintained: sodiumoxide "RUSTSEC-2021-0139", # Unmaintained: ansi_term "RUSTSEC-2021-0145", # Unsound, Unmaintained: atty "RUSTSEC-2022-0006", # Vulnerability (???): thread_local "RUSTSEC-2022-0013", # Vulnerability (7.5 High), regex - "RUSTSEC-2022-0041", # Unsound: crossbeam-utils "RUSTSEC-2022-0071", # Unmaintained: rusoto ] informational_warnings = [ @@ -51,29 +49,6 @@ show_tree = true # Show inverse dependency trees along with advisories (default: enabled = true # Warn for yanked crates in Cargo.lock (default: true) update_index = true # Auto-update the crates.io index (default: true) -#------------------------------------------------------------------------------- -# "RUSTSEC-2020-0016", # Unmaintained: net2 -# "RUSTSEC-2022-0041", # Unsound: crossbeam-utils -#------------------------------------------------------------------------------- -# -# Our Windows 7 support currently requires ipc-channel@0.15.0 -# -# net2 0.2.37 -# ├── miow 0.2.2 -# │ └── mio 0.6.23 -# │ └── ipc-channel 0.15.0 -# │ ├── habitat-launcher-client 0.0.0 -# │ │ └── habitat_sup 0.0.0 -# │ └── habitat-launcher 0.0.0 -# └── mio 0.6.23 -# -# crossbeam-utils 0.7.2 -# └── crossbeam-channel 0.4.4 -# └── ipc-channel 0.15.0 -# ├── habitat-launcher-client 0.0.0 -# │ └── habitat_sup 0.0.0 -# └── habitat-launcher 0.0.0 -# #------------------------------------------------------------------------------- # "RUSTSEC-2021-0137", # Unmaintained: sodiumoxide #------------------------------------------------------------------------------- diff --git a/Cargo.lock b/Cargo.lock index d60b97bfa9..9331ae5b14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -48,7 +48,7 @@ dependencies = [ "mime", "percent-encoding", "pin-project-lite", - "rand 0.8.5", + "rand", "sha1", "smallvec", "tokio", @@ -73,7 +73,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13d324164c51f63867b57e73ba5936ea151b8a41a1d23d1031eeb9f70d0236f8" dependencies = [ "bytestring", - "cfg-if 1.0.0", + "cfg-if", "http 0.2.8", "regex-lite", "serde", @@ -102,7 +102,7 @@ dependencies = [ "actix-utils", "futures-core", "futures-util", - "mio 0.8.11", + "mio", "num_cpus", "socket2 0.4.9", "tokio", @@ -166,7 +166,7 @@ dependencies = [ "ahash", "bytes", "bytestring", - "cfg-if 1.0.0", + "cfg-if", "derive_more", "encoding_rs", "futures-core", @@ -218,8 +218,8 @@ version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" dependencies = [ - "cfg-if 1.0.0", - "getrandom 0.2.10", + "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -270,7 +270,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -367,7 +367,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -384,7 +384,7 @@ checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide 0.4.4", "object", @@ -529,12 +529,6 @@ version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -664,7 +658,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9e393a7668fe1fad3075085b86c781883000b4ede868f43627b34a87c8b7ded" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -691,17 +685,7 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-channel" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87" -dependencies = [ - "crossbeam-utils 0.7.2", - "maybe-uninit", + "cfg-if", ] [[package]] @@ -710,19 +694,8 @@ version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a33c2bf77f2df06183c3aa30d1e96c0695a313d4f9c453cc3762a6db39f99200" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils 0.8.15", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg", - "cfg-if 0.1.10", - "lazy_static 1.4.0", + "cfg-if", + "crossbeam-utils", ] [[package]] @@ -731,7 +704,7 @@ version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -872,7 +845,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -896,7 +869,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -905,7 +878,7 @@ version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5766087c2235fec47fafa4cfecc81e494ee679d0fd4a59887ea0919bfb0e4fc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "socket2 0.5.5", "windows-sys 0.48.0", @@ -938,7 +911,7 @@ version = "0.8.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1043,7 +1016,7 @@ version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4029edd3e734da6fe05b6cd7bd2960760a616bd2ddd0d59a0124746d6272af0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.3.5", "windows-sys 0.48.0", @@ -1102,7 +1075,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1114,22 +1087,6 @@ dependencies = [ "libc", ] -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags 1.3.2", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - [[package]] name = "futures" version = "0.3.30" @@ -1229,7 +1186,7 @@ dependencies = [ "libc", "log 0.4.21", "rustversion", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1242,26 +1199,15 @@ dependencies = [ "version_check", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", ] [[package]] @@ -1340,10 +1286,10 @@ dependencies = [ "tokio", "toml 0.8.2", "url", - "uuid 1.4.1", + "uuid", "walkdir", "widestring 1.1.0", - "winapi 0.3.9", + "winapi", "winreg 0.52.0", ] @@ -1363,7 +1309,7 @@ dependencies = [ "prost", "semver 1.0.23", "thiserror", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1430,7 +1376,7 @@ dependencies = [ "log 0.4.21", "prost", "prost-build", - "rand 0.8.5", + "rand", "serde", "tempfile", "tokio", @@ -1452,8 +1398,8 @@ dependencies = [ "log 0.4.21", "pbr", "percent-encoding", - "rand 0.8.5", - "regex 1.10.5", + "rand", + "regex 0.2.11", "reqwest", "serde", "serde_json", @@ -1479,14 +1425,14 @@ dependencies = [ "prometheus", "prost", "prost-build", - "rand 0.8.5", + "rand", "serde", "serde_json", "tempfile", "threadpool", "toml 0.8.2", - "uuid 1.4.1", - "winapi 0.3.9", + "uuid", + "winapi", "zmq", ] @@ -1525,9 +1471,9 @@ dependencies = [ "thiserror", "tokio", "toml 0.8.2", - "uuid 1.4.1", + "uuid", "valico", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1556,7 +1502,7 @@ dependencies = [ "paste", "pem", "pin-project", - "rand 0.8.5", + "rand", "rcgen", "regex 1.10.5", "reqwest", @@ -1576,7 +1522,7 @@ dependencies = [ "toml 0.8.2", "url", "widestring 1.1.0", - "winapi 0.3.9", + "winapi", "windows-acl", "xz2", ] @@ -1681,7 +1627,7 @@ dependencies = [ "libc", "log 0.4.21", "log4rs", - "mio 0.8.11", + "mio", "multimap", "nix 0.29.0", "notify", @@ -1692,7 +1638,7 @@ dependencies = [ "prost", "prost-build", "prost-types", - "rand 0.8.5", + "rand", "rants", "regex 1.10.5", "reqwest", @@ -1713,9 +1659,9 @@ dependencies = [ "tokio-util 0.7.11", "toml 0.8.2", "url", - "uuid 1.4.1", + "uuid", "valico", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1725,7 +1671,7 @@ dependencies = [ "cc", "log 0.4.21", "widestring 1.1.0", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1935,7 +1881,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1994,32 +1940,23 @@ dependencies = [ "libc", ] -[[package]] -name = "iovec" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] - [[package]] name = "ipc-channel" -version = "0.15.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9b32d360ae2d4662212f1d29bc8a277256f49029cea20fd6c182b89819aea7" +checksum = "b8d038e61635aad6528b810a652e68efd09fc02551b6d108ae7c5c86285c6b40" dependencies = [ "bincode", - "crossbeam-channel 0.4.4", + "crossbeam-channel", "fnv", "lazy_static 1.4.0", "libc", - "mio 0.6.23", - "rand 0.7.3", + "mio", + "rand", "serde", "tempfile", - "uuid 0.8.2", - "winapi 0.3.9", + "uuid", + "windows", ] [[package]] @@ -2077,16 +2014,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "kqueue" version = "1.0.7" @@ -2232,7 +2159,7 @@ dependencies = [ "log-mdc", "once_cell", "parking_lot", - "rand 0.8.5", + "rand", "serde", "serde-value", "serde_json", @@ -2240,7 +2167,7 @@ dependencies = [ "thiserror", "thread-id", "typemap-ors", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2249,7 +2176,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2111607c723d7857e0d8299d5ce7a0bf4b844d3e44f8de136b13da513eaf8fc4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "generator", "scoped-tls", "serde", @@ -2267,12 +2194,6 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "md-5" version = "0.9.1" @@ -2341,25 +2262,6 @@ dependencies = [ "adler", ] -[[package]] -name = "mio" -version = "0.6.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" -dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", - "libc", - "log 0.4.21", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - [[package]] name = "mio" version = "0.8.11" @@ -2368,29 +2270,17 @@ checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", "log 0.4.21", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi", "windows-sys 0.48.0", ] -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", -] - [[package]] name = "mktemp" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69fed8fbcd01affec44ac226784c6476a6006d98d13e33bc0ca7977aaf046bd8" dependencies = [ - "uuid 1.4.1", + "uuid", ] [[package]] @@ -2419,17 +2309,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "net2" -version = "0.2.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", -] - [[package]] name = "nix" version = "0.28.0" @@ -2437,7 +2316,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" dependencies = [ "bitflags 2.5.0", - "cfg-if 1.0.0", + "cfg-if", "cfg_aliases 0.1.1", "libc", ] @@ -2449,7 +2328,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71e2746dc3a24dd78b3cfcb7be93368c6de9963d30f43a6a73998a9cf4b17b46" dependencies = [ "bitflags 2.5.0", - "cfg-if 1.0.0", + "cfg-if", "cfg_aliases 0.2.1", "libc", ] @@ -2471,14 +2350,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" dependencies = [ "bitflags 2.5.0", - "crossbeam-channel 0.5.8", + "crossbeam-channel", "filetime", "fsevent-sys", "inotify", "kqueue", "libc", "log 0.4.21", - "mio 0.8.11", + "mio", "walkdir", "windows-sys 0.48.0", ] @@ -2539,7 +2418,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79a4c6c3a2b158f7f8f2a2fc5a969fa3a068df6fc9dbb4a43845436e3af7c800" dependencies = [ "bitflags 2.5.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -2629,7 +2508,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "995f667a6c822200b0433ac218e05582f0e2efa1b922a3fd2fbaadc5f87bab37" dependencies = [ "backtrace", - "cfg-if 1.0.0", + "cfg-if", "libc", "petgraph", "redox_syscall 0.2.10", @@ -2650,9 +2529,9 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed5827dfa0d69b6c92493d6c38e633bbaa5937c153d0d7c28bf12313f8c6d514" dependencies = [ - "crossbeam-channel 0.5.8", + "crossbeam-channel", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2722,7 +2601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1181c94580fa345f50f19d738aaa39c0ed30a600d95cb2d3e23f94266f14fbf" dependencies = [ "phf_shared", - "rand 0.8.5", + "rand", ] [[package]] @@ -2838,7 +2717,7 @@ version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3d33c28a30771f7f96db69893f78b857f7450d7e0237e9c8fc6427a81bae7ed1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fnv", "lazy_static 1.4.0", "memchr", @@ -2936,19 +2815,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -2956,18 +2822,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha", + "rand_core", ] [[package]] @@ -2977,16 +2833,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core 0.6.3", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", + "rand_core", ] [[package]] @@ -2995,16 +2842,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" dependencies = [ - "getrandom 0.2.10", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", + "getrandom", ] [[package]] @@ -3018,7 +2856,7 @@ dependencies = [ "native-tls", "nom", "pin-project", - "rand 0.8.5", + "rand", "safer_owning_ref", "serde", "serde_json", @@ -3026,7 +2864,7 @@ dependencies = [ "tokio-native-tls", "tokio-stream", "tokio-util 0.7.11", - "uuid 1.4.1", + "uuid", ] [[package]] @@ -3066,7 +2904,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "getrandom 0.2.10", + "getrandom", "redox_syscall 0.2.10", ] @@ -3169,7 +3007,7 @@ name = "retry" version = "1.0.0" source = "git+https://github.com/habitat-sh/retry#42c71e75aa231d8bf9befa7a0ec93dd570a21454" dependencies = [ - "rand 0.8.5", + "rand", "tokio", ] @@ -3185,7 +3023,7 @@ dependencies = [ "spin 0.5.2", "untrusted 0.7.1", "web-sys", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3195,7 +3033,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb0205304757e5d899b9c2e448b867ffd03ae7f988002e47cd24954391394d0b" dependencies = [ "cc", - "getrandom 0.2.10", + "getrandom", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3408,7 +3246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ "lazy_static 1.4.0", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3586,7 +3424,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c77f4e7f65455545c2153c1253d25056825e77ee2533f0e41deb65a93a34852f" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures 0.2.5", "digest 0.10.3", ] @@ -3598,7 +3436,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b362ae5752fd2137731f9fa25fd4d9058af34666ca1966fb969119cc35719f12" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures 0.1.5", "digest 0.9.0", "opaque-debug", @@ -3650,7 +3488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3790,7 +3628,7 @@ version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "rustix", "windows-sys 0.52.0", @@ -3854,7 +3692,7 @@ checksum = "5fdfe0627923f7411a43ec9ec9c39c3a9b4151be313e0922042581fb6c9b717f" dependencies = [ "libc", "redox_syscall 0.2.10", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -3910,7 +3748,7 @@ dependencies = [ "backtrace", "bytes", "libc", - "mio 0.8.11", + "mio", "num_cpus", "parking_lot", "pin-project-lite", @@ -4072,7 +3910,7 @@ version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a400e31aa60b9d44a52a8ee0343b5b18566b03a8321e0d321f695cf56e940160" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log 0.4.21", "pin-project-lite", "tracing-core", @@ -4213,22 +4051,13 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.10", -] - [[package]] name = "uuid" version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79daa5ed5740825c40b389c5e50312b9c86df53fccd33f281df655642b43869d" dependencies = [ - "getrandom 0.2.10", + "getrandom", ] [[package]] @@ -4252,7 +4081,7 @@ dependencies = [ "serde_json", "uritemplate-next", "url", - "uuid 1.4.1", + "uuid", ] [[package]] @@ -4293,12 +4122,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -4311,7 +4134,7 @@ version = "0.2.75" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b608ecc8f4198fe8680e2ed18eccab5f0cd4caaf3d83516fa5fb2e927fda2586" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -4336,7 +4159,7 @@ version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "16646b21c3add8e13fdb8f20172f8a28c3dbf62f45406bcff0233188226cfe0c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -4399,12 +4222,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -4415,12 +4232,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -4433,7 +4244,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4442,6 +4253,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-acl" version = "0.3.0" @@ -4451,7 +4271,7 @@ dependencies = [ "field-offset", "libc", "widestring 0.4.3", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4644,7 +4464,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -4653,20 +4473,10 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "xattr" version = "1.3.1" diff --git a/components/launcher-client/Cargo.toml b/components/launcher-client/Cargo.toml index 81681f3347..8b40631254 100644 --- a/components/launcher-client/Cargo.toml +++ b/components/launcher-client/Cargo.toml @@ -11,13 +11,7 @@ env_logger = "*" habitat_core = { path = "../core" } habitat-launcher-protocol = { path = "../launcher-protocol" } habitat_common = { path = "../common" } -# TODO: In order to support certain customers who are still using Windows 7 until -# January 2024, it is necessary to freeze the version of this crate at 0.15.0. -# Newer versions of this crate use a Windows syscall called 'GetOverlappedResultEx', -# which is not supported on versions of Windows prior to 8. -# For more information about 'GetOverlappedResultEx', please refer to the following documentation: https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresultex -# The commit that introduced the change can be found here: https://github.com/servo/ipc-channel/commit/eb08381a30bc71a534a0a73ab98c05bca7a12f82 -ipc-channel = { version = "0.15.0" } +ipc-channel = { version = "*" } libc = "*" log = "0.4" prost = "*" diff --git a/components/launcher-client/src/client.rs b/components/launcher-client/src/client.rs index ee5e01c70f..b93d60ed26 100644 --- a/components/launcher-client/src/client.rs +++ b/components/launcher-client/src/client.rs @@ -1,11 +1,10 @@ -use crate::{error::{ConnectError, - IPCCommandError, - IPCReadError, - ReceiveError, - SendError, - TryIPCCommandError, - TryReceiveError}, - IPCError}; +use crate::error::{ConnectError, + IPCCommandError, + IPCReadError, + ReceiveError, + SendError, + TryIPCCommandError, + TryReceiveError}; use habitat_common::types::UserInfo; use habitat_core::os::process::Pid; use habitat_launcher_protocol as protocol; @@ -94,7 +93,7 @@ impl LauncherCli { { match rx.recv() { Ok(bytes) => Ok(Self::read(&bytes)?), - Err(err) => Err(ReceiveError::IPCReceive(err.into())), + Err(err) => Err(ReceiveError::IPCReceive(err)), } } @@ -132,7 +131,7 @@ impl LauncherCli { thread::sleep(Duration::from_millis(5)); } Err(TryRecvError::IpcError(err)) => { - return Err(TryReceiveError::IPCReceive(err.into())); + return Err(TryReceiveError::IPCReceive(err)); } } if start_time.elapsed() > timeout { @@ -161,7 +160,7 @@ impl LauncherCli { Ok(Some(msg)) } Err(TryRecvError::Empty) => Ok(None), - Err(TryRecvError::IpcError(err)) => Err(ReceiveError::IPCReceive(err.into())), + Err(TryRecvError::IpcError(err)) => Err(ReceiveError::IPCReceive(err)), } } @@ -172,9 +171,7 @@ impl LauncherCli { // Received a shutdown command Ok(Some(_)) => LauncherStatus::GracefullyShutdown, // Launcher IPC channel was disconnected - Err(ReceiveError::IPCReceive(IPCError(IpcError::Disconnected))) => { - LauncherStatus::Shutdown - } + Err(ReceiveError::IPCReceive(IpcError::Disconnected)) => LauncherStatus::Shutdown, // Received a bad message, or encountered an IO error while communicating via IPC Err(err) => { error!("Unexpected IPC communication error while checking for a shutdown \ diff --git a/components/launcher-client/src/error.rs b/components/launcher-client/src/error.rs index 42c317d9a7..644b9a29f7 100644 --- a/components/launcher-client/src/error.rs +++ b/components/launcher-client/src/error.rs @@ -1,7 +1,5 @@ use habitat_launcher_protocol as protocol; -use ipc_channel::ipc::IpcError; -use std::{fmt, - io}; +use std::io; use thiserror::Error; /// Errors that occur when attempting to estabish an IPC channel to the Habitat Launcher @@ -66,7 +64,7 @@ pub enum ReceiveError { #[error("Failed to read launcher command response")] IPCRead(#[from] IPCReadError), #[error("Failed to receive IPC command response from launcher")] - IPCReceive(#[from] IPCError), + IPCReceive(#[from] ipc_channel::ipc::IpcError), } /// Errors that occur when attempting to non-blocking receive command responses from the Habitat @@ -76,39 +74,7 @@ pub enum TryReceiveError { #[error("Failed to try reading launcher command response")] IPCRead(#[from] IPCReadError), #[error("Failed to try receiving IPC command response from launcher")] - IPCReceive(#[from] IPCError), + IPCReceive(#[from] ipc_channel::ipc::IpcError), #[error("Timed out trying to receive IPC command response from launcher")] Timeout, } - -// TODO: Remove this wrapper type once we upgrade ipc-channel to 0.16+ -// This is a wrapper type around the ipc_channel::ipc::IpcError that is -// required because it does not implement std::error::Error prior to -// version 0.16+. We need an older version of the crate to ensure that -// habitat works for some of our customers using Windows 7 until Jan 2024. -#[derive(Debug)] -pub struct IPCError(pub ipc_channel::ipc::IpcError); - -impl From for IPCError { - fn from(value: ipc_channel::ipc::IpcError) -> Self { IPCError(value) } -} - -impl fmt::Display for IPCError { - fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result { - match self.0 { - IpcError::Bincode(ref err) => write!(fmt, "bincode error: {}", err), - IpcError::Io(ref err) => write!(fmt, "io error: {}", err), - IpcError::Disconnected => write!(fmt, "disconnected"), - } - } -} - -impl std::error::Error for IPCError { - fn source(&self) -> Option<&(dyn std::error::Error + 'static)> { - match self.0 { - IpcError::Bincode(ref err) => Some(err), - IpcError::Io(ref err) => Some(err), - IpcError::Disconnected => None, - } - } -} diff --git a/components/launcher/Cargo.toml b/components/launcher/Cargo.toml index 8d7a465646..d3a430bc1b 100644 --- a/components/launcher/Cargo.toml +++ b/components/launcher/Cargo.toml @@ -15,13 +15,7 @@ env_logger = "*" habitat_common = { path = "../common" } habitat_core = { path = "../core" } habitat-launcher-protocol = { path = "../launcher-protocol" } -# TODO: In order to support certain customers who are still using Windows 7 until -# January 2024, it is necessary to freeze the version of this crate at 0.15.0. -# Newer versions of this crate use a Windows syscall called 'GetOverlappedResultEx', -# which is not supported on versions of Windows prior to 8. -# For more information about 'GetOverlappedResultEx', please refer to the following documentation: https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-getoverlappedresultex -# The commit that introduced the change can be found here: https://github.com/servo/ipc-channel/commit/eb08381a30bc71a534a0a73ab98c05bca7a12f82 -ipc-channel = { version = "0.15.0" } +ipc-channel = { version = "*" } libc = "*" log = "0.4" prost = "*"