2022-08-11 19:59:09 +00:00
|
|
|
%global krun_opts %{nil}
|
2023-08-21 13:59:22 +00:00
|
|
|
%global wasmedge_opts %{nil}
|
|
|
|
%global wasmtime_opts %{nil}
|
2022-08-11 19:59:09 +00:00
|
|
|
|
2023-08-21 13:59:22 +00:00
|
|
|
# krun and wasm[edge,time] support only on aarch64 and x86_64
|
2022-08-11 19:59:09 +00:00
|
|
|
%ifarch aarch64 || x86_64
|
2023-08-21 13:59:22 +00:00
|
|
|
%global wasm_support 1
|
|
|
|
|
|
|
|
# wasmedge not present on Fedora ELN environments
|
|
|
|
%if !0%{?eln}
|
|
|
|
%global wasmedge_support 1
|
|
|
|
%global wasmedge_opts --with-wasmedge
|
2022-05-16 20:36:52 +00:00
|
|
|
%endif
|
|
|
|
|
2023-08-21 13:59:22 +00:00
|
|
|
# krun only exists on fedora
|
|
|
|
%if %{defined fedora}
|
|
|
|
%global krun_support 1
|
|
|
|
%global krun_opts --with-libkrun
|
2022-11-03 12:13:59 +00:00
|
|
|
%endif
|
2023-08-21 13:59:22 +00:00
|
|
|
|
|
|
|
# wasmtime exists only on podman-next copr for now
|
|
|
|
%if %{defined copr_project} && "%{?copr_project}" == "podman-next"
|
|
|
|
%global wasmtime_support 1
|
|
|
|
%global wasmtime_opts --with-wasmtime
|
2023-08-04 03:36:19 +00:00
|
|
|
%endif
|
2022-11-03 12:13:59 +00:00
|
|
|
|
2023-08-21 13:59:22 +00:00
|
|
|
%endif
|
2021-04-28 12:54:17 +00:00
|
|
|
|
2019-06-21 17:11:11 +00:00
|
|
|
Summary: OCI runtime written in C
|
|
|
|
Name: crun
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined copr_username}
|
|
|
|
Epoch: 102
|
|
|
|
%endif
|
|
|
|
# DO NOT TOUCH the Version string!
|
|
|
|
# The TRUE source of this specfile is:
|
|
|
|
# https://github.com/containers/crun/blob/main/rpm/crun.spec
|
|
|
|
# If that's what you're reading, Version must be 0, and will be updated by Packit for
|
|
|
|
# copr and koji builds.
|
|
|
|
# If you're reading this on dist-git, the version is automatically filled in by Packit.
|
2023-11-07 12:56:06 +00:00
|
|
|
Version: 1.11.2
|
2023-08-21 13:59:22 +00:00
|
|
|
Release: %autorelease
|
2022-03-31 17:28:16 +00:00
|
|
|
URL: https://github.com/containers/%{name}
|
2022-03-03 14:53:05 +00:00
|
|
|
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
|
2023-03-06 11:12:00 +00:00
|
|
|
License: GPL-2.0-only
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined golang_arches_future}
|
2023-02-09 11:19:50 +00:00
|
|
|
ExclusiveArch: %{golang_arches_future}
|
2023-08-21 13:59:22 +00:00
|
|
|
%else
|
|
|
|
ExclusiveArch: aarch64 ppc64le riscv64 s390x x86_64
|
|
|
|
%endif
|
2019-06-21 17:11:11 +00:00
|
|
|
BuildRequires: autoconf
|
|
|
|
BuildRequires: automake
|
|
|
|
BuildRequires: gcc
|
2022-05-16 20:36:52 +00:00
|
|
|
BuildRequires: git-core
|
2023-08-21 13:59:22 +00:00
|
|
|
BuildRequires: gperf
|
2021-04-06 07:56:23 +00:00
|
|
|
BuildRequires: libcap-devel
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined krun_support}
|
2022-05-16 20:36:52 +00:00
|
|
|
BuildRequires: libkrun-devel
|
|
|
|
%endif
|
2023-08-21 13:59:22 +00:00
|
|
|
BuildRequires: systemd-devel
|
|
|
|
BuildRequires: yajl-devel
|
2019-06-21 17:11:11 +00:00
|
|
|
BuildRequires: libseccomp-devel
|
|
|
|
BuildRequires: python3-libmount
|
2023-08-21 13:59:22 +00:00
|
|
|
BuildRequires: libtool
|
2021-09-28 12:54:24 +00:00
|
|
|
BuildRequires: protobuf-c-devel
|
2022-05-16 20:36:52 +00:00
|
|
|
BuildRequires: criu-devel >= 3.17.1-2
|
2022-12-13 10:18:29 +00:00
|
|
|
Recommends: criu >= 3.17.1
|
|
|
|
Recommends: criu-libs
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined wasmedge_support}
|
|
|
|
BuildRequires: wasmedge-devel
|
|
|
|
%endif
|
|
|
|
%if %{defined wasmtime_support}
|
|
|
|
BuildRequires: wasmtime-c-api-devel
|
|
|
|
%endif
|
|
|
|
%if %{defined rhel} && 0%{?rhel} == 8
|
|
|
|
BuildRequires: python3
|
|
|
|
%else
|
|
|
|
BuildRequires: python
|
|
|
|
%endif
|
2021-04-13 19:19:27 +00:00
|
|
|
Provides: oci-runtime
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%description
|
2023-08-21 13:59:22 +00:00
|
|
|
%{name} is a OCI runtime
|
|
|
|
|
|
|
|
%if %{defined krun_support}
|
|
|
|
%package krun
|
|
|
|
Summary: %{name} with libkrun support
|
|
|
|
Requires: libkrun
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Provides: krun = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
|
|
|
|
%description krun
|
|
|
|
krun is a symlink to the %{name} binary, with libkrun as an additional dependency.
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %{defined wasm_support}
|
|
|
|
%package wasm
|
|
|
|
Summary: %{name} with wasm support
|
|
|
|
Requires: %{name} = %{?epoch:%{epoch}:}%{version}-%{release}
|
|
|
|
Requires: wasm-library
|
|
|
|
Recommends: wasmedge
|
|
|
|
|
|
|
|
%description wasm
|
|
|
|
%{name}-wasm is a symlink to the %{name} binary, with wasm as an additional dependency.
|
|
|
|
%endif
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%prep
|
2023-08-21 13:59:22 +00:00
|
|
|
%autosetup -Sgit -n %{name}-%{version}
|
2019-06-21 17:01:30 +00:00
|
|
|
|
|
|
|
%build
|
2019-06-21 17:11:11 +00:00
|
|
|
./autogen.sh
|
2023-08-21 13:59:22 +00:00
|
|
|
./configure --disable-silent-rules %{krun_opts} %{wasmedge_opts} %{wasmtime_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
|
2023-08-21 13:59:22 +00:00
|
|
|
%make_install prefix=%{_prefix}
|
2021-04-28 12:54:17 +00:00
|
|
|
rm -rf %{buildroot}%{_prefix}/lib*
|
2023-08-21 13:59:22 +00:00
|
|
|
|
|
|
|
%if %{defined krun_support}
|
|
|
|
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun
|
2022-05-16 20:36:52 +00:00
|
|
|
%endif
|
|
|
|
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined wasm_support}
|
|
|
|
ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-wasm
|
2022-11-03 12:13:59 +00:00
|
|
|
%endif
|
|
|
|
|
2019-06-21 17:01:30 +00:00
|
|
|
%files
|
2019-06-21 17:11:11 +00:00
|
|
|
%license COPYING
|
|
|
|
%{_bindir}/%{name}
|
2023-09-27 21:05:06 +00:00
|
|
|
%{_mandir}/man1/%{name}.1.gz
|
2022-09-28 18:33:22 +00:00
|
|
|
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined krun_support}
|
2022-09-28 18:33:22 +00:00
|
|
|
%files krun
|
2023-08-21 13:59:22 +00:00
|
|
|
%license COPYING
|
2022-05-16 20:36:52 +00:00
|
|
|
%{_bindir}/krun
|
2023-09-26 17:33:15 +00:00
|
|
|
%{_mandir}/man1/krun.1.gz
|
2022-11-03 12:13:59 +00:00
|
|
|
%endif
|
|
|
|
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined wasm_support}
|
2022-11-03 12:13:59 +00:00
|
|
|
%files wasm
|
2023-08-21 13:59:22 +00:00
|
|
|
%license COPYING
|
2022-11-03 12:13:59 +00:00
|
|
|
%{_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
|