diff options
author | Luca Boccassi <luca.boccassi@microsoft.com> | 2020-12-18 09:42:52 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-12-20 00:03:04 +0000 |
commit | 754d05fffebb69b6abcbe0cac39541aaee551f90 (patch) | |
tree | 1b74251f6b1edf0d1e77490112078b6a9349711d /meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch | |
parent | fae7b0ddba4836d7b1b1d642bd4514ceab50ca09 (diff) | |
download | poky-754d05fffebb69b6abcbe0cac39541aaee551f90.tar.gz |
systemd: update 246 -> 247
Update systemd to v247.2.
Add rule for new oomd dbus conf and for new pam.d
conf directory in /usr/lib|lib64.
Drop selinux-hook-handling-to-enumerate-nexthop.patch,
merged upstream.
Drop 0001-meson-Fix-reallocarray-check.patch,
merged upstream.
Refresh musl patches.
(From OE-Core rev: 1e1d26de68ed13fd53c1a16b9662ac9860dca714)
Signed-off-by: Luca Boccassi <luca.boccassi@microsoft.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch')
-rw-r--r-- | meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch | 153 |
1 files changed, 0 insertions, 153 deletions
diff --git a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch b/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch deleted file mode 100644 index dd6ecebeb4..0000000000 --- a/meta/recipes-core/systemd/systemd/0007-don-t-fail-if-GLOB_BRACE-and-GLOB_ALTDIRFUNC-is-not.patch +++ /dev/null | |||
@@ -1,153 +0,0 @@ | |||
1 | From 77f98727f1d19a8fb327b55c92f1a9ee7b859e9f Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 25 Feb 2019 14:56:21 +0800 | ||
4 | Subject: [PATCH] don't fail if GLOB_BRACE and GLOB_ALTDIRFUNC is not defined | ||
5 | |||
6 | If the standard library doesn't provide brace | ||
7 | expansion users just won't get it. | ||
8 | |||
9 | Dont use GNU GLOB extentions on non-glibc systems | ||
10 | |||
11 | Conditionalize use of GLOB_ALTDIRFUNC | ||
12 | |||
13 | Upstream-Status: Inappropriate [musl specific] | ||
14 | |||
15 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
16 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
17 | [rebased for systemd 243] | ||
18 | Signed-off-by: Scott Murray <scott.murray@konsulko.com> | ||
19 | |||
20 | --- | ||
21 | src/basic/glob-util.c | 12 ++++++++++++ | ||
22 | src/test/test-glob-util.c | 16 ++++++++++++++++ | ||
23 | src/tmpfiles/tmpfiles.c | 10 ++++++++++ | ||
24 | 3 files changed, 38 insertions(+) | ||
25 | |||
26 | Index: systemd-stable/src/basic/glob-util.c | ||
27 | =================================================================== | ||
28 | --- systemd-stable.orig/src/basic/glob-util.c | ||
29 | +++ systemd-stable/src/basic/glob-util.c | ||
30 | @@ -12,6 +12,12 @@ | ||
31 | #include "path-util.h" | ||
32 | #include "strv.h" | ||
33 | |||
34 | +/* Don't fail if the standard library | ||
35 | + * doesn't provide brace expansion */ | ||
36 | +#ifndef GLOB_BRACE | ||
37 | +#define GLOB_BRACE 0 | ||
38 | +#endif | ||
39 | + | ||
40 | static void closedir_wrapper(void* v) { | ||
41 | (void) closedir(v); | ||
42 | } | ||
43 | @@ -19,6 +25,7 @@ static void closedir_wrapper(void* v) { | ||
44 | int safe_glob(const char *path, int flags, glob_t *pglob) { | ||
45 | int k; | ||
46 | |||
47 | +#ifdef GLOB_ALTDIRFUNC | ||
48 | /* We want to set GLOB_ALTDIRFUNC ourselves, don't allow it to be set. */ | ||
49 | assert(!(flags & GLOB_ALTDIRFUNC)); | ||
50 | |||
51 | @@ -32,9 +39,14 @@ int safe_glob(const char *path, int flag | ||
52 | pglob->gl_lstat = lstat; | ||
53 | if (!pglob->gl_stat) | ||
54 | pglob->gl_stat = stat; | ||
55 | +#endif | ||
56 | |||
57 | errno = 0; | ||
58 | +#ifdef GLOB_ALTDIRFUNC | ||
59 | k = glob(path, flags | GLOB_ALTDIRFUNC, NULL, pglob); | ||
60 | +#else | ||
61 | + k = glob(path, flags, NULL, pglob); | ||
62 | +#endif | ||
63 | if (k == GLOB_NOMATCH) | ||
64 | return -ENOENT; | ||
65 | if (k == GLOB_NOSPACE) | ||
66 | Index: systemd-stable/src/test/test-glob-util.c | ||
67 | =================================================================== | ||
68 | --- systemd-stable.orig/src/test/test-glob-util.c | ||
69 | +++ systemd-stable/src/test/test-glob-util.c | ||
70 | @@ -12,6 +12,12 @@ | ||
71 | #include "rm-rf.h" | ||
72 | #include "tmpfile-util.h" | ||
73 | |||
74 | +/* Don't fail if the standard library | ||
75 | + * doesn't provide brace expansion */ | ||
76 | +#ifndef GLOB_BRACE | ||
77 | +#define GLOB_BRACE 0 | ||
78 | +#endif | ||
79 | + | ||
80 | static void test_glob_exists(void) { | ||
81 | char name[] = "/tmp/test-glob_exists.XXXXXX"; | ||
82 | int fd = -1; | ||
83 | @@ -39,11 +45,13 @@ static void test_glob_no_dot(void) { | ||
84 | const char *fn; | ||
85 | |||
86 | _cleanup_globfree_ glob_t g = { | ||
87 | +#ifdef GLOB_ALTDIRFUNC | ||
88 | .gl_closedir = closedir_wrapper, | ||
89 | .gl_readdir = (struct dirent *(*)(void *)) readdir_no_dot, | ||
90 | .gl_opendir = (void *(*)(const char *)) opendir, | ||
91 | .gl_lstat = lstat, | ||
92 | .gl_stat = stat, | ||
93 | +#endif | ||
94 | }; | ||
95 | |||
96 | int r; | ||
97 | @@ -51,11 +59,19 @@ static void test_glob_no_dot(void) { | ||
98 | assert_se(mkdtemp(template)); | ||
99 | |||
100 | fn = strjoina(template, "/*"); | ||
101 | +#ifdef GLOB_ALTDIRFUNC | ||
102 | r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); | ||
103 | +#else | ||
104 | + r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); | ||
105 | +#endif | ||
106 | assert_se(r == GLOB_NOMATCH); | ||
107 | |||
108 | fn = strjoina(template, "/.*"); | ||
109 | +#ifdef GLOB_ALTDIRFUNC | ||
110 | r = glob(fn, GLOB_NOSORT|GLOB_BRACE|GLOB_ALTDIRFUNC, NULL, &g); | ||
111 | +#else | ||
112 | + r = glob(fn, GLOB_NOSORT|GLOB_BRACE, NULL, &g); | ||
113 | +#endif | ||
114 | assert_se(r == GLOB_NOMATCH); | ||
115 | |||
116 | (void) rm_rf(template, REMOVE_ROOT|REMOVE_PHYSICAL); | ||
117 | Index: systemd-stable/src/tmpfiles/tmpfiles.c | ||
118 | =================================================================== | ||
119 | --- systemd-stable.orig/src/tmpfiles/tmpfiles.c | ||
120 | +++ systemd-stable/src/tmpfiles/tmpfiles.c | ||
121 | @@ -59,6 +59,12 @@ | ||
122 | #include "umask-util.h" | ||
123 | #include "user-util.h" | ||
124 | |||
125 | +/* Don't fail if the standard library | ||
126 | + * doesn't provide brace expansion */ | ||
127 | +#ifndef GLOB_BRACE | ||
128 | +#define GLOB_BRACE 0 | ||
129 | +#endif | ||
130 | + | ||
131 | /* This reads all files listed in /etc/tmpfiles.d/?*.conf and creates | ||
132 | * them in the file system. This is intended to be used to create | ||
133 | * properly owned directories beneath /tmp, /var/tmp, /run, which are | ||
134 | @@ -1867,7 +1873,9 @@ finish: | ||
135 | |||
136 | static int glob_item(Item *i, action_t action) { | ||
137 | _cleanup_globfree_ glob_t g = { | ||
138 | +#ifdef GLOB_ALTDIRFUNC | ||
139 | .gl_opendir = (void *(*)(const char *)) opendir_nomod, | ||
140 | +#endif | ||
141 | }; | ||
142 | int r = 0, k; | ||
143 | char **fn; | ||
144 | @@ -1887,7 +1895,9 @@ static int glob_item(Item *i, action_t a | ||
145 | |||
146 | static int glob_item_recursively(Item *i, fdaction_t action) { | ||
147 | _cleanup_globfree_ glob_t g = { | ||
148 | +#ifdef GLOB_ALTDIRFUNC | ||
149 | .gl_opendir = (void *(*)(const char *)) opendir_nomod, | ||
150 | +#endif | ||
151 | }; | ||
152 | int r = 0, k; | ||
153 | char **fn; | ||