summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.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/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.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/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch')
-rw-r--r--meta/recipes-core/systemd/systemd/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch153
1 files changed, 153 insertions, 0 deletions
diff --git a/meta/recipes-core/systemd/systemd/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch b/meta/recipes-core/systemd/systemd/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
new file mode 100644
index 0000000000..bee5fb6511
--- /dev/null
+++ b/meta/recipes-core/systemd/systemd/0008-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not-.patch
@@ -0,0 +1,153 @@
1From 848e711d719a6d987bc7d14183e1c7b1f1c91c56 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Fri, 29 Jun 2018 17:10:29 +0800
4Subject: [PATCH 08/19] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not
5 defined
6
7If the standard library doesn't provide brace
8expansion users just won't get it.
9
10Dont use GNU GLOB extentions on non-glibc systems
11
12Conditionalize use of GLOB_ALTDIRFUNC
13
14Upstream-Status: Inappropriate [musl specific]
15
16Signed-off-by: Khem Raj <raj.khem@gmail.com>
17Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
18---
19 src/basic/glob-util.c | 13 +++++++++++--
20 src/test/test-glob-util.c | 15 +++++++++++++++
21 src/tmpfiles/tmpfiles.c | 10 ++++++++++
22 3 files changed, 36 insertions(+), 2 deletions(-)
23
24diff --git a/src/basic/glob-util.c b/src/basic/glob-util.c
25index 9fac676f2..8adb9559e 100644
26--- a/src/basic/glob-util.c
27+++ b/src/basic/glob-util.c
28@@ -10,6 +10,11 @@
29 #include "macro.h"
30 #include "path-util.h"
31 #include "strv.h"
32+/* Don't fail if the standard library
33+ * doesn't provide brace expansion */
34+#ifndef GLOB_BRACE
35+#define GLOB_BRACE 0
36+#endif
37
38 static void closedir_wrapper(void* v) {
39 (void) closedir(v);
40@@ -18,6 +23,7 @@ static void closedir_wrapper(void* v) {
41 int safe_glob(const char *path, int flags, glob_t *pglob) {
42 int k;
43
44+#ifdef GLOB_ALTDIRFUNC
45 /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */
46 assert(!(flags & GLOB_ALTDIRFUNC));
47
48@@ -31,10 +37,13 @@ int safe_glob(const char *path, int flags, glob_t *pglob) {
49 pglob->gl_lstat = lstat;
50 if (!pglob->gl_stat)
51 pglob->gl_stat = stat;
52-
53+#endif
54 errno = 0;
55+#ifdef GLOB_ALTDIRFUNC
56 k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob);
57-
58+#else
59+ k = glob(path, flags, NULL, pglob);
60+#endif
61 if (k == GLOB_NOMATCH)
62 return -ENOENT;
63 if (k == GLOB_NOSPACE)
64diff --git a/src/test/test-glob-util.c b/src/test/test-glob-util.c
65index d78d6223c..f5943b26d 100644
66--- a/src/test/test-glob-util.c
67+++ b/src/test/test-glob-util.c
68@@ -12,6 +12,11 @@
69 #include "glob-util.h"
70 #include "macro.h"
71 #include "rm-rf.h"
72+/* Don't fail if the standard library
73+ * doesn't provide brace expansion */
74+#ifndef GLOB_BRACE
75+#define GLOB_BRACE 0
76+#endif
77
78 static void test_glob_exists(void) {
79 char name[] = "/tmp/test-glob_exists.XXXXXX";
80@@ -40,11 +45,13 @@ static void test_glob_no_dot(void) {
81 const char *fn;
82
83 _cleanup_globfree_ glob_t g = {
84+#ifdef GLOB_ALTDIRFUNC
85 .gl_closedir = closedir_wrapper,
86 .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot,
87 .gl_opendir = (void *(*)(const char *)) opendir,
88 .gl_lstat = lstat,
89 .gl_stat = stat,
90+#endif
91 };
92
93 int r;
94@@ -52,11 +59,19 @@ static void test_glob_no_dot(void) {
95 assert_se(mkdtemp(template));
96
97 fn = strjoina(template, "/*");
98+#ifdef GLOB_ALTDIRFUNC
99 r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
100+#else
101+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
102+#endif
103 assert_se(r == GLOB_NOMATCH);
104
105 fn = strjoina(template, "/.*");
106+#ifdef GLOB_ALTDIRFUNC
107 r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g);
108+#else
109+ r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g);
110+#endif
111 assert_se(r == GLOB_NOMATCH);
112
113 (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL);
114diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c
115index 927de35f3..5f0283da5 100644
116--- a/src/tmpfiles/tmpfiles.c
117+++ b/src/tmpfiles/tmpfiles.c
118@@ -60,6 +60,12 @@
119 #include "user-util.h"
120 #include "util.h"
121
122+/* Don't fail if the standard library
123+ * doesn't provide brace expansion */
124+#ifndef GLOB_BRACE
125+#define GLOB_BRACE 0
126+#endif
127+
128 /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates
129 * them in the file system. This is intended to be used to create
130 * properly owned directories beneath /tmp, /var/tmp, /run, which are
131@@ -1345,7 +1351,9 @@ finish:
132
133 static int glob_item(Item *i, action_t action) {
134 _cleanup_globfree_ glob_t g = {
135+#ifdef GLOB_ALTDIRFUNC
136 .gl_opendir = (void *(*)(const char *)) opendir_nomod,
137+#endif
138 };
139 int r = 0, k;
140 char **fn;
141@@ -1365,7 +1373,9 @@ static int glob_item(Item *i, action_t action) {
142
143 static int glob_item_recursively(Item *i, fdaction_t action) {
144 _cleanup_globfree_ glob_t g = {
145+#ifdef GLOB_ALTDIRFUNC
146 .gl_opendir = (void *(*)(const char *)) opendir_nomod,
147+#endif
148 };
149 int r = 0, k;
150 char **fn;
151--
1522.11.0
153