core-image.bbclass: add a weston IMAGE_FEATURE, similar to x11-base
PATCH 1/3 core-image.bbclass: add a weston IMAGE_FEATURE, similar to x11-base
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/classes/core-image.bbclass | 2 ++ meta/recipes-graphics/images/core-image-weston.bb | 8 +++----- .../packagegroups/packagegroup-core-weston.bb | 13 +++++++++++++ 3 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 meta/recipes-graphics/packagegroups/packagegroup-core-weston.bb
meta/classes/core-image.bbclass +2 -0
@@ -9,6 +9,7 @@ # # Available IMAGE_FEATURES: # +# - weston - Weston Wayland compositor # - x11 - X server # - x11-base - X server with minimal environment # - x11-sato - OpenedHand Sato environment
@@ -37,6 +38,7 @@ # - stateless-rootfs - systemctl-native not run, image populated by systemd at runtime # - splash - bootup splash screen # +FEATURE_PACKAGES_weston = "packagegroup-core-weston" FEATURE_PACKAGES_x11 = "packagegroup-core-x11" FEATURE_PACKAGES_x11-base = "packagegroup-core-x11-base" FEATURE_PACKAGES_x11-sato = "packagegroup-core-x11-sato"
meta/recipes-graphics/images/core-image-weston.bb +3 -5
@@ -1,14 +1,12 @@ SUMMARY = "A very basic Wayland image with a terminal" -IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs" +IMAGE_FEATURES += "splash package-management ssh-server-dropbear hwcodecs weston" LICENSE = "MIT" -inherit core-image features_check +inherit core-image -REQUIRED_DISTRO_FEATURES = "wayland" - -CORE_IMAGE_BASE_INSTALL += "weston weston-init weston-examples wayland-utils gtk+3-demo clutter-1.0-examples" +CORE_IMAGE_BASE_INSTALL += "gtk+3-demo clutter-1.0-examples" CORE_IMAGE_BASE_INSTALL += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'weston-xwayland matchbox-terminal', '', d)}" QB_MEM = "-m 512"
meta/recipes-graphics/packagegroups/packagegroup-core-weston.bb new file +13 -0
@@ -0,0 +1,13 @@ +SUMMARY = "Basic Weston compositor setup" +DESCRIPTION = "Packages required to set up a basic working Weston session" +PR = "r1" + +inherit packagegroup features_check +REQUIRED_DISTRO_FEATURES = "wayland" + +RDEPENDS_${PN} = "\ + weston \ + weston-init \ + weston-examples \ + wayland-utils \ + "
Signature · 1 line
2.29.2
PATCH 2/3 rootfs-postcommands: correctly set systemd target for weston images
Otherwise, weston wouldn't actually start when systemd is in use.
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/classes/rootfs-postcommands.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/rootfs-postcommands.bbclass +1 -1
@@ -34,7 +34,7 @@ ROOTFS_POSTUNINSTALL_COMMAND =+ "write_image_manifest ; " # Set default postinst log file POSTINST_LOGFILE ?= "${localstatedir}/log/postinstall.log" # Set default target for systemd images -SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains("IMAGE_FEATURES", "x11-base", "graphical.target", "multi-user.target", d)}' +SYSTEMD_DEFAULT_TARGET ?= '${@bb.utils.contains_any("IMAGE_FEATURES", [ "x11-base", "weston" ], "graphical.target", "multi-user.target", d)}' ROOTFS_POSTPROCESS_COMMAND += '${@bb.utils.contains("DISTRO_FEATURES", "systemd", "set_systemd_default_target; systemd_create_users;", "", d)}' ROOTFS_POSTPROCESS_COMMAND += 'empty_var_volatile;'
Signature · 1 line
2.29.2
PATCH 3/3 oeqa/weston: correctly run wayland-info when systemd is in use
In reply to Alexander KanavinUnder systemd weston's socket is in /run, not in /run/user/0.
Signed-off-by Alexander Kanavin <[email protected]>
--- meta/lib/oeqa/runtime/cases/weston.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/lib/oeqa/runtime/cases/weston.py +5 -1
@@ -53,7 +53,11 @@ class WestonTest(OERuntimeTestCase): @OEHasPackage(['wayland-utils']) def test_wayland_info(self): - status, output = self.target.run(self.get_weston_command('wayland-info')) + if 'systemd' in self.tc.td['VIRTUAL-RUNTIME_init_manager']: + command = 'XDG_RUNTIME_DIR=/run wayland-info' + else: + command = self.get_weston_command('wayland-info') + status, output = self.target.run(command) self.assertEqual(status, 0, msg='wayland-info error: %s' % output) @OEHasPackage(['weston'])
Signature · 1 line
2.29.2