2022-08-11 19:59:09 +00:00
|
|
|
%global krun_opts %{nil}
|
|
|
|
|
2022-05-16 20:36:52 +00:00
|
|
|
%if 0%{?fedora} >= 37
|
2022-08-11 19:59:09 +00:00
|
|
|
%ifarch aarch64 || x86_64
|
2022-05-16 20:36:52 +00:00
|
|
|
%global krun_support enabled
|
2022-08-11 19:59:09 +00:00
|
|
|
%global krun_opts --with-libkrun
|
2022-05-16 20:36:52 +00:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2022-11-03 12:13:59 +00:00
|
|
|
# wasmedge built only for aarch64 and x86_64
|
|
|
|
%ifarch aarch64 || x86_64
|
|
|
|
%global wasm_support enabled
|
|
|
|
%global wasm_opts --with-wasmedge
|
|
|
|
%endif
|
|
|
|
|
2023-02-27 10:56:33 +00:00
|
|
|
%global built_tag 1.8.1
|
2022-10-04 19:02:13 +00:00
|
|
|
%global gen_version %(b=%{built_tag}; echo ${b/-/"~"})
|
2021-04-28 12:54:17 +00:00
|
|
|
|
2019-06-21 17:11:11 +00:00
|
|
|
Summary: OCI runtime written in C
|
|
|
|
Name: crun
|
2022-10-07 17:28:26 +00:00
|
|
|
Version: %{gen_version}
|
2022-03-31 17:28:16 +00:00
|
|
|
URL: https://github.com/containers/%{name}
|
2022-10-04 19:02:13 +00:00
|
|
|
# Fetched from upstream
|
2022-03-03 14:53:05 +00:00
|
|
|
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
2021-04-16 16:15:40 +00:00
|
|
|
License: GPLv2+
|
2022-05-16 20:36:52 +00:00
|
|
|
Release: %autorelease
|
2023-02-09 11:19:50 +00:00
|
|
|
ExclusiveArch: %{golang_arches_future}
|
2019-06-21 17:11:11 +00:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
2022-05-16 20:36:52 +00:00
|
|
|
BuildRequires: go-md2man
|
|
|
|
BuildRequires: libtool
|
2019-06-21 17:11:11 +00:00
|
|
|
BuildRequires: gcc
|
2022-05-16 20:36:52 +00:00
|
|
|
BuildRequires: git-core
|
2022-03-10 18:22:48 +00:00
|
|
|
BuildRequires: python3
|
2021-04-06 07:56:23 +00:00
|
|
|
BuildRequires: libcap-devel
|
2019-06-21 17:11:11 +00:00
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: yajl-devel
|
2023-01-03 14:03:51 +00:00
|
|
|
BuildRequires: libgcrypt-devel
|
2022-05-16 20:36:52 +00:00
|
|
|
%if "%{krun_support}" == "enabled"
|
|
|
|
BuildRequires: libkrun-devel
|
|
|
|
%endif
|
2022-11-03 12:13:59 +00:00
|
|
|
%if "%{wasm_support}" == "enabled"
|
|
|
|
BuildRequires: wasmedge-devel
|
|
|
|
%endif
|
2019-06-21 17:11:11 +00:00
|
|
|
BuildRequires: libseccomp-devel
|
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: python3-libmount
|
2020-12-17 04:03:08 +00:00
|
|
|
BuildRequires: make
|
2021-02-19 07:55:38 +00:00
|
|
|
BuildRequires: glibc-static
|
2021-09-28 12:54:24 +00:00
|
|
|
BuildRequires: protobuf-c-devel
|
2020-12-17 13:57:56 +00:00
|
|
|
%ifnarch %ix86
|
2022-05-16 20:36:52 +00:00
|
|
|
BuildRequires: criu-devel >= 3.17.1-2
|
2020-12-17 13:57:56 +00:00
|
|
|
%endif
|
2022-12-13 10:18:29 +00:00
|
|
|
Recommends: criu >= 3.17.1
|
|
|
|
Recommends: criu-libs
|
2021-04-13 19:19:27 +00:00
|
|
|
Provides: oci-runtime
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%description
|
2022-03-31 17:28:16 +00:00
|
|
|
%{name} is a runtime for running OCI containers
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%prep
|
2022-11-16 12:49:48 +00:00
|
|
|
%autosetup -Sgit %{name}-%{built_tag}
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%build
|
2019-06-21 17:11:11 +00:00
|
|
|
./autogen.sh
|
2022-11-03 12:13:59 +00:00
|
|
|
%configure --disable-silent-rules %{krun_opts} %{wasm_opts}
|
2019-06-21 17:11:11 +00:00
|
|
|
%make_build
|
2019-06-21 17:01:30 +00:00
|
|
|
|
2019-06-21 17:11:11 +00:00
|
|
|
%install
|
|
|
|
%make_install
|
2021-04-28 12:54:17 +00:00
|
|
|
rm -rf %{buildroot}%{_prefix}/lib*
|
2022-05-16 20:36:52 +00:00
|
|
|
%if "%{krun_support}" == "enabled"
|
2022-09-28 18:33:22 +00:00
|
|
|
ln -s ../bin/%{name} %{buildroot}%{_bindir}/krun
|
2022-05-16 20:36:52 +00:00
|
|
|
%endif
|
|
|
|
|
2022-11-03 12:13:59 +00:00
|
|
|
%if "%{wasm_support}" == "enabled"
|
|
|
|
ln -s ../bin/%{name} %{buildroot}%{_bindir}/%{name}-wasm
|
|
|
|
%endif
|
|
|
|
|
2019-06-21 17:01:30 +00:00
|
|
|
%files
|
2019-06-21 17:11:11 +00:00
|
|
|
%license COPYING
|
|
|
|
%{_bindir}/%{name}
|
2022-09-28 18:33:22 +00:00
|
|
|
%{_mandir}/man1/*
|
|
|
|
|
2022-05-16 20:36:52 +00:00
|
|
|
%if "%{krun_support}" == "enabled"
|
2022-09-28 18:33:22 +00:00
|
|
|
%package krun
|
|
|
|
Summary: OCI Runtime providing Virtualization-based process isolation capabilities.
|
|
|
|
Provides: krun
|
2022-11-03 12:13:59 +00:00
|
|
|
Requires: %{name} = %{version}-%{release}
|
2022-09-28 18:33:22 +00:00
|
|
|
Requires: libkrun
|
|
|
|
|
|
|
|
%description krun
|
|
|
|
%{name}-krun OCI Runtime providing Virtualization-based process isolation capabilities.
|
|
|
|
|
|
|
|
%files krun
|
2022-05-16 20:36:52 +00:00
|
|
|
%{_bindir}/krun
|
2022-11-03 12:13:59 +00:00
|
|
|
%endif
|
|
|
|
|
|
|
|
%if "%{wasm_support}" == "enabled"
|
|
|
|
%package wasm
|
|
|
|
Summary: wasm support for %{name}
|
|
|
|
Requires: wasm-library
|
|
|
|
Recommends: wasmedge
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
|
|
|
%description wasm
|
|
|
|
%{name}-wasm provides %{name} built with wasm support
|
2022-09-28 18:33:22 +00:00
|
|
|
|
2022-11-03 12:13:59 +00:00
|
|
|
%files wasm
|
|
|
|
%{_bindir}/%{name}-wasm
|
2022-05-16 20:36:52 +00:00
|
|
|
%endif
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%changelog
|
2022-01-27 17:59:35 +00:00
|
|
|
%autochangelog
|