summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuli Suominen <ssuominen@gentoo.org>2012-11-16 12:23:38 +0000
committerSamuli Suominen <ssuominen@gentoo.org>2012-11-16 12:23:38 +0000
commitce0a2049ebbf53634a821cfb47f221ab65e4c231 (patch)
treeda5bbbe96afb60514c1608f1dcfb8e907d66b58e /xfce-base
parentStable for X86, wrt bug #440852 (diff)
downloadhistorical-ce0a2049ebbf53634a821cfb47f221ab65e4c231.tar.gz
historical-ce0a2049ebbf53634a821cfb47f221ab65e4c231.tar.bz2
historical-ce0a2049ebbf53634a821cfb47f221ab65e4c231.zip
Backport upstream patch for "handle multiple interactive session save" wrt #443504 by "Beelzebubbie"
Package-Manager: portage-2.2.0_alpha142/cvs/Linux x86_64 Manifest-Sign-Key: 0x4868F14D
Diffstat (limited to 'xfce-base')
-rw-r--r--xfce-base/xfce4-session/ChangeLog10
-rw-r--r--xfce-base/xfce4-session/Manifest20
-rw-r--r--xfce-base/xfce4-session/files/xfce4-session-4.10.0-multiple-interactive-session-save.patch147
-rw-r--r--xfce-base/xfce4-session/xfce4-session-4.10.0-r1.ebuild65
4 files changed, 232 insertions, 10 deletions
diff --git a/xfce-base/xfce4-session/ChangeLog b/xfce-base/xfce4-session/ChangeLog
index 49a09c5b80e9..62fdeffe1848 100644
--- a/xfce-base/xfce4-session/ChangeLog
+++ b/xfce-base/xfce4-session/ChangeLog
@@ -1,6 +1,14 @@
# ChangeLog for xfce-base/xfce4-session
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/ChangeLog,v 1.169 2012/09/09 19:25:36 ssuominen Exp $
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/ChangeLog,v 1.170 2012/11/16 12:23:33 ssuominen Exp $
+
+*xfce4-session-4.10.0-r1 (16 Nov 2012)
+
+ 16 Nov 2012; Samuli Suominen <ssuominen@gentoo.org>
+ +xfce4-session-4.10.0-r1.ebuild,
+ +files/xfce4-session-4.10.0-multiple-interactive-session-save.patch:
+ Backport upstream patch for "handle multiple interactive session save" wrt
+ #443504 by "Beelzebubbie"
09 Sep 2012; Samuli Suominen <ssuominen@gentoo.org>
-xfce4-session-4.8.2.ebuild, -xfce4-session-4.8.3-r1.ebuild,
diff --git a/xfce-base/xfce4-session/Manifest b/xfce-base/xfce4-session/Manifest
index 59fd136f1979..ad95d6976e14 100644
--- a/xfce-base/xfce4-session/Manifest
+++ b/xfce-base/xfce4-session/Manifest
@@ -1,18 +1,20 @@
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
-DIST xfce4-session-4.10.0.tar.bz2 1257385 SHA256 bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce
+AUX xfce4-session-4.10.0-multiple-interactive-session-save.patch 6032 SHA256 b74af07a4182c65cde629d2a71cded4ec1a7fddf39d20d6c8d5b1f104052edfd SHA512 aa648f157d9efad1fc9d3d12db2bc571693f158584e509734330f7a72ae866c20d53e60649e056adbc1e6302f49d50bbbf4c97b87391dbd178a82c263b6fc556 WHIRLPOOL 03998921080a92380d022e268080d7a05ad73adaf46d94156db0f1a0d71707b7139061f0b781bdf51dbe99af27a489051e3f1f2cf609aaebfbfa2fa0ef2c0eb1
+DIST xfce4-session-4.10.0.tar.bz2 1257385 SHA256 bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce SHA512 d8d8d7c6c764182e8477d87d3c0d30ea4988e34c3411ffa15901b07738671960c1e62c02c05c45724890cec063f1a5aeeb04ab8b48992917ebfe1975165e969c WHIRLPOOL 21919865dbd9ef9bf3782586d6f2e089860cd21c3a4caad48e75afb0cb139119a8d7c151975466a9b3fd6cb57fc7711f2ec5dad142bc1c14287758577e8081f8
+EBUILD xfce4-session-4.10.0-r1.ebuild 1896 SHA256 db190d9a40298ed9ee6cee216846b5bc11dbcf6e0abd9e6150966ff067d0e28d SHA512 ad08e0972466e7fc911f0e646bfa7204258b4d0e128c06285407b086d4a6c1a026cbf1ace8562224ad3509d6c48cb7945d4514becdda804e89f3b87fe1a63ac1 WHIRLPOOL 427d5b2fc90460adbd913b1dac109ec4ba60dd3003a9d4a3d81d18252d4eec49e91b944163507237c34c0a86d7f35f3b5dd87e94ee7f2f8554133ab08e619d1c
EBUILD xfce4-session-4.10.0.ebuild 1810 SHA256 e6ef7d9cf9e783e72d96b85a50837177591d5f096f3b73057112b77bad14b221 SHA512 889d139c0e72d810deb74c9cf9f6a3410f4ce1748266431b50076e9a21df8517e321205ae86b50e8b656ba1c4cec61bce0bc4fb7c569f398253cbeb92621f9ee WHIRLPOOL d39df2b770f942a68af69e5099bfba12823391b0e64a676a8344342feb00273cad3d6f032425aac13e850420cf4f93e32c2af23332bcc02865d67f4a313b2d85
-MISC ChangeLog 22521 SHA256 b63e9cbdf71072dbda8ec40b891f077fb2fed3959d37cf26fc94c5a6dee16030 SHA512 426dadd1bf259929902bd7749b00ce31ea8caf4aba6ca49744fe087ed3ad8101810ac9725401468124f1adbc7226864b887eb8aad827491c12eada7e56ddf1d0 WHIRLPOOL 48c31123c84ae0ffbfe03b6e33c364ce3e0aeecf628de1fc1a2c0e490daa84a9475cf95ae4a64c13abe2a2c2a20d6d4aeb990089214259293b4a56c9769954af
+MISC ChangeLog 22827 SHA256 57597c695552e80e15a2e1c251b08c454cecc782ce9a9c4185aff3d100f1c218 SHA512 a6a62f1981ba7a4436bb4ab9ad0218684f6887d7f9b8ad9d9c8f3f69c695937063cfab324c4f2515263a85845446139dead5363bb9aedba93bf322c0034707e2 WHIRLPOOL be068f40fecaed43e8808e202cad770807caaf0528cff8955ad9705121db434d5478b5b23960d093435bb392f497ab57b97b76409c218f14d87907c7aba78942
MISC metadata.xml 390 SHA256 1d122a4418cea15fd68cb18d3c1b6db5120ac2109f228fbf6805967d9cb1431c SHA512 662e0dc55e20f785d376ce74919c280af92ddd43b61eca9eb364e736b76c854427b8d87e392eaa54576073c44f074939789d86b28cbf4eb5515ba1f1f4b8554e WHIRLPOOL 95207640f5dad56c4129aaa9c947e668f4b8617919e27b1471be644fc6f56fed264740f37b92e63a8af0594ee63b0089a37d33c81496a0b7679be8389ba0a3cc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iQEcBAEBCAAGBQJQTOzkAAoJEEdUh39IaPFNfBwH/j7sHH8k/+lqzfvwWlyN3ZQU
-48t7/ZvkYBcuCoDWWz3OnxGJyi3tqtjiiV+bPsrZ7h+vXkJjm/fQvCCLQ8dB/hBA
-Iskg/fI+CFSqF7SUMn6Fe/eO+Z16AvqxY6fkZXHgLG4mhyz6ii0OHYK4zIkBaL4t
-ZjgFypSgmZoFJIXBs3FDXs6grYjNOZ8A/dx4OMoifoK5OvE2GeM53+T2RVGsX27v
-PRO9vhQhJc0RCjfDcUQpKYh/PKDYV9xifhOfIGWYvi1a46UEeEe6Sw5eOM9sqG16
-5H19tzy5zzCyjyYMUYXJDH0snIrLang9aovMYdSrPPLOpZJy2bctg9VeTJaMDWo=
-=gROZ
+iQEcBAEBCAAGBQJQpi7dAAoJEEdUh39IaPFNcdkIAIczYdwebCFfr4zoiBBCqWco
+zCQhF/6EdBN2O/mTId6bpp80qCyTToVuBNad7H72hee/QWxYf2MekSrx6slsVjUR
+ssTJhpScDY2tRb98WLzuTIkszKLAnu3H9YB1xLPsq/oW252U7fwKdVAyhUb85gjL
+82jhK6JKT0ccDZ9nDPdumfuqVN3QcpwNmlGpiqFmam2IauwIv2yp8EluwrPkcyY4
+Hawz5W3mihU4S5MMZOztzciKjBp7WWvHINAMAzGO6amyX6gmkXcCLjAWMNVMlRWG
++TeTH8VEuzg3udlb/GQ1PuPrY6jFHc2YiAeqtJljXQbtVXgW5DfdI06JUlsdjWI=
+=GNQa
-----END PGP SIGNATURE-----
diff --git a/xfce-base/xfce4-session/files/xfce4-session-4.10.0-multiple-interactive-session-save.patch b/xfce-base/xfce4-session/files/xfce4-session-4.10.0-multiple-interactive-session-save.patch
new file mode 100644
index 000000000000..2fc908495bfa
--- /dev/null
+++ b/xfce-base/xfce4-session/files/xfce4-session-4.10.0-multiple-interactive-session-save.patch
@@ -0,0 +1,147 @@
+From 6cb3937aa9cf0c9905a77d0bc2b5be8cc2536e44 Mon Sep 17 00:00:00 2001
+From: Dimitar Zhekov <hamster@mbox.contact.bg>
+Date: Thu, 30 Aug 2012 20:52:14 +0000
+Subject: Handle multiple interactive session save (bug #5379).
+
+Additionnaly, we now use SmSaveGlobal on log out / shutdown without
+session save which avoids data loss. Previously clients would not save
+anything on log out without session save.
+
+Based on original work by Chris Bainbridge (chris.bainbridge@gmail.com).
+---
+diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
+index bf6a446..35811c5 100644
+--- a/xfce4-session/xfsm-manager.c
++++ b/xfce4-session/xfsm-manager.c
+@@ -98,6 +98,7 @@ struct _XfsmManager
+
+ XfsmShutdownType shutdown_type;
+ XfsmShutdown *shutdown_helper;
++ gboolean save_session;
+
+ gboolean session_chooser;
+ gchar *session_name;
+@@ -230,6 +231,7 @@ xfsm_manager_init (XfsmManager *manager)
+ manager->failsafe_mode = TRUE;
+ manager->shutdown_type = XFSM_SHUTDOWN_LOGOUT;
+ manager->shutdown_helper = xfsm_shutdown_get ();
++ manager->save_session = TRUE;
+
+ manager->pending_properties = g_queue_new ();
+ manager->starting_properties = g_queue_new ();
+@@ -989,7 +991,9 @@ xfsm_manager_interact (XfsmManager *manager,
+ XfsmClient *cl = lp->data;
+ if (xfsm_client_get_state (cl) == XFSM_CLIENT_INTERACTING)
+ {
+- xfsm_client_set_state (cl, XFSM_CLIENT_WAITFORINTERACT);
++ /* a client is already interacting, so new client has to wait */
++ xfsm_client_set_state (client, XFSM_CLIENT_WAITFORINTERACT);
++ xfsm_manager_cancel_client_save_timeout(manager, client);
+ return;
+ }
+ }
+@@ -1138,44 +1142,47 @@ xfsm_manager_save_yourself_global (XfsmManager *manager,
+ }
+ }
+
+- if (!shutdown || shutdown_save)
++ /* don't save the session if shutting down without save */
++ manager->save_session = !shutdown || shutdown_save;
++
++ if (save_type == SmSaveBoth && !manager->save_session)
+ {
+- xfsm_manager_set_state (manager,
+- shutdown
+- ? XFSM_MANAGER_SHUTDOWN
+- : XFSM_MANAGER_CHECKPOINT);
++ /* saving the session, so clients should
++ * (prompt to) save the user data only */
++ save_type = SmSaveGlobal;
++ }
+
+- /* handle legacy applications first! */
+- xfsm_legacy_perform_session_save ();
++ xfsm_manager_set_state (manager,
++ shutdown
++ ? XFSM_MANAGER_SHUTDOWN
++ : XFSM_MANAGER_CHECKPOINT);
+
+- for (lp = g_queue_peek_nth_link (manager->running_clients, 0);
+- lp;
+- lp = lp->next)
+- {
+- XfsmClient *client = lp->data;
+- XfsmProperties *properties = xfsm_client_get_properties (client);
+- const gchar *program;
++ /* handle legacy applications first! */
++ if (manager->save_session)
++ xfsm_legacy_perform_session_save ();
+
+- /* xterm's session management is broken, so we won't
+- * send a SAVE YOURSELF to xterms */
+- program = xfsm_properties_get_string (properties, SmProgram);
+- if (program != NULL && strcasecmp (program, "xterm") == 0)
+- continue;
++ for (lp = g_queue_peek_nth_link (manager->running_clients, 0);
++ lp;
++ lp = lp->next)
++ {
++ XfsmClient *client = lp->data;
++ XfsmProperties *properties = xfsm_client_get_properties (client);
++ const gchar *program;
+
+- if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL)
+- {
+- SmsSaveYourself (xfsm_client_get_sms_connection (client), save_type, shutdown,
+- interact_style, fast);
+- }
++ /* xterm's session management is broken, so we won't
++ * send a SAVE YOURSELF to xterms */
++ program = xfsm_properties_get_string (properties, SmProgram);
++ if (program != NULL && strcasecmp (program, "xterm") == 0)
++ continue;
+
+- xfsm_client_set_state (client, XFSM_CLIENT_SAVING);
+- xfsm_manager_start_client_save_timeout (manager, client);
++ if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL)
++ {
++ SmsSaveYourself (xfsm_client_get_sms_connection (client), save_type, shutdown,
++ interact_style, fast);
+ }
+- }
+- else
+- {
+- /* shutdown session without saving */
+- xfsm_manager_perform_shutdown (manager);
++
++ xfsm_client_set_state (client, XFSM_CLIENT_SAVING);
++ xfsm_manager_start_client_save_timeout (manager, client);
+ }
+ }
+
+@@ -1249,7 +1256,12 @@ xfsm_manager_save_yourself_done (XfsmManager *manager,
+ XfsmClient *client,
+ gboolean success)
+ {
+- if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVING && xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL)
++ /* In xfsm_manager_interact_done we send SmsShutdownCancelled to clients in
++ XFSM_CLIENT_WAITFORINTERACT state. They respond with SmcSaveYourselfDone
++ (xsmp_shutdown_cancelled in libxfce4ui library) so we allow it here. */
++ if (xfsm_client_get_state (client) != XFSM_CLIENT_SAVING &&
++ xfsm_client_get_state (client) != XFSM_CLIENT_SAVINGLOCAL &&
++ xfsm_client_get_state (client) != XFSM_CLIENT_WAITFORINTERACT)
+ {
+ xfsm_verbose ("Client Id = %s send SAVE YOURSELF DONE, while not being "
+ "in save mode. Prepare to be nuked!\n",
+@@ -1521,7 +1533,8 @@ xfsm_manager_complete_saveyourself (XfsmManager *manager)
+ xfsm_verbose ("Manager finished SAVE YOURSELF, session data will be stored now.\n\n");
+
+ /* all clients done, store session data */
+- xfsm_manager_store_session (manager);
++ if (manager->save_session)
++ xfsm_manager_store_session (manager);
+
+ if (manager->state == XFSM_MANAGER_CHECKPOINT)
+ {
+--
+cgit v0.9.0.3
diff --git a/xfce-base/xfce4-session/xfce4-session-4.10.0-r1.ebuild b/xfce-base/xfce4-session/xfce4-session-4.10.0-r1.ebuild
new file mode 100644
index 000000000000..fa2ce395eea6
--- /dev/null
+++ b/xfce-base/xfce4-session/xfce4-session-4.10.0-r1.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/xfce-base/xfce4-session/xfce4-session-4.10.0-r1.ebuild,v 1.1 2012/11/16 12:23:33 ssuominen Exp $
+
+EAPI=4
+inherit xfconf
+
+DESCRIPTION="A session manager for the Xfce desktop environment"
+HOMEPAGE="http://docs.xfce.org/xfce/xfce4-session/start"
+SRC_URI="mirror://xfce/src/xfce/${PN}/${PV%.*}/${P}.tar.bz2"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-freebsd ~x86-interix ~amd64-linux ~x86-linux ~x86-solaris"
+IUSE="consolekit debug gnome-keyring policykit udev +xscreensaver"
+
+COMMON_DEPEND=">=dev-libs/dbus-glib-0.98
+ x11-apps/iceauth
+ x11-libs/libSM
+ >=x11-libs/libwnck-2.30:1
+ x11-libs/libX11
+ >=xfce-base/libxfce4util-4.10
+ >=xfce-base/libxfce4ui-4.10
+ >=xfce-base/xfconf-4.10
+ gnome-keyring? ( >=gnome-base/libgnome-keyring-2.22 )
+ !xfce-base/xfce-utils"
+RDEPEND="${COMMON_DEPEND}
+ x11-apps/xrdb
+ x11-misc/xdg-user-dirs
+ consolekit? ( || ( sys-auth/consolekit >=sys-apps/systemd-40 ) )
+ policykit? ( >=sys-auth/polkit-0.104-r1 )
+ udev? ( >=sys-power/upower-0.9.15 )
+ xscreensaver? ( || (
+ >=x11-misc/xscreensaver-5.15
+ gnome-extra/gnome-screensaver
+ >=x11-misc/xlockmore-5.38
+ >=x11-misc/slock-1
+ ) )"
+DEPEND="${COMMON_DEPEND}
+ dev-util/intltool
+ virtual/pkgconfig
+ sys-devel/gettext"
+
+pkg_setup() {
+ PATCHES=( "${FILESDIR}"/${P}-multiple-interactive-session-save.patch )
+
+ XFCONF=(
+ --docdir="${EPREFIX}"/usr/share/doc/${PF}
+ --with-xsession-prefix="${EPREFIX}"/usr
+ $(use_enable gnome-keyring libgnome-keyring)
+ $(xfconf_use_debug)
+ )
+
+ DOCS=( AUTHORS BUGS ChangeLog NEWS README TODO )
+}
+
+src_install() {
+ xfconf_src_install
+
+ local sessiondir=/etc/X11/Sessions
+ echo startxfce4 > "${T}"/Xfce4
+ exeinto ${sessiondir}
+ doexe "${T}"/Xfce4
+ dosym Xfce4 ${sessiondir}/Xfce
+}