Repository navigation
frontend: The AppImage loads no plugins from the host's system directories - #1227
Conversation
|
CI note: this PR changes The cause is "CI Pre 🧹 / Cache Janitor 🧹", which failed first: I haven't touched CI. Could the AppImage job be re-run on this PR some other way, for example after the janitor is skipped or made non-fatal for fork PRs? The local runs (12 of 12) are in the description. |
|
Good catch, thanks. |
…-rust#1229) A fork PR's GITHUB_TOKEN is read-only, so CI Pre's cache janitor fails there. Every other job after it has !cancelled(); appimage did not, so its implicit success() skipped it and test-appimage.sh never ran on a fork PR that changes build-aux/appimage (reported on obs-rust#1227).
969e48f to
566cdcc
Compare
|
#1229 merged; rebased this onto master (no conflicts, same two commits) so AppImage 📦 now runs |
|
Thanks for #1229. The AppImage now builds here (Build AppImage 🧱 passed), but So for this PR, the only |
|
Thanks, you're right about the platform tests. Pushed this head (566cdcc) to |
|
Platform tests passed on 566cdcc (Arch, Ubuntu 22.04, AlmaLinux 8, NixOS): https://github.com/obs-rust/obs-studio/actions/runs/39032199337. Queued. |
…lugins (RED, Refs obs-rust#1084) saved-profile: every system directory where a distribution OBS or an installed OBS-Studio-Rust keeps plugins (<lib>/obs-plugins, <lib>/obs-modules/plugins and <lib>/obs-studio-rust/obs-modules/plugins, for /usr/lib, /usr/lib64 and /usr/lib/x86_64-linux-gnu) gets a file that no OBS can load. OBS must not mention it. Copies of the bundled obs-transitions.so in the user's plugin folders, $XDG_DATA_HOME/obs-studio/plugins/<name>/ and the legacy $XDG_CONFIG_HOME/obs-studio/plugins/<name>/bin/64bit/, must be in "Loaded Modules". Fails on master's AppImage: the legacy system path is the build's install prefix, /usr/lib/obs-plugins, so OBS tries the probe there, then waits at the "Plugin Errors" dialog. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ories (GREEN, Fixes obs-rust#1084) The Linux plugin loader's system locations come from the build's install prefix: <prefix>/<libdir>/obs-studio-rust/obs-modules/plugins and the legacy <prefix>/<libdir>/obs-plugins. The AppImage is configured with prefix /usr and libdir lib, so it loaded whatever a distribution's OBS keeps in /usr/lib/obs-plugins, built against that distribution's libobs. On Arch with obs-studio installed, 0.1.0-beta.20261014 loaded linux-jack, obs-libfdk, obs-qsv11 and obs-webrtc from there. On master, obs-webrtc.so fails to load, and OBS waits at the "Plugin Errors" dialog, where SIGTERM does not quit it. In a relocatable build (ENABLE_RELOCATABLE, which only the AppImage sets) the system locations are now relative to the executable, the way its core modules are, so they point into the AppImage's own tree. The user's plugin folders ($XDG_DATA_HOME/obs-studio/plugins, the legacy $XDG_CONFIG_HOME/obs-studio/plugins and OBS_PLUGINS_PATH) are unchanged. Installed builds keep their absolute paths. Co-Authored-By: Claude Opus 5.5 <[email protected]>
566cdcc to
e59432b
Compare
|
This left the queue after #1242 moved the frontend into unity groups (PluginModuleLoader_Linux.cpp is now |
…ent (obs-rust#1251) obs-rust#1242 moved the frontend into unity groups and renamed PluginModuleLoader_Linux.cpp to PluginModuleLoader_Linux.cpp.hpp. The comment that obs-rust#1227 added to feature-plugin-manager.cmake still named the old file. Comment only; no build change. Refs obs-rust#1084 Co-authored-by: Claude Opus 5.5 <[email protected]>
Fixes #1084
What and why
The AppImage loads only its own modules and the user's plugins. It no longer loads the plugins of a distribution's OBS installed on the same machine.
frontend/plugin-manager/PluginModuleLoader_Linux.cpp) takes its system plugin locations from the build's install prefix:<prefix>/<libdir>/obs-studio-rust/obs-modules/plugins, and the legacy<prefix>/<libdir>/obs-plugins(frontend/cmake/feature-plugin-manager.cmake). The AppImage is configured withCMAKE_INSTALL_PREFIX=/usrandCMAKE_INSTALL_LIBDIR=lib, so it scanned/usr/lib/obs-plugins. That is where Arch'sobs-studiopackage installs its plugins, which are built against its own libobs.obs-studio32.2.2 installed, 0.1.0-beta.20261014 (Ubuntu base) loadslinux-jack.so,obs-libfdk.so,obs-qsv11.soandobs-webrtc.sofrom there without a word, because they happen to load against its libraries. Master's AppImage loads the first three too, andobs-webrtc.sofails (/usr/lib/libbrotlienc.so.1: undefined symbol: BrotliDefaultAllocFunc). OBS then waits at the "Plugin Errors" dialog, and SIGTERM doesn't quit it.ENABLE_RELOCATABLE, which only the AppImage sets), the system locations are now relative to the executable, the way its core modules are (libobs/obs-core-modules-loader-nix.c.h).systemPath()resolves them withos_get_executable_path_ptr(), so they point into the AppImage's own tree (usr/lib/obs-studio-rust/obs-modules/plugins,usr/lib/obs-plugins). Neither exists there, so nothing is loaded from them.$XDG_DATA_HOME/obs-studio/plugins, the legacy$XDG_CONFIG_HOME/obs-studio/plugins, andOBS_PLUGINS_PATH/OBS_LEGACY_PLUGINS_PATH.ENABLE_RELOCATABLE. They keep their absolute paths, and their binaries don't change.RED → GREEN
RED commit: 2213263
test: test-appimage.sh requires the AppImage to skip the host's OBS plugins. In the saved-profile scenario, every system plugin directory a distribution OBS or an installed OBS-Studio-Rust uses gets a file that no OBS can load:<lib>/obs-plugins,<lib>/obs-modules/pluginsand<lib>/obs-studio-rust/obs-modules/plugins, for/usr/lib,/usr/lib64and/usr/lib/x86_64-linux-gnu. OBS must not mention that file. Copies of the bundledobs-transitions.soin both user plugin folders, under names of their own, must be in "Loaded Modules". On master's AppImage it fails on Arch and on Ubuntu 22.04:OBS tried to load plugins of the host's own OBS from its system directories(Failed to load module file '/usr/lib/obs-plugins/host-plugin-probe.so'and'/usr/lib/obs-studio-rust/obs-modules/plugins/host-plugin-probe.so');did not quit within 30 s of SIGINT: the Plugin Errors dialog.The user-plugin checks pass on master as well.
GREEN: 969e48f. The local runs below were on 040b9c49c, the same two commits before a clean rebase onto current master. saved-profile passes on Arch (
verify-recording.sh: screen and camera move, 440 Hz tone throughout) and on Ubuntu 22.04 (launch-only, as in CI). The log has no probe line, anduser-plugin-probe.soanduser-legacy-plugin-probe.soare loaded. clang-format 22.1.3, gersemi 0.25.0 andci/platform_ifdef_ratchet.pyare clean, and shellcheck reports nothing new.The whole CI test matrix ran locally on this branch's AppImage: every scenario of test-appimage.sh (bundle, first-start, probes, saved-profile, saved-profile-custom, saved-profile-existing) passes on Arch and on Ubuntu 22.04, 12 of 12.
verify-recording.shpasses on every Arch recording.Real app: A/B on an Arch host with the distribution's
obs-studio32.2.2 installed, master's AppImage (A) against this branch's (B), see below.A/B on an Arch host with the distribution's
obs-studio32.2.2 installed. A is master's AppImage, B is this branch's. Each run had a fresh HOME, a private Xvfb and D-Bus, andulimit -c 0.linux-jack,obs-libfdk,obs-qsv11, mapped from/usr/lib/obs-plugins.obs-webrtc.sofailed to load/usr/lib/obs-plugins--startrecording(640x360 x264, mkv)libfdk_aac, from the host'sobs-libfdk.so. OBS had to be killed and the file was left unfinishedffmpeg_aac(bundled). 14.5 s file, finalized, 0 decode errorsThe same host with 0.1.0-beta.20261014 (Ubuntu base) shows no dialog, but it loads
linux-jack,obs-libfdk,obs-qsv11andobs-webrtcfrom/usr/lib/obs-plugins.How it ran: both AppImages were built the way the workflow builds them (
build.py --base manylinux, all steps). There was no container runtime, so the build ran in the digest-pinnedmanylinux_2_28image, unpacked, with theRUNsteps ofbuild-aux/appimage/manylinux/Dockerfileapplied, under a user namespace. test-appimage.sh ran in stockubuntu:22.04andarchlinux:latestroot filesystems, a fresh copy for each scenario, under a user namespace with its own network namespace (loopback only). Their test packages were installed beforehand, so the script'sapt-get update/pacman -Sywere skipped. The A/B runs used a private Xvfb,dbus-run-session, a fresh HOME per run andulimit -c 0. AlmaLinux 8 (bundle and first-start only) was not run locally.Note: the CA bundle fix for #1085 (a PR to follow) edits the same places in
test-appimage.shandbuild-aux/appimage/README.md. Whichever merges second needs a small rebase there.Checklist
master-W..., ratchets): noneAI note: Claude Code (Claude Opus 5.5) wrote the code, the tests, the commit messages and this text under the submitter's direction, and ran the tests above on the submitter's machines.
🤖 Generated with Claude Code