| LBEXEC(8) | System Manager's Manual | LBEXEC(8) |
lbexec — run one
build command in a lockbox
lbexec |
[-p standard |
cargo] command
[argument ...] |
lbexec restricts itself with the Linux
Landlock security module and then executes command. It
is the per-command form of the lockbox described in
lockbox(7):
mkpkg(8) puts it in front of the lines
of
build()
named in a recipe's lockbox array. It is not usually
run by hand.
Which files may be read is taken from the package database, as for the full lockbox. The declared dependencies come from the environment that mkpkg(8) sets up; a declared one that is not installed is an error.
The options are as follows:
-p
standardMKPKG_WORK_DIR, SRC,
PKG, PKGMK_SOURCE_DIR,
/tmp and /dev; read access
to /proc and /etc.-p
cargostandard, but of /etc only
/etc/ssl, and of
CARGO_HOME only bin,
env, .package-cache and
toolchains, so the downloaded registry and git
checkouts are not readable and vendored sources must be used. The command
also runs in a new network namespace with only the loopback interface, if
the kernel and privileges allow it; otherwise it runs with the network.
mkpkg(8) sets
TMPDIR to $SRC/tmp for
this profile, because cargo renames files from
TMPDIR into its target directory.MKPKG_DEPENDS,
MKPKG_MAKEDEPENDSMKPKG_WORK_DIR,
SRC, PKG,
PKGMK_SOURCE_DIRCARGO_HOMEPKG_DBDIROn success lbexec does not return: its
exit status is that of command. It exits 1 if the
lockbox cannot be set up or command cannot be run.
| September 27, 2026 | mkpkg 1.6.0 |