socat: fix compile erorr against 3.17+ kernel headers

With the linux 3.17 kernel socat's configure detects the wrong include
for errqueue.h which results in a compilation error.

By backporting the gentoo patch from:

  http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/socat/files/socat-1.7.2.4-linux-3.17.patch

Fixes the build issue

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-libc-headers: update to 3.17

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-libc-headers: Upgrade 3.17 -> 3.17.7

Whilst we don't usually take linux-libc-headers point release, 3.17.3
fixes a userspace header issue which caused gdb to fail to build on
mips. We therefore may as well upgrade to the latest point release.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernelsrc.bbclass: Ensure fetch/unpack/patch tasks don't run

In particular this removes a race condition where a ${S}/patches
directory could be created by do_unpack. This confuses kern-tools.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-devsrc: Inherit module-base

As a "normal" recipe, mulitlib would try and extend it for multilibs.
By inheriting module-base, we can avoid this since we now look more
'kernel' like.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel: Fix non linux-yocto builds

After the recent kernel changes, non linux-yocto builds stopped working
properly for two reasons:

a) ${S} was being reset to ${WORKDIR}/git for example and STAGING_KERNEL_DIR
   did not contain the source

b) Most builds were using ${B} == ${S}

This patch adds a fixup to the unpack function to handle the case where
${S} != ${STAGING_KERNEL_DIR} and also set up the infrastrcture so that
B != S for kernel builds from now on. The kernel build system is one of the
best for supporting this and there is no good reason not to take advantage
of it.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bootimg: Use deploy artefacts, not STAGING_KERNEL_DIR

bzImage is no longer in STAGING_KERNEL_DIR. Rather than add it back,
depend on the kernel deploy task and find it in DEPLOY_DIR_IMAGE.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
boot-directdisk: Use kernel from DEPLOY_DIR_IMAGE, not sysroot

After the recent kernel changes, this avoids failures like:

DEBUG: Executing shell function build_boot_dd
install: cannot stat '/home/pokybuild/yocto-autobuilder/yocto-worker/build-appliance/build/build/tmp/sysroots/qemux86-64/usr/src/kernel/bzImage': No such file or directory
WARNING: exit code 1 from a shell command.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
core-image-sato-sdk: Use kernel-devsrc to ensure kernel module builds work

With the move of the kernel source to the kernel-devsrc, we need this package
to ensure the kernel module sanity tests made on core-image-sato-sdk continue
to pass. Therefore update the name of the package included in the image.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta-environment: don't mark tasks as nostamp

With siggen being changed to alter the signature of nostamp tasks on the
fly, having these tasks as nostamp results in the SDK being rebuilt
every time, which is not desirable. In any case this is just legacy from
the days before we used signatures to take care of ensuring these tasks
get re-run when they need to be.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/package: move read_shlib_providers() to a common unit

This allows us to use this function elsewhere in the code.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/patch: fall back to patch if git apply fails

When PATCHTOOL = "git", git apply doesn't support fuzzy application, so
if a patch requires that it's better to be able to apply it rather than
just failing.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/patch: auto-commit when falling back from git am

When PATCHTOOL = "git", if we're not able to use "git am" to apply a
patch and fall back to "git apply" or "patch", it is desirable to
actually commit the changes, attempting to preserve (and interpret) the
patch header as part of the commit message if present. As a bonus, the
code for extracting the commit message is callable externally in case it
is useful elsewhere.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/patch: use --keep-cr with git am

Preserving carriage returns is important where the patch contains them.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/patch.py: abort "git am" if it fails

If we don't do this, you may still be in the git am resolution mode at
the end of applying patches, which is not desirable.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe/patch: add support for extracting patches from git tree

When patches from a recipe have been written out to a git tree, we also
want to be able to do the reverse so we can update the patches next to
the recipe. This is implemented by adding a comment to each commit
message (using git hooks) which we can extract later on.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oe: add recipeutils module

Add a module to help provide utility functions for dealing with recipes.
This would typically be used by external tools.

Substantial portions of this module were borrowed from the OE Layer
index code; other functions originally contributed by
Markus Lehtonen <markus.lehtonen@intel.com>.

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