Skip to content

Commit

Permalink
Merge branch 'main' into package-cache
Browse files Browse the repository at this point in the history
  • Loading branch information
smklein committed Jan 19, 2024
2 parents 393c240 + 823f90c commit 8564b7e
Show file tree
Hide file tree
Showing 7 changed files with 72 additions and 50 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/hakari.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
with:
toolchain: stable
- name: Install cargo-hakari
uses: taiki-e/install-action@e7dd06a5731075458d8bbd3465396374ad0d20cb # v2
uses: taiki-e/install-action@242f1c0c1a882c44e7d32b89af9f2a0bced36540 # v2
with:
tool: cargo-hakari
- name: Check workspace-hack Cargo.toml is up-to-date
Expand Down
45 changes: 17 additions & 28 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ syn = { version = "2.0" }
tabled = "0.14"
tar = "0.4"
tempdir = "0.3"
tempfile = "3.8"
tempfile = "3.9"
term = "0.7"
termios = "0.3"
textwrap = "0.16.0"
Expand Down
19 changes: 16 additions & 3 deletions package-manifest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,7 @@ source.paths = [
{ from = "smf/switch_zone_setup/manifest.xml", to = "/var/svc/manifest/site/switch_zone_setup/manifest.xml" },
{ from = "smf/switch_zone_setup/switch_zone_setup", to = "/opt/oxide/bin/switch_zone_setup" },
{ from = "smf/switch_zone_setup/support_authorized_keys", to = "/opt/oxide/support/authorized_keys" },
{ from = "/opt/ooce/pgsql-13/lib/amd64", to = "/opt/ooce/pgsql-13/lib/amd64" },
]
output.type = "zone"
output.intermediate_only = true
Expand Down Expand Up @@ -566,7 +567,8 @@ source.packages = [
"mg-ddm.tar.gz",
"mgd.tar.gz",
"switch_zone_setup.tar.gz",
"xcvradm.tar.gz"
"xcvradm.tar.gz",
"omicron-omdb.tar.gz"
]
output.type = "zone"

Expand All @@ -588,7 +590,8 @@ source.packages = [
"mg-ddm.tar.gz",
"mgd.tar.gz",
"switch_zone_setup.tar.gz",
"sp-sim-stub.tar.gz"
"sp-sim-stub.tar.gz",
"omicron-omdb.tar.gz"
]
output.type = "zone"

Expand All @@ -610,7 +613,8 @@ source.packages = [
"mg-ddm.tar.gz",
"mgd.tar.gz",
"switch_zone_setup.tar.gz",
"sp-sim-softnpu.tar.gz"
"sp-sim-softnpu.tar.gz",
"omicron-omdb.tar.gz"
]
output.type = "zone"

Expand All @@ -625,3 +629,12 @@ source.paths = [
]
output.type = "zone"
output.intermediate_only = true

[package.omicron-omdb]
service_name = "omdb"
only_for_targets.image = "standard"
source.type = "local"
source.rust.binary_names = ["omdb"]
source.rust.release = true
output.type = "zone"
output.intermediate_only = true
2 changes: 1 addition & 1 deletion smf/profile/profile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PATH+=:/opt/ooce/bin
case "$HOSTNAME" in
oxz_switch)
# Add tools like xcvradm, swadm & ddmadm to the PATH by default
PATH+=:/opt/oxide/bin:/opt/oxide/dendrite/bin:/opt/oxide/mg-ddm/bin
PATH+=:/opt/oxide/bin:/opt/oxide/dendrite/bin:/opt/oxide/mg-ddm/bin:/opt/oxide/omdb/bin
;;
oxz_cockroachdb*)
PATH+=:/opt/oxide/cockroachdb/bin
Expand Down
24 changes: 22 additions & 2 deletions update-common/src/artifacts/artifacts_with_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use super::ExtractedArtifactDataHandle;
use super::UpdatePlan;
use super::UpdatePlanBuilder;
use crate::errors::RepositoryError;
use anyhow::anyhow;
use camino_tempfile::Utf8TempDir;
use debug_ignore::DebugIgnore;
use omicron_common::update::ArtifactHash;
Expand Down Expand Up @@ -55,10 +56,29 @@ impl ArtifactsWithPlan {
log: &Logger,
) -> Result<Self, RepositoryError>
where
T: io::Read + io::Seek,
T: io::Read + io::Seek + Send + 'static,
{
// Create a temporary directory to hold the extracted TUF repository.
let dir = unzip_into_tempdir(zip_data, log)?;
let dir = {
let log = log.clone();
tokio::task::spawn_blocking(move || {
// This is an expensive synchronous method, so run it on the
// blocking thread pool.
//
// TODO: at the moment we don't restrict the size of the
// extracted contents or its memory usage, making it
// susceptible to zip bombs and other related attacks.
// https://github.com/zip-rs/zip/issues/228. We need to think
// about this at some point.
unzip_into_tempdir(zip_data, &log)
})
.await
.map_err(|join_error| {
RepositoryError::Extract(
anyhow!(join_error).context("unzip_into_tempdir panicked"),
)
})??
};

// Time is unavailable during initial setup, so ignore expiration. Even
// if time were available, we might want to be able to load older
Expand Down
28 changes: 14 additions & 14 deletions workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -226,57 +226,57 @@ zip = { version = "0.6.6", default-features = false, features = ["bzip2", "defla
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }

[target.x86_64-unknown-linux-gnu.build-dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }

[target.x86_64-apple-darwin.dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
errno = { version = "0.3.2", default-features = false, features = ["std"] }
errno = { version = "0.3.8", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }

[target.x86_64-apple-darwin.build-dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
errno = { version = "0.3.2", default-features = false, features = ["std"] }
errno = { version = "0.3.8", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }

[target.aarch64-apple-darwin.dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
errno = { version = "0.3.2", default-features = false, features = ["std"] }
errno = { version = "0.3.8", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }

[target.aarch64-apple-darwin.build-dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
errno = { version = "0.3.2", default-features = false, features = ["std"] }
errno = { version = "0.3.8", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }

[target.x86_64-unknown-illumos.dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
errno = { version = "0.3.2", default-features = false, features = ["std"] }
errno = { version = "0.3.8", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }
toml_datetime = { version = "0.6.5", default-features = false, features = ["serde"] }
toml_edit-cdcf2f9584511fe6 = { package = "toml_edit", version = "0.19.15", features = ["serde"] }

[target.x86_64-unknown-illumos.build-dependencies]
bitflags-f595c2ba2a3f28df = { package = "bitflags", version = "2.4.0", default-features = false, features = ["std"] }
errno = { version = "0.3.2", default-features = false, features = ["std"] }
errno = { version = "0.3.8", default-features = false, features = ["std"] }
mio = { version = "0.8.9", features = ["net", "os-ext"] }
once_cell = { version = "1.19.0", features = ["unstable"] }
rustix = { version = "0.38.25", features = ["fs", "termios"] }
rustix = { version = "0.38.30", features = ["fs", "termios"] }
toml_datetime = { version = "0.6.5", default-features = false, features = ["serde"] }
toml_edit-cdcf2f9584511fe6 = { package = "toml_edit", version = "0.19.15", features = ["serde"] }

Expand Down

0 comments on commit 8564b7e

Please sign in to comment.