From 046003fa35ddb3757c8d0cd7f8ce02f8a1992220 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 16 Jul 2024 09:03:21 -0400 Subject: [PATCH] build-sys: Switch to workspace dependencies Prep for addding another crate, where I want to avoid duplicating all the versions again. Signed-off-by: Colin Walters --- Cargo.lock | 1 - Cargo.toml | 13 +++++++++++++ cli/Cargo.toml | 9 ++++----- lib/Cargo.toml | 22 +++++++++++----------- tests-integration/Cargo.toml | 14 +++++++------- xtask/Cargo.toml | 6 +++--- 6 files changed, 38 insertions(+), 27 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index e256a94b0..9c9549930 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -157,7 +157,6 @@ dependencies = [ "anyhow", "bootc-lib", "clap", - "libc", "log", "tokio", "tracing", diff --git a/Cargo.toml b/Cargo.toml index 371c1e2be..0ddf3b638 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,19 @@ codegen-units = 1 inherits = "release" lto = "yes" +[workspace.dependencies] +anyhow = "1.0.82" +camino = "1.1.6" +cap-std-ext = "4" +clap = "4.5.4" +fn-error-context = "0.2.1" +libc = "0.2.154" +serde = "1.0.199" +serde_json = "1.0.116" +tempfile = "3.10.1" +tracing = "0.1.40" +tokio = ">= 1.37.0" + # See https://github.com/coreos/cargo-vendor-filterer [workspace.metadata.vendor-filter] # For now we only care about tier 1+2 Linux. (In practice, it's unlikely there is a tier3-only Linux dependency) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 24b557d51..5d7072100 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -17,11 +17,10 @@ default-run = "bootc" platforms = ["x86_64-unknown-linux-gnu", "aarch64-unknown-linux-gnu", "powerpc64le-unknown-linux-gnu", "s390x-unknown-linux-gnu", "riscv64gc-unknown-linux-gnu"] [dependencies] -anyhow = "1.0.82" +anyhow = { workspace = true } bootc-lib = { version = "0.1", path = "../lib" } -clap = "4.5.4" -libc = "0.2.154" -tokio = { version = "1.37.0", features = ["macros"] } +clap = { workspace = true } +tokio = { workspace = true, features = ["macros"] } log = "0.4.21" -tracing = "0.1.40" +tracing = { workspace = true } tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } diff --git a/lib/Cargo.toml b/lib/Cargo.toml index 5e6a60812..eccf7ae1d 100644 --- a/lib/Cargo.toml +++ b/lib/Cargo.toml @@ -14,18 +14,18 @@ include = ["/src", "LICENSE-APACHE", "LICENSE-MIT"] [dependencies] anstream = "0.6.13" anstyle = "1.0.6" -anyhow = "1.0.82" -camino = { version = "1.1.6", features = ["serde1"] } +anyhow = { workspace = true } +camino = { workspace = true, features = ["serde1"] } ostree-ext = { version = "0.14.0" } chrono = { version = "0.4.38", features = ["serde"] } -clap = { version= "4.5.4", features = ["derive","cargo"] } +clap = { workspace = true, features = ["derive","cargo"] } clap_mangen = { version = "0.2.20", optional = true } -cap-std-ext = "4" +cap-std-ext = { workspace = true } hex = "^0.4.3" -fn-error-context = "0.2.1" +fn-error-context = { workspace = true } gvariant = "0.5.0" indicatif = "0.17.8" -libc = "^0.2.154" +libc = { workspace = true } liboverdrop = "0.1.0" libsystemd = "0.7" openssl = "^0.10.64" @@ -34,14 +34,14 @@ nix = { version = "0.29", features = ["ioctl", "sched" ] } regex = "1.10.4" rustix = { "version" = "0.38.34", features = ["thread", "fs", "system", "process"] } schemars = { version = "0.8.17", features = ["chrono"] } -serde = { features = ["derive"], version = "1.0.199" } +serde = { workspace = true, features = ["derive"] } serde_ignored = "0.1.10" -serde_json = "1.0.116" +serde_json = { workspace = true } serde_yaml = "0.9.34" -tokio = { features = ["io-std", "time", "process", "rt", "net"], version = ">= 1.37.0" } +tokio = { workspace = true, features = ["io-std", "time", "process", "rt", "net"] } tokio-util = { features = ["io-util"], version = "0.7.10" } -tracing = "0.1.40" -tempfile = "3.10.1" +tracing = { workspace = true } +tempfile = { workspace = true } toml = "0.8.12" xshell = { version = "0.2.6", optional = true } uuid = { version = "1.8.0", features = ["v4"] } diff --git a/tests-integration/Cargo.toml b/tests-integration/Cargo.toml index 7540931ac..140a062a0 100644 --- a/tests-integration/Cargo.toml +++ b/tests-integration/Cargo.toml @@ -11,16 +11,16 @@ name = "tests-integration" path = "src/tests-integration.rs" [dependencies] -anyhow = "1.0.82" -camino = "1.1.6" -cap-std-ext = "4" -clap = { version= "4.5.4", features = ["derive","cargo"] } -fn-error-context = "0.2.1" +anyhow = { workspace = true } +camino = { workspace = true } +cap-std-ext = { workspace = true } +clap = { workspace = true, features = ["derive","cargo"] } +fn-error-context = { workspace = true } indoc = "2.0.5" libtest-mimic = "0.7.3" oci-spec = "0.6.5" rustix = { "version" = "0.38.34", features = ["thread", "fs", "system", "process"] } -serde = { features = ["derive"], version = "1.0.199" } -serde_json = "1.0.116" +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true } tempfile = "3.10.1" xshell = { version = "0.2.6" } diff --git a/xtask/Cargo.toml b/xtask/Cargo.toml index 241351818..8a01da74b 100644 --- a/xtask/Cargo.toml +++ b/xtask/Cargo.toml @@ -12,10 +12,10 @@ name = "xtask" path = "src/xtask.rs" [dependencies] -anyhow = "1.0.82" -camino = "1.1.6" +anyhow = { workspace = true } +camino = { workspace = true } chrono = { version = "0.4.38", default-features = false, features = ["std"] } -fn-error-context = "0.2.1" +fn-error-context = { workspace = true } tempfile = "3.10.1" mandown = "0.1.3" xshell = { version = "0.2.6" }