2022-08-11 19:59:09 +00:00
|
|
|
%global krun_opts %{nil}
|
2023-08-21 13:59:22 +00:00
|
|
|
%global wasmedge_opts %{nil}
|
2024-11-25 09:19:56 +00:00
|
|
|
%global yajl_opts %{nil}
|
2023-08-21 13:59:22 +00:00
|
|
|
|
2024-08-12 07:06:55 +00:00
|
|
|
%if %{defined copr_username}
|
2024-05-02 12:46:14 +00:00
|
|
|
%define copr_build 1
|
|
|
|
%endif
|
|
|
|
|
2024-11-25 09:19:56 +00:00
|
|
|
# krun and wasm support only on aarch64 and x86_64
|
|
|
|
%ifarch aarch64 || x86_64
|
|
|
|
|
2024-08-12 07:06:55 +00:00
|
|
|
# Disable wasmedge on rhel 10 until EPEL10 is in place, otherwise it causes
|
|
|
|
# build issues on copr
|
2024-11-25 09:19:56 +00:00
|
|
|
%if %{defined fedora} || (%{defined copr_build} && %{defined rhel} && 0%{?rhel} < 10)
|
|
|
|
%global wasm_support 1
|
2023-08-21 13:59:22 +00:00
|
|
|
%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
|
|
|
|
|
|
|
%endif
|
2021-04-28 12:54:17 +00:00
|
|
|
|
2024-11-25 09:19:56 +00:00
|
|
|
%if %{defined fedora} || (%{defined rhel} && 0%{?rhel} < 10)
|
|
|
|
%global system_yajl 1
|
|
|
|
%else
|
|
|
|
%global yajl_opts --enable-embedded-yajl
|
|
|
|
%endif
|
|
|
|
|
2019-06-21 17:11:11 +00:00
|
|
|
Summary: OCI runtime written in C
|
|
|
|
Name: crun
|
2024-05-02 12:46:14 +00:00
|
|
|
%if %{defined copr_build}
|
2023-08-21 13:59:22 +00:00
|
|
|
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.
|
2024-12-09 05:57:12 +00:00
|
|
|
Version: 1.19
|
2024-11-25 09:19:56 +00:00
|
|
|
Release: 1%{?dist}
|
2022-03-31 17:28:16 +00:00
|
|
|
URL: https://github.com/containers/%{name}
|
2024-05-02 12:46:14 +00:00
|
|
|
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.zst
|
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
|
2024-11-25 09:19:56 +00:00
|
|
|
%if %{defined system_yajl}
|
|
|
|
BuildRequires: yajl-devel
|
|
|
|
%endif
|
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
|
2024-11-25 09:19:56 +00:00
|
|
|
%ifnarch riscv64
|
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
|
2024-11-25 09:19:56 +00:00
|
|
|
%endif
|
2023-08-21 13:59:22 +00:00
|
|
|
%if %{defined wasmedge_support}
|
|
|
|
BuildRequires: wasmedge-devel
|
|
|
|
%endif
|
|
|
|
BuildRequires: python
|
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}
|
2024-11-25 09:19:56 +00:00
|
|
|
# wasm packages are not present on RHEL yet and are currently a PITA to test
|
|
|
|
# Best to only include wasmedge as weak dep on rhel
|
2024-05-02 12:46:14 +00:00
|
|
|
%if %{defined fedora}
|
2023-08-21 13:59:22 +00:00
|
|
|
Requires: wasm-library
|
2024-05-02 12:46:14 +00:00
|
|
|
%endif
|
2023-08-21 13:59:22 +00:00
|
|
|
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
|
2024-11-25 09:19:56 +00:00
|
|
|
./configure --disable-silent-rules %{krun_opts} %{wasmedge_opts} %{yajl_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
|
|
|
|
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
|
2024-12-09 05:57:12 +00:00
|
|
|
* Mon Dec 09 2024 Jindrich Novy <jnovy@redhat.com> - 1.19-1
|
|
|
|
- update to https://github.com/containers/crun/releases/tag/1.19
|
|
|
|
- Related: RHEL-58990
|
|
|
|
|
2024-11-25 09:19:56 +00:00
|
|
|
* Mon Nov 25 2024 Jindrich Novy <jnovy@redhat.com> - 1.18.2-1
|
|
|
|
- update to https://github.com/containers/crun/releases/tag/1.18.2
|
|
|
|
- Related: RHEL-58992
|