scripts/cp-noerror: Copy the code from shutils.copytree, update not to error if the mkdir fails

(From OE-Core rev: 8617d13d45e961b1bb17c49744be8d2f8023931b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
autotools: Fix race over aclocal macro directory

The previous steps taken to address races over the aclocal macro directory and the removal
of files hasn't been sufficient since aclocal still looks at that directory as part of its
default search path. This patch passes the aclocal-copy directory into aclocal as its system
directory, removing any chance of it accessing the original aclocal directory.

Hopefully this should therefore fix the race issues once and for all.

In order to do this, cp-noerror needs to not error if the directory already exists.

Its also been noticed that aclocal defaults to using STAGING_DATADIR_NATIVE even when
building for the target. Only using the target directory would cause errors such as
missing pkgconfig macros (since we only depend on pkgconfig-native, not pkgconfig).
This patch processes both sets of macros maintaining existing behaviour. At a future
date we could look into potentially optimsing this.

[YOCTO #3216]

(From OE-Core rev: b98eeccbceabb9437c8fd6c74e28c363c10471f7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libc-package: Drop bogus replacement operation

The names used to generate the binary-localdata packages need to match the location
the dependencies are added. In one case the dash replacement is made, in the other it
is not leading to packages which cannot be installed:

	eglibc-binary-localedata-af-za.iso88591 is needed by locale-base-af-za.iso-8859-1-2.16-r22.i586
	eglibc-binary-localedata-cs-cz.iso88592 is needed by locale-base-cs-cz.iso-8859-2-2.16-r22.i586
	eglibc-binary-localedata-ru-ru.koi8r is needed by locale-base-ru-ru.koi8-r-2.16-r22.i586
	eglibc-binary-localedata-pl-pl.iso88592 is needed by locale-base-pl-pl.iso-8859-2-2.16-r22.i586
	eglibc-binary-localedata-hu-hu.iso88592 is needed by locale-base-hu-hu.iso-8859-2-2.16-r22.i586
	eglibc-binary-localedata-de-at+euro.iso885915 is needed by locale-base-de-at+euro.iso-8859-15-2.16-r22.i586
	eglibc-binary-localedata-sv-fi.iso88591 is needed by locale-base-sv-fi.iso-8859-1-2.16-r22.i586

This fixes things so the names are consistent.

(From OE-Core rev: 2dc9f214841ee55058f881c933713dfc7c63b506)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package: Recommend virtual-locale-*, don't depend on it

The virtual-locale-* packages are provided by libc which may or
may not have a matching locale for any given recipes's provided locales.
Certainly, we shouldn't get a failure if the locale package isn't
available.

This patch therefore makes the dependency optional rather than
required, allowing the locale packages in question to install. This
resolves errors like:

	virtual-locale-eo is needed by bash-locale-eo-4.2-r5.i586
	virtual-locale-en+boldquot is needed by bash-locale-en+boldquot-4.2-r5.i586
	virtual-locale-en+quot is needed by bash-locale-en+quot-4.2-r5.i586

(From OE-Core rev: 03094348a74b75e519782ac469964e2b58020613)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
pkgconfig: Drop automatic pkgconfig RDEPENDS

Just because a recipe uses pkgconfig, it doesn't mean that it's -dev
package should RDEPENDS on pkgconfig. I can understand the thinking
that lead to this but it makes sense to be able to install the package
when pkgconfig hasn't been built.

Currently you can also get failures where pkgconfig wasn't built yet
a -dev package is included that depends on it leading to rootfs failures.

I considered making this a RRECOMMENDS but it should probably be an
RSUGGESTS at best given the tenuous pkgconfig requirement any given
-dev package has.

(From OE-Core rev: ec12c545f3f2d17778e79a66f96e0f01f7ea1add)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libtool: Ensure the paths to sed are not hardcoded

If you:

bitbake sed-native
bitbake libtool-cross

then libtool-cross has SED="/path/to/sysroot/sed" which is incorrect. If that
is reused from sstate or sed-native is cleaned, the build will fail.

This patch simply sets sed to be "sed" since we're not on systems where
the sed from PATH is broken.

(From OE-Core rev: 8077217d4fdd40b696f7aa4ac0de13c5abacac4c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
autotools.bbclass: Fix gettext macro versions issues

gettext m4 macros don't use the usual versioning/serial mechanism used by
aclocal. It therefore won't update them over and above any local version of
the macro. Equally, we don't run gettextize due to it doing slightly crazy
things to the build.

When we put the aclocal directory as a -I option to aclocal, if this was
found first compared to any recipe provided macros, the correct version
of the gettext macro would still "win". With the switch so correctly override
the system directory, older recipe provided macros may get used.

This patch manually removes the problematic m4 macros in the case we're using
gettext and need to use the correct m4 macros.

(From OE-Core rev: e8e9b6b010dae92e3a2908e04c1a5bf206fd6c33)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Add packagegroup-core-buildessential

[Not heavily tested, but sent for discussion]

task-core-sdk is too big - for example, I simply don't want to ship tcl, ever =)
Historically distcc caused a large dependency graph explosion because it has
a utility which uses gtk+, although that was fixed.

packagegroup-core-sdk also includes coreutils, which is a bit
confusing; conceptually things dependent on coreutils should pull it
in explicitly, or possibly we just declare coreutils to be in the
minimal build set.

So packagegroup-core-buildessential is intended to be similar to
Debian's "build-essential" package.  It's the stuff needed by say 80+%
of components, not worth repeating over and over.

(From OE-Core rev: e65f0c0a482e04237909f1ba5bdb772de9dfd118)

Signed-off-by: Colin Walters <walters@verbum.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cpan_build: Unify directory layout for native and target builds

There seems to be no benefit in having them be different and this
appears to cause a certain amount of confusion about paths for
the native modules.

(From OE-Core rev: bfde2929cccbd21887ff3d6f018b7539c0d07817)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
eglibc: Move perl- and bash-using scripts to separate recipes

This removes the dependency of eglibc.bb itself on perl and bash
which, in turn, eliminates the need to build those two recipes if the
scripts which need them are not going to be installed.

(From OE-Core rev: c2d16ed2ead61b80d04fe184947df91d43733adc)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gettext: Remove spurious-looking dependencies on libxml2-native

These were added in aae5021101224344a2b1a3af5becf74291fbbfe5, ostensibly to resolve
some sort of "host contamination" issue.  However, that commit contains no information
about what contamination was being observed or how the dependencies help.

gettext-native is being configured --with-included-libxml so it shouldn't be using
libxml2 from either the host or the sysroot, in which case the dependency would seem
to be useless.  Using the included copy of libxml2 is in any case preferable to adding
a dependency on libxml2-native because the latter brings quite a large stack of other
dependencies with it.

(From OE-Core rev: 7086d1d68d57625902f66b51561431c486e95bc6)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel.bbclass, module.bbclass: Make update-modules optional

The update-modules mechanism is something of a historical relic and it isn't
entirely clear that it has a great deal of value nowadays.  Also, it causes a
problem when building a read-only rootfs since update-modules itself refuses
to configure offline.

Allow DISTROs to circumvent this whole thing by declaring (via DISTRO_FEATURES)
that they don't wish to use update-modules.  This is backfilled for existing
distributions and will have to be marked as CONSIDERED by those who actually
don't want it.

(From OE-Core rev: a2e87b06896e0b79ce4a9093b29a5d0391f26f23)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
module.bbclass: Move do_make_scripts() to module-base

It's sometimes useful to have this function available to recipes which
don't wish to use module.bbclass for whatever reason.

(From OE-Core rev: a5c8953d8462af603c9ea685a885ce5403c266c7)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
strace: Don't package strace-graph

Commit 9c9ea24b115a9bb87df1323b5f185ce426262aec made strace depend on perl because the
strace-graph script needs it.  However, this cost of the dependency is large (building
all of perl) and the value of the script is marginal.  Let's just delete the script
instead and remove the dependency again.

If anybody wants strace-graph then it should be packaged in its own recipe and that one
can be made to depend on perl without disrupting the main strace package.

(From OE-Core rev: af87db264a224f4a9aa273ed00fbc8d97a62fc3c)

Signed-off-by: Phil Blundell <pb@pbcl.net>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
siteinfo.bbclass: add AArch64 support

(From OE-Core rev: 3161742b094c9e7bcd2540823012fdd63a926f89)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-arch.bblass: add AArch64 support

(From OE-Core rev: e977c69fae3dc59d6da1a14f0f7090bc33cd7a3b)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
insane.bbclass: add AArch64 support

(From OE-Core rev: 978e14c2b6b0c03f49e19a76c9c6af498376e358)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
openssl: add AArch64 support

(From OE-Core rev: 31b792fb9bf3926066fd5a4adb88aab8c5924f53)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
util-linux: add AArch64 support

(From OE-Core rev: 08a62acced1360802fcf5d3fde4d5583973d3d71)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
packagegroups: disable kexec, valgrind, lttng, systemtap on AArch64

(From OE-Core rev: 0ab8b77bb1e2de03ec028e283645b1324dcc55b1)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>