[gnome-build-meta] project.conf: Don't inherit rarely set env-vars in shell's toolbox mode



commit 9799e19f2ac0e64c8dec3ff769369a5aefbcabe8
Author: vanadiae <vanadiae35 gmail com>
Date:   Sat Jan 9 19:01:55 2021 +0100

    project.conf: Don't inherit rarely set env-vars in shell's toolbox mode
    
    When one of those environment variables wasn't set at all on the host,
    it would be set i.e. for DBUS_SYSTEM_BUS_ADDRESS, its value will be
    $DBUS_SYSTEM_BUS_ADDRESS in the buildstream shell, instead of being left
    unset (where the default as per the DBus spec would be choosen instead
    if left unset).
    
    So this commit gathers potentially problematic environment variables
    together, comments them and add a comment for people reading this so
    it can still be inherited if needed in this set-up.

 project.conf | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/project.conf b/project.conf
index 5a25ff04..4bf36122 100644
--- a/project.conf
+++ b/project.conf
@@ -189,7 +189,6 @@ shell:
     - toolbox:
         COLORTERM: $COLORTERM
         COLUMNS: $COLUMNS
-        DBUS_SYSTEM_BUS_ADDRESS: $DBUS_SYSTEM_BUS_ADDRESS
         DESKTOP_SESSION: $DESKTOP_SESSION
         HOME: $HOME
         LINES: $LINES
@@ -201,11 +200,19 @@ shell:
         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
+
+        # Those are some environment variables that aren't always present in a
+        # stock GNOME, and so might be left unset but would be equal to literally
+        # $FOO which could lead to problems (i.e. DBus's system bus is broken
+        # doesn't work in most apps otherwise as it's not a valid dbus bus path).
+        # If your system set-up is atypical, you can uncomment some of them.
+
+        # DBUS_SYSTEM_BUS_ADDRESS: $DBUS_SYSTEM_BUS_ADDRESS
+        # XDG_SESSION_ID: $XDG_SESSION_ID
+        # XDG_SEAT: $XDG_SEAT
+        # XDG_VTNR: $XDG_VTNR
 
   # Some things to mount into the sandbox
   host-files:


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