Hello community,

here is the log from the commit of package gnome-session for openSUSE:Factory 
checked in at 2016-01-05 09:40:15
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gnome-session (Old)
 and      /work/SRC/openSUSE:Factory/.gnome-session.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "gnome-session"

Changes:
--------
--- /work/SRC/openSUSE:Factory/gnome-session/gnome-session.changes      
2015-11-12 19:37:37.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.gnome-session.new/gnome-session.changes 
2016-01-05 09:40:54.000000000 +0100
@@ -1,0 +2,6 @@
+Thu Nov 26 03:09:47 UTC 2015 - [email protected]
+
+- Add gnome-session-autostart-app-give-every-app-journal-id.patch:
+  Give every app it's own journald-id. Patch from upstream.
+
+-------------------------------------------------------------------

New:
----
  gnome-session-autostart-app-give-every-app-journal-id.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ gnome-session.spec ++++++
--- /var/tmp/diff_new_pack.4VyvEE/_old  2016-01-05 09:40:55.000000000 +0100
+++ /var/tmp/diff_new_pack.4VyvEE/_new  2016-01-05 09:40:55.000000000 +0100
@@ -30,6 +30,8 @@
 Source2:        gnome.desktop
 # PATCH-FIX-UPSTREAM gnome-session-ice-auth-for-suid.patch [email protected] -- 
Carries ICE auth over to other UIDs in this session using an env var.
 Patch0:         gnome-session-ice-auth-for-suid.patch
+# PATCH-FIX-UPSTREAM 
gnome-session-autostart-app-give-every-app-journal-id.patch [email protected] 
-- Patch from upstream git.
+Patch1:         gnome-session-autostart-app-give-every-app-journal-id.patch
 BuildRequires:  fdupes
 BuildRequires:  gnome-common
 BuildRequires:  hicolor-icon-theme
@@ -119,6 +121,7 @@
 # Disabled, as it fails
 #translation-update-upstream
 %patch0 -p1
+%patch1 -p1
 
 %build
 NOCONFIGURE=1 gnome-autogen.sh

++++++ gnome-session-autostart-app-give-every-app-journal-id.patch ++++++
>From 5449174a1618cc7637f8c3a96c0eeae679c55248 Mon Sep 17 00:00:00 2001
From: Ray Strode <[email protected]>
Date: Thu, 5 Nov 2015 09:41:16 -0500
Subject: autostart-app: give ever app its own journal id

Right now all session output gets attributed to
gnome-session which isn't very useful.

This commit makes sure launched apps each get
their own journal identifier.

https://bugzilla.gnome.org/show_bug.cgi?id=757571
---
 gnome-session/gsm-autostart-app.c | 44 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 43 insertions(+), 1 deletion(-)

diff --git a/gnome-session/gsm-autostart-app.c 
b/gnome-session/gsm-autostart-app.c
index 75008fe..08a434b 100644
--- a/gnome-session/gsm-autostart-app.c
+++ b/gnome-session/gsm-autostart-app.c
@@ -32,6 +32,11 @@
 #include <gconf/gconf-client.h>
 #endif
 
+#ifdef HAVE_SYSTEMD
+#include <systemd/sd-journal.h>
+#include <systemd/sd-daemon.h>
+#endif
+
 #include "gsm-autostart-app.h"
 #include "gsm-util.h"
 
@@ -1014,6 +1019,34 @@ app_launched (GAppLaunchContext *ctx,
         app->priv->startup_id = sn_id;
 }
 
+#ifdef HAVE_SYSTEMD
+static void
+on_child_setup (GsmAutostartApp *app)
+{
+        int standard_output, standard_error;
+
+        /* The FALSE means programs aren't expected to prefix each
+         * line with <n> prefix to specify priority.
+         */
+        standard_output = sd_journal_stream_fd (app->priv->desktop_id,
+                                                LOG_INFO,
+                                                FALSE);
+        standard_error = sd_journal_stream_fd (app->priv->desktop_id,
+                                               LOG_WARNING,
+                                               FALSE);
+
+        if (standard_output >= 0) {
+                dup2 (standard_output, STDOUT_FILENO);
+                close (standard_output);
+        }
+
+        if (standard_error >= 0) {
+                dup2 (standard_error, STDERR_FILENO);
+                close (standard_error);
+        }
+}
+#endif
+
 static gboolean
 autostart_app_start_spawn (GsmAutostartApp *app,
                            GError         **error)
@@ -1022,6 +1055,8 @@ autostart_app_start_spawn (GsmAutostartApp *app,
         GError          *local_error;
         const char      *startup_id;
         GAppLaunchContext *ctx;
+        GSpawnChildSetupFunc child_setup_func = NULL;
+        gpointer             child_setup_data = NULL;
         guint handler;
 
         startup_id = gsm_app_peek_startup_id (GSM_APP (app));
@@ -1041,12 +1076,19 @@ autostart_app_start_spawn (GsmAutostartApp *app,
                 g_app_launch_context_setenv (ctx, "DESKTOP_AUTOSTART_ID", 
startup_id);
         }
 
+#ifdef HAVE_SYSTEMD
+        if (sd_booted () > 0) {
+                child_setup_func = (GSpawnChildSetupFunc) on_child_setup;
+                child_setup_data = app;
+        }
+#endif
+
         handler = g_signal_connect (ctx, "launched", G_CALLBACK 
(app_launched), app);
         success = g_desktop_app_info_launch_uris_as_manager 
(app->priv->app_info,
                                                              NULL,
                                                              ctx,
                                                              
G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH,
-                                                             NULL, NULL,
+                                                             child_setup_func, 
child_setup_data,
                                                              NULL, NULL,
                                                              &local_error);
         g_signal_handler_disconnect (ctx, handler);
-- 
cgit v0.11.2

Reply via email to