[xfce4-session] Add upstream patches to hopefully fix crashes with glib2.
Kevin Fenzi
kevin at fedoraproject.org
Sat Apr 27 18:12:05 UTC 2013
commit 438f985890a75d26adb231f78fe5d02800bd6640
Author: Kevin Fenzi <kevin at scrye.com>
Date: Sat Apr 27 12:11:55 2013 -0600
Add upstream patches to hopefully fix crashes with glib2.
- Fixes bug #891113 #865539
xfce4-session-4.10.0-glib2.patch | 79 ++++++++++++++++++++++++++++++++++++++
xfce4-session.spec | 13 ++++++-
2 files changed, 91 insertions(+), 1 deletions(-)
---
diff --git a/xfce4-session-4.10.0-glib2.patch b/xfce4-session-4.10.0-glib2.patch
new file mode 100644
index 0000000..08e124d
--- /dev/null
+++ b/xfce4-session-4.10.0-glib2.patch
@@ -0,0 +1,79 @@
+diff -Nur xfce4-session-4.10.0.orig/xfce4-session/xfsm-startup.c xfce4-session-4.10.0/xfce4-session/xfsm-startup.c
+--- xfce4-session-4.10.0.orig/xfce4-session/xfsm-startup.c 2012-04-28 14:43:27.000000000 -0600
++++ xfce4-session-4.10.0/xfce4-session/xfsm-startup.c 2013-04-27 12:00:20.757522029 -0600
+@@ -864,6 +864,7 @@
+ gint n;
+ const gchar *current_directory;
+ GPid pid;
++ GError *error = NULL;
+
+ /* release any possible old resources related to a previous startup */
+ xfsm_properties_set_default_child_watch (properties);
+@@ -878,49 +879,34 @@
+
+ current_directory = xfsm_properties_get_string (properties, SmCurrentDirectory);
+
+- /* fork a new process for the application */
+-#ifdef HAVE_VFORK
+- /* vfork() doesn't allow you to do anything but call exec*() or _exit(),
+- * so if we need to set the working directory, we can't use vfork() */
+- if (current_directory == NULL)
+- pid = vfork ();
+- else
+-#endif
+- pid = fork ();
+-
+- /* handle the child process */
+- if (pid == 0)
++ if (!g_spawn_async (current_directory,
++ argv, NULL,
++ G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
++ NULL, NULL,
++ &pid, &error))
+ {
+- /* execute the application here */
+- if (current_directory)
+- {
+- if (chdir (current_directory))
+- g_warning ("Unable to chdir to \"%s\": %s", current_directory, strerror (errno));
+- }
+- execvp (argv[0], argv);
+- _exit (127);
+- }
+-
+- /* cleanup */
+- g_strfreev (argv);
++ g_warning ("Unable to launch \"%s\": %s",
++ *argv, error->message);
++ g_error_free (error);
++ g_strfreev (argv);
+
+- /* check if we failed to fork */
+- if (G_UNLIKELY (pid < 0))
+- {
+- /* tell the user that we failed to fork */
+- perror ("Failed to fork new process");
+ return FALSE;
+ }
+
++ xfsm_verbose ("Launched command \"%s\" with PID %dn", *argv, (gint) pid);
++
++ g_strfreev (argv);
++
+ properties->pid = pid;
+
+ /* set a watch to make sure the child doesn't quit before registering */
+- child_watch_data = g_new (XfsmStartupData, 1);
++ child_watch_data = g_new0 (XfsmStartupData, 1);
+ child_watch_data->manager = g_object_ref (manager);
+ child_watch_data->properties = properties;
+- g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
+- xfsm_startup_child_watch, child_watch_data,
+- (GDestroyNotify) xfsm_startup_data_free);
++ child_watch_data->properties->child_watch_id =
++ g_child_watch_add_full (G_PRIORITY_LOW, properties->pid,
++ xfsm_startup_child_watch, child_watch_data,
++ (GDestroyNotify) xfsm_startup_data_free);
+
+ /* set a timeout -- client must register in a a certain amount of time
+ * or it's assumed to be broken/have issues. */
diff --git a/xfce4-session.spec b/xfce4-session.spec
index 3e121ef..45fb6f9 100644
--- a/xfce4-session.spec
+++ b/xfce4-session.spec
@@ -2,7 +2,7 @@
Name: xfce4-session
Version: 4.10.0
-Release: 7%{?dist}
+Release: 8%{?dist}
Summary: Xfce session manager
Group: User Interface/Desktops
@@ -21,6 +21,12 @@ Patch1: xfce4-session-4.10.0-session-save.patch
# initial Patch from arch linux / https://bugzilla.xfce.org/show_bug.cgi?id=8729
# added suspend,hibernate support
Patch2: xfce4-session-4.10.0-add-systemd-support.patch
+#
+# fix for some glib2 crasher issues.
+# commit dee0200fa5dc4de064f288281ddd13199ba7fcde
+# commit ab391138cacc62ab184a338e237c4430356b41f9
+# https://bugzilla.xfce.org/show_bug.cgi?id=9709
+Patch3: xfce4-session-4.10.0-glib2.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -82,6 +88,7 @@ Additional splash screen engines for the Xfce Session Manager.
%patch1 -p1
%patch2 -p1
+%patch3 -p1
%build
/usr/bin/xdt-autogen
@@ -163,6 +170,10 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%{_datadir}/themes/Default/balou/
%changelog
+* Sat Apr 27 2013 Kevin Fenzi <kevin at scrye.com> 4.10.0-8
+- Add upstream patches to hopefully fix crashes with glib2.
+- Fixes bug #891113 #865539
+
* Fri Mar 29 2013 Rex Dieter <rdieter at fedoraproject.org> 4.10.0-7
- more systemd-login1 love (+suspend/hibernate)
More information about the scm-commits
mailing list