From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/, sys-process/criu/
Date: Sat, 3 Sep 2022 00:33:47 +0000 (UTC) [thread overview]
Message-ID: <1662165218.359a6c0eb116c0f9afbf6afa94b7e8936ed5ffc5.sam@gentoo> (raw)
commit: 359a6c0eb116c0f9afbf6afa94b7e8936ed5ffc5
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 3 00:33:29 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Sep 3 00:33:38 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=359a6c0e
sys-process/criu: add additional glibc-2.36 fix
Closes: https://bugs.gentoo.org/868099
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-process/criu/criu-3.17-r1.ebuild | 1 +
.../criu/files/criu-3.17-glibc-2.36-deux.patch | 99 ++++++++++++++++++++++
2 files changed, 100 insertions(+)
diff --git a/sys-process/criu/criu-3.17-r1.ebuild b/sys-process/criu/criu-3.17-r1.ebuild
index ac5e1722d999..92fb5dbc8119 100644
--- a/sys-process/criu/criu-3.17-r1.ebuild
+++ b/sys-process/criu/criu-3.17-r1.ebuild
@@ -61,6 +61,7 @@ PATCHES=(
"${FILESDIR}/${P}-amdgpu-build-fixes.patch"
"${FILESDIR}/${PN}-3.17-glibc-2.36.patch"
+ "${FILESDIR}/${PN}-3.17-glibc-2.36-deux.patch"
)
criu_arch() {
diff --git a/sys-process/criu/files/criu-3.17-glibc-2.36-deux.patch b/sys-process/criu/files/criu-3.17-glibc-2.36-deux.patch
new file mode 100644
index 000000000000..ca911d82779d
--- /dev/null
+++ b/sys-process/criu/files/criu-3.17-glibc-2.36-deux.patch
@@ -0,0 +1,99 @@
+https://github.com/checkpoint-restore/criu/commit/517c0947050e63aac72f63a3bf373d76264723b9
+https://bugs.gentoo.org/868099
+
+From: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+Date: Wed, 24 Aug 2022 21:20:30 +0200
+Subject: [PATCH] mount: add definition for FSOPEN_CLOEXEC
+
+A recent change in glibc introduced `enum fsconfig_command` [1] and as a
+result the compilation of criu fails with the following errors
+
+In file included from criu/pie/util.c:3:
+/usr/include/sys/mount.h:240:6: error: redeclaration of 'enum fsconfig_command'
+ 240 | enum fsconfig_command
+ | ^~~~~~~~~~~~~~~~
+In file included from /usr/include/sys/mount.h:32:
+criu/include/linux/mount.h:11:6: note: originally defined here
+ 11 | enum fsconfig_command {
+ | ^~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:242:3: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG'
+ 242 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+ | ^~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:12:9: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command'
+ 12 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+ | ^~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:244:3: error: redeclaration of enumerator 'FSCONFIG_SET_STRING'
+ 244 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
+ | ^~~~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:14:9: note: previous definition of 'FSCONFIG_SET_STRING' with type 'enum fsconfig_command'
+ 14 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */
+ | ^~~~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:246:3: error: redeclaration of enumerator 'FSCONFIG_SET_BINARY'
+ 246 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
+ | ^~~~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:16:9: note: previous definition of 'FSCONFIG_SET_BINARY' with type 'enum fsconfig_command'
+ 16 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */
+ | ^~~~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:248:3: error: redeclaration of enumerator 'FSCONFIG_SET_PATH'
+ 248 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
+ | ^~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:18:9: note: previous definition of 'FSCONFIG_SET_PATH' with type 'enum fsconfig_command'
+ 18 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */
+ | ^~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:250:3: error: redeclaration of enumerator 'FSCONFIG_SET_PATH_EMPTY'
+ 250 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
+ | ^~~~~~~~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:20:9: note: previous definition of 'FSCONFIG_SET_PATH_EMPTY' with type 'enum fsconfig_command'
+ 20 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */
+ | ^~~~~~~~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:252:3: error: redeclaration of enumerator 'FSCONFIG_SET_FD'
+ 252 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
+ | ^~~~~~~~~~~~~~~
+criu/include/linux/mount.h:22:9: note: previous definition of 'FSCONFIG_SET_FD' with type 'enum fsconfig_command'
+ 22 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */
+ | ^~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:254:3: error: redeclaration of enumerator 'FSCONFIG_CMD_CREATE'
+ 254 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
+ | ^~~~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:24:9: note: previous definition of 'FSCONFIG_CMD_CREATE' with type 'enum fsconfig_command'
+ 24 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */
+ | ^~~~~~~~~~~~~~~~~~~
+/usr/include/sys/mount.h:256:3: error: redeclaration of enumerator 'FSCONFIG_CMD_RECONFIGURE'
+ 256 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
+ | ^~~~~~~~~~~~~~~~~~~~~~~~
+criu/include/linux/mount.h:26:9: note: previous definition of 'FSCONFIG_CMD_RECONFIGURE' with type 'enum fsconfig_command'
+ 26 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
+
+This patch adds definition for FSOPEN_CLOEXEC to solve this problem. In particular,
+sys/mount.h includes ifndef check for FSOPEN_CLOEXEC surrounding `enum fsconfig_command`.
+
+[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=7eae6a91e9b1670330c9f15730082c91c0b1d570
+
+Reported-by: Younes Manton (@ymanton)
+Signed-off-by: Radostin Stoyanov <rstoyanov@fedoraproject.org>
+--- a/criu/include/linux/mount.h
++++ b/criu/include/linux/mount.h
+@@ -6,7 +6,7 @@
+
+ /* Copied from /usr/include/sys/mount.h */
+
+-#ifndef FSCONFIG_CMD_CREATE
++#ifndef FSOPEN_CLOEXEC
+ /* The type of fsconfig call made. */
+ enum fsconfig_command {
+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */
+@@ -26,7 +26,13 @@ enum fsconfig_command {
+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */
+ #define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE
+ };
+-#endif // FSCONFIG_CMD_CREATE
++
++#endif // FSOPEN_CLOEXEC
++
++/* fsopen flags. With the redundant definition, we check if the kernel,
++ * glibc value and our value still match.
++ */
++#define FSOPEN_CLOEXEC 0x00000001
+
+ #ifndef MS_MGC_VAL
+ /* Magic mount flag number. Has to be or-ed to the flag values. */
next reply other threads:[~2022-09-03 0:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-03 0:33 Sam James [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-02-22 18:38 [gentoo-commits] repo/gentoo:master commit in: sys-process/criu/files/, sys-process/criu/ Patrick McLean
2023-05-01 12:49 Sam James
2022-05-19 3:33 Sam James
2021-12-02 0:17 Patrick McLean
2021-12-01 20:34 Sam James
2021-11-04 21:10 Sam James
2021-09-05 5:57 Sam James
2020-04-25 11:29 Sergei Trofimovich
2019-07-29 2:43 Matthias Maier
2016-12-07 5:28 Mike Frysinger
2016-11-23 10:04 Yixun Lan
2015-12-08 11:39 Yixun Lan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1662165218.359a6c0eb116c0f9afbf6afa94b7e8936ed5ffc5.sam@gentoo \
--to=sam@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox