feat: source install script for Linux (step 2) - #101
Open
GuangchuangYu wants to merge 2 commits into
Open
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.runtime/ark.json: linuxx86_64andarm64only; BSD and any other architecture are rejected with exit 1.--jsonmachine-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,--jsonschema, exit codes, and the BSD/arm64/other-arch platform branches (uname hooks).linux-appimage-build.yml.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.reasonix.tomlremoved 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) — passedscripts/test-bootstrap-ark-linux.sh,scripts/test-linux-apprun.sh— passed (no regression)scripts/install-from-source.sh --json→ok:trueon ubuntu/x86_64--skip-ark --build-onlygit diff --checkclean