Xwayland testing environment setup - linuxwacom/xf86-input-wacom GitHub Wiki
Xwayland Testing Setup
This page details the instructions for setting up Xwayland testing on Fedora (Fedora 42 at the time of this writing).
Dependencies
sudo dnf update
sudo dnf install @development-tools
sudo dnf install @rpm-development-tools
sudo dnf install fedpkg
sudo dnf builddep -y xorg-x11-server-Xwayland
Prepare sources and RPM build tree
sudo dnf download --source xorg-x11-server-Xwayland
rpmdev-setuptree
rpm -ivh xorg-x11-server-Xwayland-*.src.rpm
should yield the following files
~/$ tree rpmbuild
.
├── BUILD
├── RPMS
├── SOURCES
│ └── xwayland-24.1.8.tar.xz
├── SPECS
│ └── xorg-x11-server-Xwayland.spec
└── SRPMS
Obtain patch and move it to SOURCES
curl -L "https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/<ID>.patch" -o ~/rpmbuild/SOURCES/mypatch.patch
replace <ID> with the merge request number
Declare patch in spec
If "%autosetup% is not present in the Xwayland spec file, add the following line after %endif that holds Source0 and before %prep:
patch mypatch.patch
Validate patch and build
rpmbuild -bp ~/rpmbuild/SPECS/xorg-x11-server-Xwayland.spec
rpmbuild -ba ~/rpmbuild/SPECS/xorg-x11-server-Xwayland.spec
Make sure build results in the binaries:
$ uname -m
$ ls -lh rpmbuild/RPMS/$(uname -m)/
example output:
total 5.6M
-rw-r--r--. 1 eas eas 1.1M Sep 30 16:15 xorg-x11-server-Xwayland-24.1.8-1.fc42.x86_64.rpm
-rw-r--r--. 1 eas eas 3.4M Sep 30 16:15 xorg-x11-server-Xwayland-debuginfo-24.1.8-1.fc42.x86_64.rpm
-rw-r--r--. 1 eas eas 1.3M Sep 30 16:15 xorg-x11-server-Xwayland-debugsource-24.1.8-1.fc42.x86_64.rpm
-rw-r--r--. 1 eas eas 11K Sep 30 16:15 xorg-x11-server-Xwayland-devel-24.1.8-1.fc42.x86_64.rpm
Verify your current version and install rpms
echo $XDG_SESSION_TYPE
$ rpm -qi xorg-x11-server-Xwayland | grep -E '^(Version|Release|Install Date|Build Date|Build Host|Vendor|Packager|Signature)'
(optional) $ rpm -q --whatprovides /usr/bin/Xwayland
example output:
Version : 24.1.8
Release : 1.fc42
Install Date: Tue 30 Sep 2025 02:53:53 PM PDT
Signature : RSA/SHA256, Wed 18 Jun 2025 10:26:16 AM PDT, Key ID c8ac4916105ef944
Build Date : Wed 18 Jun 2025 10:19:16 AM PDT
Build Host : buildvm-x86-30.iad2.fedoraproject.org
Packager : Fedora Project
Vendor : Fedora Project
Test existing installation and install the rpms you built
$ echo $XDG_SESSION_TYPE
$ sudo dnf install krita (or similar)
<test for bug which should be present>
$ sudo dnf install ~/rpmbuild/RPMS/x86_64/xorg-x11-server-Xwayland-*.rpm
Restart Wayland session and logout.
Verify patched build
echo $XDG_SESSION_TYPE
$ rpm -qi xorg-x11-server-Xwayland | grep -E '^(Version|Release|Install Date|Build Date|Build Host|Vendor|Packager|Signature)'
(optional) $ rpm -q --whatprovides /usr/bin/Xwayland