summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-07-17 10:05:11 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-18 10:18:42 +0100
commitada8a5d9175b141b4fe532f542f5c1f7ffa26d88 (patch)
tree64af2142c781c13ee7669004b615d41cfb787f92 /meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
parent219eed186d32b01a7132233c5110c08055ed6e27 (diff)
downloadpoky-ada8a5d9175b141b4fe532f542f5c1f7ffa26d88.tar.gz
systemd: upgrade to 239
Upgrade systemd to 239. 1. Patch Changes * Rebased Patches 0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch 0003-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch 0006-Make-root-s-home-directory-configurable.patch 0027-remove-nobody-user-group-checking.patch 0011-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch 0013-add-fallback-parse_printf_format-implementation.patch 0014-src-basic-missing.h-check-for-missing-strndupa.patch 0015-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch 0016-src-basic-missing.h-check-for-missing-__compar_fn_t-.patch 0017-Include-netinet-if_ether.h.patch 0019-Do-not-enable-nss-tests-if-nss-systemd-is-not-enable.patch 0022-don-t-use-glibc-specific-qsort_r.patch 0024-comparison_fn_t-is-glibc-specific-use-raw-signature-.patch 0026-Use-uintmax_t-for-handling-rlim_t.patch 0030-fix-missing-of-__register_atfork-for-non-glibc-build.patch 0031-fix-missing-ULONG_LONG_MAX-definition-in-case-of-mus.patch 0001-core-device.c-Change-the-default-device-timeout-to-2.patch 0001-Remove-fstack-protector-flags-to-workaround-musl-bui.patch * Dropped Patches and Reasons 0001-Hide-__start_BUS_ERROR_MAP-and-__stop_BUS_ERROR_MAP.patch This patch is dropped because the problem has been fixed by binutils upstream. And this workaround could be dropped. https://sourceware.org/bugzilla/show_bug.cgi?id=18548 0007-Revert-rules-remove-firmware-loading-rules.patch 0008-Revert-udev-remove-userspace-firmware-loading-suppor.patch These two patches are dropped because they are for kernel < 3.7. But the current minimal requirement of kernel to build systemd is as below. REQUIREMENTS: Linux kernel >= 3.13 Linux kernel >= 4.2 for unified cgroup hierarchy support So these two patches no long make any sense. Also remove non-exist firmware-path option 0009-remove-duplicate-include-uchar.h.patch 0010-check-for-uchar.h-in-meson.build.patch These two patches are dropped because musl has implemented uchar.h. See commit below from musl repo. """ ab9672ae73248f51e30f4553c4b8878525e46383 implement uchar.h (C11 UTF-16/32 conversion) interfaces """ 0018-check-for-missing-canonicalize_file_name.patch The above patch is dropped because current systemd does not need canonicalize_file_name. 0025-Define-_PATH_WTMPX-and-_PATH_UTMPX-if-not-defined.patch The above patch is dropped because utmp makes no sense in musl. Check code below from musl. include/utmp.h:#define _PATH_UTMP "/dev/null/utmp" And utmp PACKAGECONFIG has been explicitly disabled for musl. So we don't need this patch. 0032-memfd.patch 0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch libmount.patch 0034-Fix-format-truncation-compile-failure-by-typecasting.patch The above patches are dropped because they are backported patches. And current systemd has contained these patches. 0036-time-util-fix-build-with-gcc8-Werror-format-truncati.patch The above patch is dropped because it has been merged and is now in new version. * Newly Added Patch 0005-include-gshadow-only-if-ENABLE_GSHADOW-is-1.patch This patch is added to fix build for musl. 0019-Do-not-disable-buffering-when-writing-to-oom_score_a.patch This patch is added to fix the following error which caused system unable to boot up. systemd-udevd.service: Failed to adjust OOM setting: Invalid argument dbus.service: Failed to adjust OOM setting: Invalid argument 0020-distinguish-XSI-compliant-strerror_r-from-GNU-specif.patch This patch is added to fix segment fault error on musl systems. 0001-login-use-parse_uid-when-unmounting-user-runtime-dir.patch This patch is backported to solve a race condition between user-runtime-dir@xxx.service stop and user deletion. 2. PACKAGECONFIG and Dependency Changes * Add a new PACKAGECONFIG item 'gshadow'. Enable it by default for glibc but disable it by default for musl. This is because musl does not provide gshadow.h. * Add a new PACKAGECONFIG item 'portabled'. Default to disable it because it's still experimental, according to the announcement letter. """ Currently, the support is still experimental, but this is expected to change soon. Reflecting this experimental state, the "portablectl" binary is not installed into /usr/bin yet. """ * Change 'kmod' from a hard dependency to a PACKAGECONFIG item. Default to enable it. * Change 'acl' from a hard dependency to a PACKAGECONFIG item. Default to enable it. * Remove 'readline' from DEPENDS. systemd does not need it. * Remove 'libcgroup' from DEPENDS. The dependency on libcgroup has been removed from systemd a long time ago. We now remove this unnecessary dependency from DEPENDS. 3. update-alternatives changes The utilities like shutdown, poweroff, etc. are now created as symlinks at do_install. So there's no need to use update-alternatives mechanism anymore to create the symlinks now. In addtion, I don't think we now support multiple init systems at one running system, so there's really no need to use update-alternatives mechanism here. Also update the FILES_${PN} to include these files to avoid QA issue. (From OE-Core rev: 597f4645faf61486eb1d2ab73f3d974460ab9466) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch203
1 files changed, 0 insertions, 203 deletions
diff --git a/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch b/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
deleted file mode 100644
index 59647b22f8..0000000000
--- a/meta/recipes-core/systemd/systemd/0033-basic-macros-rename-noreturn-into-_noreturn_-8456.patch
+++ /dev/null
@@ -1,203 +0,0 @@
1From 848e863acc51ecfb0f3955c498874588201d9130 Mon Sep 17 00:00:00 2001
2From: Franck Bui <fbui@suse.com>
3Date: Thu, 15 Mar 2018 06:23:46 +0100
4Subject: [PATCH] basic/macros: rename noreturn into _noreturn_ (#8456)
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9"noreturn" is reserved and can be used in other header files we include:
10
11 [ 16s] In file included from /usr/include/gcrypt.h:30:0,
12 [ 16s] from ../src/journal/journal-file.h:26,
13 [ 16s] from ../src/journal/journal-vacuum.c:31:
14 [ 16s] /usr/include/gpg-error.h:1544:46: error: expected ‘,’ or ‘;’ before ‘)’ token
15 [ 16s] void gpgrt_log_bug (const char *fmt, ...) GPGRT_ATTR_NR_PRINTF(1,2);
16
17Here we include grcrypt.h (which in turns include gpg-error.h) *after* we
18"noreturn" was defined in macro.h.
19---
20 src/basic/log.c | 4 ++--
21 src/basic/log.h | 4 ++--
22 src/basic/macro.h | 19 +++++++++----------
23 src/basic/process-util.c | 2 +-
24 src/basic/process-util.h | 2 +-
25 src/core/main.c | 4 ++--
26 src/journal/test-journal-interleaving.c | 2 +-
27 src/shared/pager.c | 2 +-
28 src/udev/collect/collect.c | 2 +-
29 9 files changed, 20 insertions(+), 21 deletions(-)
30
31Upstream-Status: Backport [https://github.com/systemd/systemd/pull/8456]
32
33diff --git a/src/basic/log.c b/src/basic/log.c
34index 7a7f2cbec..16a2431c5 100644
35--- a/src/basic/log.c
36+++ b/src/basic/log.c
37@@ -814,7 +814,7 @@ static void log_assert(
38 log_dispatch_internal(level, 0, file, line, func, NULL, NULL, NULL, NULL, buffer);
39 }
40
41-noreturn void log_assert_failed_realm(
42+_noreturn_ void log_assert_failed_realm(
43 LogRealm realm,
44 const char *text,
45 const char *file,
46@@ -826,7 +826,7 @@ noreturn void log_assert_failed_realm(
47 abort();
48 }
49
50-noreturn void log_assert_failed_unreachable_realm(
51+_noreturn_ void log_assert_failed_unreachable_realm(
52 LogRealm realm,
53 const char *text,
54 const char *file,
55diff --git a/src/basic/log.h b/src/basic/log.h
56index efcf0f1bf..314be128a 100644
57--- a/src/basic/log.h
58+++ b/src/basic/log.h
59@@ -186,7 +186,7 @@ int log_dump_internal(
60 char *buffer);
61
62 /* Logging for various assertions */
63-noreturn void log_assert_failed_realm(
64+_noreturn_ void log_assert_failed_realm(
65 LogRealm realm,
66 const char *text,
67 const char *file,
68@@ -195,7 +195,7 @@ noreturn void log_assert_failed_realm(
69 #define log_assert_failed(text, ...) \
70 log_assert_failed_realm(LOG_REALM, (text), __VA_ARGS__)
71
72-noreturn void log_assert_failed_unreachable_realm(
73+_noreturn_ void log_assert_failed_unreachable_realm(
74 LogRealm realm,
75 const char *text,
76 const char *file,
77diff --git a/src/basic/macro.h b/src/basic/macro.h
78index 95be63a20..8911edfc4 100644
79--- a/src/basic/macro.h
80+++ b/src/basic/macro.h
81@@ -53,6 +53,15 @@
82 #else
83 #define _fallthrough_
84 #endif
85+/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
86+ * compiler versions */
87+#ifndef _noreturn_
88+#if __STDC_VERSION__ >= 201112L
89+#define _noreturn_ _Noreturn
90+#else
91+#define _noreturn_ __attribute__((noreturn))
92+#endif
93+#endif
94
95 /* Temporarily disable some warnings */
96 #define DISABLE_WARNING_DECLARATION_AFTER_STATEMENT \
97@@ -414,16 +423,6 @@ static inline unsigned long ALIGN_POWER2(unsigned long u) {
98 #endif
99 #endif
100
101-/* Define C11 noreturn without <stdnoreturn.h> and even on older gcc
102- * compiler versions */
103-#ifndef noreturn
104-#if __STDC_VERSION__ >= 201112L
105-#define noreturn _Noreturn
106-#else
107-#define noreturn __attribute__((noreturn))
108-#endif
109-#endif
110-
111 #define DEFINE_TRIVIAL_CLEANUP_FUNC(type, func) \
112 static inline void func##p(type *p) { \
113 if (*p) \
114diff --git a/src/basic/process-util.c b/src/basic/process-util.c
115index aa9846db5..e6120af5b 100644
116--- a/src/basic/process-util.c
117+++ b/src/basic/process-util.c
118@@ -987,7 +987,7 @@ bool is_main_thread(void) {
119 return cached > 0;
120 }
121
122-noreturn void freeze(void) {
123+_noreturn_ void freeze(void) {
124
125 log_close();
126
127diff --git a/src/basic/process-util.h b/src/basic/process-util.h
128index 93029e36e..5170adec7 100644
129--- a/src/basic/process-util.h
130+++ b/src/basic/process-util.h
131@@ -91,7 +91,7 @@ int pid_from_same_root_fs(pid_t pid);
132
133 bool is_main_thread(void);
134
135-noreturn void freeze(void);
136+_noreturn_ void freeze(void);
137
138 bool oom_score_adjust_is_valid(int oa);
139
140diff --git a/src/core/main.c b/src/core/main.c
141index 076846a41..4b2d14923 100644
142--- a/src/core/main.c
143+++ b/src/core/main.c
144@@ -141,7 +141,7 @@ static uint64_t arg_default_tasks_max = UINT64_MAX;
145 static sd_id128_t arg_machine_id = {};
146 static EmergencyAction arg_cad_burst_action = EMERGENCY_ACTION_REBOOT_FORCE;
147
148-noreturn static void freeze_or_reboot(void) {
149+_noreturn_ static void freeze_or_reboot(void) {
150
151 if (arg_crash_reboot) {
152 log_notice("Rebooting in 10s...");
153@@ -156,7 +156,7 @@ noreturn static void freeze_or_reboot(void) {
154 freeze();
155 }
156
157-noreturn static void crash(int sig) {
158+_noreturn_ static void crash(int sig) {
159 struct sigaction sa;
160 pid_t pid;
161
162diff --git a/src/journal/test-journal-interleaving.c b/src/journal/test-journal-interleaving.c
163index 5a88b2774..d87bdbdd3 100644
164--- a/src/journal/test-journal-interleaving.c
165+++ b/src/journal/test-journal-interleaving.c
166@@ -37,7 +37,7 @@
167
168 static bool arg_keep = false;
169
170-noreturn static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
171+_noreturn_ static void log_assert_errno(const char *text, int error, const char *file, int line, const char *func) {
172 log_internal(LOG_CRIT, error, file, line, func,
173 "'%s' failed at %s:%u (%s): %m", text, file, line, func);
174 abort();
175diff --git a/src/shared/pager.c b/src/shared/pager.c
176index 75db3c985..681af9c40 100644
177--- a/src/shared/pager.c
178+++ b/src/shared/pager.c
179@@ -47,7 +47,7 @@ static int stored_stderr = -1;
180 static bool stdout_redirected = false;
181 static bool stderr_redirected = false;
182
183-noreturn static void pager_fallback(void) {
184+_noreturn_ static void pager_fallback(void) {
185 int r;
186
187 r = copy_bytes(STDIN_FILENO, STDOUT_FILENO, (uint64_t) -1, 0);
188diff --git a/src/udev/collect/collect.c b/src/udev/collect/collect.c
189index 2821640e9..c8fa47b3d 100644
190--- a/src/udev/collect/collect.c
191+++ b/src/udev/collect/collect.c
192@@ -58,7 +58,7 @@ static inline struct _mate *node_to_mate(struct udev_list_node *node)
193 return container_of(node, struct _mate, node);
194 }
195
196-noreturn static void sig_alrm(int signo)
197+_noreturn_ static void sig_alrm(int signo)
198 {
199 exit(4);
200 }
201--
2022.17.0
203