代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/kuasar 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
%global debug_package %{nil}
Name: kuasar
Version: 1.0.0
Release: 5
Summary: Kuasar is an efficient container runtime that supports multiple sandbox techniques.
License: Apache License 2.0
URL: https://github.com/kuasar-io/kuasar
Source0: kuasar-openeuler.tar.gz
Source1: kernel.tar.gz
BuildRequires: automake golang bc glibc-devel glibc-static busybox glib2-devel glib2 ipvsadm conntrack-tools nfs-utils bash gcc cmake gcc-c++
BuildRequires: patch elfutils-libelf-devel openssl-devel bison flex rust cargo rust-packaging libgcc dtc-devel runc
%define _cargo /usr/bin/env CARGO_HOME=.cargo /usr/bin/cargo
%define hypervisor qemu
%define localbindir /usr/local/bin
%define kuasarconfdir /var/lib/kuasar
%define kuasarbuilddir %{_builddir}/kuasar-%{version}/kuasar-openeuler
%description
Kuasar is an efficient container runtime that provides cloud-native, all-scenario container solutions by supporting multiple sandbox techniques.
%prep
%setup -T -c -a 0 -n kuasar-%{version}
%setup -T -c -a 1 -n kernel
cd %{kuasarbuilddir}
sh -x apply-patches
cd %{_builddir}/kernel
mv kernel linux
cd %{_builddir}/kernel/linux
%ifarch %{ix86} x86_64
cp %{kuasarbuilddir}/kernel-config/kuasar-openeuler-kernel-x86_64.config ./.config
%else
cp %{kuasarbuilddir}/kernel-config/kuasar-openeuler-kernel-aarch64.config ./.config
%endif
%build
# build vmm-sandboxer and vmm-task
cd %{kuasarbuilddir}
sed -i '$a\[build\]\nrustflags = \["-Clink-arg=-s", "-Clink-arg=-Wl,-z,relro,-z,now"]' ./vmm/sandbox/.cargo/config.toml
sed -i '$a\[build\]\nrustflags = \["-Clink-arg=-s", "-Clink-arg=-Wl,-z,relro,-z,now"]' ./vmm/task/.cargo/config.toml
HYPERVISOR=%{hypervisor} make bin/vmm-sandboxer
%ifarch %{ix86} x86_64
ARCH=x86_64 HYPERVISOR=%{hypervisor} make bin/vmm-task
%else
ARCH=aarch64 HYPERVISOR=%{hypervisor} make bin/vmm-task
%endif
# build initrd
cp %{kuasarbuilddir}/bin/vmm-task ./initrd
cd initrd && sh -x make_kuasar_initrd.sh
# build kernel
cd %{_builddir}/kernel/linux/
make olddefconfig
make %{?_smp_mflags}
%install
mkdir -p -m 750 %{buildroot}/%{kuasarconfdir}
%ifarch %{ix86} x86_64
install -p -m 750 -D %{_builddir}/kernel/linux/arch/x86/boot/bzImage %{buildroot}/%{kuasarconfdir}/vmlinux.bin
install -p -m 640 -D %{kuasarbuilddir}/vmm/sandbox/config_%{hypervisor}_x86_64.toml %{buildroot}/%{kuasarconfdir}/config.toml
%else
install -p -m 750 -D %{_builddir}/kernel/linux/arch/arm64/boot/Image %{buildroot}/%{kuasarconfdir}/vmlinux.bin
install -p -m 640 -D %{kuasarbuilddir}/vmm/sandbox/config_%{hypervisor}_aarch64.toml %{buildroot}/%{kuasarconfdir}/config.toml
%endif
install -p -m 750 -D %{kuasarbuilddir}/initrd/kuasar.initrd %{buildroot}/%{kuasarconfdir}/kuasar.initrd
install -p -m 750 -D %{kuasarbuilddir}/bin/vmm-sandboxer %{buildroot}/%{localbindir}/vmm-sandboxer
install -p -m 640 -D %{kuasarbuilddir}/vmm/service/kuasar-vmm.service %{buildroot}/%{_unitdir}/kuasar-vmm.service
install -p -m 640 -D %{kuasarbuilddir}/vmm/service/kuasar-vmm %{buildroot}/etc/sysconfig/kuasar-vmm
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root,-)
%config(noreplace) %{_unitdir}/kuasar-vmm.service
%config(noreplace) /etc/sysconfig/kuasar-vmm
%{localbindir}/vmm-sandboxer
%{kuasarconfdir}/vmlinux.bin
%{kuasarconfdir}/kuasar.initrd
%config(noreplace) %{kuasarconfdir}/config.toml
%changelog
* Mon Jan 6 liuxu <liuxu156@huawei.com> -1.0.0-5
- logfix:print warn instead of error when dir not found.
* Fri Nov 29 liuxu <liuxu156@huawei.com> -1.0.0-4
- fix:use ttrpc-rust in vendor
* Thu Nov 28 liuxu <liuxu156@huawei.com> -1.0.0-3
- vmm:add ttrpc-rust to use vendor
* Mon Nov 4 liuxu <liuxu156@huawei.com> -1.0.0-2
- vmm:adapt qemu
* Wed Oct 23 liuxu <liuxu156@huawei.com> -1.0.0-1
- update to 1.0.0
* Tue Feb 6 jiangpengfei <jiangpengfei9@huawei.com> -0.1.0-6
- update build_require from docker-runc to runc
* Mon Sep 19 Vanient <xidanni1@huawei.com> -0.1.0-5
- set CONFIG_INITRAMFS_FILE_METADATA empty
* Mon Sep 4 flyflyflypeng <jiangpengfei9@huawei.com> -0.1.0-4
- remove ExecReload field in the systemd service file
* Fri Sep 1 Vanient <xidanni1@huawei.com> -0.1.0-3
- revert musl build -static-pie
* Tue Aug 29 Vanient <xiadanni1@huawei.com> - 0.1.0-2
- optimize compile options
* Thu Aug 24 Vanient <xiadanni1@huawei.com> - 0.1.0-1
- update to 0.1.0
* Tue Jul 18 2023 flyflyflypeng <jiangpengfei9@huawei.com> - 0.0.1-1
- init package
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。