stratovirt/stratovirt.spec
Fei Xu 5118a146a4 StratoVirt: synchronize 20.03 LTS SP2 branch to master
Signed-off-by: Fei Xu <xufei30@huawei.com>
2021-06-16 17:33:15 +08:00

103 lines
3.1 KiB
RPMSpec

#needsrootforbuild
%global __cargo_skip_build 0
%global _debugsource_packages 1
%global _debuginfo_subpackages 1
%define _unpackaged_files_terminate_build 0
Name: stratovirt
Version: 0.3.0
Release: 3
Summary: StratoVirt is an opensource VMM(Virtual Machine Manager) which aims to perform next generation virtualization.
License: Mulan PSL v2
URL: https://gitee.com/openeuler/StratoVirt
Source0: %{name}-%{version}.tar.gz
Patch0001: 0001-docs-update-readme.md-for-building-via-musl-toolchai.patch
Patch0002: 0002-docs-turn-on-the-option-switch-of-virtio-rng-for-x86.patch
Patch0003: 0003-doc-fix-an-uncorrect-link-for-build_guide-in-quickst.patch
Patch0004: 0004-update-rootfs-disk-image-description-in-README.ch.md.patch
Patch0005: 0005-update-rootfs-disk-image-description-in-README.md.patch
Patch0006: 0006-StratoVirt-clear-clippy-warnings-for-updating-rust-1.patch
Patch0007: 0007-testcases-virtio_blk-decrease-hot-plugged-blk-number.patch
Patch0008: 0008-testscases-vmlife-decrease-test-blk-number.patch
Patch0009: 0009-README-update-readme.patch
Patch0010: 0010-docs-add-IMAGE_BUILD.md.patch
ExclusiveArch: x86_64 aarch64
%ifarch aarch64
Requires: dtc
BuildRequires: dtc-devel
%endif
BuildRequires: rust
BuildRequires: cargo
BuildRequires: rust-packaging
%description
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.
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
* Sun May 28 2021 XuFei <xufei30@huawei.com> - 0.3.0-3
- Type:NA
- ID:NA
- SUG:NA
- DESC:modify docs,modify testcases and clear clippy warnings for updating rust 1.51.0
* Sun Apr 25 2021 LiangZhang <zhangliang5@huawei.com> - 0.3.0-2
- Type:NA
- ID:NA
- SUG:NA
- DESC:Add hydropper to package
* Sun Apr 25 2021 LiangZhang <zhangliang5@huawei.com> - 0.3.0-1
- Type:NA
- ID:NA
- SUG:NA
- DESC:Update package to 0.3.0
* Wed Jan 13 2021 LiangZhang <zhangliang5@huawei.com> - 0.1.0-3
- Type:NA
- ID:NA
- SUG:NA
- DESC:Update package to latest source
* Wed Jan 13 2021 XuFei <xufei30@huawei.com> - 0.1.0-2
- Type:NA
- ID:NA
- SUG:NA
- DESC:Modify summary and description for spec
* Thu Jul 16 2020 Xu Yandong <xuyandong2@huawei.com> - 0.1.0-1
- Initial package