Strip half-bundled crypto/print libraries from the AppImage - #13
Merged
Merged
Conversation
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.
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.
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.