Headsets, downloads and updates¶
TL;DR. overpressure holds no headset: each is its own repository with its own releases, downloaded into
devices/<codename>/, checked against its published SHA-256 and its headset.json, and refused when it was made
for a headset interface this overpressure cannot run. Every download goes through one module that verifies TLS with
the system's own verifier, tries a short outage again and says why a failure failed. The app updates itself from
overpressure's own releases, each update file checked against the key the app was built with.
Headsets in devices/¶
overpressure holds no headset. Each is its own repository (overpressure/<codename>) with its own releases,
dropped into the ignored devices/<codename>/; overpressure/catalogue.py
lists the headsets there are. overpressure headset add downloads one by channel, version or branch
(the commands); the app's + does the same.
- A release is the tag's source zip, checked against its published SHA-256 (a preview of a branch has none),
unpacked into a new folder and checked against its
headset.jsonbefore it replaces what was there. - Its record.
devices/<codename>/.release.jsonrecords which it is: its tag, its channel (a preview's branch too) and its zip's SHA-256, or that it was asked for by version (pinned). - Updates.
headset updateand the headset page follow the recorded channel: a newer release on it (for a preview, another commit of its branch) is an update; a pinned release has none. - A development checkout, a Git clone of the headset's repository in its folder, is never replaced: Git updates it.
- The headset interface.
headset.jsonnames the interface the release was made for (api,MAJOR.MINOR, the headset interface).headset releasesmarks each release this overpressure cannot run, with the reason, and the channels take the newest that runs. The registry loads only a headset this overpressure runs;overpressure deviceslists the others as refused, with the reason (update overpressure, use an older one, or download another release).
The headsets are downloaded into the data root and found only there: they name their files relative to it (two roots).
Downloads¶
Every download of overpressure and its headsets (the host tools, the headsets' releases, Alpine's packages, the stock OTA, a headset's kernel and packages) goes through overpressure/web.py:
- TLS is verified by the system's own verifier through truststore, as pip does: CryptoAPI on Windows, the
Security framework on macOS, OpenSSL with the system's roots on Linux. Python's own verifier on Windows trusts
only the roots already in Windows' store, while Windows fetches a missing root the first time it needs one;
GitHub's download hosts end at roots a computer may not have fetched yet (ISRG Root YR under ISRG Root X1,
Sectigo's E46 under USERTrust ECC), and those downloads failed with "unable to get issuer certificate". Without
truststore (a development checkout without its packages) Python's own verifier runs;
doctorsays which one. Every certificate is verified either way. - A short outage is tried again for two minutes, 2 s apart at first and up to 30 s: a failed or dropped connection, TLS, a name that doesn't resolve, and the answers 408, 429 and 5xx. Each try again is logged with its reason; any other answer fails at once.
- A failure says why: the URL and the HTTP status, the certificate's problem, the name, the timeout or the connection.
- A vendor's archive in ranges (overpressure/payload.py): a connection the server ends in the middle of a range keeps what came and asks for the rest; only tries that bring nothing count against the five attempts (PICO's CDN ends connections a few megabytes into a range).
- Mirrors: a catalog build may list
mirrors, the same archive on the vendor's other hosts.ota.fastestreads 4 MB from the archive's middle on each, for at most 15 s, leaves out a host that answers with another size or not at all, and takes the fastest; what comes from it is checked as from any other (each member's CRC-32, and pins where a headset has them). A host is fast for an archive its edge has cached: PICO's US host gave 16 to 22 MB/s for one, under 1 MB/s for one it had not served.
The pinned host tools come the same way, each archive checked by its SHA-256 (host tools).
The app's updates¶
On each start, once the disclaimer is accepted, the engine looks for a newer overpressure release that carries the app (overpressure/appupdate.py): the newest on this one's channel, where a stable app takes stable releases only and a beta (or a preview) betas too, and a stable release once it is the newest. A release without the app's manifest is not offered.
When the owner updates, the app's core (update.rs) waits until nothing runs, then:
- reads the release's manifest (only from overpressure's own releases);
- downloads this system's update file with its progress;
- checks its signature against the key the app was built with (the app's release);
- ends the engine and installs it (on Windows the installer runs without questions);
- restarts.
The owner's data stays in the data root. A checkout is told of the release and opens its page; a build without the update key says that it cannot update itself. What the owner sees: updating overpressure.