Page MenuHomeFreeBSD

x11-servers/xwayland: update to 22.1.2
ClosedPublic

Authored by bapt on Jun 29 2022, 3:59 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 13 2024, 7:40 AM
Unknown Object (File)
Jan 3 2024, 4:26 AM
Unknown Object (File)
Dec 28 2023, 12:16 AM
Unknown Object (File)
Dec 20 2023, 6:29 AM
Unknown Object (File)
Dec 3 2023, 7:18 AM
Unknown Object (File)
Nov 5 2023, 2:40 AM
Unknown Object (File)
Jun 26 2023, 4:01 PM
Unknown Object (File)
May 9 2023, 1:10 AM
Subscribers

Details

Reviewers
jbeich
manu
Group Reviewers
x11

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 46475
Build 43364: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Jun 29 2022, 3:59 PM

Remove wlroots patch added by accident

Add patches from xwayland-devel

Duplicate of D28782? I'm unlikely to switch consumers (wlroots{,-devel}, arcan, plasma5-kwin) to xwayland (non-devel). Upstream QA is GNOME-centric via Fedora but GNOME/Wayland isn't supported on FreeBSD. Standalone releases removed non-Xwayland code which complicates cherry-picking upstream fixes because the development still happens in xorg/xnest/xwayland/etc monorepo.

x11-servers/xwayland/Makefile
43

Debug leftover?

46

Why += if MASTERDIR is gone?

50

What's the point if you have USE_XORG+=xdmcp?

51

Already default:

option('xcsecurity', type: 'boolean', value: false,                                                                                     
       description: 'Security extension')

Note, xorg-xwayland in Arch Linux has -D xcsecurity=true and xorg-server in FreeBSD has --enable-xcsecurity.

53

Already default (via implicit -Dxwayland=true):

        build_glamor = glamor_option == 'true' or glamor_option == 'auto'                                                               
[...]
if glamor_option == 'auto'                                                                                                              
    build_glamor = build_xorg or build_xwayland                                                                                         
else                                                                                                                                    
    build_glamor = glamor_option == 'true'                                                                                              
endif
54
55

Pointless. If has_function('getaddrinfo') fails there're larger problems.

57

x11/xkeyboard-config uses /var/lib/xkb in post-install, not /var/db/xkb.

Duplicate of D28782? I'm unlikely to switch consumers (wlroots{,-devel}, arcan, plasma5-kwin) to xwayland (non-devel). Upstream QA is GNOME-centric via Fedora but GNOME/Wayland isn't supported on FreeBSD. Standalone releases removed non-Xwayland code which complicates cherry-picking upstream fixes because the development still happens in xorg/xnest/xwayland/etc monorepo.

Not sure I understand, you don't want to switch to non-devel because we don't have GNOME/wayland ??

Address some of the issues pointed out by jbeich

bapt marked 4 inline comments as done.Jul 19 2022, 7:19 AM

Duplicate of D28782? I'm unlikely to switch consumers (wlroots{,-devel}, arcan, plasma5-kwin) to xwayland (non-devel). Upstream QA is GNOME-centric via Fedora but GNOME/Wayland isn't supported on FreeBSD. Standalone releases removed non-Xwayland code which complicates cherry-picking upstream fixes because the development still happens in xorg/xnest/xwayland/etc monorepo.

