eBPF-based security platform
docs: explain BPM build helper discovery
John Fastabend527500313fa2
diff --git a/Documentation/architecture.rst b/Documentation/architecture.rstindex a541f4a7..fea856f9 100644--- a/Documentation/architecture.rst+++ b/Documentation/architecture.rst@@ -123,6 +123,12 @@ exists only in the operator package. The operator never opens the TPMor the kernel keyring, and persists nothing but the keypair and thefiles the caller names.+The core binary exposes the operator-only BPM commands only when it can+resolve ``shirudo-build``. The installed operator package provides the+helper; a checkout must set ``SHIRUDO_BUILD`` or put both the checkout+root and ``tools/shirudo-build`` on ``PATH``. Without the helper,+``shirudo bpm --help`` shows the target command set and rejects ``build``.+The target holds the certificate, the sealed keyring, the private bpffsmount, the installed upatches, the eventlog and the TPM register. It runs``init``, ``upatch load``, ``upatch unload`` and the install side ofdiff --git a/Documentation/getting-started.rst b/Documentation/getting-started.rstindex 8dfb3cea..1be5447e 100644--- a/Documentation/getting-started.rst+++ b/Documentation/getting-started.rst@@ -51,9 +51,19 @@ configuration; the operator package adds ``shirudo-build`` and needsclang on the host. Neither ``shirudo-build`` nor clang ever ships toa target.-When working from a checkout instead of an installed package, put the-checkout root first on ``$PATH`` so ``shirudo build`` finds the helper,-or point ``SHIRUDO_BUILD`` at it.+When working from a checkout instead of an installed package, the core+binary must be able to find ``shirudo-build`` for operator commands.+Set ``SHIRUDO_BUILD`` to the helper, or put both the helper directory+and the checkout root on ``PATH``::++ export SHIRUDO_BUILD="$PWD/tools/shirudo-build/shirudo-build"+ # Or, instead:+ export PATH="$PWD/tools/shirudo-build:$PWD:$PATH"++The operator-only BPM commands are advertised only when the helper is+available. If ``shirudo bpm --help`` lists only target commands, the+helper was not found; ``bpm build``, ``push`` and ``tree append`` will be+reported as unknown subcommands.2) Create a signing key-----------------------diff --git a/Documentation/upatch.rst b/Documentation/upatch.rstindex 2349dd05..1648fc5e 100644--- a/Documentation/upatch.rst+++ b/Documentation/upatch.rst@@ -312,6 +312,13 @@ decoders and shared headers. Build and inspect::--keys-dir /var/lib/shirudo/keysshirudo bpm info ./example-shields-1.0.0.bee+``bpm build`` is an operator-only command. ``shirudo`` exposes it only+when it can resolve ``shirudo-build``; an installed operator package+provides the helper. From a checkout, set ``SHIRUDO_BUILD`` to+``tools/shirudo-build/shirudo-build`` or put both that directory and the+checkout root on ``PATH``. If ``shirudo bpm --help`` shows only target+commands, the helper was not found.+``bpm build [context] --version <v> [-f <Beefile>] [--keys-dir <dir>]``builds and signs every entry through ``shirudo-build`` and writes``<name>-<version>.bee``: a gzip tarball with the ``Beefile``, thediff --git a/tools/shirudo-build/README.md b/tools/shirudo-build/README.mdindex ba79bf7a..2e6a7878 100644--- a/tools/shirudo-build/README.md+++ b/tools/shirudo-build/README.md@@ -27,6 +27,11 @@ checkout's locally built binaries without installing them. `shirudobpm build|push|tree append` hand their full argument vector to`shirudo-build bpm ...` the same way.+The core binary includes those BPM subcommands in `shirudo bpm --help`+only when it can resolve this helper. If help shows only target+subcommands, set `SHIRUDO_BUILD` or add the helper directory to `PATH` as+shown below; otherwise `shirudo bpm build` is reported as unknown.+The rationale is in `Documentation/architecture.rst` (operator andtarget boundary) and `AGENTS.md` (the no-subprocess invariant).