summaryrefslogtreecommitdiff
path: root/app-containers/crun
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2022-08-04 02:04:17 +0100
committerV3n3RiX <venerix@koprulu.sector>2022-08-04 02:04:17 +0100
commit00d9a8fc3e9e5bafeff6747e978c1685b384e587 (patch)
tree43c6db3767706ffe339a7040cb0a5dea8bd1ef26 /app-containers/crun
parent799073eb168d35819904276f6c912be4ac76166a (diff)
gentoo auto-resync : 04:08:2022 - 02:04:17
Diffstat (limited to 'app-containers/crun')
-rw-r--r--app-containers/crun/Manifest3
-rw-r--r--app-containers/crun/crun-1.4.5.ebuild13
-rw-r--r--app-containers/crun/files/crun-1.4.5-glibc-2.36.patch79
3 files changed, 93 insertions, 2 deletions
diff --git a/app-containers/crun/Manifest b/app-containers/crun/Manifest
index 3f579a39c4f6..8105feb942ac 100644
--- a/app-containers/crun/Manifest
+++ b/app-containers/crun/Manifest
@@ -1,5 +1,6 @@
+AUX crun-1.4.5-glibc-2.36.patch 2631 BLAKE2B 6f37b02f2c87d056af84c1dc146ba5b9915ae95492aea6d1d2f6e708b70bc37d2d48d666fb7d63ce2a07c594dc76cea3dd6892b7356cea56a3568d93d9f5a7d1 SHA512 1f54d6c1bfd3e4fcbd39e0c4651d43d21e7902309d3b844acdb6f908ea3b3d364b01f90b6ecb81bd98ce8f0f035061399fea781a8e76acf07ce32824b72960cc
DIST crun-1.4.4.tar.xz 877892 BLAKE2B 57e48c0a229db3f54212177cef3fdb3f59b4bb1d1cc865da956f026a35837d839489bd126f880d7a9ceb18f5cffbf0e32ac9ae59a4cd39c34e3aff5b32c0559a SHA512 1756dccf6509457a5dc114d43c4f4e99258a20c3437dfe06016d080989c5d3035f5735d62d18ab537b660ec36de04df369a2582745baf4ab680af367a19830fd
DIST crun-1.4.5.tar.xz 879044 BLAKE2B c80cae28c23140086682493a7dddb40640491e3ea827f0a7376d9be12570111d056022f50b8d7c574ca07790753d20de2314db5b89463994c4fffbc7576c372d SHA512 9f288279615fdf587018c465047fc8793daae280ab864bf9046994983239129d50f2eb89cac9b092e5cdc49a10f3523ab403a3f0e7451f7536b79f651a355153
EBUILD crun-1.4.4.ebuild 1624 BLAKE2B cad4388c81fbf098a279b2d02c1dd845cf9b0862c8b20010b6fc5ea6a8c1aa86cc1b33169259e2923c9f95f8b08c25a3d653cd1a60ed71a40b63ee847a6bfcb1 SHA512 595d09e8af3760fcdeb02f1b0db7bac58d3c6726cf9ddb0dd08629789271acfd08f4b54eaa3c2e05d68c09db65c3fd453b95f56e9f6c78ecb1ffab18e04d78ae
-EBUILD crun-1.4.5.ebuild 1627 BLAKE2B bf870b4685a7eba8959ad6de46e2d953d188beda27651f4ade170bf362c820cfdbd57f754df9313c7999bea9579074891e71386deeeb13a09db8c8524162b46c SHA512 bcdd158fa0ebec2660cba1f860ccf9cfc16375931d6beab3f15826a88ce77685ebe16e37e1d0c6d554b5fe20b82403079e93db60f79e1e9f7fd2f7b576971190
+EBUILD crun-1.4.5.ebuild 1807 BLAKE2B 29bef0b3fffff864a590cdb9799f316079ac9fa9a3568460a521cdededccd123644481f720e60628268580be85e88b781a9da976d00a428845fc3d8c5dd24a7d SHA512 580f6debd9606e6fe0abd408a12e7f9c89f380b04e5ca644503d7647385160fe322818e9ac3465ce2ae1ec59c0a5cda57342182d74eee66bffe30800f33edfb7
MISC metadata.xml 1300 BLAKE2B a0ae27420fca097e4e7b5e983de3b76fef43bf13887bd5fe903da14e20c2f0ebd2fc273dae74e32e28c2768b5f8d6e5e6c8b4c9f07ca6d47e41902621173a167 SHA512 1699a89a01de32b580bc74bc747430ef7b1a6284b2f459b4041b22de0efbebda45778803deb512a61806ed8e2998b141caefb7830acafc68d42ce4343b193dd6
diff --git a/app-containers/crun/crun-1.4.5.ebuild b/app-containers/crun/crun-1.4.5.ebuild
index 7beee3b50821..1cc9dd0d9d26 100644
--- a/app-containers/crun/crun-1.4.5.ebuild
+++ b/app-containers/crun/crun-1.4.5.ebuild
@@ -5,7 +5,8 @@ EAPI=8
PYTHON_COMPAT=( python3_{8..10} )
-inherit python-any-r1
+# Can drop autotools/eautoreconf after next release & glibc patch gone
+inherit autotools python-any-r1
DESCRIPTION="A fast and low-memory footprint OCI Container Runtime fully written in C"
HOMEPAGE="https://github.com/containers/crun"
@@ -36,6 +37,16 @@ BDEPEND="
# required to create linux "containers".
RESTRICT="test"
+PATCHES=(
+ "${FILESDIR}"/${PN}-1.4.5-glibc-2.36.patch
+)
+
+src_prepare() {
+ default
+
+ eautoreconf
+}
+
src_configure() {
local myeconfargs=(
$(use_enable bpf)
diff --git a/app-containers/crun/files/crun-1.4.5-glibc-2.36.patch b/app-containers/crun/files/crun-1.4.5-glibc-2.36.patch
new file mode 100644
index 000000000000..12990c9dbe65
--- /dev/null
+++ b/app-containers/crun/files/crun-1.4.5-glibc-2.36.patch
@@ -0,0 +1,79 @@
+https://bugs.gentoo.org/863437
+https://github.com/containers/crun/commit/3df14584b84414df77b2079c1b8b48d44d0ceb61
+
+From 3df14584b84414df77b2079c1b8b48d44d0ceb61 Mon Sep 17 00:00:00 2001
+From: Giuseppe Scrivano <gscrivan@redhat.com>
+Date: Tue, 26 Jul 2022 15:17:16 +0200
+Subject: [PATCH] linux: fix build with glibc 2.36
+
+glibc 2.36 has the new mount API in the <sys/mount.h> file. These
+definitions conflict with the definitions in the <linux/mount.h>
+file.
+
+Add a check and include <linux/mount.h> only if it doesn't conflict
+with <sys/mount.h>.
+
+Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2110738
+
+Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
+--- a/configure.ac
++++ b/configure.ac
+@@ -174,11 +174,21 @@ LIBS=""
+ AC_MSG_CHECKING([for new mount API (fsconfig)])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE([[
++ #include <sys/mount.h>
++ int cmd = FSCONFIG_CMD_CREATE;
++ ]])],
++ [AC_MSG_RESULT(yes)
++ AC_DEFINE([HAVE_FSCONFIG_CMD_CREATE_SYS_MOUNT_H], 1, [Define if FSCONFIG_CMD_CREATE is available in sys/mount.h])],
++ [AC_MSG_RESULT(no)])
++AC_COMPILE_IFELSE(
++ [AC_LANG_SOURCE([[
++ /* also make sure it doesn't conflict with <sys/mount.h> since it is always used. */
++ #include <sys/mount.h>
+ #include <linux/mount.h>
+ int cmd = FSCONFIG_CMD_CREATE;
+ ]])],
+ [AC_MSG_RESULT(yes)
+- AC_DEFINE([HAVE_FSCONFIG_CMD_CREATE], 1, [Define if FSCONFIG_CMD_CREATE is available])],
++ AC_DEFINE([HAVE_FSCONFIG_CMD_CREATE_LINUX_MOUNT_H], 1, [Define if FSCONFIG_CMD_CREATE is available in linux/mount.h])],
+ [AC_MSG_RESULT(no)])
+
+ AC_MSG_CHECKING([for seccomp notify API])
+--- a/src/libcrun/linux.c
++++ b/src/libcrun/linux.c
+@@ -26,9 +26,13 @@
+ #include <fcntl.h>
+ #include <unistd.h>
+ #include <sys/mount.h>
+-#ifdef HAVE_FSCONFIG_CMD_CREATE
++#ifdef HAVE_FSCONFIG_CMD_CREATE_LINUX_MOUNT_H
+ # include <linux/mount.h>
+ #endif
++#if defined HAVE_FSCONFIG_CMD_CREATE_LINUX_MOUNT_H || defined HAVE_FSCONFIG_CMD_CREATE_SYS_MOUNT_H
++# define HAVE_NEW_MOUNT_API
++#endif
++
+ #include <sys/syscall.h>
+ #include <sys/prctl.h>
+ #ifdef HAVE_CAP
+@@ -990,7 +994,7 @@ open_mount_target (libcrun_container_t *container, const char *target_rel, libcr
+ static int
+ fsopen_mount (runtime_spec_schema_defs_mount *mount)
+ {
+-#ifdef HAVE_FSCONFIG_CMD_CREATE
++#ifdef HAVE_NEW_MOUNT_API
+ cleanup_close int fsfd = -1;
+ int ret;
+
+@@ -1016,7 +1020,7 @@ fsopen_mount (runtime_spec_schema_defs_mount *mount)
+ static int
+ fs_move_mount_to (int fd, int dirfd, const char *name)
+ {
+-#ifdef HAVE_FSCONFIG_CMD_CREATE
++#ifdef HAVE_NEW_MOUNT_API
+ if (name)
+ return syscall_move_mount (fd, "", dirfd, name, MOVE_MOUNT_F_EMPTY_PATH);
+
+