commit 9802928c077e10b3a8389ea8fa91038e83abd373 parent 6cdfb15850547d49c32edcf3ae840f65eda7fbc6 Author: Jan Pobrislo <ccx@te2000.cz> Date: Wed, 26 Nov 2025 04:02:38 +0000 prototype generic sandbox Diffstat:
| M | command/pthbs-build | | | 2 | ++ |
| M | command/pthbs-setup-gen.awk | | | 8 | ++++++++ |
2 files changed, 10 insertions(+), 0 deletions(-)
diff --git a/command/pthbs-build b/command/pthbs-build @@ -126,6 +126,8 @@ case "$pthbs_sandbox" in (user) (userns) sandbox_mode=userns;; + (generic) + sandbox_mode=generic;; ('') if test -n "$sandbox_cmd"; then printf '%s\n' >&2 "$0: fatal: pthbs_sandbox defines command but no mode" diff --git a/command/pthbs-setup-gen.awk b/command/pthbs-setup-gen.awk @@ -115,6 +115,14 @@ function sandbox( s) { s = s" -w "q("/dev") s = s" -w "q("/proc") return s + } else if(sandbox_mode == "generic") { + s = "env" + s = s" sandbox_pthbs_versions="q(ENVIRON["pthbs_versions"]) + s = s" sandbox_pthbs_workdir="q(ENVIRON["pthbs_workdir"]) + s = s" sandbox_pthbs_pkgdir="q(ENVIRON["pthbs_pkgdir"]) + s = s" sandbox_workdir="q(ENVIRON["workdir"]) + s = s" sandbox_envdir="q(ENVIRON["envdir"]) + return s" "q(ENVIRON["sandbox_cmd"]) } fatal("unrecognized sanbox_mode " sandbox_mode) }