Accepting request 528349 from GNOME:Factory

- Re-add
  gnome-session-logging-to-systemd-journal-configurable.patch (not
  yet upstream [bsc#979498], [bgo#768982]). (forwarded request 528296 from fcrozat)

OBS-URL: https://build.opensuse.org/request/show/528349
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gnome-session?expand=0&rev=173
This commit is contained in:
Dominique Leuenberger 2017-09-25 11:56:34 +00:00 committed by Git OBS Bridge
commit 1efbd3fbf4
4 changed files with 180 additions and 152 deletions

View File

@ -0,0 +1,136 @@
From e7675cc3c3c078aedf57e6d386f10c47eb22f0d1 Mon Sep 17 00:00:00 2001
From: Felix Zhang <fezhang@suse.com>
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(-)
Index: gnome-session-3.26.0/configure.ac
===================================================================
--- gnome-session-3.26.0.orig/configure.ac 2017-09-12 16:06:00.000000000 +0200
+++ gnome-session-3.26.0/configure.ac 2017-09-22 13:53:17.805764740 +0200
@@ -148,6 +148,25 @@
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 ====================================================================
Index: gnome-session-3.26.0/gnome-session/gsm-autostart-app.c
===================================================================
--- gnome-session-3.26.0.orig/gnome-session/gsm-autostart-app.c 2017-05-30 18:57:54.000000000 +0200
+++ gnome-session-3.26.0/gnome-session/gsm-autostart-app.c 2017-09-22 13:53:17.805764740 +0200
@@ -33,7 +33,9 @@
#endif
#ifdef HAVE_SYSTEMD
+#ifdef ENABLE_SYSTEMD_JOURNAL
#include <systemd/sd-journal.h>
+#endif
#include <systemd/sd-daemon.h>
#endif
@@ -1027,7 +1029,7 @@
app->priv->startup_id = sn_id;
}
-#ifdef HAVE_SYSTEMD
+#ifdef ENABLE_SYSTEMD_JOURNAL
static void
on_child_setup (GsmAutostartApp *app)
{
@@ -1098,7 +1100,7 @@
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;
Index: gnome-session-3.26.0/gnome-session/gsm-manager.c
===================================================================
--- gnome-session-3.26.0.orig/gnome-session/gsm-manager.c 2017-07-19 17:07:22.000000000 +0200
+++ gnome-session-3.26.0/gnome-session/gsm-manager.c 2017-09-22 13:53:17.805764740 +0200
@@ -40,7 +40,7 @@
#include "gsm-manager.h"
#include "org.gnome.SessionManager.h"
-#ifdef HAVE_SYSTEMD
+#ifdef ENABLE_SYSTEMD_JOURNAL
#include <systemd/sd-journal.h>
#endif
@@ -271,7 +271,7 @@
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 @@
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,
@@ -1355,7 +1355,7 @@
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",
Index: gnome-session-3.26.0/gnome-session/main.c
===================================================================
--- gnome-session-3.26.0.orig/gnome-session/main.c 2017-06-29 16:24:18.000000000 +0200
+++ gnome-session-3.26.0/gnome-session/main.c 2017-09-22 13:53:17.805764740 +0200
@@ -41,7 +41,7 @@
#include "gsm-system.h"
#include "gsm-fail-whale.h"
-#ifdef HAVE_SYSTEMD
+#ifdef ENABLE_SYSTEMD_JOURNAL
#include <systemd/sd-journal.h>
#endif
@@ -329,7 +329,7 @@
* 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;

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Fri Sep 22 11:52:18 UTC 2017 - fcrozat@suse.com
- Re-add
gnome-session-logging-to-systemd-journal-configurable.patch (not
yet upstream [bsc#979498], [bgo#768982]).
-------------------------------------------------------------------
Fri Sep 22 08:36:31 UTC 2017 - dimstar@opensuse.org
- Revert "Enable SLE-Classic for wayland": the SLE-Classic session
requires gnome-shell-extensions, which is the reason why the
X-Session is shipped as part of that package. The wayland session
should also be there.
-------------------------------------------------------------------
Wed Sep 20 12:12:26 UTC 2017 - dimstar@opensuse.org
- Register GNOME with u-a handler for default.desktop
implementation, which obsoletes the change in
/etc/sysconfig/windowmanager to pick the 'default window manager'
(boo#1039756).
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Sep 15 03:53:53 UTC 2017 - xwang@suse.com Fri Sep 15 03:53:53 UTC 2017 - xwang@suse.com

View File

@ -26,14 +26,12 @@ Url: http://www.gnome.org
Source: http://download.gnome.org/sources/gnome-session/3.26/%{name}-%{version}.tar.xz Source: http://download.gnome.org/sources/gnome-session/3.26/%{name}-%{version}.tar.xz
Source1: gnome Source1: gnome
Source2: gnome.desktop Source2: gnome.desktop
Source3: sle-classic.desktop # 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.
Patch0: gnome-session-logging-to-systemd-journal-configurable.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: intltool BuildRequires: intltool
BuildRequires: pkgconfig BuildRequires: pkgconfig
BuildRequires: tcpd-devel BuildRequires: tcpd-devel
%if !0%{?is_opensuse}
BuildRequires: translation-update-upstream
%endif
BuildRequires: update-desktop-files BuildRequires: update-desktop-files
BuildRequires: xsltproc BuildRequires: xsltproc
BuildRequires: pkgconfig(dbus-glib-1) >= 0.76 BuildRequires: pkgconfig(dbus-glib-1) >= 0.76
@ -59,6 +57,9 @@ BuildRequires: pkgconfig(xtst)
Requires: %{name}-core = %{version} Requires: %{name}-core = %{version}
Requires: %{name}-default-session = %{version} Requires: %{name}-default-session = %{version}
Recommends: %{name}-lang Recommends: %{name}-lang
%if !0%{?is_opensuse}
BuildRequires: translation-update-upstream
%endif
# gnome-session-wayland not recommended by default yet: causes various issues: # gnome-session-wayland not recommended by default yet: causes various issues:
# qemu's default video mode is 'cirrus', which stays black with GNOME Wayland # qemu's default video mode is 'cirrus', which stays black with GNOME Wayland
# YaST cannot be started without additional tricks # YaST cannot be started without additional tricks
@ -106,6 +107,7 @@ functional GNOME desktop.
%prep %prep
%setup -q %setup -q
%patch0 -p1
%if !0%{?is_opensuse} %if !0%{?is_opensuse}
translation-update-upstream translation-update-upstream
%endif %endif
@ -126,9 +128,6 @@ install -d -m755 %{buildroot}%{_bindir}
install -m755 %{SOURCE1} %{buildroot}%{_bindir}/gnome install -m755 %{SOURCE1} %{buildroot}%{_bindir}/gnome
install -d -m755 %{buildroot}%{_datadir}/xsessions install -d -m755 %{buildroot}%{_datadir}/xsessions
install -m644 %{SOURCE2} %{buildroot}%{_datadir}/xsessions/gnome.desktop install -m644 %{SOURCE2} %{buildroot}%{_datadir}/xsessions/gnome.desktop
%if !0%{?is_opensuse}
install -m644 %{SOURCE3} %{buildroot}%{_datadir}/wayland-sessions/sle-classic.desktop
%endif
%suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/gnome.desktop %suse_update_desktop_file %{buildroot}%{_datadir}/xsessions/gnome.desktop
%find_lang %{name}-3.0 %{?no_lang_C} %find_lang %{name}-3.0 %{?no_lang_C}
%fdupes %{buildroot}/%{_prefix} %fdupes %{buildroot}/%{_prefix}
@ -137,11 +136,26 @@ install -m644 %{SOURCE3} %{buildroot}%{_datadir}/wayland-sessions/sle-classic.de
rm -fr %{buildroot}%{_datadir}/wayland-sessions rm -fr %{buildroot}%{_datadir}/wayland-sessions
%endif %endif
# Prepare for 'default.desktop' being update-alternative handled, boo#1039756
mkdir -p %{buildroot}%{_sysconfdir}/alternatives
touch %{buildroot}%{_sysconfdir}/alternatives/default-xsession.desktop
ln -s %{_sysconfdir}/alternatives/default-xsession.desktop %{buildroot}%{_datadir}/xsessions/default.desktop
%post
%{_sbindir}/update-alternatives --install %{_datadir}/xsessions/default.desktop \
default-xsession.desktop %{_datadir}/xsessions/gnome.desktop 25
%postun
[ -f %{_datadir}/xsessions/gnome.desktop ] || %{_sbindir}/update-alternatives \
--remove default-xsession.desktop %{_datadir}/xsessions/gnome.desktop
%files %files
%defattr (-, root, root) %defattr (-, root, root)
%{_bindir}/gnome %{_bindir}/gnome
%{_datadir}/xsessions/default.desktop
%{_datadir}/xsessions/gnome.desktop %{_datadir}/xsessions/gnome.desktop
%{_datadir}/xsessions/gnome-xorg.desktop %{_datadir}/xsessions/gnome-xorg.desktop
%ghost %{_sysconfdir}/alternatives/default-xsession.desktop
%files default-session %files default-session
%defattr (-, root, root) %defattr (-, root, root)
@ -153,9 +167,6 @@ rm -fr %{buildroot}%{_datadir}/wayland-sessions
%defattr (-, root, root) %defattr (-, root, root)
%dir %{_datadir}/wayland-sessions %dir %{_datadir}/wayland-sessions
%{_datadir}/wayland-sessions/gnome.desktop %{_datadir}/wayland-sessions/gnome.desktop
%if !0%{?is_opensuse}
%{_datadir}/wayland-sessions/sle-classic.desktop
%endif
# Disabled as wayland is now the default session again. # Disabled as wayland is now the default session again.
#{_datadir}/wayland-sessions/gnome-wayland.desktop #{_datadir}/wayland-sessions/gnome-wayland.desktop
%endif %endif

View File

@ -1,142 +0,0 @@
[Desktop Entry]
Name=SLE Classic
Name[af]=SLE Klassiek
Name[an]=SLE clasico
Name[ar]=جنوم تقليدية
Name[as]=SLE ি
Name[bg]=Класически SLE
Name[bn_IN]=SLE ি
Name[bs]=Klasični SLE
Name[ca]=SLE clàssic
Name[ca@valencia]=SLE clàssic
Name[cs]=SLE klasik
Name[da]=SLE Classic
Name[de]=SLE Classic
Name[el]=SLE Classic
Name[en_GB]=SLE Classic
Name[eo]=SLE-klasika
Name[es]=SLE clásico
Name[et]=Klassikaline SLE
Name[eu]=SLE Klasikoa
Name[fa]=گنوم کلاسیک
Name[fi]=Perinteinen Gnome
Name[fr]=SLE Classique
Name[fur]=SLE Classic
Name[gd]=SLE clasaigeach
Name[gl]=SLE clasico
Name[gu]=SLE િ
Name[he]=SLE קלסי
Name[hi]=SLE ि
Name[hu]=Klasszikus SLE
Name[id]=SLE Klasik
Name[is]=SLE Klassík
Name[it]=SLE classico
Name[ja]=SLE
Name[kk]=Классикалық SLE
Name[km]=SLE Classic
Name[kn]=SLE ಿ
Name[ko]=
Name[lt]=Klasikinis SLE
Name[lv]=Klasiskais SLE
Name[ml]= ി
Name[mr]=SLE ि
Name[ms]=SLE Klasik
Name[nb]=Klassisk SLE
Name[ne]=ि ि
Name[nl]=Gnome klassiek
Name[oc]=SLE Classic
Name[or]=SLE ି
Name[pa]= ਿ
Name[pl]=Klasyczne SLE
Name[pt]=SLE clássico
Name[pt_BR]=SLE Clássico
Name[ro]=SLE Clasic
Name[ru]=Классический SLE
Name[sk]=Klasické prostredie SLE
Name[sl]=Običajno namizje SLE
Name[sr]=Класичан Гном
Name[sr@latin]=Klasičan Gnom
Name[sv]=SLE Klassisk
Name[ta]=SLE ிி
Name[te]= ి
Name[tg]=SLE-и классикӣ
Name[th]=SLE
Name[tr]=SLE Klasik
Name[uk]=Класичний SLE
Name[vi]=SLE c đin
Name[zh_CN]=SLE
Name[zh_HK]=SLE Classic
Name[zh_TW]=SLE Classic
Comment=This session logs you into SLE Classic
Comment[af]=Hierdie sessie laat mens aanmeld by SLE Klassiek
Comment[an]=Ista sesión encieta lo SLE clasico
Comment[ar]=تولجك هذه الجلسة في جنوم التقليدية
Comment[as]= ি SLE ি
Comment[bg]=Работната среда изглежда като класическия SLE (2.x)
Comment[bn_IN]= SLE ি
Comment[bs]=Ova sesija vas prijavljuje na klasični SLE
Comment[ca]=Aquesta sessió us permet utilitzar el SLE clàssic
Comment[ca@valencia]=Esta sessió vos permet utilitzar el SLE clàssic
Comment[cs]=Toto sezení vás přihlásí do SLE klasik
Comment[da]=Denne session logger dig ind i SLE Classic
Comment[de]=Diese Sitzung meldet Sie in SLE Classic an
Comment[el]=Αυτή η συνεδρία σας συνδέει στο SLE Classic
Comment[en_GB]=This session logs you into SLE Classic
Comment[eo]=Ĉi seanco ensalutas vin SLE-klasiken
Comment[es]=Esta sesión inicia SLE clásico
Comment[et]=See on klassikalise SLE seanss
Comment[eu]=Saio honek SLE Klasikoa hasten du
Comment[fa]=این نشست شما را به گنوم کلاسیک وارد میکند
Comment[fi]=Tämä istunto kirjaa sinut perinteiseen Gnomeen
Comment[fr]=Cette session vous connnecte à SLE Classique
Comment[fur]=Cheste session a si invie cun SLE classic
Comment[gd]=Clàraidh an seisean seo a-steach gu SLE clasaigeach thu
Comment[gl]=Esta sesión iniciarao en SLE clásico
Comment[gu]= SLE િ
Comment[he]=הפעלה זו מכניסה אותך למצב הקלסי של SLE
Comment[hi]= ि
Comment[hu]=Bejelentkezés a klasszikus SLE környezetbe
Comment[id]=Sesi ini memasukkan Anda ke SLE Klasik
Comment[is]=Þessi seta skráir þig inn í klassískt SLE
Comment[it]=Questa sessione si avvia con SLE classico
Comment[ja]=SLE
Comment[kk]=Бұл сессия арқылы классикалық SLE ішіне кіресіз
Comment[km]= SLE Classic
Comment[kn]= ಿ ಿ SLE ಿ ಿ
Comment[ko]=
Comment[lt]=Šis seansas prijungs jus prie klasikinio SLE
Comment[lv]=Šī sesija ieraksta jūs klasiskajā SLE vidē
Comment[ml]= ി ിി
Comment[mr]= SLE ि
Comment[ms]=Sesi ini log masukkan anda ke SLE Klasik
Comment[nb]=Denne økten logger inn i klassisk SLE
Comment[ne]= ि ि
Comment[nl]=Deze sessie meldt u aan bij Gnome klassiek
Comment[oc]=Aquesta session vos connècta a SLE Classic
Comment[or]=ି ି SLE ି
Comment[pa]= ਿ ਿ
Comment[pl]=Ta sesja loguje do klasycznego środowiska SLE
Comment[pt]=Esta sessão liga-o ao SLE clássico
Comment[pt_BR]=Essa sessão se inicia como SLE Clássico
Comment[ro]=Această sesiune vă autentifică în SLE Clasic
Comment[ru]=Данный сеанс использует классический рабочий стол SLE
Comment[sk]=Táto relácia vás prihlási do klasického prostredia SLE
Comment[sl]=Seja omogoča prijavo v običajno namizje SLE.
Comment[sr]=Ова сесија вас пријављује у класичан Гном
Comment[sr@latin]=Ova sesija vas prijavljuje u klasičan Gnom
Comment[sv]=Denna session loggar in dig till SLE Klassisk
Comment[ta]= SLE ிிி ி
Comment[te]= ి ిి ి
Comment[tg]=Ин ҷаласа шуморо ба SLE-и классикӣ ворид мекунад
Comment[th]= SLE
Comment[tr]=Bu oturum, SLE Klasik sürümüne giriş yapmanızı sağlar.
Comment[uk]=Це сеанс входу в класичний SLE
Comment[vi]=Phiên làm vic này đăng nhp bn vào SLE C đin
Comment[zh_CN]=SLE
Comment[zh_HK]= SLE Classic
Comment[zh_TW]= SLE Classic
Exec=env GNOME_SHELL_SESSION_MODE=classic SLE_CLASSIC_MODE=1 gnome-session --session gnome-classic
TryExec=gnome-session
Icon=
Type=Application
DesktopNames=GNOME-Classic;GNOME