From 346b938a8cff56186a4ed7d89d7b7d3c82aceda07c54612d250e8586264d97ab Mon Sep 17 00:00:00 2001 From: Dominique Leuenberger Date: Thu, 21 Sep 2017 10:41:15 +0000 Subject: [PATCH] Accepting request 527529 from GNOME:Next Register gnome as u-a default session OBS-URL: https://build.opensuse.org/request/show/527529 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-session?expand=0&rev=276 --- gnome-session.changes | 8 ++++++++ gnome-session.spec | 21 ++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) diff --git a/gnome-session.changes b/gnome-session.changes index ac9d340..43e0f81 100644 --- a/gnome-session.changes +++ b/gnome-session.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +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 diff --git a/gnome-session.spec b/gnome-session.spec index 0312609..96dee81 100644 --- a/gnome-session.spec +++ b/gnome-session.spec @@ -31,9 +31,6 @@ BuildRequires: fdupes BuildRequires: intltool BuildRequires: pkgconfig BuildRequires: tcpd-devel -%if !0%{?is_opensuse} -BuildRequires: translation-update-upstream -%endif BuildRequires: update-desktop-files BuildRequires: xsltproc BuildRequires: pkgconfig(dbus-glib-1) >= 0.76 @@ -59,6 +56,9 @@ BuildRequires: pkgconfig(xtst) Requires: %{name}-core = %{version} Requires: %{name}-default-session = %{version} Recommends: %{name}-lang +%if !0%{?is_opensuse} +BuildRequires: translation-update-upstream +%endif # gnome-session-wayland not recommended by default yet: causes various issues: # qemu's default video mode is 'cirrus', which stays black with GNOME Wayland # YaST cannot be started without additional tricks @@ -137,11 +137,26 @@ install -m644 %{SOURCE3} %{buildroot}%{_datadir}/wayland-sessions/sle-classic.de rm -fr %{buildroot}%{_datadir}/wayland-sessions %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 %defattr (-, root, root) %{_bindir}/gnome +%{_datadir}/xsessions/default.desktop %{_datadir}/xsessions/gnome.desktop %{_datadir}/xsessions/gnome-xorg.desktop +%ghost %{_sysconfdir}/alternatives/default-xsession.desktop %files default-session %defattr (-, root, root)