Text chat 63: LGPL FFmpeg build, fetch, packaging and licence notices (#403) #444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "textchat-63-ffmpeg-lgpl-packaging"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Task 63 (#403): the pinned LGPL FFmpeg, its fetcher, packaging and licence notices. In round 2, the Windows package became a Velopack installer, following the plan revision of 2026-11-13 (auto-update spec decision 3).
tools/ffmpeg/:ffmpeg.lockpins FFmpeg 8.0.3, dav1d 1.5.4 and nv-codec-headers 13.0.19.0, withrevision = 1and both artifacts pinned. FFmpeg is 8.0 rather than 7.1 because rsmpeg 0.18.0+ffmpeg.8.0, the newest rsmpeg, binds the 8.0 line. The folder also holdsconfigure-flags.txt,build.shand a README.build.shrefusesCONFIG_GPL,CONFIG_NONFREEandCONFIG_VERSION3, writesbuildinfo.tomlwithavutil_license(), makes MSVC.libfiles with llvm-dlltool and writes relocatable.pcfiles.ffmpeg-8.0.3-r1(a prerelease): both archives and the three source tarballs.cargo xtask ffmpeg <fetch|build|env>.cargo xtask cifetches first and applies the env to every cargo command.usr/lib/flaxative/, each withRUNPATH=$ORIGIN. The licences are underusr/share/doc/flaxative/licenses/{ffmpeg,dav1d}/, andNOTICE.txtis filled frombuildinfo.toml. The binary's only RUNPATH is$ORIGIN/../lib/flaxative. libva and libva-drm are now declared dependencies.xtask/src/package/velopack.rs:VPK_VERSION = "1.2.161"(the newest 1.2.x of thevpktool on nuget.org and of thevelopackcrate on crates.io),PACK_ID = "Flaxative",pack_version(2026.0105.412becomes2026.105.412),PackInput,vpk_pack_args,install_vpk,check_output,VelopackOutputandPackageRef. There are also helpersremove_portableandrename_setup, andPACK_TITLE, which a test compares withfluxer_platform::APP_DISPLAY_NAME.xtask package --target windowsstages<target dir>/package/win-x64/app/(exe, DLLs, licences) and smoke-runsflaxative.exe --debug-infofrom it. It then runsvpk --yes pack … --shortcuts StartMenu --runtime win-x64 --channel nightly --delta None, deletes*-Portable.zipand renames the Setup.exe. It runscheck_outputbefore copyingFlaxative-<v>-win-x64-Setup.exe,Flaxative-<pack v>-nightly-full.nupkgandreleases.nightly.jsontodist/. A Windows package now needs a release--version, becausepack_versionrefuses0.0.0-dev+….ffmpeg.yaml(manual) is the only workflow that installs build tools.ci.yamlandrelease.yamlonly runcargo xtask ffmpeg fetch.release.yamlandci.yamlnow bootstrap the .NET 8 SDK the way the fork does (dotnet-install.ps1 -Channel 8.0,DOTNET_ROOT) and pruneC:\WINDOWS\SystemTemp\Velopack.ci.yamlsetsFLUXER_VPK_TESTS=1.Setup.exe --silent --installto <temp> -- --debug-info, thencurrent\flaxative.exe --debug-info, thenUpdate.exe --uninstall --silent. I read these flags from the strings in vpk 1.2.161's vendored setup.exe and update.exe; the uninstall registry entry itself uses--uninstall --silent..nupkg(its name is read fromreleases.nightly.json) and the feed file. The release and nightly names are now…-win-x64-Setup.exeandFlaxative-win-x64-Setup.exe.Measured
bundled FFmpeg … bytesand the Velopack package size).vpk [win] packof a stub app on Linux makes a Setup.exe of 10.3 MB, most of which is Velopack's own bootstrapper.Tested
FLUXER_SCREENSHOT_TESTS=1 cargo xtask cipasses locally on Linux (CachyOS). That covers every Linux packaging test and the new Velopack unit tests:pack_version_strips_leading_zeros_and_keeps_orderandpack_version_rejects_non_release_versionsvpk_args_are_per_user_start_menu_no_deltaandvpk_args_name_the_channel_and_main_execheck_output_accepts_one_full_package,check_output_refuses_a_hash_or_size_mismatch,check_output_refuses_a_path_in_file_name,check_output_refuses_a_version_mismatchandcheck_output_requires_one_setup_exeportable_zip_is_not_shipped,package_file_names_are_flaxative(-Setup.exe) andpack_title_is_the_app_display_namevpk_pack_of_a_tiny_app_passes_check_outputalso passed here withFLUXER_VPK_TESTS=1. It used the real vpk 1.2.161, installed byinstall_vpkthroughdotnet tool install. On Linux it packs with vpk's[win]cross-pack directive.xtask/tests/fixtures/velopack/are generated metadata. They follow the shape of a realvpk [win] pack --channel nightlyoutput:{"Assets":[{PackageId,Version,Type,FileName,SHA1,SHA256 (upper-case hex),Size}]}, with files named<id>-nightly-Setup.exeand<id>-<v>-nightly-full.nupkg.cargo clippy -p xtask --all-targets --target x86_64-pc-windows-msvc -D warningsis clean, so the#[cfg(windows)]code compiles. This also fixed a dead-code error thatcheck_linux_bundledalready had on Windows in round 1.windows_app_dir_has_exe_dlls_and_licences,windows_dlls_need_only_system_dlls, the Windows packaging path and the installer round trip inrelease.yaml. The Windows CI run and the next Windows release run are the first to run them. This task changes Windows-only packaging, so please watch the Windows release run after merging. Thevpklog lines appear in the job log as==> vpk: ….Deviations
--disable-postproc, because libpostproc no longer exists in 8.0.--extra-ldflags.--enable-w32threadsand-static-libgcc. The mingw route works, so the BtbN fallback is not used.libva-drm.so.2comes from the packagelibva-drm2.binding.rs, and the MSVC link is unverified. Both are follow-up #442. Rebuilding the archives as r2, without the build paths in the.pcfiles, is follow-up #445.bundled_ffmpeg_under_25_mib, so when I merged textchat I keptbundled_ffmpeg_size_is_reportedand the no-cap wording in the plan and the spec.vpkwrites<packId>-<channel>-Setup.exeand<packId>-<v>-<channel>-full.nupkgfor a non-default channel, not<packId>-win-Setup.exe.rename_setuptherefore takes whichever single*-Setup.exevpk wrote.check_outputruns there, and only then are the three files copied todist/, so stale files indist/cannot break the check.nightlyuntil Text chat 70 adds the flag.[win], whenFLUXER_VPK_TESTS=1is set; the plan said Windows only.Closes #403
🤖 Generated with Claude Code
The capture stream announces application.name "Flaxative"; the private sink is flaxative-stream-audio-<pid>-<n> ("Flaxative Stream Audio"). Self identity and the device lists also exclude every old name and the legacy fluxer-native-stream-audio- prefix (routing::is_own_sink). Refs #402 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>Independent review: Text chat 63 (head
69230cd, diff e1a5de9..textchat-63-ffmpeg-lgpl-packaging)What I checked:
cargo xtask ffmpeg <fetch|build|env> [--target], env vars, LINUX_BUNDLED, WINDOWS_BUNDLED, LINUX_DECLARED with libva and libva-drm, the.zippackage names and the AppDir layout all exist.dynamic_linking) accepts a directory and links each lib from it. OK.Findings:
Libs.privatekeeps a build-machine path (-L/out/work-linux/deps/lib). build.sh rewrites only$stage, not$deps. This only matters for static linking, but it leaks the builder's layout. Rewrite$depstoo, or drop it.printf %qescapes (--enable-filter=abuffer\,abuffersink…). The notice is meant for a person to reproduce the build. A plain space-joined line would read better.apprun_names_missing_libvaand the AppRun ldd check only cover a binary that does not yet need libva. This is expected for now; re-check it in 68.MAX_BUNDLED_BYTES,bundled_ffmpeg_under_25_mib), that needs Charles to confirm. I did not change it.Local gate:
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciwas started in the review worktree. The ffmpeg and fmt steps passed. The run had not finished (it was in clippy) when this review had to be returned, so I record CI as NOT verified by the reviewer.Verdict: no blocking findings in the code. Not approved, only because the reviewer's local CI run did not complete. The integrator should confirm CI is green before marking ready-to-merge.
Review round 1, fixed in
5e6b327(localcargo xtask cigreen):-L/-Iflags naming$deps(dav1d is folded into libavcodec and nv-codec-headers are headers only, neither is in the archive), and build.sh refuses a.pcthat still names the work directory. Checked on a sample .pc. The published r1 archives still carry the old path: rebuilding them as r2 is follow-up #445.check_buildinfounescapes the line when it reads it, so the packaged NOTICE is plain now. New testffmpeg::tests::buildinfo_configure_line_is_plain;assert_licenceschecks the notice has no backslash.$ORIGINwith patchelf on Linux.assert_licenceschecks for this wording.MAX_BUNDLED_BYTESis deleted,bundled_ffmpeg_under_25_mibis renamed tobundled_ffmpeg_size_is_reported(it still checks the report against the files and prints the size), the Windows DLL test only prints the size, and the spec, plan and xtask README now say there is no cap.🤖 Generated with Claude Code
Independent review, round 2 (Task 63, head
5e6b327)Scope:
git diff e1a5de9..origin/textchat-63-ffmpeg-lgpl-packaging, read cold.Checks
xtask/src/ffmpeg.rs,xtask/src/package/libs.rs,xtask/src/package.rs,xtask/tests/package.rs). The renamedbundled_ffmpeg_size_is_reportedchecks the reported size against the files inusr/lib/flaxativeand prints it, with no cap. That matches the plan and spec lines changed for Charles's "remove the cap" request. New testbuildinfo_configure_line_is_plaincovers the r1%qescapes.ffmpeg.lockkeys,configure-flags.txtsections,build.sh <linux|windows> <out-dir>,cargo xtask ffmpeg <fetch|build|env>,LINUX_BUNDLED/LINUX_DECLARED(libva, libva-drm) /WINDOWS_BUNDLED, and the env variable names are present as specified.crates/orapps/is touched. No new dependency in fluxer-core. No secrets: the workflows usesecrets.GITHUB_TOKENand mask it in output. The new.pcguard refuses build paths in future archives.${flags[*]}, and xtaskplain_command_lineunescapes r1 archives);-L/-Iflags naming$depsare stripped and a.pcthat still names$workfails the build; NOTICE now says the source is unmodified and that the libraries are stripped and patchelf'd, which matches build.sh (strip and patchelf were already in the r1 script).FLUXER_SCREENSHOT_TESTS=1 cargo xtask ciin a fresh review worktree: all steps passed (exit 0). It fetched the r1 linux archive.Findings
.pcfiles, andrevisionstays 1 even though the build.sh output changed. Tracked by follow-up #445. The NOTICE is already correct through the unescape step, and the.pcfiles are not shipped in the packages.configure-flags.txt. It leaves out the--prefix,--pkg-config,--pkg-config-flagsand--extra-cflagsarguments that build.sh also passes. This is fine for LGPL, since the build recipe is referenced.$depsand$workunescaped into the sed and grep patterns. A work dir containing#or regex characters would break the sed, but the grep guard fails the build loudly in that case. Not hit in CI.Verdict: approve. No blocking findings, and local ci is green. The remote runners are left to the integrator.
- release.yaml, Windows job ("Windows installer (x64)"): bootstraps the .NET 8 SDK as the fork's workflow does (dotnet-install.ps1 -Channel 8.0 when dotnet is missing, DOTNET_ROOT exported), prunes Velopack's temp dir, packs with `cargo xtask package --target windows`, smoke-tests a silent install into a temp folder (--installto), --debug-info from the install folder and Update.exe --uninstall --silent, and uploads the Setup.exe, the full .nupkg (name read from releases.nightly.json) and releases.nightly.json to the draft. - publish: Flaxative-<version>-win-x64-Setup.exe in SHA256SUMS and the release notes; the rolling nightly ships Flaxative-win-x64-Setup.exe. - ci.yaml, Windows job: the same .NET bootstrap (kept in the tools dir) and FLUXER_VPK_TESTS=1 for the real-vpk test. Refs #403 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>Round 3 (head
a13a695): merged origin/textchat (9cf9a68). That merge brought the plan revision of 2026-11-13 (auto-update decision 3), so the Windows package is now a Velopack installer instead of the zip.xtask/src/package/velopack.rsand the reworkedpackage --target windowsare in358a83c..NET/vpksteps and the installer round trip inrelease.yamlandci.yamlare inb4da010.The no-cap decision is kept: the revision had brought back
bundled_ffmpeg_under_25_mib. The localFLUXER_SCREENSHOT_TESTS=1 cargo xtask cipasses, and the real-vpk test passes withFLUXER_VPK_TESTS=1(vpk 1.2.161,[win]cross-pack). The Windows packaging path itself has not run anywhere yet, so please re-review and watch the Windows runs. The PR body has the details.Independent review, round 3 (Text chat 63), head
a13a695I reviewed
9cf9a68..origin/textchat-63-ffmpeg-lgpl-packagingwithout relying on the implementer's notes. Most of this round is the Velopack installer:velopack.rs, the Windows part ofpackage.rs, the fixtures, and theci.yaml/release.yamlWindows jobs.(1) Tests the plan names: all 26 exist and check what the plan says. That includes the 10 Velopack unit tests and
vpk_pack_of_a_tiny_app_passes_check_output, gated byFLUXER_VPK_TESTS=1.bundled_ffmpeg_size_is_reportedfollows Charles's "no cap" decision, and the plan and spec lines now say the same.pack_versionis tested with leading-zero and ordering tables (0105<1113,.9<.10) and with rejected inputs.check_outputrefuses: a hash or size mismatch, a path inFileName(..,/,\,:), a version mismatch, two Full assets, a missing or extra*-Setup.exe, and a portable zip. The fixturereleases.nightly.jsonhas the shape vpk 1.2.x writes (Assets[]withPackageId/Version/Type/FileName/SHA1/SHA256/Size). Its SHA-256 and size matchfake-full.nupkg.(2) Interfaces: each of these exists exactly as the plan writes it:
VPK_VERSION,PACK_ID = "Flaxative",pack_version(&str) -> Result<String>,PackInput { app_dir, version, channel, icon, out_dir },vpk_pack_args(&PackInput) -> Vec<OsString>(the arguments start with--yes packand appear in the order the plan lists),install_vpk(&Path) -> Result<PathBuf>,check_output(out_dir, version, channel) -> Result<VelopackOutput { setup, full_nupkg, feed_json, package: PackageRef { name, sha256, size } }>.LINUX_BUNDLEDandWINDOWS_BUNDLEDare inlibs.rs. I checked the version against nuget.org and crates.io:vpk1.2.161 and thevelopackcrate 1.2.161 are the newest stable 1.2.x pair, so Text chat 72 can pin the same version.(3) Invariants: no crate under
crates/is touched, so nothing changes for fluxer-core, fluxer-ui or fluxer-emoji. No secrets:ffmpeg.yamlmasks the token in its git output, andrelease.yamlsends it only in an auth header. Fixtures, logs and the NOTICE contain no signed URLs. The build paths fixed in round 2 stay fixed.(4) Review Focus: none of the items applies to this task.
(5)
FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci: green on the second run.fluxer --libtests: all 67 passed, then the process aborted with SIGABRT ("The futex facility returned an unexpected error code").readelf -dshows nolibav*).cirun.Findings
xtask/tests/package.rs(windows_app_dir_has_exe_dlls_and_licencesandwindows_dlls_need_only_system_dlls) always runvpk, so they need the .NET 8 SDK even withoutFLUXER_VPK_TESTS=1. The Windows CI job installs .NET first, so CI is fine. A developer on Windows without .NET gets a redcargo xtask ci, though. Gate these tests on the variable too, or mention .NET in the README's build prerequisites.Setup.exe --silentruns Velopack's first-install hooks against an exe that is not Velopack-aware yet (that comes in Text chat 72). Velopack should ignore a hook that fails, but nobody has run this. As the notes say, watch the first Windows release run.<id>-<channel>-Setup.exeand<id>-<v>-<channel>-full.nupkg, not<id>-win-Setup.exeas the plan says.rename_setuppicks up the single*-Setup.exe, so it works with either name, andcheck_outputreads the.nupkgname from the feed and never builds it itself, as the plan requires.Verdict: approved. No blocking findings, and local ci is green. The Windows installer path has never run on a Windows machine, so the orchestrator should watch the next Windows CI run and the next Windows release run.