[bitbake-devel] [PATCH 1/1] bitbake: Disable pseudo in runfetchcmd()

Olof Johansson olof.johansson at axis.com
Thu Mar 20 15:03:45 UTC 2014


On 14-02-22 12:24 +0100, Richard Purdie wrote:
> On Thu, 2014-02-20 at 15:55 +0100, Peter Kjellerstedt wrote:
> > 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.
> > 
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt at axis.com>
> > ---
> >  bitbake/lib/bb/fetch2/__init__.py | 3 +++
> >  1 file changed, 3 insertions(+)

I work with Peter, and I'm seeing this issue as well. Sorry for
the delay in response.

> I'm more than a little concerned about why pseudo is active during
> do_patch. It shouldn't be. Are you doing anything different with pseudo
> in your build?

No, not as far as I know. This is the output I'm seeing
currently, where I temporarily replaced "git" with a small shell
script that runs whoami and exits with failure (normally, it
would just hang at this point) (somewhat trimmed for brevity):


....
DEBUG: Starting bitbake-worker
DEBUG: Using cache in '/oe/master/build/cache/bb_codeparser.dat'
ERROR: Failure expanding variable do_patch: ExpansionError: Failure expanding variable do_patch, expression was         cd /oe/master/build/tmp/work/p3367-poky-linux/linux-porky/3.10+axis12-r4.1.1/linux
        export KMETA=${KMETA}

        # if kernel tools are available in-tree, they are preferred
        # and are placed on the path before any external tools. Unless
        # the external tools flag is set, in that case we do nothing.
        if [ -f "/oe/master/build/tmp/work/p3367-poky-linux/linux-porky/3.10+axis12-r4.1.1/linux/scripts/util/configme" ]; then
                if [ -z "${EXTERNAL_KERNEL_TOOLS}" ]; then
                        PATH=/oe/master/build/tmp/work/p3367-poky-linux/linux-porky/3.10+axis12-r4.1.1/linux/scripts/util:/oe/master/scripts:/oe/master/build/tmp/sysroots/x86_64-linux/usr/bin/mipsel-nf-poky-linux:/oe/master/build/tmp/sysroots/p3367/usr/bin/crossscripts:/oe/master/build/tmp/sysroots/x86_64-linux/usr/sbin:/oe/master/build/tmp/sysroots/x86_64-linux/usr/bin:/oe/master/build/tmp/sysroots/x86_64-linux/sbin:/oe/master/build/tmp/sysroots/x86_64-linux/bin:/oe/master/scripts:/oe/master/bitbake/bin:/home/olofjn/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/var/cfengine/bin:/usr/local/mipsisa32r2el/r23/bin
                fi
        fi

        machine_branch="${@ get_machine_branch(d, "master" )}"

        # ...
        # trimmed down output
        # ...
 which triggered exception FetchError: Fetcher failure: Fetch command failed with exit code 1, output:
+ whoami
+ : whoami = root
+ id
+ : id = uid=0(root) gid=0(root) groups=0(root)
+ exit 1

ERROR: Task 100 (/oe/master/meta-porky/recipes-kernel/linux/linux-porky_3.10.bb, do_package_write_rpm) failed with exit code '1'


Note that bitbake complains about do_patch, but the executed task
is actually do_package_write_rpm. I'm not sure what this means.

Any ideas?

-- 
olofjn



More information about the bitbake-devel mailing list