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)

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)

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)

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)

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.

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

(From OE-Core master rev: 661897219bc50d569a2c87b414ab04a7f83f5a8e)

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)

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)

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)

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)

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)

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)

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)

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)

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>
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)

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)

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)

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>
external-sourcery: add missing providers

Addess the issue with multiple .bb providers

ERROR: Multiple .bb files are due to be built which each provide virtual/libc (/srv/hdd/releases/dylan/meta/recipes-core/eglibc/eglibc_2.17.bb /srv/hdd/releases/dylan/meta/recipes-core/meta/external-sourcery-toolchain.bb).
 This usually means one provides something the other doesn't and should.
ERROR: Multiple .bb files are due to be built which each provide virtual/arm-none-linux-gnueabi-libc-for-gcc (/srv/hdd/releases/dylan/meta/recipes-core/eglibc/eglibc_2.17.bb /srv/hdd/releases/dylan/meta/recipes-core/meta/external-sourcery-toolchain.bb).
 This usually means one provides something the other doesn't and should.
ERROR: Multiple .bb files are due to be built which each provide virtual/libiconv (/srv/hdd/releases/dylan/meta/recipes-core/eglibc/eglibc_2.17.bb /srv/hdd/releases/dylan/meta/recipes-core/meta/external-sourcery-toolchain.bb).
 This usually means one provides something the other doesn't and should.

Thanks to Kergoth (Chris Larson) and Lpapp (Lazslo)

[YOCTO #4908]

(From OE-Core master rev: 09deeef20ee5a0c12ad4fd89cace6e0fb832d5b1)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/terminal.py: add support for MATE desktop terminals

A simple clone of the corresponding Gnome class. Without this, devshell
fails completely on a default installation of MATE desktop Linux Mint 15.

(From OE-Core master rev: 8cc078a9c679845464c59028f584d7aba098cc1f)

Signed-off-by: Andre McCurdy <andre.mccurdy@entropic.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pseudo: Always try to build 32-bit libpseudo when NO32LIBS is set to 0

This is for Yocto bug #4920. The NO32LIBS variable is intended to allow
the user to force the creation of a 32-bit libpseudo, for use with things
like prebuilt binary toolchains. Unfortunately, the tests for likely
compilability (stubs-32.h) were still present, so you would get silent
failures. And if you did cause it to try to build, the failures were not
particularly clearly explained.

So, we:
1. Emit at least a message during configuration saying we're only
building 64-bit, if we are.
2. Warn the user for at least one common case where we know builds
are likely to fail.
3. If NO32LIBS is 0, we try the compile for sure, and if it fails,
we've emitted at least some sort of message up near the top of the
compile output that tells you what might be wrong.

(From OE-Core master rev: 22548b3243dfa2dc9861b0f15530632b37812a8c)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>