From 8d04ae7014991319e97d4280f0e9d7a70c89f10b Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 13 Oct 2022 14:35:39 +0200 Subject: cargo2nix unstable (patched), rust 1.63.0, nixpkgs 22.05 (32-bit builds are broken) --- src/api/Cargo.toml | 2 +- src/web/web_server.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/api/Cargo.toml b/src/api/Cargo.toml index 7c3ed43b..4d9a6ab6 100644 --- a/src/api/Cargo.toml +++ b/src/api/Cargo.toml @@ -36,7 +36,7 @@ sha2 = "0.10" futures = "0.3" futures-util = "0.3" -pin-project = "1.0" +pin-project = "1.0.11" tokio = { version = "1.0", default-features = false, features = ["rt", "rt-multi-thread", "io-util", "net", "time", "macros", "sync", "signal", "fs"] } tokio-stream = "0.1" diff --git a/src/web/web_server.rs b/src/web/web_server.rs index c2322073..1541c297 100644 --- a/src/web/web_server.rs +++ b/src/web/web_server.rs @@ -318,7 +318,7 @@ fn path_to_key<'a>(path: &'a str, index: &str) -> Result, Error> { } Some(_) => match path_utf8 { Cow::Borrowed(pu8) => Ok((&pu8[1..]).into()), - Cow::Owned(pu8) => Ok((&pu8[1..]).to_string().into()), + Cow::Owned(pu8) => Ok(pu8[1..].to_string().into()), }, } } -- cgit v1.2.3 From fcaee3bea0019123db05356fd82706f38498365c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 14 Oct 2022 18:10:36 +0200 Subject: definitively expunge openssl from dependencies everywhere --- src/garage/Cargo.toml | 2 +- src/k2v-client/Cargo.toml | 2 +- src/rpc/Cargo.toml | 7 +++---- 3 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 5ce40ff2..ddc23170 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -58,7 +58,7 @@ opentelemetry-otlp = { version = "0.10", optional = true } prometheus = { version = "0.13", optional = true } [dev-dependencies] -aws-sdk-s3 = "0.8" +aws-sdk-s3 = "0.19" chrono = "0.4" http = "0.2" hmac = "0.12" diff --git a/src/k2v-client/Cargo.toml b/src/k2v-client/Cargo.toml index 0f0b76ae..9d2b4e30 100644 --- a/src/k2v-client/Cargo.toml +++ b/src/k2v-client/Cargo.toml @@ -12,7 +12,7 @@ readme = "../../README.md" base64 = "0.13.0" http = "0.2.6" log = "0.4" -rusoto_core = "0.48.0" +rusoto_core = { version = "0.48.0", default-features = false, features = ["rustls"] } rusoto_credential = "0.48.0" rusoto_signature = "0.48.0" serde = "1.0.137" diff --git a/src/rpc/Cargo.toml b/src/rpc/Cargo.toml index d61acea4..883929e8 100644 --- a/src/rpc/Cargo.toml +++ b/src/rpc/Cargo.toml @@ -31,9 +31,8 @@ serde_bytes = "0.11" serde_json = "1.0" # newer version requires rust edition 2021 -kube = { version = "0.62", features = ["runtime", "derive"], optional = true } -k8s-openapi = { version = "0.13", features = ["v1_22"], optional = true } -openssl = { version = "0.10", features = ["vendored"], optional = true } +kube = { version = "0.75", default-features = false, features = ["runtime", "derive", "client", "rustls-tls"], optional = true } +k8s-openapi = { version = "0.16", features = ["v1_22"], optional = true } schemars = { version = "0.8", optional = true } # newer version requires rust edition 2021 @@ -51,5 +50,5 @@ hyper = { version = "0.14", features = ["client", "http1", "runtime", "tcp"] } [features] -kubernetes-discovery = [ "kube", "k8s-openapi", "openssl", "schemars" ] +kubernetes-discovery = [ "kube", "k8s-openapi", "schemars" ] system-libs = [ "sodiumoxide/use-pkg-config" ] -- cgit v1.2.3 From c050a59fd0fd23ec3d8cf0542509812a92cc492f Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 14 Oct 2022 18:27:18 +0200 Subject: Fix conditional testing in garage_db --- src/db/test.rs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/db/test.rs b/src/db/test.rs index cfcee643..40e6c41e 100644 --- a/src/db/test.rs +++ b/src/db/test.rs @@ -1,9 +1,5 @@ use crate::*; -use crate::lmdb_adapter::LmdbDb; -use crate::sled_adapter::SledDb; -use crate::sqlite_adapter::SqliteDb; - fn test_suite(db: Db) { let tree = db.open_tree("tree").unwrap(); @@ -80,7 +76,10 @@ fn test_suite(db: Db) { } #[test] +#[cfg(feature = "lmdb")] fn test_lmdb_db() { + use crate::lmdb_adapter::LmdbDb; + let path = mktemp::Temp::new_dir().unwrap(); let db = heed::EnvOpenOptions::new() .max_dbs(100) @@ -92,7 +91,10 @@ fn test_lmdb_db() { } #[test] +#[cfg(feature = "sled")] fn test_sled_db() { + use crate::sled_adapter::SledDb; + let path = mktemp::Temp::new_dir().unwrap(); let db = SledDb::init(sled::open(path.to_path_buf()).unwrap()); test_suite(db); @@ -100,7 +102,10 @@ fn test_sled_db() { } #[test] +#[cfg(feature = "sqlite")] fn test_sqlite_db() { + use crate::sqlite_adapter::SqliteDb; + let db = SqliteDb::init(rusqlite::Connection::open_in_memory().unwrap()); test_suite(db); } -- cgit v1.2.3