diff --git a/.gitignore b/.gitignore index c894000..645e8b1 100644 --- a/.gitignore +++ b/.gitignore @@ -61,3 +61,10 @@ crun-0.1.1.tar.gz /crun-1.4.5.tar.xz /crun-1.5.tar.xz /crun-1.6.tar.xz +/crun-1.7.tar.xz +/crun-1.7.1.tar.xz +/crun-1.7.2.tar.xz +/crun-1.8.tar.xz +/crun-1.8.1.tar.xz +/crun-1.8.2.tar.xz +/crun-1.8.3.tar.xz diff --git a/crun.spec b/crun.spec index d57b4a2..245a785 100644 --- a/crun.spec +++ b/crun.spec @@ -7,43 +7,40 @@ %endif %endif -%global built_tag_strip 1.6 +# wasmedge built only for aarch64 and x86_64 +%ifarch aarch64 || x86_64 +%global wasm_support enabled +%global wasm_opts --with-wasmedge +%endif + +%global built_tag 1.8.3 +%global gen_version %(b=%{built_tag}; echo ${b/-/"~"}) Summary: OCI runtime written in C Name: crun -Version: 1.6 +Version: %{gen_version} URL: https://github.com/containers/%{name} +# Fetched from upstream Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz -%if "%{_vendor}" == "debbuild" -Packager: Podman Debbuild Maintainers -License: GPL-2.0+ -Release: 0%{?dist} -%else License: GPLv2+ Release: %autorelease -%endif +ExclusiveArch: %{golang_arches} BuildRequires: autoconf BuildRequires: automake BuildRequires: go-md2man BuildRequires: libtool -%if "%{_vendor}" == "debbuild" -BuildRequires: git -BuildRequires: libcap-dev -BuildRequires: libseccomp-dev -BuildRequires: libsystemd-dev -BuildRequires: libyajl-dev -BuildRequires: pkg-config -Requires: criu -%else BuildRequires: gcc BuildRequires: git-core BuildRequires: python3 BuildRequires: libcap-devel BuildRequires: systemd-devel BuildRequires: yajl-devel +BuildRequires: libgcrypt-devel %if "%{krun_support}" == "enabled" BuildRequires: libkrun-devel -Provides: krun +%endif +%if "%{wasm_support}" == "enabled" +BuildRequires: wasmedge-devel %endif BuildRequires: libseccomp-devel BuildRequires: libselinux-devel @@ -54,38 +51,64 @@ BuildRequires: protobuf-c-devel %ifnarch %ix86 BuildRequires: criu-devel >= 3.17.1-2 %endif -Requires: criu >= 3.17.1 -%endif +Recommends: criu >= 3.17.1 +Recommends: criu-libs Provides: oci-runtime %description %{name} is a runtime for running OCI containers %prep -%autosetup -Sgit %{name}-%{built_tag_strip} +%autosetup -Sgit %{name}-%{built_tag} %build ./autogen.sh -%configure --disable-silent-rules %{krun_opts} +%configure --disable-silent-rules %{krun_opts} %{wasm_opts} %make_build %install %make_install rm -rf %{buildroot}%{_prefix}/lib* - %if "%{krun_support}" == "enabled" -ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/krun +ln -s ../bin/%{name} %{buildroot}%{_bindir}/krun +%endif + +%if "%{wasm_support}" == "enabled" +ln -s ../bin/%{name} %{buildroot}%{_bindir}/%{name}-wasm %endif %files %license COPYING %{_bindir}/%{name} -%if "%{krun_support}" == "enabled" -%{_bindir}/krun -%endif %{_mandir}/man1/* -%changelog -%if "%{_vendor}" != "debbuild" -%autochangelog +%if "%{krun_support}" == "enabled" +%package krun +Summary: OCI Runtime providing Virtualization-based process isolation capabilities. +Provides: krun +Requires: %{name} = %{version}-%{release} +Requires: libkrun + +%description krun +%{name}-krun OCI Runtime providing Virtualization-based process isolation capabilities. + +%files krun +%{_bindir}/krun %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 + +%files wasm +%{_bindir}/%{name}-wasm +%endif + +%changelog +%autochangelog diff --git a/sources b/sources index 223c0de..982e22f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (crun-1.6.tar.xz) = cb0464792df6167719fd21c3e1117dc0d89cf91c60d02b478774d14b73bdf49b0d138578b48803ff5af28f50740f5022b043fdf3198833d4a9b69e40974ced00 +SHA512 (crun-1.8.3.tar.xz) = ac3a99c6d17724d356eb22af81c2b94f91d98d69763c34773260e549b159b1da5298a4387efa89615c510a24d65dc002ca3dce6dfb93ca5aa7513f328dbdb6ed