# libkrun tests require access to "/dev/kvm", which is usually not be available # on build sandboxes. %bcond_with check %global debug_package %{nil} Name: libkrun Version: 1.9.4 Release: 2%{?dist} Summary: Dynamic library providing Virtualization-based process isolation capabilities License: Apache-2.0 URL: https://github.com/containers/libkrun Source: https://github.com/containers/libkrun/archive/refs/tags/v%{version}.tar.gz Source1: %{name}-%{version}-vendor.tar.xz Patch1: libkrun-remove-gpu-deps.diff Patch2: libkrun-Support-tap-devices-as-network-backend-WIP.patch # libkrun only supports x86_64 and aarch64 ExclusiveArch: x86_64 aarch64 # While this project is composed mostly of Rust code, this is not a # conventional Rust crate. The root of the project is a workspace, there's a C # file that also needs to be compiled, and the resulting binary a dynamic # library providing a C-compatible ABI. # # As a result, we can't fully rely on rust-packaging for managing this package. # Instead, we use some of its tasks (cargo_prep and cargo_test) and combine # them with using the Makefile provided by the project. We also need to manage # BuildRequires manually, as rust-packaging gets confused trying to generate # them dynamically. %if 0%{?rhel} BuildRequires: rust-toolset %else BuildRequires: rust-packaging >= 21 %endif BuildRequires: glibc-static BuildRequires: patchelf BuildRequires: binutils BuildRequires: libkrunfw-devel >= 4.0.0 %ifarch aarch64 BuildRequires: libfdt-devel %endif %description %{summary}. %package devel Summary: Header files and libraries for libkrun development Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The libkrun-devel package containes the libraries and headers needed to develop programs that use libkrun Virtualization-based process isolation capabilities. %prep %autosetup -n %{name}-%{version_no_tilde} -p1 -a1 %cargo_prep -v vendor rm -f Cargo.lock %build %cargo_license_summary %{cargo_license} > LICENSE.dependencies %cargo_vendor_manifest %make_build init/init %make_build libkrun.pc %make_build NET=1 patchelf --set-soname libkrun.so.1 --output target/release/libkrun.so.%{version} target/release/libkrun.so %install %make_install PREFIX=%{_prefix} %files %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 %if %{with check} %check %cargo_test %endif %changelog * Tue Jul 23 2024 Sergio Lopez - 1.9.4-1 - Update to version 1.9.4 * Thu Jul 18 2024 Fedora Release Engineering - 1.9.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Tue Jun 04 2024 Sergio Lopez - 1.9.2-1 - Update to version 1.9.2 * Thu Jan 25 2024 Fedora Release Engineering - 1.7.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 1.7.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jan 11 2024 Sergio Lopez - 1.7.2-2 - Update versions of rust-vmm dependencies * Sun Dec 24 2023 Sergio Lopez - 1.7.2-1 - Update to version 1.7.2 * Fri Dec 01 2023 Fabio Valentini - 1.5.0-7 - Rebuild for openssl crate >= v0.10.60 (RUSTSEC-2023-0044, RUSTSEC-2023-0072) * Tue Sep 19 2023 Fabio Valentini - 1.5.0-6 - Rebuild for vm-memory v0.12.2 / CVE-2023-41051. * Thu Jul 20 2023 Fedora Release Engineering - 1.5.0-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Wed Jul 19 2023 Sergio Lopez - 1.5.0-4 - Update license specification to conform SPDX format * Wed Jul 19 2023 Sergio Lopez - 1.5.0-3 - Update vm-memory requirement to version 0.12.0 - Update kvm-ioctls requirement to version 0.14.0 - Add a temporary patch to accomodate an API change in kvm-ioctls * Wed May 03 2023 Fabio Valentini - 1.5.0-2 - Rebuild for openssl crate >= v0.10.48 (RUSTSEC-2023-{0022,0023,0024}) * Thu Feb 09 2023 Sergio Lopez - 1.5.0-1 - Update to version 1.5.0 - Update vm-memory, kvm-bindings, kvm-ioctls, vmm-sys-utils and sev dependencies - Add a patch to update and relax vm-memory dependency * Thu Jan 19 2023 Fedora Release Engineering - 1.4.8-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Nov 8 2022 Sergio Lopez - 1.4.8-1 - Update to upstream version 1.4.8 - Add crossbeam-channel to the list of dependencies - Update libkrun-remove-sev-deps.diff patch * Fri Aug 26 2022 Cole Robinson - 1.4.2-2 - Allow building with rust-sev-0.3.0 * Wed Aug 17 2022 Sergio Lopez - 1.4.2-1 - Update to upstream version 1.4.2 - Add the libkrun-sev and libkrun-sev-devel subpackages with the SEV variant of the library. * Thu Jul 21 2022 Fedora Release Engineering - 1.2.2-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Tue Jun 21 2022 Sergio Lopez - 1.2.2-1 - Initial package