Package-based updates: sf-update, signed shell and app packages
- sf-update (root): lists sf-shell / sf-app-* in the Gitea generic registry, downloads, checks the Ed25519 signature and unpacks to /var/lib/sf-pkg, switches via current/previous/staged symlinks; the factory copies on the read-only root stay as fallback. A new shell is on trial and rolls back after 3 failed starts. - Launcher: apps from factory + installed packages (newer version wins), Settings > System > Updates (check, install now), shell trial confirm. - Image: sf-update units (boot apply, 6-hourly download, launcher requests), sf-shell-exec wrapper for sf-remote, factory versions, registry token. - CI: .gitea/workflows/packages.yml builds, signs and uploads packages whose version isn't published yet (tools/pkg/packages.sh). - docs/updates.md: protocol and layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ After=bluetooth.service
|
||||
Wants=bluetooth.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/sf-remote --home-socket /run/user/1000/smartfox.sock
|
||||
ExecStart=/usr/bin/sf-shell-exec sf-remote --home-socket /run/user/1000/smartfox.sock
|
||||
Environment=RUST_LOG=info
|
||||
Restart=always
|
||||
RestartSec=2
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=SmartFox: switch downloaded packages live before the TV starts
|
||||
DefaultDependencies=no
|
||||
RequiresMountsFor=/var
|
||||
After=local-fs.target sf-data-init.service
|
||||
Before=getty@tty1.service sf-remote.service
|
||||
ConditionPathIsMountPoint=/var
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
RemainAfterExit=yes
|
||||
ExecStart=/usr/bin/sf-update apply
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=SmartFox: download new shell and app packages (live at next boot)
|
||||
Wants=network-online.target
|
||||
After=network-online.target sf-update-apply.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/sf-update auto
|
||||
Nice=10
|
||||
IOSchedulingClass=idle
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=SmartFox: look for package updates a few times a day
|
||||
|
||||
[Timer]
|
||||
OnBootSec=10min
|
||||
OnUnitActiveSec=6h
|
||||
RandomizedDelaySec=30min
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
||||
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=SmartFox: watch for update requests from the launcher
|
||||
Documentation=file:/usr/share/doc/smartfox/updates.md
|
||||
|
||||
[Path]
|
||||
DirectoryNotEmpty=/var/lib/smartfox/update-requests
|
||||
Unit=sf-update-requests.service
|
||||
|
||||
[Install]
|
||||
WantedBy=paths.target
|
||||
@@ -0,0 +1,7 @@
|
||||
[Unit]
|
||||
Description=SmartFox: handle update requests (check, install, confirm, rollback)
|
||||
After=network-online.target sf-update-apply.service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/sf-update requests
|
||||
@@ -1,2 +1,6 @@
|
||||
# The launcher (user tv) writes the remote debugging switch here.
|
||||
d /var/lib/smartfox 0755 tv tv -
|
||||
# sf-update: installed packages (root only writes here) and the launcher's
|
||||
# request files (check, install, confirm, rollback; see docs/updates.md).
|
||||
d /var/lib/sf-pkg 0755 root root -
|
||||
d /var/lib/smartfox/update-requests 0755 tv tv -
|
||||
|
||||
Reference in New Issue
Block a user