Merge pull request 'daedalus-v4l2{,-dkms}: Linux 6.18 compat + systemd unit + auto-enable' (#39) from claude-noether/marfrit-packages:noether/daedalus-v4l2-kernel-6.18-compat into main
build and publish packages / distcc-avahi-aarch64 (push) Successful in 1m20s
build and publish packages / lmcp-any (push) Successful in 13s
build and publish packages / lmcp-debian (push) Successful in 8s
build and publish packages / claude-his-any (push) Successful in 14s
build and publish packages / libva-v4l2-request-fourier-aarch64 (push) Has been cancelled
build and publish packages / mpv-fourier-aarch64 (push) Has been cancelled
build and publish packages / claude-his-debian (push) Has been cancelled
build and publish packages / ffmpeg-v4l2-request-debian (push) Has been cancelled
build and publish packages / libva-v4l2-request-fourier-debian (push) Has been cancelled
build and publish packages / mpv-fourier-debian (push) Has been cancelled
build and publish packages / daedalus-v4l2-debian (push) Has been cancelled
build and publish packages / daedalus-v4l2-dkms-debian (push) Has been cancelled
build and publish packages / ffmpeg-v4l2-request-aarch64 (push) Has been cancelled

Reviewed-on: #39
This commit was merged in pull request #39.
This commit is contained in:
2026-05-20 08:54:28 +00:00
7 changed files with 169 additions and 17 deletions
+3 -3
View File
@@ -18,10 +18,10 @@ _module=daedalus_v4l2
# Same pin as arch/daedalus-v4l2 — keep kernel module + daemon
# bit-versioned together so the chardev wire protocol stays in sync.
_commit=f0cd29a3400cb9af192842c3e2bcc90cc08c68ca
_commit=481279c9bffd19e32c8f3299897e9b63fc5a24aa
pkgver=0.1.0.r17.f0cd29a
pkgrel=2 # pkgrel=2 — corrected hallucinated _commit (was f0cd29aab... not in repo)
pkgver=0.1.0.r18.481279c
pkgrel=1 # reset for new upstream pin (481279c — Phase 8.13 close)
pkgdesc="V4L2 stateless decoder shim kernel module (DKMS) — Pi 5 / CM5"
arch=('any')
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
+17 -6
View File
@@ -16,17 +16,17 @@
pkgname=daedalus-v4l2
_upstreampkg=daedalus-v4l2
# Pin the daedalus-v4l2 tip. f0cd29a = "Phase 8.13: byte-exact end-to-
# Pin the daedalus-v4l2 tip. 481279c = "Phase 8.13: byte-exact end-to-
# end via libva (consumer target hit)" — first commit where the full
# ffmpeg -hwaccel vaapi → libva → /dev/video0 → daemon path lands a
# pixel-correct decoded frame back in ffmpeg. Promote to a later pin
# only after a future phase closes cleanly.
_commit=f0cd29a3400cb9af192842c3e2bcc90cc08c68ca
_commit=481279c9bffd19e32c8f3299897e9b63fc5a24aa
# 0.1.0 (pre-1.0) + commit count + short sha. Bump the .Y on each
# Phase 8.x close. pkgver() recomputes at build time.
pkgver=0.1.0.r17.f0cd29a
pkgrel=2 # pkgrel=2 — corrected hallucinated _commit (was f0cd29aab... not in repo)
pkgver=0.1.0.r18.481279c
pkgrel=1 # reset for new upstream pin (481279c — Phase 8.13 close)
pkgdesc="Userspace daemon for the daedalus-v4l2 V4L2 stateless decoder shim (VP9/AV1/H.264 on Pi 5 / CM5)"
arch=('aarch64')
url="https://git.reauktion.de/reauktion/daedalus-v4l2"
@@ -40,9 +40,12 @@ depends=('ffmpeg' 'libdrm')
makedepends=('cmake' 'ninja' 'pkgconf' 'git' 'ffmpeg')
optdepends=('daedalus-v4l2-dkms: kernel module providing /dev/video0 + /dev/daedalus-v4l2'
'libva-v4l2-request-fourier: VA-API consumer routing through this daemon')
install="${pkgname}.install"
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}")
sha256sums=('SKIP')
source=("git+https://git.reauktion.de/reauktion/daedalus-v4l2.git#commit=${_commit}"
"${pkgname}.install")
sha256sums=('SKIP'
'SKIP')
pkgver() {
cd "${srcdir}/${_upstreampkg}"
@@ -83,6 +86,14 @@ package() {
install -Dm644 include/daedalus_v4l2_proto.h \
"${pkgdir}/usr/include/daedalus_v4l2_proto.h"
# systemd unit + module autoload — without these the daemon never
# starts and the libva/VAAPI consumer's REQ_DECODE has nobody on
# the other end of /dev/daedalus-v4l2.
install -Dm644 packaging/systemd/daedalus-v4l2.service \
"${pkgdir}/usr/lib/systemd/system/daedalus-v4l2.service"
install -Dm644 packaging/systemd/daedalus-v4l2.modules-load \
"${pkgdir}/usr/lib/modules-load.d/daedalus-v4l2.conf"
# Documentation
install -Dm644 README.md \
"${pkgdir}/usr/share/doc/${pkgname}/README.md"
+42
View File
@@ -0,0 +1,42 @@
# post_install / post_upgrade for daedalus-v4l2.
#
# Enables (but doesn't start — leave that to the operator) the
# daemon service so it comes up on next boot. Reloads systemd
# so the new unit file is visible. Triggers modules-load so the
# kernel module loads without a reboot if daedalus-v4l2-dkms is
# also installed.
_activate() {
systemctl daemon-reload >/dev/null 2>&1 || true
systemctl enable daedalus-v4l2.service >/dev/null 2>&1 || true
# Trigger /usr/lib/modules-load.d/daedalus-v4l2.conf without a
# reboot. Safe if the module is already loaded.
systemd-modules-load >/dev/null 2>&1 || true
cat >&2 <<EOF
==> daedalus-v4l2: service enabled, will start on next boot.
==> To start now (requires the kernel module to be loaded):
==> sudo systemctl start daedalus-v4l2.service
==> Verify decode path:
==> journalctl -u daedalus-v4l2.service -f
EOF
}
post_install() {
_activate
}
post_upgrade() {
_activate
systemctl try-restart daedalus-v4l2.service >/dev/null 2>&1 || true
}
pre_remove() {
systemctl stop daedalus-v4l2.service >/dev/null 2>&1 || true
systemctl disable daedalus-v4l2.service >/dev/null 2>&1 || true
}
post_remove() {
systemctl daemon-reload >/dev/null 2>&1 || true
}
+3 -3
View File
@@ -14,9 +14,9 @@
# Sibling userspace package: ../daedalus-v4l2/build-deb.sh
set -euo pipefail
UPSTREAM_COMMIT=f0cd29a3400cb9af192842c3e2bcc90cc08c68ca
PKGVER=0.1.0+r17+gf0cd29a
PKGREL=2 # pkgrel=2 — corrected upstream commit SHA
UPSTREAM_COMMIT=481279c9bffd19e32c8f3299897e9b63fc5a24aa
PKGVER=0.1.0+r18+g481279c
PKGREL=1 # reset for new upstream pin (481279c — Phase 8.13 close)
MODULE_NAME=daedalus_v4l2
HERE=$(dirname "$(readlink -f "$0")")
+10
View File
@@ -1,3 +1,13 @@
daedalus-v4l2-dkms (0.1.0+r18+g481279c-1) bookworm trixie; urgency=medium
* Bump to 481279c in lockstep with the userspace daedalus-v4l2
package (which ships the new systemd unit + modules-load.d
drop-in). No kernel-module behaviour change in this commit —
bump is purely to keep DKMS pkgver and userspace pkgver aligned
so /etc/modules-load.d/daedalus-v4l2.conf has a module to load.
-- Markus Fritsche <mfritsche@reauktion.de> Wed, 20 May 2026 16:00:00 +0000
daedalus-v4l2-dkms (0.1.0+r17+gf0cd29a-1) bookworm trixie; urgency=medium
* Bump to f0cd29a — Linux 6.18 compatibility fix. v4l2_fh_add /
+80 -5
View File
@@ -11,13 +11,13 @@
# Upstream repo: https://git.reauktion.de/reauktion/daedalus-v4l2
set -euo pipefail
# Same pin as the Arch PKGBUILD. f0cd29a = "Phase 8.13: byte-exact
# Same pin as the Arch PKGBUILD. 481279c = "Phase 8.13: byte-exact
# end-to-end via libva (consumer target hit)" — first commit where the
# full ffmpeg -hwaccel vaapi → libva → /dev/video0 → daemon path lands
# a pixel-correct decoded frame back in ffmpeg.
UPSTREAM_COMMIT=f0cd29a3400cb9af192842c3e2bcc90cc08c68ca
PKGVER=0.1.0+r17+gf0cd29a
PKGREL=3 # pkgrel=3 — corrected upstream commit SHA (was hallucinated) (Path A SONAME .so.62)
UPSTREAM_COMMIT=481279c9bffd19e32c8f3299897e9b63fc5a24aa
PKGVER=0.1.0+r18+g481279c
PKGREL=1 # reset for new upstream pin (481279c — Phase 8.13 close)
HERE=$(dirname "$(readlink -f "$0")")
@@ -50,7 +50,9 @@ mkdir -p "$ROOT/DEBIAN" \
"$ROOT/usr/bin" \
"$ROOT/usr/libexec/daedalus-v4l2" \
"$ROOT/usr/include" \
"$ROOT/usr/share/doc/daedalus-v4l2"
"$ROOT/usr/share/doc/daedalus-v4l2" \
"$ROOT/lib/systemd/system" \
"$ROOT/usr/lib/modules-load.d"
install -m 755 "$work/$SRCDIR/daemon/build/daedalus_v4l2_daemon" \
"$ROOT/usr/bin/daedalus_v4l2_daemon"
@@ -65,6 +67,14 @@ install -m 755 "$work/$SRCDIR/tools/test_m2m_stream" \
install -m 644 "$work/$SRCDIR/include/daedalus_v4l2_proto.h" \
"$ROOT/usr/include/daedalus_v4l2_proto.h"
# systemd unit + module autoload — without these the daemon never
# starts and the libva/VAAPI consumer's REQ_DECODE has nobody on
# the other end of /dev/daedalus-v4l2.
install -m 644 "$work/$SRCDIR/packaging/systemd/daedalus-v4l2.service" \
"$ROOT/lib/systemd/system/daedalus-v4l2.service"
install -m 644 "$work/$SRCDIR/packaging/systemd/daedalus-v4l2.modules-load" \
"$ROOT/usr/lib/modules-load.d/daedalus-v4l2.conf"
install -m 644 "$work/$SRCDIR/README.md" \
"$ROOT/usr/share/doc/daedalus-v4l2/README.md"
for d in "$work/$SRCDIR/docs/"*.md; do
@@ -75,6 +85,71 @@ install -Dm644 "$HERE/debian/copyright" "$ROOT/usr/share/doc/daedalus-v4l2/copyr
install -Dm644 "$HERE/debian/changelog" "$ROOT/usr/share/doc/daedalus-v4l2/changelog.Debian"
gzip -9 -n "$ROOT/usr/share/doc/daedalus-v4l2/changelog.Debian"
# DEBIAN/postinst — enable service + reload modules-load.d so the
# kernel module loads now if daedalus-v4l2-dkms is also installed.
# Does NOT auto-start the service — that requires /dev/daedalus-v4l2
# to already exist (the ConditionPathExists= in the .service file)
# which may not be true on the very first install before the user
# reboots or manually modprobes. Operator decides when to start.
cat > "$ROOT/DEBIAN/postinst" <<'POSTINST'
#!/bin/sh
set -e
if [ "$1" = "configure" ]; then
# Reload systemd so the new unit file is visible.
if command -v systemctl >/dev/null 2>&1; then
systemctl daemon-reload >/dev/null 2>&1 || true
systemctl enable daedalus-v4l2.service >/dev/null 2>&1 || true
fi
# Trigger /usr/lib/modules-load.d/daedalus-v4l2.conf without a
# reboot. Harmless if the module is already loaded; logs to
# journal if it can't load (most common cause: dkms hasn't built
# the module yet for the running kernel — see daedalus-v4l2-dkms
# postinst for the loud-warning path).
if command -v systemd-modules-load >/dev/null 2>&1; then
systemd-modules-load >/dev/null 2>&1 || true
fi
# Auto-start if /dev/daedalus-v4l2 came up (i.e. module loaded
# successfully). ConditionPathExists in the unit file means
# `systemctl start` is a no-op if the device isn't there yet —
# avoids spurious failures during apt install on a host where
# daedalus-v4l2-dkms hasn't built yet.
if [ -e /dev/daedalus-v4l2 ] && command -v systemctl >/dev/null 2>&1; then
systemctl start daedalus-v4l2.service >/dev/null 2>&1 || true
fi
fi
#DEBHELPER#
POSTINST
chmod 755 "$ROOT/DEBIAN/postinst"
cat > "$ROOT/DEBIAN/prerm" <<'PRERM'
#!/bin/sh
set -e
if [ "$1" = "remove" ] && command -v systemctl >/dev/null 2>&1; then
systemctl stop daedalus-v4l2.service >/dev/null 2>&1 || true
systemctl disable daedalus-v4l2.service >/dev/null 2>&1 || true
fi
#DEBHELPER#
PRERM
chmod 755 "$ROOT/DEBIAN/prerm"
cat > "$ROOT/DEBIAN/postrm" <<'POSTRM'
#!/bin/sh
set -e
if command -v systemctl >/dev/null 2>&1; then
systemctl daemon-reload >/dev/null 2>&1 || true
fi
#DEBHELPER#
POSTRM
chmod 755 "$ROOT/DEBIAN/postrm"
cat > "$ROOT/DEBIAN/control" <<EOF
Package: daedalus-v4l2
Version: ${PKGVER}-${PKGREL}
+14
View File
@@ -1,3 +1,17 @@
daedalus-v4l2 (0.1.0+r18+g481279c-1) bookworm trixie; urgency=medium
* Bump to 481279c. Upstream landed the systemd unit + modules-load.d
drop-in (packaging/systemd/daedalus-v4l2.{service,modules-load}).
* Package now ships /lib/systemd/system/daedalus-v4l2.service and
/usr/lib/modules-load.d/daedalus-v4l2.conf.
* postinst: daemon-reload, enable the service, trigger
systemd-modules-load, and start if /dev/daedalus-v4l2 is already
present. Operator no longer needs to remember the modprobe +
systemctl-enable dance after install.
* prerm/postrm: stop + disable + daemon-reload.
-- Markus Fritsche <mfritsche@reauktion.de> Wed, 20 May 2026 16:00:00 +0000
daedalus-v4l2 (0.1.0+r17+gf0cd29a-1) bookworm trixie; urgency=medium
* Bump to f0cd29a alongside daedalus-v4l2-dkms. No userspace