Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go and rust dependencies #3830

Merged
merged 4 commits into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,369 changes: 733 additions & 636 deletions sources/Cargo.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions sources/api/apiclient/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ futures = { version = "0.3", default-features = false }
futures-channel = { version = "0.3", default-features = false }
http = "0.2"
httparse = "1"
hyper = { version = "0.14", default-features = false, features = [ "client", "http1", "http2" ] }
hyper = { version = "0.14", default-features = false, features = ["client", "http1", "http2"] }
hyper-unix-connector = "0.2"
libc = "0.2"
log = "0.4"
Expand All @@ -30,10 +30,10 @@ serde = { version = "1", features = ["derive"] }
serde_json = "1"
signal-hook = "0.3"
simplelog = "0.12"
snafu = { version = "0.7", features = ["futures"] }
snafu = { version = "0.8", features = ["futures"] }
tokio = { version = "~1.32", default-features = false, features = ["fs", "io-std", "io-util", "macros", "rt-multi-thread", "time"] } # LTS
tokio-tungstenite = { version = "0.20", default-features = false, features = ["connect"] }
toml = "0.5"
toml = "0.8"
unindent = "0.1"
url = "2"

Expand Down
5 changes: 3 additions & 2 deletions sources/api/apiclient/src/apply.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,9 @@ mod error {
))]
InputType {
input_source: String,
toml_err: toml::de::Error,
source: serde_json::Error,
toml_err: Box<toml::de::Error>,
#[snafu(source(from(serde_json::Error, Box::new)))]
source: Box<serde_json::Error>,
},

#[snafu(display(
Expand Down
4 changes: 2 additions & 2 deletions sources/api/apiserver/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ rand = "0.8"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
thar-be-updates = { path = "../thar-be-updates", version = "0.1" }
tokio = { version = "~1.32", default-features = false, features = ["process"] }

Expand All @@ -37,4 +37,4 @@ generate-readme = { version = "0.1", path = "../../generate-readme" }

[dev-dependencies]
maplit = "1"
toml = "0.5"
toml = "0.8"
4 changes: 2 additions & 2 deletions sources/api/bootstrap-containers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ exclude = ["README.md"]
apiclient = { path = "../apiclient", version = "0.1" }
constants = { path = "../../constants", version = "0.1" }
datastore = { path = "../datastore", version = "0.1" }
base64 = "0.13"
base64 = "0.21"
log = "0.4"
models = { path = "../../models", version = "0.1" }
serde_json = "1"
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS

[build-dependencies]
Expand Down
6 changes: 4 additions & 2 deletions sources/api/bootstrap-containers/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ journalctl -u bootstrap-containers@bear.service
#[macro_use]
extern crate log;

use base64::Engine;
use datastore::{serialize_scalar, Key, KeyType};
use simplelog::{Config as LogConfig, LevelFilter, SimpleLogger};
use snafu::{ensure, OptionExt, ResultExt};
Expand Down Expand Up @@ -272,8 +273,9 @@ where
// If user data was specified, decode it and write it out
if let Some(user_data) = &container_details.user_data {
debug!("Decoding user data for container '{}'", name);
let decoded_bytes =
base64::decode(user_data.as_bytes()).context(error::Base64DecodeSnafu { name })?;
let decoded_bytes = base64::engine::general_purpose::STANDARD
.decode(user_data.as_bytes())
.context(error::Base64DecodeSnafu { name })?;

let path = dir.join("user-data");
debug!("Storing user data in {}", path.display());
Expand Down
6 changes: 3 additions & 3 deletions sources/api/certdog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ exclude = ["README.md"]

[dependencies]
argh = "0.1"
base64 = "0.13"
base64 = "0.21"
constants = { path = "../../constants", version = "0.1" }
log = "0.4"
modeled-types = { path = "../../models/modeled-types", version = "0.1" }
serde = { version = "1.0", features = ["derive"]}
serde = { version = "1.0", features = ["derive"] }
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
toml = "0.8"
x509-parser = "0.15"

Expand Down
16 changes: 11 additions & 5 deletions sources/api/certdog/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
extern crate log;

use argh::FromArgs;
use base64::Engine;
use serde::Deserialize;
use simplelog::{Config as LogConfig, LevelFilter, SimpleLogger};
use snafu::ResultExt;
Expand Down Expand Up @@ -100,7 +101,9 @@ fn split_bundles(certificates_bundle: HashMap<Identifier, PemCertificate>) -> Re
}

let name = name.as_ref();
let decoded = base64::decode(data.as_bytes()).context(error::Base64DecodeSnafu { name })?;
let decoded = base64::engine::general_purpose::STANDARD
.decode(data.as_bytes())
.context(error::Base64DecodeSnafu { name })?;
// Each record in the API could include one or more certificates
let mut pems = pems_from_iter(x509_parser::pem::Pem::iter_from_buffer(&decoded))?;

