Skip to content

Commit

Permalink
switch crun.spec.in to crun.spec
Browse files Browse the repository at this point in the history
Signed-off-by: Lokesh Mandvekar <lsm5@fedoraproject.org>
  • Loading branch information
lsm5 committed Jun 30, 2023
1 parent f91e2a1 commit 9e1143e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 25 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ AM_CONDITIONAL([LUA_BINDINGS], [test "x$with_lua_bindings" = "xyes"])
AM_CONDITIONAL([CRIU_SUPPORT], [test "x$have_criu" = "xyes"])
AM_CONDITIONAL([SHARED_LIBCRUN], [test "x$enable_shared" = "xyes"])

AC_CONFIG_FILES([Makefile rpm/crun.spec])
#AC_CONFIG_FILES([Makefile rpm/crun.spec])

AC_CONFIG_SUBDIRS([libocispec])
AC_OUTPUT
54 changes: 30 additions & 24 deletions rpm/crun.spec.in → rpm/crun.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,36 @@
%global wasmtime_opts %{nil}
%global wasm_support disabled

%if 0%{?fedora} >= 37
%ifarch aarch64 || x86_64
%global krun_support enabled
%global krun_opts --with-libkrun
%endif
%endif

# krun and wasm[edge,time] support only on aarch64 and x86_64
%ifarch aarch64 || x86_64
%global wasm_support enabled
%global wasmedge_support enabled
%global wasmedge_opts --with-wasmedge
# krun only exists on fedora
%if %{defined fedora}
%global krun_support enabled
%global krun_opts --with-libkrun
%endif

# FIXME: wasmtime builds for rhel are currently broken on copr probably
# because of an older rust compiler.
%if 0%{?fedora}
%ifnarch %{ix86} || ppc64le
%global wasm_support enabled
# wasmtime exists only on podman-next copr for now
%if %{defined copr_project} && %{?copr_project} == "podman-next"
%global wasmtime_support enabled
%global wasmtime_opts --with-wasmtime
%endif
%endif

Summary: OCI runtime written in C
Name: crun
Epoch: 101
#FIXME: copr build env replaces this with a strange version number
#Version: @RPM_VERSION@
Version: 0.0
%define build_timestamp %{lua: print(os.date("%Y%m%d%H%M%S"))}
Release: %{build_timestamp}.@GIT_COMMIT_ID@%{?dist}
# `make tarball-prep` will generate this from HEAD commit in the repo root dir
Source0: %{name}-HEAD.tar.gz
License: GPLv2+
Epoch: 102
Version: @RPM_VERSION@
Release: %autorelease
Source0: Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.xz
License: GPL-2.0-only
URL: https://github.com/containers/%{name}
%if %{defined golang_arches_future}
ExclusiveArch: %{golang_arches_future}
%else
ExclusiveArch: aarch64 ppc64le s390x x86_64
%endif
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: gcc
Expand All @@ -51,14 +46,14 @@ BuildRequires: yajl-devel
BuildRequires: libseccomp-devel
BuildRequires: python3-libmount
BuildRequires: libtool
BuildRequires: go-md2man
BuildRequires: %{_bindir}/go-md2man
%if "%{wasmedge_support}" == "enabled"
BuildRequires: wasmedge-devel
%endif
%if "%{wasmtime_support}" == "enabled"
BuildRequires: wasmtime-c-api-devel
%endif
%if 0%{?rhel} == 8
%if %{defined rhel} && 0%{?rhel} == 8
BuildRequires: python3
%else
BuildRequires: python
Expand Down Expand Up @@ -132,3 +127,14 @@ ln -s %{_bindir}/%{name} %{buildroot}%{_bindir}/%{name}-wasm
%license COPYING
%{_bindir}/%{name}-wasm
%endif

%changelog
%if %{defined autochangelog}
%autochangelog
%else
# NOTE: This changelog will be visible on CentOS 8 Stream builds
# Other envs are capable of handling autochangelog
* Tue Jun 13 2023 RH Container Bot <rhcontainerbot@fedoraproject.org>
- Placeholder changelog for envs that are not autochangelog-ready.
- Contact upstream if you need to report an issue with the build.
%endif

0 comments on commit 9e1143e

Please sign in to comment.