You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by no...@apache.org on 2020/12/29 12:47:16 UTC
[buildstream] 01/01: wip: Support for unprivileged FUSE
This is an automated email from the ASF dual-hosted git repository.
not-in-ldap pushed a commit to branch juerg/unprivileged-fuse
in repository https://gitbox.apache.org/repos/asf/buildstream.git
commit a3c45e8f94102bbf7104487e62a71bc0ef34da1b
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Mon Aug 17 16:34:14 2020 +0200
wip: Support for unprivileged FUSE
---
src/buildstream/sandbox/_sandboxbuildboxrun.py | 3 ++-
src/buildstream/sandbox/_sandboxreapi.py | 14 ++++++++++----
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/src/buildstream/sandbox/_sandboxbuildboxrun.py b/src/buildstream/sandbox/_sandboxbuildboxrun.py
index 3d71b74..e374835 100644
--- a/src/buildstream/sandbox/_sandboxbuildboxrun.py
+++ b/src/buildstream/sandbox/_sandboxbuildboxrun.py
@@ -95,7 +95,8 @@ class SandboxBuildBoxRun(SandboxREAPI):
buildbox_command = [
utils.get_host_tool("buildbox-run"),
- "--use-localcas",
+ "--verbose",
+ "--local={}".format(cascache.casdir),
"--remote={}".format(casd_process_manager._connection_string),
"--action={}".format(action_file.name),
"--action-result={}".format(result_file.name),
diff --git a/src/buildstream/sandbox/_sandboxreapi.py b/src/buildstream/sandbox/_sandboxreapi.py
index 5c28515..991678b 100644
--- a/src/buildstream/sandbox/_sandboxreapi.py
+++ b/src/buildstream/sandbox/_sandboxreapi.py
@@ -93,6 +93,9 @@ class SandboxREAPI(Sandbox):
# The whole sandbox is writable
read_write_directories = [os.path.sep]
+ # TEMP
+ read_write_directories = [os.path.sep]
+
# Generate Action proto
input_root_digest = vdir._get_digest()
command_proto = self._create_command(command, cwd, env, read_write_directories, flags)
@@ -184,11 +187,14 @@ class SandboxREAPI(Sandbox):
root_directory = tree.root.SerializeToString()
dir_digest = utils._message_digest(root_directory)
- # Create a normalized absolute path (inside the input tree)
- path = os.path.normpath(os.path.join(working_directory, output_directory.path))
+ if False:
+ # Create a normalized absolute path (inside the input tree)
+ path = os.path.normpath(os.path.join(working_directory, output_directory.path))
- # Get virtual directory at the path of the output directory
- vsubdir = vdir.descend(*path.split(os.path.sep), create=True)
+ # Get virtual directory at the path of the output directory
+ vsubdir = vdir.descend(*path.split(os.path.sep), create=True)
+ else:
+ vsubdir = vdir
# Replace contents with returned output
vsubdir._reset(digest=dir_digest)