interplane.Get Omega
Read in your language

interplane-install

This project has not described itself yet.

Brought by drakestapleton

branch main Branches Tags History

interplane-install / README.md

151 lines · 10684 bytes Raw Blame History Rendered
1# interplane-install
2
3One command that puts Omega and your own Interplane on your own machine, owned by you.
4
5```sh
6git clone https://interplane.io/projects/interplane-install/repo.git interplane-install
7sh interplane-install/install.sh
8```
9
10The 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
12which one you have before you run it: `git -C interplane-install rev-parse HEAD` is the commit shown
13on https://interplane.io/drakestapleton/interplane-install, and the installer prints the commit it
14put in your store on its `Installer:` line. It refuses, and installs nothing, when the folder is not
15a Git checkout (a copy or an unpacked archive), when `install.sh` itself has changes that are not
16committed (that file decides which compilers and tools are installed), or when your store already
17has a newer installer. Uncommitted changes to other tracked files are not installed (it says so).
18The installer is the one thing here that nothing else checks for you.
19
20There is also a piped form, `sh < install.sh`, and a lone `install.sh` with no checkout beside it
21is treated the same way. It has no checkout, so the installer and the `interplane` command come from
22interplane.io at that moment (it says so): it takes the newest installer the site serves, or your
23store's copy when the site's does not continue from it, and you trust the site for it. Run from a
24folder that happens to be a clone, a pipe still takes the site's installer, not that folder's.
25Inspect the file first if you do not trust the site.
26
27When 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```
40interplane list the projects in your store
41interplane new NAME [--public] a new empty project (private unless --public)
42interplane import SOURCE [NAME] [--public] [--branch BRANCH]
43interplane get NAME [FOLDER] a working copy to change
44interplane land NAME [FOLDER] record the working copy's branch head, signed
45interplane verify [NAME] check every signed record
46interplane share [--listen ADDR] [--port PORT] serve public projects read-only over git://
47interplane where where your store, key and tools are
48```
49
50Private projects are never served. Visibility is set when a project is made and is part of its
51signed 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
54it serves the Git history only, not your signed records, so the people you share with cannot yet
55check 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
58Your 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
60made private the same way, and the installer says so when other accounts could get in. A working copy
61made with `interplane get` follows your own umask, and for a private project `get` says when other
62accounts on the machine can read it.
63
64Running the installer again finishes a run that was killed part-way and brings the three installed
65projects up to the newest main the source serves. Each new head is recorded as a signed landing under
66your key, marked as not reviewed here: it is whatever the source served, not something pinned or
67checked by this installer. What is built and installed (the compilers and the store tool) is always
68the pins of the installer you ran, and that installer is the one recorded in your store: an installer
69older than the one in your store is refused, and an `install.sh` with changes that are not committed
70is refused. The `omc` in `~/.local/bin` is replaced by a new release's compiler only while it is a
71file this installer put there (the installer keeps a list of their SHA-256); a file you put there
72yourself is kept, and the last lines say so. If the source's main does not descend from your copy, or
73the source cannot be reached, your copy is kept and it says so (with what git said). A password or
74token in `INTERPLANE_SOURCE` is never printed or written. The `interplane` command and the store
75tool's folder are rebuilt whole on every run, so a kill at any point cannot leave them half made; the
76previous one is kept beside it as `.prev`.
77
78## What it runs on
79
8064-bit Arm Linux today. That is where Omega's compiler runs. On any other machine the installer
81says so and writes nothing. Macs and Intel or AMD processors are not supported yet.
82
83Run so far: an NVIDIA DGX Spark, and an Ubuntu 24.04 container on it (4 KiB memory pages). Not run
84yet: a Raspberry Pi, an Arm cloud server, Linux on an Apple Silicon Mac. Pi 5 and Apple Silicon
85kernels often use 16 KiB pages, which this compiler has not been tried on.
86
87It 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
89Ubuntu: `sudo apt install bash git openssh-client util-linux coreutils diffutils gawk sed`.
90It 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
100Where things go: the store at `~/.local/share/interplane/store` (or `--store DIR`), tools and
101compilers under `~/.local/share/interplane`, your key and settings in `~/.config/interplane`,
102commands in `~/.local/bin`.
103
104Your 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
106without 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
121bash tests/run.sh SOURCE # SOURCE: a folder with omega-mv/repo.git and interplane-forge/repo.git, or https://interplane.io/projects
122```
123
124Installs into fresh home folders and checks what a person gets (the compiler builds and runs a
125program, the store verifies, a landing, an import, sharing) and that each thing that must be refused
126is refused (another processor, a git that is too old, a missing program, a source of Omega or of
127Interplane without the pinned commit, either compiler with the wrong SHA-256, an owner pin for
128another key, a different `--store` than the one you have, a folder with other files in it as the
129store, a rewritten history, a private project over `git://` even with a stray export mark, a push to
130a share, an altered byte in a chain, a copy of the installer with no checkout, an `install.sh` with
131uncommitted changes, an installer older than the one in your store, a password in an import address
132or in the source address, also one with an `@` in it). It also upgrades an install with a newer
133installer, with a newer Omega release (the `omc` this installer put there is replaced; one of yours
134is kept), brings Omega up to a newer main from the source and keeps your copy when the source is
135unrelated or unreachable, installs the exact commit of a detached checkout and of a checkout reached
136through a symlinked folder or a symlinked `install.sh`, makes the tool and command checkouts again
137after a kill, finishes installs, an import, a new project and a landing that were stopped part-way,
138installs through a pipe (also its help, also when the folder you are in is a clone), installs into a
139store folder you name, and gives a working copy of a private project the mode your umask gives it.
140After 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
142deliberately broken copies of the installer, one fault each, that the gate's own cases must reject,
143and 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
146Before a review, `REVIEW-LESSONS.md` says what earlier reviews found and what the reviewer's brief
147must quote.
148
149This 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.