All of lore.kernel.org
 help / color / mirror / Atom feed
* [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration
@ 2016-05-16 19:11 Otavio Salvador
  2016-05-16 19:11 ` [oe-core PATCH v6 01/14] weston: Use HTTPS for tarball download Otavio Salvador
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:11 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

Up to now, to make Xwayland to work it required several manual hacks
and it was difficult to make an image which had support for it out of
box.

This patchset intends to set the base for it. It enables weston-init
to be extended to support Xwayland launch when needed.

While working on it, some improvements on weston and weston-init were
done.

Changes in v6:
- New patch.
- Rebase on top of 1.10
- Fix typo on commit log (rborton)
- New patch.
- New patch.
- Add xterm

Changes in v5:
- New patch.

Changes in v4:
- New patch.
- New patch.
- Use --log= for weston call

Changes in v3:
- Fix log redirection
- Fix argument pass for openvt
- New patch.

Changes in v2:
- Remove PAM requirement
- Remove PAM requirement
- Move weston-start module to weston package
- Stop using weston-launch
- Drop weston-lunch use as it requires PAM

Otavio Salvador (11):
  weston: Use HTTPS for tarball download
  weston: Fix SystemD service description
  weston: Add PACKAGECONFIG option for 'clients'
  weston: Enable XWayland when X11 and Wayland support are available
  weston: Remove XWayland dependencies on PACKAGECONFIG
  weston-init: Rework do_install to use install -D option
  weston-init: Rework init sequence to avoid code duplication
  weston: Add Xwayland initialization support using weston-start
  weston-init: Error out if loading a nested instance
  weston-init: Add module support for the weston-start helper
  core-image-weston: If X11 is enabled, add XWayland support

Tom Hochstein (3):
  weston: weston-launch: Handle invalid command line options
  weston: Provide a default version of weston-launch that doesn't
    require PAM
  weston-init: Use weston-launch when starting weston as the first
    windowing system

 meta/recipes-graphics/images/core-image-weston.bb  |   1 +
 meta/recipes-graphics/wayland/weston-init.bb       |  11 +-
 meta/recipes-graphics/wayland/weston-init/init     |   9 +-
 .../wayland/weston-init/weston-start               |  72 +++++++++
 .../wayland/weston-init/weston.service             |   7 +-
 ...ch-Provide-a-default-version-that-doesn-t.patch | 171 +++++++++++++++++++++
 ...eston-launch-exit-for-unrecognized-option.patch |  33 ++++
 .../wayland/weston/xwayland.weston-start           |   7 +
 meta/recipes-graphics/wayland/weston_1.10.0.bb     |  29 ++--
 9 files changed, 311 insertions(+), 29 deletions(-)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-start
 create mode 100644 meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
 create mode 100644 meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
 create mode 100644 meta/recipes-graphics/wayland/weston/xwayland.weston-start

-- 
2.8.2



^ permalink raw reply	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 01/14] weston: Use HTTPS for tarball download
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
@ 2016-05-16 19:11 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 02/14] weston: weston-launch: Handle invalid command line options Otavio Salvador
                   ` (12 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:11 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

The tarball now is served just on the HTTPS URI, thus update the
SRC_URI.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6:
- New patch.

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 meta/recipes-graphics/wayland/weston_1.10.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index ac9c405..fec1e9f 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -5,7 +5,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d79ee9e66bb0f95d3386a7acae780b70 \
                     file://src/compositor.c;endline=23;md5=1d535fed266cf39f6d8c0647f52ac331"
 
-SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://weston.png \
            file://weston.desktop \
            file://make-libwebp-explicitly-configurable.patch \
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 02/14] weston: weston-launch: Handle invalid command line options
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
  2016-05-16 19:11 ` [oe-core PATCH v6 01/14] weston: Use HTTPS for tarball download Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 03/14] weston: Fix SystemD service description Otavio Salvador
                   ` (11 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

From: Tom Hochstein <tom.hochstein@nxp.com>

Exit the program if an unrecognized command line option is found.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6:
- Rebase on top of 1.10

Changes in v5:
- New patch.

Changes in v4: None
Changes in v3: None
Changes in v2: None

 ...eston-launch-exit-for-unrecognized-option.patch | 33 ++++++++++++++++++++++
 meta/recipes-graphics/wayland/weston_1.10.0.bb     |  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch

diff --git a/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch b/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
new file mode 100644
index 0000000..25c8683
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/make-weston-launch-exit-for-unrecognized-option.patch
@@ -0,0 +1,33 @@
+From e8b615250f700f7854b423aaaf0a0aeea92c05a9 Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Sat, 7 May 2016 08:51:58 -0300
+Subject: [PATCH] weston-launch: Handle invalid command line options
+Organization: O.S. Systems Software LTDA.
+
+Exit the program if an unrecognized command line option is found.
+
+Upstream-Status: Submitted
+
+Signed-off-by; Tom Hochstein <tom.hochstein@nxp.com>
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+
+ src/weston-launch.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/weston-launch.c b/src/weston-launch.c
+index b8dfb17..9987d8e 100644
+--- a/src/weston-launch.c
++++ b/src/weston-launch.c
+@@ -703,6 +703,8 @@ main(int argc, char *argv[])
+ 		case 'h':
+ 			help("weston-launch");
+ 			exit(EXIT_FAILURE);
++		default:
++			exit(EXIT_FAILURE);
+ 		}
+ 	}
+ 
+-- 
+2.8.2
+
diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index fec1e9f..5885a7c 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -11,6 +11,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://make-libwebp-explicitly-configurable.patch \
            file://0001-make-error-portable.patch \
            file://0001-configure.ac-Use-PKG_CONFIG_SYSROOT_DIR-for-protocol.patch \
