generic-poky/bitbake/lib
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
..
bb bitbake: fetch2/__init__: Disable pseudo in runfetchcmd() 2018-07-02 11:56:15 +01:00
bblayers bitbake: bitbake-layers: fix layerindex-fetch for Python 3 2017-03-22 11:35:22 +00:00
bs4 bitbake: lib/bs4: Fix imports from html5lib >= 0.9999999/1.0b8 2016-12-07 10:43:20 +00:00
ply bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
progressbar bitbake: lib: implement basic task progress support 2016-07-08 09:57:26 +01:00
prserv bitbake: prserv/persist_data/utils: Drop obsolete python2 imports 2017-01-09 13:39:13 +00:00
simplediff bitbake: lib/bb/siggen: show word-diff for single-line values containing spaces 2017-04-10 23:00:32 +01:00
toaster bitbake: toaster: allow dots in user path names 2017-11-05 22:41:27 +00:00
codegen.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
pyinotify.py bitbake: bitbake/pyinotify.py: Upgrade to py3 version 2016-06-02 08:24:02 +01:00