Repository navigation
Closed
Labels
Description
Problem
Upgrading an installed compiler means re-running the installer by hand (curl … | bash or ./install.sh). The user has to know the script URL, and the compiler itself cannot say whether a newer release exists.
Proposal
Add manticore upgrade, a thin wrapper over the installer logic that already exists in install.sh:
manticore upgrade— install the latest release for this platform.manticore upgrade --check— report the installed and the latest version, change nothing; non-zero exit when an update is available.manticore upgrade --version X— install a specific release (maps toMANTICORE_VERSION).- "Already up to date" when the installed version is the latest.
Constraints
- One source of truth. Do not port
install.shto PHP (platform and glibc/musl detection,SHA256SUMSverification, fallback to a source build, self-rebuild on upgrade). Ship the script with the release as$MANTICORE_HOME/share/install.shand have the command invoke it. - Replace the binary safely. Install into a temporary directory, then
rm+mvat the end; nevercpover the running, signed binary (macOS kills a signed binary overwritten in place). - Checksum is mandatory. A download that does not match the release
SHA256SUMSaborts the upgrade and leaves the installed compiler untouched. - Foreign installs. If the compiler was not placed by
install.sh(package manager, custom prefix without the script), print which installer owns it and exit without touching files.
Acceptance criteria
--checkprints both versions and exits non-zero only when an update exists.- An upgrade from the previous release leaves a working
manticorethat reports the new version; the old binary is kept asbin/.manticore.prev. - A checksum mismatch, an unreachable GitHub and a platform with no published build each fail with a clear message and leave the old install working.
tools/install_smoke.shcovers the command against a mock release, without network access.
Notes
Not part of #166. Land after the next release; the command adds no new syntax, so it needs no BOOTSTRAP_VERSION raise.
Activity