Fennec OS 0.3.2: one app at a time, Raspberry Pi shell packages

- sf-core: only one app runs. Home, another app or a cast closes the app
  on screen (after the switch animation) instead of freezing it in the
  background. A frozen app that held a sound stream stalled PipeWire, so
  the next app could not play at all ("Failed to connect stream: No such
  entity" in Netflex after YouTube was sent home mid-video). The
  background limit and the low-memory watcher go with the freezing.
- Raspberry Pi: image/pi (installer on Raspberry Pi OS), aarch64 shell
  packages (sf-shell-<v>-aarch64, arch in pkg.toml, sf-update installs only
  its own architecture), CI builds the aarch64 shell too.
- sf-compositor: volume OSD, screencopy for remote view, blank cursor.
- SDK v0.1.2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tamas Csikel
2026-11-02 19:38:09 +01:00
parent 54cdaf5e35
commit 9c710bedb9
33 changed files with 1329 additions and 319 deletions

View File

@@ -18,6 +18,10 @@
# SF_GITEA default https://gitea.bluefox.support
# SF_OWNER default bluefox
# SF_OUT output folder, default target/packages
# SF_TARGET Rust target of the shell, e.g. aarch64-unknown-linux-gnu
# (cross build against Debian multiarch libraries, see
# image/pi/build.sh). Default: this machine. A shell that
# isn't x86-64 gets a suffix: sf-shell-1.2.0-aarch64.tar.zst
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/../.." && pwd)"
@@ -55,7 +59,24 @@ auth() {
}
mapfile -t AUTH < <(auth)
url() { echo "$GITEA/api/packages/$OWNER/generic/$1/$2/$1-$2.tar.zst"; }
TARGET="${SF_TARGET:-}"
ARCH="${TARGET%%-*}"
ARCH="${ARCH:-$(uname -m)}"
SUFFIX=""
[ "$ARCH" = x86_64 ] || SUFFIX="-$ARCH"
if [ -n "$TARGET" ] && [ "$ARCH" != "$(uname -m)" ]; then
# Cross build against the target's multiarch libraries (Debian).
triple="$ARCH-linux-gnu"
upper=$(echo "$TARGET" | tr 'a-z-' 'A-Z_')
export "CARGO_TARGET_${upper}_LINKER=${triple}-gcc"
export "CC_${TARGET//-/_}=${triple}-gcc" "CXX_${TARGET//-/_}=${triple}-g++"
export PKG_CONFIG_ALLOW_CROSS=1 PKG_CONFIG_SYSROOT_DIR=/
export PKG_CONFIG_PATH="/usr/lib/$triple/pkgconfig:/usr/share/pkgconfig"
fi
# pkg_file <name> <version>: the shell is native code (architecture suffix), apps are not.
pkg_file() { if [ "$1" = sf-shell ]; then echo "$1-$2$SUFFIX.tar.zst"; else echo "$1-$2.tar.zst"; fi; }
url() { echo "$GITEA/api/packages/$OWNER/generic/$1/$2/$(pkg_file "$1" "$2")"; }
published() {
[ "$UPLOAD" = 1 ] || return 1
@@ -68,8 +89,9 @@ published() {
pack() {
local name=$1 version=$2 dir=$3 file
printf 'name = "%s"\nversion = "%s"\n' "$name" "$version" >"$dir/pkg.toml"
if [ "$name" = sf-shell ]; then printf 'arch = "%s"\n' "$ARCH" >>"$dir/pkg.toml"; fi
mkdir -p "$OUT"
file="$OUT/$name-$version.tar.zst"
file="$OUT/$(pkg_file "$name" "$version")"
tar --sort=name --owner=0 --group=0 --numeric-owner --mtime=@0 -C "$dir" -cf - . | zstd -q -19 -T0 -f -o "$file"
openssl pkeyutl -sign -inkey "$KEY_FILE" -rawin -in "$file" -out "$file.sig"
echo "built $(basename "$file") ($(du -h "$file" | cut -f1))"
@@ -87,16 +109,21 @@ do_shell() {
local version
version=$(sed -n '/^\[workspace.package\]/,/^\[/ s/^version *= *"\(.*\)"/\1/p' "$ROOT/Cargo.toml")
if published sf-shell "$version"; then
echo "sf-shell $version: already published"
echo "sf-shell $version ($ARCH): already published"
return
fi
local args=()
for b in "${SHELL_BINS[@]}"; do args+=(-p "$b"); done
local bins="${CARGO_TARGET_DIR:-$ROOT/target}/release"
if [ -n "$TARGET" ]; then
args+=(--target "$TARGET")
bins="${CARGO_TARGET_DIR:-$ROOT/target}/$TARGET/release"
fi
(cd "$ROOT" && cargo build --release --locked "${args[@]}")
local dir="$TMP/sf-shell"
rm -rf "$dir"
mkdir -p "$dir/bin"
for b in "${SHELL_BINS[@]}"; do install -m755 "${CARGO_TARGET_DIR:-$ROOT/target}/release/$b" "$dir/bin/$b"; done
for b in "${SHELL_BINS[@]}"; do install -m755 "$bins/$b" "$dir/bin/$b"; done
install -m755 "$ROOT/tools/siri-remote/fastpair.py" "$dir/bin/sf-pair"
pack sf-shell "$version" "$dir"
}