Repository navigation
Route install.sh through the shared installation writer - #244
Merged
Merged
Conversation
install.sh now hands its verified Runtime, trusted source and signed pair to Runtime's installation writer. The writer refuses an older release, another channel, a pending Home update and a second writer before the installer stops Runtime, and one journaled transaction replaces the files. An interrupted run restores the previous installation. Part of #108
Remove --allow-unsigned, which the shared writer can no longer honour. The writer check now restores an interrupted install and refuses an installed Runtime without a readable release record, so every refusal happens before install.sh stops Runtime. Home start names install.sh for an interrupted installation. Part of #108
andersalm
force-pushed
the
fix/108-installer-shared-writer
branch
from
October 5, 2026 18:51
6ae12ec to
f0e762d
Compare
This was referenced Oct 6, 2026
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.
Part of #108
Re-running install.sh used to replace the Runtime, the trusted source and the signed release pair before any check, so an older installer could overwrite a newer installation.
What changes:
elastos updateuses). It no longer writes those files itself.elastos updateon that Home still refuses the new key and now says to run install.sh.--allow-unsignedis removed. Nothing used it, and the writer requires signatures.Why the hidden
install-releasecommand is not a new authority: it runs as the same user who owns the Runtime binary, its data directory and sources.json. That user can already rewrite sources.json directly or re-trust withelastos source add. The command only adds checks before the same writes. Limiting it to the DID stamped in install.sh would not help, because install.sh passes that DID itself.What a user sees:
Tests:
cargo test -p elastos-server --lib update::tests::installer(7 tests): an older installer after a real update; a pending Home update (restart journal and queued request); a fresh install, then a concurrent writer; the legacy first hop (update refusal, interruption after activation, re-trust); an interrupted fresh install that blocks Home and that a re-run completes; an installed Runtime with no readable sources.json; a tampered binary and foreign head/release signers. Each refusal leaves every file unchanged.cargo test -p elastos-server --lib -- install_transaction installed_release update sources:: host_lock(skips one test that binds port 8090)python3 scripts/install-bootstrap-test.py. It runs the real install.sh with mocks and checks that the writer check, the Runtime stop, the install and the root upgrade happen in that order, and that a writer refusal stops before Runtime.--allow-unsigned, older-over-newer, a corrupt and a missing sources.json, and a concurrent writer. None of the refusals stopped Runtime or changed a file. The develop install.sh overwrote the newer installation.