Skip to content

feat: source install script for Linux (step 2) - #101

Open
GuangchuangYu wants to merge 2 commits into
mainfrom
agent/source-install-step2
Open

feat: source install script for Linux (step 2)#101
GuangchuangYu wants to merge 2 commits into
mainfrom
agent/source-install-step2

Conversation

@GuangchuangYu

Copy link
Copy Markdown
Member

Summary

Second step of the two-step plan authorized by the project owner on 2026-08-20 (step 1 = PR #79, merged). Adds a diagnostics-driven source-install helper for Linux systems without an official installer, so users on unsupported-but-buildable Linux setups (or anyone who wants to build from source) can compile and install Rho, and so an AI can drive the install on an unfamiliar machine.

Changes

  • scripts/install-from-source.sh (new): platform detection → dependency report → Ark bootstrap → cargo build --release -p rho-desktop → install under a prefix.
    • NEVER installs packages or escalates privileges; reports every missing toolchain/system requirement with the distro-specific package command (apt/dnf/pacman/zypper/apk maps; unknown distros get a generic report + PR invitation to add a map).
    • Platform support follows runtime/ark.json: linux x86_64 and arm64 only; BSD and any other architecture are rejected with exit 1.
    • --json machine-readable diagnostics (stable schema); stable exit codes (0 ok / 1 usage-unsupported / 2 missing deps / 3 build failed / 4 prefix not writable); --prefix / --skip-ark / --skip-deps / --build-only.
  • scripts/test-install-from-source.sh (new): fixtures for distro maps, unknown-distro fallback, missing command/library reports, --json schema, exit codes, and the BSD/arm64/other-arch platform branches (uname hooks).
  • CI: fixture wired into linux-appimage-build.yml.
  • Docs: active spec docs/plans/active-2026-08-20-source-install-diagnostic-script-spec.md (S1 gates PASSED, cross-reviewed); README "Source install on other Linux systems"; AGENTS.md "Building Rho from source" guidance for AI-driven installs; cross-review matrix registers the spec.
  • chore: reasonix.toml removed from the repo and added to .gitignore (local tool config; owner requested it not be tracked).

Test plan

  • scripts/test-install-from-source.sh (distro maps, unknown fallback, JSON schema, exit codes, BSD/arm64/riscv64 rejection) — passed
  • scripts/test-bootstrap-ark-linux.sh, scripts/test-linux-apprun.sh — passed (no regression)
  • real-system diagnostics scripts/install-from-source.sh --jsonok:true on ubuntu/x86_64
  • full build reached via --skip-ark --build-only
  • git diff --check clean

Adds scripts/install-from-source.sh, a diagnostics-driven build-and-install
helper for Linux systems without an official installer, completing the
two-step plan authorized on 2026-08-20 (step 1 = PR #79 arm64/deb wiring,
now merged into main; step 2 = this script).

- platform support follows runtime/ark.json: linux-x64 and linux-arm64 both
  wired through bootstrap-ark-linux.sh; BSD explicitly rejected (Ark has no
  BSD build); macOS via official DMG
- NEVER installs packages or escalates privileges: reports every missing
  toolchain/system requirement with the distro-specific package command
  (apt/dnf/pacman/zypper/apk maps; unknown distros get a generic report plus
  a PR invitation to add a map)
- --json machine-readable diagnostics (stable schema), stable exit codes
  (0 ok / 1 usage-unsupported / 2 missing deps / 3 build failed /
  4 prefix not writable), --prefix / --skip-ark / --skip-deps / --build-only
- bootstraps Ark, runs cargo build --release -p rho-desktop, installs to
  PREFIX/bin without self-escalation
- fixtures: scripts/test-install-from-source.sh (distro maps, unknown
  fallback, missing command/library reports, JSON schema, exit codes,
  BSD/arm64/riscv64 platform branches via uname hooks); wired into
  linux-appimage-build.yml
- AGENTS.md gains 'Building Rho from source' guidance so an AI compiling Rho
  on an unfamiliar machine follows the diagnostics-first, never-auto-install
  workflow; README documents the fallback path; cross-review registers the
  new active spec
… linux x86_64/arm64

- reasonix.toml is a local tool config and must not be tracked: delete it and
  add reasonix.toml to .gitignore (restores the earlier local removal).
- scripts/install-from-source.sh now rejects any Linux architecture other
  than x86_64/aarch64/arm64 with exit 1 (matching runtime/ark.json): Linux is
  supported on exactly those two platforms, so the 'no Ark build, warn and
  continue' branch is gone.
- test-install-from-source.sh drops the riscv64 warning case and asserts the
  architecture rejection instead; spec and AGENTS.md updated accordingly.
@GuangchuangYu
GuangchuangYu requested a review from xiayh17 as a code owner August 20, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant