populate_sdk_base, adt_installer: abort install if path contains spaces

Spaces are not handled properly in some parts of oe-core and it's safer
to abort toolchain installation if path contains spaces. Even though
we fix space handling in the toolchain installation script, there are
various other parts in the toolchain (perl scripts, sysroot path passed to
toolchain binaries, shebang lines) that would need special handling. So,
for now, just bail out if path contains spaces.

The checking for spaces in the path is done after expanding relative
paths to absolute and tilde conversion.

[YOCTO #4488]

(From OE-Core master rev: 8c35ba2d3048ce69f74f72cb2676e4bc162cfb63)

(From OE-Core rev: 407e57879ea2f931bff32993b850c9d59d228303)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk_base: fix bashism

Only the printf bash builtin knows about %q format option for escaping
spaces. The coreutils version doesn't. Unfortunately, neither dash nor
sh have a printf builtin. So, escape the spaces using sed.

[YOCTO #4811]

(From OE-Core master rev: 6ac06a65ce52d4c123da53f115c84cb0a98bc18f)

(From OE-Core rev: 135e681a3f3004a925b46b03cdada2fd86fc6c93)

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
populate_sdk_base.bbclass: use new perm option for find

Old way find -perm +mode is no longer supported in newer
versions of find (Fedora 19). Man page says:
-perm +mode
       This  is  no  longer  supported  (and  has been deprecated since
       2005).  Use -perm /mode instead.

[YOCTO #4853]

(From OE-Core master rev: 21b079e01873e2fb4d8674541e8c5818ba73554e)

(From OE-Core rev: 761cf78f12d60179684ae16e66008204f278561e)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tar: remove an erroneous patch

This removed patch is a workaround for gcc-4.5 manifests buffer
overflow with app-arch/tar-1.{22,23}, according to the information
from https://bugs.gentoo.org/show_bug.cgi?id=317139.

The problem with that patch is that it's only setting the magic
field of the header while the original statement sets both the magic
and the version field of the header. Because of this, all tar balls
created by the tar package in OE will be treated as old V7 format
tar balls.

As a negative effect of this behaviour, the tar package in OE cannot
handle device files correctly. This in turn leads to the udev cache
failure in images like core-image-lsb-sdk.

[YOCTO #4815]

(From OE-Core master rev: 32210f73c7e9f24951306f462b25e66e1d11a6b8)

(From OE-Core rev: 5c585a7a8c856802b79effc7f47ba3e44d7a489c)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
mesa: fix EGL compilation without X11 headers

Extracted from "d7033f4 mesa: upgrade to 9.1.3", already merged in master.

Add EGL-Mutate-NativeDisplayType-depending-on-config.patch to build correctly in
a non-X11 environment, it replaces fix-egl-compilation-without-x11-headers.patch.

The new patch fixes compilation issues for components that include
EGL/eglplatform.h file. With the original patch it was required to use
-DMESA_EGL_NO_X11_HEADERS when using mesa .h files to get proper C definitions.

The new patch was backported (trivial) to mesa 9.0.2 which is in dylan.

(From OE-Core rev: e4f5a568ec8df772f2b8c07f2ac946b2e9247ccd)

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pigz: Fix typo in ALTERNATIVES line

(From OE-Core master rev: 661897219bc50d569a2c87b414ab04a7f83f5a8e)

(From OE-Core rev: 99107b0ef7c9e85a3c71d883e7b1a2bc3a75ecbf)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
adt_installer_internal: fix spelling error

s/envrionement/environment/

(From OE-Core master rev: 5ace1d88efc37b70516eeb1a609ea37a657a5ce0)

(From OE-Core rev: b3bf03715509390d423795ae72c12713b0b7864b)

Signed-off-by: Beth Flanagan <elizabeth.flanagan@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
wget: backport fixes for documentation build errors

(From OE-Core master rev: f0c89f4122a0df67a003a6721afb45d7979ffc6f)

(From OE-Core rev: d6aa6a2c0e9b55889b264dbf3b3d24cadb5e9f06)

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
remake: fix insufficient gettext dependency

By default when inheriting gettext, "gettext-minimal-native" is added as
a dependency for native. The bb-file for remake use 'autopoint' (not
included in gettext-minimal-native). When building remake-native it
will result in a failure in do_configure for all cases when gettext (or
gettext-native) is not build from some other recipes, before building
'remake-native'.

This is solved by adding a build-dependency to gettext-native in
remake-native.

Fixes [YOCTO #4385]

(From OE-Core master rev: 4bd98157f1d7a96741d036e67b04819ccbc9a9c6)

(From OE-Core rev: f0535740070381b6e93a3ab90a4b7eea401af93d)

Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gst-plugins-good: add PACKAGECONFIG for jack

* jack is autodetected from sysroot

(From OE-Core master rev: 00872ded9e4f492f146175be41435902aaf45ad7)

(From OE-Core rev: e17f49ddcdbcf3fc4f6c974488a104c2cdcf8f8c)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gst-plugins-ugly: add PACKAGECONFIG for x264, cdio, dvdread

* they are autodetected from sysroot

(From OE-Core master rev: b253bbe742c016a07b67cfaa65b28895118c5bd8)

(From OE-Core rev: 93e147d0c0d52d349fd644f45831a961a3551d4b)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pulseaudio: add PACKAGECONFIG for jack

(From OE-Core master rev: 4c32a6af7dfd16cf9c652ca2735cd8d24d204e29)

(From OE-Core rev: 6ce6dd32a00abaf1402ddfeee62c4e96f515aa32)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
subversion: add PACKAGECONFIG for sasl

* cyrus-sasl is in meta-networking

(From OE-Core master rev: f32f0e8195b1abfdd4477747eca0838e90feabb7)

(From OE-Core rev: 506f9b0b5e18a839058196ac5cd231290b85ba95)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cups: add PACKAGECONFIG for avahi

* it's autodetected from sysroot

(From OE-Core master rev: 0d6fa308e7c2838a51013b16b348e95f9e177105)

(From OE-Core rev: 319355e68006c0c7dca117d552e96a36dfef01c3)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: hob: save the base image name for the customized images

Building an image, after customizing it, was failing because the base
image was not saved.

[YOCTO #4751]
(Bitbake rev: c109e1fb18c5541aa5bf500c4622f4f7b677db08)

Signed-off-by: Cristiana Voicu <cristiana.voicu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake: bitbake: data_smart: Ensure variable flags are accounted for in config data hash

Currently if the flags set against a variable in the base data store
change, it doesn't automatically trigger a reparse when it really
should. For example with the blacklist class setting:

PNBLACKLIST[qemu] = "bar"
PNBLACKLIST[bash] = "foo"

will not trigger a reparse if only one entry is changed and a
blacklisted recipe can still be built.

I did consider using BB_SIGNATURE_EXCLUDE_FLAGS in here however it
doesn't make sense, we want to trigger a reparse when any of the
flags change too (which is different to the sstate signatures which
we wouldn't want to change in those cases).

[YOCTO #4627]

(Bitbake master rev: ed74ea50043f6feb698c891e571feda2b9f8513d)

(Bitbake rev: 9313ff77f39abf776556cd7b0edb3c08854d68ef)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-yocto: Fix SRCREVs in linux-yocto_3.2

The KERNEL_VERSION set by linux-yocto_3.2.bb in openembedded-core is 3.2.32 but
the SRCREVs in the bbappend in meta-yocto-bsp referred to version 3.2.18. These
SRCREVs are updated to the correct values.

(From meta-yocto rev: ead5d53222c811c68e3bed74a297bb0a11a72156)

Signed-off-by: Paul Barker <paul@paulbarker.me.uk>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
directfb: don't patch pkg-config files

We are currently getting build failures of projects that rely on
being able to access DirectFB's internal include directories, as
returned via pkg-config, since the include paths returned by
pkg-config are incomplete.

The reason for that is the patch that is being removed with this
change. It modified the cflags returned by pkg-config in an
incorrect way, causing us to miss important include paths:

For reference, pkg-config output with incorrect patch applied:
  ad@bril0118 #513 ~> pkg-config --cflags directfb-internal
-D_GNU_SOURCE -D_REENTRANT -I<builddir>/tmp/sysroots/<machine>/usr/include/directfb -I<builddir>/tmp/sysroots/<machine>/usr/include

Now, with the incorrect patch removed, the output is as expected:
  ad@bril0118 #514 ~> pkg-config --cflags directfb-internal
-D_GNU_SOURCE -D_REENTRANT -I<builddir>/tmp/sysroots/<machine>/usr/include/directfb-internal -I<builddir>/tmp/sysroots/<machine>/usr/include/directfb

Overall, the removed patch is not needed - pkg-config does the right
thing these days and we can simply use the correctly working upstream
versions of all DirectFB .pc files.

(From OE-Core master rev: 795db65706d28bc194244a2ebbe6624ded584a33)

(From OE-Core rev: 6d66de326bc355ff7bbb3923e0f3d59625f2ead9)

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
terminal: Run command using a wrapper script

Some terminals may not pass the environment into the child process. This
is true when using "tmux split-window." If tmux is already running, it
will start the command with the tmux session environment, ignoring the
environment where the command was issued.

This could possibly be worked around when launching tmux by injecting
variables into the user's session environment or adding the variables to
the "update-environment" tmux setting. However, both methods would
permanently alter the user's session, which is undesirable.

By using a wrapper script, we have full control over the final
environment. Replace the env dictionary with an empty data smart that
will contain the exported variables and a wrapper function that execs
the original command.

(From OE-Core master rev: 3bb96671e987ce8110ce98b9f6d9efc093f8d20e)

(From OE-Core rev: a749f068e08217264324372a19b561181bfd31cc)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
TmuxRunning: handle multi-word commands

Just as in f8ed7446755eeb88191e16749350efa1e7e6197c, tmux wants a single
argument for its command. This applies to the "split-window" command as
well as "new."

Note that this alone is not enough to fix the TmuxRunning devshell when
using pseudo because tmux does not preserve the environment that pseudo
requires.

(From OE-Core master rev: 36fb9799d6a449d86acca3be354af56ad87c3151)

(From OE-Core rev: 2470a8f680653f569b88476124fc41a4317e3c5a)

Signed-off-by: Tyler Hall <tylerwhall@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>