fourier-debian: Path A — ffmpeg into /opt/fourier prefix (no more KDE cascade) #36

Merged
marfrit merged 1 commits from noether/fourier-private-prefix into main 2026-05-19 08:15:26 +00:00
Owner

Problem

On trixie hosts (e.g. higgs), apt install ffmpeg-v4l2-request-fourier libva-v4l2-request-fourier would trigger removal of ~50 packages including kde-plasma-desktop, vlc, dolphin, sddm-theme-breeze, nextcloud-desktop, plasma-* etc. Root cause: the ffmpeg-v4l2-request-fourier .deb declared Conflicts: libavcodec61, libavformat61, ... because the design intent was 'drop-in replacement for stock ffmpeg'. But the package actually ships FFmpeg 8.1 (libavcodec.so.62), while stock trixie is FFmpeg 7.1 (libavcodec.so.61) — different SONAMEs, NOT ABI-compatible. Even if apt hadn't cascaded the removal, ldd of every libavcodec61-linked binary would have failed.

Arch dodges this because rolling-Arch stock ffmpeg is also already on .so.62. Debian trixie is stable.

Fix (Path A)

Private prefix /opt/fourier. Live alongside the stock ffmpeg, only fourier-aware consumers reach in.

  1. ffmpeg-v4l2-request-fourier (pkgrel=2):
    • --prefix=/opt/fourier, libs at /opt/fourier/lib, bins at /opt/fourier/bin
    • -Wl,-rpath,/opt/fourier/lib for self-sufficient /opt/fourier/bin/ffmpeg
    • /etc/ld.so.conf.d/fourier.conf adds /opt/fourier/lib to ld cache via postinst → dlopen-by-SONAME consumers (firefox, daedalus) find libavcodec.so.62 automatically without any LD_LIBRARY_PATH wrapper.
    • Drop all Conflicts/Replaces for libav / libpostproc / libsw** — no SONAME clash with stock libavcodec61, no reason to evict anything.
    • Convenience symlinks /usr/bin/ffmpeg-fourier + /usr/bin/ffprobe-fourier.
  2. daedalus-v4l2 (pkgrel=2):
    • Depends: ffmpeg-v4l2-request-fourier (>= 2:8.1+rfourier) instead of stock ffmpeg (>= 7.1). The binary was built against libavcodec.so.62 on the CI runner; at runtime it MUST get .so.62 from the fourier pkg.

NOT touched

  • libva-v4l2-request-fourier: ships only v4l2_request_drv_video.so at /usr/lib/<triplet>/dri/ which stock libva dlopens by file pattern. Path A would break the lookup unless every consumer launcher sets LIBVA_DRIVERS_PATH=/opt/fourier/lib/dri (which someone always forgets). Driver-file name is unique, no conflict. STAY at /usr/lib.
  • mpv-fourier: Depends: already bound to fourier ffmpeg. Binary is linked against libavcodec.so.62 from the CI runner; at runtime on higgs it'll find /opt/fourier/lib/libavcodec.so.62 via ld.so cache. No recipe change needed.

Test plan

  • CI rebuilds ffmpeg-v4l2-request-fourier + daedalus-v4l2 cleanly
  • apt install ffmpeg-v4l2-request-fourier libva-v4l2-request-fourier on higgs trixie no longer prompts to remove kde-plasma-desktop et al
  • After install: /opt/fourier/bin/ffmpeg -version works
  • ldconfig -p | grep libavcodec.so.62 returns /opt/fourier/lib/...
  • daedalus-v4l2 binary runs without missing-libavcodec.so.62 error
## Problem On trixie hosts (e.g. higgs), `apt install ffmpeg-v4l2-request-fourier libva-v4l2-request-fourier` would trigger removal of ~50 packages including kde-plasma-desktop, vlc, dolphin, sddm-theme-breeze, nextcloud-desktop, plasma-* etc. Root cause: the ffmpeg-v4l2-request-fourier .deb declared `Conflicts: libavcodec61, libavformat61, ...` because the design intent was 'drop-in replacement for stock ffmpeg'. But the package actually ships **FFmpeg 8.1** (libavcodec.so.62), while stock trixie is **FFmpeg 7.1** (libavcodec.so.61) — different SONAMEs, NOT ABI-compatible. Even if apt hadn't cascaded the removal, ldd of every libavcodec61-linked binary would have failed. Arch dodges this because rolling-Arch stock ffmpeg is also already on .so.62. Debian trixie is stable. ## Fix (Path A) Private prefix `/opt/fourier`. Live alongside the stock ffmpeg, only fourier-aware consumers reach in. 1. **ffmpeg-v4l2-request-fourier (pkgrel=2)**: - `--prefix=/opt/fourier`, libs at `/opt/fourier/lib`, bins at `/opt/fourier/bin` - `-Wl,-rpath,/opt/fourier/lib` for self-sufficient `/opt/fourier/bin/ffmpeg` - `/etc/ld.so.conf.d/fourier.conf` adds `/opt/fourier/lib` to ld cache via postinst → dlopen-by-SONAME consumers (firefox, daedalus) find `libavcodec.so.62` automatically without any LD_LIBRARY_PATH wrapper. - **Drop all Conflicts/Replaces for libav* / libpostproc / libsw*** — no SONAME clash with stock libavcodec61, no reason to evict anything. - Convenience symlinks `/usr/bin/ffmpeg-fourier` + `/usr/bin/ffprobe-fourier`. 2. **daedalus-v4l2 (pkgrel=2)**: - `Depends: ffmpeg-v4l2-request-fourier (>= 2:8.1+rfourier)` instead of stock `ffmpeg (>= 7.1)`. The binary was built against libavcodec.so.62 on the CI runner; at runtime it MUST get .so.62 from the fourier pkg. ## NOT touched - **libva-v4l2-request-fourier**: ships only `v4l2_request_drv_video.so` at `/usr/lib/<triplet>/dri/` which stock libva dlopens by file pattern. Path A would break the lookup unless every consumer launcher sets `LIBVA_DRIVERS_PATH=/opt/fourier/lib/dri` (which someone always forgets). Driver-file name is unique, no conflict. STAY at /usr/lib. - **mpv-fourier**: `Depends:` already bound to fourier ffmpeg. Binary is linked against `libavcodec.so.62` from the CI runner; at runtime on higgs it'll find /opt/fourier/lib/libavcodec.so.62 via ld.so cache. No recipe change needed. ## Test plan - [ ] CI rebuilds ffmpeg-v4l2-request-fourier + daedalus-v4l2 cleanly - [ ] `apt install ffmpeg-v4l2-request-fourier libva-v4l2-request-fourier` on higgs trixie no longer prompts to remove kde-plasma-desktop et al - [ ] After install: `/opt/fourier/bin/ffmpeg -version` works - [ ] `ldconfig -p | grep libavcodec.so.62` returns `/opt/fourier/lib/...` - [ ] daedalus-v4l2 binary runs without missing-libavcodec.so.62 error
marfrit added 1 commit 2026-05-19 08:13:10 +00:00
Stock Debian trixie ships FFmpeg 7.1 (libavcodec.so.61), our fork
ships FFmpeg 8.1 (libavcodec.so.62) — different SONAMEs, NOT a
drop-in for trixie's libavcodec61-consuming desktop.  Previous
Conflicts: libavcodec61, libavformat61, ... triggered apt to remove
~50 packages (kde-plasma-desktop, vlc, dolphin, ...) when a user
just wanted ffmpeg-v4l2-request-fourier installed alongside.

This commit:

1. ffmpeg-v4l2-request-fourier (pkgrel=2):
   - --prefix=/opt/fourier (instead of /usr)
   - --extra-ldexeflags / --extra-ldsoflags: -Wl,-rpath,/opt/fourier/lib
     so /opt/fourier/bin/ffmpeg finds its own libs without external help
   - Ship /etc/ld.so.conf.d/fourier.conf with /opt/fourier/lib + ldconfig
     in postinst/postrm.  dlopen-by-SONAME consumers (firefox, daedalus)
     find libavcodec.so.62 via ld.so cache without LD_LIBRARY_PATH.
   - Drop ALL Conflicts/Replaces/Provides for libav* / libpostproc /
     libsw* — no SONAME clash with stock libavcodec61, no reason to
     evict anything.
   - /usr/bin/ffmpeg-fourier + ffprobe-fourier convenience symlinks.

2. daedalus-v4l2 (pkgrel=2):
   - Depends: ffmpeg-v4l2-request-fourier (>= 2:8.1+rfourier)
     instead of stock 'ffmpeg (>= 7.1)'.  The daedalus binary was
     linked against libavcodec.so.62 at build time (CI runner had
     marfrit/ffmpeg-v4l2-request-fourier installed); at runtime it
     needs the .so.62 that only the fourier pkg provides.

Not touched:
  - libva-v4l2-request-fourier: ships only v4l2_request_drv_video.so
    at /usr/lib/<triplet>/dri/ which libva dlopens by file pattern.
    Path A would break the lookup unless every consumer launcher sets
    LIBVA_DRIVERS_PATH.  Driver name is unique; no conflict.  STAY.
  - mpv-fourier: Depends already correctly bound to fourier ffmpeg.
    Will receive libavcodec.so.62 via the ld.so.cache mechanism
    above without recipe changes.
marfrit merged commit 6f65462ec4 into main 2026-05-19 08:15:26 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: marfrit/marfrit-packages#36