-
Notifications
You must be signed in to change notification settings - Fork 700
feat(openvmm): onboard OpenVMM to Azure Linux 4.0 #18703
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Ben Hillis (benhillis)
wants to merge
2
commits into
microsoft:4.0
Choose a base branch
from
benhillis:users/benhill/openvmm-4.0
base: 4.0
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # OpenVMM — modular, cross-platform virtual machine monitor. | ||
| # Not packaged by Fedora; maintained as a local spec using rpmautospec | ||
| # (%autorelease / %autochangelog). | ||
| # | ||
| # Upstream publishes a vendor archive as a release asset, so the build resolves | ||
| # every crate offline from it. Both sources are fetched from the release tag. | ||
| [components.openvmm] | ||
| spec = { type = "local", path = "openvmm.spec" } | ||
|
|
||
| [[components.openvmm.source-files]] | ||
| filename = "openvmm-0.1.0.tar.gz" | ||
| hash = "066c127e0f9b0e2fd34b5259b699688f8fed92d86f4b2d26c647057654568227aeb22de4d08ab1fc203f0b2f9a57144190bad778fc228d2ed456298a109c1f8b" | ||
| hash-type = "SHA512" | ||
| origin = { type = "download", uri = "https://github.com/microsoft/openvmm/archive/openvmm-v0.1.0/openvmm-0.1.0.tar.gz" } | ||
|
|
||
| [[components.openvmm.source-files]] | ||
| filename = "openvmm-0.1.0-vendor.tar.gz" | ||
| hash = "6ee0c42d2500808069c8083cb9340adc2fdf1ba01647679dbaa5350beb923454ec28405860afaa33f7a86676a20544cc32cc8385035babfdf3f9c44a6cc47ca1" | ||
| hash-type = "SHA512" | ||
| origin = { type = "download", uri = "https://github.com/microsoft/openvmm/releases/download/openvmm-v0.1.0/openvmm-0.1.0-vendor.tar.gz" } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,78 @@ | ||
| Name: openvmm | ||
| Version: 0.1.0 | ||
| Release: %autorelease | ||
| Summary: Modular, cross-platform virtual machine monitor | ||
|
|
||
| License: MIT | ||
|
benhillis marked this conversation as resolved.
|
||
| URL: https://github.com/microsoft/openvmm | ||
| Source0: %{url}/archive/openvmm-v%{version}/%{name}-%{version}.tar.gz | ||
| # Published with the release; contains the vendor tree and the cargo_config that | ||
| # maps the workspace's git dependencies into it. | ||
| Source1: %{url}/releases/download/openvmm-v%{version}/%{name}-%{version}-vendor.tar.gz | ||
|
|
||
| ExclusiveArch: x86_64 aarch64 | ||
|
|
||
| BuildRequires: cargo-rpm-macros >= 25 | ||
| BuildRequires: rust >= 1.95.0 | ||
| BuildRequires: cargo >= 1.95.0 | ||
| BuildRequires: openssl-devel | ||
| BuildRequires: protobuf-compiler | ||
| # protoc resolves the well-known .proto imports from /usr/include. | ||
| BuildRequires: protobuf-devel | ||
|
|
||
| %description | ||
| OpenVMM is a modular, cross-platform virtual machine monitor written in Rust. | ||
| This package provides the host binary, which runs virtual machines on Linux | ||
| via KVM or the Microsoft Hypervisor. | ||
|
|
||
| # A representative subset of the openvmm binary's dependency closure whose unit | ||
| # tests need no live VM. Not exhaustive; more crates can be added over time. | ||
| %global test_crates -p acpi -p consomme -p crypto -p loader -p mesh_protobuf -p openvmm_core -p openvmm_entry -p pal -p pci_core -p vhdx -p vm_topology -p vmcore -p vmm_core | ||
|
|
||
| %prep | ||
| %autosetup -n %{name}-openvmm-v%{version} -N | ||
| tar -xf %{SOURCE1} | ||
| # -N writes the build configuration without setting up a registry: the source | ||
| # replacements come from the cargo_config generated alongside the vendor tree, | ||
| # which also maps the git dependencies. | ||
| %cargo_prep -N | ||
| cat cargo_config >> .cargo/config.toml | ||
|
|
||
| %build | ||
| # Link against the system OpenSSL rather than building a bundled copy. | ||
| export OPENSSL_NO_VENDOR=1 | ||
| %cargo_build -- --locked -p %{name} | ||
|
Comment on lines
+42
to
+44
|
||
| %cargo_license_summary | ||
| %{cargo_license} > LICENSE.dependencies | ||
| # Equivalent to %%cargo_vendor_manifest, minus "--no-dedupe". That flag expands | ||
| # every shared dependency at each point it is reached, which on a workspace this | ||
| # size grows without bound (over 10^8 lines and still growing after ten minutes). | ||
| # cargo2rpm collapses the output into a set, so suppressing the duplicates cannot | ||
| # change the result. The remaining transformations match write-vendor-manifest: | ||
| # drop the "(proc-macro)" annotation and the workspace's own crates, then sort. | ||
| # The subshell keeps %%cargo_vendor_manifest's "set -euo pipefail", so a failing | ||
| # "cargo tree" is not masked by the exit status of the trailing "sort". | ||
| ( | ||
| set -euo pipefail | ||
| %{__cargo} tree --workspace --offline --edges=normal,build,dev --target=all \ | ||
| --all-features --prefix=none --format '{p}' \ | ||
| | sed -e 's/ (proc-macro)//' -e 's/ (\*)$//' -e '/^$/d' \ | ||
| | grep -vF "$PWD" | sort -u > cargo-vendor.txt | ||
| ) | ||
|
|
||
| %install | ||
| install -D -p -m 0755 target/rpm/%{name} %{buildroot}%{_bindir}/%{name} | ||
|
|
||
| %check | ||
| %cargo_test -- --locked --lib %{test_crates} | ||
| target/rpm/%{name} --version | ||
|
|
||
| %files | ||
| %license LICENSE | ||
| %license LICENSE.dependencies | ||
| %license cargo-vendor.txt | ||
| %doc README.md | ||
| %{_bindir}/%{name} | ||
|
|
||
| %changelog | ||
| %autochangelog | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| # Managed by azldev component update. Do not edit manually. | ||
| version = 1 | ||
| input-fingerprint = 'sha256:f2fa118a89557c6413ee87bb2d2426aaa23ef9692e48810cfbff23a902cf4893' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| ## START: Set by rpmautospec | ||
| ## (rpmautospec version 0.8.3) | ||
| ## RPMAUTOSPEC: autorelease, autochangelog | ||
| %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: | ||
| release_number = 3; | ||
| base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); | ||
| print(release_number + base_release_number - 1); | ||
| }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} | ||
| ## END: Set by rpmautospec | ||
|
|
||
| # This spec file has been modified by azldev to include build configuration overlays. | ||
| # Do not edit manually; changes may be overwritten. | ||
|
|
||
| Name: openvmm | ||
| Version: 0.1.0 | ||
| Release: %autorelease | ||
| Summary: Modular, cross-platform virtual machine monitor | ||
|
|
||
| License: MIT | ||
| URL: https://github.com/microsoft/openvmm | ||
| Source0: %{url}/archive/openvmm-v%{version}/%{name}-%{version}.tar.gz | ||
| # Published with the release; contains the vendor tree and the cargo_config that | ||
| # maps the workspace's git dependencies into it. | ||
| Source1: %{url}/releases/download/openvmm-v%{version}/%{name}-%{version}-vendor.tar.gz | ||
|
|
||
| ExclusiveArch: x86_64 aarch64 | ||
|
|
||
| BuildRequires: cargo-rpm-macros >= 25 | ||
| BuildRequires: rust >= 1.95.0 | ||
| BuildRequires: cargo >= 1.95.0 | ||
| BuildRequires: openssl-devel | ||
| BuildRequires: protobuf-compiler | ||
| # protoc resolves the well-known .proto imports from /usr/include. | ||
| BuildRequires: protobuf-devel | ||
|
|
||
| %description | ||
| OpenVMM is a modular, cross-platform virtual machine monitor written in Rust. | ||
| This package provides the host binary, which runs virtual machines on Linux | ||
| via KVM or the Microsoft Hypervisor. | ||
|
|
||
| # A representative subset of the openvmm binary's dependency closure whose unit | ||
| # tests need no live VM. Not exhaustive; more crates can be added over time. | ||
| %global test_crates -p acpi -p consomme -p crypto -p loader -p mesh_protobuf -p openvmm_core -p openvmm_entry -p pal -p pci_core -p vhdx -p vm_topology -p vmcore -p vmm_core | ||
|
|
||
| %prep | ||
| %autosetup -n %{name}-openvmm-v%{version} -N | ||
| tar -xf %{SOURCE1} | ||
| # -N writes the build configuration without setting up a registry: the source | ||
| # replacements come from the cargo_config generated alongside the vendor tree, | ||
| # which also maps the git dependencies. | ||
| %cargo_prep -N | ||
| cat cargo_config >> .cargo/config.toml | ||
|
|
||
| %build | ||
| # Link against the system OpenSSL rather than building a bundled copy. | ||
| export OPENSSL_NO_VENDOR=1 | ||
| %cargo_build -- --locked -p %{name} | ||
| %cargo_license_summary | ||
| %{cargo_license} > LICENSE.dependencies | ||
| # Equivalent to %%cargo_vendor_manifest, minus "--no-dedupe". That flag expands | ||
| # every shared dependency at each point it is reached, which on a workspace this | ||
| # size grows without bound (over 10^8 lines and still growing after ten minutes). | ||
| # cargo2rpm collapses the output into a set, so suppressing the duplicates cannot | ||
| # change the result. The remaining transformations match write-vendor-manifest: | ||
| # drop the "(proc-macro)" annotation and the workspace's own crates, then sort. | ||
| # The subshell keeps %%cargo_vendor_manifest's "set -euo pipefail", so a failing | ||
| # "cargo tree" is not masked by the exit status of the trailing "sort". | ||
| ( | ||
| set -euo pipefail | ||
| %{__cargo} tree --workspace --offline --edges=normal,build,dev --target=all \ | ||
| --all-features --prefix=none --format '{p}' \ | ||
| | sed -e 's/ (proc-macro)//' -e 's/ (\*)$//' -e '/^$/d' \ | ||
| | grep -vF "$PWD" | sort -u > cargo-vendor.txt | ||
| ) | ||
|
|
||
| %install | ||
| install -D -p -m 0755 target/rpm/%{name} %{buildroot}%{_bindir}/%{name} | ||
|
|
||
| %check | ||
| %cargo_test -- --locked --lib %{test_crates} | ||
| target/rpm/%{name} --version | ||
|
|
||
| %files | ||
| %license LICENSE | ||
| %license LICENSE.dependencies | ||
| %license cargo-vendor.txt | ||
| %doc README.md | ||
| %{_bindir}/%{name} | ||
|
|
||
| %changelog | ||
| ## START: Generated by rpmautospec | ||
| * Wed Sep 02 2026 Ben Hillis <benhill@microsoft.com> - 0.1.0-3 | ||
| - feat(openvmm): build for aarch64 and run unit tests | ||
|
|
||
| * Mon Aug 17 2026 Ben Hillis <benhill@microsoft.com> - 0.1.0-2 | ||
| - feat(openvmm): onboard OpenVMM to Azure Linux 4.0 | ||
|
|
||
| * Thu Jan 01 1970 azldev <> - 0.1.0-1 | ||
| - Initial sources | ||
| ## END: Generated by rpmautospec |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| SHA512 (openvmm-0.1.0.tar.gz) = 066c127e0f9b0e2fd34b5259b699688f8fed92d86f4b2d26c647057654568227aeb22de4d08ab1fc203f0b2f9a57144190bad778fc228d2ed456298a109c1f8b | ||
| SHA512 (openvmm-0.1.0-vendor.tar.gz) = 6ee0c42d2500808069c8083cb9340adc2fdf1ba01647679dbaa5350beb923454ec28405860afaa33f7a86676a20544cc32cc8385035babfdf3f9c44a6cc47ca1 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.