Accepting request 914071 from Virtualization:containers

OBS-URL: https://build.opensuse.org/request/show/914071
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/crun?expand=0&rev=4
This commit is contained in:
Dominique Leuenberger 2021-08-25 18:58:01 +00:00 committed by Git OBS Bridge
commit 264efea537
2 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Aug 23 15:22:18 UTC 2021 - Dario Faggioli <dfaggioli@suse.com>
- 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 <fcrozat@suse.com>

View File

@ -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