Add Store support and unsigned app releases

This commit is contained in:
Tamas Csikel
2026-10-25 14:11:49 +01:00
parent 4975784491
commit d7e9fe4568
157 changed files with 22985 additions and 944 deletions

View File

@@ -1,4 +1,4 @@
# Start the SmartFox session on the first console.
# Start the Fennec OS session on the first console.
if [ "$(tty)" = "/dev/tty1" ]; then
exec /usr/bin/sf-session
fi

View File

@@ -1,5 +1,6 @@
#!/bin/sh
# Runs inside cage: apply the output mode, then start the launcher.
# Runs inside the compositor (sf-compositor, or cage as a fallback): apply
# the output mode, start sf-core, then the launcher.
if [ -n "${SMARTFOX_MODE:-}" ]; then
OUT=$(wlr-randr | awk 'NR==1 {print $1}')
wlr-randr --output "$OUT" --custom-mode "$SMARTFOX_MODE" ||
@@ -31,4 +32,10 @@ if [ -x "$PKG/current/bin/sf-launcher" ]; then
rm -f "$TRIES"
fi
fi
exec "$LAUNCHER" --fullscreen --apps /usr/share/smartfox/apps --apps /var/lib/sf-pkg/apps
# sf-core starts and freezes apps, runs DIAL (YouTube cast) and the AirPlay /
# Miracast receivers. It quits by itself when this Wayland session ends.
pkill -u "$(id -u)" -x sf-core 2>/dev/null
# Store apps (sandboxed, docs/store.md): /var/lib/sf-pkg/store/apps.
/usr/bin/sf-shell-exec sf-core --apps /usr/share/smartfox/apps --apps /var/lib/sf-pkg/apps --store-apps /var/lib/sf-pkg/store/apps &
exec "$LAUNCHER" --fullscreen --apps /usr/share/smartfox/apps --apps /var/lib/sf-pkg/apps --store-apps /var/lib/sf-pkg/store/apps

View File

@@ -1,5 +1,5 @@
#!/bin/sh
# SmartFox session: kiosk compositor (cage) with the launcher.
# Fennec OS session: kiosk compositor (cage) with the launcher.
# Apps the launcher starts (Chromium etc.) appear full screen on top of it.
CONF="$HOME/.config/smartfox"
@@ -32,4 +32,15 @@ if [ -z "${SMARTFOX_MODE:-}" ] && systemd-detect-virt -q; then
fi
export SMARTFOX_MODE
# The compositor: sf-compositor (app switching, volume OSD). If it can't start
# (or crashes right away), fall back to cage so the TV still works.
# SMARTFOX_COMPOSITOR=cage in /etc/default/smartfox or session.env forces cage.
if [ "${SMARTFOX_COMPOSITOR:-sf-compositor}" != cage ]; then
start=$(date +%s)
/usr/bin/sf-shell-exec sf-compositor --drm -- /usr/bin/sf-launcher-start >>"$LOG" 2>&1 && exit 0
if [ $(($(date +%s) - start)) -gt 20 ]; then
exit 1 # ran for a while: a normal exit/crash, getty restarts the session
fi
echo "sf-session: sf-compositor failed, falling back to cage" >>"$LOG"
fi
exec cage -d -s -- /usr/bin/sf-launcher-start >>"$LOG" 2>&1

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: fill the new data partition (/var) with the factory defaults
Description=Fennec OS: fill the new data partition (/var) with the factory defaults
Documentation=file:/usr/lib/repart.d/50-sf-data.conf
DefaultDependencies=no
RequiresMountsFor=/var

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: remote debugging (ssh) off after boot
Description=Fennec OS: remote debugging (ssh) off after boot
After=network.target
[Service]

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: watch the remote debugging switch
Description=Fennec OS: watch the remote debugging switch
[Path]
PathModified=/var/lib/smartfox/remote-debug

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: remote debugging (ssh) on or off
Description=Fennec OS: remote debugging (ssh) on or off
After=network.target
[Service]

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox Siri Remote driver
Description=Fennec OS Siri Remote driver
After=bluetooth.service
Wants=bluetooth.service

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: switch downloaded packages live before the TV starts
Description=Fennec OS: switch downloaded packages live before the TV starts
DefaultDependencies=no
RequiresMountsFor=/var
After=local-fs.target sf-data-init.service
@@ -9,7 +9,7 @@ ConditionPathIsMountPoint=/var
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/sf-update apply
ExecStart=/usr/bin/sf-shell-exec sf-update apply
[Install]
WantedBy=multi-user.target

View File

@@ -1,10 +1,10 @@
[Unit]
Description=SmartFox: download new shell and app packages (live at next boot)
Description=Fennec OS: 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
ExecStart=/usr/bin/sf-shell-exec sf-update auto
Nice=10
IOSchedulingClass=idle

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: look for package updates a few times a day
Description=Fennec OS: look for package updates a few times a day
[Timer]
OnBootSec=10min

View File

@@ -1,5 +1,5 @@
[Unit]
Description=SmartFox: watch for update requests from the launcher
Description=Fennec OS: watch for update requests from the launcher
Documentation=file:/usr/share/doc/smartfox/updates.md
[Path]

View File

@@ -1,7 +1,7 @@
[Unit]
Description=SmartFox: handle update requests (check, install, confirm, rollback)
Description=Fennec OS: handle update requests (check, install, confirm, rollback)
After=network-online.target sf-update-apply.service
[Service]
Type=oneshot
ExecStart=/usr/bin/sf-update requests
ExecStart=/usr/bin/sf-shell-exec sf-update requests

View File

@@ -4,3 +4,6 @@ d /var/lib/smartfox 0755 tv tv -
# 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 -
# Store: installed store apps (root) and their links (docs/store.md).
d /var/lib/sf-pkg/store 0755 root root -
d /var/lib/sf-pkg/store/apps 0755 root root -