import crun-1.8.4-2.module+el8.8.0+18669+fa5aca5a
This commit is contained in:
parent
33adbb4948
commit
93e2b476e9
@ -1 +1 @@
|
|||||||
a9f902399afe702530e35f0e395647b835649b82 SOURCES/crun-1.8.1.tar.gz
|
d9febe45e7a2456ccbbc9acf6b5b7fb9de3fa92a SOURCES/crun-1.8.4.tar.gz
|
||||||
|
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/crun-1.8.1.tar.gz
|
SOURCES/crun-1.8.4.tar.gz
|
||||||
|
@ -0,0 +1,94 @@
|
|||||||
|
From df8ee48f722d8252bf2556b69e1a42c52dcd86d0 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Giuseppe Scrivano <gscrivan@redhat.com>
|
||||||
|
Date: Sat, 15 Apr 2023 18:13:57 +0200
|
||||||
|
Subject: [PATCH] criu: check if the criu_join_ns_add function exists
|
||||||
|
|
||||||
|
check that the current libcriu library has the criu_join_ns_add
|
||||||
|
function before attempting to use it.
|
||||||
|
|
||||||
|
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2184221
|
||||||
|
|
||||||
|
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
|
||||||
|
---
|
||||||
|
src/libcrun/criu.c | 29 ++++++++++++++++-------------
|
||||||
|
1 file changed, 16 insertions(+), 13 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libcrun/criu.c b/src/libcrun/criu.c
|
||||||
|
index 66b50234..a0f01471 100644
|
||||||
|
--- a/src/libcrun/criu.c
|
||||||
|
+++ b/src/libcrun/criu.c
|
||||||
|
@@ -63,7 +63,9 @@ struct libcriu_wrapper_s
|
||||||
|
int (*criu_dump) (void);
|
||||||
|
int (*criu_get_orphan_pts_master_fd) (void);
|
||||||
|
int (*criu_init_opts) (void);
|
||||||
|
+# ifdef CRIU_JOIN_NS_SUPPORT
|
||||||
|
int (*criu_join_ns_add) (const char *ns, const char *ns_file, const char *extra_opt);
|
||||||
|
+# endif
|
||||||
|
# ifdef CRIU_PRE_DUMP_SUPPORT
|
||||||
|
int (*criu_feature_check) (struct criu_feature_check *features, size_t size);
|
||||||
|
int (*criu_pre_dump) (void);
|
||||||
|
@@ -135,7 +137,17 @@ load_wrapper (struct libcriu_wrapper_s **wrapper_out, libcrun_error_t *err)
|
||||||
|
LOAD_CRIU_FUNCTION (criu_dump);
|
||||||
|
LOAD_CRIU_FUNCTION (criu_get_orphan_pts_master_fd);
|
||||||
|
LOAD_CRIU_FUNCTION (criu_init_opts);
|
||||||
|
- LOAD_CRIU_FUNCTION (criu_join_ns_add);
|
||||||
|
+
|
||||||
|
+# ifdef CRIU_JOIN_NS_SUPPORT
|
||||||
|
+ /* criu_join_ns_add() API was introduced with CRIU version 3.16.1
|
||||||
|
+ * Here we check if this API is available at build time to support
|
||||||
|
+ * compiling with older version of CRIU, and at runtime to support
|
||||||
|
+ * running crun with older versions of libcriu.so.2.
|
||||||
|
+ */
|
||||||
|
+ if (wrapper->criu_check_version (31601) == 1)
|
||||||
|
+ LOAD_CRIU_FUNCTION (criu_join_ns_add);
|
||||||
|
+# endif
|
||||||
|
+
|
||||||
|
# ifdef CRIU_PRE_DUMP_SUPPORT
|
||||||
|
LOAD_CRIU_FUNCTION (criu_feature_check);
|
||||||
|
LOAD_CRIU_FUNCTION (criu_pre_dump);
|
||||||
|
@@ -873,15 +885,6 @@ libcrun_container_restore_linux_criu (libcrun_container_status_t *status, libcru
|
||||||
|
goto out_umount;
|
||||||
|
}
|
||||||
|
|
||||||
|
-# ifdef CRIU_JOIN_NS_SUPPORT
|
||||||
|
- /* criu_join_ns_add() API was introduced with CRIU version 3.16.1
|
||||||
|
- * Here we check if this API is available at build time to support
|
||||||
|
- * compiling with older version of CRIU, and at runtime to support
|
||||||
|
- * running crun with older versions of libcriu.so.2.
|
||||||
|
- */
|
||||||
|
- bool join_ns_support = libcriu_wrapper->criu_check_version (31601) == 1;
|
||||||
|
-# endif
|
||||||
|
-
|
||||||
|
/* If a namespace defined in config.json we are telling
|
||||||
|
* CRIU use that namespace when restoring the process tree.
|
||||||
|
*
|
||||||
|
@@ -915,7 +918,7 @@ libcrun_container_restore_linux_criu (libcrun_container_status_t *status, libcru
|
||||||
|
# ifdef CRIU_JOIN_NS_SUPPORT
|
||||||
|
if (value == CLONE_NEWTIME && def->linux->namespaces[i]->path != NULL)
|
||||||
|
{
|
||||||
|
- if (join_ns_support)
|
||||||
|
+ if (libcriu_wrapper->criu_join_ns_add != NULL)
|
||||||
|
libcriu_wrapper->criu_join_ns_add ("time", def->linux->namespaces[i]->path, NULL);
|
||||||
|
else
|
||||||
|
return crun_make_error (err, 0, "shared time namespace restore is supported in CRIU >= 3.16.1");
|
||||||
|
@@ -923,7 +926,7 @@ libcrun_container_restore_linux_criu (libcrun_container_status_t *status, libcru
|
||||||
|
|
||||||
|
if (value == CLONE_NEWIPC && def->linux->namespaces[i]->path != NULL)
|
||||||
|
{
|
||||||
|
- if (join_ns_support)
|
||||||
|
+ if (libcriu_wrapper->criu_join_ns_add != NULL)
|
||||||
|
libcriu_wrapper->criu_join_ns_add ("ipc", def->linux->namespaces[i]->path, NULL);
|
||||||
|
else
|
||||||
|
return crun_make_error (err, 0, "shared ipc namespace restore is supported in CRIU >= 3.16.1");
|
||||||
|
@@ -931,7 +934,7 @@ libcrun_container_restore_linux_criu (libcrun_container_status_t *status, libcru
|
||||||
|
|
||||||
|
if (value == CLONE_NEWUTS && def->linux->namespaces[i]->path != NULL)
|
||||||
|
{
|
||||||
|
- if (join_ns_support)
|
||||||
|
+ if (libcriu_wrapper->criu_join_ns_add != NULL)
|
||||||
|
libcriu_wrapper->criu_join_ns_add ("uts", def->linux->namespaces[i]->path, NULL);
|
||||||
|
else
|
||||||
|
return crun_make_error (err, 0, "shared uts namespace restore is supported in CRIU >= 3.16.1");
|
||||||
|
--
|
||||||
|
2.40.0
|
||||||
|
|
@ -1,8 +1,9 @@
|
|||||||
Summary: OCI runtime written in C
|
Summary: OCI runtime written in C
|
||||||
Name: crun
|
Name: crun
|
||||||
Version: 1.8.1
|
Version: 1.8.4
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}
|
||||||
Source0: https://github.com/containers/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
Source0: https://github.com/containers/%{name}/releases/download/%{version}/%{name}-%{version}.tar.gz
|
||||||
|
Patch0: 0001-criu-check-if-the-criu_join_ns_add-function-exists.patch
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
URL: https://github.com/containers/crun
|
URL: https://github.com/containers/crun
|
||||||
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
|
# https://fedoraproject.org/wiki/PackagingDrafts/Go#Go_Language_Architectures
|
||||||
@ -50,6 +51,18 @@ rm -rf %{buildroot}%{_prefix}/lib*
|
|||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Apr 17 2023 Jindrich Novy <jnovy@redhat.com> - 1.8.4-2
|
||||||
|
- Apply additional criu fix
|
||||||
|
- Resolves: #2184221
|
||||||
|
|
||||||
|
* Fri Apr 14 2023 Jindrich Novy <jnovy@redhat.com> - 1.8.4-1
|
||||||
|
- update to https://github.com/containers/crun/releases/tag/1.8.4
|
||||||
|
- Resolves: #2184221
|
||||||
|
|
||||||
|
* Tue Apr 04 2023 Jindrich Novy <jnovy@redhat.com> - 1.8.1-3
|
||||||
|
- fix could not find symbol criu_set_lsm_mount_context in libcriu.so
|
||||||
|
- Resolves: #2184221
|
||||||
|
|
||||||
* Mon Mar 20 2023 Jindrich Novy <jnovy@redhat.com> - 1.8.1-2
|
* Mon Mar 20 2023 Jindrich Novy <jnovy@redhat.com> - 1.8.1-2
|
||||||
- add BR: criu-devel
|
- add BR: criu-devel
|
||||||
- Resolves: #2179195
|
- Resolves: #2179195
|
||||||
|
Loading…
Reference in New Issue
Block a user