Skip to content

SPECS: cloud-hypervisor: update to 51.1 with RISC-V KVM fixes#409

Open
wangyf0611 wants to merge 1 commit into
openRuyi-Project:mainfrom
wangyf0611:isrc/cloud-hypervisor-51.1-riscv-kvm
Open

SPECS: cloud-hypervisor: update to 51.1 with RISC-V KVM fixes#409
wangyf0611 wants to merge 1 commit into
openRuyi-Project:mainfrom
wangyf0611:isrc/cloud-hypervisor-51.1-riscv-kvm

Conversation

@wangyf0611
Copy link
Copy Markdown

Summary

Update cloud-hypervisor to upstream baseline tag v51.1 and add the RISC-V
KVM fixes required for Kata Containers with Cloud Hypervisor on openRuyi.

The SPEC builds with vendored Rust crates and preserves the official package
name cloud-hypervisor.

Baseline

  • Upstream source tag: v51.1
  • Patch source branch: https://git.openruyi.cn/jiayi/cloud-hypervisor/src/branch/riscv-kata-cloud-hypervisor
  • Package branch commit: 5f55276b29cedc946c35dd18ff3cf9a9d0ad2707

Validation

  • Applied all Cloud Hypervisor package patches to upstream v51.1 with
    git apply --check and git apply.
  • Ran git diff --check on the prepared package branch.
  • Ran check_source_with_remoteasset.py for the SPEC.
  • Ran remoteassetify.py --dry-run in an openRuyi guest with RPM 4.20.1.

AI-Assisted Contribution Disclosure

This contribution was prepared with AI assistance from Codex for SPEC formatting,
patch layout checks, command planning, and validation log consolidation. The
package changes, patch sources, checksums, branch commits, and validation
results were reviewed by the contributor. The commit message and sign-off were
set explicitly by the contributor identity.

Signed-off-by: isrc-riscv-port <riscv-port@isrc.iscas.ac.cn>
@openruyi-bot openruyi-bot Bot added Community: Contribution Issues that are actively being worked on by our community. BuildSystem: rust Issue/PR related to rust BuildSystem. Target: Rolling Targeting rolling/current branch. labels May 15, 2026
Copy link
Copy Markdown
Member

@misaka00251 misaka00251 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,

Thank you for your contribution.

However, we don't accept Rust crate vendor dependency tarballs in our repository. Please package these Rust crates separately. We offer an automatic program for this; please check the documentation.

Additionally, could you clarify the purpose of declaring BuildSystem if it is not being used at all?

Thank you.

Summary: Virtual Machine Monitor that runs on top of KVM
License: (Apache-2.0 OR BSD-3-Clause) AND CC-BY-4.0
URL: https://github.com/cloud-hypervisor/cloud-hypervisor
VCS: git:https://github.com/cloud-hypervisor/cloud-hypervisor.git
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the URL tag already directs to the source repository, the VCS tag may be omitted.

Source0: %{url}/archive/refs/tags/v%{upstream_tag}.tar.gz#/%{name}-%{version}.tar.gz
#!RemoteAsset: sha256:b3b388773a8cd6e4c06750ab77b858a00201fc8a52e204dcedb46959a049ad5d
Source1: https://git.openruyi.cn/jiayi/cloud-hypervisor/releases/download/vendor-v%{upstream_tag}/%{name}-%{version}-vendor.tar.zst
ExclusiveArch: x86_64 riscv64
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to do this.


BuildRequires: binutils
BuildRequires: cargo >= 1.89.0
BuildRequires: gcc
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no need for us to explicitly include BuildRequires: gcc.

Comment on lines -34 to -36
Requires: bash
Requires: glibc
Requires: libcap
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify the reason for deleting these Requires.

Comment on lines 44 to 52
%ifarch x86_64
%define rust_def_target x86_64-unknown-linux-gnu
%define cargo_pkg_feature_opts --no-default-features --features "mshv,kvm" -p cloud-hypervisor
%global rust_def_target x86_64-unknown-linux-gnu
%global cargo_pkg_feature_opts --no-default-features --features "mshv,kvm" -p cloud-hypervisor
%endif

%ifarch riscv64
%define rust_def_target riscv64gc-unknown-linux-gnu
%define cargo_pkg_feature_opts --no-default-features --features "kvm" -p cloud-hypervisor
%global rust_def_target riscv64gc-unknown-linux-gnu
%global cargo_pkg_feature_opts --no-default-features --features "kvm" -p cloud-hypervisor
%endif
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please position %global variables at the beginning of the Name: section.

Comment on lines 54 to +57
%description
Cloud Hypervisor is an open source Virtual Machine Monitor (VMM) that runs on
top of KVM. The project focuses on exclusively running modern, cloud workloads,
on top of a limited set of hardware architectures and platforms. Cloud
workloads refers to those that are usually run by customers inside a cloud
provider. For our purposes this means modern Linux* distributions with most I/O
handled by paravirtualised devices (i.e. virtio), no requirement for legacy
devices and recent CPUs and KVM.
Cloud Hypervisor is an open source Virtual Machine Monitor that runs on top of
KVM. The project focuses on modern cloud workloads using paravirtualized
devices, a small device model, and architecture support for x86_64 and RISC-V.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify the reason for replacing the whole %description block.

Comment on lines +60 to +63
%setup -q -n %{name}-%{upstream_tag}
%patch -P 0 -p1
%patch -P 1 -p1
%patch -P 2 -p1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you use %autosetup?

# the default package build chroot.

%files
%defattr(-,root,root,-)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please specify the reason for deleting this line.

Comment on lines +99 to +102
%license LICENSES/Apache-2.0.txt
%license LICENSES/BSD-3-Clause.txt
%license LICENSES/CC-BY-4.0.txt
%doc README.md
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
%license LICENSES/Apache-2.0.txt
%license LICENSES/BSD-3-Clause.txt
%license LICENSES/CC-BY-4.0.txt
%doc README.md
%doc README.md
%license LICENSES/Apache-2.0.txt
%license LICENSES/BSD-3-Clause.txt
%license LICENSES/CC-BY-4.0.txt

Comment on lines +1 to +2
# SPDX-FileCopyrightText: (C) 2026 Institute of Software, Chinese Academy of Sciences (ISCAS)
# SPDX-FileCopyrightText: (C) 2026 openRuyi Project Contributors
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do not change the year information.

@misaka00251 misaka00251 added the Workflow: In Review Issues that are undergoing code review and/or undergoing design review. label May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BuildSystem: rust Issue/PR related to rust BuildSystem. Community: Contribution Issues that are actively being worked on by our community. Target: Rolling Targeting rolling/current branch. Workflow: In Review Issues that are undergoing code review and/or undergoing design review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants