forked from pool/libkrun
- Update to version 1.9.0: * console: send a resize event on PORT_READY by @slp in #179 * Fix another batch of new clippy warnings by @slp in #182 * Fix constness when taking an array of string pointers by @teohhanhui in #181 * Fix new lints in Rust 1.78 by @teohhanhui in #184 * Use the correct documentation comment style recognized by clang by @teohhanhui in #183 * virtio/snd: import virtio-snd from vhost-user-sound by @slp in #186 - Changes from 1.8.1: * VirtIO optimizations - Changes from 1.8.0: * Implement stdin/stdout/stderr redirection support using multiport virtio-console * devices/legacy: import PL011 for aarch64 * init: accept arguments from the "args" Field * Fix various minor issues on macOS and add a CI workflow for this OS * Add Matej Hrica (mtjhrc) to CODEOWNERS * Implement an EFI flavor * Implement krun_add_vsock_port() and UnixProxy for guest communication with host UNIX sockets. * Implement the infrastructure to support sending shut down signals to the guest * lib: allow having multiple virtio-fs devices * devices/net: allow configuring a custom MAC * Import SECURITY_CTX support from virtiofsd * Makefile: fix EFI library naming * virtio/net: implement gvproxy backend * macos/eventfd: ignore EAGAIN on write * Import rutabaga_gfx+virtio_gpu from crosvm * devices/vsock/unix: implement update_peer_credit * devices/console: implement an empty port input * Extend virtio-gpu to support Venus on macOS * libkrun: Extend API to redirect console to file * virtio/fs/macos: overhaul to use macos inodes - Update to version 1.7.2: * Fix aarch64 build by adapting to changes in kvm-ioctl - Changes from 1.7.1 * Update kbs-types version to 0.5 and release 1.7.1 - Update to version 1.7.0: * SNP Attestation * Read TEE config from the end of the block device * De-vendorize kbs-types * Remove libfdt dependency * init: place SEV behind build-time conditional * devices/fs: fix reading the end of init.krun * init: don't build init.c on SEV flavor * Prepare to support libkrunfw 4.x * init: Report an error when execution of the user binary fails * virtio-net implementation using passt * Make krun_set_vm_config use the same argument type for num_vcpus as ... * Update sev crate to 1.2.0 * virtio net bugfixes and performance improvement * Makefile: De-couple KBS init sources from SEV-SNP * Update rust-vmm deps and bump version for upcoming release - Changes from 1.5.1 * Fix CI clippy * Add a pkgconf file * examples: Fix error handling of krun_create_ctx * VSOCK: fix reaper timeout * Fix typo in README.md * macos: implement host->guest time sync * Bump version to v1.5.1 - Changes from 1.5.0 * devices: update lru dep to 0.9 * Introduce the krun_set_data_disk API. - The vendored tarball already contains the config these days, so don't mess with that in the spec file OBS-URL: https://build.opensuse.org/request/show/1178751 OBS-URL: https://build.opensuse.org/package/show/Virtualization/libkrun?expand=0&rev=29
162 lines
4.1 KiB
RPMSpec
162 lines
4.1 KiB
RPMSpec
#
|
|
# spec file for package libkrun
|
|
#
|
|
# Copyright (c) 2024 SUSE LLC
|
|
#
|
|
# All modifications and additions to the file contributed by third parties
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
# upon. The license for this file, and modifications and additions to the
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
# license for the pristine package is not an Open Source License, in which
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
# published by the Open Source Initiative.
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
#
|
|
|
|
|
|
%define sev 1
|
|
|
|
%define descr \
|
|
libkrun is a dynamic library that allows programs to easily acquire the\
|
|
ability to run processes in a partially isolated environment using KVM Virtualization.\
|
|
It integrates a VMM (Virtual Machine Monitor, the userspace side of an Hypervisor) with\
|
|
the minimum amount of emulated devices required to its purpose, abstracting most of the\
|
|
complexity that comes from Virtual Machine management, offering users a simple C API.
|
|
|
|
# However sev has been defined, reset it if we're not on x86
|
|
%ifnarch x86_64
|
|
%define sev 0
|
|
%endif
|
|
|
|
%global rustflags '-Clink-arg=-Wl,-z,relro,-z,now'
|
|
Name: libkrun
|
|
Version: 1.9.0
|
|
Release: 0
|
|
Summary: A dynamic library providing KVM-based process isolation capabilities
|
|
License: Apache-2.0
|
|
URL: https://github.com/containers/libkrun
|
|
Source0: libkrun-%{version}.tar.gz
|
|
Source1: vendor.tar.zst
|
|
ExclusiveArch: x86_64 aarch64
|
|
BuildRequires: cargo >= 1.43.0
|
|
BuildRequires: gcc
|
|
BuildRequires: glibc-static
|
|
BuildRequires: libkrunfw-devel >= 3.6.3
|
|
BuildRequires: libopenssl-devel
|
|
BuildRequires: patchelf
|
|
BuildRequires: rust
|
|
%if %{sev}
|
|
BuildRequires: libkrunfw-sev-devel >= 3.6.3
|
|
%endif
|
|
%ifarch aarch64
|
|
BuildRequires: libfdt-devel >= 1.6.0
|
|
%endif
|
|
# For handling the transition from (very) old versions of the packages
|
|
Conflicts: libkrun-devel <= 0.1.7
|
|
Conflicts: libkrun0 <= 0.1.7
|
|
|
|
%description
|
|
%{summary}
|
|
|
|
%package -n %{name}1
|
|
Summary: A dynamic library providing KVM-based process isolation capabilities
|
|
Obsoletes: libkrun <= 1.4.1
|
|
|
|
%description -n %{name}1
|
|
%{descr}
|
|
|
|
%package devel
|
|
Summary: Header files and libraries for libkrun development
|
|
Requires: %{name}1 = %{version}-%{release}
|
|
|
|
%description devel
|
|
%{descr}
|
|
|
|
This package containes the libraries and headers needed to develop programs
|
|
that use libkrun Virtualization-based process isolation capabilities.
|
|
|
|
%if %{sev}
|
|
%package sev1
|
|
Summary: Dynamic library providing Virtualization-based process isolation capabilities (SEV variant)
|
|
Obsoletes: libkrun <= 1.4.1
|
|
|
|
%description sev1
|
|
%{descr}
|
|
|
|
This package contains the library that enables using AMD SEV to create a
|
|
microVM-based Trusted Execution Environment (TEE).
|
|
|
|
%package sev-devel
|
|
Summary: Header files and libraries for libkrun development
|
|
Requires: %{name}-devel = %{version}-%{release}
|
|
Requires: %{name}-sev1 = %{version}-%{release}
|
|
Provides: %{name}:%{_libdir}/libkrun-sev.so
|
|
Obsoletes: %{name} < %{version}
|
|
|
|
%description sev-devel
|
|
%{descr}
|
|
|
|
This package containes the libraries and headers needed to develop programs that
|
|
use libkrun-sev Virtualization-based process isolation capabilities.
|
|
%endif
|
|
|
|
%prep
|
|
%autosetup -a1
|
|
|
|
%build
|
|
export RUSTFLAGS=%{rustflags}
|
|
|
|
%make_build
|
|
|
|
%if %{sev}
|
|
%make_build SEV=1
|
|
%endif
|
|
|
|
%install
|
|
export RUSTFLAGS=%{rustflags}
|
|
|
|
%make_install PREFIX=%{_prefix}
|
|
|
|
%if %{sev}
|
|
%make_install SEV=1 PREFIX=%{_prefix}
|
|
%endif
|
|
|
|
%files -n %{name}1
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{_libdir}/libkrun.so.%{version}
|
|
%{_libdir}/libkrun.so.1
|
|
|
|
%files devel
|
|
%{_libdir}/libkrun.so
|
|
%{_libdir}/pkgconfig/libkrun.pc
|
|
%{_includedir}/libkrun.h
|
|
|
|
%post -n %{name}1 -p /sbin/ldconfig
|
|
|
|
%postun -n %{name}1 -p /sbin/ldconfig
|
|
|
|
%if %{sev}
|
|
%files sev1
|
|
%license LICENSE
|
|
%doc README.md
|
|
%{_libdir}/libkrun-sev.so.%{version}
|
|
%{_libdir}/libkrun-sev.so.1
|
|
|
|
%files sev-devel
|
|
%{_libdir}/libkrun-sev.so
|
|
|
|
%post sev1 -p /sbin/ldconfig
|
|
|
|
%postun sev1 -p /sbin/ldconfig
|
|
%endif
|
|
|
|
%if %{with check}
|
|
%check
|
|
%cargo_test
|
|
%endif
|
|
|
|
%changelog
|