* [PATCH 0/1] sanity.bbclass: check /bin/sh is dash or bash @ 2015-06-26 6:23 Robert Yang 2015-06-26 6:23 ` [PATCH 1/1] " Robert Yang 0 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2015-06-26 6:23 UTC (permalink / raw) To: openembedded-core The following changes since commit 2587b83faabdc8858e8746201805369ed8d53ba8: wpa-supplicant: Revert "Make SystemD D-Bus config conditional" (2015-06-24 14:03:25 +0100) are available in the git repository at: git://git.openembedded.org/openembedded-core-contrib rbt/sh http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/sh Robert Yang (1): sanity.bbclass: check /bin/sh is dash or bash meta/classes/sanity.bbclass | 4 ++++ 1 file changed, 4 insertions(+) -- 1.7.9.5 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/1] sanity.bbclass: check /bin/sh is dash or bash 2015-06-26 6:23 [PATCH 0/1] sanity.bbclass: check /bin/sh is dash or bash Robert Yang @ 2015-06-26 6:23 ` Robert Yang 2015-06-26 12:47 ` Christopher Larson 2015-06-26 13:10 ` Burton, Ross 0 siblings, 2 replies; 7+ messages in thread From: Robert Yang @ 2015-06-26 6:23 UTC (permalink / raw) To: openembedded-core The build would fail when /bin/sh links to ksh or csh, we only test dash and bash AFAIK. * When /bin/sh -> csh: $ bitbake quilt-native $ bitbake quilt-native -cfetch Illegal variable name. Illegal variable name. [snip] uname: extra operand `2' Try `uname --help' for more information. * When /bin/sh -> ksh: If there are only a few tasks running, for example, "bitbake quilt-native", the build would be OK, but it would fail if we run "bitbake world" for a while, there would be a lot of "Broken pipe" errors: Exception: CalledProcessError: Command 'cd /path/to/xx; find . -type d -print | tar -cf - -C /path/to/sysroot-destdir -p --files-from - --no-recursion | tar -xf - -C /path/to/xxx' 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 [YOCTO #7917] Signed-off-by: Robert Yang <liezhi.yang@windriver.com> --- meta/classes/sanity.bbclass | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass index d9eff90..2855941 100644 --- a/meta/classes/sanity.bbclass +++ b/meta/classes/sanity.bbclass @@ -835,6 +835,10 @@ def check_sanity_everybuild(status, d): if 'vdi' in d.getVar('IMAGE_FSTYPES', True) and 'live' in d.getVar('IMAGE_FSTYPES', True): status.addresult("Error, IMAGE_FSTYPES vdi and live can't be built together\n") + # Check /bin/sh links to dash or bash + real_sh = os.path.realpath('/bin/sh') + if not real_sh.endswith('/dash') and not real_sh.endswith('/bash'): + status.addresult("Error, /bin/sh links to %s, must be dash or bash\n" % real_sh) def check_sanity(sanity_data): class SanityStatus(object): -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: check /bin/sh is dash or bash 2015-06-26 6:23 ` [PATCH 1/1] " Robert Yang @ 2015-06-26 12:47 ` Christopher Larson 2015-06-26 12:56 ` Richard Purdie 2015-06-26 13:10 ` Burton, Ross 1 sibling, 1 reply; 7+ messages in thread From: Christopher Larson @ 2015-06-26 12:47 UTC (permalink / raw) To: Robert Yang; +Cc: Patches and discussions about the oe-core layer [-- Attachment #1: Type: text/plain, Size: 636 bytes --] On Thu, Jun 25, 2015 at 11:23 PM, Robert Yang <liezhi.yang@windriver.com> wrote: > The build would fail when /bin/sh links to ksh or csh, we only test dash > and bash AFAIK. > Hmm, would this break self-hosted builds, as you don’t check for busybox, or am I missing something? Not that I’ve ever done a build like that, other than using the old build appliance, and I don’t know much about how that was built, but maybe someone else knows better than I :) -- Christopher Larson clarson at kergoth dot com Founder - BitBake, OpenEmbedded, OpenZaurus Maintainer - Tslib Senior Software Engineer, Mentor Graphics [-- Attachment #2: Type: text/html, Size: 1029 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: check /bin/sh is dash or bash 2015-06-26 12:47 ` Christopher Larson @ 2015-06-26 12:56 ` Richard Purdie 0 siblings, 0 replies; 7+ messages in thread From: Richard Purdie @ 2015-06-26 12:56 UTC (permalink / raw) To: Christopher Larson; +Cc: Patches and discussions about the oe-core layer On Fri, 2015-06-26 at 05:47 -0700, Christopher Larson wrote: > > On Thu, Jun 25, 2015 at 11:23 PM, Robert Yang > <liezhi.yang@windriver.com> wrote: > The build would fail when /bin/sh links to ksh or csh, we only > test dash > and bash AFAIK. > > Hmm, would this break self-hosted builds, as you don’t check for > busybox, or am I missing something? Not that I’ve ever done a build > like that, other than using the old build appliance, and I don’t know > much about how that was built, but maybe someone else knows better > than I :) I think since that is a "developer" focused image it likely has bash in it so the check will probably work there (since bash has priority over ash). Good thought though. Cheers, Richard ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: check /bin/sh is dash or bash 2015-06-26 6:23 ` [PATCH 1/1] " Robert Yang 2015-06-26 12:47 ` Christopher Larson @ 2015-06-26 13:10 ` Burton, Ross 2015-06-29 3:06 ` Robert Yang 1 sibling, 1 reply; 7+ messages in thread From: Burton, Ross @ 2015-06-26 13:10 UTC (permalink / raw) To: Robert Yang; +Cc: OE-core [-- Attachment #1: Type: text/plain, Size: 472 bytes --] On 26 June 2015 at 07:23, Robert Yang <liezhi.yang@windriver.com> wrote: > The build would fail when /bin/sh links to ksh or csh, we only test dash > and bash AFAIK. > csh definitely isn't a suitable candidate for /bin/sh, and I doubt ksh is too. Are people really doing this? They're just wrong... I seriously doubt Linux would boot with /bin/sh->csh and ksh would be asking for trouble. Was this a real world problem, or a hypothetical problem? Ross [-- Attachment #2: Type: text/html, Size: 958 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: check /bin/sh is dash or bash 2015-06-26 13:10 ` Burton, Ross @ 2015-06-29 3:06 ` Robert Yang 2015-06-29 8:16 ` Robert Yang 0 siblings, 1 reply; 7+ messages in thread From: Robert Yang @ 2015-06-29 3:06 UTC (permalink / raw) To: Burton, Ross; +Cc: OE-core On 06/26/2015 09:10 PM, Burton, Ross wrote: > > On 26 June 2015 at 07:23, Robert Yang <liezhi.yang@windriver.com > <mailto:liezhi.yang@windriver.com>> wrote: > > The build would fail when /bin/sh links to ksh or csh, we only test dash > and bash AFAIK. > > > csh definitely isn't a suitable candidate for /bin/sh, and I doubt ksh is too. > Are people really doing this? They're just wrong... I seriously doubt Linux > would boot with /bin/sh->csh and ksh would be asking for trouble. Hi Ross, Yes, Ubuntu would not boot well when /bin/sh -> ksh or csh, I just took them as an example, I think that we only test on bash or dash, so I think that this checking can reduce the potential errors, and I think that we also need check SHELL, I will test and send another patch. // Robert > > Was this a real world problem, or a hypothetical problem? > > Ross ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/1] sanity.bbclass: check /bin/sh is dash or bash 2015-06-29 3:06 ` Robert Yang @ 2015-06-29 8:16 ` Robert Yang 0 siblings, 0 replies; 7+ messages in thread From: Robert Yang @ 2015-06-29 8:16 UTC (permalink / raw) To: Burton, Ross; +Cc: OE-core On 06/29/2015 11:06 AM, Robert Yang wrote: > > > On 06/26/2015 09:10 PM, Burton, Ross wrote: >> >> On 26 June 2015 at 07:23, Robert Yang <liezhi.yang@windriver.com >> <mailto:liezhi.yang@windriver.com>> wrote: >> >> The build would fail when /bin/sh links to ksh or csh, we only test dash >> and bash AFAIK. >> >> >> csh definitely isn't a suitable candidate for /bin/sh, and I doubt ksh is too. >> Are people really doing this? They're just wrong... I seriously doubt Linux >> would boot with /bin/sh->csh and ksh would be asking for trouble. > > Hi Ross, > > Yes, Ubuntu would not boot well when /bin/sh -> ksh or csh, I just took > them as an example, I think that we only test on bash or dash, so I > think that this checking can reduce the potential errors, and I think > that we also need check SHELL, I will test and send another patch. I confirmed that the build is OK when set SHELL to /bin/ksh or /bin/csh, so we don't have to check SHELL. > > // Robert > >> >> Was this a real world problem, or a hypothetical problem? >> >> Ross ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-06-29 8:16 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2015-06-26 6:23 [PATCH 0/1] sanity.bbclass: check /bin/sh is dash or bash Robert Yang 2015-06-26 6:23 ` [PATCH 1/1] " Robert Yang 2015-06-26 12:47 ` Christopher Larson 2015-06-26 12:56 ` Richard Purdie 2015-06-26 13:10 ` Burton, Ross 2015-06-29 3:06 ` Robert Yang 2015-06-29 8:16 ` Robert Yang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox