summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJürg Billeter <j@bitron.ch>2020-08-17 16:34:14 +0200
committerJürg Billeter <j@bitron.ch>2020-08-18 14:20:14 +0200
commita3c45e8f94102bbf7104487e62a71bc0ef34da1b (patch)
tree1be181ae26acb24b1d191b7b0b6b8048dd6870ed
parent10e208d0c40ebacc43cc9da2ebaf73c10bbc37da (diff)
downloadbuildstream-juerg/unprivileged-fuse.tar.gz
wip: Support for unprivileged FUSEjuerg/unprivileged-fuse
-rw-r--r--src/buildstream/sandbox/_sandboxbuildboxrun.py3
-rw-r--r--src/buildstream/sandbox/_sandboxreapi.py14
2 files changed, 12 insertions, 5 deletions
diff --git a/src/buildstream/sandbox/_sandboxbuildboxrun.py b/src/buildstream/sandbox/_sandboxbuildboxrun.py
index 3d71b7440..e37483548 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 5c2851580..991678b4d 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)