+           file://make-weston-launch-exit-for-unrecognized-option.patch \
 "
 SRC_URI[md5sum] = "1cd17c54ecac6d9a3cd90bf12eaa3e20"
 SRC_URI[sha256sum] = "e0b2004d00d8293ddf7903ca283c1746afa9ccb5919ab50fd04397ff472aa5c1"
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 03/14] weston: Fix SystemD service description
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
  2016-05-16 19:11 ` [oe-core PATCH v6 01/14] weston: Use HTTPS for tarball download Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 02/14] weston: weston-launch: Handle invalid command line options Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 04/14] weston: Add PACKAGECONFIG option for 'clients' Otavio Salvador
                   ` (10 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

This improves the log shown in boot. Now it shows:

  [  OK  ] Started Weston Wayland Compositor

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6:
- Fix typo on commit log (rborton)

Changes in v5: None
Changes in v4:
- New patch.

Changes in v3: None
Changes in v2: None

 meta/recipes-graphics/wayland/weston-init/weston.service | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
index 4f1f7ff..12aedb7 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -1,5 +1,5 @@
 [Unit]
-Description=Weston Wayland compositor startup
+Description=Weston Wayland Compositor
 RequiresMountsFor=/run
 
 [Service]
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 04/14] weston: Add PACKAGECONFIG option for 'clients'
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (2 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 03/14] weston: Fix SystemD service description Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 05/14] weston: Enable XWayland when X11 and Wayland support are available Otavio Salvador
                   ` (9 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

This allow Weston to be build without the clients.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4:
- New patch.

Changes in v3: None
Changes in v2: None

 meta/recipes-graphics/wayland/weston_1.10.0.bb | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index 5885a7c..2fc5806 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -24,9 +24,6 @@ DEPENDS = "libxkbcommon gdk-pixbuf pixman cairo glib-2.0 jpeg"
 DEPENDS += "wayland wayland-protocols libinput virtual/egl pango wayland-native"
 
 EXTRA_OECONF = "--enable-setuid-install \
-                --enable-simple-clients \
-                --enable-clients \
-                --enable-demo-clients-install \
                 --disable-rpi-compositor \
                 --disable-rdp-compositor \
                 "
@@ -41,7 +38,7 @@ PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-                  "
+                   clients"
 #
 # Compositor choices
 #
@@ -75,6 +72,8 @@ PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd
 PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,libxcb libxcursor cairo"
 # colord CMS support
 PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
+# Clients support
+PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
 
 do_install_append() {
 	# Weston doesn't need the .la files to load modules, so wipe them
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 05/14] weston: Enable XWayland when X11 and Wayland support are available
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (3 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 04/14] weston: Add PACKAGECONFIG option for 'clients' Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 06/14] weston: Remove XWayland dependencies on PACKAGECONFIG Otavio Salvador
                   ` (8 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

When the DISTRO has X11 and Wayland support enabled, XWayland ought to
be enabled by default.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Remove PAM requirement

 meta/recipes-graphics/wayland/weston_1.10.0.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index 2fc5806..1e89a8e 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -36,6 +36,7 @@ EXTRA_OECONF_append_qemux86-64 = "\
 		"
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
                    clients"
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 06/14] weston: Remove XWayland dependencies on PACKAGECONFIG
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (4 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 05/14] weston: Enable XWayland when X11 and Wayland support are available Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 07/14] weston: Provide a default version of weston-launch that doesn't require PAM Otavio Salvador
                   ` (7 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

Instead of adding partial dependencies we list the PACKAGECONFIG
options that are required. Those are: X11 and Wayland.

The previous value were redudant with X11 PACKAGECONFIG option and as
it is a requirement, for XWayland, it can be removed to easy
maintenance.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Remove PAM requirement

 meta/recipes-graphics/wayland/weston_1.10.0.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index 1e89a8e..0b881ee 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -69,8 +69,8 @@ PACKAGECONFIG[webp] = "--enable-webp,--disable-webp,libwebp"
 PACKAGECONFIG[libunwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 # Weston with systemd-login support
 PACKAGECONFIG[systemd] = "--enable-systemd-login,--disable-systemd-login,systemd dbus"
-# Weston with Xwayland support
-PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland,libxcb libxcursor cairo"
+# Weston with Xwayland support (requires X11 and Wayland)
+PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
 # colord CMS support
 PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
 # Clients support
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 07/14] weston: Provide a default version of weston-launch that doesn't require PAM
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (5 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 06/14] weston: Remove XWayland dependencies on PACKAGECONFIG Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 08/14] weston-init: Rework do_install to use install -D option Otavio Salvador
                   ` (6 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

From: Tom Hochstein <tom.hochstein@nxp.com>

weston-launch requires PAM for starting weston as a non-root user.

Since starting weston as root is a valid use case by itself, we check
the distro for 'pam' and build weston-launch with or without
non-root-user support.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6:
- New patch.

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 ...ch-Provide-a-default-version-that-doesn-t.patch | 171 +++++++++++++++++++++
 meta/recipes-graphics/wayland/weston_1.10.0.bb     |   9 +-
 2 files changed, 177 insertions(+), 3 deletions(-)
 create mode 100644 meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch

diff --git a/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
new file mode 100644
index 0000000..9a401ee
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/0001-weston-launch-Provide-a-default-version-that-doesn-t.patch
@@ -0,0 +1,171 @@
+From 228349e796e9baa86f2ba8232c730c18ac41283d Mon Sep 17 00:00:00 2001
+From: Tom Hochstein <tom.hochstein@nxp.com>
+Date: Fri, 13 May 2016 09:31:55 -0500
+Subject: [PATCH weston] weston-launch: Provide a default version that doesn't
+ require PAM
+
+weston-launch requires PAM for starting weston as a non-root user.
+
+Since starting weston as root is a valid use case by itself, if
+PAM is not available, provide a default version of weston-launch
+without non-root-user support.
+
+Upstream-Status: Pending
+
+Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
+---
+ Makefile.am         |  3 ---
+ configure.ac        | 12 +++++++-----
+ src/weston-launch.c | 20 ++++++++++++++++++++
+ 3 files changed, 27 insertions(+), 8 deletions(-)
+
+Index: weston-1.10.0/configure.ac
+===================================================================
+--- weston-1.10.0.orig/configure.ac	2016-05-13 11:02:05.711817559 -0500
++++ weston-1.10.0/configure.ac	2016-05-13 13:30:28.000000000 -0500
+@@ -445,13 +445,17 @@
+ AS_IF([test "x$have_systemd_login_209" = "xyes"],
+       [AC_DEFINE([HAVE_SYSTEMD_LOGIN_209], [1], [Have systemd-login >= 209])])
+ 
++AC_ARG_WITH(pam,
++            AS_HELP_STRING([--with-pam], [Use PAM]),
++            [use_pam=$withval], [use_pam=yes])
+ AC_ARG_ENABLE(weston-launch, [  --enable-weston-launch],, enable_weston_launch=yes)
+ AM_CONDITIONAL(BUILD_WESTON_LAUNCH, test x$enable_weston_launch == xyes)
+-if test x$enable_weston_launch == xyes; then
++if test x$enable_weston_launch = xyes -a x$use_pam = xyes; then
+   AC_CHECK_LIB([pam], [pam_open_session], [have_pam=yes], [have_pam=no])
+   if test x$have_pam == xno; then
+-    AC_ERROR([weston-launch requires pam])
++    AC_ERROR([PAM support is explicitly requested, but libpam couldn't be found])
+   fi
++  AC_DEFINE([HAVE_PAM], [1], [Define if PAM is available])
+   PAM_LIBS=-lpam
+   AC_SUBST(PAM_LIBS)
+ fi
+@@ -667,6 +671,7 @@
+ 	Enable developer documentation	${enable_devdocs}
+ 
+ 	weston-launch utility		${enable_weston_launch}
++	PAM support			${use_pam}
+ 	systemd-login support		${have_systemd_login}
+ 	systemd notify support		${enable_systemd_notify}
+ 
+Index: weston-1.10.0/src/weston-launch.c
+===================================================================
+--- weston-1.10.0.orig/src/weston-launch.c	2016-05-13 11:02:05.779817896 -0500
++++ weston-1.10.0/src/weston-launch.c	2016-05-13 11:02:05.851818253 -0500
+@@ -51,7 +51,9 @@
+ 
+ #include <pwd.h>
+ #include <grp.h>
++#ifdef HAVE_PAM
+ #include <security/pam_appl.h>
++#endif
+ 
+ #ifdef HAVE_SYSTEMD_LOGIN
+ #include <systemd/sd-login.h>
+@@ -93,8 +95,10 @@
+ #endif
+ 
+ struct weston_launch {
++#ifdef HAVE_PAM
+ 	struct pam_conv pc;
+ 	pam_handle_t *ph;
++#endif
+ 	int tty;
+ 	int ttynr;
+ 	int sock[2];
+@@ -181,6 +185,7 @@
+ 	return false;
+ }
+ 
++#ifdef HAVE_PAM
+ static int
+ pam_conversation_fn(int msg_count,
+ 		    const struct pam_message **messages,
+@@ -221,6 +226,7 @@
+ 
+ 	return 0;
+ }
++#endif
+ 
+ static int
+ setup_launcher_socket(struct weston_launch *wl)
+@@ -414,6 +420,7 @@
+ 	close(wl->signalfd);
+ 	close(wl->sock[0]);
+ 
++#ifdef HAVE_PAM
+ 	if (wl->new_user) {
+ 		err = pam_close_session(wl->ph, 0);
+ 		if (err)
+@@ -421,6 +428,7 @@
+ 				err, pam_strerror(wl->ph, err));
+ 		pam_end(wl->ph, err);
+ 	}
++#endif
+ 
+ 	if (ioctl(wl->tty, KDSKBMUTE, 0) &&
+ 	    ioctl(wl->tty, KDSKBMODE, wl->kb_mode))
+@@ -600,6 +608,7 @@
+ 	setenv("HOME", wl->pw->pw_dir, 1);
+ 	setenv("SHELL", wl->pw->pw_shell, 1);
+ 
++#ifdef HAVE_PAM
+ 	env = pam_getenvlist(wl->ph);
+ 	if (env) {
+ 		for (i = 0; env[i]; ++i) {
+@@ -608,6 +617,7 @@
+ 		}
+ 		free(env);
+ 	}
++#endif
+ }
+ 
+ static void
+@@ -665,7 +675,9 @@
+ help(const char *name)
+ {
+ 	fprintf(stderr, "Usage: %s [args...] [-- [weston args..]]\n", name);
++#ifdef HAVE_PAM
+ 	fprintf(stderr, "  -u, --user      Start session as specified username\n");
++#endif
+ 	fprintf(stderr, "  -t, --tty       Start session on alternative tty\n");
+ 	fprintf(stderr, "  -v, --verbose   Be verbose\n");
+ 	fprintf(stderr, "  -h, --help      Display this help message\n");
+@@ -678,7 +690,9 @@
+ 	int i, c;
+ 	char *tty = NULL;
+ 	struct option opts[] = {
++#ifdef HAVE_PAM
+ 		{ "user",    required_argument, NULL, 'u' },
++#endif
+ 		{ "tty",     required_argument, NULL, 't' },
+ 		{ "verbose", no_argument,       NULL, 'v' },
+ 		{ "help",    no_argument,       NULL, 'h' },
+@@ -690,9 +704,13 @@
+ 	while ((c = getopt_long(argc, argv, "u:t::vh", opts, &i)) != -1) {
+ 		switch (c) {
+ 		case 'u':
++#ifdef HAVE_PAM
+ 			wl.new_user = optarg;
+ 			if (getuid() != 0)
+ 				error(1, 0, "Permission denied. -u allowed for root only");
++#else
++			error(1, 0, "-u is unsupported in this weston-launch build");
++#endif
+ 			break;
+ 		case 't':
+ 			tty = optarg;
+@@ -730,8 +748,10 @@
+ 	if (setup_tty(&wl, tty) < 0)
+ 		exit(EXIT_FAILURE);
+ 
++#ifdef HAVE_PAM
+ 	if (wl.new_user && setup_pam(&wl) < 0)
+ 		exit(EXIT_FAILURE);
++#endif
+ 
+ 	if (setup_launcher_socket(&wl) < 0)
+ 		exit(EXIT_FAILURE);
diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index 0b881ee..7190b90 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -12,6 +12,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://0001-make-error-portable.patch \
            file://0001-configure.ac-Use-PKG_CONFIG_SYSROOT_DIR-for-protocol.patch \
            file://make-weston-launch-exit-for-unrecognized-option.patch \
+           file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
 "
 SRC_URI[md5sum] = "1cd17c54ecac6d9a3cd90bf12eaa3e20"
 SRC_URI[sha256sum] = "e0b2004d00d8293ddf7903ca283c1746afa9ccb5919ab50fd04397ff472aa5c1"
@@ -37,9 +38,9 @@ EXTRA_OECONF_append_qemux86-64 = "\
 PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'kms fbdev wayland egl', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'x11 wayland', 'xwayland', '', d)} \
-                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'launch', '', d)} \
+                   ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)} \
                    ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', '', d)} \
-                   clients"
+                   clients launch"
 #
 # Compositor choices
 #
@@ -54,7 +55,7 @@ PACKAGECONFIG[headless] = "--enable-headless-compositor,--disable-headless-compo
 # Weston on framebuffer
 PACKAGECONFIG[fbdev] = "--enable-fbdev-compositor,--disable-fbdev-compositor,udev mtdev"
 # weston-launch
-PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,libpam drm"
+PACKAGECONFIG[launch] = "--enable-weston-launch,--disable-weston-launch,drm"
 # VA-API desktop recorder
 PACKAGECONFIG[vaapi] = "--enable-vaapi-recorder,--disable-vaapi-recorder,libva"
 # Weston with EGL support
@@ -75,6 +76,8 @@ PACKAGECONFIG[xwayland] = "--enable-xwayland,--disable-xwayland"
 PACKAGECONFIG[colord] = "--enable-colord,--disable-colord,colord"
 # Clients support
 PACKAGECONFIG[clients] = "--enable-clients --enable-simple-clients --enable-demo-clients-install,--disable-clients --disable-simple-clients"
+# Weston with PAM support
+PACKAGECONFIG[pam] = "--with-pam,--without-pam,libpam"
 
 do_install_append() {
 	# Weston doesn't need the .la files to load modules, so wipe them
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 08/14] weston-init: Rework do_install to use install -D option
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (6 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 07/14] weston: Provide a default version of weston-launch that doesn't require PAM Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 09/14] weston-init: Rework init sequence to avoid code duplication Otavio Salvador
                   ` (5 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

The install -D allow for the parent directories to be created in a
single command line, reducing the code and number of fork during the
build.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 meta/recipes-graphics/wayland/weston-init.bb | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 653541e..4ad62cf 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -8,11 +8,8 @@ SRC_URI = "file://init \
 S = "${WORKDIR}"
 
 do_install() {
-	install -d ${D}/${sysconfdir}/init.d
-	install -m755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
-
-	install -d ${D}${systemd_system_unitdir}
-	install -m0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}
+	install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
+	install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
 }
 
 inherit allarch update-rc.d distro_features_check systemd
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 09/14] weston-init: Rework init sequence to avoid code duplication
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (7 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 08/14] weston-init: Rework do_install to use install -D option Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 10/14] weston: Add Xwayland initialization support using weston-start Otavio Salvador
                   ` (4 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

The new 'weston-start' script redcues the code duplication for SysV
and SystemD based images.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4:
- Use --log= for weston call

Changes in v3:
- Fix log redirection
- Fix argument pass for openvt

Changes in v2: None

 meta/recipes-graphics/wayland/weston-init.bb       |  4 ++-
 meta/recipes-graphics/wayland/weston-init/init     |  9 +-----
 .../wayland/weston-init/weston-start               | 36 ++++++++++++++++++++++
 .../wayland/weston-init/weston.service             |  5 +--
 4 files changed, 41 insertions(+), 13 deletions(-)
 create mode 100755 meta/recipes-graphics/wayland/weston-init/weston-start

diff --git a/meta/recipes-graphics/wayland/weston-init.bb b/meta/recipes-graphics/wayland/weston-init.bb
index 4ad62cf..3a2251e 100644
--- a/meta/recipes-graphics/wayland/weston-init.bb
+++ b/meta/recipes-graphics/wayland/weston-init.bb
@@ -3,13 +3,15 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=4d92cd373abda3937c2bc47fbc49d690"
 
 SRC_URI = "file://init \
-           file://weston.service"
+           file://weston.service \
+           file://weston-start"
 
 S = "${WORKDIR}"
 
 do_install() {
 	install -Dm755 ${WORKDIR}/init ${D}/${sysconfdir}/init.d/weston
 	install -Dm0644 ${WORKDIR}/weston.service ${D}${systemd_system_unitdir}/weston.service
+	install -Dm755 ${WORKDIR}/weston-start ${D}${bindir}/weston-start
 }
 
 inherit allarch update-rc.d distro_features_check systemd
diff --git a/meta/recipes-graphics/wayland/weston-init/init b/meta/recipes-graphics/wayland/weston-init/init
index 2e938f4..5c925f4 100644
--- a/meta/recipes-graphics/wayland/weston-init/init
+++ b/meta/recipes-graphics/wayland/weston-init/init
@@ -31,14 +31,7 @@ case "$1" in
   start)
         . /etc/profile
 
-        # This is all a nasty hack
-        if test -z "$XDG_RUNTIME_DIR"; then
-                export XDG_RUNTIME_DIR=/run/user/root
-                mkdir --parents $XDG_RUNTIME_DIR
-                chmod 0700 $XDG_RUNTIME_DIR
-        fi
-
-        openvt -s weston -- $OPTARGS
+        weston-start -s -- $OPTARGS
   ;;
 
   stop)
diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
new file mode 100755
index 0000000..b791fd5
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Copyright (C) 2016 O.S. Systems Software LTDA.
+
+export PATH="/sbin:/usr/sbin:/bin:/usr/bin"
+
+usage() {
+    cat <<EOF
+    $0 <openvt arguments> -- <weston options>
+EOF
+}
+
+if test $# -lt 2; then
+	usage
+	exit 1
+fi
+
+openvt_args=""
+while [ -n "$1" ]; do
+	openvt_args="$openvt_args $1"
+	shift
+
+	if [ "$1" = "--" ]; then
+		shift
+		break
+	fi
+done
+
+weston_args=$*
+
+if test -z "$XDG_RUNTIME_DIR"; then
+    export XDG_RUNTIME_DIR=/run/user/`id -u`
+    mkdir --parents $XDG_RUNTIME_DIR
+    chmod 0700 $XDG_RUNTIME_DIR
+fi
+
+exec openvt $openvt_args -- weston $weston_args --log=/var/log/weston.log
diff --git a/meta/recipes-graphics/wayland/weston-init/weston.service b/meta/recipes-graphics/wayland/weston-init/weston.service
index 12aedb7..689ce41 100644
--- a/meta/recipes-graphics/wayland/weston-init/weston.service
+++ b/meta/recipes-graphics/wayland/weston-init/weston.service
@@ -5,10 +5,7 @@ RequiresMountsFor=/run
 [Service]
 User=root
 EnvironmentFile=-/etc/default/weston
-Environment="XDG_RUNTIME_DIR=/run/user/root"
-ExecStartPre=/bin/mkdir -p /run/user/root
-ExecStartPre=/bin/chmod 0700 /run/user/root
-ExecStart=/usr/bin/openvt -v -e /usr/bin/weston -- $OPTARGS
+ExecStart=/usr/bin/weston-start -v -e -- $OPTARGS
 
 [Install]
 WantedBy=multi-user.target
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 10/14] weston: Add Xwayland initialization support using weston-start
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (8 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 09/14] weston-init: Rework init sequence to avoid code duplication Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 11/14] weston-init: Error out if loading a nested instance Otavio Salvador
                   ` (3 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

The weston-start script now supports loading modules so the Xwayland
support can be loaded optionally. Use this to load Weston accordingly.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Move weston-start module to weston package
- Stop using weston-launch

 meta/recipes-graphics/wayland/weston/xwayland.weston-start | 7 +++++++
 meta/recipes-graphics/wayland/weston_1.10.0.bb             | 7 ++++++-
 2 files changed, 13 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-graphics/wayland/weston/xwayland.weston-start

diff --git a/meta/recipes-graphics/wayland/weston/xwayland.weston-start b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
new file mode 100644
index 0000000..b483c97
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/xwayland.weston-start
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+if type Xwayland  >/dev/null 2>/dev/null; then
+	mkdir -p /tmp/.X11-unix
+
+	add_weston_argument "--modules=xwayland.so"
+fi
diff --git a/meta/recipes-graphics/wayland/weston_1.10.0.bb b/meta/recipes-graphics/wayland/weston_1.10.0.bb
index 7190b90..77f6e93 100644
--- a/meta/recipes-graphics/wayland/weston_1.10.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.10.0.bb
@@ -11,6 +11,7 @@ SRC_URI = "https://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://make-libwebp-explicitly-configurable.patch \
            file://0001-make-error-portable.patch \
            file://0001-configure.ac-Use-PKG_CONFIG_SYSROOT_DIR-for-protocol.patch \
+           file://xwayland.weston-start \
            file://make-weston-launch-exit-for-unrecognized-option.patch \
            file://0001-weston-launch-Provide-a-default-version-that-doesn-t.patch \
 "
@@ -90,7 +91,11 @@ do_install_append() {
 
 		install -d ${D}${datadir}/icons/hicolor/48x48/apps
 		install ${WORKDIR}/weston.png ${D}${datadir}/icons/hicolor/48x48/apps
-        fi
+	fi
+
+	if [ "${@bb.utils.contains('PACKAGECONFIG', 'xwayland', 'yes', 'no', d)}" = "yes" ]; then
+		install -Dm 644 ${WORKDIR}/xwayland.weston-start ${D}${datadir}/weston-start/xwayland
+	fi
 }
 
 PACKAGES += "${PN}-examples"
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 11/14] weston-init: Error out if loading a nested instance
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (9 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 10/14] weston: Add Xwayland initialization support using weston-start Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 12/14] weston-init: Add module support for the weston-start helper Otavio Salvador
                   ` (2 subsequent siblings)
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

The Weston nested instance support is not implemented. This errors out
displaying an informative error message so someone insterested on it
may look at implement this later.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 meta/recipes-graphics/wayland/weston-init/weston-start | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index b791fd5..dc2b1ef 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -14,6 +14,11 @@ if test $# -lt 2; then
 	exit 1
 fi
 
+if [ -n "$WAYLAND_DISPLAY" ]; then
+	echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
+	exit 1
+fi
+
 openvt_args=""
 while [ -n "$1" ]; do
 	openvt_args="$openvt_args $1"
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 12/14] weston-init: Add module support for the weston-start helper
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (10 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 11/14] weston-init: Error out if loading a nested instance Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 13/14] weston-init: Use weston-launch when starting weston as the first windowing system Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 14/14] core-image-weston: If X11 is enabled, add XWayland support Otavio Salvador
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

