adt-installer: Fix to work with meta-environment changes

There is a proper sysroot specified in the meta-environment script now,
which isn't a bad thing. We adjust the sed expression to cope with this.

That means the SDK installations in non-default paths start to work again.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel: Added bc-native as DEPENDS

The makefile checks for bc during for compilation

[YOCTO #6781]

Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel.bbclass: enable a link for external module building

Even though the kernel-dev package provides the required support for
building external kernel modules on the target, some commonly used scripts
and utilities fail as they are not finding the kernel module build support
files at the desired location.

Create the /lib/modules/<kernel-version>/build link on target pointing to
the sources provided by the kernel-dev package, to fix the issue.

Fixes Bug:
[YOCTO #2968]

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gcc-runtime: Add linux-gnuspe symlink to fix c++ headers

Some architectures can mix different TARGET_OS values, in most cases
we just use one but in the ppc case, can use two different values. In this
case, to use one toolchain with both, we need to ensure the symlinks exist.

This isn't ideal but does fix the ppc toolchains for the release, after
which better ways of handling this can be investiaged. Without this, failures
in the C++ toolchain are seen.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-environment: Deal with machines which change TARGET_OS

Some machines change TARGET_OS, cross-canadian resets this which
is not what we want in this specific case. This fixes spe toolchains
for example.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cross-canadian: Disable the packagedata stamp-extra-info

Similarly to native/cross disable this since otherwise the packagedata
can be marked as machine specific and if you switch machines
which share an architecture, you'll get toolchain overlapping files
errors.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pseudo*.bb: update to pseudo 1.6.2

pseudo 1.6.2 fixes problems with 64-bit inodes and some underlying issues
involving file renames that could occasionally cause very strange behaviors
files being deleted, linked, or renamed, mostly observed as strange
recovery if an inode got reused.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bash: Upgrade bash to latest patch level to fix CVEs

We upgrade bash_4.3 to patch revision 29, and bash_3.2.48 to 56.

There are numerous community bug fixes included with this set, but the key
items are:

bash32-052      CVE-2014-6271                           9/24/2014
bash32-053      CVE-2014-7169                           9/26/2014
bash32-054      exported function namespace change      9/27/2014
bash32-055      CVE-2014-7186/CVE-2014-7187             10/1/2014
bash32-056      CVE-2014-6277                           10/2/2014

bash43-025      CVE-2014-6271                           9/24/2014
bash43-026      CVE-2014-7169                           9/26/2014
bash43-027      exported function namespace change      9/27/2014
bash43-028      CVE-2014-7186/CVE-2014-7187             10/1/2014
bash43-029      CVE-2014-6277                           10/2/2014

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
LTP - realtime tests - fix bad PI mutex conditionals

The priority inheritance tests for mutexes used conditional variables
which were non-existent.  Changed the conditional clauses to use the
variables which were actually generated by LTP autoconf for that purpose.

Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
LTP - realtime tests - fix bad robust mutex conditionals

The tests for robust mutexes contained conditional clauses which failed in
autoconf and/or used nonexistent variable names.  Modified these
conditional clauses to use only the variables actually created by
LTP autoconf for this purpose.

Signed-off-by: Gary S. Robertson <gary.robertson@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: Reverse runtime symlinks should be tied to package generation

In case a package is not generated (is empty and does not has allow
empty flag set) the package data regarding reverse runtime dependency
shouldn't be done.

This were causing a false-positive in the meta-fsl-arm layer, when
building mesa, as:

,----[ Error during build of MX53 in meta-fsl-arm ]
| ERROR: The recipe mesa is trying to install files into a shared area
|  when those files already exist. Those files and their manifest
|  location are:
|    /.../build/build/tmp/sysroots/imx53qsb/pkgdata/runtime-reverse/libopenvg-dev
|    Matched in manifest-imx53qsb-amd-gpu-x11-bin-mx51.packagedata
| Please verify which recipe should provide the above files.
`----

Fixes [YOCTO: #6795]

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linuxdoc-tools-native: Makedoc.sh uses /tmp and fails w/ noexec mount

The Makedoc.sh script uses the following line to set TMPDIR

export TMPDIR=`mktemp -d ${TMPDIR:-/tmp}/ldt.XXXXXXXXXX`;

and then later in the script:

chmod u+x $TMPDIR/linuxdoc

Since TMPDIR is not set the script will default to /tmp and if /tmp
is set to noexec (which is becoming more common), the chmod call fails.

Signed-off-by: Konrad Scherer <Konrad.Scherer@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bash: update and CVE-2014-6278 fix

Update both bash 3.2.48 (to 57), and bash 4.3 (to 30) to fix the remaining
'shellshock' security issues, CVE-2014-6278.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_ipk.bbclass: Fix SRC_URI whitespace handling

The SRC_URI may contain whitespace, but be otherwise empty.  This can happen
in the case:

MYSRC = ""
MYSRC_arm = "file://myarm.patch"
SRC_URI += "${MYSRC}"

Unless we strip blank spaces, to determine if it is empty, we can end up
generating a "Source: " line which in invalid.  This leads to the error:

  invalid Source: field is speified in the generated CONTROL file

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
toolchain-scripts.bbclass: Allow sourcing of subscript for environment

Sometimes we require extra environment settings to be available on the
environment for proper SDK work. This were done, in past, using
'_append' tasks however with the split of the environment in a
canadian package this has been broken.

The easier and more flexible solution is to use environment subscripts
which are sources by the main script. These are now looked at:

 $OECORE_NATIVE_SYSROOT/environment-setup.d/*.sh

and sourced.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-toolchain-qt: Fix environment population

The generation of the environment has change since the change to use a
meta-environment canadian package in the OE-Core, the SDK environment
setting has been broken. This uses the new subscript environment to
fix it.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libassuan: fix for rebuild

Fixed when rebuild:
rm: cannot remove `/path/to/2.1.2-r0/libassuan-2.1.2/m4/*.m4': No such file or directory

The files may not exist when rebuild.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
latencytop: Creates x11 PACKAGECONFIG.

* Creates x11 packageconfig and update DEPENDS and EXTRA_OEMAKE_X
  for better handling.

Signed-off-by: Noor Ahsan <noor_ahsan@mentor.com>
xserver-xorg: report DRI3 and Present modules as present

The DRI3 and Present modules are built-in but some drivers (such as
xf86-video-intel) want to query their presence.  Backport a patch from upstream
to stop this causing an error.

[ YOCTO #6583 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
curl: add PACKAGECONFIG option to use libssh2

The user can enable libssh2 via conf/local.conf or custom distro
configuration, this will pull in libssh2, which is not used by default.

For example, a curl_x.y.z.bbappend file containing the following line:
PACKAGECONFIG += "libssh2"

Signed-off-by: Fabrice Coulon <fabrice.coulon@axis.com>
Signed-off-by: Olof Johansson <olof.johansson@axis.com>