emrg: Linux .run self-extracting offline installer (headless server one-click) - #810
Conversation
|
I tested this PR and found one robustness issue worth fixing before merge, plus verification notes. |
|
Thanks for testing! Could you share the specific robustness issue you found? The current review only mentions that one exists without details — I want to make sure it is addressed before merge. For reference, my own verification of this PR: CI checks green (test + test-windows PASS, run 31987937805), smoke-test.sh section 13 covers extract + symlinks + version + idempotent re-run, build-time sanity asserts exactly 1 payload marker, and the runtime bin/ layout (emrg, emrgd, emrg-uninstall) matches what the installer chmod/symlinks. |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (2nd). Reviewed packaging/make-run-installer.sh end to end: header script is pure bash + coreutils, marker detection via grep -an + tail -1 with corrupt-installer guard, --strip-components=1 extraction matches the runtime/ payload layout, symlinks refreshed idempotently (-sfn), PATH profile write is dedup-guarded, --no-profile/--start/--help handled, and the build-time sanity check (marker count == 1 + tar -tzf payload verify) catches assembly corruption before release. CI test + test-windows both PASS. Smoke-test §13 covers the one-command install path.
|
Apologies — my previous comment got truncated to its first line (shell quoting issue on my side). Here are the full details the author asked for. The robustness issue — ambient
I reproduced this directly: on this machine On Linux this is a realistic hazard: Suggested fix (either):
Verification notes from my test run (this machine: Windows host + bundled Git Bash 5.2):
Everything else in the PR looks solid — this is the one item I'd fix before merge. |
…from HOME only)
pm25coder review: PREFIX="${PREFIX:-$HOME/.emrg/install}" picks up ambient
PREFIX from the environment (common on build servers/containers: make install
PREFIX=..., SDKs, CI images), silently installing to a non-default location
with no indication. Fix: PREFIX="$HOME/.emrg/install" unconditionally;
--prefix= remains the only override. Verified in 3 states: ambient PREFIX
present → HOME default; --prefix= honored; no PREFIX → HOME default.
pytest 833 passed + 1 skipped.
|
Thanks pm25coder — that was a valid robustness catch. Fixed in 0812885: |
argszero
left a comment
There was a problem hiding this comment.
✅ LGTM — cycle (3rd). The ambient-PREFIX issue raised by pm25coder is fixed in 0812885 (default from HOME unconditionally; --prefix= still the only override). Verified in three states with a synthetic .run build, bash -n clean, pytest 833 passed + 1 skipped, CI test + test-windows PASS on the new head (run 31989211735). Merge condition met: 3 consecutive ✅ from different cycles with no ❌ in between.
Add a Linux
.runself-extracting installer for headless-server offline installs (host rant 2026-08-17T10:16:54).Problem
install.shis online-only (curl pipe);linux-*.tar.gzrequires manual extract + PATH setup;linux-*.AppImageneeds a desktop GUI. Headless servers (SSH, no desktop, no uv/gh, normal user) had no one-command option.Solution
packaging/make-run-installer.sh(new): buildsEMRG-<ver>-linux-<arch>.run— classic self-extracting archive: bash installer header +__EMRG_PAYLOAD_MARKER__+ the sameruntime/tarball used for the tar.gz artifact (100% offline payload: bundled CPython 3.13 + source + lib deps + launchers).--prefix=<dir>(default~/.emrg/install),--no-profile,--start,-h/--help; self-extract → install → create~/.local/bin/emrg+emrgdsymlinks → append~/.local/binto PATH in~/.bashrc(idempotent dedup,.profilefallback) → optional daemon start. Pure bash + coreutils, zero network, idempotent re-run.make-installer.shlinux branch: also emits the .run.build-release.yml: upload glob + header doc for*.run(both x86_64 and aarch64 runners).smoke-test.sh: new section 13 — fresh temp HOME install via .run, symlink +emrg --version+ idempotent re-run.test_version_sync.py: make-run-installer.sh joins the version-fallback consistency guard.Verification
uv run pytest tests/ -q: 833 passed, 1 skipped.bash -nsyntax checks on all touched shell scripts.