From 616af2e06b4af844817a3194330bc0964fb9a11faae9ae0bc724f74d318d19cc Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 20 Jul 2016 13:01:09 +0000 Subject: [PATCH 1/3] Accepting request 412269 from home:zhangxiaofei:branches:GNOME:Factory - Replace gnome-common with autoconf building the package. - Add gnome-session-logging-to-systemd-journal-configurable.patch (boo#979498, bgo#768982). Add an autoconf switch to control if the logs of gnome-session and its child processes should be send to systemd journal, or to the legacy ~/.xsession-errors-$DISPLAY when disabled. For SLE, disable logging to systemd journal. OBS-URL: https://build.opensuse.org/request/show/412269 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=238 --- ...ging-to-systemd-journal-configurable.patch | 139 ++++++++++++++++++ gnome-session.changes | 11 ++ gnome-session.spec | 14 +- 3 files changed, 158 insertions(+), 6 deletions(-) create mode 100644 gnome-session-logging-to-systemd-journal-configurable.patch diff --git a/gnome-session-logging-to-systemd-journal-configurable.patch b/gnome-session-logging-to-systemd-journal-configurable.patch new file mode 100644 index 0000000..a5d7ef4 --- /dev/null +++ b/gnome-session-logging-to-systemd-journal-configurable.patch @@ -0,0 +1,139 @@ +From e7675cc3c3c078aedf57e6d386f10c47eb22f0d1 Mon Sep 17 00:00:00 2001 +From: Felix Zhang +Date: Sun, 17 Jul 2016 17:27:06 +0800 +Subject: [PATCH] logging to systemd journal configurable + +--- + configure.ac | 19 +++++++++++++++++++ + gnome-session/gsm-autostart-app.c | 6 ++++-- + gnome-session/gsm-manager.c | 8 ++++---- + gnome-session/main.c | 4 ++-- + 4 files changed, 29 insertions(+), 8 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 223ee89..f248e9d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -147,6 +147,25 @@ AC_SUBST(SYSTEMD_LIBS) + AM_CONDITIONAL(HAVE_SYSTEMD, [test "$enable_systemd" = "yes"], [Using systemd]) + + dnl ==================================================================== ++dnl systemd journal support ++dnl ==================================================================== ++AC_ARG_ENABLE([systemd-journal], ++ AS_HELP_STRING([--enable-systemd-journal], [Send output to systemd journal]), ++ [enable_systemd_journal=$enableval], ++ [enable_systemd_journal=$enable_systemd]) ++ ++AC_MSG_CHECKING([whether to send the outputs of gnome-session and its child processes to systemd journal]) ++ ++AC_MSG_RESULT($enable_systemd_journal) ++ ++if test x$enable_systemd_journal = xyes ; then ++ if test x$enable_systemd = xno ; then ++ AC_MSG_ERROR([Systemd not found, or it is not enabled]) ++ fi ++ AC_DEFINE(ENABLE_SYSTEMD_JOURNAL, 1, [Define if output should be send to systemd journal]) ++fi ++ ++dnl ==================================================================== + dnl Check for ConsoleKit + dnl ==================================================================== + +diff --git a/gnome-session/gsm-autostart-app.c b/gnome-session/gsm-autostart-app.c +index 1dc3ba3..0837258 100644 +--- a/gnome-session/gsm-autostart-app.c ++++ b/gnome-session/gsm-autostart-app.c +@@ -33,7 +33,9 @@ + #endif + + #ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + #include ++#endif + #include + #endif + +@@ -1021,7 +1023,7 @@ app_launched (GAppLaunchContext *ctx, + app->priv->startup_id = sn_id; + } + +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + static void + on_child_setup (GsmAutostartApp *app) + { +@@ -1092,7 +1094,7 @@ autostart_app_start_spawn (GsmAutostartApp *app, + g_app_launch_context_setenv (ctx, "DESKTOP_AUTOSTART_ID", startup_id); + } + +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + if (sd_booted () > 0) { + child_setup_func = (GSpawnChildSetupFunc) on_child_setup; + child_setup_data = app; +diff --git a/gnome-session/gsm-manager.c b/gnome-session/gsm-manager.c +index a378cd9..175f4f5 100644 +--- a/gnome-session/gsm-manager.c ++++ b/gnome-session/gsm-manager.c +@@ -40,7 +40,7 @@ + #include "gsm-manager.h" + #include "org.gnome.SessionManager.h" + +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + #include + #endif + +@@ -271,7 +271,7 @@ on_required_app_failure (GsmManager *manager, + allow_logout = !_log_out_is_locked_down (manager); + } + +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + sd_journal_send ("MESSAGE_ID=%s", GSM_MANAGER_UNRECOVERABLE_FAILURE_MSGID, + "PRIORITY=%d", 3, + "MESSAGE=Unrecoverable failure in required component %s", app_id, +@@ -301,7 +301,7 @@ on_display_server_failure (GsmManager *manager, + extensions = NULL; + } + +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + sd_journal_send ("MESSAGE_ID=%s", GSM_MANAGER_UNRECOVERABLE_FAILURE_MSGID, + "PRIORITY=%d", 3, + "MESSAGE=Unrecoverable failure in required component %s", app_id, +@@ -1317,7 +1317,7 @@ start_phase (GsmManager *manager) + do_phase_startup (manager); + break; + case GSM_MANAGER_PHASE_RUNNING: +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + sd_journal_send ("MESSAGE_ID=%s", GSM_MANAGER_STARTUP_SUCCEEDED_MSGID, + "PRIORITY=%d", 5, + "MESSAGE=Entering running state", +diff --git a/gnome-session/main.c b/gnome-session/main.c +index bd23824..39757b9 100644 +--- a/gnome-session/main.c ++++ b/gnome-session/main.c +@@ -41,7 +41,7 @@ + #include "gsm-system.h" + #include "gsm-fail-whale.h" + +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + #include + #endif + +@@ -329,7 +329,7 @@ main (int argc, char **argv) + * journald picks ups the nicer "gnome-session" as the program + * name instead of whatever shell script GDM happened to use. + */ +-#ifdef HAVE_SYSTEMD ++#ifdef ENABLE_SYSTEMD_JOURNAL + if (!debug) { + int journalfd; + +-- +2.6.6 + diff --git a/gnome-session.changes b/gnome-session.changes index 6fed169..902e534 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Sun Jul 17 12:04:34 UTC 2016 - fezhang@suse.com + +- Replace gnome-common with autoconf building the package. +- Add gnome-session-logging-to-systemd-journal-configurable.patch + (boo#979498, bgo#768982). Add an autoconf switch to control if + the logs of gnome-session and its child processes should be send + to systemd journal, or to the legacy ~/.xsession-errors-$DISPLAY + when disabled. + For SLE, disable logging to systemd journal. + ------------------------------------------------------------------- Mon Jul 11 17:30:19 UTC 2016 - zaitor@opensuse.org diff --git a/gnome-session.spec b/gnome-session.spec index 2f21c50..4719858 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -28,10 +28,10 @@ Source1: gnome Source2: gnome.desktop # PATCH-FIX-SLE gnome-session-ice-auth-for-suid.patch hpj@novell.com -- Carries ICE auth over to other UIDs in this session using an env var. Patch0: gnome-session-ice-auth-for-suid.patch +# PATCH-FEATURE-UPSTREAM gnome-session-disable-logging-to-systemd-journal.patch bnc#876685 bgo#768982 fezhang@suse.com -- disable gnome-session logging to system journal. +Patch1: gnome-session-logging-to-systemd-journal-configurable.patch +BuildRequires: autoconf BuildRequires: fdupes -%if !0%{?is_opensuse} -BuildRequires: gnome-common -%endif BuildRequires: intltool BuildRequires: tcpd-devel %if !0%{?is_opensuse} @@ -106,13 +106,15 @@ functional GNOME desktop. translation-update-upstream %patch0 -p1 %endif +%patch1 -p1 %build -%if !0%{?is_opensuse} -NOCONFIGURE=1 gnome-autogen.sh -%endif +autoconf %configure \ --enable-systemd \ +%if !0%{?is_opensuse} + --disable-systemd-journal \ +%endif --disable-gconf make %{?_smp_mflags} V=1 From c29563fd65b30cf2406dbecd481c347f6a10a423d0644a3e878319996c6f8c99 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Wed, 20 Jul 2016 13:04:22 +0000 Subject: [PATCH 2/3] tweak OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=239 --- gnome-session.changes | 18 +++++++++++------- gnome-session.spec | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/gnome-session.changes b/gnome-session.changes index 902e534..f5beab4 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,13 +1,17 @@ ------------------------------------------------------------------- Sun Jul 17 12:04:34 UTC 2016 - fezhang@suse.com -- Replace gnome-common with autoconf building the package. -- Add gnome-session-logging-to-systemd-journal-configurable.patch - (boo#979498, bgo#768982). Add an autoconf switch to control if - the logs of gnome-session and its child processes should be send - to systemd journal, or to the legacy ~/.xsession-errors-$DISPLAY - when disabled. - For SLE, disable logging to systemd journal. +- Add gnome-session-logging-to-systemd-journal-configurable.patch: + Add an autoconf switch to control if the logs of gnome-session + and its child processes should be sent to systemd journal or to + the legacy ~/.xsession-errors-$DISPLAY when disabled (bsc#979498, + bgo#768982). +- For SLE, disable logging to systemd journal: pass + --disable-systemd-journal to configure. +- Replace gnome-common BuildRequires with autoconf: this is + sufficient to bootstrap gnome-session. +- Unconditionally call autoconf, as the newly added patch touches + the build system. ------------------------------------------------------------------- Mon Jul 11 17:30:19 UTC 2016 - zaitor@opensuse.org diff --git a/gnome-session.spec b/gnome-session.spec index 4719858..79f1bbc 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -28,7 +28,7 @@ Source1: gnome Source2: gnome.desktop # PATCH-FIX-SLE gnome-session-ice-auth-for-suid.patch hpj@novell.com -- Carries ICE auth over to other UIDs in this session using an env var. Patch0: gnome-session-ice-auth-for-suid.patch -# PATCH-FEATURE-UPSTREAM gnome-session-disable-logging-to-systemd-journal.patch bnc#876685 bgo#768982 fezhang@suse.com -- disable gnome-session logging to system journal. +# PATCH-FEATURE-UPSTREAM gnome-session-disable-logging-to-systemd-journal.patch bsc#876685 bgo#768982 fezhang@suse.com -- disable gnome-session logging to system journal. Patch1: gnome-session-logging-to-systemd-journal-configurable.patch BuildRequires: autoconf BuildRequires: fdupes From 2b9b259d042262a62ec09eea4a16c8d7a4c9893157a3b4d55865b3048d560545 Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 21 Jul 2016 14:32:16 +0000 Subject: [PATCH 3/3] Accepting request 412453 from home:zhangxiaofei:branches:GNOME:Factory just fixing inconsistant patch comment in specfile after it is renamed OBS-URL: https://build.opensuse.org/request/show/412453 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=240 --- gnome-session.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnome-session.spec b/gnome-session.spec index 79f1bbc..82e7f82 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -28,7 +28,7 @@ Source1: gnome Source2: gnome.desktop # PATCH-FIX-SLE gnome-session-ice-auth-for-suid.patch hpj@novell.com -- Carries ICE auth over to other UIDs in this session using an env var. Patch0: gnome-session-ice-auth-for-suid.patch -# PATCH-FEATURE-UPSTREAM gnome-session-disable-logging-to-systemd-journal.patch bsc#876685 bgo#768982 fezhang@suse.com -- disable gnome-session logging to system journal. +# PATCH-FEATURE-UPSTREAM gnome-session-logging-to-systemd-journal-configurable.patch bsc#876685 bgo#768982 fezhang@suse.com -- Add a new configure switch for systemd journal support. Patch1: gnome-session-logging-to-systemd-journal-configurable.patch BuildRequires: autoconf BuildRequires: fdupes