daedalus-v4l2{,-dkms}: f0cd29a -> 481279c — systemd unit + auto-enable
481279c adds packaging/systemd/{daedalus-v4l2.service,modules-load} to
the upstream tree. This commit wires those into both the Arch
(PKGBUILD + .install) and Debian (build-deb.sh + postinst/prerm/postrm)
package layouts so that a fresh install of daedalus-v4l2 + daedalus-
v4l2-dkms on a Pi 5 leaves the kernel module loaded at next boot AND
the userspace broker daemon enabled — no manual modprobe / systemctl
enable dance needed.
arch/daedalus-v4l2:
* pkgver 0.1.0.r18.481279c, pkgrel reset to 1 (new upstream pin).
* Dropped 'systemd-libs' from depends — daemon doesn't link
libsystemd (no sd_notify); the .service unit is consumed by
systemd-the-init, no link-time dep required.
* package() now installs the .service to
/usr/lib/systemd/system/daedalus-v4l2.service and the modules-
load drop-in to /usr/lib/modules-load.d/daedalus-v4l2.conf.
* New .install file: post_install/post_upgrade run daemon-reload +
enable + systemd-modules-load + try-restart on upgrade; pre/post
remove tear down cleanly. No auto-start — operator decides.
arch/daedalus-v4l2-dkms:
* pkgver bump to 481279c, pkgrel reset to 1. Kernel module itself
is bit-identical to f0cd29a (commit only touches packaging/) but
bumping in lockstep keeps DKMS source-tree pkgver matched to the
userspace pkgver so /etc/modules-load.d points at a module that
actually exists.
debian/daedalus-v4l2:
* Same bump 481279c, PKGREL=1.
* build-deb.sh stages /lib/systemd/system/ + /usr/lib/modules-load.d/
and installs both files.
* Generates DEBIAN/postinst that runs daemon-reload, enables the
service, triggers systemd-modules-load, and conditionally starts
the service iff /dev/daedalus-v4l2 is already present (uses the
same ConditionPathExists= guard as the unit file so apt install
doesn't fail loudly on a host where dkms hasn't built yet).
* Generates DEBIAN/prerm (stop + disable on remove) and
DEBIAN/postrm (daemon-reload).
debian/daedalus-v4l2-dkms:
* Lockstep version bump, PKGREL=1. Postinst (loud-warn-on-missing-
headers) unchanged.
Verified the SHA via local rev-parse against ~/src/daedalus-v4l2 —
481279c is the "packaging/systemd: ship daedalus-v4l2.service +
modules-load drop-in" commit on main.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
Reference in New Issue
Block a user