Watch
1
0
Fork
You've already forked souveraine
0

sensord: one reporter for every sensor, replacing the per-sensor scripts

blueline-proximity-lock is 113 lines of shell implementing a subtle contract
(heartbeat inside SOURCE_DOWN_AFTER, seed from the probe banner, report both
edges) that would have been hand-copied for light and again for accel. One
binary, one contract, shipped in the package instead of the rootfs overlay.
This commit is contained in:
Fimeg 2026-07-26 18:46:27 -04:00
commit 83fab1a1b6
5 changed files with 356 additions and 3 deletions

View file

@ -23,8 +23,9 @@ sha256sums=('SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP' 'SKIP')
# that arch and omits them otherwise, so package() picks them up conditionally
# rather than declaring them as sources for every arch.
if [ "$CARCH" = aarch64 ]; then
source+=('souveraine-sessiond-binary' 'souveraine-sessiond.service')
sha256sums+=('SKIP' 'SKIP')
source+=('souveraine-sessiond-binary' 'souveraine-sessiond.service'
'souveraine-sensord-binary' 'souveraine-sensord.service')
sha256sums+=('SKIP' 'SKIP' 'SKIP' 'SKIP')
fi
package() {
@ -41,6 +42,14 @@ package() {
install -Dm644 "$srcdir/souveraine-sessiond.service" \
"$pkgdir/usr/lib/systemd/user/souveraine-sessiond.service"
fi
# Sensor reporter, aarch64 only — the laptop has no iio-sensor-proxy
# sources worth reporting and no device state machine listening.
if [ -f "$srcdir/souveraine-sensord-binary" ]; then
install -Dm755 "$srcdir/souveraine-sensord-binary" \
"$pkgdir/usr/bin/souveraine-sensord"
install -Dm644 "$srcdir/souveraine-sensord.service" \
"$pkgdir/usr/lib/systemd/user/souveraine-sensord.service"
fi
# Secrets rail (user service, owns org.freedesktop.secrets) and machined
# (system service, machine identity). Both were hand-copied to the phone
# and owned by no package — same gap as sessiond.

View file

@ -0,0 +1,21 @@
[Unit]
Description=Souveraine sensor reporter (proximity, light, accelerometer)
# One reporter for every iio-sensor-proxy source. Replaces the per-sensor shell
# scripts (blueline-proximity-lock and the light/accel copies that were about to
# be written) — see DEVICE-STATE-MACHINE.md §10 and §12.
#
# A user unit, like sessiond: it talks to sessiond over
# $XDG_RUNTIME_DIR/souveraine/sessiond.sock and needs no privilege at all.
PartOf=graphical-session.target
After=souveraine-sessiond.service
[Service]
ExecStart=/usr/bin/souveraine-sensord
# The reporter must outlive every transient failure it can hit — a dead sensor
# stack, a restarting sessiond, monitor-sensor exiting. It handles those in
# process; this covers the ones it cannot.
Restart=always
RestartSec=5
[Install]
WantedBy=graphical-session.target