diff options
author | Andreas Müller <schnitzeltony@googlemail.com> | 2013-05-13 17:13:25 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-05-19 09:37:34 +0200 |
commit | 3d381d8e1f851cff64524bef953fb93d35879db3 (patch) | |
tree | 120a0ab07c4842c9d63327e49996520659128277 | |
parent | 35e9de7c662ee5292a3b4cf424ed6db2596a1bec (diff) | |
download | meta-openembedded-3d381d8e1f851cff64524bef953fb93d35879db3.tar.gz |
xfce4-session: update to 4.10.1
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch | 482 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Handle-multiple-interactive-session-save-bug-5379.patch | 152 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-configure.in-hard-code-path-to-iceauth.patch (renamed from meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0003-configure.in-hard-code-path-to-iceauth.patch) | 10 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch | 82 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.1.bb (renamed from meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb) | 11 |
5 files changed, 9 insertions, 728 deletions
diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch deleted file mode 100644 index ca5c36222..000000000 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch +++ /dev/null | |||
@@ -1,482 +0,0 @@ | |||
1 | From ae28aef315a7a6b90f1649ce6d1f30b842791cbf Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Schermer <nick@xfce.org> | ||
3 | Date: Sun, 4 Nov 2012 21:23:36 +0100 | ||
4 | Subject: [PATCH] Add shutdown/reboot functionality for systemd (bug #8729). | ||
5 | |||
6 | Based on patch by Christian Hesse and Evangelos Foutras. | ||
7 | |||
8 | Upstream-Status: backport | ||
9 | --- | ||
10 | configure.in | 4 + | ||
11 | xfce4-session/Makefile.am | 14 ++- | ||
12 | xfce4-session/xfsm-shutdown.c | 35 ++++++- | ||
13 | xfce4-session/xfsm-systemd.c | 229 +++++++++++++++++++++++++++++++++++++++++ | ||
14 | xfce4-session/xfsm-systemd.h | 55 ++++++++++ | ||
15 | 5 files changed, 333 insertions(+), 4 deletions(-) | ||
16 | create mode 100644 xfce4-session/xfsm-systemd.c | ||
17 | create mode 100644 xfce4-session/xfsm-systemd.h | ||
18 | |||
19 | diff --git a/configure.in b/configure.in | ||
20 | index 9aa4f8f..134d0f7 100644 | ||
21 | --- a/configure.in | ||
22 | +++ b/configure.in | ||
23 | @@ -96,6 +96,10 @@ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0]) | ||
24 | XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) | ||
25 | XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0]) | ||
26 | |||
27 | +dnl Check for polkit / systemd integration | ||
28 | +XDT_CHECK_OPTIONAL_PACKAGE([SYSTEMD], [polkit-gobject-1], [0.100], | ||
29 | + [systemd], [Systemd support (through polit)]) | ||
30 | + | ||
31 | dnl Check for debugging support | ||
32 | XDT_FEATURE_DEBUG([xfsm_debug_default]) | ||
33 | |||
34 | diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am | ||
35 | index c015154..f748b2b 100644 | ||
36 | --- a/xfce4-session/Makefile.am | ||
37 | +++ b/xfce4-session/Makefile.am | ||
38 | @@ -38,8 +38,6 @@ xfce4_session_SOURCES = \ | ||
39 | xfsm-compat-gnome.h \ | ||
40 | xfsm-compat-kde.c \ | ||
41 | xfsm-compat-kde.h \ | ||
42 | - xfsm-consolekit.c \ | ||
43 | - xfsm-consolekit.h \ | ||
44 | xfsm-dns.c \ | ||
45 | xfsm-dns.h \ | ||
46 | xfsm-error.c \ | ||
47 | @@ -65,6 +63,16 @@ xfce4_session_SOURCES = \ | ||
48 | xfsm-upower.c \ | ||
49 | xfsm-upower.h | ||
50 | |||
51 | +if HAVE_SYSTEMD | ||
52 | +xfce4_session_SOURCES += \ | ||
53 | + xfsm-systemd.c \ | ||
54 | + xfsm-systemd.h | ||
55 | +else | ||
56 | +xfce4_session_SOURCES += \ | ||
57 | + xfsm-consolekit.c \ | ||
58 | + xfsm-consolekit.h | ||
59 | +endif | ||
60 | + | ||
61 | xfce4_session_CFLAGS = \ | ||
62 | $(LIBSM_CFLAGS) \ | ||
63 | $(LIBX11_CFLAGS) \ | ||
64 | @@ -72,6 +80,7 @@ xfce4_session_CFLAGS = \ | ||
65 | $(DBUS_CFLAGS) \ | ||
66 | $(DBUS_GLIB_CFLAGS) \ | ||
67 | $(LIBWNCK_CFLAGS) \ | ||
68 | + $(SYSTEMD_CFLAGS) \ | ||
69 | $(XFCONF_CFLAGS) \ | ||
70 | $(GMODULE_CFLAGS) \ | ||
71 | $(PLATFORM_CFLAGS) | ||
72 | @@ -91,6 +100,7 @@ xfce4_session_LDADD = \ | ||
73 | $(DBUS_LIBS) \ | ||
74 | $(DBUS_GLIB_LIBS) \ | ||
75 | $(LIBWNCK_LIBS) \ | ||
76 | + $(SYSTEMD_LIBS) \ | ||
77 | $(XFCONF_LIBS) \ | ||
78 | -lm | ||
79 | |||
80 | diff --git a/xfce4-session/xfsm-shutdown.c b/xfce4-session/xfsm-shutdown.c | ||
81 | index d8757a8..4c483a7 100644 | ||
82 | --- a/xfce4-session/xfsm-shutdown.c | ||
83 | +++ b/xfce4-session/xfsm-shutdown.c | ||
84 | @@ -66,10 +66,13 @@ | ||
85 | #include <xfce4-session/xfsm-fadeout.h> | ||
86 | #include <xfce4-session/xfsm-global.h> | ||
87 | #include <xfce4-session/xfsm-legacy.h> | ||
88 | -#include <xfce4-session/xfsm-consolekit.h> | ||
89 | #include <xfce4-session/xfsm-upower.h> | ||
90 | |||
91 | - | ||
92 | +#ifdef HAVE_SYSTEMD | ||
93 | +#include <xfce4-session/xfsm-systemd.h> | ||
94 | +#else | ||
95 | +#include <xfce4-session/xfsm-consolekit.h> | ||
96 | +#endif | ||
97 | |||
98 | static void xfsm_shutdown_finalize (GObject *object); | ||
99 | static void xfsm_shutdown_sudo_free (XfsmShutdown *shutdown); | ||
100 | @@ -93,7 +96,11 @@ struct _XfsmShutdown | ||
101 | { | ||
102 | GObject __parent__; | ||
103 | |||
104 | +#ifdef HAVE_SYSTEMD | ||
105 | + XfsmSystemd *systemd; | ||
106 | +#else | ||
107 | XfsmConsolekit *consolekit; | ||
108 | +#endif | ||
109 | XfsmUPower *upower; | ||
110 | |||
111 | /* kiosk settings */ | ||
112 | @@ -131,7 +138,11 @@ xfsm_shutdown_init (XfsmShutdown *shutdown) | ||
113 | { | ||
114 | XfceKiosk *kiosk; | ||
115 | |||
116 | +#ifdef HAVE_SYSTEMD | ||
117 | + shutdown->systemd = xfsm_systemd_get (); | ||
118 | +#else | ||
119 | shutdown->consolekit = xfsm_consolekit_get (); | ||
120 | +#endif | ||
121 | shutdown->upower = xfsm_upower_get (); | ||
122 | shutdown->helper_state = SUDO_NOT_INITIAZED; | ||
123 | shutdown->helper_require_password = FALSE; | ||
124 | @@ -150,7 +161,11 @@ xfsm_shutdown_finalize (GObject *object) | ||
125 | { | ||
126 | XfsmShutdown *shutdown = XFSM_SHUTDOWN (object); | ||
127 | |||
128 | +#ifdef HAVE_SYSTEMD | ||
129 | + g_object_unref (G_OBJECT (shutdown->systemd)); | ||
130 | +#else | ||
131 | g_object_unref (G_OBJECT (shutdown->consolekit)); | ||
132 | +#endif | ||
133 | g_object_unref (G_OBJECT (shutdown->upower)); | ||
134 | |||
135 | /* close down helper */ | ||
136 | @@ -641,7 +656,11 @@ xfsm_shutdown_try_restart (XfsmShutdown *shutdown, | ||
137 | if (shutdown->helper_state == SUDO_AVAILABLE) | ||
138 | return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_RESTART, error); | ||
139 | else | ||
140 | +#ifdef HAVE_SYSTEMD | ||
141 | + return xfsm_systemd_try_restart (shutdown->systemd, error); | ||
142 | +#else | ||
143 | return xfsm_consolekit_try_restart (shutdown->consolekit, error); | ||
144 | +#endif | ||
145 | } | ||
146 | |||
147 | |||
148 | @@ -658,7 +677,11 @@ xfsm_shutdown_try_shutdown (XfsmShutdown *shutdown, | ||
149 | if (shutdown->helper_state == SUDO_AVAILABLE) | ||
150 | return xfsm_shutdown_sudo_try_action (shutdown, XFSM_SHUTDOWN_SHUTDOWN, error); | ||
151 | else | ||
152 | +#ifdef HAVE_SYSTEMD | ||
153 | + return xfsm_systemd_try_shutdown (shutdown->systemd, error); | ||
154 | +#else | ||
155 | return xfsm_consolekit_try_shutdown (shutdown->consolekit, error); | ||
156 | +#endif | ||
157 | } | ||
158 | |||
159 | |||
160 | @@ -698,7 +721,11 @@ xfsm_shutdown_can_restart (XfsmShutdown *shutdown, | ||
161 | return TRUE; | ||
162 | } | ||
163 | |||
164 | +#ifdef HAVE_SYSTEMD | ||
165 | + if (xfsm_systemd_can_restart (shutdown->systemd, can_restart, error)) | ||
166 | +#else | ||
167 | if (xfsm_consolekit_can_restart (shutdown->consolekit, can_restart, error)) | ||
168 | +#endif | ||
169 | return TRUE; | ||
170 | |||
171 | if (xfsm_shutdown_sudo_init (shutdown, error)) | ||
172 | @@ -725,7 +752,11 @@ xfsm_shutdown_can_shutdown (XfsmShutdown *shutdown, | ||
173 | return TRUE; | ||
174 | } | ||
175 | |||
176 | +#ifdef HAVE_SYSTEMD | ||
177 | + if (xfsm_systemd_can_shutdown (shutdown->systemd, can_shutdown, error)) | ||
178 | +#else | ||
179 | if (xfsm_consolekit_can_shutdown (shutdown->consolekit, can_shutdown, error)) | ||
180 | +#endif | ||
181 | return TRUE; | ||
182 | |||
183 | if (xfsm_shutdown_sudo_init (shutdown, error)) | ||
184 | diff --git a/xfce4-session/xfsm-systemd.c b/xfce4-session/xfsm-systemd.c | ||
185 | new file mode 100644 | ||
186 | index 0000000..7bdd39d | ||
187 | --- /dev/null | ||
188 | +++ b/xfce4-session/xfsm-systemd.c | ||
189 | @@ -0,0 +1,229 @@ | ||
190 | +/*- | ||
191 | + * Copyright (C) 2012 Christian Hesse | ||
192 | + * | ||
193 | + * This program is free software; you can redistribute it and/or modify | ||
194 | + * it under the terms of the GNU General Public License as published by | ||
195 | + * the Free Software Foundation; either version 2, or (at your option) | ||
196 | + * any later version. | ||
197 | + * | ||
198 | + * This program is distributed in the hope that it will be useful, | ||
199 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
200 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
201 | + * GNU General Public License for more details. | ||
202 | + * | ||
203 | + * You should have received a copy of the GNU General Public License | ||
204 | + * along with this program; if not, write to the Free Software | ||
205 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, | ||
206 | + * MA 02110-1301 USA. | ||
207 | + */ | ||
208 | + | ||
209 | +#include <config.h> | ||
210 | + | ||
211 | +#include <gio/gio.h> | ||
212 | +#include <polkit/polkit.h> | ||
213 | +#include <dbus/dbus-glib.h> | ||
214 | +#include <dbus/dbus-glib-lowlevel.h> | ||
215 | + | ||
216 | +#include <xfce4-session/xfsm-systemd.h> | ||
217 | + | ||
218 | + | ||
219 | + | ||
220 | +#define SYSTEMD_DBUS_NAME "org.freedesktop.login1" | ||
221 | +#define SYSTEMD_DBUS_PATH "/org/freedesktop/login1" | ||
222 | +#define SYSTEMD_DBUS_INTERFACE "org.freedesktop.login1.Manager" | ||
223 | +#define SYSTEMD_REBOOT_ACTION "Reboot" | ||
224 | +#define SYSTEMD_POWEROFF_ACTION "PowerOff" | ||
225 | +#define SYSTEMD_REBOOT_TEST "org.freedesktop.login1.reboot" | ||
226 | +#define SYSTEMD_POWEROFF_TEST "org.freedesktop.login1.power-off" | ||
227 | + | ||
228 | + | ||
229 | + | ||
230 | +static void xfsm_systemd_finalize (GObject *object); | ||
231 | + | ||
232 | + | ||
233 | + | ||
234 | +struct _XfsmSystemdClass | ||
235 | +{ | ||
236 | + GObjectClass __parent__; | ||
237 | +}; | ||
238 | + | ||
239 | +struct _XfsmSystemd | ||
240 | +{ | ||
241 | + GObject __parent__; | ||
242 | + | ||
243 | + PolkitAuthority *authority; | ||
244 | + PolkitSubject *subject; | ||
245 | +}; | ||
246 | + | ||
247 | + | ||
248 | + | ||
249 | +G_DEFINE_TYPE (XfsmSystemd, xfsm_systemd, G_TYPE_OBJECT) | ||
250 | + | ||
251 | + | ||
252 | + | ||
253 | +static void | ||
254 | +xfsm_systemd_class_init (XfsmSystemdClass *klass) | ||
255 | +{ | ||
256 | + GObjectClass *gobject_class; | ||
257 | + | ||
258 | + gobject_class = G_OBJECT_CLASS (klass); | ||
259 | + gobject_class->finalize = xfsm_systemd_finalize; | ||
260 | +} | ||
261 | + | ||
262 | + | ||
263 | + | ||
264 | +static void | ||
265 | +xfsm_systemd_init (XfsmSystemd *systemd) | ||
266 | +{ | ||
267 | + systemd->authority = polkit_authority_get_sync (NULL, NULL); | ||
268 | + systemd->subject = polkit_unix_process_new (getpid()); | ||
269 | +} | ||
270 | + | ||
271 | + | ||
272 | + | ||
273 | +static void | ||
274 | +xfsm_systemd_finalize (GObject *object) | ||
275 | +{ | ||
276 | + XfsmSystemd *systemd = XFSM_SYSTEMD (object); | ||
277 | + | ||
278 | + g_object_unref (G_OBJECT (systemd->authority)); | ||
279 | + g_object_unref (G_OBJECT (systemd->subject)); | ||
280 | + | ||
281 | + (*G_OBJECT_CLASS (xfsm_systemd_parent_class)->finalize) (object); | ||
282 | +} | ||
283 | + | ||
284 | + | ||
285 | +static gboolean | ||
286 | +xfsm_systemd_can_method (XfsmSystemd *systemd, | ||
287 | + gboolean *can_method, | ||
288 | + const gchar *method, | ||
289 | + GError **error) | ||
290 | +{ | ||
291 | + PolkitAuthorizationResult *res; | ||
292 | + GError *local_error = NULL; | ||
293 | + | ||
294 | + *can_method = FALSE; | ||
295 | + | ||
296 | + res = polkit_authority_check_authorization_sync (systemd->authority, | ||
297 | + systemd->subject, | ||
298 | + method, | ||
299 | + NULL, | ||
300 | + POLKIT_CHECK_AUTHORIZATION_FLAGS_NONE, | ||
301 | + NULL, | ||
302 | + &local_error); | ||
303 | + | ||
304 | + if (res == NULL) | ||
305 | + { | ||
306 | + g_propagate_error (error, local_error); | ||
307 | + return FALSE; | ||
308 | + } | ||
309 | + | ||
310 | + *can_method = polkit_authorization_result_get_is_authorized (res) | ||
311 | + || polkit_authorization_result_get_is_challenge (res); | ||
312 | + | ||
313 | + g_object_unref (G_OBJECT (res)); | ||
314 | + | ||
315 | + return TRUE; | ||
316 | +} | ||
317 | + | ||
318 | + | ||
319 | + | ||
320 | +static gboolean | ||
321 | +xfsm_systemd_try_method (XfsmSystemd *systemd, | ||
322 | + const gchar *method, | ||
323 | + GError **error) | ||
324 | +{ | ||
325 | + GDBusConnection *bus; | ||
326 | + GError *local_error = NULL; | ||
327 | + | ||
328 | + bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, error); | ||
329 | + if (G_UNLIKELY (bus == NULL)) | ||
330 | + return FALSE; | ||
331 | + | ||
332 | + g_dbus_connection_call_sync (bus, | ||
333 | + SYSTEMD_DBUS_NAME, | ||
334 | + SYSTEMD_DBUS_PATH, | ||
335 | + SYSTEMD_DBUS_INTERFACE, | ||
336 | + method, | ||
337 | + g_variant_new ("(b)", TRUE), | ||
338 | + NULL, 0, G_MAXINT, NULL, | ||
339 | + &local_error); | ||
340 | + | ||
341 | + g_object_unref (G_OBJECT (bus)); | ||
342 | + | ||
343 | + if (local_error != NULL) | ||
344 | + { | ||
345 | + g_propagate_error (error, local_error); | ||
346 | + return FALSE; | ||
347 | + } | ||
348 | + | ||
349 | + return TRUE; | ||
350 | +} | ||
351 | + | ||
352 | + | ||
353 | + | ||
354 | +XfsmSystemd * | ||
355 | +xfsm_systemd_get (void) | ||
356 | +{ | ||
357 | + static XfsmSystemd *object = NULL; | ||
358 | + | ||
359 | + if (G_LIKELY (object != NULL)) | ||
360 | + { | ||
361 | + g_object_ref (G_OBJECT (object)); | ||
362 | + } | ||
363 | + else | ||
364 | + { | ||
365 | + object = g_object_new (XFSM_TYPE_SYSTEMD, NULL); | ||
366 | + g_object_add_weak_pointer (G_OBJECT (object), (gpointer) &object); | ||
367 | + } | ||
368 | + | ||
369 | + return object; | ||
370 | +} | ||
371 | + | ||
372 | + | ||
373 | + | ||
374 | +gboolean | ||
375 | +xfsm_systemd_try_restart (XfsmSystemd *systemd, | ||
376 | + GError **error) | ||
377 | +{ | ||
378 | + return xfsm_systemd_try_method (systemd, | ||
379 | + SYSTEMD_REBOOT_ACTION, | ||
380 | + error); | ||
381 | +} | ||
382 | + | ||
383 | + | ||
384 | + | ||
385 | +gboolean | ||
386 | +xfsm_systemd_try_shutdown (XfsmSystemd *systemd, | ||
387 | + GError **error) | ||
388 | +{ | ||
389 | + return xfsm_systemd_try_method (systemd, | ||
390 | + SYSTEMD_POWEROFF_ACTION, | ||
391 | + error); | ||
392 | +} | ||
393 | + | ||
394 | + | ||
395 | + | ||
396 | +gboolean | ||
397 | +xfsm_systemd_can_restart (XfsmSystemd *systemd, | ||
398 | + gboolean *can_restart, | ||
399 | + GError **error) | ||
400 | +{ | ||
401 | + return xfsm_systemd_can_method (systemd, | ||
402 | + can_restart, | ||
403 | + SYSTEMD_REBOOT_TEST, | ||
404 | + error); | ||
405 | +} | ||
406 | + | ||
407 | + | ||
408 | + | ||
409 | +gboolean | ||
410 | +xfsm_systemd_can_shutdown (XfsmSystemd *systemd, | ||
411 | + gboolean *can_shutdown, | ||
412 | + GError **error) | ||
413 | +{ | ||
414 | + return xfsm_systemd_can_method (systemd, | ||
415 | + can_shutdown, | ||
416 | + SYSTEMD_POWEROFF_TEST, | ||
417 | + error); | ||
418 | +} | ||
419 | diff --git a/xfce4-session/xfsm-systemd.h b/xfce4-session/xfsm-systemd.h | ||
420 | new file mode 100644 | ||
421 | index 0000000..8223622 | ||
422 | --- /dev/null | ||
423 | +++ b/xfce4-session/xfsm-systemd.h | ||
424 | @@ -0,0 +1,55 @@ | ||
425 | +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- | ||
426 | + * | ||
427 | + * Copyright (C) 2012 Christian Hesse | ||
428 | + * | ||
429 | + * Licensed under the GNU General Public License Version 2 | ||
430 | + * | ||
431 | + * This program is free software; you can redistribute it and/or modify | ||
432 | + * it under the terms of the GNU General Public License as published by | ||
433 | + * the Free Software Foundation; either version 2 of the License, or | ||
434 | + * (at your option) any later version. | ||
435 | + * | ||
436 | + * This program is distributed in the hope that it will be useful, | ||
437 | + * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
438 | + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
439 | + * GNU General Public License for more details. | ||
440 | + * | ||
441 | + * You should have received a copy of the GNU General Public License | ||
442 | + * along with this program; if not, write to the Free Software | ||
443 | + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
444 | + */ | ||
445 | + | ||
446 | +#ifndef __XFSM_SYSTEMD_H__ | ||
447 | +#define __XFSM_SYSTEMD_H__ | ||
448 | + | ||
449 | +typedef struct _XfsmSystemdClass XfsmSystemdClass; | ||
450 | +typedef struct _XfsmSystemd XfsmSystemd; | ||
451 | + | ||
452 | +#define XFSM_TYPE_SYSTEMD (xfsm_systemd_get_type ()) | ||
453 | +#define XFSM_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemd)) | ||
454 | +#define XFSM_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), XFSM_TYPE_SYSTEMD, XfsmSystemdClass)) | ||
455 | +#define XFSM_IS_SYSTEMD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), XFSM_TYPE_SYSTEMD)) | ||
456 | +#define XFSM_IS_SYSTEMD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), XFSM_TYPE_SYSTEMD)) | ||
457 | +#define XFSM_SYSTEMD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), XFSM_TYPE_SYSTEMD, XfsmSystemdClass)) | ||
458 | + | ||
459 | +GType xfsm_systemd_get_type (void) G_GNUC_CONST; | ||
460 | + | ||
461 | +XfsmSystemd *xfsm_systemd_get (void); | ||
462 | + | ||
463 | +gboolean xfsm_systemd_try_restart (XfsmSystemd *systemd, | ||
464 | + GError **error); | ||
465 | + | ||
466 | +gboolean xfsm_systemd_try_shutdown (XfsmSystemd *systemd, | ||
467 | + GError **error); | ||
468 | + | ||
469 | +gboolean xfsm_systemd_can_restart (XfsmSystemd *systemd, | ||
470 | + gboolean *can_restart, | ||
471 | + GError **error); | ||
472 | + | ||
473 | +gboolean xfsm_systemd_can_shutdown (XfsmSystemd *systemd, | ||
474 | + gboolean *can_shutdown, | ||
475 | + GError **error); | ||
476 | + | ||
477 | +G_END_DECLS | ||
478 | + | ||
479 | +#endif /* __XFSM_SYSTEMD_H__ */ | ||
480 | -- | ||
481 | 1.7.4.4 | ||
482 | |||
diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Handle-multiple-interactive-session-save-bug-5379.patch b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Handle-multiple-interactive-session-save-bug-5379.patch deleted file mode 100644 index dd9c6d467..000000000 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Handle-multiple-interactive-session-save-bug-5379.patch +++ /dev/null | |||
@@ -1,152 +0,0 @@ | |||
1 | From 9f3077be682355e1cd07e9a9463e76307292208c Mon Sep 17 00:00:00 2001 | ||
2 | From: Dimitar Zhekov <hamster@mbox.contact.bg> | ||
3 | Date: Thu, 30 Aug 2012 22:52:14 +0200 | ||
4 | Subject: [PATCH] Handle multiple interactive session save (bug #5379). | ||
5 | |||
6 | Additionnaly, we now use SmSaveGlobal on log out / shutdown without | ||
7 | session save which avoids data loss. Previously clients would not save | ||
8 | anything on log out without session save. | ||
9 | |||
10 | Based on original work by Chris Bainbridge (chris.bainbridge@gmail.com). | ||
11 | --- | ||
12 | Upstream-Status: applied | ||
13 | xfce4-session/xfsm-manager.c | 81 ++++++++++++++++++++++++----------------- | ||
14 | 1 files changed, 47 insertions(+), 34 deletions(-) | ||
15 | |||
16 | diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c | ||
17 | index bf6a446..35811c5 100644 | ||
18 | --- a/xfce4-session/xfsm-manager.c | ||
19 | +++ b/xfce4-session/xfsm-manager.c | ||
20 | @@ -98,6 +98,7 @@ struct _XfsmManager | ||
21 | |||
22 | XfsmShutdownType shutdown_type; | ||
23 | XfsmShutdown *shutdown_helper; | ||
24 | + gboolean save_session; | ||
25 | |||
26 | gboolean session_chooser; | ||
27 | gchar *session_name; | ||
28 | @@ -230,6 +231,7 @@ xfsm_manager_init (XfsmManager *manager) | ||
29 | manager->failsafe_mode = TRUE; | ||
30 | manager->shutdown_type = XFSM_SHUTDOWN_LOGOUT; | ||
31 | manager->shutdown_helper = xfsm_shutdown_get (); | ||
32 | + manager->save_session = TRUE; | ||
33 | |||
34 | manager->pending_properties = g_queue_new (); | ||
35 | manager->starting_properties = g_queue_new (); | ||
36 | @@ -989,7 +991,9 @@ xfsm_manager_interact (XfsmManager *manager, | ||
37 | XfsmClient *cl = lp->data; | ||
38 | if (xfsm_client_get_state (cl) == XFSM_CLIENT_INTERACTING) | ||
39 | { | ||
40 | - xfsm_client_set_state (cl, XFSM_CLIENT_WAITFORINTERACT); | ||
41 | + /* a client is already interacting, so new client has to wait */ | ||
42 | + xfsm_client_set_state (client, XFSM_CLIENT_WAITFORINTERACT); | ||
43 | + xfsm_manager_cancel_client_save_timeout(manager, client); | ||
44 | return; | ||
45 | } | ||
46 | } | ||
47 | @@ -1138,44 +1142,47 @@ xfsm_manager_save_yourself_global (XfsmManager *manager, | ||
48 | } | ||
49 | } | ||
50 | |||
51 | - if (!shutdown || shutdown_save) | ||
52 | + /* don't save the session if shutting down without save */ | ||
53 | + manager->save_session = !shutdown || shutdown_save; | ||
54 | + | ||
55 | + if (save_type == SmSaveBoth && !manager->save_session) | ||
56 | { | ||
57 | - xfsm_manager_set_state (manager, | ||
58 | - shutdown | ||
59 | - ? XFSM_MANAGER_SHUTDOWN | ||
60 | - : XFSM_MANAGER_CHECKPOINT); | ||
61 | + /* saving the session, so clients should | ||
62 | + * (prompt to) save the user data only */ | ||
63 | + save_type = SmSaveGlobal; | ||
64 | + } | ||
65 | |||
66 | - /* handle legacy applications first! */ | ||
67 | - xfsm_legacy_perform_session_save (); | ||
68 | + xfsm_manager_set_state (manager, | ||
69 | + shutdown | ||
70 | + ? XFSM_MANAGER_SHUTDOWN | ||
71 | + : XFSM_MANAGER_CHECKPOINT); | ||
72 | |||
73 | - for (lp = g_queue_peek_nth_link (manager->running_clients, 0); | ||
74 | - lp; | ||
75 | - lp = lp->next) | ||
76 | - { | ||
77 | - XfsmClient *client = lp->data; | ||
78 | - XfsmProperties *properties = xfsm_client_get_properties (client); | ||
79 | - const gchar *program; | ||
80 | + /* handle legacy applications first! */ | ||
81 | + if (manager->save_session) | ||
82 | + xfsm_legacy_perform_session_save (); | ||
83 | |||
84 | - /* xterm's session management is broken, so we won't | ||
85 | - * send a SAVE YOURSELF to xterms */ | ||
86 | - program = xfsm_properties_get_string (properties, SmProgram); | ||
87 | - if (program != NULL && strcasecmp (program, "xterm") == 0) | ||
88 | - continue; | ||
89 | + for (lp = g_queue_peek_nth_link (manager->running_clients, 0); | ||
90 | + lp; | ||
91 | + lp = lp->next) | ||
92 | + { | ||
93 | + XfsmClient *client = lp->data; | ||
94 | + XfsmProperties *properties = xfsm_client_get_properties (client); | ||
95 | + const gchar *program; | ||
96 | |||
97 | - if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL) | ||
98 | - { | ||
99 | - SmsSaveYourself (xfsm_client_get_sms_connection (client), save_type, shutdown, | ||
100 | - interact_style, fast); | ||
101 | - } | ||
102 | + /* xterm's session management is broken, so we won't | ||
103 | + * send a SAVE YOURSELF to xterms */ | ||
104 | + program = xfsm_properties_get_string (properties, SmProgram); | ||
105 | + if (program != NULL && strcasecmp (program, "xterm") == 0) | ||
106 | + continue; | ||
107 | |||
108 | - xfsm_client_set_state (client, XFSM_CLIENT_SAVING); | ||
109 | - xfsm_manager_start_client_save_timeout (manager, client); | ||
110 | + if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL) | ||
111 | + { | ||
112 | + SmsSaveYourself (xfsm_client_get_sms_connection (client), save_type, shutdown, | ||
113 | + interact_style, fast); | ||
114 | } | ||
115 | - } | ||
116 | - else | ||
117 | - { | ||
118 | - /* shutdown session without saving */ | ||
119 | - xfsm_manager_perform_shutdown (manager); | ||
120 | + | ||
121 | + xfsm_client_set_state (client, XFSM_CLIENT_SAVING); | ||
122 | + xfsm_manager_start_client_save_timeout (manager, client); | ||
123 | } | ||
124 | } | ||
125 | |||
126 | @@ -1249,7 +1256,12 @@ xfsm_manager_save_yourself_done (XfsmManager *manager, | ||
127 | XfsmClient *client, | ||
128 | gboolean success) | ||
129 | { | ||
130 | - if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVING && xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL) | ||
131 | + /* In xfsm_manager_interact_done we send SmsShutdownCancelled to clients in | ||
132 | + XFSM_CLIENT_WAITFORINTERACT state. They respond with SmcSaveYourselfDone | ||
133 | + (xsmp_shutdown_cancelled in libxfce4ui library) so we allow it here. */ | ||
134 | + if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVING && | ||
135 | + xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL && | ||
136 | + xfsm_client_get_state (client) != XFSM_CLIENT_WAITFORINTERACT) | ||
137 | { | ||
138 | xfsm_verbose ("Client Id = %s send SAVE YOURSELF DONE, while not being " | ||
139 | "in save mode. Prepare to be nuked!\n", | ||
140 | @@ -1521,7 +1533,8 @@ xfsm_manager_complete_saveyourself (XfsmManager *manager) | ||
141 | xfsm_verbose ("Manager finished SAVE YOURSELF, session data will be stored now.\n\n"); | ||
142 | |||
143 | /* all clients done, store session data */ | ||
144 | - xfsm_manager_store_session (manager); | ||
145 | + if (manager->save_session) | ||
146 | + xfsm_manager_store_session (manager); | ||
147 | |||
148 | if (manager->state == XFSM_MANAGER_CHECKPOINT) | ||
149 | { | ||
150 | -- | ||
151 | 1.7.4.4 | ||
152 | |||
diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0003-configure.in-hard-code-path-to-iceauth.patch b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-configure.in-hard-code-path-to-iceauth.patch index 41a527c61..d619cde6c 100644 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0003-configure.in-hard-code-path-to-iceauth.patch +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-configure.in-hard-code-path-to-iceauth.patch | |||
@@ -1,7 +1,7 @@ | |||
1 | From a629b051f4e5462150c77b95574bbc7a33bc9666 Mon Sep 17 00:00:00 2001 | 1 | From a629b051f4e5462150c77b95574bbc7a33bc9666 Mon Sep 17 00:00:00 2001 |
2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> | 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> |
3 | Date: Mon, 31 Dec 2012 16:35:29 +0100 | 3 | Date: Mon, 31 Dec 2012 16:35:29 +0100 |
4 | Subject: [PATCH] configure.in: hard code path to iceauth | 4 | Subject: [PATCH] configure.ac: hard code path to iceauth |
5 | MIME-Version: 1.0 | 5 | MIME-Version: 1.0 |
6 | Content-Type: text/plain; charset=UTF-8 | 6 | Content-Type: text/plain; charset=UTF-8 |
7 | Content-Transfer-Encoding: 8bit | 7 | Content-Transfer-Encoding: 8bit |
@@ -13,13 +13,13 @@ Upstream-Status: Inappropriate [config] | |||
13 | 13 | ||
14 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> | 14 | Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com> |
15 | --- | 15 | --- |
16 | configure.in | 8 +------- | 16 | configure.ac | 8 +------- |
17 | 1 files changed, 1 insertions(+), 7 deletions(-) | 17 | 1 files changed, 1 insertions(+), 7 deletions(-) |
18 | 18 | ||
19 | diff --git a/configure.in b/configure.in | 19 | diff --git a/configure.ac b/configure.ac |
20 | index 3cf3510..505e744 100644 | 20 | index 3cf3510..505e744 100644 |
21 | --- a/configure.in | 21 | --- a/configure.ac |
22 | +++ b/configure.in | 22 | +++ b/configure.ac |
23 | @@ -111,13 +111,7 @@ XDT_FEATURE_DEBUG([xfsm_debug_default]) | 23 | @@ -111,13 +111,7 @@ XDT_FEATURE_DEBUG([xfsm_debug_default]) |
24 | dnl Check for linker optimizations | 24 | dnl Check for linker optimizations |
25 | XDT_FEATURE_LINKER_OPTS() | 25 | XDT_FEATURE_LINKER_OPTS() |
diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch deleted file mode 100644 index b26669f6e..000000000 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch +++ /dev/null | |||
@@ -1,82 +0,0 @@ | |||
1 | From 7a75a8a0f7089b716e702e6bb0cf13fc3194e3db Mon Sep 17 00:00:00 2001 | ||
2 | From: Nick Schermer <nick@xfce.org> | ||
3 | Date: Sun, 29 Apr 2012 13:35:37 +0200 | ||
4 | Subject: [PATCH] Remove gnome-keyring remains. | ||
5 | |||
6 | Not required anymore. gnome_keyring_daemon_prepare_environment_sync | ||
7 | is a stub function that does nothing. | ||
8 | |||
9 | Upstream-Status: backport [1] | ||
10 | |||
11 | [1] http://git.xfce.org/xfce/xfce4-session/commit/?id=7a75a8a0f7089b716e702e6bb0cf13fc3194e3db | ||
12 | --- | ||
13 | configure.in | 5 ----- | ||
14 | xfce4-session/Makefile.am | 2 -- | ||
15 | xfce4-session/xfsm-compat-gnome.c | 8 -------- | ||
16 | 3 files changed, 0 insertions(+), 15 deletions(-) | ||
17 | |||
18 | diff --git a/configure.in b/configure.in | ||
19 | index f8684b3..9aa4f8f 100644 | ||
20 | --- a/configure.in | ||
21 | +++ b/configure.in | ||
22 | @@ -96,11 +96,6 @@ XDT_CHECK_PACKAGE([DBUS], [dbus-1], [1.1.0]) | ||
23 | XDT_CHECK_PACKAGE([DBUS_GLIB], [dbus-glib-1], [0.84]) | ||
24 | XDT_CHECK_PACKAGE([XFCONF], [libxfconf-0], [4.9.0]) | ||
25 | |||
26 | -dnl Check for gnome support | ||
27 | -XDT_CHECK_OPTIONAL_PACKAGE([GNOME_KEYRING], [gnome-keyring-1], [2.22], | ||
28 | - [libgnome-keyring], | ||
29 | - [Extra gnome-keyring compatibility support], [no]) | ||
30 | - | ||
31 | dnl Check for debugging support | ||
32 | XDT_FEATURE_DEBUG([xfsm_debug_default]) | ||
33 | |||
34 | diff --git a/xfce4-session/Makefile.am b/xfce4-session/Makefile.am | ||
35 | index 5e8343a..c015154 100644 | ||
36 | --- a/xfce4-session/Makefile.am | ||
37 | +++ b/xfce4-session/Makefile.am | ||
38 | @@ -66,7 +66,6 @@ xfce4_session_SOURCES = \ | ||
39 | xfsm-upower.h | ||
40 | |||
41 | xfce4_session_CFLAGS = \ | ||
42 | - $(GNOME_KEYRING_CFLAGS) \ | ||
43 | $(LIBSM_CFLAGS) \ | ||
44 | $(LIBX11_CFLAGS) \ | ||
45 | $(LIBXFCE4UI_CFLAGS) \ | ||
46 | @@ -93,7 +92,6 @@ xfce4_session_LDADD = \ | ||
47 | $(DBUS_GLIB_LIBS) \ | ||
48 | $(LIBWNCK_LIBS) \ | ||
49 | $(XFCONF_LIBS) \ | ||
50 | - $(GNOME_KEYRING_LIBS) \ | ||
51 | -lm | ||
52 | |||
53 | xfce4_session_DEPENDENCIES = \ | ||
54 | diff --git a/xfce4-session/xfsm-compat-gnome.c b/xfce4-session/xfsm-compat-gnome.c | ||
55 | index b5b4a99..e1fa16f 100644 | ||
56 | --- a/xfce4-session/xfsm-compat-gnome.c | ||
57 | +++ b/xfce4-session/xfsm-compat-gnome.c | ||
58 | @@ -59,10 +59,6 @@ | ||
59 | |||
60 | #include <libxfce4util/libxfce4util.h> | ||
61 | |||
62 | -#ifdef HAVE_GNOME_KEYRING | ||
63 | -#include <gnome-keyring.h> | ||
64 | -#endif | ||
65 | - | ||
66 | #include <xfce4-session/xfsm-compat-gnome.h> | ||
67 | |||
68 | #define GNOME_KEYRING_DAEMON "gnome-keyring-daemon" | ||
69 | @@ -154,10 +150,6 @@ gnome_keyring_daemon_startup (void) | ||
70 | } | ||
71 | |||
72 | g_strfreev (lines); | ||
73 | - | ||
74 | -#ifdef HAVE_GNOME_KEYRING | ||
75 | - gnome_keyring_daemon_prepare_environment_sync (); | ||
76 | -#endif | ||
77 | } | ||
78 | else | ||
79 | { | ||
80 | -- | ||
81 | 1.7.4.4 | ||
82 | |||
diff --git a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.1.bb index bbe92e8cb..f7f4ba0c6 100644 --- a/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.1.bb | |||
@@ -4,16 +4,13 @@ LICENSE = "GPLv2" | |||
4 | LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88" | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=9ac2e7cff1ddaf48b6eab6028f23ef88" |
5 | DEPENDS = "virtual/libx11 libsm libxfce4util libxfce4ui gtk+ libwnck dbus dbus-glib xfconf" | 5 | DEPENDS = "virtual/libx11 libsm libxfce4util libxfce4ui gtk+ libwnck dbus dbus-glib xfconf" |
6 | RDEPENDS_${PN} = "netbase xinit dbus-x11 iceauth upower" | 6 | RDEPENDS_${PN} = "netbase xinit dbus-x11 iceauth upower" |
7 | PR = "r7" | ||
8 | 7 | ||
9 | inherit xfce update-alternatives | 8 | inherit xfce update-alternatives |
10 | 9 | ||
11 | SRC_URI[md5sum] = "4768e1a41a0287af6aad18b329a0f230" | 10 | SRC_URI[md5sum] = "1757657c1d590aa6274b7b7cbba33352" |
12 | SRC_URI[sha256sum] = "bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce" | 11 | SRC_URI[sha256sum] = "0154fabdc398798c3445374ccc52a2f5bcb2d867fc94bc54114395b24f9cfc83" |
13 | SRC_URI += "file://0001-Handle-multiple-interactive-session-save-bug-5379.patch \ | 12 | SRC_URI += " \ |
14 | file://0002-Remove-gnome-keyring-remains.patch \ | 13 | file://0001-configure.in-hard-code-path-to-iceauth.patch \ |
15 | file://0003-configure.in-hard-code-path-to-iceauth.patch \ | ||
16 | file://0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch \ | ||
17 | " | 14 | " |
18 | 15 | ||
19 | ALTERNATIVE_${PN} = "x-session-manager" | 16 | ALTERNATIVE_${PN} = "x-session-manager" |