Expand description
The signed release manifest behind unv update (Phase 54, roadmap R26).
Same shape as the provider catalogue (an Ed25519 signature over the exact payload bytes, then a shape check) but with its own key, so a leaked catalogue key cannot ship a binary and the reverse. A manifest names one version and, per platform, one archive with its SHA-256 and size. Nothing here does I/O beyond reading the running executable’s path.
UPDATE_KEY_HEX is empty until the maintainer generates the update
key and pins its public half; with no key pinned every verify is refused,
so a build without one can never self-update by accident.
Structs§
Enums§
Constants§
- DEFAULT_
URL - Where the release job publishes the signed CLI manifest.
- SCHEMA
- STANDALONE_
MARKER - File the release archives ship beside the executable. Only a binary that sits next to it was unpacked from a standalone archive and may replace itself.
- UPDATE_
KEY_ HEX - Public half of the update-signing key (64 hex digits). Empty = not pinned. Never reuse the catalogue key here.
Functions§
- classify
- Classify an executable path.
marker_dir_has_markeris whetherSTANDALONE_MARKERexists beside it (passed in so this stays pure). - current_
target - The target string for the running binary, matching the release archive names.
A musl build (Alpine) gets its own
-muslarchive: the glibc one will not start there. - parse_
version x.y.zas numbers; anything else (pre-release, build metadata) is refused so a manifest cannot smuggle in an ordering this code does not understand.- pinned_
key - sha256_
hex - Lowercase hex SHA-256 of
bytes. - sign
- Publisher side: sign
mwith a 32-byte Ed25519 seed. - verify
- Check signature, then shape. Does not compare versions.