crun-1.16-1.el10

- update to https://github.com/containers/crun/releases/tag/1.16
- Related: RHEL-34195

Signed-off-by: Jindrich Novy <jnovy@redhat.com>
This commit is contained in:
Jindrich Novy 2024-08-12 09:06:55 +02:00
parent baaa6c3687
commit 9597aab346
4 changed files with 7 additions and 109 deletions

View File

@ -1,28 +0,0 @@
diff -up crun-1.15/libocispec/configure.ac.orig crun-1.15/libocispec/configure.ac
--- crun-1.15/libocispec/configure.ac.orig 2022-11-07 11:11:00.000000000 +0100
+++ crun-1.15/libocispec/configure.ac 2024-05-09 10:41:12.308679633 +0200
@@ -25,7 +25,10 @@ case "${enableval}" in
esac],[embedded_yajl=false])
AM_CONDITIONAL([HAVE_EMBEDDED_YAJL], [test x"$embedded_yajl" = xtrue])
-AM_COND_IF([HAVE_EMBEDDED_YAJL], [], [PKG_CHECK_MODULES([YAJL], [yajl >= 2.1.0])])
+AM_COND_IF([HAVE_EMBEDDED_YAJL], [], [
+AC_SEARCH_LIBS(yajl_tree_get, [yajl], [AC_DEFINE([HAVE_YAJL], 1, [Define if libyajl is available])], [AC_MSG_ERROR([*** libyajl headers not found])])
+PKG_CHECK_MODULES([YAJL], [yajl >= 2.0.0])
+])
# Optionally install the library.
AC_ARG_ENABLE(libocispec-install,
diff -up crun-1.15/libocispec/Makefile.am.orig crun-1.15/libocispec/Makefile.am
--- crun-1.15/libocispec/Makefile.am.orig 2023-04-13 21:08:30.000000000 +0200
+++ crun-1.15/libocispec/Makefile.am 2024-05-09 10:41:12.308679633 +0200
@@ -256,7 +256,8 @@ EXTRA_DIST = autogen.sh \
runtime-spec \
image-spec \
src/ocispec/json_common.h \
- src/ocispec/json_common.c
+ src/ocispec/json_common.c \
+ yajl/src
sync:
(cd image-spec; git pull https://github.com/opencontainers/image-spec)

View File

@ -1,58 +0,0 @@
From 8c80ab9b1562dfaa0bebcc8fa1414ec2637704de Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivan@redhat.com>
Date: Tue, 7 May 2024 17:37:58 +0200
Subject: [PATCH 1/4] utils: initialize fd
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
---
src/libcrun/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libcrun/utils.c b/src/libcrun/utils.c
index 884f71e61..2b27b078c 100644
--- a/src/libcrun/utils.c
+++ b/src/libcrun/utils.c
@@ -1037,7 +1037,7 @@ read_all_fd_with_size_hint (int fd, const char *description, char **out, size_t
int
read_all_file_at (int dirfd, const char *path, char **out, size_t *len, libcrun_error_t *err)
{
- cleanup_close int fd;
+ cleanup_close int fd = -1;
fd = TEMP_FAILURE_RETRY (openat (dirfd, path, O_RDONLY | O_CLOEXEC));
if (UNLIKELY (fd < 0))
From dd9428b2106bd192659f3d0a3d2c8a7087a5d8f2 Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivan@redhat.com>
Date: Tue, 7 May 2024 17:40:26 +0200
Subject: [PATCH 2/4] blake3: initialize chunks_array
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
---
src/libcrun/blake3/blake3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libcrun/blake3/blake3.c b/src/libcrun/blake3/blake3.c
index 692f4b021..74fb485ec 100644
--- a/src/libcrun/blake3/blake3.c
+++ b/src/libcrun/blake3/blake3.c
@@ -174,7 +174,7 @@ INLINE size_t compress_chunks_parallel(const uint8_t *input, size_t input_len,
assert(input_len <= MAX_SIMD_DEGREE * BLAKE3_CHUNK_LEN);
#endif
- const uint8_t *chunks_array[MAX_SIMD_DEGREE];
+ const uint8_t *chunks_array[MAX_SIMD_DEGREE] = {0, };
size_t input_position = 0;
size_t chunks_array_len = 0;
while (input_len - input_position >= BLAKE3_CHUNK_LEN) {
From f00fa22789b722ebe3aa663e69bed6f359f05feb Mon Sep 17 00:00:00 2001
From: Giuseppe Scrivano <gscrivan@redhat.com>
Date: Tue, 7 May 2024 15:18:40 +0200
Subject: [PATCH 3/4] libocispec: sync from upstream
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
---
libocispec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

View File

@ -1,16 +1,17 @@
%global krun_opts %{nil}
%global wasmedge_opts %{nil}
%global wasmtime_opts %{nil}
# krun and wasm[edge,time] support only on aarch64 and x86_64
%ifarch aarch64 || x86_64
%global wasm_support 1
%if %{defined copr_project}
%if %{defined copr_username}
%define copr_build 1
%endif
%if %{defined fedora} || %{defined copr_build}
# Disable wasmedge on rhel 10 until EPEL10 is in place, otherwise it causes
# build issues on copr
%if %{defined fedora} || (%{defined %copr_build} && %{defined rhel} && 0%{?rhel} < 10)
%global wasmedge_support 1
%global wasmedge_opts --with-wasmedge
%endif
@ -21,12 +22,6 @@
%global krun_opts --with-libkrun
%endif
# 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
%endif
%endif
Summary: OCI runtime written in C
@ -40,12 +35,10 @@ Epoch: 102
# 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.
Version: 1.15
Version: 1.16
Release: %autorelease
URL: https://github.com/containers/%{name}
Source0: %{url}/releases/download/%{version}/%{name}-%{version}.tar.zst
Patch0: https://patch-diff.githubusercontent.com/raw/containers/crun/pull/1465.patch
Patch1: https://patch-diff.githubusercontent.com/raw/containers/libocispec/pull/134.patch
License: GPL-2.0-only
%if %{defined golang_arches_future}
ExclusiveArch: %{golang_arches_future}
@ -72,9 +65,6 @@ Recommends: criu-libs
%if %{defined wasmedge_support}
BuildRequires: wasmedge-devel
%endif
%if %{defined wasmtime_support}
BuildRequires: wasmtime-c-api-devel
%endif
BuildRequires: python
Provides: oci-runtime
@ -111,22 +101,16 @@ Recommends: wasmedge
%prep
%autosetup -Sgit -n %{name}-%{version}
cd libocispec/src/
ln -s ../yajl/src/api/ yajl
%build
./autogen.sh
./configure --disable-silent-rules --enable-embedded-yajl %{krun_opts} %{wasmedge_opts} %{wasmtime_opts}
./configure --disable-silent-rules --enable-embedded-yajl %{krun_opts} %{wasmedge_opts}
%make_build
%install
%make_install prefix=%{_prefix}
rm -rf %{buildroot}%{_prefix}/lib*
%if %{defined krun_support}
ln -s %{name} %{buildroot}%{_bindir}/krun
%endif
%if %{defined wasm_support}
ln -s %{name} %{buildroot}%{_bindir}/%{name}-wasm
%endif

View File

@ -1 +1 @@
SHA512 (crun-1.15.tar.zst) = a6e141f372817ed8ad1776c3ee272f68fa69680ef4d51b56643c0e4985016a5a6a415cc8623aa211c511916f2c61a417864c24c8d35fde594b624c666a9cca32
SHA512 (crun-1.16.tar.zst) = 7773513d937e92723428c9fcb2716dfddbf36a3c158fba026ef128ab7775f3495b4eb60a3cf9fcf5eb80169ebebf49fba9591f1dcf3ab8497992d980d13fbc48