Expand description
bubblewrap-compatible front end, selected when argv[0] ends in bwrap.
bubblewrap describes a container as an ordered list of operations: bind
mounts, directories, symlinks, generated files, environment edits, and
namespace or capability changes. Without namespaces the description is
materialized instead: a fresh private root directory receives every
--dir, --symlink, --tmpfs and data-file entry, each bind becomes a
Binding (read-only ones flagged), and the options that only make sense
with namespaces are accepted and ignored. The result is an ordinary
Config that the launcher runs like any PRoot invocation.
Known no-ops: every --unshare-*, --share-net, --disable-userns,
--assert-userns-disabled, --userns*, --pidns, --uid, --gid,
--cap-add, --cap-drop, --as-pid-1, --lock-file, --sync-fd,
--block-fd, --userns-block-fd, --exec-label, --file-label,
--mqueue (created as a plain directory), --size, --level-prefix,
--not-a-security-boundary. --hostname is recorded for a future
uname handler. Overlay options are refused.
StructsΒ§
- Op
- One parsed operation: the option, its arguments, and the
--permsmode that applied to it (only for options that create an entry).
ConstantsΒ§
- BWRAP_
VERSION - Version string pressure-vessel and flatpak parse from
bwrap --version. - FLAGS π
- ONE_ARG π
- THREE_
ARGS π - TWO_
ARGS π
FunctionsΒ§
- apply_
ops π - Applies the operations: creates entries under
root, fills bindings and environment. Pure mapping lives inmap_op; this does the filesystem work. - bind π
- ensure_
mount_ πpoint - Creates the mount point for
destinside the fresh root, so listings of the parent show it and lexical path walks find a directory there. - make_
root π - Creates the private root for this launch.
- map_op
- Applies an operation that touches only the configuration (no filesystem work).
- os π
- parse
- Parses bubblewrap-style arguments (without
argv[0]) into a launchable config. - parse_
fd π - parse_
ops - Splits the command line into operations and the command.
- set_
mode π - start_
dir - The directory a launch starts the command in, given which guest paths
are directories of its view:
config.cwdwhere the view has it, and in bwrap mode without--chdir, then$HOMEof the commandβs environment, as bubblewrap goes on to.Noneleaves the command at/. - umask π
- under_
root π - under_
root_ πpath - usage π
- var π
- The value of
namein an environment ofNAME=valueentries. - with_
pwd envwithPWDnamingdir, as bubblewrap exports it once it has entered the directory the command starts in; a program reads its working directory from it, as Protonβs protonfixes does to find the gameβs library.