Repository navigation
appimage: Take ffmpeg 8.1.2 r3 from obs-studio-libs, with libsrt 1.5.7 - #1083
Conversation
|
Build AppImage fails at the obs-studio-libs fetch: The obs-studio-libs releases only publish |
|
Right, that's expected: this PR waits on obs-rust/obs-studio-libs#4, which builds the r3 ffmpeg with libsrt 1.5.7. The |
|
obs-rust/obs-studio-libs#4 is merged (libsrt 1.5.7; I checked the archive sha256 independently). That repo has no workflow that builds the ffmpeg artifact; its only workflow is Qt. So the |
|
Thanks for checking the archive. We only have read access to obs-studio-libs, so building and uploading r3 needs a maintainer. In the manylinux_2_28 image: The recipe isn't bit-reproducible: the temporary build directory ends up inside some codec libraries. So the published asset's sha256 won't match the |
|
Feel free to --admin merge through CI as this refactor wraps up. |
|
Maintainer loop: I took this back out of the merge queue (it was queued at 05:28). It pins ffmpeg 8.1.2 |
zackees
left a comment
There was a problem hiding this comment.
Reviewed the diff. The check design is sound: exactly one libsrt* in the AppDir, at least 1.5.7, no bundled ELF that NEEDS another libsrt soname, and one mapped copy in /proc/<pid>/maps in first-start and saved-profile. RED against both master (1.5.2) and the beta tree (two copies) is convincing, and so is the A/B table. Findings:
- Placeholder issue number.
check-appdir.shandtest-appimage.shboth say(obs-rust/obs-studio#ISSUE)in the two-copies comment. Please put the real issue number (the SIGABRT-on-quit report) or drop the reference. - Blocker, already known:
deps.lock.jsonstill pins the local r3 sha2566421a3bc.... It needs the published asset's sha256 before requeueing (maintainer comment above). Build AppImage fails on exactly this. - Version read is a bit loose.
tr '\\0' '\\n' | grep -xE '[0-9]+\.[0-9]+\.[0-9]+'over the whole .so assumes libsrt's only bare x.y.z string is SRT_VERSION. It holds for this build (mbedTLS shared), but a static mbedTLS or OpenSSL link would add its own version string and turn this into a 'cannot read the version' error rather than a wrong pass. That's safe-failing, so fine; maybe say so in the comment. - Strict on symlinks. The count uses
find -type f -o -type l, so a bundledlibsrt.so.1.5 -> libsrt.so.1.5.7pair would count as 2. Today the AppDir has the soname file only, so OK. Just noting the check would need adjusting if bundling ever keeps the chain. - Nit: when the count isn't 1,
srt_versionis unset and the final success line can't be reached, so no issue there.
2bc1d6c to
ae3a2ec
Compare
|
Thanks for the review. Pushed 12e1b14 (RED) / ae3a2ec (GREEN). The changes are folded into the RED commit, which owns these lines:
2 is unchanged: |
…Refs obs-rust#1082) check-appdir.sh fails unless the AppDir holds exactly one libsrt*.so*, its embedded version (SRT_VERSION, read without binutils) is at least 1.5.7, and no bundled ELF file needs another libsrt soname. Two copies in one process (the Ubuntu-built AppImages bundled libsrt.so.1.5 and libsrt-gnutls.so.1.5; obs-ffmpeg.so's srt_* calls bound to the GnuTLS one) both ran the destructors of the same interposed C++ globals, and OBS aborted on quit after any SRT use. libsrt before 1.5.7 has public advisories GHSA-6xg9-784j-24rm, GHSA-4mc6-qmpp-g7gw and GHSA-m96h-3rc9-xx6h. test-appimage.sh also requires exactly one libsrt, the AppImage's, in OBS's /proc/<pid>/maps in first-start and saved-profile. Fails on the glibc 2.28 build: the obs-studio-libs FFmpeg 8.1.2 r2 artifact bundles libsrt 1.5.2 ("the bundled usr/lib/libsrt.so.1.5 is libsrt 1.5.2; at least 1.5.7 is required"), so assemble-appdir.sh stops. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Fixes obs-rust#1082) The obs-studio-libs ffmpeg artifact holds the AppImage's only libsrt: FFmpeg's srt:// protocol and the SRT output in obs-ffmpeg both link it (obs-ffmpeg finds it through CMAKE_PREFIX_PATH /opt/obs-deps/ffmpeg). r2 built libsrt 1.5.2, which has public advisories GHSA-6xg9-784j-24rm, GHSA-4mc6-qmpp-g7gw and GHSA-m96h-3rc9-xx6h. r3 is the same recipe with libsrt 1.5.7 (the v1.5.7 tag, pinned by sha256; mbedTLS as before). Nothing else in the artifact changes version. Built the AppImage locally the way the workflow does (manylinux_2_28 image, build.py --base manylinux): check-appdir.sh now passes with one libsrt 1.5.7, and the glibc 2.28 floor check passes. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ae3a2ec to
dfc9315
Compare
|
Rebased onto master: 82fcf8e (RED) / dfc9315 (GREEN). The only conflict was the comment block at the top of
On r3: I built the recipe at a5c51cf (the obs-studio-libs#4 merge) twice in the pinned manylinux_2_28 image. Both builds pass |
Fixes #1082
What and why
The AppImage now ships libsrt 1.5.7 instead of 1.5.2. The build also fails if it ever bundles more than one libsrt, or one older than 1.5.7.
ffmpeg8.1.2 r2 artifact, which builds libsrt 1.5.2 with mbedTLS. Both FFmpeg'ssrt://protocol (libavformat) and the SRT output (obs-ffmpeg.so, which finds it throughCMAKE_PREFIX_PATH) use that copy. 1.5.2 is older than the 1.5.4 that 0.1.0-beta.20261014 shipped. It is affected by three public upstream advisories: GHSA-6xg9-784j-24rm (KMREQ/KMRSP stack buffer overflow, fixed in 1.5.6), GHSA-4mc6-qmpp-g7gw (encryption downgrade, fixed in 1.5.6) and GHSA-m96h-3rc9-xx6h (heap buffer overflow, fixed in 1.5.7).libsrt.so.1.5(OpenSSL) andlibsrt-gnutls.so.1.5, and OBS aborted on quit after any SRT use: both copies destroyed the same interposed C++ globals. Master has one copy. Nothing kept it that way until now.Change
recipes/linux/ffmpeg.sh,srt()takes the v1.5.7 tag archive, pinned by sha256017cd1e4...055d32b(the same tree as tag commit 899348d8). The options are unchanged (mbedTLS from the same prefix, shared only, no apps), and so are the soname (libsrt.so.1.5) and every other pin in the artifact. The artifact is packed with--label r3next to r2.build-aux/appimage/manylinux/deps.lock.json: ffmpeg 8.1.2 flavor r3. The sha256 in this commit is from a local build of that recipe. It must be replaced by the published asset's sha256 (dist/*.tar.zst.jsonof the maintainer's build) before merging.check-appdir.sh(run byassemble-appdir.sh, so a failure stops the build, and again in the bundle scenario) fails unless:libsrt*.so*;SRT_VERSIONstring withtr/grep(the test containers have no binutils), is at least 1.5.7;libsrt-gnutls.so.1.5, ...).test-appimage.sh:require_one_libsrt_mappedrequires exactly one libsrt, inside the AppImage, in OBS's/proc/<pid>/maps, in first-start and saved-profile.Not changed: FFmpeg, mbedTLS, libvpx and the other codecs keep their versions. Windows and macOS (obs-deps libsrt 1.5.2) are a separate change.
RED → GREEN
test: check-appdir requires exactly one libsrt, at least 1.5.7. On master's AppImage build (manylinux_2_28 image,build.py --base manylinux), the appdir step stops with::error::the bundled usr/lib/libsrt.so.1.5 is libsrt 1.5.2; at least 1.5.7 is required. Against the 0.1.0-beta.20261014 tree it reportsexpected exactly one libsrt in the AppImage, found 2: usr/lib/libsrt-gnutls.so.1.5 usr/lib/libsrt.so.1.5.check-appdir: ... one libsrt (1.5.7),check-glibc-floor: all 239 ELF files run on glibc 2.28.test-srt(mbedTLS build, googletest) passes 277 tests (1 upstream-disabled) when run against the libsrt and mbedTLS libraries shipped in this AppImage.ulimit -c 0; each check ran on its own. 59 pairs A with B and B with A.srt://)Measured values match between A and B, including received packets, decode errors (0), audio level (-21 dB at ffmpeg receivers, -22 dB OBS → OBS), stop and reconnect times. No crash and no SIGABRT on quit in either build.
obs-ffmpeg.so) and plays a Media Sourcesrt://listener (FFmpeg) at the same time:/proc/<pid>/mapshas one libsrt file,$APPDIR/usr/lib/libsrt.so.1.5;LD_DEBUG=filesloads it once;LD_DEBUG=bindingsbindsobs-ffmpeg.so(22srt_*) andlibavformat.so.62(15) to it;manylinux_2_28image was unpacked and everyRUNstep ofbuild-aux/appimage/manylinux/Dockerfile(and of obs-studio-libsrecipes/linux/Dockerfilefor the r3 build) was run in it under a user namespace. Thenbuild.py --base manylinuxran as the workflow calls it. One local difference: AlmaLinux's ccache package could not be installed through rpm in the user namespace, so it was unpacked from the same rpm instead.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