Expand Down Expand Up @@ -186,7 +189,7 @@ fn pem_to_string(pem: &x509_parser::pem::Pem) -> Result<String> {

writeln!(out, "{} {}{}", PEM_HEADER, pem.label, PEM_SUFFIX)
.context(error::WritePemStringSnafu)?;
let encoded = base64::encode(&pem.contents);
let encoded = base64::engine::general_purpose::STANDARD.encode(&pem.contents);
let bytes = encoded.as_bytes();
for chunk in bytes.chunks(64) {
let chunk = String::from_utf8_lossy(chunk);
Expand Down Expand Up @@ -343,9 +346,12 @@ mod test_certdog {
fn trusted_store_updated() {
let trusted_store = tempfile::NamedTempFile::new().unwrap();
let source_bundle = tempfile::NamedTempFile::new().unwrap();
let (_, pem) =
x509_parser::pem::parse_x509_pem(&base64::decode(TEST_PEM.as_bytes()).unwrap())
.unwrap();
let (_, pem) = x509_parser::pem::parse_x509_pem(
&base64::engine::general_purpose::STANDARD
.decode(TEST_PEM.as_bytes())
.unwrap(),
)
.unwrap();
let trusted_certs: Vec<x509_parser::pem::Pem> = vec![pem];
let certs_bundle = CertBundle {
trusted_certs,
Expand Down
4 changes: 2 additions & 2 deletions sources/api/corndog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ exclude = ["README.md"]
[dependencies]
log = "0.4"
modeled-types = { path = "../../models/modeled-types", version = "0.1" }
serde = { version = "1.0", features = ["derive"]}
serde = { version = "1.0", features = ["derive"] }
serde_json = "1"
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
toml = "0.8"

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions sources/api/datastore/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ log = "0.4"
percent-encoding = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
snafu = "0.7"
snafu = "0.8"
walkdir = "2"

[build-dependencies]
generate-readme = { version = "0.1", path = "../../generate-readme" }

[dev-dependencies]
maplit = "1"
toml = "0.5"
toml = "0.8"
6 changes: 3 additions & 3 deletions sources/api/early-boot-config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exclude = ["README.md"]
[dependencies]
apiclient = { path = "../apiclient", version = "0.1" }
async-trait = "0.1"
base64 = "0.13"
base64 = "0.21"
constants = { path = "../../constants", version = "0.1" }
flate2 = { version = "1", default-features = false, features = ["rust_backend"] }
http = "0.2"
Expand All @@ -24,9 +24,9 @@ serde_json = "1"
serde_plain = "1"
serde-xml-rs = "0.6"
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS
toml = "0.5"
toml = "0.8"

[target.'cfg(target_arch = "x86_64")'.dependencies]
# vmw_backdoor includes x86_64 assembly, prevent it from building for ARM
Expand Down
14 changes: 10 additions & 4 deletions sources/api/early-boot-config/src/provider/vmware.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
use super::{PlatformDataProvider, SettingsJson};
use crate::compression::{expand_file_maybe, expand_slice_maybe, OptionalCompressionReader};
use async_trait::async_trait;
use base64::Engine;
use serde::Deserialize;
use snafu::{ensure, ResultExt};
use std::ffi::OsStr;
Expand Down Expand Up @@ -130,9 +131,11 @@ impl VmwareDataProvider {
}

// Base64 decode the &str
let decoded_bytes = base64::decode(base64_str).context(error::Base64DecodeSnafu {
what: "OVF user data",
})?;
let decoded_bytes = base64::engine::general_purpose::STANDARD
.decode(base64_str)
.context(error::Base64DecodeSnafu {
what: "OVF user data",
})?;

// Decompress the data if it's compressed
let decoded = expand_slice_maybe(&decoded_bytes).context(error::DecompressionSnafu {
Expand Down Expand Up @@ -185,7 +188,10 @@ impl VmwareDataProvider {
UserDataEncoding::Base64 | UserDataEncoding::GzipBase64 => {
info!("Decoding user data");
let mut reader = Cursor::new(user_data_bytes);
let decoder = base64::read::DecoderReader::new(&mut reader, base64::STANDARD);
let decoder = base64::read::DecoderReader::new(
&mut reader,
&base64::engine::general_purpose::STANDARD,
);

// Decompresses the data if it is gzip'ed
let mut output = String::new();
Expand Down
4 changes: 2 additions & 2 deletions sources/api/ecs-settings-applier/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ exclude = ["README.md"]

[dependencies]
constants = { path = "../../constants", version = "0.1" }
serde = {version = "1", features = ["derive"]}
serde = { version = "1", features = ["derive"] }
serde_json = "1"
schnauzer = { path = "../schnauzer", version = "0.1" }
log = "0.4"
models = { path = "../../models", version = "0.1" }
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions sources/api/host-containers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ build = "build.rs"
exclude = ["README.md"]

[dependencies]
base64 = "0.13"
base64 = "0.21"
constants = { path = "../../constants", version = "0.1" }
log = "0.4"
modeled-types = { path = "../../models/modeled-types", version = "0.1" }
serde = { version = "1", features = ["derive"] }
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
toml = "0.8"

[dev-dependencies]
Expand Down
6 changes: 4 additions & 2 deletions sources/api/host-containers/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ It reads the currently configured containers from its config file, then configur
#[macro_use]
extern crate log;

use base64::Engine;
use simplelog::{Config as LogConfig, LevelFilter, SimpleLogger};
use snafu::{ensure, OptionExt, ResultExt};
use std::collections::HashMap;
Expand Down Expand Up @@ -353,8 +354,9 @@ where

// If user data was specified, unencode it and write it out before we start the container.
if let Some(user_data) = &image_details.user_data {
let decoded_bytes =
base64::decode(user_data.as_bytes()).context(error::Base64DecodeSnafu { name })?;
let decoded_bytes = base64::engine::general_purpose::STANDARD
.decode(user_data.as_bytes())
.context(error::Base64DecodeSnafu { name })?;

let path = dir.join("user-data");
fs::write(path, decoded_bytes).context(error::UserDataWriteSnafu { name })?;
Expand Down
2 changes: 1 addition & 1 deletion sources/api/migration/migration-helpers/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ schnauzer = { path = "../../schnauzer", version = "0.1" }
serde = "1"
serde_json = "1"
shlex = "1"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["rt-multi-thread"] }

[dev-dependencies]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ exclude = ["README.md"]

[dependencies]
migration-helpers = { path = "../../../migration-helpers" }
snafu = "0.7"
snafu = "0.8"
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ publish = false
exclude = ["README.md"]

[dependencies]
migration-helpers = { path = "../../../migration-helpers", version = "0.1.0"}
migration-helpers = { path = "../../../migration-helpers", version = "0.1.0" }
serde_json = "1"
snafu = "0.7"
snafu = "0.8"
4 changes: 2 additions & 2 deletions sources/api/migration/migrator/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ pentacle = "1"
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
semver = "1"
simplelog = "0.12"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["fs", "macros", "rt-multi-thread"] } # LTS
tokio-util = { version = "0.7", features = ["compat", "io-util"] }
tough = { version = "0.15", features = ["http"] }
tough = { version = "0.17", features = ["http"] }
update_metadata = { path = "../../../updater/update_metadata", version = "0.1" }
url = "2"

Expand Down
8 changes: 4 additions & 4 deletions sources/api/netdog/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@ argh = "0.1"
dns-lookup = "2"
ipnet = { version = "2", features = ["serde"] }
imdsclient = { path = "../../imdsclient", version = "0.1" }
indexmap = { version = "1", features = ["serde"]}
indexmap = { version = "1", features = ["serde"] }
envy = "0.4"
lazy_static = "1"
systemd-derive = { path = "systemd-derive", version = "0.1" }
quick-xml = {version = "0.26", features = ["serialize"]}
quick-xml = { version = "0.26", features = ["serialize"] }
rand = { version = "0.8", default-features = false, features = ["std", "std_rng"] }
regex = "1"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
serde_plain = "1"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["macros", "rt-multi-thread", "time"] } # LTS
tokio-retry = "0.3"
toml = { version = "0.5", features = ["preserve_order"] }
toml = { version = "0.8", features = ["preserve_order"] }

[dev-dependencies]
tempfile = "3"
Expand Down
18 changes: 9 additions & 9 deletions sources/api/pluto/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@ futures-util = { version = "0.3", default-features = false }
headers = "0.3"
http = "0.2"
hyper = "0.14"
hyper-rustls = { version = "0.23", default-features = false, features = ["http2", "native-tokio", "tls12", "logging"] }
hyper-rustls = { version = "0.24", default-features = false, features = ["http2", "native-tokio", "tls12", "logging"] }
imdsclient = { path = "../../imdsclient", version = "0.1" }
models = { path = "../../models", version = "0.1" }
aws-config = "0.55"
aws-sdk-eks = "0.28"
aws-sdk-ec2 = "0.28"
aws-types = "0.55"
aws-smithy-client = { version = "0.55", default-features = false, features = ["rustls"] }
aws-smithy-types = "0.55"
aws-config = "1"
aws-sdk-eks = "1"
aws-sdk-ec2 = "1"
aws-types = "1"
aws-smithy-types = "1"
aws-smithy-runtime = "1"
serde_json = "1"
snafu = "0.7"
snafu = "0.8"
tokio = { version = "~1.32", default-features = false, features = ["macros", "rt-multi-thread"] } # LTS
tokio-retry = "0.3"
tokio-rustls = "0.23"
tokio-rustls = "0.24"
url = "2"

[build-dependencies]
Expand Down