From 320aacc3a89a385f865ef531bf3b6275498f5142 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 2 Oct 2026 17:12:51 +0000 Subject: [PATCH 1/5] vergen: idempotent builds from CI only, I guess? see the diff; it turns out that setting .idempotent() omits setting `rerun-if-changed=.git/HEAD`. then if you: * building Propolis at A (fresh or otherwise with no cached builds), * check out a different commit B, * build again without `cargo clean` or causing `propolis` to rebuild you end up with propolis-server and propolis-standalone binaries reporting they were built at commit A while containing code that quite definitely is from B. this should fix getting accurate commit data when you're making development builds from moving around in git, but keep things more determinsitic in CI. --- .github/buildomat/jobs/image.sh | 14 ++++++++++++++ .github/buildomat/jobs/phd-build.sh | 4 ++++ lib/propolis/build.rs | 1 - 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/buildomat/jobs/image.sh b/.github/buildomat/jobs/image.sh index 20b3fb163..1fd1fe699 100755 --- a/.github/buildomat/jobs/image.sh +++ b/.github/buildomat/jobs/image.sh @@ -31,6 +31,20 @@ ptime -m ./tools/install_builder_prerequisites.sh -y banner build +# We collect some build envrionment information with vergen to augment +# development builds, but this would otherwise put extra build-env info into +# the production (and test) binaries built here. While we don't test or rely on +# deterministic rebuilds of propolis-server, set Vergen up to use idempotent +# environment variables so we're not needlessly introducing build-time +# variance. +# +# "idempotent" still lets us collect the current relevant git info, so CI +# builds of propolis-server will still be able to self-report what commit they +# came from. See +# https://docs.rs/vergen/10.0.3/vergen/struct.Emitter.html#method.idempotent +# for more. +export VERGEN_IDEMPOTENT="true" + # Enable the "omicron-build" feature to indicate this is an artifact destined # for production use on an appropriately configured Oxide machine # diff --git a/.github/buildomat/jobs/phd-build.sh b/.github/buildomat/jobs/phd-build.sh index 4fc5d0e87..f1e71cca3 100644 --- a/.github/buildomat/jobs/phd-build.sh +++ b/.github/buildomat/jobs/phd-build.sh @@ -39,6 +39,10 @@ ptime -m ./tools/install_builder_prerequisites.sh -y # should fire during tests. banner build-propolis +# The same reasoning as in `image.sh` applies here, where we'd prefer more +# deterministic CI builds over less deterministic. +export VERGEN_IDEMPOTENT="true" + # We'll do a few cargo builds, keeping features the same means we reuse build # artifacts from crates these configure. TEST_FEATURES="omicron-build,failure-injection" diff --git a/lib/propolis/build.rs b/lib/propolis/build.rs index 253d8f083..a73d47291 100644 --- a/lib/propolis/build.rs +++ b/lib/propolis/build.rs @@ -10,7 +10,6 @@ fn main() -> anyhow::Result<()> { .sha(true) .build(); vergen_git2::Emitter::default() - .idempotent() .add_instructions(&git2)? .emit()?; From 404fc1bc6ee72e24d543207a95d96239ae2a9f93 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 2 Oct 2026 17:19:14 +0000 Subject: [PATCH 2/5] you remove ONE call from a builder and.. --- lib/propolis/build.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/propolis/build.rs b/lib/propolis/build.rs index a73d47291..ae6190d22 100644 --- a/lib/propolis/build.rs +++ b/lib/propolis/build.rs @@ -9,9 +9,7 @@ fn main() -> anyhow::Result<()> { .dirty(true) .sha(true) .build(); - vergen_git2::Emitter::default() - .add_instructions(&git2)? - .emit()?; + vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; Ok(()) } From 006cb8d23d6507a1634af7b06a3457f81ba6d22c Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 2 Oct 2026 20:02:43 +0000 Subject: [PATCH 3/5] fix vergen reporting stale tree-is-dirty information in bins --- Cargo.lock | 2 + Cargo.toml | 2 +- bin/propolis-server/Cargo.toml | 4 + bin/propolis-server/build.rs | 14 ++++ bin/propolis-server/src/main.rs | 8 +- bin/propolis-standalone/Cargo.toml | 5 ++ bin/propolis-standalone/build.rs | 14 ++++ bin/propolis-standalone/src/main.rs | 8 +- lib/propolis/build.rs | 1 - lib/propolis/src/lib.rs | 115 +++++++++++++++------------- 10 files changed, 115 insertions(+), 58 deletions(-) create mode 100644 bin/propolis-server/build.rs create mode 100644 bin/propolis-standalone/build.rs diff --git a/Cargo.lock b/Cargo.lock index 62bda49c8..eeee4d827 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7000,6 +7000,7 @@ dependencies = [ "toml 0.7.8", "usdt 0.6.0", "uuid", + "vergen-git2 10.0.1", "vm-attest", ] @@ -7044,6 +7045,7 @@ dependencies = [ "tokio", "toml 0.7.8", "uuid", + "vergen-git2 10.0.1", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 6a7d4bddf..ba5df1249 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,7 +117,7 @@ cargo_metadata = "0.18.1" cc = "1.0.73" cfg-if = "1.0.0" chrono = "0.4.19" -clap = "4.2" +clap = { version = "4.2", features = ["string"] } const_format = "0.2" crossbeam-channel = "0.5" ctrlc = "3.2" diff --git a/bin/propolis-server/Cargo.toml b/bin/propolis-server/Cargo.toml index e20c9a2f4..bd08e018c 100644 --- a/bin/propolis-server/Cargo.toml +++ b/bin/propolis-server/Cargo.toml @@ -72,6 +72,10 @@ vm-attest.workspace = true base64.workspace = true schemars = { workspace = true, features = ["chrono", "uuid1"] } +[build-dependencies] +anyhow.workspace = true +vergen-git2.workspace = true + [dev-dependencies] hex.workspace = true reqwest = { workspace = true, features = ["rustls"] } diff --git a/bin/propolis-server/build.rs b/bin/propolis-server/build.rs new file mode 100644 index 000000000..be113c71b --- /dev/null +++ b/bin/propolis-server/build.rs @@ -0,0 +1,14 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +fn main() -> anyhow::Result<()> { + // See lib/propolis `fn version` for why we need this in bin crates rather + // than the library. + let git2 = vergen_git2::Git2::builder() + .dirty(true) + .build(); + vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; + + Ok(()) +} diff --git a/bin/propolis-server/src/main.rs b/bin/propolis-server/src/main.rs index 42fcc37c3..31fcfe657 100644 --- a/bin/propolis-server/src/main.rs +++ b/bin/propolis-server/src/main.rs @@ -73,7 +73,7 @@ fn parse_log_level(s: &str) -> anyhow::Result { } #[derive(Debug, Parser)] -#[clap(about, version = propolis::version())] +#[clap(about, version = propolis::version(option_env!("VERGEN_GIT_DIRTY")))] /// An HTTP server providing access to Propolis enum Args { /// Runs the Propolis server. @@ -122,7 +122,11 @@ fn run_server( ) -> anyhow::Result<()> { use propolis::api_version; - slog::info!(log, "Running {}", propolis::version()); + slog::info!( + log, + "Running {}", + propolis::version(option_env!("VERGEN_GIT_DIRTY")) + ); // Check that devices conform to expected API version if let Err(e) = api_version::check() { diff --git a/bin/propolis-standalone/Cargo.toml b/bin/propolis-standalone/Cargo.toml index f0e005f4d..97b89fddb 100644 --- a/bin/propolis-standalone/Cargo.toml +++ b/bin/propolis-standalone/Cargo.toml @@ -39,6 +39,11 @@ strum = { workspace = true, features = ["derive"] } tar.workspace = true uuid.workspace = true pbind.workspace = true +vergen-git2.workspace = true + +[build-dependencies] +anyhow.workspace = true +vergen-git2.workspace = true [features] default = [] diff --git a/bin/propolis-standalone/build.rs b/bin/propolis-standalone/build.rs new file mode 100644 index 000000000..be113c71b --- /dev/null +++ b/bin/propolis-standalone/build.rs @@ -0,0 +1,14 @@ +// This Source Code Form is subject to the terms of the Mozilla Public +// License, v. 2.0. If a copy of the MPL was not distributed with this +// file, You can obtain one at https://mozilla.org/MPL/2.0/. + +fn main() -> anyhow::Result<()> { + // See lib/propolis `fn version` for why we need this in bin crates rather + // than the library. + let git2 = vergen_git2::Git2::builder() + .dirty(true) + .build(); + vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; + + Ok(()) +} diff --git a/bin/propolis-standalone/src/main.rs b/bin/propolis-standalone/src/main.rs index 57c290331..f481524a0 100644 --- a/bin/propolis-standalone/src/main.rs +++ b/bin/propolis-standalone/src/main.rs @@ -1634,7 +1634,7 @@ fn api_version_checks(log: &slog::Logger) -> std::io::Result<()> { } #[derive(clap::Parser)] -#[clap(version = propolis::version())] +#[clap(version = propolis::version(option_env!("VERGEN_GIT_DIRTY")))] /// Propolis command-line frontend for running a VM. struct Args { /// Either the VM config file or a previously captured snapshot image. @@ -1668,7 +1668,11 @@ fn main() -> anyhow::Result { let log = build_log(log_level); - slog::info!(log, "Running {}", propolis::version()); + slog::info!( + log, + "Running {}", + propolis::version(option_env!("VERGEN_GIT_DIRTY")) + ); // Check that vmm and viona device version match what we expect api_version_checks(&log).context("API version checks")?; diff --git a/lib/propolis/build.rs b/lib/propolis/build.rs index ae6190d22..7dc28fe3b 100644 --- a/lib/propolis/build.rs +++ b/lib/propolis/build.rs @@ -6,7 +6,6 @@ fn main() -> anyhow::Result<()> { let git2 = vergen_git2::Git2::builder() .branch(true) .commit_count(true) - .dirty(true) .sha(true) .build(); vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; diff --git a/lib/propolis/src/lib.rs b/lib/propolis/src/lib.rs index 663263458..bf8482b89 100644 --- a/lib/propolis/src/lib.rs +++ b/lib/propolis/src/lib.rs @@ -40,63 +40,74 @@ pub mod vsock; pub use exits::{VmEntry, VmExit}; pub use vmm::Machine; -pub fn version() -> &'static str { - lazy_static::lazy_static! { - static ref VERSION: String = { - use std::fmt::Write; +/// Compute a version string for either `propolis` or some consumer of +/// `propolis-lib`. +/// +/// Because propolis' consumers are in-tree, they are all built together in at +/// least the same source checkout. The expectation, then, is that we can at +/// least centralize the commit-related parts of a version string here, and +/// leave consumers to fill in the last remaining detail: is the git working +/// tree dirty? +/// +/// We must take the state of the work tree as external information because to +/// collect it in propolis-lib risks reporting stale git-is-clean when changes +/// have been made. A change to `propolis-server` that only changes +/// `propolis-server` may not cause a rebuild to the library, for example! So +/// dirtyness must come from the end of the build DAG. +/// +/// As long as `propolis-lib` comes from the same source tree, though, it's not +/// possible to change git information without the propolis-lib build script +/// nudging it into rebuilding. +pub fn version(git_dirty: Option<&'static str>) -> String { + use std::fmt::Write; - let git = match ( - option_env!("VERGEN_GIT_BRANCH"), - option_env!("VERGEN_GIT_SHA"), - option_env!("VERGEN_GIT_COMMIT_COUNT"), - option_env!("VERGEN_GIT_DIRTY"), - ) { - (Some(branch), Some(sha), Some(commit), Some(dirty)) => { - Some((branch, sha, commit, dirty)) - }, - _ => { - None - } - }; + let git = match ( + option_env!("VERGEN_GIT_BRANCH"), + option_env!("VERGEN_GIT_SHA"), + option_env!("VERGEN_GIT_COMMIT_COUNT"), + git_dirty, + ) { + (Some(branch), Some(sha), Some(commit), Some(dirty)) => { + Some((branch, sha, commit, dirty)) + } + _ => None, + }; - let mut version = format!("v{}", env!("CARGO_PKG_VERSION")); - if let Some((branch, sha, commit, dirty)) = git { - write!(version, "-{commit} ").unwrap(); - let sha_prefix = sha.get(..9).unwrap_or(sha); - if dirty == "true" { - write!(version, "(DIRTY {sha_prefix}) ").unwrap(); - } else { - write!(version, "({sha_prefix}) ").unwrap(); - } - write!(version, "{branch}").unwrap(); - } else { - version.push_str(" "); - } + let mut version = format!("v{}", env!("CARGO_PKG_VERSION")); + if let Some((branch, sha, commit, dirty)) = git { + write!(version, "-{commit} ").unwrap(); + let sha_prefix = sha.get(..9).unwrap_or(sha); + if dirty == "true" { + write!(version, "(DIRTY {sha_prefix}) ").unwrap(); + } else { + write!(version, "({sha_prefix}) ").unwrap(); + } + write!(version, "{branch}").unwrap(); + } else { + version.push_str(" "); + } - version.push_str(", "); - match bhyve_api::api_version() { - Ok(v) => { - write!(version, "bhyve API v{v}").unwrap(); - } - Err(_) => { - version.push_str(""); - } - } + version.push_str(", "); + match bhyve_api::api_version() { + Ok(v) => { + write!(version, "bhyve API v{v}").unwrap(); + } + Err(_) => { + version.push_str(""); + } + } - version.push_str(", "); - match viona_api::api_version() { - Ok(v) => { - write!(version, "viona API v{v}").unwrap(); - } - Err(_) => { - version.push_str(""); - } - } + version.push_str(", "); + match viona_api::api_version() { + Ok(v) => { + write!(version, "viona API v{v}").unwrap(); + } + Err(_) => { + version.push_str(""); + } + } - version - }; - }; - &VERSION + version } #[cfg(test)] From 7d27ecca758addf7f46e9ad0383b12c100d484bf Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 2 Oct 2026 20:22:03 +0000 Subject: [PATCH 4/5] opt into a bit of a broad rerun-if-changed, but this keeps VERGEN_GIT_DIRTY accurate --- Cargo.toml | 2 +- bin/propolis-server/build.rs | 14 ---- bin/propolis-server/src/main.rs | 8 +- bin/propolis-standalone/build.rs | 14 ---- bin/propolis-standalone/src/main.rs | 8 +- lib/propolis/build.rs | 23 ++++++ lib/propolis/src/lib.rs | 115 +++++++++++++--------------- 7 files changed, 80 insertions(+), 104 deletions(-) delete mode 100644 bin/propolis-server/build.rs delete mode 100644 bin/propolis-standalone/build.rs diff --git a/Cargo.toml b/Cargo.toml index ba5df1249..6a7d4bddf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -117,7 +117,7 @@ cargo_metadata = "0.18.1" cc = "1.0.73" cfg-if = "1.0.0" chrono = "0.4.19" -clap = { version = "4.2", features = ["string"] } +clap = "4.2" const_format = "0.2" crossbeam-channel = "0.5" ctrlc = "3.2" diff --git a/bin/propolis-server/build.rs b/bin/propolis-server/build.rs deleted file mode 100644 index be113c71b..000000000 --- a/bin/propolis-server/build.rs +++ /dev/null @@ -1,14 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -fn main() -> anyhow::Result<()> { - // See lib/propolis `fn version` for why we need this in bin crates rather - // than the library. - let git2 = vergen_git2::Git2::builder() - .dirty(true) - .build(); - vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; - - Ok(()) -} diff --git a/bin/propolis-server/src/main.rs b/bin/propolis-server/src/main.rs index 31fcfe657..42fcc37c3 100644 --- a/bin/propolis-server/src/main.rs +++ b/bin/propolis-server/src/main.rs @@ -73,7 +73,7 @@ fn parse_log_level(s: &str) -> anyhow::Result { } #[derive(Debug, Parser)] -#[clap(about, version = propolis::version(option_env!("VERGEN_GIT_DIRTY")))] +#[clap(about, version = propolis::version())] /// An HTTP server providing access to Propolis enum Args { /// Runs the Propolis server. @@ -122,11 +122,7 @@ fn run_server( ) -> anyhow::Result<()> { use propolis::api_version; - slog::info!( - log, - "Running {}", - propolis::version(option_env!("VERGEN_GIT_DIRTY")) - ); + slog::info!(log, "Running {}", propolis::version()); // Check that devices conform to expected API version if let Err(e) = api_version::check() { diff --git a/bin/propolis-standalone/build.rs b/bin/propolis-standalone/build.rs deleted file mode 100644 index be113c71b..000000000 --- a/bin/propolis-standalone/build.rs +++ /dev/null @@ -1,14 +0,0 @@ -// This Source Code Form is subject to the terms of the Mozilla Public -// License, v. 2.0. If a copy of the MPL was not distributed with this -// file, You can obtain one at https://mozilla.org/MPL/2.0/. - -fn main() -> anyhow::Result<()> { - // See lib/propolis `fn version` for why we need this in bin crates rather - // than the library. - let git2 = vergen_git2::Git2::builder() - .dirty(true) - .build(); - vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; - - Ok(()) -} diff --git a/bin/propolis-standalone/src/main.rs b/bin/propolis-standalone/src/main.rs index f481524a0..57c290331 100644 --- a/bin/propolis-standalone/src/main.rs +++ b/bin/propolis-standalone/src/main.rs @@ -1634,7 +1634,7 @@ fn api_version_checks(log: &slog::Logger) -> std::io::Result<()> { } #[derive(clap::Parser)] -#[clap(version = propolis::version(option_env!("VERGEN_GIT_DIRTY")))] +#[clap(version = propolis::version())] /// Propolis command-line frontend for running a VM. struct Args { /// Either the VM config file or a previously captured snapshot image. @@ -1668,11 +1668,7 @@ fn main() -> anyhow::Result { let log = build_log(log_level); - slog::info!( - log, - "Running {}", - propolis::version(option_env!("VERGEN_GIT_DIRTY")) - ); + slog::info!(log, "Running {}", propolis::version()); // Check that vmm and viona device version match what we expect api_version_checks(&log).context("API version checks")?; diff --git a/lib/propolis/build.rs b/lib/propolis/build.rs index 7dc28fe3b..12d2da878 100644 --- a/lib/propolis/build.rs +++ b/lib/propolis/build.rs @@ -6,9 +6,32 @@ fn main() -> anyhow::Result<()> { let git2 = vergen_git2::Git2::builder() .branch(true) .commit_count(true) + .dirty(true) .sha(true) .build(); vergen_git2::Emitter::default().add_instructions(&git2)?.emit()?; + // Apologies for the broad rerun-if-changed, but stick with me: build.rs + // *must* rerun when source files are changed so that a version string's + // VERGEN_GIT_DIRTY is accurate. If we only rerun-on-changed for changes in + // the bin crates, that almost works, but means a source-only change in + // a crate in this tree that a bin depends on directly (say, + // propolis-api-types) wouldn't cause this build.rs to re-evaluate and get + // the right dirty bit in the version string. + // + // We could do the VERGEN_GIT_DIRTY work in the binary crates too, and plumb + // that back to propolis-lib version's string, but we'd want that to be + // broad to cover crates too. This takes the other approach: rerun + // propolis-lib build.rs if any files here have changed, which will cause + // propolis dependents to rebuild, and get updated version strings. This + // comes at the cost of recompiling the propolis-lib crate more often than + // strictly necessary during development, but that crate on its own is + // *much* faster to build than any of the bins being linked afterwards! + // + // This also means we can keep all of the versioning fiddliness here instead + // of subjecting every (e.g. both) user to thinking about this stuff. + println!("cargo:rerun-if-changed=../lib"); + println!("cargo:rerun-if-changed=../bin"); + println!("cargo:rerun-if-changed=../crates"); Ok(()) } diff --git a/lib/propolis/src/lib.rs b/lib/propolis/src/lib.rs index bf8482b89..663263458 100644 --- a/lib/propolis/src/lib.rs +++ b/lib/propolis/src/lib.rs @@ -40,74 +40,63 @@ pub mod vsock; pub use exits::{VmEntry, VmExit}; pub use vmm::Machine; -/// Compute a version string for either `propolis` or some consumer of -/// `propolis-lib`. -/// -/// Because propolis' consumers are in-tree, they are all built together in at -/// least the same source checkout. The expectation, then, is that we can at -/// least centralize the commit-related parts of a version string here, and -/// leave consumers to fill in the last remaining detail: is the git working -/// tree dirty? -/// -/// We must take the state of the work tree as external information because to -/// collect it in propolis-lib risks reporting stale git-is-clean when changes -/// have been made. A change to `propolis-server` that only changes -/// `propolis-server` may not cause a rebuild to the library, for example! So -/// dirtyness must come from the end of the build DAG. -/// -/// As long as `propolis-lib` comes from the same source tree, though, it's not -/// possible to change git information without the propolis-lib build script -/// nudging it into rebuilding. -pub fn version(git_dirty: Option<&'static str>) -> String { - use std::fmt::Write; +pub fn version() -> &'static str { + lazy_static::lazy_static! { + static ref VERSION: String = { + use std::fmt::Write; - let git = match ( - option_env!("VERGEN_GIT_BRANCH"), - option_env!("VERGEN_GIT_SHA"), - option_env!("VERGEN_GIT_COMMIT_COUNT"), - git_dirty, - ) { - (Some(branch), Some(sha), Some(commit), Some(dirty)) => { - Some((branch, sha, commit, dirty)) - } - _ => None, - }; + let git = match ( + option_env!("VERGEN_GIT_BRANCH"), + option_env!("VERGEN_GIT_SHA"), + option_env!("VERGEN_GIT_COMMIT_COUNT"), + option_env!("VERGEN_GIT_DIRTY"), + ) { + (Some(branch), Some(sha), Some(commit), Some(dirty)) => { + Some((branch, sha, commit, dirty)) + }, + _ => { + None + } + }; - let mut version = format!("v{}", env!("CARGO_PKG_VERSION")); - if let Some((branch, sha, commit, dirty)) = git { - write!(version, "-{commit} ").unwrap(); - let sha_prefix = sha.get(..9).unwrap_or(sha); - if dirty == "true" { - write!(version, "(DIRTY {sha_prefix}) ").unwrap(); - } else { - write!(version, "({sha_prefix}) ").unwrap(); - } - write!(version, "{branch}").unwrap(); - } else { - version.push_str(" "); - } + let mut version = format!("v{}", env!("CARGO_PKG_VERSION")); + if let Some((branch, sha, commit, dirty)) = git { + write!(version, "-{commit} ").unwrap(); + let sha_prefix = sha.get(..9).unwrap_or(sha); + if dirty == "true" { + write!(version, "(DIRTY {sha_prefix}) ").unwrap(); + } else { + write!(version, "({sha_prefix}) ").unwrap(); + } + write!(version, "{branch}").unwrap(); + } else { + version.push_str(" "); + } - version.push_str(", "); - match bhyve_api::api_version() { - Ok(v) => { - write!(version, "bhyve API v{v}").unwrap(); - } - Err(_) => { - version.push_str(""); - } - } + version.push_str(", "); + match bhyve_api::api_version() { + Ok(v) => { + write!(version, "bhyve API v{v}").unwrap(); + } + Err(_) => { + version.push_str(""); + } + } - version.push_str(", "); - match viona_api::api_version() { - Ok(v) => { - write!(version, "viona API v{v}").unwrap(); - } - Err(_) => { - version.push_str(""); - } - } + version.push_str(", "); + match viona_api::api_version() { + Ok(v) => { + write!(version, "viona API v{v}").unwrap(); + } + Err(_) => { + version.push_str(""); + } + } - version + version + }; + }; + &VERSION } #[cfg(test)] From d8e9a738d66bcc85323720e26618c8d9071d1824 Mon Sep 17 00:00:00 2001 From: iximeow Date: Fri, 2 Oct 2026 20:58:14 +0000 Subject: [PATCH 5/5] deps cleanup --- Cargo.lock | 2 -- bin/propolis-server/Cargo.toml | 4 ---- bin/propolis-standalone/Cargo.toml | 5 ----- 3 files changed, 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eeee4d827..62bda49c8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7000,7 +7000,6 @@ dependencies = [ "toml 0.7.8", "usdt 0.6.0", "uuid", - "vergen-git2 10.0.1", "vm-attest", ] @@ -7045,7 +7044,6 @@ dependencies = [ "tokio", "toml 0.7.8", "uuid", - "vergen-git2 10.0.1", ] [[package]] diff --git a/bin/propolis-server/Cargo.toml b/bin/propolis-server/Cargo.toml index bd08e018c..e20c9a2f4 100644 --- a/bin/propolis-server/Cargo.toml +++ b/bin/propolis-server/Cargo.toml @@ -72,10 +72,6 @@ vm-attest.workspace = true base64.workspace = true schemars = { workspace = true, features = ["chrono", "uuid1"] } -[build-dependencies] -anyhow.workspace = true -vergen-git2.workspace = true - [dev-dependencies] hex.workspace = true reqwest = { workspace = true, features = ["rustls"] } diff --git a/bin/propolis-standalone/Cargo.toml b/bin/propolis-standalone/Cargo.toml index 97b89fddb..f0e005f4d 100644 --- a/bin/propolis-standalone/Cargo.toml +++ b/bin/propolis-standalone/Cargo.toml @@ -39,11 +39,6 @@ strum = { workspace = true, features = ["derive"] } tar.workspace = true uuid.workspace = true pbind.workspace = true -vergen-git2.workspace = true - -[build-dependencies] -anyhow.workspace = true -vergen-git2.workspace = true [features] default = []