staging 4.0.0-rc
This commit is contained in:
1 parent
ae54f74070
commit
fb02622b5b
30 files changed
+2346
-2671
No files matched your search
@@ -22,6 +22,12 @@ session. **Update it as you go.**
|
||||
- `GLACIER_BOOTSTRAP.txt`: `glacier-bootstrap`. Local mode is
|
||||
IMPLEMENTED (ROADMAP 1.3; section 10 says how it differs from the
|
||||
plan); remote mode and `--pin` are still a plan. Open: 9a, 9f.
|
||||
- `DOCKER_BUILDS.txt`: how to build recipes in Docker (the user's
|
||||
instructions; keep it current when builds change).
|
||||
- `BUILD_DESIGN.txt`: building from source (ROADMAP 4.3). Section 1
|
||||
= the user's decisions; section 12 = how steps 1-4 came out (DONE
|
||||
2026-10-19); section 13 = prefix, kept packages, first recipes;
|
||||
step 5 (Everest) next.
|
||||
- `REPO_DESIGN.txt`: remote repos + signing (ROADMAP 3.1). Sections
|
||||
1 and 10 = the user's decisions (TLS library still open); steps
|
||||
1-4 of section 9 DONE (see "3.1 status"); sections 7, 5 and 6
|
||||
@@ -74,6 +80,275 @@ flag. `-h` goes to stdout, exit 0; usage errors stay one usage block on
|
||||
stderr, exit 1. repo_alpine.sh checks the help of grepo/gsign/gsha256sum.
|
||||
Backups: `glacier-bootstrap.old2`, `gworld.old`, `tests/repo_alpine.sh.old5`.
|
||||
|
||||
2026-10-19: source builds planned as ROADMAP 4.3 (the user's four
|
||||
decisions are recorded there; the open ones are in ROADMAP 6).
|
||||
`TESTING.txt` holds the manual test steps; they have not been run yet.
|
||||
Same day, second session: BUILD_DESIGN.txt written with the user
|
||||
(every decision in its section 1: builds through gpkg/syspkg -f/-u;
|
||||
recipe repos named NAME-src; a named package several repos serve is
|
||||
ASKED about (replaces "first repo wins" for named packages; deps keep
|
||||
priority); user-namespace sandbox; flat cached layers per scope;
|
||||
syspkg builds as BUILD_USER; the switches are called TRAITS (not "USE
|
||||
flags"), per-package files in /etc/glacier/config and
|
||||
/glacier/usr/<uid>/config; libconfig recipes; toolchain in extra), and
|
||||
steps 1-4 implemented: see "Source builds" below. Backups made:
|
||||
`lib/glacier_cdef.lua.old2`, `lib/gpkg_common.lua.old5`,
|
||||
`syspkg.old2`, `gpkg.old2`, `Dockerfile.{alpine_root,alpine,arch,debian}.old`,
|
||||
`tests/installed_alpine.sh.old`, `tests/fetch_alpine.sh.old3`,
|
||||
`etc/glacier/glacier.conf.old`; Everest `scripts/container.sh.old5`.
|
||||
|
||||
Same day, third session: the user chose (BUILD_DESIGN 1o-1q) that
|
||||
builds compile for the PREFIX they're linked under, that installed
|
||||
source builds are KEPT as layers, and that recipes live in
|
||||
`~/Projects/everest/recipes/extra-src/NAME/`. Done and tested (section
|
||||
13): recipes for ncurses, vim, less, zstd, lua (all build and run in
|
||||
Docker), `tests/mkgrcp`, `tests/buildenv`, `run_docker.sh -b`, curl in
|
||||
Dockerfile.alpine_root, curl -L for sources. Build instructions:
|
||||
DOCKER_BUILDS.txt. Then, at the user's request: build output on the
|
||||
terminal by default, `-q`/`--quiet` (gpkg + syspkg, a modifier;
|
||||
log.c help lists it) to hide it; `-V` no longer controls it. Backups: `lib/gpkg_build.lua.old`/`.old2`,
|
||||
`lib/build-driver.sh.old`, `lib/gpkg_common.lua.old6`,
|
||||
`tests/build_alpine.sh.old`/`.old2`, `run_docker.sh.old`,
|
||||
`Dockerfile.alpine_root.old2`, `gpkg.old3`, `syspkg.old3`,
|
||||
`lib/gpkg_common.lua.old7`, `lib/gpkg_build.lua.old3`,
|
||||
`tests/build_alpine.sh.old3`.
|
||||
|
||||
### 2026-10-21 session: STOPPED HERE (user: "save your work and stop")
|
||||
|
||||
The user asked for: (1) the recipe parser to say WHY a recipe is
|
||||
malformed, (2) the toolchain and build environment baked into the
|
||||
QEMU live image (their choice over a Docker image of Everest), (3) all
|
||||
of DOCKER_BUILDS' test steps doable inside the Everest VM. Also done
|
||||
first: `Dockerfile.alpine_root` has `/app` on PATH (ENV + profile.d)
|
||||
and `permit nopass glacier as root` (user_layout_alpine.sh resets
|
||||
doas.conf to the pinned rule first); the user's bash recipe fixed
|
||||
(`sha256i:` typo, CONFIGURE `--disable-nls --without-bash-malloc`;
|
||||
backup `recipes/extra-src/bash.recipe.old`, outside the recipe dir).
|
||||
|
||||
DONE and tested (full regression green after each; mutation-checked):
|
||||
- `gl_recipe_error()` (pkg.h; setter `gl_recipe_set_error` in
|
||||
recipe.h, internal): every gl_recipe_parse / gl_recipe_read refusal
|
||||
records a reason (field, entry number, rule; libconfig line + error;
|
||||
bundle entry at fault), non-printable bytes as '?'; reset on each
|
||||
call. grepo prints `%s is a bundle with a malformed recipe: REASON.`
|
||||
(and for unreadable/invalid bundles); gpkg_build prints `ID has a
|
||||
malformed recipe bundle: REASON.`. recipe_alpine.sh 204 checks.
|
||||
read_strings takes a `what` description (also used by
|
||||
gl_conf_build; its own "Malformed FILE." still has no reason:
|
||||
offered to the user, not done).
|
||||
- User choice: gpkg builds may stack BASE packages as layers (Everest's
|
||||
BUILD_ROOT names musl, busybox). `load_indexes` returns the install
|
||||
list (no base/base-src in user scope, as before) plus `.layers`
|
||||
(base included); only `layer_plan` reads `.layers`. build_alpine.sh
|
||||
"gpkg: base packages as build layers".
|
||||
- User choice: HARDLINKS. They were silently skipped at extraction
|
||||
(binutils' `ld` -> ld.bfd, gcc's c++ etc. never installed). Now the
|
||||
library REFUSES a package with a hardlink entry (`Refusing archive
|
||||
entry 'P': it is a hardlink.`, extract_tree in istoreutils.c), and
|
||||
gbuild + build-driver.sh turn hardlinks into plain copies before
|
||||
packing (find -links +1, cp -p, mv). Tests: audit_alpine.sh
|
||||
"hardlinks", keyring_alpine.sh "gbuild: hardlinks become files",
|
||||
build_alpine.sh "hardlinks in a build's output".
|
||||
- keyring_alpine.sh needs NETWORK (its gbuild section `apk add bash`):
|
||||
with --network none it stops at "apk failed" after 62 checks
|
||||
(73 in full). Earlier "full regression" runs had that blind spot.
|
||||
- Everest: binutils `--without-debuginfod`, gcc `--without-zstd`
|
||||
(they had linked libdebuginfod/libzstd from the Alpine build
|
||||
container; checked with scanelf over every package: nothing else
|
||||
missing). gcc package 91 MB (stripped). Template has linux-headers,
|
||||
binutils, make, gcc (EXTRA_PKGS now ""). `container.sh initramfs`
|
||||
copies repo/ into T at /srv/everest (root-owned) and rewrites T's
|
||||
repos.conf urls to file:///srv/everest/REPO. `everest.sh boot` adds
|
||||
`-virtfs ... mount_tag=everest-repo` (repo/ live, read-only);
|
||||
scripts/vm-testnet.sh mounts it over /srv/everest and writes
|
||||
`nameserver 10.0.2.3` (builds download sources). Everything rebuilt
|
||||
(linux with namespaces/overlay, bootscripts 1.4.0 with _gbuild,
|
||||
everest-repos 1.1.0, libglacier-ng, glacier-ng, binutils, gcc),
|
||||
published (serial 2026102103), initramfs made (288 MB gz, 546 MB
|
||||
unpacked).
|
||||
- Verified in QEMU (EVEREST_MEM=8192 EVEREST_CPUS=8, driven by a pty
|
||||
script): kernel has user/pid/net ns + overlay, _gbuild exists,
|
||||
repos.conf file://, 9p mount, gcc and g++ compile and run.
|
||||
|
||||
### 2026-10-22: builds work in the QEMU image
|
||||
|
||||
- LIVE BOOT on a tmpfs (fixes `Cannot enter the build root: Invalid
|
||||
argument`: pivot_root(2) refuses the initramfs rootfs).
|
||||
`scripts/live-init.sh` is packed by `container.sh initramfs` as a
|
||||
SECOND cpio (gzip appended, not in T, no package) at `/init`: tmpfs
|
||||
(size=90%) on /.live, `cp -a` of every top-level entry, `exec
|
||||
switch_root /.live /sbin/init`; on failure it falls back to booting
|
||||
the initramfs. `everest.sh boot`: `rdinit=/init`, EVEREST_MEM default
|
||||
6144.
|
||||
- gcc ships `usr/bin/cc -> gcc` (container.sh build_gcc AND the
|
||||
extra-src gcc recipe; zstd's plain Makefile calls cc). gcc 16.2.0
|
||||
rebuilt in place. Recipe backup: `recipes/extra-src/gcc.build.old`.
|
||||
- gsandbox mounts the build overlay with `userxattr` (retried without
|
||||
on EINVAL, kernels < 5.11). Without it overlayfs in a user namespace
|
||||
can't set trusted.* xattrs ("failed to set xattr on upper"), so a
|
||||
layer's directory removed and remade showed the layer's old files.
|
||||
sandbox_alpine.sh "a layer's directory remade in the root is empty"
|
||||
(47 checks; mutant without userxattr caught); build_alpine.sh 142
|
||||
green. Everest's libglacier-ng rebuilt in place, published,
|
||||
initramfs remade.
|
||||
- Verified in QEMU (`scripts/vm-drive.py LOG scripts/vmtests/builds.txt`,
|
||||
a pty driver: 8 GB, 8 CPUs): / is tmpfs; `syspkg -f vim` (ncurses as
|
||||
dependency), `syspkg -f less zstd lua bash`, all run; `cc` compiles;
|
||||
vim `TRAITS = [ "-huge" ]` + `syspkg -u` rebuilds it (Huge -> Normal);
|
||||
a user's `gpkg -f zstd` (gstore -n as root) builds and links into
|
||||
/glacier/usr/1000/links; no xattr warnings in dmesg.
|
||||
- Seen, not changed: `syspkg -u` for a trait change prints `[!]
|
||||
Reinstalling vim-9.2.1209 (up to date)` before staging the rebuild.
|
||||
- JOBS is still unset in the image (builds -j1; the test appends
|
||||
`JOBS = 8;`). Not decided whether the image should set it.
|
||||
- Backups: Everest `scripts/container.sh.old8`, `everest.sh.old6`;
|
||||
glacier-ng `tests/sandbox_alpine.sh.old`. Nothing committed.
|
||||
- Docs not written yet: Everest README (VM build testing: boot,
|
||||
vm-testnet, syspkg -f, publish + 9p for recipe edits), DOCKER_BUILDS,
|
||||
ROADMAP 4.3/6, REPO_DESIGN 10a, BUILD_DESIGN (base layers for gpkg,
|
||||
hardlinks), the CLAUDE.md sections below.
|
||||
|
||||
Backups made this session: glacier-ng `Dockerfile.alpine_root.old3`,
|
||||
`tests/user_layout_alpine.sh.old`, `lib/glacier_cdef.lua.old3`,
|
||||
`lib/gpkg_build.lua.old4`/`.old5`, `tests/recipe_alpine.sh.old`,
|
||||
`lib/gpkg_common.lua.old8`, `tests/build_alpine.sh.old4`, `gbuild.old`,
|
||||
`lib/build-driver.sh.old2`, `tests/audit_alpine.sh.old2`,
|
||||
`tests/keyring_alpine.sh.old`; Everest `scripts/container.sh.old7`,
|
||||
`everest.sh.old5`, `templates/minimal.template.old4`,
|
||||
`scripts/vm-testnet.sh.old`. Nothing committed.
|
||||
|
||||
### Toolchain + https in base: IN PROGRESS (2026-10-19, fourth session)
|
||||
|
||||
Stopped mid-way at the user's request. The user asked for the
|
||||
toolchain steps (Phases 1-4 below) and decided:
|
||||
- **TLS: LibreSSL 4.3.3** (REPO_DESIGN 10a; curl 8.23 dropped BearSSL).
|
||||
curl 8.23.0, libressl, ca-certificates (curl.se's Mozilla bundle as
|
||||
`/etc/ssl/cert.pem`, VER 2026.9.25) all in BASE and in the template.
|
||||
- **gcc-libs in base** (libstdc++, libgcc_s, ...; settles ROADMAP 6's
|
||||
libgcc question); gcc, binutils, make, linux-headers in extra.
|
||||
- **BUILD_USER `_gbuild`** (uid/gid 900, in everest-bootscripts 1.4.0).
|
||||
- **Repo URL `https://pkg.everestlinux.org/REPO`** (base, extra,
|
||||
extra-src) in everest-repos 1.1.0. The server doesn't exist: tests
|
||||
serve `~/Projects/everest/repo/` under that name with a throwaway
|
||||
TEST CA (`testca/`), never shipped: initramfs inside its container
|
||||
(`serve_local`), `everest.sh boot` to the VM (openssl s_server on
|
||||
127.0.0.1:8443, QEMU guestfwd 10.0.2.100:443 via socat; the VM runs
|
||||
`sh /sys/firmware/qemu_fw_cfg/by_name/opt/everest/testnet/raw` =
|
||||
`scripts/vm-testnet.sh`: network, hosts entry, CA appended).
|
||||
- Phases: 1 build the packages, 2 test them as BUILD_ROOT in Docker,
|
||||
3 publish + initramfs + QEMU, 4 toolchain as extra-src recipes,
|
||||
rebuilt with itself (`everest.sh adopt`), republished.
|
||||
|
||||
Done (all in ~/Projects/everest unless said):
|
||||
- Sources pinned by SHA256 in `container.sh`'s `fetch URL SHA` (cached
|
||||
in `sources/`), every one checked against upstream's signature:
|
||||
gcc/binutils/make/ncurses (gnu-keyring), curl (Stenberg's key),
|
||||
kernel (kernel.org autosigner's sha256sums.asc), LibreSSL (signify),
|
||||
cacert (curl.se's .sha256); gcc's gmp/mpfr/mpc/isl against
|
||||
prerequisites.sha512 from the signed gcc tarball.
|
||||
- `container.sh`: cases libressl, ca-certificates, curl (removes the
|
||||
image's openssl-dev, installs LibreSSL into the throwaway container,
|
||||
links against it: checked NEEDED libssl.so.60/libcrypto.so.57),
|
||||
linux-headers (`make headers` + copy .h: headers_install needs
|
||||
rsync), binutils (2.47.0: VER must be X.Y.Z), make (CFLAGS -std=gnu17:
|
||||
4.4.1 isn't C23-clean), gcc|gcc-libs (`build_gcc`: one build, two
|
||||
packages; triple `x86_64-everest-linux-musl`, `t-linux64` sed so no
|
||||
lib64, `--disable-bootstrap`, `--with-local-prefix=/glacier/sys/links`;
|
||||
binutils `--with-lib-path=/usr/lib:/glacier/sys/links/lib`); linux
|
||||
config adds NAMESPACES/USER_NS/PID_NS/IPC_NS/UTS_NS/NET_NS/OVERLAY_FS/
|
||||
FW_CFG_SYSFS; glacier-ng installs Everest's own
|
||||
`pkgsrc/glacier-ng/etc/glacier/glacier.conf` (BUILD_ROOT = musl,
|
||||
busybox, linux-headers, binutils, gcc, make; BUILD_USER _gbuild);
|
||||
`adopt DIR`, `publish` (template + EXTRA_PKGS routed by manifest
|
||||
PKG_REPO; extra-src = mkgrcp of recipes/extra-src; grepo with
|
||||
everest-2026), `testca`, `serve_local`. `everest.sh`: PACKAGES
|
||||
extended, `publish`, `adopt DIR` (MOUNT= extra mount in
|
||||
`in_container`), `boot` (EVEREST_MEM default 2048, EVEREST_CPUS 2,
|
||||
serves repo/ when repo/ and testca/ exist). Dockerfile.build: curl,
|
||||
openssl. Template: libressl, ca-certificates, curl, gcc-libs,
|
||||
bootscripts 1.4.0, everest-repos 1.1.0.
|
||||
- Recipes `recipes/extra-src/{binutils,gcc,make,linux-headers}` (all
|
||||
nine recipes parse: mkgrcp + grepo OK). Toolchain recipes use
|
||||
`--prefix=/usr` and install into DESTDIR/usr on purpose (they are
|
||||
build layers, which sit at /usr), so the driver leaves them alone.
|
||||
- BUILT and signed in pkgs/: libressl 4.3.3, ca-certificates
|
||||
2026.9.25, curl 8.23.0, binutils 2.47.0, gcc 16.2.0, gcc-libs 16.2.0.
|
||||
|
||||
NOT done / next, in order:
|
||||
1. Rebuild (container.sh already fixed, not yet run): `make`,
|
||||
`linux-headers` (both failed: C23, rsync), `binutils` and `gcc`
|
||||
(now `install-strip`: gcc's package was 785 MB unstripped; libcc1
|
||||
moved out of gcc-libs). Then `linux` (new config; pkgs/ still has
|
||||
the 2026-10-06 build), `everest-bootscripts` (1.4.0),
|
||||
`everest-repos` (1.1.0), `libglacier-ng` and `glacier-ng` (4.0.0 in
|
||||
place: this session's -q, prefix, kept packages, Everest
|
||||
glacier.conf). Background script: scratchpad `blogs/run.sh` (lost
|
||||
with the session; it just loops `./everest.sh build P`).
|
||||
2. Phase 2: `./everest.sh publish`, then the Docker test written in
|
||||
the session, saved as `scripts/toolchain-test.sh` (its header says
|
||||
how to run it) (glacier-alpine_root, -b options, repo/ mounted at
|
||||
/srv/everest as file:// repos keyed everest-2026, BUILD_ROOT = the
|
||||
Everest toolchain, `syspkg -q -f vim less zstd lua`). Unknown yet:
|
||||
whether the real musl package (top-level `lib/ld-musl...`) stacks
|
||||
with gsandbox's skeleton (`/lib -> usr/lib`) as a layer.
|
||||
3. Phase 3: `everest.sh initramfs` (bootstrap syncs from serve_local),
|
||||
boot with EVEREST_MEM=6144, vm-testnet, `syspkg -y`,
|
||||
`syspkg -f gcc binutils make`, `gcc hello.c`, `syspkg -f vim`.
|
||||
4. Phase 4: build the 4 toolchain recipes with the stage-1 toolchain
|
||||
(in Docker; `-fO`, answer "2" for extra-src), copy
|
||||
`/glacier/sys/build/packages/extra@*.gpkg` out, `everest.sh adopt
|
||||
DIR` (stage-1 files move to pkgs/stage1/), publish, re-test.
|
||||
5. Docs: Everest README (new packages/commands), REPO_DESIGN 10a,
|
||||
ROADMAP 4.3/6, DOCKER_BUILDS (Everest toolchain), this section.
|
||||
|
||||
Backups (Everest): `scripts/container.sh.old6`, `everest.sh.old4`,
|
||||
`Dockerfile.build.old2`, `templates/minimal.template.old3`,
|
||||
`README.md.old4` (README not edited yet),
|
||||
`pkgsrc/everest-bootscripts/accounts.old/{passwd,group,shadow}`,
|
||||
`pkgsrc/everest-repos/repos.conf.old`. New files: `scripts/vm-testnet.sh`, `scripts/toolchain-test.sh`,
|
||||
`pkgsrc/glacier-ng/etc/glacier/glacier.conf`, `sources/` (cache).
|
||||
|
||||
### Source builds (2026-10-19)
|
||||
|
||||
- Formats (libglacier-ng): recipe = libconfig (`gl_recipe_parse`,
|
||||
strict); bundle `NAME-VER.grcp` (`gl_recipe_read`, src/recipe.c);
|
||||
`-src` indexes (`gl_index_parse` by REPO suffix); `PKG_TRAITS` in
|
||||
manifests; `gl_conf_build` (glacier.conf / user / per-package build
|
||||
settings, unknown keys INVALID: glacier.conf's allowed keys are now
|
||||
KEEP_OLD, TRAITS, CFLAGS, CXXFLAGS, LDFLAGS, JOBS, BUILD_USER,
|
||||
BUILD_ROOT, when a build reads it). `grepo -r X-src`.
|
||||
- `gsandbox` (src/gsandbox.c, installed to lib/glacier beside the .so's,
|
||||
copied to /app/lib/glacier by every Dockerfile): `-X` extract a layer
|
||||
(`gl_extract_files`, the install's own extraction, now
|
||||
`extract_tree()`), `-R` run a build in user/mount/net/pid/ipc/uts
|
||||
namespaces (root needs `-u USER`, refuses uid 0).
|
||||
- glacier-ng: `lib/gpkg_build.lua` (traits, settings, layers, the
|
||||
build), `lib/build-driver.sh` (runs inside), gpkg_common's `choose`,
|
||||
`confirm_builds`, `.glacier-src` marker (`gl_set_pkg_src` /
|
||||
`gl_pkg_src`), machine key (`/etc/glacier/keys/local.pub`,
|
||||
`/glacier/sys/keys/local.sec`; base-src needs "local" in base's keys).
|
||||
syspkg checks gsandbox + driver ownership only when a build is planned.
|
||||
- PREFIX (env, driver): `/usr` for base, else `ctx.links_path`; the
|
||||
driver installs into `DESTDIR$PREFIX`, moves it to `usr/`, and links
|
||||
`$PREFIX -> /usr` inside the sandbox. Kept packages:
|
||||
`<base>/build/packages/REPO@NAME-VER.gpkg` (`M.keep`, `M.prune_kept`
|
||||
after every commit, `M.kept` for `layer_plan`: built, then kept, then
|
||||
binary).
|
||||
- Docker builds: `./run_docker.sh -b Dockerfile.alpine_root`, then
|
||||
`/app/tests/buildenv` (rerun after editing a recipe), then
|
||||
`syspkg -f vim`. The recipe tree is mounted at `/recipes`.
|
||||
- Tests: `recipe_alpine.sh` (117), `sandbox_alpine.sh` (47),
|
||||
`build_alpine.sh` (137); 10 + 7 C and 27 Lua/driver mutants, all
|
||||
caught.
|
||||
`tests/mkroot` packs Alpine packages (`-r` with deps) as a .gpkg.
|
||||
Sandbox suites need `--security-opt seccomp=unconfined --security-opt
|
||||
apparmor=unconfined --security-opt systempaths=unconfined` and a tmpfs
|
||||
(overlayfs can't sit on Docker's own overlay root): see each header.
|
||||
- Everest: NOT rebuilt with this yet (container.sh's glacier-ng install
|
||||
list already names gpkg_build.lua + build-driver.sh; libglacier-ng's
|
||||
`make install` puts gsandbox in usr/lib/glacier). No toolchain
|
||||
packages, and the kernel config's user namespaces are unchecked.
|
||||
|
||||
### Bootstrap repositories (2026-10-07)
|
||||
|
||||
The user chose: the config comes from a NEW base package
|
||||
@@ -670,19 +945,20 @@ deleted after commit. A base package fetched this way needs no `.sig`
|
||||
`-O`; `-u` and dependency upgrades don't. gpkg never fetches from base.
|
||||
|
||||
**Package symlinks** are extracted verbatim and linked like files.
|
||||
Hardlink, device and fifo entries are skipped. `add_to_archive` (used by
|
||||
Device and fifo entries are skipped; a hardlink entry refuses the
|
||||
whole package (2026-10-21; packers store hardlinks as files). `add_to_archive` (used by
|
||||
backups and `gstore -b`) archives symlinks.
|
||||
|
||||
## CLIs (glacier-ng)
|
||||
|
||||
| Tool | Flags | Runs as |
|
||||
|---|---|---|
|
||||
| `gpkg` | `-l FILE...` `-f NAME...` `-u [NAME...]` `-x NAME...` `-y` `-O` `-S` `-V` `-h` `-v` | the user; per-user scope only, NEVER constructs `GL_SCOPE_SYS` |
|
||||
| `syspkg` | `-n` `-l FILE...` `-f NAME...` `-u [NAME...]` `-x NAME...` `-y` `-O` `-S` `-V` `-R DIR` `--strict` `-h` `-v` | root via doas; `-h`/`-v` without root |
|
||||
| `gpkg` | `-l FILE...` `-f NAME...` `-u [NAME...]` `-x NAME...` `-y` `-O` `-S` `-V` `-q` `-h` `-v` | the user; per-user scope only, NEVER constructs `GL_SCOPE_SYS` |
|
||||
| `syspkg` | `-n` `-l FILE...` `-f NAME...` `-u [NAME...]` `-x NAME...` `-y` `-O` `-S` `-V` `-q` `-R DIR` `--strict` `-h` `-v` | root via doas; `-h`/`-v` without root |
|
||||
| `gstore` | `-n [UID]` `-b UID OUTFILE` `-x UID` `-s` (refuses: not implemented) `-V` `-h` `-v` | `-n` needs root (direct, or `doas gstore -n` for yourself) |
|
||||
| `glacier-bootstrap` | `-d PKGDIR TEMPLATE TARGET` `-n` `-t` `-V` `-h` `-v` | the user; borrows root only for `doas syspkg` / `doas chroot` |
|
||||
|
||||
- **gpkg:** modifiers `-O`/`-S`/`-V` are applied in a pre-pass, so their
|
||||
- **gpkg:** modifiers `-O`/`-S`/`-V`/`-q` are applied in a pre-pass, so their
|
||||
position doesn't matter (`-lO` == `-Ol`). It finds its user via
|
||||
`/proc/self/loginuid`, falling back to `getuid()`. Unknown flags are
|
||||
refused (`[x] Unknown option: -R`); gpkg has no `-R`/`--strict`.
|
||||
@@ -808,7 +1084,8 @@ GNU `tar` is required: the hostile-archive fixtures use `tar --append`.
|
||||
|---|---|
|
||||
| `sign_alpine.sh` | `alpine:latest` with `/libsrc` and `/t.sh` mounted |
|
||||
| `syspkg_alpine.sh`, `overwrite_alpine.sh` | `alpine:latest` with `/src`, `/libsrc` and `/t.sh` mounted (see each header); `overwrite_alpine.sh` runs both as-is and with `--tmpfs /glacier:exec` |
|
||||
| `verify_alpine.sh`, `user_layout_alpine.sh`, `upgrade_alpine.sh`, `sys_perms_alpine.sh`, `deps_alpine.sh`, `sysroot_alpine.sh`, `root_alpine.sh`, `bootstrap_alpine.sh`, `installed_alpine.sh`, `keyring_alpine.sh`, `repo_alpine.sh`, `audit_alpine.sh`, `fetch_alpine.sh` | `glacier-alpine_root` |
|
||||
| `verify_alpine.sh`, `user_layout_alpine.sh`, `upgrade_alpine.sh`, `sys_perms_alpine.sh`, `deps_alpine.sh`, `sysroot_alpine.sh`, `root_alpine.sh`, `bootstrap_alpine.sh`, `installed_alpine.sh`, `keyring_alpine.sh`, `repo_alpine.sh`, `audit_alpine.sh`, `fetch_alpine.sh`, `recipe_alpine.sh` | `glacier-alpine_root` |
|
||||
| `sandbox_alpine.sh` (`--tmpfs /work:exec`), `build_alpine.sh` (`--tmpfs /glacier:exec,mode=755`) | `glacier-alpine_root` with `--security-opt seccomp=unconfined --security-opt apparmor=unconfined --security-opt systempaths=unconfined` (user namespaces, overlayfs, /proc) |
|
||||
|
||||
Build the `glacier-alpine_root` image with:
|
||||
```sh
|
||||
@@ -838,7 +1115,8 @@ in `./run_docker.sh Dockerfile.alpine_root` using it; for an image,
|
||||
changes) into the scratchpad, break the defence there, then
|
||||
`docker build -f Dockerfile.alpine_root --build-context libglacier=COPY
|
||||
-t glacier-mut .` from the (copied) glacier-ng and run the suite against
|
||||
`glacier-mut`; delete the image after. Docker tags must be lowercase. A
|
||||
`glacier-mut`; delete the image after. Docker tags must be lowercase
|
||||
(a mutant named `L1` failed to build for that reason, 2026-10-19). A
|
||||
mutation that doesn't compile under `-Werror` proves nothing: rewrite it
|
||||
so it compiles. Watch for checks that pass for the wrong reason (e.g. a
|
||||
refusal caused by a missing directory instead of the defence). In shell
|
||||
@@ -852,8 +1130,10 @@ mutate a Lua CLI without rebuilding, bind-mount the mutated file over
|
||||
`/app/NAME` (`-v $PWD/mut:/app/glacier-bootstrap:ro`).
|
||||
|
||||
**Full regression** = the FFI suite + `syspkg_alpine.sh` +
|
||||
`overwrite_alpine.sh` (both ways) + `sign_alpine.sh` + the thirteen `glacier-alpine_root`
|
||||
suites, all in parallel; the two output-based suites (`syspkg_alpine`,
|
||||
`overwrite_alpine.sh` (both ways) + `sign_alpine.sh` + the sixteen `glacier-alpine_root`
|
||||
suites, all in parallel (a script doing all of it, kept in the session
|
||||
scratchpad, is easy to rewrite from this list; count only `^FAIL:`
|
||||
lines, several suites print `FAILURES: 0`); the two output-based suites (`syspkg_alpine`,
|
||||
`user_layout_alpine`) have no PASS lines, so grep their output for
|
||||
`Unknown|traceback|failed|GL_` instead (only `--bogus` is expected).
|
||||
|
||||
@@ -863,7 +1143,9 @@ and `debian` default to user `glacier` (uid 1000, in wheel); `alpine_root`
|
||||
defaults to root. All of them have:
|
||||
- root-owned `/app`;
|
||||
- no `/glacier` until `gstore -n` / `syspkg -n`;
|
||||
- the doas rule plus `permit nopass glacier`;
|
||||
- the doas rule plus `permit nopass glacier` (`as root` in alpine_root,
|
||||
2026-10-21; user_layout_alpine.sh resets doas.conf to the pinned rule
|
||||
first); alpine_root also has `/app` on PATH (ENV + profile.d);
|
||||
- `/etc/profile.d/glacier.sh` putting `/glacier/usr/<uid>/links/bin` then
|
||||
`/glacier/sys/links/bin` on `PATH` (and `lib` on `LD_LIBRARY_PATH`)
|
||||
unconditionally, since `/glacier` only appears after login (fixed
|
||||
|
||||
Reference in new issue
Block a user