Docs: Pin the verified Panama bootstrap
This commit is contained in:
@@ -1,25 +1,37 @@
|
||||
# Panama
|
||||
|
||||
Formerly Sunhat. A personal config for Fedora, with the intention of helping a
|
||||
user set up their Fedora system with one command.
|
||||
user set up their Fedora system with one checked command.
|
||||
|
||||
```sh
|
||||
bash <(curl -fsSL https://git.gbrown.org/gib/Panama/raw/branch/main/boot)
|
||||
(
|
||||
set -euo pipefail
|
||||
bootstrap_commit=0d1841cf86975d52485c94c0caa5d1b67e5c54a1
|
||||
bootstrap_sha=fd8dcd70d1266da109972df346e3d85d1037f6f6e1942b0157064412ab892372
|
||||
bootstrap_dir="$(umask 077; mktemp -d)"
|
||||
trap 'rm -rf -- "$bootstrap_dir"' EXIT
|
||||
bootstrap="$bootstrap_dir/boot"
|
||||
curl --fail --location --connect-timeout 10 --max-time 30 --max-filesize 262144 \
|
||||
--output "$bootstrap" \
|
||||
"https://git.gbrown.org/gib/Panama/raw/commit/$bootstrap_commit/boot"
|
||||
printf '%s %s\n' "$bootstrap_sha" "$bootstrap" >"$bootstrap_dir/boot.sha256"
|
||||
sha256sum -c "$bootstrap_dir/boot.sha256"
|
||||
PANAMA_BOOT_REVISION="$bootstrap_commit" PANAMA_BOOT_SHA256="$bootstrap_sha" \
|
||||
bash "$bootstrap"
|
||||
)
|
||||
```
|
||||
|
||||
`boot` installs git if the machine lacks it, clones this repository to
|
||||
`boot` installs git if the machine lacks it, creates a verified checkout at
|
||||
`~/.local/share/Panama` (or `$PANAMA_PATH`), and hands off to `install`. It is
|
||||
deliberately small enough to read first, and the same two steps by hand work
|
||||
identically:
|
||||
deliberately small enough to read first. The command downloads one immutable
|
||||
`boot` blob into a private temporary directory, checks its SHA-256, then asks
|
||||
that verified script to fetch the same commit. A clean existing checkout may
|
||||
fast-forward to that exact revision. A dirty or divergent checkout, a failed
|
||||
fetch, or a revision mismatch stops before `install`; Panama never resets local
|
||||
work or falls back to whatever checkout happens to be present.
|
||||
|
||||
```sh
|
||||
git clone https://git.gbrown.org/gib/Panama.git ~/.local/share/Panama
|
||||
~/.local/share/Panama/install
|
||||
```
|
||||
|
||||
Both are safe to run again: an existing clone is fast-forwarded rather than
|
||||
replaced. Once a machine exists, though, the command that keeps it current is
|
||||
`panama update` — one command, and it never asks you anything:
|
||||
Once a machine exists, the command that keeps it current is `panama update` —
|
||||
one command, and it never asks you anything:
|
||||
|
||||
```sh
|
||||
panama update
|
||||
@@ -35,10 +47,25 @@ shell environment minus everything that needs a screen, plus rootless podman
|
||||
and the compose services in [`server/`](server/README.md). The answer is the
|
||||
one thing Panama records durably (`~/.local/state/panama/role`), because
|
||||
`panama update` asks nothing and still has to know. A fresh server skips the
|
||||
question entirely:
|
||||
question entirely. It uses the same immutable boot blob and pins as the desktop
|
||||
command; only the final `--server` argument differs:
|
||||
|
||||
```sh
|
||||
bash <(curl -fsSL https://git.gbrown.org/gib/Panama/raw/branch/main/boot) --server
|
||||
(
|
||||
set -euo pipefail
|
||||
bootstrap_commit=0d1841cf86975d52485c94c0caa5d1b67e5c54a1
|
||||
bootstrap_sha=fd8dcd70d1266da109972df346e3d85d1037f6f6e1942b0157064412ab892372
|
||||
bootstrap_dir="$(umask 077; mktemp -d)"
|
||||
trap 'rm -rf -- "$bootstrap_dir"' EXIT
|
||||
bootstrap="$bootstrap_dir/boot"
|
||||
curl --fail --location --connect-timeout 10 --max-time 30 --max-filesize 262144 \
|
||||
--output "$bootstrap" \
|
||||
"https://git.gbrown.org/gib/Panama/raw/commit/$bootstrap_commit/boot"
|
||||
printf '%s %s\n' "$bootstrap_sha" "$bootstrap" >"$bootstrap_dir/boot.sha256"
|
||||
sha256sum -c "$bootstrap_dir/boot.sha256"
|
||||
PANAMA_BOOT_REVISION="$bootstrap_commit" PANAMA_BOOT_SHA256="$bootstrap_sha" \
|
||||
bash "$bootstrap" --server
|
||||
)
|
||||
```
|
||||
|
||||
That command also works from a brand-new VPS's **root** login. It creates or
|
||||
@@ -220,7 +247,7 @@ docs/ Settings reference, and the design specs behind the work
|
||||
|
||||
## Tests
|
||||
|
||||
187 of them, under `tests/`. `tests/contracts.manifest` classifies every
|
||||
188 of them, under `tests/`. `tests/contracts.manifest` classifies every
|
||||
contract by the capabilities it needs. Run the hermetic set, or grant a
|
||||
specific external capability when automation needs it:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user