generic-poky/bitbake/lib/bb/fetch2
Peter Kjellerstedt 604d82bc0e bitbake: fetch2/__init__: Disable pseudo in runfetchcmd()
If a fetcher, e.g., git, is run when pseudo is active it will think it
is running as root. If it in turn uses ssh (as git does), ssh too will
think it is running as root. This will cause it to try to read root's
ssh configuration from /root/.ssh which will fail. If ssh then needs to
ask for credentials it will hang indefinitely as there is nowhere for it
to ask the user for them (and even if there was it would not access the
correct private keys).

The solution to the above is to temporarily disable pseudo while
executing any fetcher commands. There should be no reason for them to be
executed under pseudo anyway so this should not be a problem.

RP Ammendum:

We finally did get more information about how to reproduce this problem,
something needs to trigger bb.fetch2.get_srcrev() in a pseudo context,
for example when AUTOREV is in use or the recipe doesn't have a defined
SRCREV. That SRC_URI needs to be using protocol=ssh. This would trigger
an ls-remote of the remote repo and if that happens under pseudo, the
wrong ssh credentials may be attempted which can hang.

[YOCTO #12464]

(Bitbake rev: 5d42dce5e612060f4181c14e1cfdec2388bb7adf)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-02 11:56:15 +01:00
..
__init__.py bitbake: fetch2/__init__: Disable pseudo in runfetchcmd() 2018-07-02 11:56:15 +01:00
bzr.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
clearcase.py bitbake: fetch2: fix import error for Python 3.6.5 2018-07-02 11:44:05 +01:00
cvs.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
git.py bitbake: Replace deprecated git branch parameter "--set-upstream" 2017-11-05 22:37:29 +00:00
gitannex.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
gitsm.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
hg.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
local.py bitbake: fetch/local: Drop FILESDIR 2017-04-05 23:20:03 +01:00
npm.py bitbake: fetch2: fix import error for Python 3.6.5 2018-07-02 11:44:05 +01:00
osc.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
perforce.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
repo.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
s3.py bitbake: s3.py: Remove hardcoded aws 2017-03-30 10:42:18 +01:00
sftp.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
ssh.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
svn.py bitbake: fetch2: don't use deprecated bb.data APIs 2017-03-01 11:16:07 +00:00
wget.py bitbake: wget: Fix handling of urls with user/password 2017-03-31 10:08:36 +01:00