[gnome-build-meta/abderrahim/toolbox: 2/2] project.conf: add a toolbox-like mode for `bst shell`




commit 13b2a5ae8ad48adf908d68279c2f742574038530
Author: Abderrahim Kitouni <akitouni gnome org>
Date:   Sat Mar 28 15:55:20 2020 +0100

    project.conf: add a toolbox-like mode for `bst shell`

 project.conf | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
---
diff --git a/project.conf b/project.conf
index 51ce632e..5a25ff04 100644
--- a/project.conf
+++ b/project.conf
@@ -32,6 +32,10 @@ options:
     - i686
     - x86_64
     - ppc64le
+  toolbox:
+    type: bool
+    default: false
+    description: mount host resources similar to toolbox
 
 
 # Source aliases.
@@ -181,6 +185,28 @@ shell:
     # Inform applications which use pulseaudio of the server socket
     PULSE_SERVER: 'unix:${XDG_RUNTIME_DIR}/pulse/native'
 
+    (?):
+    - toolbox:
+        COLORTERM: $COLORTERM
+        COLUMNS: $COLUMNS
+        DBUS_SYSTEM_BUS_ADDRESS: $DBUS_SYSTEM_BUS_ADDRESS
+        DESKTOP_SESSION: $DESKTOP_SESSION
+        HOME: $HOME
+        LINES: $LINES
+        SHELL: $SHELL
+        SSH_AUTH_SOCK: $SSH_AUTH_SOCK
+        TERM: $TERM
+        VTE_VERSION: $VTE_VERSION
+        WAYLAND_DISPLAY: $WAYLAND_DISPLAY
+        XDG_CURRENT_DESKTOP: $XDG_CURRENT_DESKTOP
+        XDG_DATA_DIRS: $XDG_DATA_DIRS
+        XDG_MENU_PREFIX: $XDG_MENU_PREFIX
+        XDG_SEAT: $XDG_SEAT
+        XDG_SESSION_DESKTOP: $XDG_SESSION_DESKTOP
+        XDG_SESSION_ID: $XDG_SESSION_ID
+        XDG_SESSION_TYPE: $XDG_SESSION_TYPE
+        XDG_VTNR: $XDG_VTNR
+
   # Some things to mount into the sandbox
   host-files:
   # Understand user inherited uid/gid
@@ -216,6 +242,37 @@ shell:
   - path: '/tmp/.X11-unix'
     optional: true
 
+  (?):
+  - toolbox:
+      host-files:
+        (>):
+        - '/dev'
+        - '$HOME'
+        - /run/dbus/system_bus_socket
+
+        - path: /media
+          optional: true
+        - path: /run/media
+          optional: true
+        - path: /mnt
+          optional: true
+
+        # The following have been copied from toolbox, but I'm not sure how useful
+        # they are without the symlinks that toolbox puts at startup, but whatever
+        - host_path: '$XDG_RUNTIME_DIR/.flatpak-helper/monitor'
+          path: /run/host/monitor
+          optional: true
+        - host_path: /etc
+          path: /run/host/etc
+        - host_path: /run
+          path: /run/host/run
+        - host_path: /tmp
+          path: /run/host/tmp
+        - host_path: /usr
+          path: /run/host/usr
+        - host_path: /var
+          path: /run/host/var
+
 variables:
   branch: master
   branch-nice-name: Nightly #Should be %{branch} if not master


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]