From 765bc9182735a0e718da2a18da18b32e8e773f9a0a492cdf1c662b377100c2df Mon Sep 17 00:00:00 2001 From: Dario Faggioli Date: Tue, 24 Aug 2021 17:32:43 +0000 Subject: [PATCH] Accepting request 914070 from home:dfaggioli:branches:Virtualization:containers - make libkrun support conditional, so we can have crun (without libkrun, of course) on all arches, which may help with bsc#1188914. OBS-URL: https://build.opensuse.org/request/show/914070 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/crun?expand=0&rev=9 --- crun.changes | 7 +++++++ crun.spec | 14 +++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/crun.changes b/crun.changes index c15b7bb..1465c81 100644 --- a/crun.changes +++ b/crun.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Aug 23 15:22:18 UTC 2021 - Dario Faggioli + +- make libkrun support conditional, so we can have crun (without + libkrun, of course) on all arches, which may help with + bsc#1188914. + ------------------------------------------------------------------- Fri Aug 6 13:37:49 UTC 2021 - Frederic Crozat diff --git a/crun.spec b/crun.spec index ca7fdd8..c55116a 100644 --- a/crun.spec +++ b/crun.spec @@ -24,7 +24,6 @@ Release: 0 Source0: https://github.com/containers/crun/releases/download/%{version}/%{name}-%{version}.tar.gz Source1: crun-rpmlintrc URL: https://github.com/containers/crun -ExclusiveArch: x86_64 aarch64 # We always run autogen.sh BuildRequires: autoconf BuildRequires: automake @@ -33,7 +32,6 @@ BuildRequires: git-core BuildRequires: glibc-devel-static BuildRequires: go-md2man BuildRequires: libcap-devel -BuildRequires: libkrun >= 0.1.4 BuildRequires: libseccomp-devel BuildRequires: libselinux-devel BuildRequires: libtool @@ -44,7 +42,10 @@ BuildRequires: systemd-devel %ifnarch %ix86 BuildRequires: criu-devel >= 3.15 %endif +%ifarch x86_64 aarch64 +BuildRequires: libkrun >= 0.1.4 Requires: libkrun >= 0.1.7 +%endif %description crun is a runtime for running OCI containers. It is built with libkrun support @@ -53,15 +54,20 @@ crun is a runtime for running OCI containers. It is built with libkrun support %autosetup -p1 %build +%ifarch x86_64 aarch64 +export LIBKRUN="--with-libkrun" +%endif ./autogen.sh -%configure --disable-silent-rules --with-libkrun CFLAGS='-I /usr/include/libseccomp' +%configure --disable-silent-rules $LIBKRUN CFLAGS='-I /usr/include/libseccomp' %make_build %install %make_install rm -rf %{buildroot}/%{_libdir}/lib* +%ifarch x86_64 aarch64 # allow easy krun usage with podman ln -s %{_bindir}/crun %{buildroot}%{_bindir}/krun +%endif %files %defattr(-,root,root) @@ -69,7 +75,9 @@ ln -s %{_bindir}/crun %{buildroot}%{_bindir}/krun %doc README.md %doc SECURITY.md %{_bindir}/%{name} +%ifarch x86_64 aarch64 %{_bindir}/krun +%endif %{_mandir}/man1/* %changelog