You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/11/03 10:29:33 UTC

[buildstream] 04/04: script plugin: Expose create-dev-shm configuration

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/bst-1/bwrap-dev-shm
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 2e59d08c68e8a7d07bfa17b399cf27faa5d44d5c
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Wed Nov 3 19:09:53 2021 +0900

    script plugin: Expose create-dev-shm configuration
    
    Use this to configure the base class to use the CREATE_DEV_SHM
    sandbox flag when running commands.
---
 buildstream/plugins/elements/script.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/buildstream/plugins/elements/script.py b/buildstream/plugins/elements/script.py
index 4e422c5..2b03cb5 100644
--- a/buildstream/plugins/elements/script.py
+++ b/buildstream/plugins/elements/script.py
@@ -49,7 +49,7 @@ class ScriptElement(buildstream.ScriptElement):
             self.layout_add(elm, dst)
 
         self.node_validate(node, [
-            'commands', 'root-read-only', 'layout'
+            'commands', 'root-read-only', 'layout', 'create-dev-shm'
         ])
 
         cmds = self.node_subst_list(node, "commands")
@@ -59,6 +59,8 @@ class ScriptElement(buildstream.ScriptElement):
         self.set_install_root()
         self.set_root_read_only(self.node_get_member(node, bool,
                                                      'root-read-only', False))
+        self.set_create_dev_shm(self.node_get_member(node, bool,
+                                                     'create-dev-shm', False))
 
 
 # Plugin entry point