diff --git a/Cargo.lock b/Cargo.lock index 54d55c9b948..a6d168a85ad 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -444,7 +444,7 @@ dependencies = [ [[package]] name = "crucible" version = "0.0.1" -source = "git+https://github.com/oxidecomputer/crucible?branch=main#9df1c1230f125e4ea20700d9f0630f90b18a3c70" +source = "git+https://github.com/oxidecomputer/crucible?branch=main#cda0bf8b0fd8e53566d1918b4d14824103a1d410" dependencies = [ "aes", "aes-gcm-siv", @@ -474,7 +474,7 @@ dependencies = [ [[package]] name = "crucible-common" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/crucible?branch=main#9df1c1230f125e4ea20700d9f0630f90b18a3c70" +source = "git+https://github.com/oxidecomputer/crucible?branch=main#cda0bf8b0fd8e53566d1918b4d14824103a1d410" dependencies = [ "anyhow", "serde", @@ -488,7 +488,7 @@ dependencies = [ [[package]] name = "crucible-protocol" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/crucible?branch=main#9df1c1230f125e4ea20700d9f0630f90b18a3c70" +source = "git+https://github.com/oxidecomputer/crucible?branch=main#cda0bf8b0fd8e53566d1918b4d14824103a1d410" dependencies = [ "anyhow", "bincode", @@ -502,7 +502,7 @@ dependencies = [ [[package]] name = "crucible-scope" version = "0.0.0" -source = "git+https://github.com/oxidecomputer/crucible?branch=main#9df1c1230f125e4ea20700d9f0630f90b18a3c70" +source = "git+https://github.com/oxidecomputer/crucible?branch=main#cda0bf8b0fd8e53566d1918b4d14824103a1d410" dependencies = [ "anyhow", "futures", @@ -1364,9 +1364,6 @@ name = "ipnet" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" -dependencies = [ - "serde", -] [[package]] name = "ipnetwork" @@ -1722,7 +1719,6 @@ version = "0.1.0" dependencies = [ "anyhow", "api_identity", - "async-trait", "backoff", "chrono", "dropshot", @@ -1730,14 +1726,10 @@ dependencies = [ "futures", "http", "hyper", - "ipnet", "ipnetwork", "macaddr", "parse-display", - "percent-encoding", "progenitor", - "propolis-server", - "rayon", "reqwest", "ring", "schemars", @@ -1750,14 +1742,10 @@ dependencies = [ "smf", "steno", "structopt", - "tar", - "tempfile", "thiserror", "tokio", "tokio-postgres", - "toml", "uuid", - "walkdir", ] [[package]] @@ -1820,6 +1808,26 @@ dependencies = [ "uuid", ] +[[package]] +name = "omicron-package" +version = "0.1.0" +dependencies = [ + "anyhow", + "omicron-common", + "propolis-server", + "rayon", + "reqwest", + "serde", + "serde_derive", + "smf", + "structopt", + "tar", + "thiserror", + "tokio", + "toml", + "walkdir", +] + [[package]] name = "omicron-rpaths" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 174c5070bf3..336b9e22b90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,7 @@ members = [ "nexus", "nexus/src/db/db-macros", "nexus-client", + "package", "rpaths", "sled-agent", "sled-agent-client", @@ -21,6 +22,7 @@ default-members = [ "common", "nexus", "nexus/src/db/db-macros", + "package", "rpaths", "sled-agent", "sled-agent-client", diff --git a/common/Cargo.toml b/common/Cargo.toml index ecce8b577f2..db0bdc58fcc 100644 --- a/common/Cargo.toml +++ b/common/Cargo.toml @@ -6,87 +6,34 @@ license = "MPL-2.0" [dependencies] anyhow = "1.0" -async-trait = "0.1.51" +api_identity = { path = "../api_identity" } +backoff = { version = "0.3.0", features = [ "tokio" ] } +chrono = { version = "0.4", features = [ "serde" ] } +dropshot = { git = "https://github.com/oxidecomputer/dropshot", branch = "main" } futures = "0.3.18" http = "0.2.5" hyper = "0.14" ipnetwork = "0.18" -propolis-server = { git = "https://github.com/oxidecomputer/propolis", rev = "00ec8cf18f6a2311b0907f0b16b0ff8a327944d1" } -rayon = "1.5" +macaddr = { version = "1.0.1", features = [ "serde_std" ] } reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"] } ring = "0.16" +schemars = { version = "0.8", features = [ "chrono", "uuid" ] } +serde = { version = "1.0", features = [ "derive" ] } serde_derive = "1.0" serde_json = "1.0" serde_with = "1.11.0" +slog = { version = "2.5", features = [ "max_level_trace", "release_max_level_debug" ] } smf = "0.2" +steno = { git = "https://github.com/oxidecomputer/steno", branch = "main" } structopt = "0.3" -tar = "0.4" -tempfile = "3.0" thiserror = "1.0" -toml = "0.5.6" -walkdir = "2.3" +tokio = { version = "1.14", features = [ "full" ] } +tokio-postgres = { version = "0.7", features = [ "with-chrono-0_4", "with-uuid-0_8" ] } +uuid = { version = "0.8", features = [ "serde", "v4" ] } parse-display = "0.5.3" progenitor = { git = "https://github.com/oxidecomputer/progenitor" } -percent-encoding = "2.1.0" - -[dependencies.api_identity] -path = "../api_identity" - -[dependencies.backoff] -version = "0.3.0" -features = [ "tokio" ] - -[dependencies.chrono] -version = "0.4" -features = [ "serde" ] - -[dependencies.dropshot] -git = "https://github.com/oxidecomputer/dropshot" -branch = "main" - -[dependencies.ipnet] -version = "2.3.1" -features = [ "serde" ] - -[dependencies.macaddr] -version = "1.0.1" -features = [ "serde_std" ] - -[dependencies.schemars] -version = "0.8" -features = [ "chrono", "uuid" ] - -[dependencies.serde] -version = "1.0" -features = [ "derive" ] - -[dependencies.slog] -version = "2.5" -features = [ "max_level_trace", "release_max_level_debug" ] - -[dependencies.steno] -git = "https://github.com/oxidecomputer/steno" -branch = "main" - -[dependencies.tokio] -version = "1.14" -features = [ "full" ] - -[dependencies.tokio-postgres] -version = "0.7" -features = [ "with-chrono-0_4", "with-uuid-0_8" ] - -[dependencies.uuid] -version = "0.8" -features = [ "serde", "v4" ] [dev-dependencies] expectorate = "1.0.4" serde_urlencoded = "0.7.0" tokio = { version = "1.14", features = [ "test-util" ] } - -# Disable doc builds by default for our binaries to work around issue -# rust-lang/cargo#8373. These docs would not be very useful anyway. -[[bin]] -name = "omicron-package" -doc = false diff --git a/package/.gitignore b/package/.gitignore new file mode 100644 index 00000000000..ea8c4bf7f35 --- /dev/null +++ b/package/.gitignore @@ -0,0 +1 @@ +/target diff --git a/package/Cargo.toml b/package/Cargo.toml new file mode 100644 index 00000000000..5dcf30cd2dc --- /dev/null +++ b/package/Cargo.toml @@ -0,0 +1,30 @@ +[package] +name = "omicron-package" +version = "0.1.0" +edition = "2018" +license = "MPL-2.0" + +[dependencies] +anyhow = "1.0" +omicron-common = { path = "../common" } +# We depend on the propolis-server here -- a binary, not a library -- to +# make it visible to the packaging tool, which can compile it and shove +# it in a tarball. +propolis-server = { git = "https://github.com/oxidecomputer/propolis", rev = "00ec8cf18f6a2311b0907f0b16b0ff8a327944d1" } +rayon = "1.5" +reqwest = { version = "0.11", default-features = false, features = ["rustls-tls"] } +serde = { version = "1.0", features = [ "derive" ] } +serde_derive = "1.0" +smf = "0.2" +structopt = "0.3" +tar = "0.4" +thiserror = "1.0" +tokio = { version = "1.14", features = [ "full" ] } +toml = "0.5.6" +walkdir = "2.3" + +# Disable doc builds by default for our binaries to work around issue +# rust-lang/cargo#8373. These docs would not be very useful anyway. +[[bin]] +name = "omicron-package" +doc = false diff --git a/common/src/bin/omicron-package.rs b/package/src/bin/omicron-package.rs similarity index 100% rename from common/src/bin/omicron-package.rs rename to package/src/bin/omicron-package.rs