[oe-commits] [bitbake] 01/01: fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication agents

git at git.openembedded.org git at git.openembedded.org
Tue Apr 26 10:29:25 UTC 2016


rpurdie pushed a commit to branch master-next
in repository bitbake.

commit 20ad1ea87712d042bd5d89ce1957793f7ff71da0
Author: Ross Burton <ross.burton at intel.com>
AuthorDate: Fri Apr 22 16:56:50 2016 +0100

    fetch2: export DBUS_SESSION_BUS_ADDRESS to support authentication agents
    
    Some users may want to use authenticated SSH connections with credentials stored
    in a keyring, such as gnome-keyring.  These typically need a DBus session bus
    connection, so pass DBUS_SESSION_BUS_ADDRESS into the fetcher environment.
    
    To avoid the user needing to set it in their local.conf (which wouldn't be
    usable) or adding it to the environment-cleansing whitelist (which would
    potentially impact builds) allow the variables being passed to the fetchers to
    come from the data store (first) or the original environment (second).
    
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
 lib/bb/fetch2/__init__.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/bb/fetch2/__init__.py b/lib/bb/fetch2/__init__.py
index 1fa6702..e8fbe89 100644
--- a/lib/bb/fetch2/__init__.py
+++ b/lib/bb/fetch2/__init__.py
@@ -807,13 +807,14 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None):
                   'GIT_SSL_CAINFO',
                   'GIT_SMART_HTTP',
                   'SSH_AUTH_SOCK', 'SSH_AGENT_PID',
-                  'SOCKS5_USER', 'SOCKS5_PASSWD']
+                  'SOCKS5_USER', 'SOCKS5_PASSWD',
+                  'DBUS_SESSION_BUS_ADDRESS']
 
     if not cleanup:
         cleanup = []
 
     for var in exportvars:
-        val = d.getVar(var, True)
+        val = d.getVar(var, True) or d.getVar("BB_ORIGENV", False).getVar(var, True)
         if val:
             cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list