interplane-install
This project has not described itself yet.
Brought by drakestapleton
interplane-install / README.md
| 1 | # interplane-install |
| 2 | |
| 3 | One command that puts Omega and your own Interplane on your own machine, owned by you. |
| 4 | |
| 5 | ```sh |
| 6 | git clone https://interplane.io/projects/interplane-install/repo.git interplane-install |
| 7 | sh interplane-install/install.sh |
| 8 | ``` |
| 9 | |
| 10 | The clone form installs exactly the commit you checked out, whatever branch it is on, when you run |
| 11 | `sh interplane-install/install.sh` (or the same file through a symlink or a symlinked folder). Check |
| 12 | which one you have before you run it: `git -C interplane-install rev-parse HEAD` is the commit shown |
| 13 | on https://interplane.io/drakestapleton/interplane-install, and the installer prints the commit it |
| 14 | put in your store on its `Installer:` line. It refuses, and installs nothing, when the folder is not |
| 15 | a Git checkout (a copy or an unpacked archive), when `install.sh` itself has changes that are not |
| 16 | committed (that file decides which compilers and tools are installed), or when your store already |
| 17 | has a newer installer. Uncommitted changes to other tracked files are not installed (it says so). |
| 18 | The installer is the one thing here that nothing else checks for you. |
| 19 | |
| 20 | There is also a piped form, `sh < install.sh`, and a lone `install.sh` with no checkout beside it |
| 21 | is treated the same way. It has no checkout, so the installer and the `interplane` command come from |
| 22 | interplane.io at that moment (it says so): it takes the newest installer the site serves, or your |
| 23 | store's copy when the site's does not continue from it, and you trust the site for it. Run from a |
| 24 | folder that happens to be a clone, a pipe still takes the site's installer, not that folder's. |
| 25 | Inspect the file first if you do not trust the site. |
| 26 | |
| 27 | When it is done you have: |
| 28 | |
| 29 | - `omc`, the Omega compiler, taken from the Omega source at a pinned release and checked against |
| 30 | its SHA-256. A different `omc` that is already in `~/.local/bin` is kept, and the installer says so. |
| 31 | - Your own Interplane store, with your own owner key (Ed25519, made on your machine, never sent |
| 32 | anywhere). Every project in it has a signed record chain that says which head is real. |
| 33 | - Omega, Interplane and this installer already in your store as your own private projects, with |
| 34 | their full Git history. The installed compilers and the store tool are the pinned commits; the |
| 35 | copies of the three projects in your store are whatever main the source served (see below). |
| 36 | - The `interplane` command: make projects, bring in any Git repository you choose, land your changes, |
| 37 | check every signature, and share the projects you mark public. |
| 38 | |
| 39 | ``` |
| 40 | interplane list the projects in your store |
| 41 | interplane new NAME [--public] a new empty project (private unless --public) |
| 42 | interplane import SOURCE [NAME] [--public] [--branch BRANCH] |
| 43 | interplane get NAME [FOLDER] a working copy to change |
| 44 | interplane land NAME [FOLDER] record the working copy's branch head, signed |
| 45 | interplane verify [NAME] check every signed record |
| 46 | interplane share [--listen ADDR] [--port PORT] serve public projects read-only over git:// |
| 47 | interplane where where your store, key and tools are |
| 48 | ``` |
| 49 | |
| 50 | Private projects are never served. Visibility is set when a project is made and is part of its |
| 51 | signed first record. Omega, Interplane and the installer arrive as private projects. |
| 52 | |
| 53 | `share` uses Git's own `git://` service. It is read-only, it has no encryption and no sign-in, and |
| 54 | it serves the Git history only, not your signed records, so the people you share with cannot yet |
| 55 | check your signatures. Unless you pass `--listen`, only your own machine can reach it; |
| 56 | `--listen 0.0.0.0` opens it to every network the machine is on. |
| 57 | |
| 58 | Your store and your key are readable only by your own account on the machine. A folder you name with |
| 59 | `--store` that already exists must be empty or already a store (otherwise nothing is changed); it is |
| 60 | made private the same way, and the installer says so when other accounts could get in. A working copy |
| 61 | made with `interplane get` follows your own umask, and for a private project `get` says when other |
| 62 | accounts on the machine can read it. |
| 63 | |
| 64 | Running the installer again finishes a run that was killed part-way and brings the three installed |
| 65 | projects up to the newest main the source serves. Each new head is recorded as a signed landing under |
| 66 | your key, marked as not reviewed here: it is whatever the source served, not something pinned or |
| 67 | checked by this installer. What is built and installed (the compilers and the store tool) is always |
| 68 | the pins of the installer you ran, and that installer is the one recorded in your store: an installer |
| 69 | older than the one in your store is refused, and an `install.sh` with changes that are not committed |
| 70 | is refused. The `omc` in `~/.local/bin` is replaced by a new release's compiler only while it is a |
| 71 | file this installer put there (the installer keeps a list of their SHA-256); a file you put there |
| 72 | yourself is kept, and the last lines say so. If the source's main does not descend from your copy, or |
| 73 | the source cannot be reached, your copy is kept and it says so (with what git said). A password or |
| 74 | token in `INTERPLANE_SOURCE` is never printed or written. The `interplane` command and the store |
| 75 | tool's folder are rebuilt whole on every run, so a kill at any point cannot leave them half made; the |
| 76 | previous one is kept beside it as `.prev`. |
| 77 | |
| 78 | ## What it runs on |
| 79 | |
| 80 | 64-bit Arm Linux today. That is where Omega's compiler runs. On any other machine the installer |
| 81 | says so and writes nothing. Macs and Intel or AMD processors are not supported yet. |
| 82 | |
| 83 | Run so far: an NVIDIA DGX Spark, and an Ubuntu 24.04 container on it (4 KiB memory pages). Not run |
| 84 | yet: a Raspberry Pi, an Arm cloud server, Linux on an Apple Silicon Mac. Pi 5 and Apple Silicon |
| 85 | kernels often use 16 KiB pages, which this compiler has not been tried on. |
| 86 | |
| 87 | It needs bash, git 2.29 or newer (the installer checks), ssh-keygen able to `-Y sign` and `-Y verify` |
| 88 | (tried with OpenSSH 9.6; no other version has been tried), flock and the usual coreutils. On Debian or |
| 89 | Ubuntu: `sudo apt install bash git openssh-client util-linux coreutils diffutils gawk sed`. |
| 90 | It needs no root and writes only under your home folder, plus the folder you name with `--store`. |
| 91 | |
| 92 | ## How the pieces are checked |
| 93 | |
| 94 | | What | Where it comes from | How it is checked | |
| 95 | |---|---|---| |
| 96 | | `omc` | Omega source (`omega-mv`), `seed/out/omc` at the release pinned in `install.sh` | the commit must be on the main the installer uses; the file's SHA-256 must be the pinned one | |
| 97 | | store tool `ipl` | Interplane source (`interplane-forge`) at the commit pinned in `install.sh` | built from source; its compiler, `sha2.om` and `chain.om` are the ones that commit's `ipl/PIN` names, by SHA-256 (`ipl/build.sh` refuses others); its own test gate runs on your machine, 81 seconds on a DGX Spark (`--quick` skips it) | |
| 98 | | your projects | your store | `ipl` signs every record with your key and refuses a project whose chain does not verify against the owner pin in `~/.config/interplane/owner-pins`. The sources in them are not pinned: a rerun records the source's newest main as it was served | |
| 99 | |
| 100 | Where things go: the store at `~/.local/share/interplane/store` (or `--store DIR`), tools and |
| 101 | compilers under `~/.local/share/interplane`, your key and settings in `~/.config/interplane`, |
| 102 | commands in `~/.local/bin`. |
| 103 | |
| 104 | Your owner key has no passphrase and is readable only by you. Keep a copy of |
| 105 | `~/.config/interplane/owner-key` somewhere safe: whoever holds it can sign for your projects, and |
| 106 | without it you cannot add to them. |
| 107 | |
| 108 | ## Not built yet |
| 109 | |
| 110 | - Changing a project's visibility after it is made (needs a new signed record kind in `ipl`). |
| 111 | - Pulling a project from another Interplane and checking its signed chain (mirrors, step 4 of |
| 112 | Interplane's design). Today `import` takes the Git history as cloned and records it as yours, |
| 113 | marked as not gated or reviewed. |
| 114 | - A web view of your own store (the pages you see at interplane.io). `share` serves Git only. |
| 115 | - Sharing your signed records with the Git history, and an encrypted or signed-in way to share. |
| 116 | - Macs and Intel or AMD machines (Omega's compiler for them is not qualified yet). |
| 117 | |
| 118 | ## Gate |
| 119 | |
| 120 | ```sh |
| 121 | bash tests/run.sh SOURCE # SOURCE: a folder with omega-mv/repo.git and interplane-forge/repo.git, or https://interplane.io/projects |
| 122 | ``` |
| 123 | |
| 124 | Installs into fresh home folders and checks what a person gets (the compiler builds and runs a |
| 125 | program, the store verifies, a landing, an import, sharing) and that each thing that must be refused |
| 126 | is refused (another processor, a git that is too old, a missing program, a source of Omega or of |
| 127 | Interplane without the pinned commit, either compiler with the wrong SHA-256, an owner pin for |
| 128 | another key, a different `--store` than the one you have, a folder with other files in it as the |
| 129 | store, a rewritten history, a private project over `git://` even with a stray export mark, a push to |
| 130 | a share, an altered byte in a chain, a copy of the installer with no checkout, an `install.sh` with |
| 131 | uncommitted changes, an installer older than the one in your store, a password in an import address |
| 132 | or in the source address, also one with an `@` in it). It also upgrades an install with a newer |
| 133 | installer, with a newer Omega release (the `omc` this installer put there is replaced; one of yours |
| 134 | is kept), brings Omega up to a newer main from the source and keeps your copy when the source is |
| 135 | unrelated or unreachable, installs the exact commit of a detached checkout and of a checkout reached |
| 136 | through a symlinked folder or a symlinked `install.sh`, makes the tool and command checkouts again |
| 137 | after a kill, finishes installs, an import, a new project and a landing that were stopped part-way, |
| 138 | installs through a pipe (also its help, also when the folder you are in is a clone), installs into a |
| 139 | store folder you name, and gives a working copy of a private project the mode your umask gives it. |
| 140 | After every run that succeeds it checks that what is on the machine is what the final lines say (the |
| 141 | `omc`, the store tool's commit, the command, the installer, a store that verifies). It then runs |
| 142 | deliberately broken copies of the installer, one fault each, that the gate's own cases must reject, |
| 143 | and checks that every kind of defect listed in `tests/LESSONS.tsv` has a passing case. Ends with |
| 144 | `GATE PASS cases=N mutants_killed=M` with M the number of broken copies it made. |
| 145 | |
| 146 | Before a review, `REVIEW-LESSONS.md` says what earlier reviews found and what the reviewer's brief |
| 147 | must quote. |
| 148 | |
| 149 | This installer is POSIX shell because it has to run before Omega exists on the machine; the |
| 150 | `interplane` command is shell glue around `ipl` in the same way `ipl` is, and moves to Omega with |
| 151 | `ipl`'s own decisions. |