Appendix A On-Disk Layout

This appendix collects every path pekit uses. CACHE is the cache directory, $PEKIT_CACHE_DIR, $XDG_CACHE_HOME/pekit, or ~/.cache/pekit. STATE is the state directory, $PEKIT_STATE_DIR, $XDG_STATE_HOME/pekit, or ~/.local/state/pekit. CONFIG is the configuration directory: $XDG_CONFIG_HOME/pekit, else ~/.config/pekit. BUDGET is the machine's budget's directory: $XDG_RUNTIME_DIR/pekit/budget, else CACHE/budget.

A.1 In the workspace #

PathHoldsWritten by
workspace.gcslThe root file, and pekitconf.The user.
pekit.lockThe pinned libraries and their sources, as JSON.pekit lock.
pekit.sourcesWhat each recipe's packages are built from, as JSON.pekit sources.
.gcsl/libraries/<path>/Each pinned library, exported.pekit lock, and restoring before a build.
pekit-out/<target>/<function>[.N]/Symbolic links to each target's results.Each build.
pekit-out/.steps/<function>/<identity>/A step's outputs: copies of what targets gave, and read-only links for exposed outputs.Each build.
pekit-out/.fetch/<sha256>/<name>An exposed fetched file.Each build.
pekit-out/.unpack/<key>/An exposed unpacked archive.Each build.
pekit-out/.git/<key>/<name>/An exposed git commit's files.Each build.
pekit-out/.pekit-copiesWhat each copy a build made holds, and its files' stamps as made, so a later build leaves an unchanged copy.Each build that copies.

A.2 In the cache directory #

PathHolds
CACHE/git/Bare clones of the repositories libraries are pinned from.
CACHE/scratch/step-<token>-<node>-<attempt>/A step attempt's staging directory: w/, out/, and tmp/.
CACHE/scratch/swept-<token>/Staging directories renamed for the sweeper to remove.
CACHE/scratch/kept-<token>-<node>/An empty scratch directory for one run of a step marked #[scratch].
CACHE/scratch/unpack-<token>-<n>/An archive being unpacked.
CACHE/scratch/git-<token>-<n>/A git commit being checked out.
CACHE/store/The store, below.

A.3 In the store #

PathHolds
lockThe store's lock, held shared by every process with the store open.
cas/<xx>/<digest>A blob, read-only.
cas/<xx>/<digest>.xThe executable copy of a blob.
cas/<xx>/<digest>.rN, <digest>.x.rNNumbered copies of a blob.
records/<xx>/<key>A record, as JSON: a step's, a program's, a manifest, a fetch's, an unpacking's, or a git commit's.
trees/<digest>, trees/<digest>-<bases>A materialized tree's instance.
complete/<digest>A mark that a tree has everything it names.
seen/<digest>.stampsThe stamps of a workspace's files, by a digest of its root's path, in a binary form.
seen/<digest>-libraries.stampsThe stamps of the files of a workspace's locked libraries.
seen/<digest>.rootThe path of the workspace whose stamps these are.
seen/<digest>.outputsThe path of that workspace's output directory.
git/Bare clones of the repositories fetch_git fetched from, each with a .lock beside it that a fetch into it holds.
scratch/<digest>A step's scratch directory, with <digest>.lock, <digest>.size, and <digest>.dirty while a run has it.
claims/<base>The lock file of the claim on a step, by its base receipt.
usage/A journal of what each build used.
eviction.jsonEach record's eviction priority, and what was evicted.
using/<pid>-<token>What each process that has the store open uses of it, published, held locked by the process, and removed as it exits.
evictingThe lock of an eviction beside other processes.
tmp/evicting-<token>/What such an eviction has moved aside, until it puts back or deletes it.
orphanedWhat output directories held of evicted steps when an eviction last looked: bytes, exposures, and when.
size, size.lockThe ledger of the blobs' size, and its lock.
tmp/Files and directories being written, each named with a process's token.

A.4 In the state directory #

PathHolds
STATE/keychain-keyThe machine's 32-byte key that secrets' identities are hashed with, mode 0600.
STATE/peaks/<digest>, STATE/peaks/kind-<digest>The last peaks of a step's program, and of its kind's.

A.5 The machine's budget #

PathHolds
CONFIG/machine.confThe budget's limits, jobs, memory, and unseen, and the machine's cache_limit and evaluating. Written by the user.
BUDGET/job-<n>, BUDGET/memory-<n>The lock files of the budget's jobs and units of memory.
BUDGET/waiting, BUDGET/gateThe lock files a waiting program holds.
BUDGET/fifo-<pid>-<n>A running program's jobserver.

The Machine's Budget says what each is.

A.6 In a step's sandbox #

Paths in a Step lists the paths a step sees.

Edit this page