To make weston-start more flexible we now support module loading. For
such modules, following functions can be used:

 - add_weston_argument
 - add_openvt_argument

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6: None
Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2:
- Drop weston-lunch use as it requires PAM

 .../wayland/weston-init/weston-start               | 26 ++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index dc2b1ef..17b0c16 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -9,6 +9,19 @@ usage() {
 EOF
 }
 
+## Module support
+modules_dir=/usr/share/weston-start
+
+# Add weston extra argument
+add_weston_argument() {
+	weston_args="$weston_args $1"
+}
+
+# Add openvt extra argument
+add_openvt_argument() {
+	openvt_args="$openvt_args $1"
+}
+
 if test $# -lt 2; then
 	usage
 	exit 1
@@ -32,6 +45,19 @@ done
 
 weston_args=$*
 
+# Load and run modules
+if [ -d "$modules_dir" ]; then
+	for m in "$modules_dir"/*; do
+		# Skip backup files
+		if [ "`echo $m | sed -e 's/\~$//'`" != "$m" ]; then
+			continue
+		fi
+
+		# process module
+		. $m
+	done
+fi
+
 if test -z "$XDG_RUNTIME_DIR"; then
     export XDG_RUNTIME_DIR=/run/user/`id -u`
     mkdir --parents $XDG_RUNTIME_DIR
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 13/14] weston-init: Use weston-launch when starting weston as the first windowing system
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (11 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 12/14] weston-init: Add module support for the weston-start helper Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  2016-05-16 19:12 ` [oe-core PATCH v6 14/14] core-image-weston: If X11 is enabled, add XWayland support Otavio Salvador
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

From: Tom Hochstein <tom.hochstein@nxp.com>

When  weston is started as the first windowing system (i.e. not under X
nor under another Wayland server), it should be done with  the  command
weston-launch to set up proper privileged access to devices.

Signed-off-by: Tom Hochstein <tom.hochstein@nxp.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6:
- New patch.

Changes in v5: None
Changes in v4: None
Changes in v3: None
Changes in v2: None

 meta/recipes-graphics/wayland/weston-init/weston-start | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-graphics/wayland/weston-init/weston-start b/meta/recipes-graphics/wayland/weston-init/weston-start
index 17b0c16..2d398b6 100755
--- a/meta/recipes-graphics/wayland/weston-init/weston-start
+++ b/meta/recipes-graphics/wayland/weston-init/weston-start
@@ -31,6 +31,11 @@ if [ -n "$WAYLAND_DISPLAY" ]; then
 	echo "ERROR: A Wayland compositor is already running, nested Weston instance is not supported yet."
 	exit 1
 fi
+if [ -n "$DISPLAY" ]; then
+	launcher="weston"
+else
+	launcher="weston-launch --"
+fi
 
 openvt_args=""
 while [ -n "$1" ]; do
@@ -64,4 +69,4 @@ if test -z "$XDG_RUNTIME_DIR"; then
     chmod 0700 $XDG_RUNTIME_DIR
 fi
 
-exec openvt $openvt_args -- weston $weston_args --log=/var/log/weston.log
+exec openvt $openvt_args -- $launcher $weston_args --log=/var/log/weston.log
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [oe-core PATCH v6 14/14] core-image-weston: If X11 is enabled, add XWayland support
  2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
                   ` (12 preceding siblings ...)
  2016-05-16 19:12 ` [oe-core PATCH v6 13/14] weston-init: Use weston-launch when starting weston as the first windowing system Otavio Salvador
@ 2016-05-16 19:12 ` Otavio Salvador
  13 siblings, 0 replies; 15+ messages in thread
From: Otavio Salvador @ 2016-05-16 19:12 UTC (permalink / raw)
  To: OpenEmbedded Core Mailing List
  Cc: prabhu.sundararaj, Otavio Salvador, meta-freescale Mailing List

When the distribution has X11 and Wayland backends, we enable XWayland
support and include XTerm as a test application for the XWayland
backend.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---

Changes in v6:
- Add xterm

Changes in v5: None
Changes in v4: None
Changes in v3:
- New patch.

Changes in v2: None

 meta/recipes-graphics/images/core-image-weston.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-graphics/images/core-image-weston.bb b/meta/recipes-graphics/images/core-image-weston.bb
index 52e271d..07ae70b 100644
--- a/meta/recipes-graphics/images/core-image-weston.bb
+++ b/meta/recipes-graphics/images/core-image-weston.bb
@@ -9,3 +9,4 @@ inherit core-image distro_features_check
 REQUIRED_DISTRO_FEATURES = "wayland"
 
 CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples gtk+3-demo clutter-1.0-examples"
+CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'xserver-xorg-xwayland xterm', '', d)}"
-- 
2.8.2



^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-05-16 19:15 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-16 19:11 [oe-core PATCH v6 00/14] Improve Weston and Xwayland integration Otavio Salvador
2016-05-16 19:11 ` [oe-core PATCH v6 01/14] weston: Use HTTPS for tarball download Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 02/14] weston: weston-launch: Handle invalid command line options Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 03/14] weston: Fix SystemD service description Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 04/14] weston: Add PACKAGECONFIG option for 'clients' Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 05/14] weston: Enable XWayland when X11 and Wayland support are available Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 06/14] weston: Remove XWayland dependencies on PACKAGECONFIG Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 07/14] weston: Provide a default version of weston-launch that doesn't require PAM Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 08/14] weston-init: Rework do_install to use install -D option Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 09/14] weston-init: Rework init sequence to avoid code duplication Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 10/14] weston: Add Xwayland initialization support using weston-start Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 11/14] weston-init: Error out if loading a nested instance Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 12/14] weston-init: Add module support for the weston-start helper Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 13/14] weston-init: Use weston-launch when starting weston as the first windowing system Otavio Salvador
2016-05-16 19:12 ` [oe-core PATCH v6 14/14] core-image-weston: If X11 is enabled, add XWayland support Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.