diff options
Diffstat (limited to 'extra/xfce4-session')
3 files changed, 124 insertions, 5 deletions
diff --git a/extra/xfce4-session/PKGBUILD b/extra/xfce4-session/PKGBUILD index 54b01b4a8..fa6e5d7fc 100644 --- a/extra/xfce4-session/PKGBUILD +++ b/extra/xfce4-session/PKGBUILD @@ -1,10 +1,10 @@ -# $Id: PKGBUILD 169968 2012-10-30 22:59:13Z heftig $ +# $Id: PKGBUILD 183871 2013-04-29 05:43:04Z foutrelis $ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: tobias <tobias funnychar archlinux.org> pkgname=xfce4-session pkgver=4.10.0 -pkgrel=6 +pkgrel=7 pkgdesc="A session manager for Xfce" arch=('i686' 'x86_64') url="http://www.xfce.org/" @@ -21,17 +21,31 @@ replaces=('xfce-utils') options=('!libtool') install=$pkgname.install source=(http://archive.xfce.org/src/xfce/$pkgname/4.10/$pkgname-$pkgver.tar.bz2 - xfce4-session-4.10.0-add-systemd-support.patch) + xfce4-session-4.10.0-add-systemd-support.patch + xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch + xfce4-session-4.10.0-store-the-watch-function-id.patch) sha256sums=('bb8aa9a74c3d382840596fb4875144d66c7f3f47c8e9ee81d31e3428a72c46ce' - 'ffae61c48a4bd0cb51d422cb93f2de9567abaf29085370c455ef349b6a10234b') + 'ffae61c48a4bd0cb51d422cb93f2de9567abaf29085370c455ef349b6a10234b' + '18ed175dd4242e39161a093045c6c6aebf9a408350652bde1454fe07411cdf3c' + '5eb5319a38f58a2d518d0e3d24b6d01c487871711fb36b55cb03a10a4591cdcf') -build() { +prepare() { cd "$srcdir/$pkgname-$pkgver" # https://bugzilla.xfce.org/show_bug.cgi?id=8729 patch -Np1 -i "$srcdir/xfce4-session-4.10.0-add-systemd-support.patch" + # https://bugzilla.xfce.org/show_bug.cgi?id=9709 + patch -Np1 -i "$srcdir/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch" + patch -Np1 -i "$srcdir/xfce4-session-4.10.0-store-the-watch-function-id.patch" + + sed -i 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' configure.in + xdt-autogen +} + +build() { + cd "$srcdir/$pkgname-$pkgver" ./configure \ --prefix=/usr \ diff --git a/extra/xfce4-session/xfce4-session-4.10.0-store-the-watch-function-id.patch b/extra/xfce4-session/xfce4-session-4.10.0-store-the-watch-function-id.patch new file mode 100644 index 000000000..1b86997ff --- /dev/null +++ b/extra/xfce4-session/xfce4-session-4.10.0-store-the-watch-function-id.patch @@ -0,0 +1,26 @@ +From ab391138cacc62ab184a338e237c4430356b41f9 Mon Sep 17 00:00:00 2001 +From: Nick Schermer <nick@xfce.org> +Date: Fri, 26 Apr 2013 18:05:10 +0000 +Subject: Store the watch function id to avoid possible double free (bug #9709). + +--- +diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c +index e43c53c..c621397 100644 +--- a/xfce4-session/xfsm-startup.c ++++ b/xfce4-session/xfsm-startup.c +@@ -903,9 +903,10 @@ xfsm_startup_start_properties (XfsmProperties *properties, + 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. */ +-- +cgit v0.9.1 diff --git a/extra/xfce4-session/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch b/extra/xfce4-session/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch new file mode 100644 index 000000000..beffd0524 --- /dev/null +++ b/extra/xfce4-session/xfce4-session-4.10.0-use-the-async-spawn-function-of-glib.patch @@ -0,0 +1,79 @@ +From dee0200fa5dc4de064f288281ddd13199ba7fcde Mon Sep 17 00:00:00 2001 +From: Nick Schermer <nick@xfce.org> +Date: Fri, 26 Apr 2013 17:46:29 +0000 +Subject: Use the async spawn function of glib. + +--- +diff --git a/xfce4-session/xfsm-startup.c b/xfce4-session/xfsm-startup.c +index 911eec6..e43c53c 100644 +--- a/xfce4-session/xfsm-startup.c ++++ b/xfce4-session/xfsm-startup.c +@@ -864,6 +864,7 @@ xfsm_startup_start_properties (XfsmProperties *properties, + 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,44 +879,28 @@ xfsm_startup_start_properties (XfsmProperties *properties, + + 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, +-- +cgit v0.9.1 |