Text chat 63: LGPL FFmpeg build, fetch, packaging and licence notices (#403) #444

Manually merged
charles merged 0 commits from textchat-63-ffmpeg-lgpl-packaging into textchat 2026-11-13 13:10:49 +00:00
Owner

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.lock pins FFmpeg 8.0.3, dav1d 1.5.4 and nv-codec-headers 13.0.19.0, with revision = 1 and 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 holds configure-flags.txt, build.sh and a README. build.sh refuses CONFIG_GPL, CONFIG_NONFREE and CONFIG_VERSION3, writes buildinfo.toml with avutil_license(), makes MSVC .lib files with llvm-dlltool and writes relocatable .pc files.
  • Release ffmpeg-8.0.3-r1 (a prerelease): both archives and the three source tarballs.
  • cargo xtask ffmpeg <fetch|build|env>. cargo xtask ci fetches first and applies the env to every cargo command.
  • Linux packaging: the AppImage bundles the six libraries under usr/lib/flaxative/, each with RUNPATH=$ORIGIN. The licences are under usr/share/doc/flaxative/licenses/{ffmpeg,dav1d}/, and NOTICE.txt is filled from buildinfo.toml. The binary's only RUNPATH is $ORIGIN/../lib/flaxative. libva and libva-drm are now declared dependencies.
  • Windows packaging (new in this round), in xtask/src/package/velopack.rs:
    • The interface: VPK_VERSION = "1.2.161" (the newest 1.2.x of the vpk tool on nuget.org and of the velopack crate on crates.io), PACK_ID = "Flaxative", pack_version (2026.0105.412 becomes 2026.105.412), PackInput, vpk_pack_args, install_vpk, check_output, VelopackOutput and PackageRef. There are also helpers remove_portable and rename_setup, and PACK_TITLE, which a test compares with fluxer_platform::APP_DISPLAY_NAME.
    • xtask package --target windows stages <target dir>/package/win-x64/app/ (exe, DLLs, licences) and smoke-runs flaxative.exe --debug-info from it. It then runs vpk --yes pack … --shortcuts StartMenu --runtime win-x64 --channel nightly --delta None, deletes *-Portable.zip and renames the Setup.exe. It runs check_output before copying Flaxative-<v>-win-x64-Setup.exe, Flaxative-<pack v>-nightly-full.nupkg and releases.nightly.json to dist/. A Windows package now needs a release --version, because pack_version refuses 0.0.0-dev+….
  • CI:
    • ffmpeg.yaml (manual) is the only workflow that installs build tools. ci.yaml and release.yaml only run cargo xtask ffmpeg fetch.
    • The Windows jobs of release.yaml and ci.yaml now bootstrap the .NET 8 SDK the way the fork does (dotnet-install.ps1 -Channel 8.0, DOTNET_ROOT) and prune C:\WINDOWS\SystemTemp\Velopack. ci.yaml sets FLUXER_VPK_TESTS=1.
    • The release smoke test is now a round trip: Setup.exe --silent --installto <temp> -- --debug-info, then current\flaxative.exe --debug-info, then Update.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.
    • The upload step attaches the Setup.exe, the .nupkg (its name is read from releases.nightly.json) and the feed file. The release and nightly names are now …-win-x64-Setup.exe and Flaxative-win-x64-Setup.exe.

Measured

  • The bundled libraries take 10.5 MiB unpacked. There is no cap: Charles said "remove the cap" on 2026-11-13.
  • The AppImage grows from 31.26 MB to 35.06 MB (+3.8 MB).
  • The Windows DLLs take about 10.9 MB. I could not measure the Setup.exe growth here; the first Windows release run prints it (bundled FFmpeg … bytes and the Velopack package size).
  • For reference, a vpk [win] pack of 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 ci passes locally on Linux (CachyOS). That covers every Linux packaging test and the new Velopack unit tests:
    • pack_version_strips_leading_zeros_and_keeps_order and pack_version_rejects_non_release_versions
    • vpk_args_are_per_user_start_menu_no_delta and vpk_args_name_the_channel_and_main_exe
    • check_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_mismatch and check_output_requires_one_setup_exe
    • portable_zip_is_not_shipped, package_file_names_are_flaxative (-Setup.exe) and pack_title_is_the_app_display_name
    • I ran each of them failing before writing the implementation.
  • vpk_pack_of_a_tiny_app_passes_check_output also passed here with FLUXER_VPK_TESTS=1. It used the real vpk 1.2.161, installed by install_vpk through dotnet tool install. On Linux it packs with vpk's [win] cross-pack directive.
  • The fixtures in xtask/tests/fixtures/velopack/ are generated metadata. They follow the shape of a real vpk [win] pack --channel nightly output: {"Assets":[{PackageId,Version,Type,FileName,SHA1,SHA256 (upper-case hex),Size}]}, with files named <id>-nightly-Setup.exe and <id>-<v>-nightly-full.nupkg.
  • cargo clippy -p xtask --all-targets --target x86_64-pc-windows-msvc -D warnings is clean, so the #[cfg(windows)] code compiles. This also fixed a dead-code error that check_linux_bundled already had on Windows in round 1.
  • Not run here (no Windows machine): windows_app_dir_has_exe_dlls_and_licences, windows_dlls_need_only_system_dlls, the Windows packaging path and the installer round trip in release.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. The vpk log lines appear in the job log as ==> vpk: ….

Deviations

  • FFmpeg is 8.0.3, not 7.1.x (rsmpeg decides, as the plan allows). There is no --disable-postproc, because libpostproc no longer exists in 8.0.
  • RUNPATH=$ORIGIN is set with patchelf after the build rather than through --extra-ldflags.
  • Windows uses --enable-w32threads and -static-libgcc. The mingw route works, so the BtbN fallback is not used.
  • On Debian and Ubuntu, libva-drm.so.2 comes from the package libva-drm2.
  • There is no pre-generated binding.rs, and the MSVC link is unverified. Both are follow-up #442. Rebuilding the archives as r2, without the build paths in the .pc files, is follow-up #445.
  • The bundled size has no cap (Charles). The plan revision had brought back bundled_ffmpeg_under_25_mib, so when I merged textchat I kept bundled_ffmpeg_size_is_reported and the no-cap wording in the plan and the spec.
  • Velopack:
    • vpk writes <packId>-<channel>-Setup.exe and <packId>-<v>-<channel>-full.nupkg for a non-default channel, not <packId>-win-Setup.exe. rename_setup therefore takes whichever single *-Setup.exe vpk wrote.
    • vpk writes to a clean staging folder; check_output runs there, and only then are the three files copied to dist/, so stale files in dist/ cannot break the check.
    • The channel is the constant nightly until Text chat 70 adds the flag.
    • The real-vpk test also runs off Windows, using [win], when FLUXER_VPK_TESTS=1 is set; the plan said Windows only.

Closes #403

🤖 Generated with Claude Code

## 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.lock` pins FFmpeg **8.0.3**, dav1d 1.5.4 and nv-codec-headers 13.0.19.0, with `revision = 1` and 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 holds `configure-flags.txt`, `build.sh` and a README. `build.sh` refuses `CONFIG_GPL`, `CONFIG_NONFREE` and `CONFIG_VERSION3`, writes `buildinfo.toml` with `avutil_license()`, makes MSVC `.lib` files with llvm-dlltool and writes relocatable `.pc` files. - **Release `ffmpeg-8.0.3-r1`** (a prerelease): both archives and the three source tarballs. - **`cargo xtask ffmpeg <fetch|build|env>`**. `cargo xtask ci` fetches first and applies the env to every cargo command. - **Linux packaging**: the AppImage bundles the six libraries under `usr/lib/flaxative/`, each with `RUNPATH=$ORIGIN`. The licences are under `usr/share/doc/flaxative/licenses/{ffmpeg,dav1d}/`, and `NOTICE.txt` is filled from `buildinfo.toml`. The binary's only RUNPATH is `$ORIGIN/../lib/flaxative`. libva and libva-drm are now declared dependencies. - **Windows packaging (new in this round)**, in `xtask/src/package/velopack.rs`: - The interface: `VPK_VERSION = "1.2.161"` (the newest 1.2.x of the `vpk` tool on nuget.org and of the `velopack` crate on crates.io), `PACK_ID = "Flaxative"`, `pack_version` (`2026.0105.412` becomes `2026.105.412`), `PackInput`, `vpk_pack_args`, `install_vpk`, `check_output`, `VelopackOutput` and `PackageRef`. There are also helpers `remove_portable` and `rename_setup`, and `PACK_TITLE`, which a test compares with `fluxer_platform::APP_DISPLAY_NAME`. - `xtask package --target windows` stages `<target dir>/package/win-x64/app/` (exe, DLLs, licences) and smoke-runs `flaxative.exe --debug-info` from it. It then runs `vpk --yes pack … --shortcuts StartMenu --runtime win-x64 --channel nightly --delta None`, deletes `*-Portable.zip` and renames the Setup.exe. It runs `check_output` before copying `Flaxative-<v>-win-x64-Setup.exe`, `Flaxative-<pack v>-nightly-full.nupkg` and `releases.nightly.json` to `dist/`. A Windows package now needs a release `--version`, because `pack_version` refuses `0.0.0-dev+…`. - **CI**: - `ffmpeg.yaml` (manual) is the only workflow that installs build tools. `ci.yaml` and `release.yaml` only run `cargo xtask ffmpeg fetch`. - The Windows jobs of `release.yaml` and `ci.yaml` now bootstrap the .NET 8 SDK the way the fork does (`dotnet-install.ps1 -Channel 8.0`, `DOTNET_ROOT`) and prune `C:\WINDOWS\SystemTemp\Velopack`. `ci.yaml` sets `FLUXER_VPK_TESTS=1`. - The release smoke test is now a round trip: `Setup.exe --silent --installto <temp> -- --debug-info`, then `current\flaxative.exe --debug-info`, then `Update.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`. - The upload step attaches the Setup.exe, the `.nupkg` (its name is read from `releases.nightly.json`) and the feed file. The release and nightly names are now `…-win-x64-Setup.exe` and `Flaxative-win-x64-Setup.exe`. ## Measured - The bundled libraries take 10.5 MiB unpacked. There is no cap: Charles said "remove the cap" on 2026-11-13. - The AppImage grows from 31.26 MB to 35.06 MB (+3.8 MB). - The Windows DLLs take about 10.9 MB. I could not measure the Setup.exe growth here; the first Windows release run prints it (`bundled FFmpeg … bytes` and the Velopack package size). - For reference, a `vpk [win] pack` of 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 ci` passes locally on Linux (CachyOS). That covers every Linux packaging test and the new Velopack unit tests: - `pack_version_strips_leading_zeros_and_keeps_order` and `pack_version_rejects_non_release_versions` - `vpk_args_are_per_user_start_menu_no_delta` and `vpk_args_name_the_channel_and_main_exe` - `check_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_mismatch` and `check_output_requires_one_setup_exe` - `portable_zip_is_not_shipped`, `package_file_names_are_flaxative` (`-Setup.exe`) and `pack_title_is_the_app_display_name` - I ran each of them failing before writing the implementation. - `vpk_pack_of_a_tiny_app_passes_check_output` also passed here with `FLUXER_VPK_TESTS=1`. It used the real vpk 1.2.161, installed by `install_vpk` through `dotnet tool install`. On Linux it packs with vpk's `[win]` cross-pack directive. - The fixtures in `xtask/tests/fixtures/velopack/` are generated metadata. They follow the shape of a real `vpk [win] pack --channel nightly` output: `{"Assets":[{PackageId,Version,Type,FileName,SHA1,SHA256 (upper-case hex),Size}]}`, with files named `<id>-nightly-Setup.exe` and `<id>-<v>-nightly-full.nupkg`. - `cargo clippy -p xtask --all-targets --target x86_64-pc-windows-msvc -D warnings` is clean, so the `#[cfg(windows)]` code compiles. This also fixed a dead-code error that `check_linux_bundled` already had on Windows in round 1. - **Not run here** (no Windows machine): `windows_app_dir_has_exe_dlls_and_licences`, `windows_dlls_need_only_system_dlls`, the Windows packaging path and the installer round trip in `release.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.** The `vpk` log lines appear in the job log as `==> vpk: …`. ## Deviations - FFmpeg is 8.0.3, not 7.1.x (rsmpeg decides, as the plan allows). There is no `--disable-postproc`, because libpostproc no longer exists in 8.0. - RUNPATH=$ORIGIN is set with patchelf after the build rather than through `--extra-ldflags`. - Windows uses `--enable-w32threads` and `-static-libgcc`. The mingw route works, so the BtbN fallback is not used. - On Debian and Ubuntu, `libva-drm.so.2` comes from the package `libva-drm2`. - There is no pre-generated `binding.rs`, and the MSVC link is unverified. Both are follow-up #442. Rebuilding the archives as r2, without the build paths in the `.pc` files, is follow-up #445. - The bundled size has no cap (Charles). The plan revision had brought back `bundled_ffmpeg_under_25_mib`, so when I merged textchat I kept `bundled_ffmpeg_size_is_reported` and the no-cap wording in the plan and the spec. - Velopack: - `vpk` writes `<packId>-<channel>-Setup.exe` and `<packId>-<v>-<channel>-full.nupkg` for a non-default channel, not `<packId>-win-Setup.exe`. `rename_setup` therefore takes whichever single `*-Setup.exe` vpk wrote. - vpk writes to a clean staging folder; `check_output` runs there, and only then are the three files copied to `dist/`, so stale files in `dist/` cannot break the check. - The channel is the constant `nightly` until Text chat 70 adds the flag. - The real-vpk test also runs off Windows, using `[win]`, when `FLUXER_VPK_TESTS=1` is set; the plan said Windows only. Closes #403 🤖 Generated with [Claude Code](https://claude.com/claude-code)
APP_NAME is now "flaxative" (folders, keyring service), with LEGACY_APP_NAME
"fluxer-native", APP_DISPLAY_NAME "Flaxative" (moved to the crate root,
re-exported from notify), APP_ID and WINDOWS_APP_USER_MODEL_ID.
paths::migrate_legacy moves the old folders once (rename, else copy and
remove only after a complete copy); Secrets::load_token moves the old
keyring entry, clear_token deletes both.

Refs #402

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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>
fluxer-api's USER_AGENT is "Flaxative/<version>" (now public); the window
is titled "Flaxative" and carries the application id "flaxative" on Linux
(Wayland app_id, X11 WM_CLASS). fluxer-platform checks its APP_ID and
APP_DISPLAY_NAME against the UI's.

Refs #402

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The executable is flaxative (flaxative.exe; one bin, so cargo run -p fluxer
still works), clap name and about say Flaxative, log files are
flaxative.<date>.log, --debug-info starts "flaxative <version>". Before
logging starts the folders of the old name are moved once (not with
--devserver) and the outcome is logged (paths only). On Windows the
process sets its AppUserModelID; the icon moves to packaging/windows/
flaxative.ico with this commit so the resource build keeps finding it.

Refs #402

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Packages are Flaxative-<version>-linux-x86_64.AppImage and
Flaxative-<version>-win-x64.exe; the AppImage holds flaxative.desktop
(Exec=flaxative, Icon=flaxative, StartupWMClass=flaxative), flaxative.svg
and usr/bin/flaxative. Releases and the nightly are named Flaxative; the
nightly's recreation drops the old-named assets and its body says the
client was renamed. Crate descriptions, READMEs and CLAUDE.md's heading
use the new name; the repository keeps its name.

Refs #402

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Refs #402

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
# Conflicts:
#	.forgejo/workflows/release.yaml
FFmpeg 8.0.3 (rsmpeg 0.18 binds the 8.0 line), dav1d 1.5.4 (static, in
libavcodec), nv-codec-headers 13.0.19.0. build.sh refuses a GPL, nonfree
or version 3 config.h; archives built in ubuntu:22.04 and attached to the
release ffmpeg-8.0.3-r1 with the source tarballs.

Refs #403

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cargo xtask ffmpeg <fetch|build|env>; ci fetches and applies the env.
The AppImage bundles the six FFmpeg libraries under usr/lib/flaxative
(RUNPATH $ORIGIN, 10.5 MiB unpacked, +3.8 MB AppImage) with the LGPL
text, dav1d's licence and a filled NOTICE; Windows becomes a zip with the
DLLs next to the exe. libva and libva-drm are declared dependencies.

Refs #403

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #403

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refs #403

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
Owner

Independent review: Text chat 63 (head 69230cd, diff e1a5de9..textchat-63-ffmpeg-lgpl-packaging)

What I checked:

  • All 15 tests the plan names exist (ffmpeg.rs, libs.rs, xtask/tests/package.rs, package.rs) and assert what the plan says.
  • Interfaces: lock fields, cargo xtask ffmpeg <fetch|build|env> [--target], env vars, LINUX_BUNDLED, WINDOWS_BUNDLED, LINUX_DECLARED with libva and libva-drm, the .zip package names and the AppDir layout all exist.
  • FFMPEG_DLL_PATH as a directory: rusty_ffmpeg 0.16.7+ffmpeg.8's build.rs (dynamic_linking) accepts a directory and links each lib from it. OK.
  • Fetched archive r1 (Linux): every .so has RUNPATH [$ORIGIN]. NEEDED lists only siblings, libm, libc, libva and libva-drm. Newest glibc symbol is 2.35. buildinfo says "LGPL version 2.1 or later". Anonymous downloads of the release assets work.
  • Choosing FFmpeg 8.0.3 over 7.1.x is justified by rsmpeg 0.18 (the plan allowed it). libva-drm2 is the correct Debian/Ubuntu package for libva-drm.so.2.
  • No crate invariants touched (xtask, tools, packaging and workflows only). No secrets in the code; the workflow masks the token.

Findings:

  • [minor] lib/pkgconfig/libavcodec.pc Libs.private keeps 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 $deps too, or drop it.
  • [minor] The configure line in buildinfo.toml and NOTICE.txt carries printf %q escapes (--enable-filter=abuffer\,abuffersink…). The notice is meant for a person to reproduce the build. A plain space-joined line would read better.
  • [minor] NOTICE.txt says the libraries are shipped "unmodified", but build.sh changes RUNPATH with patchelf and strips them. Say so in the notice.
  • [minor] Until Task 68 links FFmpeg into the binary, apprun_names_missing_libva and the AppRun ldd check only cover a binary that does not yet need libva. This is expected for now; re-check it in 68.
  • [minor/process] The only user request relayed to this run was "remove the cap", which this PR does not clearly address. If it means the 25 MiB size limit (MAX_BUNDLED_BYTES, bundled_ffmpeg_under_25_mib), that needs Charles to confirm. I did not change it.
  • Not verifiable here: the Windows zip and DLL tests and the MSVC link of the llvm-dlltool import libs (follow-up #442).

Local gate: FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci was 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.

Independent review: Text chat 63 (head 69230cd, diff e1a5de9..textchat-63-ffmpeg-lgpl-packaging) What I checked: - All 15 tests the plan names exist (ffmpeg.rs, libs.rs, xtask/tests/package.rs, package.rs) and assert what the plan says. - Interfaces: lock fields, `cargo xtask ffmpeg <fetch|build|env> [--target]`, env vars, LINUX_BUNDLED, WINDOWS_BUNDLED, LINUX_DECLARED with libva and libva-drm, the `.zip` package names and the AppDir layout all exist. - FFMPEG_DLL_PATH as a directory: rusty_ffmpeg 0.16.7+ffmpeg.8's build.rs (`dynamic_linking`) accepts a directory and links each lib from it. OK. - Fetched archive r1 (Linux): every .so has RUNPATH [$ORIGIN]. NEEDED lists only siblings, libm, libc, libva and libva-drm. Newest glibc symbol is 2.35. buildinfo says "LGPL version 2.1 or later". Anonymous downloads of the release assets work. - Choosing FFmpeg 8.0.3 over 7.1.x is justified by rsmpeg 0.18 (the plan allowed it). libva-drm2 is the correct Debian/Ubuntu package for libva-drm.so.2. - No crate invariants touched (xtask, tools, packaging and workflows only). No secrets in the code; the workflow masks the token. Findings: - [minor] lib/pkgconfig/libavcodec.pc `Libs.private` keeps 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 `$deps` too, or drop it. - [minor] The configure line in buildinfo.toml and NOTICE.txt carries `printf %q` escapes (`--enable-filter=abuffer\,abuffersink…`). The notice is meant for a person to reproduce the build. A plain space-joined line would read better. - [minor] NOTICE.txt says the libraries are shipped "unmodified", but build.sh changes RUNPATH with patchelf and strips them. Say so in the notice. - [minor] Until Task 68 links FFmpeg into the binary, `apprun_names_missing_libva` and the AppRun ldd check only cover a binary that does not yet need libva. This is expected for now; re-check it in 68. - [minor/process] The only user request relayed to this run was "remove the cap", which this PR does not clearly address. If it means the 25 MiB size limit (`MAX_BUNDLED_BYTES`, `bundled_ffmpeg_under_25_mib`), that needs Charles to confirm. I did not change it. - Not verifiable here: the Windows zip and DLL tests and the MSVC link of the llvm-dlltool import libs (follow-up #442). Local gate: `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` was 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.
- build.sh writes the configure line without printf %q escapes, and xtask
  unescapes the line of existing (r1) archives when it reads buildinfo.toml,
  so the NOTICE shows a command a person can paste.
- build.sh drops the -L/-I flags naming $deps from the relocatable .pc
  files and refuses a .pc that still names the work directory.
- NOTICE says the source is unmodified and that the built libraries are
  stripped and given RUNPATH=$ORIGIN with patchelf.
- The 25 MiB cap on the bundled FFmpeg is removed (Charles: "remove the
  cap"); the size is still checked against the report and printed.

Refs #403

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Owner

Review round 1, fixed in 5e6b327 (local cargo xtask ci green):

  1. build.sh, build path in .pc Libs.private: the relocatable rewrite now also drops the -L/-I flags naming $deps (dav1d is folded into libavcodec and nv-codec-headers are headers only, neither is in the archive), and build.sh refuses a .pc that 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.
  2. build.sh, printf %q escapes in the configure line: build.sh now writes a plain line (no flag holds a shell character). For the r1 archives already published, check_buildinfo unescapes the line when it reads it, so the packaged NOTICE is plain now. New test ffmpeg::tests::buildinfo_configure_line_is_plain; assert_licences checks the notice has no backslash.
  3. NOTICE.txt, "unmodified": it now says the source tarball is unmodified, and that build.sh strips the libraries and sets each library's RUNPATH to $ORIGIN with patchelf on Linux. assert_licences checks for this wording.
  4. The cap: Charles asked to "remove the cap", so the 25 MiB limit is gone. MAX_BUNDLED_BYTES is deleted, bundled_ffmpeg_under_25_mib is renamed to bundled_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.
  5. Windows paths not verifiable on Linux: nothing changed here; this stays with follow-up #442.

🤖 Generated with Claude Code

Review round 1, fixed in 5e6b327 (local `cargo xtask ci` green): 1. **build.sh, build path in .pc Libs.private**: the relocatable rewrite now also drops the `-L`/`-I` flags naming `$deps` (dav1d is folded into libavcodec and nv-codec-headers are headers only, neither is in the archive), and build.sh refuses a `.pc` that 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. 2. **build.sh, printf %q escapes in the configure line**: build.sh now writes a plain line (no flag holds a shell character). For the r1 archives already published, `check_buildinfo` unescapes the line when it reads it, so the packaged NOTICE is plain now. New test `ffmpeg::tests::buildinfo_configure_line_is_plain`; `assert_licences` checks the notice has no backslash. 3. **NOTICE.txt, "unmodified"**: it now says the source tarball is unmodified, and that build.sh strips the libraries and sets each library's RUNPATH to `$ORIGIN` with patchelf on Linux. `assert_licences` checks for this wording. 4. **The cap**: Charles asked to "remove the cap", so the 25 MiB limit is gone. `MAX_BUNDLED_BYTES` is deleted, `bundled_ffmpeg_under_25_mib` is renamed to `bundled_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. 5. **Windows paths not verifiable on Linux**: nothing changed here; this stays with follow-up #442. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Author
Owner

Independent review, round 2 (Task 63, head 5e6b327)

Scope: git diff e1a5de9..origin/textchat-63-ffmpeg-lgpl-packaging, read cold.

Checks

  1. Plan tests: all 15 named tests exist (xtask/src/ffmpeg.rs, xtask/src/package/libs.rs, xtask/src/package.rs, xtask/tests/package.rs). The renamed bundled_ffmpeg_size_is_reported checks the reported size against the files in usr/lib/flaxative and prints it, with no cap. That matches the plan and spec lines changed for Charles's "remove the cap" request. New test buildinfo_configure_line_is_plain covers the r1 %q escapes.
  2. Interfaces: ffmpeg.lock keys, configure-flags.txt sections, 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.
  3. Invariants: no crate under crates/ or apps/ is touched. No new dependency in fluxer-core. No secrets: the workflows use secrets.GITHUB_TOKEN and mask it in output. The new .pc guard refuses build paths in future archives.
  4. Round-1 fixes verified: the configure line is plain (build.sh ${flags[*]}, and xtask plain_command_line unescapes r1 archives); -L/-I flags naming $deps are stripped and a .pc that still names $work fails 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).
  5. Local FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci in a fresh review worktree: all steps passed (exit 0). It fetched the r1 linux archive.

Findings

  • minor: the published r1 archives still hold the escaped configure line and the builder's paths in their .pc files, and revision stays 1 even though the build.sh output changed. Tracked by follow-up #445. The NOTICE is already correct through the unescape step, and the .pc files are not shipped in the packages.
  • minor: the NOTICE configure line lists only the flags from configure-flags.txt. It leaves out the --prefix, --pkg-config, --pkg-config-flags and --extra-cflags arguments that build.sh also passes. This is fine for LGPL, since the build recipe is referenced.
  • minor: build.sh puts $deps and $work unescaped 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.
  • minor (deferred): the Windows-runner checks remain under follow-up #442.

Verdict: approve. No blocking findings, and local ci is green. The remote runners are left to the integrator.

## Independent review, round 2 (Task 63, head 5e6b327) Scope: `git diff e1a5de9..origin/textchat-63-ffmpeg-lgpl-packaging`, read cold. **Checks** 1. Plan tests: all 15 named tests exist (`xtask/src/ffmpeg.rs`, `xtask/src/package/libs.rs`, `xtask/src/package.rs`, `xtask/tests/package.rs`). The renamed `bundled_ffmpeg_size_is_reported` checks the reported size against the files in `usr/lib/flaxative` and prints it, with no cap. That matches the plan and spec lines changed for Charles's "remove the cap" request. New test `buildinfo_configure_line_is_plain` covers the r1 `%q` escapes. 2. Interfaces: `ffmpeg.lock` keys, `configure-flags.txt` sections, `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. 3. Invariants: no crate under `crates/` or `apps/` is touched. No new dependency in fluxer-core. No secrets: the workflows use `secrets.GITHUB_TOKEN` and mask it in output. The new `.pc` guard refuses build paths in future archives. 4. Round-1 fixes verified: the configure line is plain (build.sh `${flags[*]}`, and xtask `plain_command_line` unescapes r1 archives); `-L`/`-I` flags naming `$deps` are stripped and a `.pc` that still names `$work` fails 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). 5. Local `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` in a fresh review worktree: **all steps passed** (exit 0). It fetched the r1 linux archive. **Findings** - minor: the published r1 archives still hold the escaped configure line and the builder's paths in their `.pc` files, and `revision` stays 1 even though the build.sh output changed. Tracked by follow-up #445. The NOTICE is already correct through the unescape step, and the `.pc` files are not shipped in the packages. - minor: the NOTICE configure line lists only the flags from `configure-flags.txt`. It leaves out the `--prefix`, `--pkg-config`, `--pkg-config-flags` and `--extra-cflags` arguments that build.sh also passes. This is fine for LGPL, since the build recipe is referenced. - minor: build.sh puts `$deps` and `$work` unescaped 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. - minor (deferred): the Windows-runner checks remain under follow-up #442. **Verdict: approve.** No blocking findings, and local ci is green. The remote runners are left to the integrator.
Keeps the revised Task 63 (Velopack installer on Windows) and the
no-cap decision for the bundled FFmpeg size.

Refs #403

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Windows package becomes a Velopack installer (auto-update spec
decision 3, revised Task 63) instead of a zip:

- xtask/src/package/velopack.rs: VPK_VERSION 1.2.161 (the newest 1.2.x
  vpk on nuget.org and velopack crate), PACK_ID, pack_version
  (2026.0105.412 -> 2026.105.412), vpk_pack_args (per-user, Start menu,
  no delta, channel, main exe), install_vpk (dotnet tool install into
  <target dir>/tools/vpk), check_output (one Full package at the pack
  version, plain FileName, size and SHA-256 match, one Setup.exe, no
  portable zip), remove_portable, rename_setup.
- xtask package --target windows stages <target dir>/package/win-x64/app
  (exe, DLLs, licences), smoke-runs --debug-info from it, packs it and
  writes Flaxative-<version>-win-x64-Setup.exe, the full .nupkg and
  releases.nightly.json to dist/.
- Fixtures xtask/tests/fixtures/velopack/ are generated metadata shaped
  like vpk 1.2.161's own releases.nightly.json (checked with a real
  `vpk [win] pack` on Linux).
- libs.rs: check_linux_bundled is Linux-only outside tests (clippy
  dead-code error on the Windows target).

Refs #403

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
- 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>
The packaging test requires a NOTICE without backslashes (the configure
line must be plain); the install folder is written with forward slashes.

Refs #403

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Author
Owner

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.rs and the reworked package --target windows are in 358a83c.
  • The .NET/vpk steps and the installer round trip in release.yaml and ci.yaml are in b4da010.
  • The NOTICE fix: its's Windows path uses forward slashes, because the plain-line test refuses backslashes.

The no-cap decision is kept: the revision had brought back bundled_ffmpeg_under_25_mib. The local FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci passes, and the real-vpk test passes with FLUXER_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.

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.rs` and the reworked `package --target windows` are in 358a83c. - The `.NET`/`vpk` steps and the installer round trip in `release.yaml` and `ci.yaml` are in b4da010. - The NOTICE fix: its's Windows path uses forward slashes, because the plain-line test refuses backslashes. The no-cap decision is kept: the revision had brought back `bundled_ffmpeg_under_25_mib`. The local `FLUXER_SCREENSHOT_TESTS=1 cargo xtask ci` passes, and the real-vpk test passes with `FLUXER_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.
Author
Owner

Independent review, round 3 (Text chat 63), head a13a695

I reviewed 9cf9a68..origin/textchat-63-ffmpeg-lgpl-packaging without relying on the implementer's notes. Most of this round is the Velopack installer: velopack.rs, the Windows part of package.rs, the fixtures, and the ci.yaml/release.yaml Windows 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 by FLUXER_VPK_TESTS=1. bundled_ffmpeg_size_is_reported follows Charles's "no cap" decision, and the plan and spec lines now say the same. pack_version is tested with leading-zero and ordering tables (0105 < 1113, .9 < .10) and with rejected inputs. check_output refuses: a hash or size mismatch, a path in FileName (.., /, \, :), a version mismatch, two Full assets, a missing or extra *-Setup.exe, and a portable zip. The fixture releases.nightly.json has the shape vpk 1.2.x writes (Assets[] with PackageId/Version/Type/FileName/SHA1/SHA256/Size). Its SHA-256 and size match fake-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 pack and 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_BUNDLED and WINDOWS_BUNDLED are in libs.rs. I checked the version against nuget.org and crates.io: vpk 1.2.161 and the velopack crate 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.yaml masks the token in its git output, and release.yaml sends 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.

  • The first run failed at the end of the fluxer --lib tests: all 67 passed, then the process aborted with SIGABRT ("The futex facility returned an unexpected error code").
  • That is the known flake #338. The test binary does not link FFmpeg (readelf -d shows no libav*).
  • 8 standalone reruns of that test binary passed, and so did the full second ci run.

Findings

  • minor: On Windows, the integration tests in xtask/tests/package.rs (windows_app_dir_has_exe_dlls_and_licences and windows_dlls_need_only_system_dlls) always run vpk, so they need the .NET 8 SDK even without FLUXER_VPK_TESTS=1. The Windows CI job installs .NET first, so CI is fine. A developer on Windows without .NET gets a red cargo xtask ci, though. Gate these tests on the variable too, or mention .NET in the README's build prerequisites.
  • minor (not verified, Windows only): in the release smoke test, Setup.exe --silent runs 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.
  • minor (deviation, accepted): vpk 1.2.161 names its files <id>-<channel>-Setup.exe and <id>-<v>-<channel>-full.nupkg, not <id>-win-Setup.exe as the plan says. rename_setup picks up the single *-Setup.exe, so it works with either name, and check_output reads the .nupkg name 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.

## Independent review, round 3 (Text chat 63), head a13a695 I reviewed `9cf9a68..origin/textchat-63-ffmpeg-lgpl-packaging` without relying on the implementer's notes. Most of this round is the Velopack installer: `velopack.rs`, the Windows part of `package.rs`, the fixtures, and the `ci.yaml`/`release.yaml` Windows 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 by `FLUXER_VPK_TESTS=1`. `bundled_ffmpeg_size_is_reported` follows Charles's "no cap" decision, and the plan and spec lines now say the same. `pack_version` is tested with leading-zero and ordering tables (`0105` < `1113`, `.9` < `.10`) and with rejected inputs. `check_output` refuses: a hash or size mismatch, a path in `FileName` (`..`, `/`, `\`, `:`), a version mismatch, two Full assets, a missing or extra `*-Setup.exe`, and a portable zip. The fixture `releases.nightly.json` has the shape vpk 1.2.x writes (`Assets[]` with `PackageId/Version/Type/FileName/SHA1/SHA256/Size`). Its SHA-256 and size match `fake-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 pack` and 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_BUNDLED` and `WINDOWS_BUNDLED` are in `libs.rs`. I checked the version against nuget.org and crates.io: `vpk` 1.2.161 and the `velopack` crate 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.yaml` masks the token in its git output, and `release.yaml` sends 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. - The first run failed at the end of the `fluxer --lib` tests: all 67 passed, then the process aborted with SIGABRT ("The futex facility returned an unexpected error code"). - That is the known flake #338. The test binary does not link FFmpeg (`readelf -d` shows no `libav*`). - 8 standalone reruns of that test binary passed, and so did the full second `ci` run. ### Findings - **minor:** On Windows, the integration tests in `xtask/tests/package.rs` (`windows_app_dir_has_exe_dlls_and_licences` and `windows_dlls_need_only_system_dlls`) always run `vpk`, so they need the .NET 8 SDK even without `FLUXER_VPK_TESTS=1`. The Windows CI job installs .NET first, so CI is fine. A developer on Windows without .NET gets a red `cargo xtask ci`, though. Gate these tests on the variable too, or mention .NET in the README's build prerequisites. - **minor (not verified, Windows only):** in the release smoke test, `Setup.exe --silent` runs 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. - **minor (deviation, accepted):** vpk 1.2.161 names its files `<id>-<channel>-Setup.exe` and `<id>-<v>-<channel>-full.nupkg`, not `<id>-win-Setup.exe` as the plan says. `rename_setup` picks up the single `*-Setup.exe`, so it works with either name, and `check_output` reads the `.nupkg` name 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.
charles manually merged commit 851af027ea into textchat 2026-11-13 13:10:49 +00:00
Sign in to join this conversation.
No description provided.