1 |
mgorny 13/07/31 22:23:50 |
2 |
|
3 |
Added: |
4 |
206-0001-logind-update-state-file-after-generating-the-sessio.patch |
5 |
206-0004-tmpfiles-introduce-exclude-prefix.patch |
6 |
206-0005-tmpfiles-setup-exclude-dev-prefixes-files.patch |
7 |
206-0002-Add-usr-share-keymaps-to-localectl-supported-locatio.patch |
8 |
206-0003-tmpfiles-support-passing-prefix-multiple-times.patch |
9 |
Log: |
10 |
Fix gnome-shell<->logind race condition, bug #477954. Fix missing keymap location, bug #474946. Fix broken device permissions due to static-nodes, bug #478198. Check for CONFIG_AUDITSYSCALL, bug #478032. Add >=binutils-2.32.1 dep, bug #479038. |
11 |
|
12 |
(Portage version: 2.2.0_alpha191/cvs/Linux x86_64, signed Manifest commit with key 9627F456F9DA7643!) |
13 |
|
14 |
Revision Changes Path |
15 |
1.1 sys-apps/systemd/files/206-0001-logind-update-state-file-after-generating-the-sessio.patch |
16 |
|
17 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0001-logind-update-state-file-after-generating-the-sessio.patch?rev=1.1&view=markup |
18 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0001-logind-update-state-file-after-generating-the-sessio.patch?rev=1.1&content-type=text/plain |
19 |
|
20 |
Index: 206-0001-logind-update-state-file-after-generating-the-sessio.patch |
21 |
=================================================================== |
22 |
From a7ca0f06aaa0e0ae3b5eada2cdece8c9766bff1a Mon Sep 17 00:00:00 2001 |
23 |
From: Lennart Poettering <lennart@××××××××××.net> |
24 |
Date: Fri, 26 Jul 2013 17:32:19 +0200 |
25 |
Subject: [PATCH 1/5] logind: update state file after generating the session |
26 |
fifo, not before |
27 |
|
28 |
https://bugs.freedesktop.org/show_bug.cgi?id=67273 |
29 |
--- |
30 |
src/login/logind-dbus.c | 7 ++++++- |
31 |
src/login/logind-session-dbus.c | 4 ++++ |
32 |
src/machine/machined-dbus.c | 3 ++- |
33 |
3 files changed, 12 insertions(+), 2 deletions(-) |
34 |
|
35 |
diff --git a/src/login/logind-dbus.c b/src/login/logind-dbus.c |
36 |
index 39af637..b5e975a 100644 |
37 |
--- a/src/login/logind-dbus.c |
38 |
+++ b/src/login/logind-dbus.c |
39 |
@@ -643,6 +643,10 @@ static int bus_manager_create_session(Manager *m, DBusMessage *message) { |
40 |
|
41 |
session->create_message = dbus_message_ref(message); |
42 |
|
43 |
+ /* Now, let's wait until the slice unit and stuff got |
44 |
+ * created. We send the reply back from |
45 |
+ * session_send_create_reply().*/ |
46 |
+ |
47 |
return 0; |
48 |
|
49 |
fail: |
50 |
@@ -2356,7 +2360,6 @@ DBusHandlerResult bus_message_filter( |
51 |
if (streq_ptr(path, s->scope_job)) { |
52 |
free(s->scope_job); |
53 |
s->scope_job = NULL; |
54 |
- session_save(s); |
55 |
|
56 |
if (s->started) { |
57 |
if (streq(result, "done")) |
58 |
@@ -2366,6 +2369,8 @@ DBusHandlerResult bus_message_filter( |
59 |
session_send_create_reply(s, &error); |
60 |
} |
61 |
} |
62 |
+ |
63 |
+ session_save(s); |
64 |
} |
65 |
|
66 |
session_add_to_gc_queue(s); |
67 |
diff --git a/src/login/logind-session-dbus.c b/src/login/logind-session-dbus.c |
68 |
index 62b9ffd..210f756 100644 |
69 |
--- a/src/login/logind-session-dbus.c |
70 |
+++ b/src/login/logind-session-dbus.c |
71 |
@@ -535,6 +535,10 @@ int session_send_create_reply(Session *s, DBusError *error) { |
72 |
if (!s->create_message) |
73 |
return 0; |
74 |
|
75 |
+ /* This is called after the session scope was successfully |
76 |
+ * created, and finishes where bus_manager_create_session() |
77 |
+ * left off. */ |
78 |
+ |
79 |
if (error) { |
80 |
DBusError buffer; |
81 |
|
82 |
diff --git a/src/machine/machined-dbus.c b/src/machine/machined-dbus.c |
83 |
index 1e8bc60..6c4d50b 100644 |
84 |
--- a/src/machine/machined-dbus.c |
85 |
+++ b/src/machine/machined-dbus.c |
86 |
@@ -543,7 +543,6 @@ DBusHandlerResult bus_message_filter( |
87 |
if (streq_ptr(path, mm->scope_job)) { |
88 |
free(mm->scope_job); |
89 |
mm->scope_job = NULL; |
90 |
- machine_save(mm); |
91 |
|
92 |
if (mm->started) { |
93 |
if (streq(result, "done")) |
94 |
@@ -553,6 +552,8 @@ DBusHandlerResult bus_message_filter( |
95 |
machine_send_create_reply(mm, &error); |
96 |
} |
97 |
} |
98 |
+ |
99 |
+ machine_save(mm); |
100 |
} |
101 |
|
102 |
machine_add_to_gc_queue(mm); |
103 |
-- |
104 |
1.8.3.2 |
105 |
|
106 |
|
107 |
|
108 |
|
109 |
1.1 sys-apps/systemd/files/206-0004-tmpfiles-introduce-exclude-prefix.patch |
110 |
|
111 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0004-tmpfiles-introduce-exclude-prefix.patch?rev=1.1&view=markup |
112 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0004-tmpfiles-introduce-exclude-prefix.patch?rev=1.1&content-type=text/plain |
113 |
|
114 |
Index: 206-0004-tmpfiles-introduce-exclude-prefix.patch |
115 |
=================================================================== |
116 |
From 059e02a48e58da81591ebd34e87f928269d77929 Mon Sep 17 00:00:00 2001 |
117 |
From: Dave Reisner <dreisner@×××××××××.org> |
118 |
Date: Wed, 24 Jul 2013 11:19:24 -0400 |
119 |
Subject: [PATCH 4/5] tmpfiles: introduce --exclude-prefix |
120 |
|
121 |
The opposite of --prefix, allows specifying path prefixes which should |
122 |
be skipped when processing rules. |
123 |
--- |
124 |
man/systemd-tmpfiles.xml | 7 +++++ |
125 |
shell-completion/systemd-zsh-completion.zsh | 1 + |
126 |
src/tmpfiles/tmpfiles.c | 44 ++++++++++++++++++----------- |
127 |
3 files changed, 36 insertions(+), 16 deletions(-) |
128 |
|
129 |
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml |
130 |
index b0f2d9c..403592d 100644 |
131 |
--- a/man/systemd-tmpfiles.xml |
132 |
+++ b/man/systemd-tmpfiles.xml |
133 |
@@ -124,6 +124,13 @@ |
134 |
prefix. This option can be specified |
135 |
multiple times.</para></listitem> |
136 |
</varlistentry> |
137 |
+ <varlistentry> |
138 |
+ <term><option>--exclude-prefix=PATH</option></term> |
139 |
+ <listitem><para>Ignore rules that |
140 |
+ apply to paths with the specified |
141 |
+ prefix. This option can be specified |
142 |
+ multiple times.</para></listitem> |
143 |
+ </varlistentry> |
144 |
|
145 |
|
146 |
<varlistentry> |
147 |
diff --git a/shell-completion/systemd-zsh-completion.zsh b/shell-completion/systemd-zsh-completion.zsh |
148 |
index c85e00e..7aebbcd 100644 |
149 |
--- a/shell-completion/systemd-zsh-completion.zsh |
150 |
+++ b/shell-completion/systemd-zsh-completion.zsh |
151 |
@@ -249,6 +249,7 @@ _ctls() |
152 |
'--clean[Clean up all files and directories with an age parameter configured.]' \ |
153 |
'--remove[All files and directories marked with r, R in the configuration files are removed.]' \ |
154 |
'--prefix=[Only apply rules that apply to paths with the specified prefix.]' \ |
155 |
+ '--exclude-prefix=[Ignore rules that apply to paths with the specified prefix.]' \ |
156 |
'--help[Prints a short help text and exits.]' \ |
157 |
'*::files:_files' |
158 |
;; |
159 |
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c |
160 |
index cb15133..5eca82a 100644 |
161 |
--- a/src/tmpfiles/tmpfiles.c |
162 |
+++ b/src/tmpfiles/tmpfiles.c |
163 |
@@ -106,6 +106,7 @@ static bool arg_clean = false; |
164 |
static bool arg_remove = false; |
165 |
|
166 |
static char **include_prefixes = NULL; |
167 |
+static char **exclude_prefixes = NULL; |
168 |
|
169 |
static const char conf_file_dirs[] = |
170 |
"/etc/tmpfiles.d\0" |
171 |
@@ -1021,16 +1022,19 @@ static bool item_equal(Item *a, Item *b) { |
172 |
static bool should_include_path(const char *path) { |
173 |
char **prefix; |
174 |
|
175 |
- /* no explicit paths specified for inclusion, so everything is valid */ |
176 |
- if (strv_length(include_prefixes) == 0) |
177 |
- return true; |
178 |
+ STRV_FOREACH(prefix, exclude_prefixes) { |
179 |
+ if (path_startswith(path, *prefix)) |
180 |
+ return false; |
181 |
+ } |
182 |
|
183 |
STRV_FOREACH(prefix, include_prefixes) { |
184 |
if (path_startswith(path, *prefix)) |
185 |
return true; |
186 |
} |
187 |
|
188 |
- return false; |
189 |
+ /* no matches, so we should include this path only if we |
190 |
+ * have no whitelist at all */ |
191 |
+ return strv_length(include_prefixes) == 0; |
192 |
} |
193 |
|
194 |
static int parse_line(const char *fname, unsigned line, const char *buffer) { |
195 |
@@ -1219,11 +1223,12 @@ static int help(void) { |
196 |
|
197 |
printf("%s [OPTIONS...] [CONFIGURATION FILE...]\n\n" |
198 |
"Creates, deletes and cleans up volatile and temporary files and directories.\n\n" |
199 |
- " -h --help Show this help\n" |
200 |
- " --create Create marked files/directories\n" |
201 |
- " --clean Clean up marked directories\n" |
202 |
- " --remove Remove marked files/directories\n" |
203 |
- " --prefix=PATH Only apply rules that apply to paths with the specified prefix\n", |
204 |
+ " -h --help Show this help\n" |
205 |
+ " --create Create marked files/directories\n" |
206 |
+ " --clean Clean up marked directories\n" |
207 |
+ " --remove Remove marked files/directories\n" |
208 |
+ " --prefix=PATH Only apply rules that apply to paths with the specified prefix\n" |
209 |
+ " --exclude-prefix=PATH Ignore rules that apply to paths with the specified prefix\n", |
210 |
program_invocation_short_name); |
211 |
|
212 |
return 0; |
213 |
@@ -1235,16 +1240,18 @@ static int parse_argv(int argc, char *argv[]) { |
214 |
ARG_CREATE, |
215 |
ARG_CLEAN, |
216 |
ARG_REMOVE, |
217 |
- ARG_PREFIX |
218 |
+ ARG_PREFIX, |
219 |
+ ARG_EXCLUDE_PREFIX, |
220 |
}; |
221 |
|
222 |
static const struct option options[] = { |
223 |
- { "help", no_argument, NULL, 'h' }, |
224 |
- { "create", no_argument, NULL, ARG_CREATE }, |
225 |
- { "clean", no_argument, NULL, ARG_CLEAN }, |
226 |
- { "remove", no_argument, NULL, ARG_REMOVE }, |
227 |
- { "prefix", required_argument, NULL, ARG_PREFIX }, |
228 |
- { NULL, 0, NULL, 0 } |
229 |
+ { "help", no_argument, NULL, 'h' }, |
230 |
+ { "create", no_argument, NULL, ARG_CREATE }, |
231 |
+ { "clean", no_argument, NULL, ARG_CLEAN }, |
232 |
+ { "remove", no_argument, NULL, ARG_REMOVE }, |
233 |
+ { "prefix", required_argument, NULL, ARG_PREFIX }, |
234 |
+ { "exclude-prefix", required_argument, NULL, ARG_EXCLUDE_PREFIX }, |
235 |
+ { NULL, 0, NULL, 0 } |
236 |
}; |
237 |
|
238 |
int c; |
239 |
@@ -1277,6 +1284,11 @@ static int parse_argv(int argc, char *argv[]) { |
240 |
return log_oom(); |
241 |
break; |
242 |
|
243 |
+ case ARG_EXCLUDE_PREFIX: |
244 |
+ if (strv_extend(&exclude_prefixes, optarg) < 0) |
245 |
+ return log_oom(); |
246 |
+ break; |
247 |
+ |
248 |
case '?': |
249 |
return -EINVAL; |
250 |
|
251 |
-- |
252 |
1.8.3.2 |
253 |
|
254 |
|
255 |
|
256 |
|
257 |
1.1 sys-apps/systemd/files/206-0005-tmpfiles-setup-exclude-dev-prefixes-files.patch |
258 |
|
259 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0005-tmpfiles-setup-exclude-dev-prefixes-files.patch?rev=1.1&view=markup |
260 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0005-tmpfiles-setup-exclude-dev-prefixes-files.patch?rev=1.1&content-type=text/plain |
261 |
|
262 |
Index: 206-0005-tmpfiles-setup-exclude-dev-prefixes-files.patch |
263 |
=================================================================== |
264 |
From a7b85011f13bf2a90cfcfad1f3d2ca2deebaa2f1 Mon Sep 17 00:00:00 2001 |
265 |
From: Dave Reisner <dreisner@×××××××××.org> |
266 |
Date: Wed, 24 Jul 2013 11:58:35 -0400 |
267 |
Subject: [PATCH 5/5] tmpfiles-setup: exclude /dev prefixes files |
268 |
|
269 |
Fixes Arch Linux bug: https://bugs.archlinux.org/task/36259 |
270 |
--- |
271 |
units/systemd-tmpfiles-setup.service.in | 2 +- |
272 |
1 file changed, 1 insertion(+), 1 deletion(-) |
273 |
|
274 |
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in |
275 |
index 67c7d4a..6f98063 100644 |
276 |
--- a/units/systemd-tmpfiles-setup.service.in |
277 |
+++ b/units/systemd-tmpfiles-setup.service.in |
278 |
@@ -21,4 +21,4 @@ ConditionDirectoryNotEmpty=|/run/tmpfiles.d |
279 |
[Service] |
280 |
Type=oneshot |
281 |
RemainAfterExit=yes |
282 |
-ExecStart=@rootbindir@/systemd-tmpfiles --create --remove |
283 |
+ExecStart=@rootbindir@/systemd-tmpfiles --create --remove --exclude-prefix=/dev |
284 |
-- |
285 |
1.8.3.2 |
286 |
|
287 |
|
288 |
|
289 |
|
290 |
1.1 sys-apps/systemd/files/206-0002-Add-usr-share-keymaps-to-localectl-supported-locatio.patch |
291 |
|
292 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0002-Add-usr-share-keymaps-to-localectl-supported-locatio.patch?rev=1.1&view=markup |
293 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0002-Add-usr-share-keymaps-to-localectl-supported-locatio.patch?rev=1.1&content-type=text/plain |
294 |
|
295 |
Index: 206-0002-Add-usr-share-keymaps-to-localectl-supported-locatio.patch |
296 |
=================================================================== |
297 |
From 64fa15a7ca9c276d28413567c74a1d360fbdc975 Mon Sep 17 00:00:00 2001 |
298 |
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
299 |
Date: Wed, 31 Jul 2013 23:12:17 +0200 |
300 |
Subject: [PATCH 2/5] Add /usr/share/keymaps to localectl supported locations. |
301 |
|
302 |
This is the standard upstream location where kbd installs keymaps. |
303 |
--- |
304 |
src/locale/localectl.c | 1 + |
305 |
1 file changed, 1 insertion(+) |
306 |
|
307 |
diff --git a/src/locale/localectl.c b/src/locale/localectl.c |
308 |
index cd7356a..8259c0a 100644 |
309 |
--- a/src/locale/localectl.c |
310 |
+++ b/src/locale/localectl.c |
311 |
@@ -538,6 +538,7 @@ static int list_vconsole_keymaps(DBusConnection *bus, char **args, unsigned n) { |
312 |
if (!keymaps) |
313 |
return log_oom(); |
314 |
|
315 |
+ nftw("/usr/share/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); |
316 |
nftw("/usr/share/kbd/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); |
317 |
nftw("/usr/lib/kbd/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); |
318 |
nftw("/lib/kbd/keymaps/", nftw_cb, 20, FTW_MOUNT|FTW_PHYS); |
319 |
-- |
320 |
1.8.3.2 |
321 |
|
322 |
|
323 |
|
324 |
|
325 |
1.1 sys-apps/systemd/files/206-0003-tmpfiles-support-passing-prefix-multiple-times.patch |
326 |
|
327 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0003-tmpfiles-support-passing-prefix-multiple-times.patch?rev=1.1&view=markup |
328 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/systemd/files/206-0003-tmpfiles-support-passing-prefix-multiple-times.patch?rev=1.1&content-type=text/plain |
329 |
|
330 |
Index: 206-0003-tmpfiles-support-passing-prefix-multiple-times.patch |
331 |
=================================================================== |
332 |
From 9c26db4da7a474b024fcdc97ea490280d86777e1 Mon Sep 17 00:00:00 2001 |
333 |
From: Dave Reisner <dreisner@×××××××××.org> |
334 |
Date: Wed, 24 Jul 2013 11:10:05 -0400 |
335 |
Subject: [PATCH 3/5] tmpfiles: support passing --prefix multiple times |
336 |
|
337 |
--- |
338 |
man/systemd-tmpfiles.xml | 3 ++- |
339 |
src/tmpfiles/tmpfiles.c | 24 +++++++++++++++++++++--- |
340 |
2 files changed, 23 insertions(+), 4 deletions(-) |
341 |
|
342 |
diff --git a/man/systemd-tmpfiles.xml b/man/systemd-tmpfiles.xml |
343 |
index 405a9f1..b0f2d9c 100644 |
344 |
--- a/man/systemd-tmpfiles.xml |
345 |
+++ b/man/systemd-tmpfiles.xml |
346 |
@@ -121,7 +121,8 @@ |
347 |
<term><option>--prefix=PATH</option></term> |
348 |
<listitem><para>Only apply rules that |
349 |
apply to paths with the specified |
350 |
- prefix.</para></listitem> |
351 |
+ prefix. This option can be specified |
352 |
+ multiple times.</para></listitem> |
353 |
</varlistentry> |
354 |
|
355 |
|
356 |
diff --git a/src/tmpfiles/tmpfiles.c b/src/tmpfiles/tmpfiles.c |
357 |
index eae993e..cb15133 100644 |
358 |
--- a/src/tmpfiles/tmpfiles.c |
359 |
+++ b/src/tmpfiles/tmpfiles.c |
360 |
@@ -105,7 +105,7 @@ static bool arg_create = false; |
361 |
static bool arg_clean = false; |
362 |
static bool arg_remove = false; |
363 |
|
364 |
-static const char *arg_prefix = NULL; |
365 |
+static char **include_prefixes = NULL; |
366 |
|
367 |
static const char conf_file_dirs[] = |
368 |
"/etc/tmpfiles.d\0" |
369 |
@@ -1018,6 +1018,21 @@ static bool item_equal(Item *a, Item *b) { |
370 |
return true; |
371 |
} |
372 |
|
373 |
+static bool should_include_path(const char *path) { |
374 |
+ char **prefix; |
375 |
+ |
376 |
+ /* no explicit paths specified for inclusion, so everything is valid */ |
377 |
+ if (strv_length(include_prefixes) == 0) |
378 |
+ return true; |
379 |
+ |
380 |
+ STRV_FOREACH(prefix, include_prefixes) { |
381 |
+ if (path_startswith(path, *prefix)) |
382 |
+ return true; |
383 |
+ } |
384 |
+ |
385 |
+ return false; |
386 |
+} |
387 |
+ |
388 |
static int parse_line(const char *fname, unsigned line, const char *buffer) { |
389 |
_cleanup_item_free_ Item *i = NULL; |
390 |
Item *existing; |
391 |
@@ -1119,7 +1134,7 @@ static int parse_line(const char *fname, unsigned line, const char *buffer) { |
392 |
|
393 |
path_kill_slashes(i->path); |
394 |
|
395 |
- if (arg_prefix && !path_startswith(i->path, arg_prefix)) |
396 |
+ if (!should_include_path(i->path)) |
397 |
return 0; |
398 |
|
399 |
if (user && !streq(user, "-")) { |
400 |
@@ -1258,7 +1273,8 @@ static int parse_argv(int argc, char *argv[]) { |
401 |
break; |
402 |
|
403 |
case ARG_PREFIX: |
404 |
- arg_prefix = optarg; |
405 |
+ if (strv_extend(&include_prefixes, optarg) < 0) |
406 |
+ return log_oom(); |
407 |
break; |
408 |
|
409 |
case '?': |
410 |
@@ -1423,6 +1439,8 @@ finish: |
411 |
hashmap_free(items); |
412 |
hashmap_free(globs); |
413 |
|
414 |
+ strv_free(include_prefixes); |
415 |
+ |
416 |
set_free_free(unix_sockets); |
417 |
|
418 |
label_finish(); |
419 |
-- |
420 |
1.8.3.2 |