Skip to content

Add manticore upgrade to update an installed compiler #174

Closed

Description

@blacktrs

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 to MANTICORE_VERSION).
  • "Already up to date" when the installed version is the latest.

Constraints

  • One source of truth. Do not port install.sh to PHP (platform and glibc/musl detection, SHA256SUMS verification, fallback to a source build, self-rebuild on upgrade). Ship the script with the release as $MANTICORE_HOME/share/install.sh and have the command invoke it.
  • Replace the binary safely. Install into a temporary directory, then rm + mv at the end; never cp over the running, signed binary (macOS kills a signed binary overwritten in place).
  • Checksum is mandatory. A download that does not match the release SHA256SUMS aborts 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

  • --check prints both versions and exits non-zero only when an update exists.
  • An upgrade from the previous release leaves a working manticore that reports the new version; the old binary is kept as bin/.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.sh covers 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

  1. added
    enhancement
    on Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementfeature

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions