Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions base/comps/openvmm/openvmm.comp.toml
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" }
Comment thread
benhillis marked this conversation as resolved.

[[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" }
78 changes: 78 additions & 0 deletions base/comps/openvmm/openvmm.spec
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
Comment thread
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
3 changes: 3 additions & 0 deletions locks/openvmm.lock
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'
100 changes: 100 additions & 0 deletions specs/o/openvmm/openvmm.spec
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
2 changes: 2 additions & 0 deletions specs/o/openvmm/sources
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
Loading