eglibc: Fix configure when re-building with gold

(From OE-Core rev: 2a36a02c2444551579b8498468debfaff0faa6d8)

(From OE-Core rev: 1e2aa57d621fa816fa7fc652a3b7d2920844c74d)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Conflicts:
	meta/recipes-core/eglibc/eglibc_2.19.bb
update-rc.d: fix to handle priority numbers correctly

The update-rc.d treated priority numbers begin with '0' as octal
numbers. This led to problems of update-rc.d being unable to handle
priorities like '08' or '09' correctly.

This patch fixes the above problem.

[YOCTO #6376]

(From OE-Core rev: 675fd834b9ed696cd87809830d57d3da083580d3)

(From OE-Core rev: b59efa053d1396efd3d5a9c7f88fb5088b063686)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
combo-layer: fix revlist taking into account file_filter

If file_filter is set, git format-patch takes account but git rev-list
does not. So revlist is going to get with wrong revisions. And last_revision
will be updated with wrong revision. The next time that user run
combo-layer it complain about applying patches.

So ensure that 'git rev-list' are using file_filter as 'git format-patch'.

(From OE-Core rev: c22e40900d8e33c2c884e714c11ddb771b86923f)

(From OE-Core rev: 7ad5b4dece1d8fba6f1b6b530830384e6c8fb74f)

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classextend: Fix crosssdk remapping for multilib

Multilib builds only require one crosssdk toolchain. We therefore shouldn't
be remapping crosssdk names. This resolves build failures looking for
weird multilib crosssdk toolchains.

(From OE-Core rev: aa8b93e2db06866529d20939452f81fb9e18aaab)

(From OE-Core rev: d5a9290649fb493b6ac8b585d82ee9f02d138147)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gzip: Avoid host contamination during build

On systems with /bin and /usr/bin merged the gzip recipe may find grep
in /usr/bin, while OE puts it in /bin. Force the recipe to find grep in
the correct place.

(From OE-Core rev: 8ae714bb59c67433ded1efe6a8750e0e9c126dab)

(From OE-Core rev: 26e46f935cc98845225c41d954b34b3312a4c37d)

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
util-linux: add sulogin to alternatives list

sulogin is provided by both busybox in /sbin/sulogin and util-linux provides one
in /usr/sbin/sulogin, so move util-linux's to sbin and setup ALTERNATIVE_LINK.

[YOCTO #6384]

(From OE-Core rev: a827ca74d27b916df8d40ec8155bc0340f8a0487)

(From OE-Core rev: 92f0657a89087a4a388030fdb04aaad80aca918d)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
v86d: fix for SeaBIOS VGA BIOS compatibility

This fixes a compatibility issue between v86d
and SeaBIOS VGA BIOS where the leal instruction
is not decoded properly. Read the
http://thread.gmane.org/gmane.comp.emulators.qemu/271806
thread for more details.
Patch taken from upstream.

(From OE-Core rev: 3e890dd00ed27cc30800caefa85827cb16da5a3a)

(From OE-Core rev: 730206ccbcbe7f75a5946b64fba82a794cd9da5a)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libfm: Ensure m4 directory exists

configure.ac references the m4 directory so things like gtkdocize
will try and place m4 files there. We need to ensure the directory
exists or the builds can fail.

(From OE-Core rev: 0ced649c055dd25c500d0fd34e4ea94504d98580)

(From OE-Core rev: ce4cc1e8b48fb368fa96f63ee43a35d6ed142b21)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sanity.bbclass: Add libsdl-native check

If libsdl-native is in ASSUME_PROVIDED, check for it in the sanity tests.
This warns the user if they've said its being provided but it isn't and
prevents silent build issues.

(From OE-Core rev: d9d7b0515fcf47c4cf7533a12915ea92298ce834)

(From OE-Core rev: b26e4596d56db4120a81a07268fd174e14240e2b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
grub_git: fix build warning->error

This patch fixes a build warning which is promoted to an error via -Werror.

changes from v1:
 * put "Upstream-Status" in patch itself, not in OE patch header
 * fix commit wording

(From OE-Core rev: 4b41f4199d77144a629897173cff3d1efcfa85f9)

(From OE-Core rev: 69f9022126d3cd21001f48ec36730982e53a6a48)

Signed-off-by: Trevor Woerner <trevor.woerner@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
x264: Update SRCREV to match commit in upstream git repo

It seems that 585324fee380109acd9986388f857f413a60b896 is no
longer there in git and it has been rewritten to
ffc3ad4945da69f3caa2b40e4eed715a9a8d9526

Change-Id: I9ffe8bd9bcef0d2dc5e6f6d3a6e4317bada8f4be
(From OE-Core rev: b193c7f251542aa76cb5a4d6dcb71d15b27005eb)

(From OE-Core rev: f2b20b169a462cf4c6e6f341b76add8a0f4d6e3f)

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
image_types: Fix ubi filesystem return codes

If the first command returns an error, it will not cause the image generation
step to fail. Simply split up the statement into multiple lines to avoid
this issue, they no longer need to be one line expressions.

[YOCTO #6391]

(From OE-Core rev: f8125a1e9b6893a12355d55d4df584a8d97f0bff)

(From OE-Core rev: 414f9b4d2dd39845b537ebdc2a4ecafbd9162343)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: update a uclibc specific patch to avoid segment fault

The alloca() function allocates space in the stack frame of the caller,
so using alloca(new_size - old_size) would possibly crash the stack,
causing a segment fault error.

This patch fixes the above problem by avoiding using this function in
journal-file.c.

[YOCTO #6201]

(From OE-Core rev: 96b6a2d446d28eabd9a943f5f2b5af12c24a7dbb)

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>
update-rc.d/useradd: Add additional dependecies

These dependcies are needed to ensure that thier packages are created
correctly since these classes have runtime dependiences in their packages
but they are not actually created yet at rootfs time.

[YOCTO #6072]

(From OE-Core rev: bba835fed88c3bd5bb5bd58962034aef57c408d8)

(From OE-Core rev: 8c4ea49ba8440871f5a7008c7fa20f93bfb35d78)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssl: add openssl-CVE-2010-5298.patch SRC_URI

make openssl-CVE-2010-5298.patch truely work

(From OE-Core rev: eab33442480cc27a5cd00b3f46984fea74b7c0f9)

(From OE-Core rev: 1bd77c28fdb51d1a0dad55c8d1af2991046c801d)

Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Conflicts:
	meta/recipes-connectivity/openssl/openssl_1.0.1g.bb
openssl: fix CVE-2014-0195

From the OpenSSL Security Advisory [05 Jun 2014]
http://www.openssl.org/news/secadv_20140605.txt

DTLS invalid fragment vulnerability (CVE-2014-0195)

A buffer overrun attack can be triggered by sending invalid DTLS fragments
to an OpenSSL DTLS client or server. This is potentially exploitable to
run arbitrary code on a vulnerable client or server.

Only applications using OpenSSL as a DTLS client or server affected.

(Patch borrowed from Fedora.)

(From OE-Core rev: 5bcb997663a6bd7a4d7395dcdb5e027d7f2bab81)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssl: use upstream fix for CVE-2014-0198

This replaces the fix for CVE-2014-0198 with one borrowed from Fedora,
which is the same as the patch which was actually applied upstream for
the issue, i.e.:

https://git.openssl.org/gitweb/?p=openssl.git;a=commit;h=b107586c0c3447ea22dba8698ebbcd81bb29d48c

(From OE-Core rev: d3d6eee3353fcce09e1d6b0181a0ea7b52b7a937)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssl: fix CVE-2014-0221

http://www.openssl.org/news/secadv_20140605.txt

DTLS recursion flaw (CVE-2014-0221)

By sending an invalid DTLS handshake to an OpenSSL DTLS client the code
can be made to recurse eventually crashing in a DoS attack.

Only applications using OpenSSL as a DTLS client are affected.

(Patch borrowed from Fedora.)

(From OE-Core rev: 833920fadd58fe353d27f94f340e3a9f6923afb8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssl: fix CVE-2014-0224

http://www.openssl.org/news/secadv_20140605.txt

SSL/TLS MITM vulnerability (CVE-2014-0224)

An attacker using a carefully crafted handshake can force the use of weak
keying material in OpenSSL SSL/TLS clients and servers. This can be exploited
by a Man-in-the-middle (MITM) attack where the attacker can decrypt and
modify traffic from the attacked client and server.

The attack can only be performed between a vulnerable client *and*
server. OpenSSL clients are vulnerable in all versions of OpenSSL. Servers
are only known to be vulnerable in OpenSSL 1.0.1 and 1.0.2-beta1. Users
of OpenSSL servers earlier than 1.0.1 are advised to upgrade as a precaution.

(Patch borrowed from Fedora.)

(From OE-Core rev: fd1d740437017d3ed75684768d6915041cdb0631)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssl: fix CVE-2014-3470

http://www.openssl.org/news/secadv_20140605.txt

Anonymous ECDH denial of service (CVE-2014-3470)

OpenSSL TLS clients enabling anonymous ECDH ciphersuites are subject to a
denial of service attack.

(Patch borrowed from Fedora.)

(From OE-Core rev: 595f2fc7dd642d729ab61f20a6719a2cc6c80426)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>