workaround: Remove bundled libraries from the leaked LD_LIBRARY_PATH#391
workaround: Remove bundled libraries from the leaked LD_LIBRARY_PATH#391cxrvh wants to merge 1 commit into
Conversation
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
❌ Test build failed. Help
|
c3d8c4f to
16b308b
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
|
This is, in my opinion, the simplest workaround for the
I haven't tested running it unsandboxed - please test this. Alternatives would be for example building a patched CLI or some kind of script shenanigans. |
16b308b to
f6c3e07
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
|
Works for me |
Zed's Flatpak sandbox escape leaks the bundled libraries by pointing LD_LIBRARY_PATH to /app/lib. That's Flatpak specific and because the libraries from LD_LIBRARY_PATH take precedence over but are ncompatible with the host's libraries, host tools fail when started from Zed. A similar issue exists inside the sandbox: /app/lib takes precedences over the runtime libraries & therefore the incompatible Zed libraries lead to issues. Work around the issues by moving the libraries: - /app/lib must be kept empty until the issue is fixed upstream - Patch zed-editor's RPATH & move Zed's bundled libraries into /app/libzed in order to limit their scope to zed-editor - Move any Flatpak bundled libraries into /app/libflatpak to avoid leaking them into the host Closes flathub#330
f6c3e07 to
34b71e5
Compare
|
🚧 Test build enqueued. |
|
🚧 Started test build. |
|
✅ Test build succeeded. To test this build, install it from the testing repository: Built for aarch64 and x86_64 architectures. |
Zed's Flatpak sandbox escape leaks the bundled libraries by setting LD_LIBRARY_PATH. That's Flatpak specific. Because the libraries from LD_LIBRARY_PATH take precedence over but are incompatible with the host's libraries, host tools fail when started from Zed.
A similar issue exists inside the sandbox: /app/lib takes precedences over the runtime libraries & therefore the incompatible Zed libraries lead to issues.
Work around the issues by moving the libraries:
Closes #330