commit 1c067b19b7c431f8edbd48b38b33812f513ffac3
parent cca30e14c31a024fc786ee063e8fd93586b5254e
Author: ccx <ccx@te2000.cz>
Date: Thu, 17 Oct 2024 03:43:27 +0000
Put sandbox files in separate directory
Diffstat:
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/command/pthbs-build b/command/pthbs-build
@@ -207,7 +207,7 @@ function at_filehash(hash_type, file_hash, dst, dstdir){
sandbox_cmd=sandbox_cmd " -m " q("allow/read+/bin/***")
sandbox_cmd=sandbox_cmd " -munshare/net:1 -munshare/ipc:1"
} else if(sandbox_mode == "userns") {
- sandbox_cmd=" "q(ENVIRON["basedir"]"/ns_sandbox.py")" --mode=userns"
+ sandbox_cmd=" "q(ENVIRON["pthbs"]"/sandbox/ns_sandbox.py")" --mode=userns"
sandbox_cmd=sandbox_cmd" --extra-mount=tmpfs:"q(ENVIRON["pthbs_workdir"])
sandbox_cmd=sandbox_cmd" --extra-mount=ro_bind:"q(ENVIRON["pthbs_pkgdir"]":"ENVIRON["pthbs_pkgdir"])
sandbox_cmd=sandbox_cmd" --extra-mount=rw_bind:"q(ENVIRON["workdir"]":"ENVIRON["workdir"])
@@ -215,8 +215,8 @@ function at_filehash(hash_type, file_hash, dst, dstdir){
sandbox_cmd=sandbox_cmd" -- "q(ENVIRON["pthbs_workdir"]"/root")
printf "%s\n", "mkdir -p "q(ENVIRON["workdir"]"/.tmp")
} else if(sandbox_mode == "root") {
- sandbox_cmd=" "q(ENVIRON["pthbs_workdir"]"/venv/bin/python")" "q(ENVIRON["basedir"]"/ns_sandbox.py")" --mode=root"
- sandbox_cmd=sandbox_cmd" --untar="q(ENVIRON["basedir"]"/root.tar")
+ sandbox_cmd=" "q(ENVIRON["pthbs_workdir"]"/venv/bin/python")" "q(ENVIRON["pthbs"]"/sandbox/ns_sandbox.py")" --mode=root"
+ sandbox_cmd=sandbox_cmd" --untar="q(ENVIRON["pthbs"]"/sandbox/root.tar")
sandbox_cmd=sandbox_cmd" --chdir="q(ENVIRON["workdir"])
sandbox_cmd=sandbox_cmd" --extra-mount=tmpfs:"q(ENVIRON["pthbs_workdir"])
sandbox_cmd=sandbox_cmd" --extra-mount=ro_bind:"q(ENVIRON["pthbs_pkgdir"]":"ENVIRON["pthbs_pkgdir"])
diff --git a/ns_sandbox.py b/sandbox/ns_sandbox.py