[hawaii-shell] Add GDM entry

Lubomir Rintel lkundrak at fedoraproject.org
Wed Jun 18 18:37:37 UTC 2014


commit 54816ea9f1823681c024040074dd1dab441c1397
Author: Lubomir Rintel <lkundrak at v3.sk>
Date:   Wed Jun 18 20:29:08 2014 +0200

    Add GDM entry

 ...n-Only-use-the-launcher-if-it-makes-sense.patch |   52 +++++++++++++++++
 ...ssions-Add-session-launcher-desktop-entry.patch |   59 ++++++++++++++++++++
 hawaii-shell.spec                                  |    7 ++
 3 files changed, 118 insertions(+), 0 deletions(-)
---
diff --git a/0001-hawaii.in-Only-use-the-launcher-if-it-makes-sense.patch b/0001-hawaii.in-Only-use-the-launcher-if-it-makes-sense.patch
new file mode 100644
index 0000000..ca00f85
--- /dev/null
+++ b/0001-hawaii.in-Only-use-the-launcher-if-it-makes-sense.patch
@@ -0,0 +1,52 @@
+From 2fca43149f9a385cd3e6ff4845ffdd232a3435ac Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Wed, 18 Jun 2014 20:03:16 +0200
+Subject: [PATCH 1/2] hawaii.in: Only use the launcher if it makes sense
+
+Not use for it if it's not setuid and we're not UID 0. However, weston itself
+might be compiled with systemd-logind support and might succeed obtaining the
+required device files from it.
+---
+ scripts/hawaii.in | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/scripts/hawaii.in b/scripts/hawaii.in
+index 9932915..98e946c 100644
+--- a/scripts/hawaii.in
++++ b/scripts/hawaii.in
+@@ -6,6 +6,7 @@
+ #
+ # Author(s):
+ #    Pier Luigi Fiorini
++#    Lubomir Rintel
+ #
+ # $BEGIN_LICENSE:GPL2+$
+ #
+@@ -28,7 +29,7 @@
+ weston=$(which weston)
+ westonlaunch=$(which weston-launch)
+ 
+-if [ "x$weston" = "x" -o "x$westonlaunch" = "x" ]; then
++if [ "x$weston" = "x" ]; then
+     echo
+     echo "Hawaii needs the Weston compositor, but it hasn't been found."
+     echo "Please install the weston package."
+@@ -38,8 +39,11 @@ fi
+ 
+ args="--shell=@CMAKE_INSTALL_FULL_LIBDIR@/weston/hawaii-desktop.so"
+ 
+-if [ -z "$DISPLAY" ]; then
+-    exec ${westonlaunch} $@ -- ${args}
+-else
+-    exec ${weston} ${args} $@
++# User the launcher, if it's available and works
++if [ "$westonlaunch" ] && [ -z "$DISPLAY" ]; then
++    if [ $UID = 0 ] || [ -u ${westonlaunch} ]; then
++        exec ${westonlaunch} $@ -- ${args}
++    fi
+ fi
++
++exec ${weston} ${args} $@
+-- 
+2.0.0
+
diff --git a/0002-wayland-sessions-Add-session-launcher-desktop-entry.patch b/0002-wayland-sessions-Add-session-launcher-desktop-entry.patch
new file mode 100644
index 0000000..d1a8205
--- /dev/null
+++ b/0002-wayland-sessions-Add-session-launcher-desktop-entry.patch
@@ -0,0 +1,59 @@
+From e1c08a73bf6f4a3ffe738c16f2270365413a332d Mon Sep 17 00:00:00 2001
+From: Lubomir Rintel <lkundrak at v3.sk>
+Date: Wed, 18 Jun 2014 20:16:19 +0200
+Subject: [PATCH] wayland-sessions: Add session launcher desktop entry
+
+Currently it's understood and works fine with GDM 3.12 at the very least.
+---
+ .tx/config                           | 6 ++++++
+ data/CMakeLists.txt                  | 1 +
+ data/wayland-sessions/CMakeLists.txt | 2 ++
+ data/wayland-sessions/hawaii.desktop | 6 ++++++
+ 4 files changed, 15 insertions(+)
+ create mode 100644 data/wayland-sessions/CMakeLists.txt
+ create mode 100644 data/wayland-sessions/hawaii.desktop
+
+diff --git a/.tx/config b/.tx/config
+index e08ee5a..cceef83 100644
+--- a/.tx/config
++++ b/.tx/config
+@@ -78,3 +78,9 @@ type = DESKTOP
+ source_lang = en
+ source_file = data/packages/backgrounds/gradient.desktop
+ file_filter = translations/packages/backgrounds/gradient_<lang>.desktop
++
++[hawaii.shell-wayland-sessions-hawaii-metadata]
++type = DESKTOP
++source_lang = en
++source_file = data/wayland-sessions/hawaii.desktop
++file_filter = translations/data/wayland-sessions/hawaii_<lang>.desktop
+diff --git a/data/CMakeLists.txt b/data/CMakeLists.txt
+index 1a9a6da..20a1c4d 100644
+--- a/data/CMakeLists.txt
++++ b/data/CMakeLists.txt
+@@ -1 +1,2 @@
+ add_subdirectory(systemd)
++add_subdirectory(wayland-sessions)
+diff --git a/data/wayland-sessions/CMakeLists.txt b/data/wayland-sessions/CMakeLists.txt
+new file mode 100644
+index 0000000..75f995e
+--- /dev/null
++++ b/data/wayland-sessions/CMakeLists.txt
+@@ -0,0 +1,2 @@
++install(FILES hawaii.desktop
++    DESTINATION ${CMAKE_INSTALL_DATADIR}/wayland-sessions)
+diff --git a/data/wayland-sessions/hawaii.desktop b/data/wayland-sessions/hawaii.desktop
+new file mode 100644
+index 0000000..4cb173b
+--- /dev/null
++++ b/data/wayland-sessions/hawaii.desktop
+@@ -0,0 +1,6 @@
++[Desktop Entry]
++Name=Hawaii Desktop
++Comment=Desktop Environment from Maui OS
++Exec=hawaii
++Icon=
++Type=Application
+-- 
+2.0.0
+
diff --git a/hawaii-shell.spec b/hawaii-shell.spec
index 0bf0477..3110235 100644
--- a/hawaii-shell.spec
+++ b/hawaii-shell.spec
@@ -12,6 +12,8 @@ URL:            https://github.com/hawaii-desktop/shell
 Source0:        %{name}.tar.gz
 Patch1:         0001-shell-Use-default-wallpaper.patch
 Patch2:         0001-systemd-Install-unit-files-into-proper-location.patch
