fix: bundle gdk-pixbuf SVG loader in AppImage (#80)#81
Open
manuacl wants to merge 1 commit into
Open
Conversation
manuacl
added a commit
to manuacl/limux
that referenced
this pull request
May 24, 2026
manuacl
added a commit
to manuacl/limux
that referenced
this pull request
May 25, 2026
9be5526 to
8c167dd
Compare
The AppImage bundles libgdk_pixbuf-2.0 but not its SVG loader plugin. On hosts without rsvg-pixbuf-loader (e.g. Fedora 44+, which dropped the package), GTK4 cannot render symbolic SVG icons through gdk-pixbuf, leaving the four pane action icons (new terminal, new browser, split horizontal, split vertical) as broken-image placeholders. Bundle libpixbufloader-svg.so plus the librsvg-2 dependency closure into the AppImage and generate a relocatable loaders.cache template. AppRun substitutes the live mount path at startup and writes the rendered cache under $XDG_CACHE_HOME/limux/ so it works on a read-only FUSE mount. Add an assert_pixbuf_svg_loader_bundle smoke check that fails the build if any expected file is missing. Install librsvg2-common in the Ubuntu CI workflows so the loader is available at packaging time. Multi-distro hardening: * Replace `uname -m` with dpkg-architecture (preferred) or a case-mapped fallback, so 32-bit and armhf hosts resolve the correct Debian multiarch tuple (i386-linux-gnu, arm-linux-gnueabihf) instead of the bogus i686-linux-gnu / armv7l-linux-gnu. Adds the no-arch-infix /usr/lib/gdk-pixbuf-2.0/... path used by Arch. * gdk-pixbuf-query-loaders lives under /usr/lib/<multiarch>/gdk-pixbuf-2.0/ on Debian/Ubuntu, not in $PATH — look there first, then fall back to PATH. * Replace `exit 1` with `WARNING:` for missing libpixbufloader-svg.so or gdk-pixbuf-query-loaders. Local builds on hosts without rsvg-pixbuf-loader now succeed with a clear warning. The official CI workflows set LIMUX_REQUIRE_SVG_LOADER=1 to opt back into hard-fail. * AppRun: only export GDK_PIXBUF_MODULE_FILE if mkdir AND sed succeed; use a per-PID cache filename to avoid concurrent-launch races. * sed substitutions use a tab delimiter instead of `|`, so build paths or mount paths containing `|` no longer break the cache template. * Add `scripts/tests/test-package-svg-loader.sh` — 13 shell unit-tests covering the multiarch mapping, sed delimiter behaviour, AppRun conditional export, and the LIMUX_REQUIRE_SVG_LOADER gate. Documentation: add a CLAUDE.md Pitfalls entry so future maintainers don't repeat the issue. The original symptom (broken icons) was easy to miss because everything builds and runs — icons just degrade silently to fallback glyphs. E2E build verified on ubuntu:24.04 distrobox: AppImage produced, loader bundled, smoke check passed, exit 0. Closes am-will#80 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
8c167dd to
ff0af96
Compare
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.
Summary
The AppImage bundles
libgdk_pixbuf-2.0but not its SVG loader plugin. On hosts withoutrsvg-pixbuf-loader(e.g. Fedora 44+, which dropped the package), GTK4 cannot render symbolic SVG icons through gdk-pixbuf, leaving the four pane action icons (new terminal, new browser, split horizontal, split vertical) as broken-image placeholders.This PR:
libpixbufloader-svg.soplus thelibrsvg-2dependency closure into the AppImage at packaging timeloaders.cache.template; AppRun substitutes the live mount path at startup and writes the rendered cache under$XDG_CACHE_HOME/limux/so it works on a read-only FUSE mountassert_pixbuf_svg_loader_bundlesmoke check that failspackage.shif any expected file is missinglibrsvg2-commonin the Ubuntu CI workflows (release-linux.yml,release-rpm.yml) so the loader is available at packaging timeThe
.deb,.rpm, and tarball builds are unaffected — they pick the loader up from the host'slibrsvg2-common/rsvg-pixbuf-loaderpackage via standardDepends/Requires.Reproduction
On Bazzite (Fedora 44, NVIDIA open):
A/B tested with two locally-built AppImages from the same
main(with and without this patch) on the same Bazzite host.Test plan
./scripts/check.sh— passes (only known-baseline failing test mentioned in CLAUDE.md is unaffected)./scripts/package.sh— full build runs to completion, smoke check passesmainAppImage launched on same host — toolbar icons broken (confirms the fix is required)Closes #80