glove/docs/build.md
trvon 22e7c2de50
fix(onboarding): harden setup plan
Derive runtime templates before setup validation so reruns preserve existing policy. Redact policy JSON by default to avoid exposing owner-local details.
2026-08-03 09:19:50 -04:00

2 KiB

Building Glove

Building proves that the local source compiles; it does not prove that a host can enforce managed-session isolation. The boundary and its motivation are in architecture.md and threat-model.md.

Prerequisites

  • macOS or Linux, CMake 3.28+, Ninja, Git, and a C++23 compiler/toolchain;
  • Linux: pkg-config and libseccomp development headers;
  • macOS: Xcode Command Line Tools and a compatible Clang toolchain.

On Debian/Ubuntu:

sudo apt-get update
sudo apt-get install --yes \
  build-essential clang cmake ninja-build git pkg-config libseccomp-dev

yams is optional and only enables the macOS integration-test surface.

Build and test

setup.sh configures, builds, tests, and installs to ${GLOVE_INSTALL_PREFIX:-$HOME/.local}:

./setup.sh

For iteration:

cmake --preset dev
cmake --build --preset dev
ctest --preset dev

Run the full local gate before review or release:

./scripts/preflight.sh

Controlled-source builds

Glaze is pinned in cmake/Dependencies.cmake. For an offline or controlled build, provide the reviewed source explicitly instead of accepting an unpinned local checkout:

cmake --preset release \
  -DFETCHCONTENT_SOURCE_DIR_GLAZE=/absolute/reviewed/glaze-source
cmake --build --preset release
ctest --preset release

Managed Linux sessions

A managed-session host also needs cgroup v2 (cpu, memory, pids), user and mount namespaces, mount support, seccomp, and systemd delegation. Those requirements exist because Glove must enforce resource and filesystem limits, not merely start a process. See host-setup.md for the owner-local workflow and session-policy.md for the policy contract.

The privileged Docker command is only a test environment; it is not production isolation evidence:

docker build -f dockerfiles/Dockerfile.linux -t glove-linux .
docker run --rm --privileged --security-opt seccomp=unconfined glove-linux