diff options
author | wangmy <wangmy@fujitsu.com> | 2022-03-15 19:22:16 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-16 10:31:41 +0000 |
commit | 3d29b42230381eb5628fac7ebfcbd9ed64d80ffe (patch) | |
tree | ad64e141be2cd55d47406150cb16335563b24c44 | |
parent | 08040f9fa78beb993a8ec131a6384dd337353193 (diff) | |
download | poky-3d29b42230381eb5628fac7ebfcbd9ed64d80ffe.tar.gz |
libcgroup: upgrade 2.0 -> 2.0.1
module.patch
musl-decls-compat.patch
removed since they're included in 2.0.1
Changelog:
==========
- Allow reading/writing from cgroup.* files in cgroup v2
- Add support for cgroup v2's cgroup.threads file
- Fix issue where libcgroup/pam wasn't working properly when
cgrulesengd is disabled
- Fix a bug where the cgroup version wasn't initialized in a
named cgroup v1 hierarchy
- Various automake bug fixes
- Build PAM module as unversioned DSO
- Fix build issues with musl libc
- Fix potential TOCTOU race in cgroup_get_procs()
(From OE-Core rev: 36d43237192aed532b37a52784fb91da64f54c1a)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup/module.patch | 36 | ||||
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch | 284 | ||||
-rw-r--r-- | meta/recipes-core/libcgroup/libcgroup_2.0.1.bb (renamed from meta/recipes-core/libcgroup/libcgroup_2.0.bb) | 6 |
3 files changed, 2 insertions, 324 deletions
diff --git a/meta/recipes-core/libcgroup/libcgroup/module.patch b/meta/recipes-core/libcgroup/libcgroup/module.patch deleted file mode 100644 index d8ff9b1479..0000000000 --- a/meta/recipes-core/libcgroup/libcgroup/module.patch +++ /dev/null | |||
@@ -1,36 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From 76f0879056ce7e3f0123c277f2303954d0b6cead Mon Sep 17 00:00:00 2001 | ||
5 | From: =?UTF-8?q?Tomasz=20K=C5=82oczko?= <kloczek@github.com> | ||
6 | Date: Wed, 12 May 2021 20:36:02 +0000 | ||
7 | Subject: [PATCH 2/2] automake: build PAM module as unversioned DSO | ||
8 | MIME-Version: 1.0 | ||
9 | Content-Type: text/plain; charset=UTF-8 | ||
10 | Content-Transfer-Encoding: 8bit | ||
11 | |||
12 | PAM modules should be build as unversioned DSO. | ||
13 | Add -avoid-version to pam_cgroup_la_LDFLAGS | ||
14 | |||
15 | Signed-off-by: Tomasz Kłoczko <kloczek@github.com> | ||
16 | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> | ||
17 | --- | ||
18 | src/pam/Makefile.am | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | diff --git a/src/pam/Makefile.am b/src/pam/Makefile.am | ||
22 | index bd5a91d..4b0b2a9 100644 | ||
23 | --- a/src/pam/Makefile.am | ||
24 | +++ b/src/pam/Makefile.am | ||
25 | @@ -4,7 +4,7 @@ if WITH_PAM | ||
26 | |||
27 | pamlib_LTLIBRARIES = pam_cgroup.la | ||
28 | pam_cgroup_la_SOURCES = pam_cgroup.c | ||
29 | -pam_cgroup_la_LDFLAGS = -module | ||
30 | +pam_cgroup_la_LDFLAGS = -module -avoid-version | ||
31 | pam_cgroup_la_LIBADD = $(top_builddir)/src/libcgroup.la -lpam | ||
32 | |||
33 | endif | ||
34 | -- | ||
35 | 2.32.0 | ||
36 | |||
diff --git a/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch b/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch deleted file mode 100644 index 531a562967..0000000000 --- a/meta/recipes-core/libcgroup/libcgroup/musl-decls-compat.patch +++ /dev/null | |||
@@ -1,284 +0,0 @@ | |||
1 | Upstream-Status: Backport | ||
2 | Signed-off-by: Ross Burton <ross.burton@arm.com> | ||
3 | |||
4 | From 26f2889113789c176273bd24fcd1592a8064c346 Mon Sep 17 00:00:00 2001 | ||
5 | From: "Anthony G. Basile" <blueness@gentoo.org> | ||
6 | Date: Tue, 6 Jul 2021 07:54:47 -0600 | ||
7 | Subject: [PATCH 1/2] Replace __BEGIN_DECLS and __END_DECLS with extern "C". | ||
8 | |||
9 | The macros __BEGIN_DECLS and __END_DECLS are a GNU-ism found in | ||
10 | glibc and uClibc, but not musl. We replace them by the more general | ||
11 | extern "C" { ... } block exposed only if we have __cplusplus. | ||
12 | |||
13 | Forward ported from a patch by Anthony G. Basile <blueness@gentoo.org>. | ||
14 | |||
15 | Signed-off-by: Alex Xu (Hello71) <alex_y_xu@yahoo.ca> | ||
16 | Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> | ||
17 | --- | ||
18 | include/libcgroup/config.h | 8 ++++++-- | ||
19 | include/libcgroup/error.h | 8 ++++++-- | ||
20 | include/libcgroup/groups.h | 8 ++++++-- | ||
21 | include/libcgroup/init.h | 8 ++++++-- | ||
22 | include/libcgroup/iterators.h | 8 ++++++-- | ||
23 | include/libcgroup/log.h | 8 ++++++-- | ||
24 | include/libcgroup/tasks.h | 8 ++++++-- | ||
25 | src/bindings/libcgroup.p | 8 -------- | ||
26 | src/daemon/cgrulesengd.h | 8 ++++++-- | ||
27 | src/libcgroup-internal.h | 8 ++++++-- | ||
28 | src/tools/tools-common.h | 8 ++++++-- | ||
29 | 11 files changed, 60 insertions(+), 28 deletions(-) | ||
30 | |||
31 | diff --git a/include/libcgroup/config.h b/include/libcgroup/config.h | ||
32 | index 9aaa390..f835009 100644 | ||
33 | --- a/include/libcgroup/config.h | ||
34 | +++ b/include/libcgroup/config.h | ||
35 | @@ -9,7 +9,9 @@ | ||
36 | #include <features.h> | ||
37 | #endif | ||
38 | |||
39 | -__BEGIN_DECLS | ||
40 | +#ifdef __cplusplus | ||
41 | +extern "C" { | ||
42 | +#endif | ||
43 | |||
44 | /** | ||
45 | * @defgroup group_config 5. Configuration | ||
46 | @@ -128,6 +130,8 @@ int cgroup_config_create_template_group( | ||
47 | * @} | ||
48 | * @} | ||
49 | */ | ||
50 | -__END_DECLS | ||
51 | +#ifdef __cplusplus | ||
52 | +} /* extern "C" */ | ||
53 | +#endif | ||
54 | |||
55 | #endif /*_LIBCGROUP_CONFIG_H*/ | ||
56 | diff --git a/include/libcgroup/error.h b/include/libcgroup/error.h | ||
57 | index 1dfdde9..14a6e16 100644 | ||
58 | --- a/include/libcgroup/error.h | ||
59 | +++ b/include/libcgroup/error.h | ||
60 | @@ -9,7 +9,9 @@ | ||
61 | #include <features.h> | ||
62 | #endif | ||
63 | |||
64 | -__BEGIN_DECLS | ||
65 | +#ifdef __cplusplus | ||
66 | +extern "C" { | ||
67 | +#endif | ||
68 | |||
69 | /** | ||
70 | * @defgroup group_errors 6. Error handling | ||
71 | @@ -99,6 +101,8 @@ int cgroup_get_last_errno(void); | ||
72 | * @} | ||
73 | * @} | ||
74 | */ | ||
75 | -__END_DECLS | ||
76 | +#ifdef __cplusplus | ||
77 | +} /* extern "C" */ | ||
78 | +#endif | ||
79 | |||
80 | #endif /* _LIBCGROUP_INIT_H */ | ||
81 | diff --git a/include/libcgroup/groups.h b/include/libcgroup/groups.h | ||
82 | index 201558f..39ec3cd 100644 | ||
83 | --- a/include/libcgroup/groups.h | ||
84 | +++ b/include/libcgroup/groups.h | ||
85 | @@ -11,7 +11,9 @@ | ||
86 | #include <stdbool.h> | ||
87 | #endif | ||
88 | |||
89 | -__BEGIN_DECLS | ||
90 | +#ifdef __cplusplus | ||
91 | +extern "C" { | ||
92 | +#endif | ||
93 | |||
94 | /** | ||
95 | * Flags for cgroup_delete_cgroup_ext(). | ||
96 | @@ -587,6 +589,8 @@ char *cgroup_get_cgroup_name(struct cgroup *cgroup); | ||
97 | */ | ||
98 | |||
99 | |||
100 | -__END_DECLS | ||
101 | +#ifdef __cplusplus | ||
102 | +} /* extern "C" */ | ||
103 | +#endif | ||
104 | |||
105 | #endif /* _LIBCGROUP_GROUPS_H */ | ||
106 | diff --git a/include/libcgroup/init.h b/include/libcgroup/init.h | ||
107 | index 5150f2f..ea2dcc9 100644 | ||
108 | --- a/include/libcgroup/init.h | ||
109 | +++ b/include/libcgroup/init.h | ||
110 | @@ -9,7 +9,9 @@ | ||
111 | #include <features.h> | ||
112 | #endif | ||
113 | |||
114 | -__BEGIN_DECLS | ||
115 | +#ifdef __cplusplus | ||
116 | +extern "C" { | ||
117 | +#endif | ||
118 | |||
119 | /** | ||
120 | * @defgroup group_init 1. Initialization | ||
121 | @@ -58,6 +60,8 @@ int cgroup_get_subsys_mount_point(const char *controller, char **mount_point); | ||
122 | * @} | ||
123 | * @} | ||
124 | */ | ||
125 | -__END_DECLS | ||
126 | +#ifdef __cplusplus | ||
127 | +} /* extern "C" */ | ||
128 | +#endif | ||
129 | |||
130 | #endif /* _LIBCGROUP_INIT_H */ | ||
131 | diff --git a/include/libcgroup/iterators.h b/include/libcgroup/iterators.h | ||
132 | index c6d453d..b3ba3af 100644 | ||
133 | --- a/include/libcgroup/iterators.h | ||
134 | +++ b/include/libcgroup/iterators.h | ||
135 | @@ -11,7 +11,9 @@ | ||
136 | #include <features.h> | ||
137 | #endif | ||
138 | |||
139 | -__BEGIN_DECLS | ||
140 | +#ifdef __cplusplus | ||
141 | +extern "C" { | ||
142 | +#endif | ||
143 | |||
144 | /** | ||
145 | * @defgroup group_iterators 3. Iterators | ||
146 | @@ -423,6 +425,8 @@ int cgroup_get_subsys_mount_point_end(void **handle); | ||
147 | * @} | ||
148 | */ | ||
149 | |||
150 | -__END_DECLS | ||
151 | +#ifdef __cplusplus | ||
152 | +} /* extern "C" */ | ||
153 | +#endif | ||
154 | |||
155 | #endif /* _LIBCGROUP_ITERATORS_H */ | ||
156 | diff --git a/include/libcgroup/log.h b/include/libcgroup/log.h | ||
157 | index 0dd03b4..f693473 100644 | ||
158 | --- a/include/libcgroup/log.h | ||
159 | +++ b/include/libcgroup/log.h | ||
160 | @@ -11,7 +11,9 @@ | ||
161 | |||
162 | #include <stdarg.h> | ||
163 | |||
164 | -__BEGIN_DECLS | ||
165 | +#ifdef __cplusplus | ||
166 | +extern "C" { | ||
167 | +#endif | ||
168 | |||
169 | /** | ||
170 | * @defgroup group_log 7. Logging | ||
171 | @@ -142,6 +144,8 @@ extern int cgroup_parse_log_level_str(const char *levelstr); | ||
172 | * @} | ||
173 | * @} | ||
174 | */ | ||
175 | -__END_DECLS | ||
176 | +#ifdef __cplusplus | ||
177 | +} /* extern "C" */ | ||
178 | +#endif | ||
179 | |||
180 | #endif /* _LIBCGROUP_LOG_H */ | ||
181 | diff --git a/include/libcgroup/tasks.h b/include/libcgroup/tasks.h | ||
182 | index aad438a..8553c30 100644 | ||
183 | --- a/include/libcgroup/tasks.h | ||
184 | +++ b/include/libcgroup/tasks.h | ||
185 | @@ -12,7 +12,9 @@ | ||
186 | #include <stdbool.h> | ||
187 | #endif | ||
188 | |||
189 | -__BEGIN_DECLS | ||
190 | +#ifdef __cplusplus | ||
191 | +extern "C" { | ||
192 | +#endif | ||
193 | |||
194 | /** Flags for cgroup_change_cgroup_uid_gid(). */ | ||
195 | enum cgflags { | ||
196 | @@ -204,6 +206,8 @@ int cgroup_register_unchanged_process(pid_t pid, int flags); | ||
197 | * @} | ||
198 | * @} | ||
199 | */ | ||
200 | -__END_DECLS | ||
201 | +#ifdef __cplusplus | ||
202 | +} /* extern "C" */ | ||
203 | +#endif | ||
204 | |||
205 | #endif /* _LIBCGROUP_TASKS_H */ | ||
206 | diff --git a/src/daemon/cgrulesengd.h b/src/daemon/cgrulesengd.h | ||
207 | index e273b4b..0b12076 100644 | ||
208 | --- a/src/daemon/cgrulesengd.h | ||
209 | +++ b/src/daemon/cgrulesengd.h | ||
210 | @@ -17,7 +17,9 @@ | ||
211 | |||
212 | #include <features.h> | ||
213 | |||
214 | -__BEGIN_DECLS | ||
215 | +#ifdef __cplusplus | ||
216 | +extern "C" { | ||
217 | +#endif | ||
218 | |||
219 | #include "config.h" | ||
220 | #include "libcgroup.h" | ||
221 | @@ -119,7 +121,9 @@ void cgre_flash_templates(int signum); | ||
222 | */ | ||
223 | void cgre_catch_term(int signum); | ||
224 | |||
225 | -__END_DECLS | ||
226 | +#ifdef __cplusplus | ||
227 | +} /* extern "C" */ | ||
228 | +#endif | ||
229 | |||
230 | #endif /* _CGRULESENGD_H */ | ||
231 | |||
232 | diff --git a/src/libcgroup-internal.h b/src/libcgroup-internal.h | ||
233 | index 1dfc92b..edc5abb 100644 | ||
234 | --- a/src/libcgroup-internal.h | ||
235 | +++ b/src/libcgroup-internal.h | ||
236 | @@ -16,7 +16,9 @@ | ||
237 | |||
238 | #define __LIBCG_INTERNAL | ||
239 | |||
240 | -__BEGIN_DECLS | ||
241 | +#ifdef __cplusplus | ||
242 | +extern "C" { | ||
243 | +#endif | ||
244 | |||
245 | #include "config.h" | ||
246 | #include <dirent.h> | ||
247 | @@ -407,6 +409,8 @@ int cgroupv2_controller_enabled(const char * const cg_name, | ||
248 | |||
249 | #endif /* UNIT_TEST */ | ||
250 | |||
251 | -__END_DECLS | ||
252 | +#ifdef __cplusplus | ||
253 | +} /* extern "C" */ | ||
254 | +#endif | ||
255 | |||
256 | #endif | ||
257 | diff --git a/src/tools/tools-common.h b/src/tools/tools-common.h | ||
258 | index 292c408..e3541b1 100644 | ||
259 | --- a/src/tools/tools-common.h | ||
260 | +++ b/src/tools/tools-common.h | ||
261 | @@ -18,7 +18,9 @@ | ||
262 | |||
263 | #define __TOOLS_COMMON | ||
264 | |||
265 | -__BEGIN_DECLS | ||
266 | +#ifdef __cplusplus | ||
267 | +extern "C" { | ||
268 | +#endif | ||
269 | #include "config.h" | ||
270 | #include <libcgroup.h> | ||
271 | #include "../libcgroup-internal.h" | ||
272 | @@ -136,6 +138,8 @@ int parse_r_flag(const char * const program_name, | ||
273 | |||
274 | #endif /* UNIT_TEST */ | ||
275 | |||
276 | -__END_DECLS | ||
277 | +#ifdef __cplusplus | ||
278 | +} /* extern "C" */ | ||
279 | +#endif | ||
280 | |||
281 | #endif /* TOOLS_COMMON */ | ||
282 | -- | ||
283 | 2.32.0 | ||
284 | |||
diff --git a/meta/recipes-core/libcgroup/libcgroup_2.0.bb b/meta/recipes-core/libcgroup/libcgroup_2.0.1.bb index cb0156d9d8..857a4e86fd 100644 --- a/meta/recipes-core/libcgroup/libcgroup_2.0.bb +++ b/meta/recipes-core/libcgroup/libcgroup_2.0.1.bb | |||
@@ -11,11 +11,9 @@ inherit autotools pkgconfig | |||
11 | 11 | ||
12 | DEPENDS = "bison-native flex-native" | 12 | DEPENDS = "bison-native flex-native" |
13 | 13 | ||
14 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.bz2 \ | 14 | SRC_URI = "https://github.com/${BPN}/${BPN}/releases/download/v${PV}/${BP}.tar.gz" |
15 | file://musl-decls-compat.patch \ | ||
16 | file://module.patch" | ||
17 | 15 | ||
18 | SRC_URI[sha256sum] = "11a2fbf0e42f46089f406b8b0dca7fef04aec2f21600b70e402c5db3661305d7" | 16 | SRC_URI[sha256sum] = "2dd9c566a90a053e7a5f47607e225648ba7aa9bb7763514dd4778e2ed530fe90" |
19 | UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/releases/" | 17 | UPSTREAM_CHECK_URI = "https://github.com/libcgroup/libcgroup/releases/" |
20 | 18 | ||
21 | DEPENDS:append:libc-musl = " fts " | 19 | DEPENDS:append:libc-musl = " fts " |