Bug 23 - Architecture-dependent directory names aren't always quoted as a single arguments to shell commands
Summary: Architecture-dependent directory names aren't always quoted as a single argum...
Status: RESOLVED WONTFIX
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: unspecified
Hardware: x86 ppc
: high normal
Target Milestone: ---
Assignee: Richard Purdie
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2007-07-06 10:48 UTC by Matt Hoosier
Modified: 2010-12-21 06:07 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Hoosier 2007-07-06 10:48:03 UTC
On PPC Macintosh, `uname -m` is "Power Macintosh". It looks like directory paths
which rely on the output of uname to construct architecture-specific names,
aren't always getting quoted when passed to external shell commands. For
example, building gnu-config-native, we get a "cp" command that looks like this:

cp "/Users/matt/poky/meta/packages/gnu-config/gnu-config/gnu-configize.in" \
   "/Users/matt/poky/build/tmp/work/Power" \
   "Macintosh-darwin/gnu-config-native-0.1+cvs20050701-r4/./"

I had a look around in the BitBake sources, but didn't find any explicit uses of
"cp", so I'm not sure about which callsite does this.
Comment 1 Richard Purdie 2007-07-06 14:06:16 UTC
Its from base.bbclass in the unpack task. I think I've committed a fix for this
and a few others but it looks like we have many other call sites which aren't
quoting paths safely. I'll continue to work on this but it could take a while to
find them all. Note that I don't have a machine with a space in "uname -m" so
this is difficult for me to test.
Comment 2 Matt Hoosier 2007-07-06 19:05:01 UTC
This may be a lost cause. Configure scripts created by autoconf often do things
like:

(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work
">72 }

I don't think that will ever work unless $srcdir is double-quoted.
Comment 3 Richard Purdie 2007-07-07 10:02:19 UTC
I think the current approach possibly is a lost cause. I've had to revert the
change to base.bbclass I made since things like 'cp /someplace/*.m4
/someotherplace' don't work if you add in quotes since it disables the shell
expansion.

I was thinking we need to inject quotes at the point the bad paths in question
enter Poky so that things like build/tmp/work/Power Macintosh-darwin/ become
build/tmp/work/"Power Macintosh-darwin"/ to avoid the above problem.

That still leaves the problem of configure and probably other tools failing to
cope with these kind of paths though. It might be possible to substitute the
space out the paths causing problems since they're ones Poky creates although
that might be quite an involved job.
Comment 4 Richard Purdie 2007-08-29 22:45:29 UTC
This is more of a can't fix rather than won't fix since until autotools and
other utils accept spaces in its paths, there is no point in changing bitbake
and the metadata as previously mentioned.
Comment 5 Ross Burton - Disabled 2007-10-30 10:35:41 UTC
Changing OS to OS X 10.x