summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/fetch2
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2016-05-25 10:20:37 +1200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-06-02 21:14:31 +0100
commit829706d3c5f10883a7ff2b81983dea805d44f412 (patch)
tree6d3ee567502afc3bf10fa08a302d2cac4791969d /bitbake/lib/bb/fetch2
parentda4bfbef46e52d2b647a837a47d0f5cb813ba8b2 (diff)
downloadpoky-829706d3c5f10883a7ff2b81983dea805d44f412.tar.gz
bitbake: 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). >From bitbake master rev: 20ad1ea87712d042bd5d89ce1957793f7ff71da0 (Bitbake rev: 26379ff2b686313c82af87a3a35b47adbc0183be) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/fetch2')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 1fa67020c4..e8fbe89a3a 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -807,13 +807,14 @@ def runfetchcmd(cmd, d, quiet=False, cleanup=None):
807 'GIT_SSL_CAINFO', 807 'GIT_SSL_CAINFO',
808 'GIT_SMART_HTTP', 808 'GIT_SMART_HTTP',
809 'SSH_AUTH_SOCK', 'SSH_AGENT_PID', 809 'SSH_AUTH_SOCK', 'SSH_AGENT_PID',
810 'SOCKS5_USER', 'SOCKS5_PASSWD'] 810 'SOCKS5_USER', 'SOCKS5_PASSWD',
811 'DBUS_SESSION_BUS_ADDRESS']
811 812
812 if not cleanup: 813 if not cleanup:
813 cleanup = [] 814 cleanup = []
814 815
815 for var in exportvars: 816 for var in exportvars:
816 val = d.getVar(var, True) 817 val = d.getVar(var, True) or d.getVar("BB_ORIGENV", False).getVar(var, True)
817 if val: 818 if val:
818 cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd) 819 cmd = 'export ' + var + '=\"%s\"; %s' % (val, cmd)
819 820