Repository navigation
fix(appimage): bundle the X11 libraries winit opens at runtime - #144
Merged
Merged
Conversation
astrovm
marked this pull request as draft
November 21, 2026 11:03
astrovm
marked this pull request as ready for review
November 21, 2026 11:16
astrovm
marked this pull request as draft
November 21, 2026 11:43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The AppImage catalog test (AppImage/appimage.github.io PR #12309) opens the app on Ubuntu 22.04 with only Xvfb. The 1.3.5 AppImage starts, but winit fails before the window opens:
winit opens the X11 libraries at runtime with
dlopen(x11-dl and xkbcommon-dl). linuxdeploy reads only the ELF dependencies, so it did not bundle them. The build system had them, so the build looked fine.Changes
build-aux/appimage/build-appimage.sh: pass--libraryto linuxdeploy forlibxkbcommon.so.0,libxkbcommon-x11.so.0,libXcursor.so.1andlibXi.so.6. The script fails if one of them is missing on the build system. linuxdeploy adds what they need in turn (libxcb-xkb, libXext, libXfixes, libXrender).a. libGL, libEGL, libX11, libX11-xcb, libxcb and libwayland-client stay on the host. They are on the AppImage exclude list, because they must match the host graphics drivers and display server.
build-aux/appimage/build-container.sh: installlibxkbcommon-x11-0,libxcursor1andlibxi6in the Ubuntu 22.04 build container.build-aux/appimage/test-window.sh(new): run the AppImage in a minimalubuntu:22.04container with only Xvfb and Mesa, and pass when the "Adventure Mods" window is mapped (IsViewableinxwininfo) within 60 seconds and the app still runs 3 seconds later. It prints the app log on failure, exits 2 when the AppImage path is wrong, and uses podman or docker..github/workflows/ci.yml: the AppImage job runstest-window.shin place of the old--versioncheck.--versiondid not catch this, because it never opens a window. The step has a 10-minute timeout.Cargo.toml,Cargo.lockand the metainfo release notes.fuzz/Cargo.lock: update the staleadventure-modsversion (1.3.4) to 1.3.6.build-aux/appimage/catalog-test.shand CI jobappimage-catalog: on a GitHububuntu-22.04runner, it runs the catalog's owncode/worker.sh(pinned commit) on the x86_64 AppImage, set up as the catalog'stest.ymldoes: its packages,dupervisor, firejail, Xvfb at 800x600, the screenshot and its checks. A local Node server gives the AppImage to the worker under its real file name. The job fails when the catalog test fails or when the catalog would not mark the screenshot as good, and it uploads the log, findings and screenshot. CI / Required and the release job need it.a.
test-window.shstays: it is the quick check that runs locally in a rootless container. The catalog test cannot, because firejail loop-mounts the AppImage as root.build-aux/appimage/build-appimage.sh: renders a 256x256 PNG icon withrsvg-convertand points.DirIconat it before linuxdeploy runs (linuxdeploy keeps an existing.DirIcon). The catalog warned "Icon is not in PNG format".build-container.shinstallslibrsvg2-bin..github/workflows/ci.yml: the catalog result artifact is nowappimage-catalog-test. Its old name,AdventureMods-AppImage-catalog-test, matched theAdventureMods-AppImage-*pattern of the release job. Its 4 files would then break the release job's check for exactly 8 files on the next tag.catalog-test.sh:a. It fails on any catalog warning or error except the two under Not changed. Before, it checked only the screenshot remarks, so the icon warning could come back unnoticed. Measured on the saved results: the cd827ec result fails on the icon warning, and the b52a4b5 result passes.
b. It runs only on GitHub Actions, or with
ALLOW_HOST_CHANGES=1. The catalog's worker copies firejail into/lib,/usrand/etcas root. On mr, it now stops with exit 2 and a message.c. It removes its work folder with
sudoat exit.d. It stops when the dummy sound card setup fails, as the catalog workflow does. The old comment said the opposite.
Not changed
*appdata.xml. The AppImage shipsio.github.astrovm.AdventureMods.metainfo.xml. Renaming it would make the catalog run its oldappstreamcli validate-tree, which fails on the current file ("Invalid property for 'url' tag: vcs-browser", exit 3, measured). The catalog still reads the license and screenshots from the.metainfo.xmlfile.Measurements
The 1.3.6 build still needs glibc 2.35 at most.
Catalog test on CI (cd827ec)
The first run of the real catalog test opened the window and took a screenshot of the app. It then failed only because the script did not install
dupervisor, which the catalog workflow installs. That is fixed.Done when
test-window.sh, exit 0).AdventureMods-AppImage-*:AdventureMods-AppImage-x86_64.appimage-catalogjob passes on f7a8627: "SUCCESS", a screenshot of the app,X-AppImage-Glibc-Required=GLIBC_2.35, and only the two warnings under Not changed.Trade-off
The bundled libxkbcommon, libXcursor and libXi (Ubuntu 22.04 builds) now replace the host copies on every distro. libxkbcommon finds the xkb data through the FHS path
/usr/share/X11/xkb. This is normal for AppImages. Fedora 43 works. Hosts without FHS paths, such as NixOS, run AppImages throughappimage-run, which gives them an FHS environment.Review
A Sonnet agent reviewed the full diff. It found no blocking bug. Every library name in the binary is now bundled or on the exclude list. The release checks (tag,
Cargo.toml, metainfo) agree on 1.3.6.IsViewableand a running app 3 seconds later.grep -qpipe could fail with SIGPIPE underpipefail. The output is now captured first.timeout-minutes: 10.killstops only the AppImage runtime process. The container is--rm, so nothing stays.The fixes change only the test script. I checked them by measurement, not by a second agent review: the agent quota had no room. After the fixes, 1.3.6 passes (exit 0) and 1.3.5 fails with the xlib error (exit 1).
Second review: the catalog test and the PNG icon
A Sonnet agent reviewed the changes after 4b0b654, together with PkgDeck PR #425.
The fixes change only CI and the test script, not the AppImage. Claude's quota had no room for a second review, so I checked them by measurement, as listed in change 10.