Repository navigation
fix(appimage): exclude NSS/NSPR libraries to prevent dlopen crashes on rolling distros - #15
Conversation
…n rolling distros Building on f9213d5 (glibc exclude list), extend the AppImage prune step to also drop the bundled NSS/NSPR family. Chromium/CEF dlopen()s the host's /usr/lib/libsoftokn3.so for PKCS#11; on Arch / rolling distros the host softokn requires NSSUTIL_3.108+, which the older bundled libnssutil3.so in $APPDIR/shared/lib does not export, producing: .../shared/lib/libnssutil3.so: version `NSSUTIL_3.108' not found (required by /usr/lib/libsoftokn3.so) [FATAL:crypto/nss_util.cc:146] nss_error=-5925 and a fatal crash before any window is shown. Verified by extracting the v0.53.43 AppImage inside archlinux:latest: bundled libnssutil3 defines up to NSSUTIL_3.94, host requires NSSUTIL_3.108. Deferring to the host's NSS/NSPR (same approach as glibc) avoids the mismatch on rolling distros while keeping the AppImage's Chromium bits self-contained. Refs tinyhumansai/openhuman#2001
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR expands the AppImage bundler's core system library exclusion logic by updating documentation and adding explicit exclusions for NSS/NSPR-related cryptographic libraries. This prevents the AppImage from bundling outdated versions of these security-sensitive libraries, deferring instead to host-provided versions. ChangesAppImage NSS/NSPR Exclusions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
The exclude list introduced for glibc/NSS (PR #15 and tauri-apps#1996's precedent) broke AppImage launch on every host in two ways that the original PRs' test plans didn't cover: 1. `ld-linux` was bundled in the exclude list under the "glibc family" rationale, but sharun *requires* a loader to be present in `$APPDIR/shared/lib/` to bootstrap the dynamic OpenHuman binary (whose INTERP is stripped during lib4bin processing). With it excluded, sharun aborts with "Interpreter not found!" before any chromium code runs. The loader is ABI-stable enough across glibc versions for the host-vs-bundle mix here to remain safe. 2. The exclusion sweep used `fs::read_dir` on top-level `shared/lib` only. lib4bin mirrors source paths when libraries are pulled in from nested locations (e.g. `shared/lib/snap/core20/<rev>/usr/lib/x86_64-linux-gnu/libc.so.6` when the build host has snap-managed apps like VS Code), so nested copies of `libc.so`, `libm.so`, etc. survived the sweep and broke `GLIBC_2.x` symbol lookups on the target host even though the intent was to defer to host glibc. Both reproduce on Ubuntu 26.04 GNOME-Wayland with the locally-built v0.53.49 AppImage. Without (1), launch dies at sharun bootstrap; with (1) but without (2), launch dies at `libm.so.6: version GLIBC_2.35 not found`. Both fixed by this change. Refs tinyhumansai/openhuman#2001, tinyhumansai/openhuman#2032, #15
Summary
Extend the AppImage bundler's library-exclude list (added in f9213d5 for glibc) to also drop the bundled NSS/NSPR family from
$APPDIR/shared/lib.On rolling distros (Arch, Fedora rolling, etc.) Chromium/CEF
dlopen()s the host's/usr/lib/libsoftokn3.sofor PKCS#11. The host'slibsoftokn3requires e.g.NSSUTIL_3.108, which the older bundledlibnssutil3.sodoes not export — the loader sees the bundled lib first viaLD_LIBRARY_PATH, can't resolve the version, and the app crashes before any window is shown:Reported in tinyhumansai/openhuman#2001.
Verification
Reproduced inside
archlinux:latest(linux/amd64) by extracting the v0.53.43 AppImage:libsoftokn3.solibnssutil3.sodefines up toNSSUTIL_3.94NSSUTIL_3.117NSSUTIL_3.108❌dlopen(\"/usr/lib/libsoftokn3.so\")succeeds with no bundled libs inLD_LIBRARY_PATH, and fails (loader aborts the process) once the bundledshared/libis prepended — confirming the host-symbol vs bundled-NSS mismatch is the launch crash root cause.Change
Adds these prefixes to
exclude_prefixesinsharun_cef.rs:Same rationale as the glibc-family entries: these libraries cannot safely be bundled because the AppImage runtime mixes them with host libraries loaded at runtime, and a version skew on either side is fatal. Modern desktop Linux always ships an NSS stack (browsers, mail clients depend on it), so deferring to the host is the right trade-off.
Test plan
cargo check -p tauri-bundlerpasses locallyshared/lib, Chromium crypto init should succeedRefs tinyhumansai/openhuman#2001
Summary by CodeRabbit