Files

4.3 KiB

Linux packaging

What changed

  • install.sh (repo root): POSIX sh one-liner installer. Detects distro family (Arch/CachyOS/Manjaro, Debian/Ubuntu/neon/Mint, Fedora, openSUSE) from /etc/os-release, GPU vendor (nvidia/amd/intel/none) from lspci, and session type (wayland/x11) from XDG_SESSION_TYPE/env. Prints its plan, asks before any sudo step unless --yes, supports --dry-run and --uninstall. Checks for a matching release asset on the Gitea API first (.pkg.tar.zst for Arch, .deb for Debian); none exist yet (no tags published), so it always falls back to building from source with cargo into ~/.cache/summit/src, installing to /usr/local/bin and /usr/local/share/summit/engine. Sets up the engine's venv with uv venv --python 3.12, installs engine/requirements.txt, and installs the CUDA 12.8 torch wheel only when an NVIDIA GPU was detected.
  • packaging/arch/PKGBUILD: builds from a git tag archive ($url/archive/v$pkgver.tar.gz), installs both binaries, the engine tree under /usr/share/summit/engine, the .desktop file and icon.
  • packaging/deb/control + packaging/deb/build.sh: assembles a staging tree and runs dpkg-deb --build directly (no debhelper/cargo-deb dependency at build time, though cargo-deb was installed and considered — see below).
  • packaging/appimage/build.sh: recipe using linuxdeploy + appimagetool.
  • packaging/summit.desktop, packaging/icons/summit.png (reused from engine/framegen/assets/icon_64.png).
  • README: added an "Install" section with the one-liner in a copyable block, and updated the status table for .deb/AUR/AppImage/Flatpak to replace the old blanket "Planned" row.

What I verified and how

  • shellcheck -s sh is clean on install.sh, packaging/deb/build.sh and packaging/appimage/build.sh (shellcheck installed via apt for this session).
  • install.sh --dry-run ran clean on this machine (Debian trixie, real hardware: detected debian/nvidia).
  • install.sh --dry-run --yes run inside docker run debian:bookworm-slim, archlinux:latest, fedora:latest and opensuse/leap:latest containers, each producing the correct distro-family branch and package manager commands with no errors.
  • Confirmed the interactive sudo-confirmation path exists and the non-root, non---yes, non-dry-run path requires a y answer (code-reviewed; not exercised live since dry-run intentionally skips prompting).
  • install.sh --dry-run --uninstall prints the expected rm commands and leaves user data/config alone.
  • Built real release binaries with cargo build --release -p summit -p summit-gui, then ran packaging/deb/build.sh, which produced target/debian/summit_0.0.1_amd64.deb (~11 MB). Verified its contents and control metadata with dpkg-deb --info / --contents: both binaries, the engine tree, desktop file, icon and LICENSE are present with correct permissions.
  • Did not install the .deb on a real system (no safe way to do so without affecting this environment's actual package state) and did not run it through apt/dpkg -i end to end.
  • packaging/arch/PKGBUILD was not run through makepkg (not installed in this environment, and it needs a pushed v0.0.1 git tag/release archive that doesn't exist yet). Reviewed by hand against cargo build --frozen --release and PKGBUILD conventions only.
  • packaging/appimage/build.sh was not run: linuxdeploy and appimagetool are not available here and I did not download arbitrary third-party binaries into this environment. Reviewed by hand only.
  • cargo test --workspace: 43 + 14 tests pass (no code was touched, only new packaging files and README).

What is NOT done

  • No Gitea release/tag exists yet, so the "native package if a release asset exists" path in install.sh is untested in practice (the logic to find and download one is there, but there is nothing to find).
  • PKGBUILD is unbuilt/untested (needs makepkg, a real tag, and arch tooling).
  • AppImage recipe is unbuilt/untested (needs linuxdeploy/appimagetool).
  • The .deb was not installed and run on a target machine (only built and inspected).
  • openSUSE's zypper package install commands run without shell errors in --dry-run but were not run for real anywhere (no openSUSE machine with network access to packages here).
  • No Flatpak manifest (left as Planned, as requested).