From ef10d0476754ba2fb63a76cc0ab4b9c83fe61568 Mon Sep 17 00:00:00 2001 From: Kyle Moorhead Date: Tue, 19 May 2026 17:32:32 +0000 Subject: [PATCH 1/4] flowey: split openvmm-deps into separate archives and add Linux 6.18 kernel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Update resolve_openvmm_deps to download separate archives per dep type: - openvmm-deps.{arch}.{ver}.tar.gz (SDK: dbgrd, shell, sysroot, petritools) - openvmm-test-initrd.{arch}.{ver}.tar.gz (shared test initrd) - openvmm-test-linux-{kernel_ver}.{arch}.{ver}.tar.gz (test kernel) This matches the new openvmm-deps release structure (0.3.0-29+). Archive format changed from .tar.bz2 to .tar.gz. Add test_kernel_version field to Config and OPENVMM_TEST_LINUX_KERNEL constant ("6.18") to cfg_versions.rs. The Request::Get API is unchanged — consumers are unaffected. Version set to TODO-PLACEHOLDER-PENDING-RELEASE until the openvmm-deps release with 6.18 kernel artifacts is cut. --- .github/workflows/openvmm-ci.yaml | 24 +-- .github/workflows/openvmm-pr-release.yaml | 24 +-- .github/workflows/openvmm-pr.yaml | 48 +++--- ci-flowey/openvmm-pr.yaml | 8 +- .../src/_jobs/cfg_versions.rs | 3 +- .../src/resolve_openvmm_deps.rs | 141 +++++++++++------- 6 files changed, 142 insertions(+), 106 deletions(-) diff --git a/.github/workflows/openvmm-ci.yaml b/.github/workflows/openvmm-ci.yaml index 062534d926..cf2f6c109e 100644 --- a/.github/workflows/openvmm-ci.yaml +++ b/.github/workflows/openvmm-ci.yaml @@ -2163,6 +2163,12 @@ jobs: flowey e 15 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 15 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 15 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 15 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 15 flowey_lib_common::download_gh_release 0 shell: bash @@ -2192,12 +2198,6 @@ jobs: - name: extract X86_64 sysroot.tar.gz run: flowey e 15 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 15 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 15 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 15 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash @@ -3198,6 +3198,12 @@ jobs: flowey e 18 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 18 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 18 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 18 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 18 flowey_lib_common::download_gh_release 0 shell: bash @@ -3227,12 +3233,6 @@ jobs: - name: extract Aarch64 sysroot.tar.gz run: flowey e 18 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 18 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 18 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 18 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash diff --git a/.github/workflows/openvmm-pr-release.yaml b/.github/workflows/openvmm-pr-release.yaml index 6fefff41ed..7255880004 100644 --- a/.github/workflows/openvmm-pr-release.yaml +++ b/.github/workflows/openvmm-pr-release.yaml @@ -1926,6 +1926,12 @@ jobs: flowey e 15 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 15 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 15 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 15 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 15 flowey_lib_common::download_gh_release 0 shell: bash @@ -1955,12 +1961,6 @@ jobs: - name: extract X86_64 sysroot.tar.gz run: flowey e 15 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 15 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 15 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 15 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash @@ -2967,6 +2967,12 @@ jobs: flowey e 18 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 18 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 18 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 18 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 18 flowey_lib_common::download_gh_release 0 shell: bash @@ -2996,12 +3002,6 @@ jobs: - name: extract Aarch64 sysroot.tar.gz run: flowey e 18 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 18 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 18 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 18 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash diff --git a/.github/workflows/openvmm-pr.yaml b/.github/workflows/openvmm-pr.yaml index fc7791378c..4bea8ccc29 100644 --- a/.github/workflows/openvmm-pr.yaml +++ b/.github/workflows/openvmm-pr.yaml @@ -701,6 +701,12 @@ jobs: flowey e 11 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 11 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 11 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 11 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 11 flowey_lib_common::download_gh_release 0 shell: bash @@ -733,12 +739,6 @@ jobs: - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 11 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 11 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 11 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: unpack protoc run: flowey e 11 flowey_lib_common::resolve_protoc 0 shell: bash @@ -1235,6 +1235,12 @@ jobs: flowey e 13 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 13 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 13 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 13 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 13 flowey_lib_common::download_gh_release 0 shell: bash @@ -1267,12 +1273,6 @@ jobs: - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 13 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 13 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 13 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: unpack protoc run: flowey e 13 flowey_lib_common::resolve_protoc 0 shell: bash @@ -2317,6 +2317,12 @@ jobs: flowey e 17 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 17 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 17 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 17 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 17 flowey_lib_common::download_gh_release 0 shell: bash @@ -2346,12 +2352,6 @@ jobs: - name: extract X86_64 sysroot.tar.gz run: flowey e 17 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 17 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 17 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 17 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash @@ -3542,6 +3542,12 @@ jobs: flowey e 20 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 20 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 20 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 20 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: create gh-release-download cache dir run: flowey e 20 flowey_lib_common::download_gh_release 0 shell: bash @@ -3571,12 +3577,6 @@ jobs: - name: extract Aarch64 sysroot.tar.gz run: flowey e 20 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 20 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 20 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 20 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash diff --git a/ci-flowey/openvmm-pr.yaml b/ci-flowey/openvmm-pr.yaml index 5dd82e462f..8f911ed662 100644 --- a/ci-flowey/openvmm-pr.yaml +++ b/ci-flowey/openvmm-pr.yaml @@ -280,6 +280,10 @@ jobs: $(FLOWEY_BIN) e 15 flowey_lib_hvlite::git_checkout_openvmm_repo 0 $(FLOWEY_BIN) e 15 flowey_lib_hvlite::cfg_openvmm_magicpath 0 displayName: report cloned repo directories + - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 0 + displayName: checking if packages need to be installed + - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 1 + displayName: installing packages - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::download_gh_release 0 displayName: create gh-release-download cache dir - bash: |- @@ -307,10 +311,6 @@ jobs: displayName: unpack openvmm-deps archive - bash: $(FLOWEY_BIN) e 15 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 displayName: extract X86_64 sysroot.tar.gz - - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 0 - displayName: checking if packages need to be installed - - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 1 - displayName: installing packages - bash: $(FLOWEY_BIN) e 15 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 displayName: set '-Dwarnings' in .cargo/config.toml - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::resolve_protoc 0 diff --git a/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs b/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs index c64e719333..d86146f173 100644 --- a/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs +++ b/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs @@ -32,7 +32,8 @@ pub const NODEJS: &str = "24.x"; // increases with each release from the respective branch. pub const OPENHCL_KERNEL_DEV_VERSION: &str = "6.18.0.2"; pub const OPENHCL_KERNEL_STABLE_VERSION: &str = "6.18.0.2"; -pub const OPENVMM_DEPS: &str = "0.3.0-29"; +pub const OPENVMM_DEPS: &str = "0.3.0-33"; +pub const OPENVMM_TEST_LINUX_KERNEL: &str = "6.18"; pub const PROTOC: &str = "27.1"; flowey_request! { diff --git a/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs b/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs index bbafb2f36c..16dff43c63 100644 --- a/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs +++ b/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs @@ -2,10 +2,16 @@ // Licensed under the MIT License. //! Download various pre-built `openvmm-deps` dependencies, or use a local path if specified. +//! +//! The openvmm-deps release publishes separate archives: +//! - `openvmm-deps.{arch}.{ver}.tar.gz` — SDK tools (dbgrd, shell, sysroot, petritools) +//! - `openvmm-test-initrd.{arch}.{ver}.tar.gz` — shared test initrd +//! - `openvmm-test-linux-{kernel_ver}.{arch}.{ver}.tar.gz` — test kernel use crate::common::CommonArch; use flowey::node::prelude::*; use std::collections::BTreeMap; +use std::collections::BTreeSet; /// Which file to extract from the openvmm-deps archive. #[derive(Serialize, Deserialize, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] @@ -27,6 +33,37 @@ impl OpenvmmDepFile { } } +/// Which source archive a dep file comes from. +/// +/// Test kernel and initrd archives are handled by their own dedicated nodes +/// ([`crate::resolve_openvmm_test_linux_kernel`] and +/// [`crate::resolve_openvmm_test_initrd`]). +#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] +enum SourceArchive { + /// `openvmm-deps.{arch}.{ver}.tar.gz` + OpenvmmDeps, +} + +impl OpenvmmDepFile { + fn source_archive(self) -> SourceArchive { + match self { + Self::OpenhclCpioDbgrd + | Self::OpenhclCpioShell + | Self::OpenhclSysroot + | Self::PetritoolsErofs => SourceArchive::OpenvmmDeps, + } + } +} + +impl SourceArchive { + /// Returns the archive filename for the given architecture and version. + fn archive_filename(self, arch_str: &str, version: &str) -> String { + match self { + Self::OpenvmmDeps => format!("openvmm-deps.{arch_str}.{version}.tar.gz"), + } + } +} + flowey_config! { /// Config for the resolve_openvmm_deps node. pub struct Config { @@ -87,9 +124,6 @@ impl FlowNodeWithConfig for Node { return Ok(()); } - // Which architectures have at least one dep requested? - let needs_arch = |arch: CommonArch| deps.keys().any(|(_, a)| *a == arch); - if !local_paths.is_empty() { ctx.emit_rust_step("use local openvmm-deps", |ctx| { let deps = deps.claim(ctx); @@ -118,67 +152,68 @@ impl FlowNodeWithConfig for Node { return Ok(()); } - let extract_tar_gz_persistent_dir = ctx.persistent_dir(); - - let download_archive = |arch: CommonArch, ctx: &mut NodeCtx<'_>| { - let version = version.clone().expect("local requests handled above"); - let arch_str = match arch { - CommonArch::X86_64 => "x86_64", - CommonArch::Aarch64 => "aarch64", - }; - ctx.reqv(|v| flowey_lib_common::download_gh_release::Request { - repo_owner: "microsoft".into(), - repo_name: "openvmm-deps".into(), - needs_auth: false, - tag: version.clone(), - file_name: format!("openvmm-deps.{arch_str}.{version}.tar.gz"), - path: v, - }) - }; + let version = version.expect("local requests handled above"); - let openvmm_deps_tar_gz_x64 = - needs_arch(CommonArch::X86_64).then(|| download_archive(CommonArch::X86_64, ctx)); - let openvmm_deps_tar_gz_aarch64 = - needs_arch(CommonArch::Aarch64).then(|| download_archive(CommonArch::Aarch64, ctx)); + // Determine which (source_archive, arch) pairs we need to download. + let needed_archives: BTreeSet<(SourceArchive, CommonArch)> = deps + .keys() + .map(|(dep, arch)| (dep.source_archive(), *arch)) + .collect(); + + let extract_tar_bz2_deps = + flowey_lib_common::_util::extract::extract_tar_bz2_if_new_deps(ctx); + + // Download each unique (source_archive, arch) pair. + let downloads: BTreeMap<(SourceArchive, CommonArch), ReadVar> = needed_archives + .into_iter() + .map(|(source, arch)| { + let arch_str = match arch { + CommonArch::X86_64 => "x86_64", + CommonArch::Aarch64 => "aarch64", + }; + let file_name = source.archive_filename(arch_str, &version); + let path = ctx.reqv(|v| flowey_lib_common::download_gh_release::Request { + repo_owner: "microsoft".into(), + repo_name: "openvmm-deps".into(), + needs_auth: false, + tag: version.clone(), + file_name, + path: v, + }); + ((source, arch), path) + }) + .collect(); ctx.emit_rust_step("unpack openvmm-deps archive", |ctx| { - let extract_tar_gz_persistent_dir = extract_tar_gz_persistent_dir.claim(ctx); - let openvmm_deps_tar_gz_x64 = openvmm_deps_tar_gz_x64.claim(ctx); - let openvmm_deps_tar_gz_aarch64 = openvmm_deps_tar_gz_aarch64.claim(ctx); + let extract_tar_bz2_deps = extract_tar_bz2_deps.claim(ctx); + let downloads: BTreeMap<_, _> = downloads + .into_iter() + .map(|(key, var)| (key, var.claim(ctx))) + .collect(); let deps = deps.claim(ctx); - let version = version.clone().expect("local requests handled above"); + let version = version.clone(); move |rt| { - let persistent_dir = extract_tar_gz_persistent_dir.map(|d| rt.read(d)); - let extract_dir_x64 = openvmm_deps_tar_gz_x64 - .map(|file| { - let file = rt.read(file); - flowey_lib_common::_util::extract::extract_tar_gz_if_new( - rt, - persistent_dir.as_deref(), - &file, - &version, - ) - }) - .transpose()?; - let extract_dir_aarch64 = openvmm_deps_tar_gz_aarch64 - .map(|file| { - let file = rt.read(file); - flowey_lib_common::_util::extract::extract_tar_gz_if_new( + // Extract each downloaded archive, keyed by (source, arch). + let extract_dirs: BTreeMap<(SourceArchive, CommonArch), PathBuf> = downloads + .into_iter() + .map(|(key, var)| { + let file = rt.read(var); + let dir = flowey_lib_common::_util::extract::extract_tar_bz2_if_new( rt, - persistent_dir.as_deref(), + extract_tar_bz2_deps.clone(), &file, &version, - ) + )?; + Ok((key, dir)) }) - .transpose()?; - - let base_dir = |arch| match arch { - CommonArch::X86_64 => extract_dir_x64.clone().unwrap(), - CommonArch::Aarch64 => extract_dir_aarch64.clone().unwrap(), - }; + .collect::>()?; for ((dep, arch), vars) in deps { - let path = base_dir(arch).join(dep.filename()); + let source = dep.source_archive(); + let extract_dir = extract_dirs + .get(&(source, arch)) + .expect("archive was downloaded for this dep"); + let path = extract_dir.join(dep.filename()); rt.write_all(vars, &path) } From 2e275c463e8345ed6776a88c30d3d8a83bbd6793 Mon Sep 17 00:00:00 2001 From: Kyle Moorhead Date: Wed, 20 May 2026 16:26:53 +0000 Subject: [PATCH 2/4] flowey: add Linux 6.18 test kernel and set as default - Add Linux6_18 variant to LinuxTestKernelVersion enum - Update DEFAULT_LINUX_TEST_KERNEL_VERSION to Linux6_18 - Remove unused OPENVMM_TEST_LINUX_KERNEL constant from cfg_versions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs | 1 - .../src/resolve_openvmm_test_linux_kernel.rs | 8 +++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs b/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs index d86146f173..89f3ac8619 100644 --- a/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs +++ b/flowey/flowey_lib_hvlite/src/_jobs/cfg_versions.rs @@ -33,7 +33,6 @@ pub const NODEJS: &str = "24.x"; pub const OPENHCL_KERNEL_DEV_VERSION: &str = "6.18.0.2"; pub const OPENHCL_KERNEL_STABLE_VERSION: &str = "6.18.0.2"; pub const OPENVMM_DEPS: &str = "0.3.0-33"; -pub const OPENVMM_TEST_LINUX_KERNEL: &str = "6.18"; pub const PROTOC: &str = "27.1"; flowey_request! { diff --git a/flowey/flowey_lib_hvlite/src/resolve_openvmm_test_linux_kernel.rs b/flowey/flowey_lib_hvlite/src/resolve_openvmm_test_linux_kernel.rs index 501ba742df..7d0edd3b64 100644 --- a/flowey/flowey_lib_hvlite/src/resolve_openvmm_test_linux_kernel.rs +++ b/flowey/flowey_lib_hvlite/src/resolve_openvmm_test_linux_kernel.rs @@ -21,13 +21,10 @@ use std::collections::BTreeSet; /// Which Linux test kernel version to fetch from the openvmm-deps GitHub /// release. -/// -/// The `openvmm-deps` release currently only ships the 6.1 kernel; additional -/// kernel lines (e.g. 6.6, 6.12) are intended to be added as purely additive -/// follow-ups, both upstream and as new variants of this enum. #[derive(Serialize, Deserialize, Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] pub enum LinuxTestKernelVersion { Linux6_1, + Linux6_18, } impl LinuxTestKernelVersion { @@ -36,6 +33,7 @@ impl LinuxTestKernelVersion { pub fn artifact_tag(self) -> &'static str { match self { Self::Linux6_1 => "6.1", + Self::Linux6_18 => "6.18", } } } @@ -73,7 +71,7 @@ impl OpenvmmTestKernelFile { /// The default Linux test kernel version. Call sites that don't otherwise care /// which kernel they're using should pass this. pub const DEFAULT_LINUX_TEST_KERNEL_VERSION: LinuxTestKernelVersion = - LinuxTestKernelVersion::Linux6_1; + LinuxTestKernelVersion::Linux6_18; flowey_config! { /// Config for the resolve_openvmm_test_linux_kernel node. From 3aea3ee2b4b13ee91924669f5ea1086fab6748a1 Mon Sep 17 00:00:00 2001 From: Kyle Moorhead Date: Wed, 20 May 2026 20:00:22 +0000 Subject: [PATCH 3/4] fix(flowey): use tar.gz extraction for openvmm-deps archives The rewrite incorrectly used extract_tar_bz2_if_new which unnecessarily installs the bzip2 package. Switch to extract_tar_gz_if_new consistent with the sibling test kernel and initrd resolver modules. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/openvmm-ci.yaml | 24 +++++----- .github/workflows/openvmm-pr-release.yaml | 24 +++++----- .github/workflows/openvmm-pr.yaml | 48 +++++++++---------- ci-flowey/openvmm-pr.yaml | 8 ++-- .../src/resolve_openvmm_deps.rs | 11 +++-- 5 files changed, 58 insertions(+), 57 deletions(-) diff --git a/.github/workflows/openvmm-ci.yaml b/.github/workflows/openvmm-ci.yaml index cf2f6c109e..062534d926 100644 --- a/.github/workflows/openvmm-ci.yaml +++ b/.github/workflows/openvmm-ci.yaml @@ -2163,12 +2163,6 @@ jobs: flowey e 15 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 15 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 15 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 15 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 15 flowey_lib_common::download_gh_release 0 shell: bash @@ -2198,6 +2192,12 @@ jobs: - name: extract X86_64 sysroot.tar.gz run: flowey e 15 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 15 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 15 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 15 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash @@ -3198,12 +3198,6 @@ jobs: flowey e 18 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 18 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 18 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 18 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 18 flowey_lib_common::download_gh_release 0 shell: bash @@ -3233,6 +3227,12 @@ jobs: - name: extract Aarch64 sysroot.tar.gz run: flowey e 18 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 18 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 18 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 18 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash diff --git a/.github/workflows/openvmm-pr-release.yaml b/.github/workflows/openvmm-pr-release.yaml index 7255880004..6fefff41ed 100644 --- a/.github/workflows/openvmm-pr-release.yaml +++ b/.github/workflows/openvmm-pr-release.yaml @@ -1926,12 +1926,6 @@ jobs: flowey e 15 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 15 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 15 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 15 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 15 flowey_lib_common::download_gh_release 0 shell: bash @@ -1961,6 +1955,12 @@ jobs: - name: extract X86_64 sysroot.tar.gz run: flowey e 15 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 15 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 15 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 15 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash @@ -2967,12 +2967,6 @@ jobs: flowey e 18 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 18 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 18 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 18 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 18 flowey_lib_common::download_gh_release 0 shell: bash @@ -3002,6 +2996,12 @@ jobs: - name: extract Aarch64 sysroot.tar.gz run: flowey e 18 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 18 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 18 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 18 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash diff --git a/.github/workflows/openvmm-pr.yaml b/.github/workflows/openvmm-pr.yaml index 4bea8ccc29..fc7791378c 100644 --- a/.github/workflows/openvmm-pr.yaml +++ b/.github/workflows/openvmm-pr.yaml @@ -701,12 +701,6 @@ jobs: flowey e 11 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 11 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 11 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 11 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 11 flowey_lib_common::download_gh_release 0 shell: bash @@ -739,6 +733,12 @@ jobs: - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 11 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 11 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 11 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: unpack protoc run: flowey e 11 flowey_lib_common::resolve_protoc 0 shell: bash @@ -1235,12 +1235,6 @@ jobs: flowey e 13 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 13 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 13 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 13 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 13 flowey_lib_common::download_gh_release 0 shell: bash @@ -1273,6 +1267,12 @@ jobs: - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 13 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 13 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 13 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: unpack protoc run: flowey e 13 flowey_lib_common::resolve_protoc 0 shell: bash @@ -2317,12 +2317,6 @@ jobs: flowey e 17 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 17 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 17 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 17 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 17 flowey_lib_common::download_gh_release 0 shell: bash @@ -2352,6 +2346,12 @@ jobs: - name: extract X86_64 sysroot.tar.gz run: flowey e 17 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 17 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 17 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 17 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash @@ -3542,12 +3542,6 @@ jobs: flowey e 20 flowey_lib_hvlite::git_checkout_openvmm_repo 0 flowey e 20 flowey_lib_hvlite::cfg_openvmm_magicpath 0 shell: bash - - name: checking if packages need to be installed - run: flowey e 20 flowey_lib_common::install_dist_pkg 0 - shell: bash - - name: installing packages - run: flowey e 20 flowey_lib_common::install_dist_pkg 1 - shell: bash - name: create gh-release-download cache dir run: flowey e 20 flowey_lib_common::download_gh_release 0 shell: bash @@ -3577,6 +3571,12 @@ jobs: - name: extract Aarch64 sysroot.tar.gz run: flowey e 20 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 shell: bash + - name: checking if packages need to be installed + run: flowey e 20 flowey_lib_common::install_dist_pkg 0 + shell: bash + - name: installing packages + run: flowey e 20 flowey_lib_common::install_dist_pkg 1 + shell: bash - name: set '-Dwarnings' in .cargo/config.toml run: flowey e 20 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 shell: bash diff --git a/ci-flowey/openvmm-pr.yaml b/ci-flowey/openvmm-pr.yaml index 8f911ed662..5dd82e462f 100644 --- a/ci-flowey/openvmm-pr.yaml +++ b/ci-flowey/openvmm-pr.yaml @@ -280,10 +280,6 @@ jobs: $(FLOWEY_BIN) e 15 flowey_lib_hvlite::git_checkout_openvmm_repo 0 $(FLOWEY_BIN) e 15 flowey_lib_hvlite::cfg_openvmm_magicpath 0 displayName: report cloned repo directories - - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 0 - displayName: checking if packages need to be installed - - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 1 - displayName: installing packages - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::download_gh_release 0 displayName: create gh-release-download cache dir - bash: |- @@ -311,6 +307,10 @@ jobs: displayName: unpack openvmm-deps archive - bash: $(FLOWEY_BIN) e 15 flowey_lib_hvlite::init_openvmm_magicpath_openhcl_sysroot 0 displayName: extract X86_64 sysroot.tar.gz + - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 0 + displayName: checking if packages need to be installed + - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::install_dist_pkg 1 + displayName: installing packages - bash: $(FLOWEY_BIN) e 15 flowey_lib_hvlite::init_openvmm_cargo_config_deny_warnings 0 displayName: set '-Dwarnings' in .cargo/config.toml - bash: $(FLOWEY_BIN) e 15 flowey_lib_common::resolve_protoc 0 diff --git a/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs b/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs index 16dff43c63..31a39f054f 100644 --- a/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs +++ b/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs @@ -160,8 +160,7 @@ impl FlowNodeWithConfig for Node { .map(|(dep, arch)| (dep.source_archive(), *arch)) .collect(); - let extract_tar_bz2_deps = - flowey_lib_common::_util::extract::extract_tar_bz2_if_new_deps(ctx); + let persistent_dir = ctx.persistent_dir(); // Download each unique (source_archive, arch) pair. let downloads: BTreeMap<(SourceArchive, CommonArch), ReadVar> = needed_archives @@ -185,7 +184,7 @@ impl FlowNodeWithConfig for Node { .collect(); ctx.emit_rust_step("unpack openvmm-deps archive", |ctx| { - let extract_tar_bz2_deps = extract_tar_bz2_deps.claim(ctx); + let persistent_dir = persistent_dir.claim(ctx); let downloads: BTreeMap<_, _> = downloads .into_iter() .map(|(key, var)| (key, var.claim(ctx))) @@ -193,14 +192,16 @@ impl FlowNodeWithConfig for Node { let deps = deps.claim(ctx); let version = version.clone(); move |rt| { + let persistent_dir = persistent_dir.map(|d| rt.read(d)); + // Extract each downloaded archive, keyed by (source, arch). let extract_dirs: BTreeMap<(SourceArchive, CommonArch), PathBuf> = downloads .into_iter() .map(|(key, var)| { let file = rt.read(var); - let dir = flowey_lib_common::_util::extract::extract_tar_bz2_if_new( + let dir = flowey_lib_common::_util::extract::extract_tar_gz_if_new( rt, - extract_tar_bz2_deps.clone(), + persistent_dir.as_deref(), &file, &version, )?; From 690899a446e05f0b1baaa742c5abc13bf26540b3 Mon Sep 17 00:00:00 2001 From: Kyle Moorhead Date: Wed, 20 May 2026 20:05:04 +0000 Subject: [PATCH 4/4] refactor(flowey): remove single-variant SourceArchive enum Inline the archive filename logic directly since there is only one archive type (openvmm-deps). The kernel and initrd archives are handled by their own dedicated resolver modules. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../src/resolve_openvmm_deps.rs | 61 ++++--------------- 1 file changed, 13 insertions(+), 48 deletions(-) diff --git a/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs b/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs index 31a39f054f..f1feae3d43 100644 --- a/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs +++ b/flowey/flowey_lib_hvlite/src/resolve_openvmm_deps.rs @@ -33,37 +33,6 @@ impl OpenvmmDepFile { } } -/// Which source archive a dep file comes from. -/// -/// Test kernel and initrd archives are handled by their own dedicated nodes -/// ([`crate::resolve_openvmm_test_linux_kernel`] and -/// [`crate::resolve_openvmm_test_initrd`]). -#[derive(Copy, Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] -enum SourceArchive { - /// `openvmm-deps.{arch}.{ver}.tar.gz` - OpenvmmDeps, -} - -impl OpenvmmDepFile { - fn source_archive(self) -> SourceArchive { - match self { - Self::OpenhclCpioDbgrd - | Self::OpenhclCpioShell - | Self::OpenhclSysroot - | Self::PetritoolsErofs => SourceArchive::OpenvmmDeps, - } - } -} - -impl SourceArchive { - /// Returns the archive filename for the given architecture and version. - fn archive_filename(self, arch_str: &str, version: &str) -> String { - match self { - Self::OpenvmmDeps => format!("openvmm-deps.{arch_str}.{version}.tar.gz"), - } - } -} - flowey_config! { /// Config for the resolve_openvmm_deps node. pub struct Config { @@ -154,23 +123,20 @@ impl FlowNodeWithConfig for Node { let version = version.expect("local requests handled above"); - // Determine which (source_archive, arch) pairs we need to download. - let needed_archives: BTreeSet<(SourceArchive, CommonArch)> = deps - .keys() - .map(|(dep, arch)| (dep.source_archive(), *arch)) - .collect(); + // Determine which architectures we need to download. + let needed_archs: BTreeSet = deps.keys().map(|(_, arch)| *arch).collect(); let persistent_dir = ctx.persistent_dir(); - // Download each unique (source_archive, arch) pair. - let downloads: BTreeMap<(SourceArchive, CommonArch), ReadVar> = needed_archives + // Download each unique architecture. + let downloads: BTreeMap> = needed_archs .into_iter() - .map(|(source, arch)| { + .map(|arch| { let arch_str = match arch { CommonArch::X86_64 => "x86_64", CommonArch::Aarch64 => "aarch64", }; - let file_name = source.archive_filename(arch_str, &version); + let file_name = format!("openvmm-deps.{arch_str}.{version}.tar.gz"); let path = ctx.reqv(|v| flowey_lib_common::download_gh_release::Request { repo_owner: "microsoft".into(), repo_name: "openvmm-deps".into(), @@ -179,7 +145,7 @@ impl FlowNodeWithConfig for Node { file_name, path: v, }); - ((source, arch), path) + (arch, path) }) .collect(); @@ -194,10 +160,10 @@ impl FlowNodeWithConfig for Node { move |rt| { let persistent_dir = persistent_dir.map(|d| rt.read(d)); - // Extract each downloaded archive, keyed by (source, arch). - let extract_dirs: BTreeMap<(SourceArchive, CommonArch), PathBuf> = downloads + // Extract each downloaded archive, keyed by architecture. + let extract_dirs: BTreeMap = downloads .into_iter() - .map(|(key, var)| { + .map(|(arch, var)| { let file = rt.read(var); let dir = flowey_lib_common::_util::extract::extract_tar_gz_if_new( rt, @@ -205,15 +171,14 @@ impl FlowNodeWithConfig for Node { &file, &version, )?; - Ok((key, dir)) + Ok((arch, dir)) }) .collect::>()?; for ((dep, arch), vars) in deps { - let source = dep.source_archive(); let extract_dir = extract_dirs - .get(&(source, arch)) - .expect("archive was downloaded for this dep"); + .get(&arch) + .expect("archive was downloaded for this arch"); let path = extract_dir.join(dep.filename()); rt.write_all(vars, &path) }