From 33539a63cb53f8f7141e4e67142c04cc03b6a7ce Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Thu, 12 Dec 2024 14:19:13 +0100 Subject: [PATCH 1/3] Update in-toto dependency --- Cargo.lock | 215 ++++++++++++---------------------------------- worker/Cargo.toml | 2 +- 2 files changed, 55 insertions(+), 162 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 5fa3e52..e16cc55 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,7 +30,7 @@ dependencies = [ "actix-service", "actix-utils", "ahash", - "base64 0.22.1", + "base64", "bitflags", "brotli", "bytes", @@ -65,7 +65,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" dependencies = [ "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -182,7 +182,7 @@ dependencies = [ "actix-router", "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -315,7 +315,7 @@ checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -350,12 +350,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -521,10 +515,10 @@ version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -631,7 +625,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn", ] [[package]] @@ -642,7 +636,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -670,7 +664,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.90", + "syn", ] [[package]] @@ -705,7 +699,7 @@ dependencies = [ "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -725,7 +719,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "209c735641a413bc68c4923a9d6ad4bcb3ca306b794edaa7eb0b3228a99ffb25" dependencies = [ - "syn 2.0.90", + "syn", ] [[package]] @@ -767,7 +761,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -784,10 +778,10 @@ checksum = "c5d9abe6314103864cc2d8901b7ae224e0ab1a103a0a416661b4097b0779b607" dependencies = [ "darling", "either", - "heck 0.5.0", + "heck", "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -893,12 +887,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "futures" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" - [[package]] name = "futures" version = "0.3.31" @@ -955,7 +943,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -976,7 +964,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" dependencies = [ - "futures 0.1.31", "futures-channel", "futures-core", "futures-io", @@ -1049,12 +1036,6 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - [[package]] name = "heck" version = "0.5.0" @@ -1092,17 +1073,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -1122,7 +1092,7 @@ dependencies = [ "bytes", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "pin-project-lite", ] @@ -1144,28 +1114,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" -[[package]] -name = "hyper" -version = "0.14.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c08302e8fa335b151b788c775ff56e7a03ae64ff85c548ee820fecb70356e85" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "tokio", - "tower-service", - "tracing", - "want", -] - [[package]] name = "hyper" version = "1.5.1" @@ -1176,7 +1124,7 @@ dependencies = [ "futures-channel", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "httparse", "itoa", "pin-project-lite", @@ -1193,7 +1141,7 @@ checksum = "08afdbb5c31130e3034af566421053ab03787c640246a446327f550d11bcb333" dependencies = [ "futures-util", "http 1.2.0", - "hyper 1.5.1", + "hyper", "hyper-util", "rustls", "rustls-native-certs", @@ -1213,8 +1161,8 @@ dependencies = [ "futures-channel", "futures-util", "http 1.2.0", - "http-body 1.0.1", - "hyper 1.5.1", + "http-body", + "hyper", "pin-project-lite", "socket2", "tokio", @@ -1360,7 +1308,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -1398,39 +1346,25 @@ checksum = "aae21c3177a27788957044151cc2800043d127acaa460a47ebb9b84dfa2c6aa0" [[package]] name = "in-toto" -version = "0.3.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9974b36a2730505a0aaf7005e883ad8820ba40f134e010431e789d1467944306" +checksum = "34037907a12187df805f8581f4542ba3dd838794dca025adbbabbfc4d161eac7" dependencies = [ "chrono", "data-encoding", "derp", - "futures-executor", - "futures-io", - "futures-util", "glob", - "http 0.2.12", - "hyper 0.14.31", "itoa", - "lazy_static", "log", - "once_cell", - "parking_lot", "path-clean", - "path-matchers", "pem", - "percent-encoding", - "rand", - "ring 0.16.20", + "ring", "serde", - "serde_derive", "serde_json", "strum", "strum_macros", - "tempfile", - "thiserror 1.0.69", + "thiserror 2.0.6", "untrusted 0.7.1", - "url", "walkdir", ] @@ -1729,22 +1663,13 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17359afc20d7ab31fdb42bb844c8b3bb1dabd7dcf7e68428492da7f16966fcef" -[[package]] -name = "path-matchers" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36cd9b72a47679ec193a5f0229d9ab686b7bd45e1fbc59ccf953c9f3d83f7b2b" -dependencies = [ - "glob", -] - [[package]] name = "pem" -version = "2.0.1" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" +checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" dependencies = [ - "base64 0.21.7", + "base64", "serde", ] @@ -1833,7 +1758,7 @@ dependencies = [ "bytes", "getrandom", "rand", - "ring 0.17.8", + "ring", "rustc-hash", "rustls", "rustls-pki-types", @@ -1981,7 +1906,7 @@ dependencies = [ "clap", "colored", "env_logger", - "futures 0.3.31", + "futures", "rebuilderd", "rebuilderd-common", "tempfile", @@ -1996,7 +1921,7 @@ dependencies = [ "clap", "data-encoding", "env_logger", - "futures 0.3.31", + "futures", "futures-util", "in-toto", "nix", @@ -2070,15 +1995,15 @@ version = "0.12.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-channel", "futures-core", "futures-util", "http 1.2.0", - "http-body 1.0.1", + "http-body", "http-body-util", - "hyper 1.5.1", + "hyper", "hyper-rustls", "hyper-util", "ipnet", @@ -2109,21 +2034,6 @@ dependencies = [ "windows-registry", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - [[package]] name = "ring" version = "0.17.8" @@ -2134,7 +2044,7 @@ dependencies = [ "cfg-if", "getrandom", "libc", - "spin 0.9.8", + "spin", "untrusted 0.9.0", "windows-sys 0.52.0", ] @@ -2180,7 +2090,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", - "ring 0.17.8", + "ring", "rustls-pki-types", "rustls-webpki", "subtle", @@ -2223,7 +2133,7 @@ version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" dependencies = [ - "ring 0.17.8", + "ring", "rustls-pki-types", "untrusted 0.9.0", ] @@ -2319,7 +2229,7 @@ checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -2406,12 +2316,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - [[package]] name = "spin" version = "0.9.8" @@ -2432,21 +2336,21 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "strum" -version = "0.24.1" +version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" [[package]] name = "strum_macros" -version = "0.24.3" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" dependencies = [ - "heck 0.4.1", + "heck", "proc-macro2", "quote", "rustversion", - "syn 1.0.109", + "syn", ] [[package]] @@ -2455,17 +2359,6 @@ version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - [[package]] name = "syn" version = "2.0.90" @@ -2494,7 +2387,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -2547,7 +2440,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -2558,7 +2451,7 @@ checksum = "d65750cab40f4ff1929fb1ba509e9914eb756131cef4210da8d5d700d26f6312" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -2643,7 +2536,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -2859,7 +2752,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.90", + "syn", "wasm-bindgen-shared", ] @@ -2894,7 +2787,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3217,7 +3110,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", "synstructure", ] @@ -3239,7 +3132,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] @@ -3259,7 +3152,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", "synstructure", ] @@ -3288,7 +3181,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn", ] [[package]] diff --git a/worker/Cargo.toml b/worker/Cargo.toml index 6b03fed..498937f 100644 --- a/worker/Cargo.toml +++ b/worker/Cargo.toml @@ -24,7 +24,7 @@ data-encoding = "2" env_logger = "0.11" futures = "0.3.21" futures-util = "0.3.21" -in-toto = "0.3" +in-toto = "0.4" nix = { version = "0.29", features = ["process", "signal"] } rebuilderd-common = { version= "=0.21.0", path="../common" } serde = { version="1.0.137", features=["derive"] } From f05709e0377983aac4d72088d1d826ed60a0fa78 Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Thu, 12 Dec 2024 14:26:49 +0100 Subject: [PATCH 2/3] Remove atty dependency --- Cargo.lock | 21 --------------------- tools/Cargo.toml | 1 - tools/src/pager.rs | 4 ++-- 3 files changed, 2 insertions(+), 24 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e16cc55..cfd890a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -318,17 +318,6 @@ dependencies = [ "syn", ] -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -1042,15 +1031,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - [[package]] name = "http" version = "0.2.12" @@ -1837,7 +1817,6 @@ dependencies = [ name = "rebuildctl" version = "0.21.0" dependencies = [ - "atty", "bzip2", "chrono", "clap", diff --git a/tools/Cargo.toml b/tools/Cargo.toml index a53deeb..2788323 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -16,7 +16,6 @@ assets = [ ] [dependencies] -atty = "0.2.14" bzip2 = "0.4.3" chrono = { version = "0.4.19", features=["serde"] } clap = { version = "4", features = ["derive"] } diff --git a/tools/src/pager.rs b/tools/src/pager.rs index 6adaff3..93756a3 100644 --- a/tools/src/pager.rs +++ b/tools/src/pager.rs @@ -1,10 +1,10 @@ use rebuilderd_common::errors::*; use std::env; -use std::io::{self, Write}; +use std::io::{self, IsTerminal, Write}; use std::process::{Command, Stdio}; pub fn write(buf: &[u8]) -> Result<()> { - if atty::is(atty::Stream::Stdout) && env::var_os("NOPAGER").is_none() { + if io::stdout().is_terminal() && env::var_os("NOPAGER").is_none() { let mut cmd = Command::new("less") .args(["-R"]) .stdin(Stdio::piped()) From 09b0f823cab5894ebe2277cf110e48709e6db848 Mon Sep 17 00:00:00 2001 From: kpcyrd Date: Thu, 12 Dec 2024 14:28:47 +0100 Subject: [PATCH 3/3] Replace dotenv crate with dotenvy --- Cargo.lock | 8 ++++---- daemon/Cargo.toml | 2 +- daemon/src/main.rs | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cfd890a..52b9006 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -754,10 +754,10 @@ dependencies = [ ] [[package]] -name = "dotenv" -version = "0.15.0" +name = "dotenvy" +version = "0.15.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" +checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "dsl_auto_type" @@ -1851,7 +1851,7 @@ dependencies = [ "diesel", "diesel_migrations", "dirs-next", - "dotenv", + "dotenvy", "env_logger", "log", "rand", diff --git a/daemon/Cargo.toml b/daemon/Cargo.toml index 8f583c4..5456ea6 100644 --- a/daemon/Cargo.toml +++ b/daemon/Cargo.toml @@ -25,7 +25,7 @@ clap = { version = "4", features = ["derive"] } diesel = { version = "2", features = ["sqlite", "r2d2", "chrono", "i-implement-a-third-party-backend-and-opt-into-breaking-changes"] } diesel_migrations = { version = "2", features = ["sqlite"] } dirs-next = "2.0.0" -dotenv = "0.15.0" +dotenvy = "0.15.0" env_logger = "0.11" log = "0.4.17" rand = "0.8.5" diff --git a/daemon/src/main.rs b/daemon/src/main.rs index 69a5d43..5e2da08 100644 --- a/daemon/src/main.rs +++ b/daemon/src/main.rs @@ -33,7 +33,7 @@ async fn main() -> Result<()> { env_logger::init_from_env(Env::default() .default_filter_or(logging)); - dotenv::dotenv().ok(); + dotenvy::dotenv().ok(); let config = config::load(args.config.as_deref())?; if args.check_config { println!("{:#?}", config);