+Patch3:         0001-hawaii.in-Only-use-the-launcher-if-it-makes-sense.patch
+Patch4:         0002-wayland-sessions-Add-session-launcher-desktop-entry.patch
 
 BuildRequires:  pkgconfig(Qt5Core)
 BuildRequires:  pkgconfig(Qt5DBus)
@@ -34,6 +36,7 @@ BuildRequires:  cmake
 BuildRequires:  qt5-qtaccountsservice-devel >= 0.1.1
 BuildRequires:  qt5-qtconfiguration-devel >= 0.3.0
 
+BuildRequires:  libhawaii-devel
 BuildRequires:  greenisland-devel >= 0.2.0
 BuildRequires:  pkgconfig(glesv2) pkgconfig(egl)
 BuildRequires:  alsa-lib-devel
@@ -64,6 +67,8 @@ the desktop shell is implemented at the moment though.
 %setup -q -n %{name}
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
+%patch4 -p1
 
 
 %build
@@ -79,6 +84,7 @@ make install DESTDIR=%{buildroot}
 %{_bindir}/*
 %{_libdir}/hawaii
 %{_libdir}/weston/hawaii-desktop.so
+%{_datadir}/wayland-sessions
 %{_libexecdir}/*
 %{_datadir}/hawaii
 %{_userunitdir}/*
@@ -91,6 +97,7 @@ make install DESTDIR=%{buildroot}
 %changelog
 * Sun Jun 15 2014 Lubomir Rintel <lkundrak at v3.sk> - 0.2.90-4.20140524git2785c40
 - A later GIT snapshot
+- Enable in GDM
 
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.90-4.20140212gite338ecb
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild


More information about the scm-commits mailing list