At the time your argument was about the port belonging to x11@ (https://reviews.freebsd.org/D28782#inline-179166) now it is because of a weird argument about QA on GNOMe-centic via fedora, do you have an actual technical argument? I am using this version of the xwayland port successfully with wlroots and sway and si far everything works perfectly fine for weeks. if you need to live on the edge, fine for wlroots-devel and sway-devel.

In every single environement OS I am aware of providing wayland support they do use xwayland from the standalone release, what argument do we have preventing us from doing that?

x11-servers/xwayland/Makefile
51

I respected the default, but I am would be happy to activate it by default if it is worth it, my understanding is that it wasn't useful in the context of xwayland, but I haven't deeply dig into it.

53

right but I prefer to be explicit in general, but I have no strong feelings about keeping that line

54

I will be happy to integrate their patches when they will upstream.

55

again I like to be explicit when I can, but I have no strong feelings here.

57

this is a mistake in the first place, but let's address that later.

In D35662#813945, @bapt wrote:

At the time your argument was about the port belonging to x11@

Correct. I need agency to ensure quality for wlroots + Xwayland but not interested in being a lackey for x11@ team. However, this is only a concern when changing wlroots from xwayland-devel to xwayland. It doesn't prevent xwayland (non-devel) living separately but unused until variable dependencies (via provides/requires) arrive in ports/.

D28782 already explained the rest.

do you have an actual technical argument?

  • Since a29022d17449 better support for non-rootless Xwayland e.g., running existing X11 DE/WM like GNOME, XFCE or fvwm under Cage or in a dedicated workspace under Sway.
  • Since 0c0d1aa12f93 fixes for CVE-2022-2319 and CVE-2022-2320 (easy as it's also part of xwayland-22.1.3.tar.xz)

In every single environement OS I am aware of providing wayland support they do use xwayland from the standalone release, what argument do we have preventing us from doing that?

Dogfooding over cargo cult. Before upstream made standalone releases many of those distros built xwayland as part of xorg-server, missing out on many quality-of-life improvements when using snapshots.

x11-servers/xwayland/Makefile
13

Why Client is capitalized but server is not?

Currently, COMMENT paraphrases pkg-descr with barely any extra content. Maybe adopt pkg-descr from xwayland-devel to help users understand Xwayland better.

31

Why is egl necessary? poudriere testport doesn't show libEGL.so when =>> Checking shared library dependencies.

51

I've enabled it in xwayland-devel via 2cab7f416c83. Curiously, upstream disabled xcsecurity by default 1 year before Wayland appeared.

wasn't useful in the context of xwayland

Xwayland is Xorg minus DDX (code under hw/xfree86/, mainly affects NVIDIA and legacy GPU drivers), so everything X11, including "network transparency" applies. -rootless used by X11 WM code in Wayland compositors for transparent integration works on a different level: between local X11 and Wayland clients instead of local and remote X11 clients.

53

meson_options.txt has many auto values, so being explicit for some but not others leads to inconsistency. Investigating how to implement Templates/config.site (configure cache) for USES=meson maybe a better idea.

In other ports being "explicit" sometimes exposed upstream bugs (mostly autotools), passed obosete/unused options (autotools, cmake) and failed to chase upstream default.

I prefer to pass as fewer arguments as possible as it reduces how much needs to be maintained or reasoned about when reporting issues upstream, especially for options that don't affect dependencies from ports/packages. On updates I check upstream build glue changes, adapt, verify via ldd output and test runtime (often in a jail with X11/Wayland sockets passed through), so defaults changing or new options appearing is not a concern (unless one is sloppy or upstream build glue is a complex mess). For example, broken glamor is easy to notice as Xwayland would fallback to software rendering accelerated by mesa-devel (lacks swrast.so) which would just abort.

54

Nothing to upstream as it already works as intended. From xwayland-devel log (no extra patches):

Library md found: NO
Run-time dependency libsha1 found: NO (tried pkgconfig and cmake)
Run-time dependency nettle found: NO (tried pkgconfig and cmake)
libgcrypt-config found: NO
Run-time dependency libgcrypt found: NO (tried pkgconfig and config-tool)
Library crypto found: NO
Run-time dependency openssl found: YES 1.1.1q
Message: Using libcrypto SHA1 functions

Let's not add more hurdles for DragonFly. I do help them, see git shortlog -cns --grep=DragonFly output.

55

Why? X11 over TCP is insecure, doubly so in NAT-less environment like IPv6. Xwayland uses UNIX domain sockets by default while "ssh -X" acts as a proxy with SSH tunneling.

In D35662#813945, @bapt wrote:

if you need to live on the edge, fine for wlroots-devel and sway-devel.

wlroots-devel (ABI/API churn blocks scaling consumers) is a prototype for wlroots015 for hikari/etc that won't be ready to wlroots 0.16 on release day. After that wlroots-devel maybe killed to reduce maintanence overhead as it's not as useful as mesa-devel and not as stable as xwayland-devel.

https://github.com/freebsd/freebsd-ports/compare/main...jbeich:wlroots-0.16

x11-servers/xwayland/Makefile
35

-Dxdmcp=false + removal of USE_XORG=xdmcp should be fine to apply in xwayland-devel as well. What's missing is a good rationale for commit message for violating "batteries included" policy. "Other distros did so" is a cargo cult. XDMCP security isn't much worse than X11 over TCP security (ssh -X uses UNIX sockets proxied over SSH). And dependencies mostly stay the same: libxcb and xcb-util still depend on libXdmcp, while libX11 brings libXdmcp via libxcb. Otherwise, upstream options with dependencies are supposed to be exposed via ports options instead of being hardcoded "just because".

41

Style nit: quote string values (or at least those with make(1) variables) for consistency default_font_path below.

57

Kinda confusing as xorg-server doesn't set --with-xkb-output=/var/lib/xkb yet. Such extra changes should have their own rationale in separate commit instead of being bandwagoned/bootlegged with an update. I know splitting commits can be a PITA but it aids post-push review.

With my comments addressed it's good for me. (and say in the commit message that xdmcp was disabled too and why).

x11-servers/xwayland/Makefile
31

egl doesn't seems to be necessary indeed.

45

Yup this can go

This revision is now accepted and ready to land.Jul 20 2022, 9:34 AM

Fails to fetch:

$ make checksum TRYBROKEN= DISABLE_CONFLICTS= MASTER_SITE_BACKUP= DISTDIR=$(mktemp -dt distfiles)
===>  License MIT accepted by the user
===>   xwayland-22.1.2,1 depends on file: /usr/local/sbin/pkg - found
=> xwayland-22.1.2.tar.xz doesn't seem to exist in /tmp/distfiles.oLTmCUAbXw/.
=> Attempting to fetch https://xorg.freedesktop.org/releases/individual/xserver/xwayland-22.1.2.tar.xz
xwayland-22.1.2.tar.xz                                1242 kB  762 kBps    01s
=> 42e34498f87a.patch doesn't seem to exist in /tmp/distfiles.oLTmCUAbXw/.
=> Attempting to fetch https://github.com///commit/42e34498f87a.patch
fetch: https://github.com///commit/42e34498f87a.patch: Not Found
=> Couldn't fetch it - please try to retrieve this
=> port manually into /tmp/distfiles.oLTmCUAbXw/ and try again.
*** Error code 1
x11-servers/xwayland/Makefile
7

USE_GITHUB isn't defined, so expand from xwayland-devel values.

bapt marked an inline comment as done.

it is in