2020-09-23 15:22:11 +08:00
|
|
|
#needsrootforbuild
|
|
|
|
|
%global __cargo_skip_build 0
|
|
|
|
|
%global _debugsource_packages 1
|
|
|
|
|
%global _debuginfo_subpackages 1
|
|
|
|
|
%define _unpackaged_files_terminate_build 0
|
|
|
|
|
|
|
|
|
|
Name: stratovirt
|
|
|
|
|
Version: 0.1.0
|
2021-01-12 17:18:07 +08:00
|
|
|
Release: 2
|
|
|
|
|
Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization.
|
2020-09-23 15:22:11 +08:00
|
|
|
|
|
|
|
|
License: Mulan PSL v2
|
|
|
|
|
URL: https://gitee.com/openeuler/StratoVirt
|
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
ExclusiveArch: x86_64 aarch64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
Requires: dtc
|
|
|
|
|
BuildRequires: dtc-devel
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
BuildRequires: rust
|
|
|
|
|
BuildRequires: cargo
|
|
|
|
|
BuildRequires: rust-packaging
|
|
|
|
|
|
|
|
|
|
%description
|
2021-01-12 17:18:07 +08:00
|
|
|
Based on Rust programming language, StratoVirt is lightweight, efficient and safe. StratoVirt reduces memory resource consumption and improves VM startup speed while retains isolation capability and security capability of traditional virtualization. StratoVirt works with iSulad and Kata container, and can be integrated in Kubernetes ecosystem perfectly. The current version can be applied to microservices or serverless scenarios. StratoVirt reserves interface and design for importing more features, even standard virtualization.
|
2020-09-23 15:22:11 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
|
|
%files -n stratovirt
|
|
|
|
|
%{_bindir}/stratovirt
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -p1
|
|
|
|
|
|
|
|
|
|
%cargo_prep
|
|
|
|
|
|
|
|
|
|
%cargo_generate_buildrequires
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
|
|
|
|
|
sed -i '/\[source.crates-io\]/{n;d}' ./.cargo/config
|
|
|
|
|
sed -i '/\[source.local-registry\]/{n;d}' ./.cargo/config
|
|
|
|
|
sed -i '/\[source.local-registry\]/a directory = "vendor"' ./.cargo/config
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
sed -i 's/rustflags = \[/rustflags = \["-Clink-arg=-lgcc", "-Clink-arg=-lfdt", /g' ./.cargo/config
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%cargo_build -a
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%cargo_install -a
|
|
|
|
|
chmod 550 ${RPM_BUILD_ROOT}/usr/bin/stratovirt
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Thu Jul 16 03:19:44 EDT 2020 Xu Yandong <xuyandong2@huawei.com> - 0.1.0-1
|
|
|
|
|
- Initial package
|