package/x11r7/xwayland: new package
PATCH 1/1 package/x11r7/xwayland: new package
XServer to run X clients under wayland
This XServer is required to run the X clients under Wayland compositor, for example weston or wlroots based compositors.
--- DEVELOPERS | 1 + package/weston/Config.in | 8 +++ package/weston/weston.mk | 2 +- package/wlroots/Config.in | 12 ++++ package/wlroots/wlroots.mk | 6 +- package/x11r7/Config.in | 1 + package/x11r7/xwayland/Config.in | 26 ++++++++ package/x11r7/xwayland/xwayland.hash | 6 ++ package/x11r7/xwayland/xwayland.mk | 94 ++++++++++++++++++++++++++++ 9 files changed, 154 insertions(+), 2 deletions(-) create mode 100644 package/x11r7/xwayland/Config.in create mode 100644 package/x11r7/xwayland/xwayland.hash create mode 100644 package/x11r7/xwayland/xwayland.mk
DEVELOPERS +1 -0
@@ -2515,6 +2515,7 @@ F: support/testing/tests/package/test_python_s3transfer.py N: Raphael Pavlidis <[email protected]> F: package/slirp4netns/ F: package/sway/ +F: package/x11r7/xwayland/ N: Refik Tuzakli <[email protected]> F: package/freescale-imx/
package/weston/Config.in +8 -0
@@ -111,14 +111,22 @@ config BR2_PACKAGE_WESTON_XWAYLAND bool "XWayland support" depends on BR2_PACKAGE_XORG7 depends on BR2_PACKAGE_LIBEPOXY + depends on BR2_USE_MMU # xwayland + depends on !BR2_STATIC_LIBS # xwayland + depends on BR2_TOOLCHAIN_HAS_THREADS # xwayland select BR2_PACKAGE_CAIRO select BR2_PACKAGE_LIBXCB select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XWAYLAND comment "XWayland support needs libepoxy and X.org enabled" depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_LIBEPOXY +comment "XWayland support needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + # Weston needs at least one shell; this can be one of the bundled ones, # below, of from a third-party package, which should then select this. config BR2_PACKAGE_WESTON_HAS_SHELL
package/weston/weston.mk +1 -1
@@ -123,7 +123,7 @@ WESTON_CONF_OPTS += -Dbackend-default=$(call qstrip,$(BR2_PACKAGE_WESTON_DEFAULT ifeq ($(BR2_PACKAGE_WESTON_XWAYLAND),y) WESTON_CONF_OPTS += -Dxwayland=true -WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor +WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor xwayland else WESTON_CONF_OPTS += -Dxwayland=false endif
package/wlroots/Config.in +12 -0
@@ -41,4 +41,16 @@ config BR2_PACKAGE_WLROOTS_X11 help Support Wayland sessions nested inside a X11 window +config BR2_PACKAGE_WLROOTS_XWAYLAND + bool "XWayland support" + depends on BR2_PACKAGE_XORG7 # libxcb, xcb-util-wm, xwayland + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_XWAYLAND + help + Support for X11 applications + +comment "XWayland support needs X.org enabled" + depends on !BR2_PACKAGE_XORG7 + endif
package/wlroots/wlroots.mk +5 -1
@@ -30,8 +30,12 @@ WLROOTS_BACKENDS = libinput drm ifeq ($(BR2_PACKAGE_WLROOTS_X11),y) WLROOTS_BACKENDS += x11 -WLROOTS_CONF_OPTS += -Dxwayland=enabled WLROOTS_DEPENDENCIES += libxcb xcb-util-wm xcb-util-renderutil xlib_libX11 +endif + +ifeq ($(BR2_PACKAGE_WLROOTS_XWAYLAND),y) +WLROOTS_CONF_OPTS += -Dxwayland=enabled +WLROOTS_DEPENDENCIES += libxcb xcb-util-wm xwayland else WLROOTS_CONF_OPTS += -Dxwayland=disabled endif
package/x11r7/Config.in +1 -0
@@ -12,6 +12,7 @@ menuconfig BR2_PACKAGE_XORG7 if BR2_PACKAGE_XORG7 menu "X11R7 Servers" source package/x11r7/xserver_xorg-server/Config.in + source package/x11r7/xwayland/Config.in endmenu menu "X11R7 Libraries" source package/x11r7/libxcb/Config.in
package/x11r7/xwayland/Config.in new file +26 -0
@@ -0,0 +1,26 @@ +config BR2_PACKAGE_XWAYLAND + bool "xwayland server" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + # We need a SHA1 implementation. If either openssl or + # libgcrypt are already part of the build, we'll use one of + # them, otherwise, use the small libsha1 library. + select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT) + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + select BR2_PACKAGE_XLIB_LIBXCVT + select BR2_PACKAGE_XLIB_LIBXFONT2 + select BR2_PACKAGE_XLIB_LIBXKBFILE + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XORGPROTO + help + X.Org X server to run X clients under wayland + + http://xorg.freedesktop.org + +comment "xwayland needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/x11r7/xwayland/xwayland.hash new file +6 -0
@@ -0,0 +1,6 @@ +# From https://lists.x.org/archives/xorg-announce/2023-February/003322.html +sha256 d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73 xwayland-22.1.8.tar.xz +sha512 f52c6f99d8ef7605bc1c651d5ee5e306c12af30649a2d712b1c4c3cf4c7c80246ae24bd9ac39461d47aafc78f5d659446a459cd6259e05ef3128b204981d114a xwayland-22.1.8.tar.xz + +# Locally calculated +sha256 4cc0447a22635c7b2f1a93fec4aa94f1970fadeb72a063de006b51cf4963a06f COPYING
package/x11r7/xwayland/xwayland.mk new file +94 -0
94 lines not on this page · raw message
Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello
Quoted 6 lines · On Wed, 15 Feb 2023 15:35:34 +0100 Raphael Pavlidis…
XServer to run X clients under wayland
This XServer is required to run the X clients under Wayland compositor, for example weston or wlroots based compositors.
Signed-off-by Raphael Pavlidis <[email protected]>
Thanks for the patch! I have a few questions/suggestions below.
Quoted 10 lines
DEVELOPERS | 1 + package/weston/Config.in | 8 +++ package/weston/weston.mk | 2 +- package/wlroots/Config.in | 12 ++++ package/wlroots/wlroots.mk | 6 +- package/x11r7/Config.in | 1 + package/x11r7/xwayland/Config.in | 26 ++++++++ package/x11r7/xwayland/xwayland.hash | 6 ++ package/x11r7/xwayland/xwayland.mk | 94 ++++++++++++++++++++++++++++ 9 files changed, 154 insertions(+), 2 deletions(-)
This should probably be split into 3 patches: one adding the xwayland package, one tweaking the existing weston package, and one tweaking the wlroots package.
Quoted 6 lines
package/weston/Config.in +0
-0@@ -111,14 +111,22 @@ config BR2_PACKAGE_WESTON_XWAYLAND bool "XWayland support"
package/weston/Config.in config BR2_PACKAGE_WESTON_XWAYLAND · line 121
Quoted 10 lines
package/weston/Config.in +4
-0depends on BR2_PACKAGE_XORG7 depends on BR2_PACKAGE_LIBEPOXY + depends on BR2_USE_MMU # xwayland + depends on !BR2_STATIC_LIBS # xwayland + depends on BR2_TOOLCHAIN_HAS_THREADS # xwayland select BR2_PACKAGE_CAIRO select BR2_PACKAGE_LIBXCB select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XWAYLAND
So does that means that the current BR2_PACKAGE_WESTON_XWAYLAND option is broken?
I am rather confused by how XWayland works. Isn't XWayland a normal Wayland client? Why does Weston or wlroots, as Wayland compositors, need to have some support/knowledge for XWayland?
package/weston/Config.in config BR2_PACKAGE_WESTON_XWAYLAND · line 127
Quoted 6 lines
package/weston/Config.in +6
-0+config BR2_PACKAGE_WLROOTS_XWAYLAND + bool "XWayland support" + depends on BR2_PACKAGE_XORG7 # libxcb, xcb-util-wm, xwayland + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_XWAYLAND
Since you're selecting BR2_PACKAGE_XWAYLAND, you need to replicate:
depends on BR2_USE_MMU # fork() depends on !BR2_STATIC_LIBS # wayland depends on BR2_TOOLCHAIN_HAS_THREADS # wayland
and add the corresponding Config.in comment.
package/wlroots/wlroots.mk WLROOTS_BACKENDS = libinput drm · line 33
Quoted 9 lines
package/wlroots/wlroots.mk +0
-1@@ -30,8 +30,12 @@ WLROOTS_BACKENDS = libinput drm ifeq ($(BR2_PACKAGE_WLROOTS_X11),y) WLROOTS_BACKENDS += x11 -WLROOTS_CONF_OPTS += -Dxwayland=enabled
So this is also a bug in the current package?
What is WLROOTS_X11 controlling then? Running wlroots as a X11 client?
Otherwise, the xwayland package looks fine from a pure review point of view (I did not do any testing).
Thanks!
Thomas
Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin Embedded Linux and Kernel engineering and training https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Thomas,
On 15.02.23 21:22, Thomas Petazzoni wrote:
[SNIP]
Quoted 6 lines
This should probably be split into 3 patches: one adding the xwayland package, one tweaking the existing weston package, and one tweaking the wlroots package.
Okay, I will split the commit into 3 patches.
[SNIP]
Quoted 4 lines
So does that means that the current
BR2_PACKAGE_WESTON_XWAYLANDoption is broken?
Yes, it is broken. To use the XWayland support, you need the XWayland binary, which is not build yet by buildroot.
Quoted 3 lines
I am rather confused by how XWayland works. Isn't XWayland a normal Wayland client? Why does Weston or wlroots, as Wayland compositors, need to have some support/knowledge for XWayland?
Yes, as far as I know, it is a Wayland client. It acts as an XServer, which X11 application connects to, and then it forward (lets say) to the Wayland compositor. The Wayland compositor executes the XWayland server. The compositor needs the xwayland as build dependency, because in the .pc file it is written, where the xwayland binary is located and which features are enabled.
https://gitlab.freedesktop.org/wlroots/wlroots/-/blob/master/xwayland/meson.build#L65
[SNIP]
Quoted 9 lines
Since you're selecting
BR2_PACKAGE_XWAYLAND, you need to replicate:depends on
BR2_USE_MMU#fork()depends on !BR2_STATIC_LIBS # wayland depends onBR2_TOOLCHAIN_HAS_THREADS# waylandand add the corresponding Config.in comment.
Good point, I forgot that.
[SNIP]
Quoted 4 lines
So this is also a bug in the current package?
What is
WLROOTS_X11controlling then? Running wlroots as a X11 client?
The X11 backend has nothing to do with the XWayland support. X11 backend means that the compositor can run on an XServer. The XWayland support means that X11 application can run on the Wayland compositor.
[SNIP]
Thanks,
Raphael Pavlidis
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 1/3 package/x11r7/xwayland: new package
In reply to Raphael PavlidisXServer to run X clients under wayland
This XServer is required to run the X clients under Wayland compositor, for example weston or wlroots based compositors.
---
Changes v1 -> v2:
- split up patches in 3 parts
- add missing depends on in wlroots
DEVELOPERS | 1 + package/x11r7/Config.in | 1 + package/x11r7/xwayland/Config.in | 26 ++++++++ package/x11r7/xwayland/xwayland.hash | 6 ++ package/x11r7/xwayland/xwayland.mk | 94 ++++++++++++++++++++++++++++ 5 files changed, 128 insertions(+) create mode 100644 package/x11r7/xwayland/Config.in create mode 100644 package/x11r7/xwayland/xwayland.hash create mode 100644 package/x11r7/xwayland/xwayland.mk
DEVELOPERS +1 -0
@@ -2417,6 +2417,7 @@ F: support/testing/tests/package/test_python_s3transfer.py N: Raphael Pavlidis <[email protected]> F: package/slirp4netns/ F: package/sway/ +F: package/x11r7/xwayland/ N: Refik Tuzakli <[email protected]> F: package/freescale-imx/
package/x11r7/Config.in +1 -0
@@ -12,6 +12,7 @@ menuconfig BR2_PACKAGE_XORG7 if BR2_PACKAGE_XORG7 menu "X11R7 Servers" source package/x11r7/xserver_xorg-server/Config.in + source package/x11r7/xwayland/Config.in endmenu menu "X11R7 Libraries" source package/x11r7/libxcb/Config.in
package/x11r7/xwayland/Config.in new file +26 -0
@@ -0,0 +1,26 @@ +config BR2_PACKAGE_XWAYLAND + bool "xwayland server" + depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # wayland + depends on BR2_TOOLCHAIN_HAS_THREADS # wayland + # We need a SHA1 implementation. If either openssl or + # libgcrypt are already part of the build, we'll use one of + # them, otherwise, use the small libsha1 library. + select BR2_PACKAGE_LIBSHA1 if (!BR2_PACKAGE_OPENSSL && !BR2_PACKAGE_LIBGCRYPT) + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_WAYLAND + select BR2_PACKAGE_WAYLAND_PROTOCOLS + select BR2_PACKAGE_XLIB_LIBXCVT + select BR2_PACKAGE_XLIB_LIBXFONT2 + select BR2_PACKAGE_XLIB_LIBXKBFILE + select BR2_PACKAGE_XLIB_LIBXRANDR + select BR2_PACKAGE_XLIB_XTRANS + select BR2_PACKAGE_XORGPROTO + help + X.Org X server to run X clients under wayland + + http://xorg.freedesktop.org + +comment "xwayland needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS
package/x11r7/xwayland/xwayland.hash new file +6 -0
@@ -0,0 +1,6 @@ +# From https://lists.x.org/archives/xorg-announce/2023-February/003322.html +sha256 d11eeee73290b88ea8da42a7d9350dedfaba856ce4ae44e58c045ad9ecaa2f73 xwayland-22.1.8.tar.xz +sha512 f52c6f99d8ef7605bc1c651d5ee5e306c12af30649a2d712b1c4c3cf4c7c80246ae24bd9ac39461d47aafc78f5d659446a459cd6259e05ef3128b204981d114a xwayland-22.1.8.tar.xz + +# Locally calculated +sha256 4cc0447a22635c7b2f1a93fec4aa94f1970fadeb72a063de006b51cf4963a06f COPYING
package/x11r7/xwayland/xwayland.mk new file +94 -0
94 lines not on this page · raw message
Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/3 package/weston: add xwayland dependency
If the XWayland support is enabled then build the corresponding XServer.
--- package/weston/Config.in | 10 +++++++++- package/weston/weston.mk | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-)
package/weston/Config.in +9 -1
@@ -109,16 +109,24 @@ comment "X11 (nested) compositor needs X.org enabled" config BR2_PACKAGE_WESTON_XWAYLAND bool "XWayland support" - depends on BR2_PACKAGE_XORG7 depends on BR2_PACKAGE_LIBEPOXY + depends on BR2_PACKAGE_XORG7 # xwayland + depends on BR2_USE_MMU # xwayland + depends on !BR2_STATIC_LIBS # xwayland + depends on BR2_TOOLCHAIN_HAS_THREADS # xwayland select BR2_PACKAGE_CAIRO select BR2_PACKAGE_LIBXCB select BR2_PACKAGE_XLIB_LIBX11 select BR2_PACKAGE_XLIB_LIBXCURSOR + select BR2_PACKAGE_XWAYLAND comment "XWayland support needs libepoxy and X.org enabled" depends on !BR2_PACKAGE_XORG7 || !BR2_PACKAGE_LIBEPOXY +comment "XWayland support needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + # Weston needs at least one shell; this can be one of the bundled ones, # below, of from a third-party package, which should then select this. config BR2_PACKAGE_WESTON_HAS_SHELL
package/weston/weston.mk +1 -1
@@ -123,7 +123,7 @@ WESTON_CONF_OPTS += -Dbackend-default=$(call qstrip,$(BR2_PACKAGE_WESTON_DEFAULT ifeq ($(BR2_PACKAGE_WESTON_XWAYLAND),y) WESTON_CONF_OPTS += -Dxwayland=true -WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor +WESTON_DEPENDENCIES += cairo libepoxy libxcb xlib_libX11 xlib_libXcursor xwayland else WESTON_CONF_OPTS += -Dxwayland=false endif
Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 2/3] package/weston: add xwayland dependency
Quoted 4 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Raphael" == Raphael Pavlidis <[email protected]> writes:
If the XWayland support is enabled then build the corresponding XServer.
Signed-off-by Raphael Pavlidis <[email protected]>
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/3 package/wlroots: add XWayland support
In reply to Raphael PavlidisThe new option enables the XWayland support, so X11 application can be running on a wlroots based compositor. Also, do not enable the XWayland support if the X11 backend is active.
--- package/wlroots/Config.in | 19 +++++++++++++++++++ package/wlroots/wlroots.mk | 6 +++++- 2 files changed, 24 insertions(+), 1 deletion(-)
package/wlroots/Config.in +19 -0
@@ -41,4 +41,23 @@ config BR2_PACKAGE_WLROOTS_X11 help Support Wayland sessions nested inside a X11 window +config BR2_PACKAGE_WLROOTS_XWAYLAND + bool "XWayland support" + depends on BR2_PACKAGE_XORG7 # libxcb, xcb-util-wm, xwayland + depends on BR2_USE_MMU # xwayland + depends on !BR2_STATIC_LIBS # xwayland + depends on BR2_TOOLCHAIN_HAS_THREADS # xwayland + select BR2_PACKAGE_LIBXCB + select BR2_PACKAGE_XCB_UTIL_WM + select BR2_PACKAGE_XWAYLAND + help + Support for X11 applications + +comment "XWayland support needs X.org enabled" + depends on !BR2_PACKAGE_XORG7 + +comment "XWayland support needs a toolchain w/ threads, dynamic library" + depends on BR2_USE_MMU + depends on !BR2_TOOLCHAIN_HAS_THREADS || BR2_STATIC_LIBS + endif
package/wlroots/wlroots.mk +5 -1
@@ -30,8 +30,12 @@ WLROOTS_BACKENDS = libinput drm ifeq ($(BR2_PACKAGE_WLROOTS_X11),y) WLROOTS_BACKENDS += x11 -WLROOTS_CONF_OPTS += -Dxwayland=enabled WLROOTS_DEPENDENCIES += libxcb xcb-util-wm xcb-util-renderutil xlib_libX11 +endif + +ifeq ($(BR2_PACKAGE_WLROOTS_XWAYLAND),y) +WLROOTS_CONF_OPTS += -Dxwayland=enabled +WLROOTS_DEPENDENCIES += libxcb xcb-util-wm xwayland else WLROOTS_CONF_OPTS += -Dxwayland=disabled endif
Signature · 6 lines
2.39.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH v2 3/3] package/wlroots: add XWayland support
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Raphael" == Raphael Pavlidis <[email protected]> writes:
The new option enables the XWayland support, so X11 application can be running on a wlroots based compositor. Also, do not enable the XWayland support if the X11 backend is active.
Signed-off-by Raphael Pavlidis <[email protected]>
Slightly tweaked the commit message and committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Raphael" == Raphael Pavlidis <[email protected]> writes:
XServer to run X clients under wayland
This XServer is required to run the X clients under Wayland compositor, for example weston or wlroots based compositors.Signed-off-by Raphael Pavlidis <[email protected]>---
Changes v1 -> v2:
- split up patches in 3 parts
- add missing depends on in wlroots
Committed, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot