Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libkrunfw for openSUSE:Factory checked in at 2022-12-05 18:00:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libkrunfw (Old) and /work/SRC/openSUSE:Factory/.libkrunfw.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libkrunfw" Mon Dec 5 18:00:38 2022 rev:8 rq:1040156 version:3.6.3 Changes: -------- --- /work/SRC/openSUSE:Factory/libkrunfw/libkrunfw.changes 2022-09-29 18:14:48.363425257 +0200 +++ /work/SRC/openSUSE:Factory/.libkrunfw.new.1835/libkrunfw.changes 2022-12-05 18:00:40.252408321 +0100 @@ -1,0 +2,16 @@ +Mon Dec 5 07:30:55 UTC 2022 - Dirk Müller <[email protected]> + +- add split-provides for libkrunfw-sev-devel + +------------------------------------------------------------------- +Thu Sep 29 23:20:21 UTC 2022 - Dario Faggioli <[email protected]> + +- Switch to a "proper library" packaging layout. Downstreams (like + libkrun itself and crun) are now able to cope with this. So do it, + and get rid of a lot of RPM lint warnings and errors! +- Make it easier to enable/disable building the SEV-enabled libraries +- Add some tools into the SEV build & packages +* Patches dropped: + dont-set-soname-as-it-is-plugin-for-us.patch + +------------------------------------------------------------------- Old: ---- dont-set-soname-as-it-is-plugin-for-us.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libkrunfw.spec ++++++ --- /var/tmp/diff_new_pack.AyhPiU/_old 2022-12-05 18:00:41.320414137 +0100 +++ /var/tmp/diff_new_pack.AyhPiU/_new 2022-12-05 18:00:41.324414158 +0100 @@ -16,6 +16,22 @@ # +%define sev 1 + +%global kernel linux-5.15.60 + +%ifnarch x86_64 +%define sev 0 +%endif + +%define descr \ +libkrunfw is a library bundling a Linux kernel in a dynamic library \ +in a way that can be easily consumed by libkrun. \ +By having the kernel bundled in a dynamic library, libkrun can leave to \ +the linker the work of mapping the sections into the process, and then \ +directly inject those mappings into the guest without any kind of additional \ +work nor processing. + Name: libkrunfw Version: 3.6.3 Release: 0 @@ -23,29 +39,66 @@ License: GPL-2.0-only AND LGPL-2.1-only URL: https://github.com/containers/libkrunfw Source0: https://github.com/containers/libkrunfw/archive/v%{version}.tar.gz#/libkrunfw-%{version}.tar.gz -Source1: https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.60.tar.xz -# libkrunfw is a plugin for us, more than a full-fledged library, -# so let's avoid setting up a SONAME etc (which upstream is now doing). -Patch1: dont-set-soname-as-it-is-plugin-for-us.patch +Source1: https://www.kernel.org/pub/linux/kernel/v5.x/%{kernel}.tar.xz ExclusiveArch: x86_64 aarch64 +# For building libkrunfw itself, we need: +BuildRequires: gcc +BuildRequires: git-core +BuildRequires: openssl-devel +BuildRequires: python3-pyelftools +# For building the embedded kernel, we need: BuildRequires: bc BuildRequires: binutils BuildRequires: bison BuildRequires: flex -BuildRequires: gcc -BuildRequires: git-core -BuildRequires: hmaccalc -BuildRequires: hostname BuildRequires: libelf-devel -BuildRequires: net-tools -BuildRequires: python3-pyelftools +# Handling transitions from (very) old versions of the package Conflicts: libkrunfw-devel <= 0.7 Conflicts: libkrunfw0 <= 0.7 %description -libkrunfw is a library bundling a Linux kernel in a dynamic library in a way that can be easily consumed by libkrun. +%{summary} + +%package -n %{name}3 +Summary: A dynamic library bundling a Linux kernel in a convenient storage format +Obsoletes: libkrunfw <= 3.6.3 + +%description -n %{name}3 +%{descr} + +%package devel +Summary: Header files and libraries for libkrunfw development +Requires: %{name}3 = %{version}-%{release} + +%description devel +%{descr} + +This package contains the libraries needed to develop programs +that consume the guest payload integrated in libkrunfw. + +%if %{sev} +%package sev3 +Summary: A dynamic library bundling the guest payload consumed by libkrun-sev +Obsoletes: libkrunfw <= 3.6.3 -By having the kernel bundled in a dynamic library, libkrun can leave to the linker the work of mapping the sections into the process, and then directly inject those mappings into the guest without any kind of additional work nor processing. +%description sev3 +%{descr} + +This package contains the library bundling the guest payload consumed +by libkrun-sev. + +%package sev-devel +Summary: Header files and libraries for libkrunfw-sev development +Requires: %{name}-sev3 = %{version}-%{release} +Provides: %{name}:%{_libdir}/libkrunfw-sev.so +Obsoletes: %{name} < %{version}-%{release} + +%description sev-devel +%{descr} + +This package contains the libraries needed to develop programs that +consume the guest payload integrated in libkrunfw-sev. +%endif %prep %autosetup -S git @@ -60,22 +113,57 @@ export KBUILD_BUILD_HOST=buildhost EOF source ./.kernel-binary.spec.buildenv + %make_build -%ifarch x86_64 + +%if %{sev} +rm -rf %{kernel} +rm kernel.c %make_build SEV=1 +pushd utils +%if 0%{?suse_version} > 1500 +make +%else +# Workaround an issue of "undefined reference to symbol 'dlsym@@GLIBC_2.2.5'" +# in older distros. +gcc -o krunfw_measurement krunfw_measurement.c -lcrypto -ldl +%endif +popd %endif %install source ./.kernel-binary.spec.buildenv %make_install PREFIX=%{_prefix} -%ifarch x86_64 + +%if %{sev} %make_install SEV=1 PREFIX=%{_prefix} +install -D -p -m 0755 utils/krunfw_measurement %{buildroot}%{_bindir}/krunfw_measurement %endif -%files +%post -n %{name}3 -p /sbin/ldconfig + +%postun -n %{name}3 -p /sbin/ldconfig + +%files -n %{name}3 +%{_libdir}/libkrunfw.so.3 +%{_libdir}/libkrunfw.so.%{version} + +%files devel %{_libdir}/libkrunfw.so -%ifarch x86_64 + +%if %{sev} +%files sev3 +%{_libdir}/libkrunfw-sev.so.3 +%{_libdir}/libkrunfw-sev.so.%{version} +%{_bindir}/krunfw_measurement + +%files sev-devel %{_libdir}/libkrunfw-sev.so + +%post sev3 -p /sbin/ldconfig + +%postun sev3 -p /sbin/ldconfig + %endif %changelog
