| git.druid.rocks | index | druid520 | mp | docs/ | reference/ | mpx-conf-example.btft |
docs/reference/mpx-conf-example.btft
[table class="topnav"]
[tr]
[td class="logotab"]mp[e]
[td][see name="index"]index[e][e]
[td][see name="guide/index"]guide[e][e]
[td][see name="reference/index"]reference[e][e]
[e]
[e]
[h1]mpx.conf.example[e]
[quote class="note"]
generated from mpx.conf.example -- do not edit this page directly, edit that file and regenerate ("mk . d" / "sh mk/d.sh") instead. see [see name="reference/config"]reference/config[e] for the narrative tour this page doesn't replace.
[e]
system-wide mpx (backend) config, read from /etc/mpx.conf. unknown keys are ignored. unlike mp.conf, every value here must be quoted: KEY="value", not KEY=value.
every key below can also be set per-package, in a "<name>:" section (name may itself contain a colon, e.g. a slotted "gcc:12:" -- the section delimiter is always the LAST colon on the line) whose indented lines override the global value for just that one package, exactly like mp.conf's own per-package sections:
[code]
JOBS="2" # global default
[e]
[code]
gcc:12:
JOBS="8" # gcc:12 alone builds with -j8, everything else -j2
[e]
the package name mp passes to mpx for this lookup is its canonical name (SLOT-qualified where applicable), matching what "mp why"/"mp tree"/db entries use -- e.g. "gcc:12", or just "gcc" when unslotted.
shell used to run every add.sh/del.sh, always invoked as "$SHELL -e script" regardless of the script's own shebang or set -e.
[code]
SHELL="/bin/sh"
[e]
[h2]build target[e]
build target. "native" (the default, same as leaving this unset) builds every port for the host it runs on with no extra flags. set it to another os name (e.g. "netbsd") to cross-build the whole tree for that target; runsh exports it to every add.sh/del.sh as MP_TARGET, so a script that genuinely needs to branch on target os can check $MP_TARGET.
[code]
TARGET="native"
[e]
[h2]cross toolchain, only used when TARGET is not "native"[e]
cross toolchain, only used when TARGET is not "native". each one, if non-empty, is exported verbatim as the like-named env var (CC/AR/RANLIB/ STRIP) so configure/make/cmake pick it up the normal way.
[code]
TARGET_CC=""
TARGET_AR=""
TARGET_RANLIB=""
TARGET_STRIP=""
[e]
autoconf host triple, exported as MP_HOST for add.sh scripts that pass --host="$MP_HOST" to their own ./configure.
[code]
TARGET_HOST=""
[e]
[h2]sysroot for the target[e]
sysroot for the target. when set, its path is exported as MP_SYSROOT and --sysroot=$TARGET_SYSROOT is appended to CFLAGS and LDFLAGS automatically. also exported as QEMU_LD_PREFIX (qemu-user's own env var for "where to find the target's dynamic linker/shared libs", identical to its -L flag): a cross-built check: phase's test binaries are for the TARGET architecture, not this host's, so actually running them (RUN_TESTS=yes) needs qemu-user set up to transparently emulate them. that means the HOST has qemu-user-binfmt configured for the target architecture (e.g. Debian/Alpine's qemu-user-binfmt package, or equivalent) -- mpx does not register this itself, the same way a host-provided git/shell already are relied on rather than managed. once that's in place, QEMU_LD_PREFIX is what makes the transparently-emulated binaries find their real target libraries instead of failing against the host's.
[code]
TARGET_SYSROOT=""
[e]
[h2]build parallelism[e]
build parallelism. leave unset (or empty) to auto-detect the number of online cpu cores; set to a positive integer to pin it (e.g. "6" for a 6-core machine). runsh exports it to every add.sh/del.sh as MP_JOBS and sets/appends "-jN" to MAKEFLAGS, so any make invocation without its own explicit -j flag parallelizes automatically.
[code]
JOBS=""
[e]
[code]
IMPORT=<path> <path> ... (global scope only -- inside a "<name>:"
[e]
section it's just an ordinary per-package key, not expanded) pulls in additional files, parsed as if their content were appended to this one. not recursive: an imported file's own IMPORT= line (if it has one) is inert. this file's own content always wins over anything it imports, and among the imports themselves a LATER entry wins over an earlier one -- same "later wins" precedence as mp.conf's OVERLAYS=:
[code]
IMPORT=/etc/mpx-common.conf /etc/mpx-local.conf
[e]
a named file that doesn't exist is silently skipped (same tolerance mpx.conf's own possible absence already gets); one that exists but is too large to fit is ALSO skipped whole, never silently truncated. up to 16 imports. useful for splitting a large per-package section list (many packages' own JOBS/SANDBOX/TARGET_* overrides) out of the main file, or for a config management tool to drop its own generated file in without editing this one by hand.
[code]
IMPORT=/etc/mpx.conf.d/local.conf
[e]
sandbox each build/check/install/remove phase (never fetch, which needs real network, and never a legacy add.sh/del.sh port, whose one script may embed its own fetch) in a fresh network + mount namespace: only loopback is reachable, and the whole filesystem is read-only except the port's own stage dir and the install prefix. linux only (a no-op elsewhere); this is deliberately lightweight -- no separate rootfs, no copying, just a few syscalls, not a portage-style syscall interceptor -- so it's defense in depth, not a hard security boundary: a setup failure warns and falls back to running unsandboxed rather than aborting the build. default "yes"; set "no" to disable globally, or per-package in a "<name>:" section like any other key here.
[code]
SANDBOX="yes"
[e]