Skip to content

Strip half-bundled crypto/print libraries from the AppImage - #13

Merged
rlnorthcutt merged 1 commit into
mainfrom
fix/appimage2
Aug 10, 2026
Merged

rlnorthcutt merged 1 commit into
mainfrom
fix/appimage2

Conversation

@rlnorthcutt

Copy link
Copy Markdown
Contributor

linuxdeploy bundles libgcrypt.so.20 (pulled in transitively by
webkit2gtk) but not its version-locked pair libgpg-error.so.0 -- the
latter is on linuxdeploy's own built-in exclude list, the former isn't,
even though upstream GnuPG always releases the two version-locked
together. Bundling one without the other means the bundled libgcrypt
(built against the build machine's libgpg-error) loads against
whatever libgpg-error the run machine provides instead. Confirmed the
hard way: a Fedora-built AppImage crashed at launch on Ubuntu with
"undefined symbol: gpgrt_add_post_log_func, version GPG_ERROR_1.0" --
the exact inverse of the earlier EGL bug (that one broke on some
hardware when built on Ubuntu; this one breaks on Ubuntu when built on
Fedora), confirming the fix needs to be "exclude the library properly,"
not "pick a different distro to build on."

Swept every other bundled library's own dependencies against
linuxdeploy's real exclude list for the same half-bundled-pair
pattern; found one more, lower severity: libprintbackend-cups.so (a
GTK print plugin, not a startup dependency) needs avahi/colord/cups,
none of which are bundled or excluded either.

Add scripts/strip-unsafe-appimage-libs.sh -- a post-build step that
extracts the built AppImage, removes both, and repackages via the same
linuxdeploy-plugin-appimage tauri itself already downloads. Wired into
both scripts/build-appimage.sh (local) and npm run build:linux (CI).
Verified end-to-end through both paths, including the real Fedora
container CI uses, with a cold plugin cache. Deliberately not fixed by
shipping separate Ubuntu/Fedora AppImages -- that shifts the "which one
do I download" problem onto users without guaranteeing correctness on
a third distro.

Bump to 0.5.0-alpha.9.

  linuxdeploy bundles libgcrypt.so.20 (pulled in transitively by
  webkit2gtk) but not its version-locked pair libgpg-error.so.0 -- the
  latter is on linuxdeploy's own built-in exclude list, the former isn't,
  even though upstream GnuPG always releases the two version-locked
  together. Bundling one without the other means the bundled libgcrypt
  (built against the build machine's libgpg-error) loads against
  whatever libgpg-error the run machine provides instead. Confirmed the
  hard way: a Fedora-built AppImage crashed at launch on Ubuntu with
  "undefined symbol: gpgrt_add_post_log_func, version GPG_ERROR_1.0" --
  the exact inverse of the earlier EGL bug (that one broke on some
  hardware when built on Ubuntu; this one breaks on Ubuntu when built on
  Fedora), confirming the fix needs to be "exclude the library properly,"
  not "pick a different distro to build on."

  Swept every other bundled library's own dependencies against
  linuxdeploy's real exclude list for the same half-bundled-pair
  pattern; found one more, lower severity: libprintbackend-cups.so (a
  GTK print plugin, not a startup dependency) needs avahi/colord/cups,
  none of which are bundled or excluded either.

  Add scripts/strip-unsafe-appimage-libs.sh -- a post-build step that
  extracts the built AppImage, removes both, and repackages via the same
  linuxdeploy-plugin-appimage tauri itself already downloads. Wired into
  both scripts/build-appimage.sh (local) and npm run build:linux (CI).
  Verified end-to-end through both paths, including the real Fedora
  container CI uses, with a cold plugin cache. Deliberately not fixed by
  shipping separate Ubuntu/Fedora AppImages -- that shifts the "which one
  do I download" problem onto users without guaranteeing correctness on
  a third distro.

  Bump to 0.5.0-alpha.9.
@rlnorthcutt
rlnorthcutt merged commit b7380cf into main Aug 10, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant