Fix FFmpeg upgrade with installed OpenCV and held GStreamer dependencies

This commit is contained in:
Andrei Smaliak 2026-10-04 13:03:33 +02:00
parent fd2297f5c2
commit b832052c95
18 changed files with 240 additions and 9 deletions

View File

@ -0,0 +1,11 @@
# IP Camera Streaming 1.0.4
Release date: 2026-10-04.
- Fix FFmpeg installation on existing Edge images that have FFmpeg 4.3.6 development packages and held GStreamer packages. Version 1.0.3 offered new runtime libraries without matching development packages, causing APT to propose removing OpenCV dependencies and fail on held GStreamer.
- Bundle the five matching ARM64 development packages in our Git-only repository. Keep existing packages and holds; explicitly use `--no-remove` during FFmpeg installation.
- Add `offline/test_ffmpeg_upgrade.sh BUNDLE EDGE_DPKG_STATUS` to rehearse dependency resolution and downloads offline against an exported device package database.
Validation: the previous bundle reproduces the exact failure against the exported `.109` package database; the new bundle passes with 13 upgrades, 4 new packages, zero removals and unchanged GStreamer holds. Complete cold dependency download and SHA-256 verification also pass. Rehearsals run in disposable containers without network access or changes to the device.
The Edge Environment version remains unchanged. The operator installs IP Camera Streaming 1.0.4 through Console.

View File

@ -18,3 +18,5 @@ qml-module-qtwebview qml-module-qt-labs-settings qml-module-qtquick-xmllistmodel
qml-module-qtquick-controls2 qml-module-qt-websockets qml-module-qt-labs-platform
# Camera streaming and snapshots (CLI, in addition to multimedia libraries).
ffmpeg
# Keep installed OpenCV/GStreamer development chains compatible during FFmpeg upgrades.
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev

