generic-poky/bitbake/lib/bb
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
..
fetch2 bitbake: fetch2/__init__: Disable pseudo in runfetchcmd() 2018-07-02 11:56:15 +01:00
parse bitbake: ConfHandler: Use the same regular expression for all variable names 2017-03-13 09:43:40 +00:00
pysh bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
server bitbake: bb/server/process.py: ProcessEventQueue add close of _writer pipe 2017-01-23 22:38:49 +00:00
tests bitbake: tests/fetch: handle network failures gracefully 2017-11-05 22:37:29 +00:00
ui bitbake: bitbake: Fix return value checks from subprocess.call()'s 2017-11-05 22:37:29 +00:00
COW.py bitbake: COW.py: fix sample codes 2016-11-23 10:59:56 +00:00
__init__.py bitbake: bitbake: Update version to 1.34.0 for stable release 2017-04-19 10:42:12 +01:00
build.py bitbake: lib/bb/build: add tasksbetween() function 2017-02-07 14:36:01 +00:00
cache.py bitbake: cache: prevent division-by-zero in load_cahefile() 2017-04-11 18:05:09 +01:00
cache_extra.py bitbake: bitbake: cooker: get extra information from recipe cache 2013-09-22 12:19:44 +01:00
checksum.py bitbake: lib/bb/checksum: avoid exception on broken symlinks 2016-07-29 09:53:32 +01:00
codeparser.py bitbake: codeparser: add some comments 2017-04-05 23:19:17 +01:00
command.py bitbake: cooker: add BB_CMDLINE to enable access to UI command line with memres 2017-09-21 17:20:11 +01:00
compat.py bitbake: compat/server/utils: Jettison pre python 2.7.3 workarounds 2013-06-14 17:26:30 +01:00
cooker.py bitbake: cooker: add BB_CMDLINE to enable access to UI command line with memres 2017-09-21 17:20:11 +01:00
cookerdata.py bitbake: cooker: add BB_CMDLINE to enable access to UI command line with memres 2017-09-21 17:20:11 +01:00
daemonize.py bitbake: daemonize/prserv/tests/fetch: Convert file() -> open() 2016-05-13 13:41:32 +01:00
data.py bitbake: lib/bb/{data, siggen}: Don't warn on SkipRecipe exceptions 2017-04-12 15:16:05 +01:00
data_smart.py bitbake: data_smart: Ensure _remove operations on newly set variables are cleared 2017-04-12 15:09:58 +01:00
event.py bitbake: event/ast: Add RecipeTaskPreProcess event before task finalisation 2017-01-20 11:52:52 +00:00
exceptions.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
main.py bitbake: main: Improve -v and -D option documentation 2017-03-27 20:23:19 +01:00
methodpool.py bitbake: event/utils/methodpool: Add a cache of compiled code objects 2015-12-22 00:02:05 +00:00
monitordisk.py bitbake: monitordisk: add event 2016-12-07 10:42:22 +00:00
msg.py bitbake: lib/bb/msg: introduce logger_create() function 2017-03-27 20:23:19 +01:00
namedtuple_with_abc.py bitbake: lib/bb/*.py: Typo fixes/grammar/comment fixes, nothing functional. 2014-08-25 08:57:45 +01:00
persist_data.py bitbake: prserv/persist_data/utils: Drop obsolete python2 imports 2017-01-09 13:39:13 +00:00
process.py bitbake: process: stop bb.process.communicate mixing bytes and str return types 2017-03-01 11:16:07 +00:00
progress.py bitbake: lib/bb/progress: avoid possibility of start event being reported twice 2016-07-26 08:10:35 +01:00
providers.py bitbake: providers: Fix determinism issue 2018-03-09 06:12:09 -08:00
remotedata.py bitbake: remotedata: enable transporting datastore from the client to the server 2016-12-14 12:25:07 +00:00
runqueue.py bitbake: runqueue: Allow recrdeptask not to exist for all recipes 2017-04-10 23:00:32 +01:00
shell.py Introduce new param caches_array into Cache impl. 2011-06-07 22:39:52 +01:00
siggen.py bitbake: siggen: Make calc_taskhash match get_taskhash for file checksums 2017-06-27 13:46:50 +01:00
taskdata.py bitbake: taskdata.py: include more information in error message about broken task depends 2017-03-22 11:35:22 +00:00
tinfoil.py bitbake: tinfoil: improve get_recipe_file() exception text 2017-03-31 10:08:35 +01:00
utils.py bitbake: bitbake: Fix return value checks from subprocess.call()'s 2017-11-05 22:37:29 +00:00