Repository navigation
Closed
Milestone
Description
Part of #89.
Part of #311 (Group B, installer and update). Owner: not assigned. Task base and PR target: develop.
Intended behavior
curl … | bash runs the installer only after bash has received the whole script. A dropped connection produces no partial install and no stopped Runtime.
Current behavior
scripts/install.sh(1,320 lines) defines its functions and then runs its body at top level, fromstep 1 "Check this computer"(line 956) tofinish_install(line 1320). Only an earlyifblock is read as one compound command.- With
curl -fsSL … | bash, bash runs each line as it arrives. If the connection drops part way, bash runs the part it has, and the pipeline's exit status is bash's own: 0. - After
installer_runtime_control(line 1298), a drop leaves the Runtime stopped with nothing installed. - After the binary is installed, a drop skips
principal-root-upgrade(lines 1310-1312) and setup, so the gateway refuses to start until the user runs the installer again. scripts/install-bootstrap-test.pytests a truncated binary download, but not a truncated script.
Implementation notes
- Move every top-level action into
main() { … }, and makemain "$@"the last line of the file. - Keep
set -euo pipefailand every__STAMP__placeholder.scripts/release-signer.py(render_installer, lines 376-390) requires each placeholder, and the signature covers the installer bytes (installer_sha256). - The change reaches users only in the next signed release. The CI update hop installs the previous release with that release's own
install.sh, so the hop stays valid.
Done means
- Every action in
install.shruns inside a function, and the last line calls it. Test: a new case ininstall-bootstrap-test.pyfeeds the script truncated at eachstepboundary and afterinstaller_runtime_controlthroughbash. It asserts that no Runtime is stopped, no file is installed, and no data directory is changed. Proof: https://github.com/Elacity/elastos-runtime/blob/aa3d61e4478a1a1a63dbef0dae97c23a0f9f4851/scripts/install-bootstrap-test.py#L844 - Installer stamping still works. Test: the signer tests in
release-platform-input-test.pyrender the new template. Proof: https://github.com/Elacity/elastos-runtime/blob/aa3d61e4478a1a1a63dbef0dae97c23a0f9f4851/scripts/release-platform-input-test.py#L1293 - The macOS update hop in CI passes. Proof: https://github.com/Elacity/elastos-runtime/actions/runs/38241637563/job/114787675815
Verify
python3 scripts/release-platform-input-test.py (runs install-bootstrap-test.py), just ci-local-prepush.
Metadata
Metadata
Assignees
Labels
No labels
Activity
andersalm commentedon Oct 13, 2026
Shipped in 0.8.0-alpha.15 (PR #343, source aa3d61e).