You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by ro...@apache.org on 2020/12/29 13:41:13 UTC

[buildstream] branch juerg/gnome created (now 1912d0e)

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

root pushed a change to branch juerg/gnome
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 1912d0e  sandbox/_sandboxbwrap.py: Bind mount /etc/resolv.conf for bst shell

This branch includes the following new commits:

     new 66956d2  sandbox/_sandboxbwrap.py: Bind mount /etc/passwd for bst shell
     new 1912d0e  sandbox/_sandboxbwrap.py: Bind mount /etc/resolv.conf for bst shell

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[buildstream] 02/02: sandbox/_sandboxbwrap.py: Bind mount /etc/resolv.conf for bst shell

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

root pushed a commit to branch juerg/gnome
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 1912d0e4b80adf2a86869f8099838f38e7407d56
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Thu Feb 8 07:38:43 2018 +0100

    sandbox/_sandboxbwrap.py: Bind mount /etc/resolv.conf for bst shell
    
    Fixes #241
---
 buildstream/sandbox/_sandboxbwrap.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index 75250df..cca597a 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -96,7 +96,9 @@ class SandboxBwrap(Sandbox):
         # complete, root is remounted as RO
         bwrap_command += ["--bind", root_mount_source, "/"]
 
-        if not flags & SandboxFlags.NETWORK_ENABLED:
+        if flags & SandboxFlags.NETWORK_ENABLED:
+            bwrap_command += ['--ro-bind', '/etc/resolv.conf', '/etc/resolv.conf']
+        else:
             bwrap_command += ['--unshare-net']
             bwrap_command += ['--unshare-uts', '--hostname', 'buildstream']
             bwrap_command += ['--unshare-ipc']


[buildstream] 01/02: sandbox/_sandboxbwrap.py: Bind mount /etc/passwd for bst shell

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

root pushed a commit to branch juerg/gnome
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 66956d2065cb1ca9ff2aca2fcb2d558f12365ea4
Author: Jürg Billeter <j...@bitron.ch>
AuthorDate: Thu Feb 8 08:56:56 2018 +0100

    sandbox/_sandboxbwrap.py: Bind mount /etc/passwd for bst shell
---
 buildstream/sandbox/_sandboxbwrap.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/buildstream/sandbox/_sandboxbwrap.py b/buildstream/sandbox/_sandboxbwrap.py
index bb5bd1f..75250df 100644
--- a/buildstream/sandbox/_sandboxbwrap.py
+++ b/buildstream/sandbox/_sandboxbwrap.py
@@ -138,7 +138,10 @@ class SandboxBwrap(Sandbox):
         # Set UID and GUI
         if self.user_ns_available:
             bwrap_command += ['--unshare-user']
-            if not flags & SandboxFlags.INHERIT_UID:
+            if flags & SandboxFlags.INHERIT_UID:
+                bwrap_command += ['--ro-bind', '/etc/passwd', '/etc/passwd']
+                bwrap_command += ['--ro-bind', '/etc/group', '/etc/group']
+            else:
                 bwrap_command += ['--uid', '0', '--gid', '0']
 
         # Add the command