Compare commits
3 Commits
6d1c3f48d6
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 3bd9657041 | |||
| db8c92a96c | |||
| 8a95a4238c |
@@ -57,9 +57,9 @@ This bootstraps the development environment and starts the dev stack. On a fresh
|
||||
- Node.js 22 LTS and npm from the official Node.js binaries
|
||||
- the project's Python and npm dependencies
|
||||
|
||||
SteamOS temporarily requires a writable root filesystem while native packages are installed. `run.sh` disables the read-only mode only around `pacman`, restores it afterward, and may ask for the user's sudo password. SteamOS system updates can remove manually installed system packages; rerunning `./run.sh` restores any missing prerequisites.
|
||||
SteamOS temporarily requires a writable root filesystem while native packages are installed. `run.sh` disables the read-only mode only around `pacman`, restores it afterward, and may ask for the user's sudo password. It also initializes and populates the SteamOS pacman keyring before installing packages, because a fresh or updated Steam Deck can otherwise reject valid packages with "unknown trust" / PGP signature errors. If that keyring repair is still insufficient and SteamOS provides `steamos-devmode`, `run.sh` uses it as a final SteamOS bootstrap fallback. Set `HEIMGEIST_STEAMOS_DEVMODE=0` to skip that fallback. SteamOS system updates can remove manually installed system packages; rerunning `./run.sh` restores any missing prerequisites.
|
||||
|
||||
Downloads and package installation are skipped when usable dependencies already exist. Node.js archives are verified with their published SHA-256 checksum. Use `HEIMGEIST_BOOTSTRAP_ONLY=1 ./run.sh` to install/check dependencies without launching Heimgeist, or `HEIMGEIST_SKIP_SYSTEM_DEPS=1 ./run.sh` when native Tauri dependencies are managed externally. `HEIMGEIST_NODE_MAJOR`, `HEIMGEIST_NODE_DIR`, `HEIMGEIST_TOOL_BIN_DIR`, `CARGO_HOME`, `RUSTUP_HOME`, and `PYTHON_BIN` provide explicit runtime overrides.
|
||||
Downloads and package installation are skipped when usable dependencies already exist. Node.js archives are verified with their published SHA-256 checksum. Use `HEIMGEIST_BOOTSTRAP_ONLY=1 ./run.sh` to install/check dependencies without launching Heimgeist, or `HEIMGEIST_SKIP_SYSTEM_DEPS=1 ./run.sh` when native Tauri dependencies are managed externally. If the package manager succeeds but the native dependency preflight still cannot verify a `pkg-config` module, `run.sh` prints a preflight report and continues so the real Tauri build can produce the authoritative compiler/linker error. Set `HEIMGEIST_STRICT_SYSTEM_DEPS=1` to make that preflight warning fatal. `HEIMGEIST_NODE_MAJOR`, `HEIMGEIST_NODE_DIR`, `HEIMGEIST_TOOL_BIN_DIR`, `CARGO_HOME`, `RUSTUP_HOME`, `PYTHON_BIN`, `HEIMGEIST_STEAMOS_DEVMODE`, and `HEIMGEIST_STRICT_SYSTEM_DEPS` provide explicit runtime overrides.
|
||||
|
||||
On Linux `x86_64`, `run.sh` now selects a PyTorch flavor before installing `openai-whisper`:
|
||||
|
||||
|
||||
113
run.sh
113
run.sh
@@ -18,7 +18,9 @@ HEIMGEIST_NODE_MAJOR="${HEIMGEIST_NODE_MAJOR:-22}"
|
||||
HEIMGEIST_NODE_DIR="${HEIMGEIST_NODE_DIR:-${XDG_CACHE_HOME:-$HOME/.cache}/heimgeist/node-v$HEIMGEIST_NODE_MAJOR}"
|
||||
HEIMGEIST_TOOL_BIN_DIR="${HEIMGEIST_TOOL_BIN_DIR:-$HOME/.local/bin}"
|
||||
HEIMGEIST_SKIP_SYSTEM_DEPS="${HEIMGEIST_SKIP_SYSTEM_DEPS:-0}"
|
||||
HEIMGEIST_STRICT_SYSTEM_DEPS="${HEIMGEIST_STRICT_SYSTEM_DEPS:-0}"
|
||||
HEIMGEIST_BOOTSTRAP_ONLY="${HEIMGEIST_BOOTSTRAP_ONLY:-0}"
|
||||
HEIMGEIST_STEAMOS_DEVMODE="${HEIMGEIST_STEAMOS_DEVMODE:-auto}"
|
||||
HEIMGEIST_TORCH_FLAVOR="${HEIMGEIST_TORCH_FLAVOR:-auto}"
|
||||
HEIMGEIST_TORCH_INDEX_URL="${HEIMGEIST_TORCH_INDEX_URL:-}"
|
||||
HEIMGEIST_FORCE_BOOTSTRAP="${HEIMGEIST_FORCE_BOOTSTRAP:-0}"
|
||||
@@ -57,6 +59,41 @@ linux_native_deps_usable() {
|
||||
&& pkg-config --exists webkit2gtk-4.1 gtk+-3.0 openssl librsvg-2.0
|
||||
}
|
||||
|
||||
print_native_dependency_report() {
|
||||
echo "Native dependency preflight report:" >&2
|
||||
for command_name in cc file pkg-config; do
|
||||
if command -v "$command_name" >/dev/null 2>&1; then
|
||||
echo " ok: command '$command_name' -> $(command -v "$command_name")" >&2
|
||||
else
|
||||
echo " missing: command '$command_name'" >&2
|
||||
fi
|
||||
done
|
||||
|
||||
if ! command -v pkg-config >/dev/null 2>&1; then
|
||||
return
|
||||
fi
|
||||
|
||||
for pkg_config_name in webkit2gtk-4.1 gtk+-3.0 openssl librsvg-2.0; do
|
||||
if pkg-config --exists "$pkg_config_name"; then
|
||||
pkg_config_version="$(pkg-config --modversion "$pkg_config_name" 2>/dev/null || true)"
|
||||
echo " ok: pkg-config '$pkg_config_name' ${pkg_config_version}" >&2
|
||||
else
|
||||
echo " missing: pkg-config '$pkg_config_name'" >&2
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
handle_incomplete_native_dependencies() {
|
||||
echo "The native Tauri dependency preflight is still incomplete after package installation." >&2
|
||||
print_native_dependency_report
|
||||
if [ "$HEIMGEIST_STRICT_SYSTEM_DEPS" = "1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Continuing because the package manager reported success." >&2
|
||||
echo "If the Tauri build still fails, rerun with HEIMGEIST_STRICT_SYSTEM_DEPS=1 for a hard preflight failure." >&2
|
||||
}
|
||||
|
||||
STEAMOS_RESTORE_READONLY=0
|
||||
|
||||
restore_steamos_readonly() {
|
||||
@@ -80,10 +117,78 @@ prepare_steamos_package_install() {
|
||||
fi
|
||||
}
|
||||
|
||||
pacman_keyring_names() {
|
||||
for keyring_file in /usr/share/pacman/keyrings/*.gpg; do
|
||||
[ -e "$keyring_file" ] || continue
|
||||
keyring_name="$(basename "$keyring_file" .gpg)"
|
||||
printf ' %s' "$keyring_name"
|
||||
done
|
||||
}
|
||||
|
||||
ensure_steamos_pacman_keyring() {
|
||||
if ! is_steamos; then
|
||||
return
|
||||
fi
|
||||
if ! command -v pacman-key >/dev/null 2>&1; then
|
||||
echo "SteamOS package signing cannot be repaired because pacman-key is unavailable." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Initializing and populating the SteamOS pacman keyring"
|
||||
as_root pacman-key --init
|
||||
|
||||
keyring_names="$(pacman_keyring_names)"
|
||||
if [ -n "$keyring_names" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
as_root pacman-key --populate $keyring_names
|
||||
else
|
||||
as_root pacman-key --populate
|
||||
fi
|
||||
}
|
||||
|
||||
run_steamos_devmode_bootstrap() {
|
||||
if ! is_steamos || [ "$HEIMGEIST_STEAMOS_DEVMODE" = "0" ]; then
|
||||
return 1
|
||||
fi
|
||||
if ! command -v steamos-devmode >/dev/null 2>&1; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Pacman still cannot install packages; running SteamOS devmode bootstrap"
|
||||
as_root steamos-devmode enable
|
||||
}
|
||||
|
||||
install_pacman_packages() {
|
||||
if as_root pacman "$@"; then
|
||||
return
|
||||
fi
|
||||
|
||||
if ! is_steamos; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
echo "Pacman failed on SteamOS. Refreshing package-signing trust and retrying once."
|
||||
ensure_steamos_pacman_keyring
|
||||
if as_root pacman "$@"; then
|
||||
return
|
||||
fi
|
||||
|
||||
if run_steamos_devmode_bootstrap && as_root pacman "$@"; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "SteamOS pacman package installation still failed." >&2
|
||||
echo "This is usually a broken SteamOS pacman keyring, not a corrupt Heimgeist download." >&2
|
||||
echo "Try running 'sudo steamos-devmode enable' manually, then rerun ./run.sh." >&2
|
||||
return 1
|
||||
}
|
||||
|
||||
install_arch_native_deps() {
|
||||
set -- \
|
||||
webkit2gtk-4.1 \
|
||||
base-devel \
|
||||
pkgconf \
|
||||
gtk3 \
|
||||
curl \
|
||||
wget \
|
||||
file \
|
||||
@@ -108,14 +213,15 @@ install_arch_native_deps() {
|
||||
prepare_steamos_package_install
|
||||
trap 'restore_steamos_readonly' EXIT
|
||||
trap 'restore_steamos_readonly; exit 130' HUP INT TERM
|
||||
ensure_steamos_pacman_keyring
|
||||
|
||||
install_status=0
|
||||
if is_steamos; then
|
||||
# SteamOS system updates own the base image, so only install missing packages.
|
||||
as_root pacman -S --needed --noconfirm $missing_packages || install_status=$?
|
||||
install_pacman_packages -S --needed --noconfirm $missing_packages || install_status=$?
|
||||
else
|
||||
# Arch requires a full upgrade when synchronizing/installing packages.
|
||||
as_root pacman -Syu --needed --noconfirm $missing_packages || install_status=$?
|
||||
install_pacman_packages -Syu --needed --noconfirm $missing_packages || install_status=$?
|
||||
fi
|
||||
|
||||
restore_steamos_readonly
|
||||
@@ -179,8 +285,7 @@ ensure_native_build_dependencies() {
|
||||
exit 1
|
||||
fi
|
||||
if ! linux_native_deps_usable; then
|
||||
echo "The native Tauri dependencies are still incomplete after package installation." >&2
|
||||
exit 1
|
||||
handle_incomplete_native_dependencies
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
Reference in New Issue
Block a user