1 |
commit: 359a6c0eb116c0f9afbf6afa94b7e8936ed5ffc5 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Sep 3 00:33:29 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 3 00:33:38 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=359a6c0e |
7 |
|
8 |
sys-process/criu: add additional glibc-2.36 fix |
9 |
|
10 |
Closes: https://bugs.gentoo.org/868099 |
11 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
12 |
|
13 |
sys-process/criu/criu-3.17-r1.ebuild | 1 + |
14 |
.../criu/files/criu-3.17-glibc-2.36-deux.patch | 99 ++++++++++++++++++++++ |
15 |
2 files changed, 100 insertions(+) |
16 |
|
17 |
diff --git a/sys-process/criu/criu-3.17-r1.ebuild b/sys-process/criu/criu-3.17-r1.ebuild |
18 |
index ac5e1722d999..92fb5dbc8119 100644 |
19 |
--- a/sys-process/criu/criu-3.17-r1.ebuild |
20 |
+++ b/sys-process/criu/criu-3.17-r1.ebuild |
21 |
@@ -61,6 +61,7 @@ PATCHES=( |
22 |
|
23 |
"${FILESDIR}/${P}-amdgpu-build-fixes.patch" |
24 |
"${FILESDIR}/${PN}-3.17-glibc-2.36.patch" |
25 |
+ "${FILESDIR}/${PN}-3.17-glibc-2.36-deux.patch" |
26 |
) |
27 |
|
28 |
criu_arch() { |
29 |
|
30 |
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 |
31 |
new file mode 100644 |
32 |
index 000000000000..ca911d82779d |
33 |
--- /dev/null |
34 |
+++ b/sys-process/criu/files/criu-3.17-glibc-2.36-deux.patch |
35 |
@@ -0,0 +1,99 @@ |
36 |
+https://github.com/checkpoint-restore/criu/commit/517c0947050e63aac72f63a3bf373d76264723b9 |
37 |
+https://bugs.gentoo.org/868099 |
38 |
+ |
39 |
+From: Radostin Stoyanov <rstoyanov@×××××××××××××.org> |
40 |
+Date: Wed, 24 Aug 2022 21:20:30 +0200 |
41 |
+Subject: [PATCH] mount: add definition for FSOPEN_CLOEXEC |
42 |
+ |
43 |
+A recent change in glibc introduced `enum fsconfig_command` [1] and as a |
44 |
+result the compilation of criu fails with the following errors |
45 |
+ |
46 |
+In file included from criu/pie/util.c:3: |
47 |
+/usr/include/sys/mount.h:240:6: error: redeclaration of 'enum fsconfig_command' |
48 |
+ 240 | enum fsconfig_command |
49 |
+ | ^~~~~~~~~~~~~~~~ |
50 |
+In file included from /usr/include/sys/mount.h:32: |
51 |
+criu/include/linux/mount.h:11:6: note: originally defined here |
52 |
+ 11 | enum fsconfig_command { |
53 |
+ | ^~~~~~~~~~~~~~~~ |
54 |
+/usr/include/sys/mount.h:242:3: error: redeclaration of enumerator 'FSCONFIG_SET_FLAG' |
55 |
+ 242 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ |
56 |
+ | ^~~~~~~~~~~~~~~~~ |
57 |
+criu/include/linux/mount.h:12:9: note: previous definition of 'FSCONFIG_SET_FLAG' with type 'enum fsconfig_command' |
58 |
+ 12 | FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ |
59 |
+ | ^~~~~~~~~~~~~~~~~ |
60 |
+/usr/include/sys/mount.h:244:3: error: redeclaration of enumerator 'FSCONFIG_SET_STRING' |
61 |
+ 244 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ |
62 |
+ | ^~~~~~~~~~~~~~~~~~~ |
63 |
+criu/include/linux/mount.h:14:9: note: previous definition of 'FSCONFIG_SET_STRING' with type 'enum fsconfig_command' |
64 |
+ 14 | FSCONFIG_SET_STRING = 1, /* Set parameter, supplying a string value */ |
65 |
+ | ^~~~~~~~~~~~~~~~~~~ |
66 |
+/usr/include/sys/mount.h:246:3: error: redeclaration of enumerator 'FSCONFIG_SET_BINARY' |
67 |
+ 246 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */ |
68 |
+ | ^~~~~~~~~~~~~~~~~~~ |
69 |
+criu/include/linux/mount.h:16:9: note: previous definition of 'FSCONFIG_SET_BINARY' with type 'enum fsconfig_command' |
70 |
+ 16 | FSCONFIG_SET_BINARY = 2, /* Set parameter, supplying a binary blob value */ |
71 |
+ | ^~~~~~~~~~~~~~~~~~~ |
72 |
+/usr/include/sys/mount.h:248:3: error: redeclaration of enumerator 'FSCONFIG_SET_PATH' |
73 |
+ 248 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ |
74 |
+ | ^~~~~~~~~~~~~~~~~ |
75 |
+criu/include/linux/mount.h:18:9: note: previous definition of 'FSCONFIG_SET_PATH' with type 'enum fsconfig_command' |
76 |
+ 18 | FSCONFIG_SET_PATH = 3, /* Set parameter, supplying an object by path */ |
77 |
+ | ^~~~~~~~~~~~~~~~~ |
78 |
+/usr/include/sys/mount.h:250:3: error: redeclaration of enumerator 'FSCONFIG_SET_PATH_EMPTY' |
79 |
+ 250 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */ |
80 |
+ | ^~~~~~~~~~~~~~~~~~~~~~~ |
81 |
+criu/include/linux/mount.h:20:9: note: previous definition of 'FSCONFIG_SET_PATH_EMPTY' with type 'enum fsconfig_command' |
82 |
+ 20 | FSCONFIG_SET_PATH_EMPTY = 4, /* Set parameter, supplying an object by (empty) path */ |
83 |
+ | ^~~~~~~~~~~~~~~~~~~~~~~ |
84 |
+/usr/include/sys/mount.h:252:3: error: redeclaration of enumerator 'FSCONFIG_SET_FD' |
85 |
+ 252 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ |
86 |
+ | ^~~~~~~~~~~~~~~ |
87 |
+criu/include/linux/mount.h:22:9: note: previous definition of 'FSCONFIG_SET_FD' with type 'enum fsconfig_command' |
88 |
+ 22 | FSCONFIG_SET_FD = 5, /* Set parameter, supplying an object by fd */ |
89 |
+ | ^~~~~~~~~~~~~~~ |
90 |
+/usr/include/sys/mount.h:254:3: error: redeclaration of enumerator 'FSCONFIG_CMD_CREATE' |
91 |
+ 254 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */ |
92 |
+ | ^~~~~~~~~~~~~~~~~~~ |
93 |
+criu/include/linux/mount.h:24:9: note: previous definition of 'FSCONFIG_CMD_CREATE' with type 'enum fsconfig_command' |
94 |
+ 24 | FSCONFIG_CMD_CREATE = 6, /* Invoke superblock creation */ |
95 |
+ | ^~~~~~~~~~~~~~~~~~~ |
96 |
+/usr/include/sys/mount.h:256:3: error: redeclaration of enumerator 'FSCONFIG_CMD_RECONFIGURE' |
97 |
+ 256 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ |
98 |
+ | ^~~~~~~~~~~~~~~~~~~~~~~~ |
99 |
+criu/include/linux/mount.h:26:9: note: previous definition of 'FSCONFIG_CMD_RECONFIGURE' with type 'enum fsconfig_command' |
100 |
+ 26 | FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ |
101 |
+ |
102 |
+This patch adds definition for FSOPEN_CLOEXEC to solve this problem. In particular, |
103 |
+sys/mount.h includes ifndef check for FSOPEN_CLOEXEC surrounding `enum fsconfig_command`. |
104 |
+ |
105 |
+[1] https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=7eae6a91e9b1670330c9f15730082c91c0b1d570 |
106 |
+ |
107 |
+Reported-by: Younes Manton (@ymanton) |
108 |
+Signed-off-by: Radostin Stoyanov <rstoyanov@×××××××××××××.org> |
109 |
+--- a/criu/include/linux/mount.h |
110 |
++++ b/criu/include/linux/mount.h |
111 |
+@@ -6,7 +6,7 @@ |
112 |
+ |
113 |
+ /* Copied from /usr/include/sys/mount.h */ |
114 |
+ |
115 |
+-#ifndef FSCONFIG_CMD_CREATE |
116 |
++#ifndef FSOPEN_CLOEXEC |
117 |
+ /* The type of fsconfig call made. */ |
118 |
+ enum fsconfig_command { |
119 |
+ FSCONFIG_SET_FLAG = 0, /* Set parameter, supplying no value */ |
120 |
+@@ -26,7 +26,13 @@ enum fsconfig_command { |
121 |
+ FSCONFIG_CMD_RECONFIGURE = 7, /* Invoke superblock reconfiguration */ |
122 |
+ #define FSCONFIG_CMD_RECONFIGURE FSCONFIG_CMD_RECONFIGURE |
123 |
+ }; |
124 |
+-#endif // FSCONFIG_CMD_CREATE |
125 |
++ |
126 |
++#endif // FSOPEN_CLOEXEC |
127 |
++ |
128 |
++/* fsopen flags. With the redundant definition, we check if the kernel, |
129 |
++ * glibc value and our value still match. |
130 |
++ */ |
131 |
++#define FSOPEN_CLOEXEC 0x00000001 |
132 |
+ |
133 |
+ #ifndef MS_MGC_VAL |
134 |
+ /* Magic mount flag number. Has to be or-ed to the flag values. */ |