14
offline/test_ffmpeg_upgrade.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
# Read-only upgrade rehearsal using an Edge dpkg status export; never changes the Edge.
set -Eeuo pipefail
BUNDLE=$(cd "${1:?Usage: test_ffmpeg_upgrade.sh BUNDLE EDGE_DPKG_STATUS}" && pwd)
STATUS=$(realpath "${2:?Provide an exported /var/lib/dpkg/status}")
IMAGE=${IOMATEX_BUNDLE_BUILDER_IMAGE:-debian:bullseye@sha256:6f519a81440354a85eb592c5f32109ab80605f6b892455983a6f618bf87fabe9}
docker run --rm --network none -v "$BUNDLE:/bundle:ro" -v "$STATUS:/edge-status:ro" "$IMAGE" bash -ec '
printf "deb [trusted=yes] file:/bundle/repo ./\n" > /etc/apt/sources.list
rm -f /etc/apt/sources.list.d/*
dpkg --add-architecture arm64
apt-get update
apt-get -y --download-only --no-remove --no-install-recommends \
-o APT::Architecture=arm64 -o Dir::State::status=/edge-status install ffmpeg
'

View File

@ -90,7 +90,15 @@ class DeliveryTest(unittest.TestCase):
text, objects=d.catalog(Path(__file__).resolve().parents[1])
self.assertIn('Package: nodejs\n',text)
self.assertIn('Package: qt-video-oes-plugins\n',text)
self.assertEqual(582,len([k for k in objects if k.endswith('.deb') and not k.startswith('third_party/')]))
root = Path(__file__).resolve().parents[1]
expected = {prefix + '/' + p.name
for prefix, folder in [('debian', 'third_party/debian/bullseye-arm64/repo'), ('node', 'third_party/node')]
for p in (root / folder).glob('*.deb')}
actual = {k for k in objects if k.endswith('.deb') and not k.startswith('third_party/')}
self.assertEqual(expected, actual)
for package in ['ffmpeg', 'libavcodec-dev', 'libavformat-dev', 'libavutil-dev',
'libswresample-dev', 'libswscale-dev']:
self.assertIn('Package: ' + package + '\n', text)
def test_snapshot_refuses_local_edits(self):
with tempfile.TemporaryDirectory() as folder:

View File

@ -31,7 +31,7 @@
},
"optional_stages": {
"stage_ip_stream": {
"version": "1.0.3"
"version": "1.0.4"
}
}
}

View File

@ -13,7 +13,7 @@ command -v mosquitto_sub >/dev/null
if ! command -v ffmpeg >/dev/null; then
echo "Installing FFmpeg from the IOMATEX Git package repository"
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends ffmpeg
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-remove --no-install-recommends ffmpeg
fi
ffmpeg -version >/dev/null || {
echo "FFmpeg is installed but cannot run; see package installation output above" >&2

View File

@ -1,3 +1,3 @@
{
"version": "1.0.3"
"version": "1.0.4"
}

View File

@ -5,11 +5,13 @@ a commit, and removes temporary downloads after installation. The full bundle
stays in Git, not on Edge. There is no APT/NodeSource/GitHub/npm fallback. This directory is ordinary Git content,
not LFS pointers or links to another distribution server.
* `debian/bullseye-arm64`: 616 DEBs, 559 arm64 + 57 all. Source: Debian signed
* `debian/bullseye-arm64`: 621 DEBs, 564 arm64 + 57 all. Source: Debian signed
Bullseye archive and signed security snapshot 20260831T235959Z; assembled using
`offline/build.sh`. The vendor `qt-video-oes-plugins_1.0.3_arm64.deb` is included
from `stage_itscreen` when resolving the complete dependency closure.
FFmpeg 4.3.9 CLI and its dependency closure are included for IP Camera Streaming.
Matching libavcodec/libavformat/libavutil/libswresample/libswscale development
packages preserve installed OpenCV and held GStreamer dependency chains.
`requested-packages.txt`, `package-versions.txt`, `platform` and `SHA256SUMS`
record the exact payload. Upstream copyright files remain inside the DEBs.
* `node/nodejs_20.20.2-1nodesource1_arm64.deb`: NodeSource Debian package captured

View File

@ -1,5 +1,5 @@
aeeda40a2707b0b6504fb980ae15529b2d9d931155c5eccda84d0c0af09b8f76 repo/Packages
70814bd9f580d7268eeb256dc43dd1f3621cfa3d11f3a8112c4054ed2a260699 repo/Packages.gz
1e1b51d15f768bace20725d1358393808cd70f1719cb4d542846603c42fd9826 repo/Packages
e4f033d9027634b3b40e938abe202e5ea4cdfc2e1eb63c48f27c8c077a2c1c36 repo/Packages.gz
1478a610fd50e190882ff41e16c57b628a508bcf5b5ac5313affb49d20818e0a repo/adduser_3.118+deb11u1_all.deb
2046876c82fc1c342b38ace9aa0661bcb3e167837c984b4bdc89702bc78df5ac repo/adwaita-icon-theme_3.38.0-1_all.deb
e8a1ef315c0218763de6031fca33e74b6b38c749aba148a0fa272cb5ea03a87f repo/alsa-utils_1.2.4-1_arm64.deb
@ -86,11 +86,14 @@ ab68b4c75caec4ba7bb2a0d0fd745aa57c32236688e18c2462637d12b5481981 repo/libavahi-
52f60b4dfb435d5561fa6307b0cb6e0959cb997b6f52721985b37875cee9db79 repo/libavahi-common3_0.8-5+deb11u3_arm64.deb
d4c0643e44d56e2d21480b2de5ec3d3dd62816cec7435db58a650443bcae29bb repo/libavahi-core7_0.8-5+deb11u3_arm64.deb
5a6ad45da10d69ca6ca7757882fe696ace8af98fccac781697ef280ea13e770f repo/libavc1394-0_0.5.4-5_arm64.deb
a191211a6f270f4ede02e8c7dff696890694e835d999606c2957dec2e87471a8 repo/libavcodec-dev_7%3a4.3.9-0+deb11u2_arm64.deb
b185a57603b4932d3be5383a79785cf9c7e715078d3520dc59c37e0d295bf66b repo/libavcodec58_7%3a4.3.9-0+deb11u2_arm64.deb
164e8e5df13af43a9b19fb4ee703859ccc6cfb9e1a2d3effb93f59913d25e30e repo/libavdevice58_7%3a4.3.9-0+deb11u2_arm64.deb
61085d9699bae18ba2bca2fbdcd789e8ffbf9b2247e821c7ea14bc377dfd685e repo/libavfilter7_7%3a4.3.9-0+deb11u2_arm64.deb
76f3ad237b0b0077330fb077b96996a717e743d638dfbac3137e9e11aeb57116 repo/libavformat-dev_7%3a4.3.9-0+deb11u2_arm64.deb
b9b6648a7bd8b9fd50788868a8a02236689b53397372a8eb5ae027f60e943b2b repo/libavformat58_7%3a4.3.9-0+deb11u2_arm64.deb
08d45066a479524a1d9c4865b4ff0f21f9e7216a10da8b452537947780555eea repo/libavresample4_7%3a4.3.9-0+deb11u2_arm64.deb
bb80c079de75dfd0a19e0ab37bbe493e7e9674337eee7f31efa791fe1947addb repo/libavutil-dev_7%3a4.3.9-0+deb11u2_arm64.deb
ba7e7f8e8a04580286f1c4d7b0bfe9d0240f8dd41ea057891297443defa60121 repo/libavutil56_7%3a4.3.9-0+deb11u2_arm64.deb
7305a9bb576a975ec0fdc69688dec98a3c102c2026d5ad18bb014e93f1b076aa repo/libbinutils_2.35.2-2_arm64.deb
110e3097a39569b752938bf0900f872be46673ccce75ae9af7a348c495fa5cfa repo/libblas3_3.9.0-3+deb11u1_arm64.deb
@ -414,7 +417,9 @@ b06ab874ed63caf86665db81ceb388fb65da5beb4f8f8ee71be07e0e0b3015d0 repo/libssh-4_
0fba4e602e499c97c4b623bd56295115667c312ff583221a71b476dd6983a5e0 repo/libssl1.1_1.1.1w-0+deb11u8_arm64.deb
ff888e8461e650a8e479670535857092343c63c75b0c62127902c44dbb886282 repo/libstartup-notification0_0.12-6+b1_arm64.deb
7869aa540cc46e9f3d4267d5bde2af0e5b429a820c1d6f1a4cfccfe788c31890 repo/libstdc++6_10.2.1-6_arm64.deb
ad099e02fa02017a9f50422377e4021c075c48848fb685aeb44d5d4c4cf2386c repo/libswresample-dev_7%3a4.3.9-0+deb11u2_arm64.deb
23245afcbb5b4f747eda8584dc22d56514df5d5cce32f208c041c9120ff7c009 repo/libswresample3_7%3a4.3.9-0+deb11u2_arm64.deb
5de29a81c83580000688263f0b3cdf0020bf99cc95c57a208ea479f033d611cb repo/libswscale-dev_7%3a4.3.9-0+deb11u2_arm64.deb
d5ac8361358698f16adaa6882eb88d4782d4ac125df7254dde8d98b64f523d6b repo/libswscale5_7%3a4.3.9-0+deb11u2_arm64.deb
47e48fca4dd06442510a9d761024031aadca0319960c511b2c639e7c1c72e8f1 repo/libsystemd0_247.3-7+deb11u8_arm64.deb
ab522eb1456a3686a1b66477a47bba08d95d9b544bcfa4ab64d54158dff05132 repo/libtasn1-6_4.16.0-2+deb11u2_arm64.deb
@ -617,5 +622,5 @@ ad0798e2279831853ca1f737e75460c879845f2ede3b9a2df5590cbb3491042e repo/xserver-x
624bf3c6d8088493c2429596995d4efdc4c642c1e7bc9ef2fa31118f780b19f4 repo/xz-utils_5.2.5-2.1~deb11u2_arm64.deb
e3963985d1a020d67ffd4180e6f9c4b5c600b515f0c9d8fda513d7a0e48e63a1 repo/zlib1g_1%3a1.2.11.dfsg-2+deb11u2_arm64.deb
488878a149bd33605f6a85520edd7aa54610eb5980fec5d9f48ec7b0b874e0f2 platform
d429fe49127f926bbabb716e1ea54048bde1a6660dc489cd8b52091b52f18c69 package-versions.txt
2d45c86fc148db515abd67f805774872402add56fc8cdd218906900bc2b0aa73 requested-packages.txt
adbe212466cfc6ddac37022e7643a7b9096972b75459e3826528cf9d4b638d3e package-versions.txt
f87c03541a49e54376b91f4c85084dfdf5f07361e839d345b763ba683cf85280 requested-packages.txt

View File

@ -256,6 +256,9 @@ Architecture: arm64
Package: libavc1394-0
Version: 0.5.4-5
Architecture: arm64
Package: libavcodec-dev
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libavcodec58
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
@ -265,12 +268,18 @@ Architecture: arm64
Package: libavfilter7
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libavformat-dev
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libavformat58
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libavresample4
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libavutil-dev
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libavutil56
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
@ -1240,9 +1249,15 @@ Architecture: arm64
Package: libstdc++6
Version: 10.2.1-6
Architecture: arm64
Package: libswresample-dev
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libswresample3
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libswscale-dev
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Package: libswscale5
Version: 7:4.3.9-0+deb11u2
Architecture: arm64

View File

@ -2192,6 +2192,38 @@ Description: control IEEE 1394 audio/video devices
This package includes the libraries needed to run executables using
libavc1394.
Package: libavcodec-dev
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 17889
Depends: libavcodec58 (= 7:4.3.9-0+deb11u2), libavutil-dev (= 7:4.3.9-0+deb11u2), libswresample-dev (= 7:4.3.9-0+deb11u2)
Filename: ./libavcodec-dev_7%3a4.3.9-0+deb11u2_arm64.deb
Size: 5155380
MD5sum: 66b0fe4083be9b31b4f77d71c61b415c
SHA1: 328b75fb834a972a037a30c83c3877ed7ebdf388
SHA256: a191211a6f270f4ede02e8c7dff696890694e835d999606c2957dec2e87471a8
Section: libdevel
Priority: optional
Multi-Arch: same
Homepage: https://ffmpeg.org/
Description: FFmpeg library with de/encoders for audio/video codecs - development files
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and
machines have created. It supports the most obscure ancient formats up to the
cutting edge.
.
This library provides a generic encoding/decoding framework and
contains multiple decoders and encoders for audio, video and subtitle streams,
and several bitstream filters.
.
The shared architecture provides various services ranging from bit stream I/O
to DSP optimizations, and makes it suitable for implementing robust and fast
codecs as well as for experimentation.
.
This package contains the development files.
Package: libavcodec58
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
@ -2279,6 +2311,35 @@ Description: FFmpeg library containing media filters - runtime files
.
This package contains the runtime files.
Package: libavformat-dev
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 5566
Depends: libavcodec-dev (= 7:4.3.9-0+deb11u2), libavformat58 (= 7:4.3.9-0+deb11u2), libavutil-dev (= 7:4.3.9-0+deb11u2), libswresample-dev (= 7:4.3.9-0+deb11u2)
Filename: ./libavformat-dev_7%3a4.3.9-0+deb11u2_arm64.deb
Size: 1250384
MD5sum: 076444de7b646c4413f6b78f266ba2f5
SHA1: 57bc365d886f979d9d65a7ff8481a4dfd708857f
SHA256: 76f3ad237b0b0077330fb077b96996a717e743d638dfbac3137e9e11aeb57116
Section: libdevel
Priority: optional
Multi-Arch: same
Homepage: https://ffmpeg.org/
Description: FFmpeg library with (de)muxers for multimedia containers - development files
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and
machines have created. It supports the most obscure ancient formats up to the
cutting edge.
.
This library provides a generic framework for multiplexing and demultiplexing
(muxing and demuxing) audio, video and subtitle streams. It encompasses
multiple muxers and demuxers for multimedia container formats. It also
supports several input and output protocols to access a media resource.
.
This package contains the development files.
Package: libavformat58
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
@ -2335,6 +2396,37 @@ Description: FFmpeg compatibility library for resampling - runtime files
.
This package contains the runtime files.
Package: libavutil-dev
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 1754
Depends: libavutil56 (= 7:4.3.9-0+deb11u2)
Filename: ./libavutil-dev_7%3a4.3.9-0+deb11u2_arm64.deb
Size: 438468
MD5sum: 508988c413a36b263e64e116bf7ef5b5
SHA1: beb0b084da0f52f0d2cb88ed044bcf51d4fb450d
SHA256: bb80c079de75dfd0a19e0ab37bbe493e7e9674337eee7f31efa791fe1947addb
Section: libdevel
Priority: optional
Multi-Arch: same
Homepage: https://ffmpeg.org/
Description: FFmpeg library with functions for simplifying programming - development files
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and
machines have created. It supports the most obscure ancient formats up to the
cutting edge.
.
This library is a utility library to aid portable multimedia programming.
It contains safe portable string functions, random number generators, data
structures, additional mathematics functions, cryptography and multimedia
related functionality (like enumerations for pixel and sample formats).
It is not a library for code needed by both libavcodec and libavformat.
The goal for this library is to be modular, small, efficient and useful.
.
This package contains the development files.
Package: libavutil56
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
@ -10650,6 +10742,49 @@ Description: GNU Standard C++ Library v3
was included up to g++-2.95. The first version of libstdc++-v3 appeared
in g++-3.0.
Package: libswresample-dev
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 295
Depends: libavutil-dev (= 7:4.3.9-0+deb11u2), libswresample3 (= 7:4.3.9-0+deb11u2)
Filename: ./libswresample-dev_7%3a4.3.9-0+deb11u2_arm64.deb
Size: 120576
MD5sum: 543e7b5e22e1afe12063f809d55b9ac7
SHA1: c9ac86cff6df83b599e1c04184bc747e682a1547
SHA256: ad099e02fa02017a9f50422377e4021c075c48848fb685aeb44d5d4c4cf2386c
Section: libdevel
Priority: optional
Multi-Arch: same
Homepage: https://ffmpeg.org/
Description: FFmpeg library for audio resampling, rematrixing etc. - development files
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and
machines have created. It supports the most obscure ancient formats up to the
cutting edge.
.
This library provides performs highly optimized audio resampling, rematrixing
and sample format conversion operations.
Specifically, this library performs the following conversions:
* Resampling is the process of changing the audio rate, for example from a
high sample rate of 44100Hz to 8000Hz. Audio conversion from high to low
sample rate is a lossy process. Several resampling options and algorithms
are available.
* Rematrixing is the process of changing the channel layout, for example from
stereo to mono. When the input channels cannot be mapped to the output
streams, the process is lossy, since it involves different gain factors
and mixing. Various other audio conversions (e.g. stretching and padding)
are enabled through dedicated options.
* Format conversion is the process of converting the type of samples, for
example from 16-bit signed samples to unsigned 8-bit or float samples.
It also handles packing conversion, when passing from packed layout (all
samples belonging to distinct channels interleaved in the same buffer), to
planar layout (all samples belonging to the same channel stored in a
dedicated buffer or "plane").
.
This package contains the development files.
Package: libswresample3
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
@ -10693,6 +10828,43 @@ Description: FFmpeg library for audio resampling, rematrixing etc. - runtime fil
.
This package contains the runtime files.
Package: libswscale-dev
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2
Architecture: arm64
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Installed-Size: 808
Depends: libavutil-dev (= 7:4.3.9-0+deb11u2), libswscale5 (= 7:4.3.9-0+deb11u2)
Filename: ./libswscale-dev_7%3a4.3.9-0+deb11u2_arm64.deb
Size: 210584
MD5sum: a18151266e66e48699f27d09efffaa99
SHA1: 84fbc0de6d316bbf04231bec639a0dbecdcbd1ec
SHA256: 5de29a81c83580000688263f0b3cdf0020bf99cc95c57a208ea479f033d611cb
Section: libdevel
Priority: optional
Multi-Arch: same
Homepage: https://ffmpeg.org/
Description: FFmpeg library for image scaling and various conversions - development files
FFmpeg is the leading multimedia framework, able to decode, encode, transcode,
mux, demux, stream, filter and play pretty much anything that humans and
machines have created. It supports the most obscure ancient formats up to the
cutting edge.
.
This library performs highly optimized image scaling and colorspace and pixel
format conversion operations.
Specifically, this library performs the following conversions:
* Rescaling is the process of changing the video size. Several rescaling
options and algorithms are available. This is usually a lossy process.
* Pixel format conversion is the process of converting the image format and
colorspace of the image, for example from planar YUV420P to RGB24 packed.
It also handles packing conversion, that is converts from packed layout
(all pixels belonging to distinct planes interleaved in the same buffer),
to planar layout (all samples belonging to the same plane stored in a
dedicated buffer or "plane"). This is usually a lossy process in case the
source and destination colorspaces differ.
.
This package contains the development files.
Package: libswscale5
Source: ffmpeg
Version: 7:4.3.9-0+deb11u2

View File

@ -18,3 +18,5 @@ qml-module-qtwebview qml-module-qt-labs-settings qml-module-qtquick-xmllistmodel
qml-module-qtquick-controls2 qml-module-qt-websockets qml-module-qt-labs-platform
# Camera streaming and snapshots (CLI, in addition to multimedia libraries).
ffmpeg
# Keep installed OpenCV/GStreamer development chains compatible during FFmpeg upgrades.
libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev