diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-13 13:53:32 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2013-04-15 16:22:03 +0200 |
commit | 17c747d85e155f3eb2fab97c5a1ad66a68d809bc (patch) | |
tree | 4e9eb7d387bfcc614014110e851359bb1b8832cc /meta-xfce | |
parent | 5f26b009643d8a1a73aecb3aa0b7c5873943e7a1 (diff) | |
download | meta-openembedded-17c747d85e155f3eb2fab97c5a1ad66a68d809bc.tar.gz |
xfce4-session: move systemd support from meta-systemd back to meta-xfce
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-xfce')
-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 (renamed from meta-xfce/recipes-xfce/xfce4-session/files/0001-Handle-multiple-interactive-session-save-bug-5379.patch) | 0 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch (renamed from meta-xfce/recipes-xfce/xfce4-session/files/0002-Remove-gnome-keyring-remains.patch) | 0 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0003-configure.in-hard-code-path-to-iceauth.patch (renamed from meta-xfce/recipes-xfce/xfce4-session/files/0003-configure.in-hard-code-path-to-iceauth.patch) | 0 | ||||
-rw-r--r-- | meta-xfce/recipes-xfce/xfce4-session/xfce4-session_4.10.0.bb | 4 |
5 files changed, 485 insertions, 1 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 new file mode 100644 index 000000000..ca5c36222 --- /dev/null +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch | |||
@@ -0,0 +1,482 @@ | |||
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/files/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 index dd9c6d467..dd9c6d467 100644 --- a/meta-xfce/recipes-xfce/xfce4-session/files/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 | |||
diff --git a/meta-xfce/recipes-xfce/xfce4-session/files/0002-Remove-gnome-keyring-remains.patch b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch index b26669f6e..b26669f6e 100644 --- a/meta-xfce/recipes-xfce/xfce4-session/files/0002-Remove-gnome-keyring-remains.patch +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0002-Remove-gnome-keyring-remains.patch | |||
diff --git a/meta-xfce/recipes-xfce/xfce4-session/files/0003-configure.in-hard-code-path-to-iceauth.patch b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0003-configure.in-hard-code-path-to-iceauth.patch index 41a527c61..41a527c61 100644 --- a/meta-xfce/recipes-xfce/xfce4-session/files/0003-configure.in-hard-code-path-to-iceauth.patch +++ b/meta-xfce/recipes-xfce/xfce4-session/xfce4-session/0003-configure.in-hard-code-path-to-iceauth.patch | |||
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.0.bb index 6ad834d66..2c185a515 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.0.bb | |||
@@ -3,8 +3,9 @@ SECTION = "x11" | |||
3 | LICENSE = "GPLv2" | 3 | 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 | DEPENDS += "${@base_contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)}" | ||
6 | RDEPENDS_${PN} = "netbase xinit dbus-x11 iceauth consolekit upower" | 7 | RDEPENDS_${PN} = "netbase xinit dbus-x11 iceauth consolekit upower" |
7 | PR = "r2" | 8 | PR = "r5" |
8 | 9 | ||
9 | inherit xfce | 10 | inherit xfce |
10 | 11 | ||
@@ -13,6 +14,7 @@ SRC_URI[sha256sum] = "bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a7 | |||
13 | SRC_URI += "file://0001-Handle-multiple-interactive-session-save-bug-5379.patch \ | 14 | SRC_URI += "file://0001-Handle-multiple-interactive-session-save-bug-5379.patch \ |
14 | file://0002-Remove-gnome-keyring-remains.patch \ | 15 | file://0002-Remove-gnome-keyring-remains.patch \ |
15 | file://0003-configure.in-hard-code-path-to-iceauth.patch \ | 16 | file://0003-configure.in-hard-code-path-to-iceauth.patch \ |
17 | file://0001-Add-shutdown-reboot-functionality-for-systemd-bug-87.patch \ | ||
16 | " | 18 | " |
17 | 19 | ||
18 | # protect from frightening message that xfce might not work correctly | 20 | # protect from frightening message that xfce might not work correctly |