Bug 7917 - sanity.bbclass: check /bin/sh is dash or bash
Summary: sanity.bbclass: check /bin/sh is dash or bash
Status: VERIFIED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: core (show other bugs)
Version: 1.9
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.9 M3
Assignee: Robert Yang
QA Contact: Bogdan Alexandru Voiculescu
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2015-06-23 02:40 UTC by Robert Yang
Modified: 2015-09-15 12:52 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Yang 2015-06-23 02:40:58 UTC
We only support bash or dash, otherwise build failed.
Comment 1 Richard Purdie 2015-06-25 14:41:02 UTC
Which shell are you seeing failed builds with?
Comment 2 Robert Yang 2015-06-26 05:29:27 UTC
(In reply to comment #1)
> Which shell are you seeing failed builds with?

For example, when /bin/sh -> ksh, all the do_packagedata and do_populate_sysroot would be failed:

File: '/buildarea/lyang1/poky/meta/lib/oe/path.py', lineno: 146, function: check_output
     0142:    if retcode:
     0143:        cmd = kwargs.get("args")
     0144:        if cmd is None:
     0145:            cmd = popenargs[0]
 *** 0146:        raise CalledProcessError(retcode, cmd, output=output)
     0147:    return output
     0148:
     0149:def find(dir, **walkoptions):
     0150:    """ Given a directory, recurses into that directory,
Exception: CalledProcessError: Command 'cd /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/lib32-xf86driproto/1_2.1.1-r0/pkgdata; find . -type d -print | tar -cf - -C /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/lib32-xf86driproto/1_2.1.1-r0/pkgdata -p --files-from - --no-recursion | tar -xf - -C /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/
lib32-xf86driproto/1_2.1.1-r0/sstate-build-packagedata/pkgdata' returned non-zero exit status 2 with output tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: `standard output': Broken pipe
find: write error
Comment 3 Robert Yang 2015-06-26 05:41:35 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > Which shell are you seeing failed builds with?
> 
> For example, when /bin/sh -> ksh, all the do_packagedata and
> do_populate_sysroot would be failed:


Sorry, it works well if we build the recipe one by one, but it would fail with a lot of "Broken pipe" error when we run bitbake world for a while:

Exception: CalledProcessError: Command 'cd /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/lib32-libpciaccess/0.13.3-r0/sysroot-destdir; find . -type d -print | tar -cf - -C /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/lib32-libpciaccess/0.13.3-r0/sysroot-destdir -p --files-from - --no-recursion | tar -xf - -C /buildarea/lyang1/t_clutter/tmp/sysroots/lib32-qemux86-64' returned non-zero exit status 2 with output tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: `standard output': Broken pipe
find: write error

// Robert

> 
> File: '/buildarea/lyang1/poky/meta/lib/oe/path.py', lineno: 146, function:
> check_output
>      0142:    if retcode:
>      0143:        cmd = kwargs.get("args")
>      0144:        if cmd is None:
>      0145:            cmd = popenargs[0]
>  *** 0146:        raise CalledProcessError(retcode, cmd, output=output)
>      0147:    return output
>      0148:
>      0149:def find(dir, **walkoptions):
>      0150:    """ Given a directory, recurses into that directory,
> Exception: CalledProcessError: Command 'cd
> /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/lib32-
> xf86driproto/1_2.1.1-r0/pkgdata; find . -type d -print | tar -cf - -C
> /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/lib32-
> xf86driproto/1_2.1.1-r0/pkgdata -p --files-from - --no-recursion | tar -xf -
> -C /buildarea/lyang1/t_clutter/tmp/work/x86-pokymllib32-linux/
> lib32-xf86driproto/1_2.1.1-r0/sstate-build-packagedata/pkgdata' returned
> non-zero exit status 2 with output tar: This does not look like a tar archive
> tar: Exiting with failure status due to previous errors
> find: `standard output': Broken pipe
> find: write error
Comment 5 Bogdan Alexandru Voiculescu 2015-09-15 12:52:35 UTC
verified on master ea562de57590c966cd5a75fda8defecd397e6436

bvoiculescu@vhangan-PC:~/yocto/poky/build$ bitbake world
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

    Error, /bin/sh links to /bin/ksh93, must be dash or bash


Summary: There was 1 ERROR message shown, returning a non-zero exit code.
bvoiculescu@vhangan-PC:~/yocto/poky/build$ ls -ila /bin/sh
8650756 lrwxrwxrwx 1 root root 3 sep 15 15:48 /bin/sh -> ksh