e2fsprogs: use update-alt for chattr

Both busybox and e2fsprogs provide chattr, ensure that they are delivered
to the same location and use update-alternatives to ensure the correct
links are there.

[YOCTO #6407]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
stat: use update-alt for stat

Three different recipes provide the stat program, busybox, coreutils and stat.
Ensure that they are installed to the same place and use update-alternative
with the correct priorities to have the correct binary installed.

[YOCTO #6415]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gstreamer1.0-rtsp-server: depends on libcgroup and gstreamer1.0-plugins-base

Otherwise may do_compile error:
test-cgroups.c:43:23:: fatal error: libcgroup.h: No such file or directory

and:

configure: No package 'gstreamer-plugins-base-1.0' found

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
curl: control ipv6 support based on DISTRO feature

By default ipv6 is auto detected for native builds but disabled when
cross compiling.

This commit adds a PACKAGECONFIG option, unconditionally enabled for
native and nativesdk builds and controlled by the ipv6 DISTRO feature
for target builds.

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
busybox: handle syslog related files properly

If CONFIG_SYSLOGD is not enabled, then the related service file should
not be installed as it will always fail at system start-up. The error
message is as following.

	[FAILED] Failed to start System Logging Service.

The same logic applies to CONFIG_KLOGD.

So we should first check the configuration before we install these
service files.

[YOCTO #5302]

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>
git: revert to wrapper based relocation

It seems that there are multiple problems with the upstream RUNTIME_PREFIX
mechanism at this time. It doesn't canonicalize argv[0] to an absolute path,
breaking calls via the PATH, for example. In addition, it doesn't seem to
locate template_dir via the runtime prefix even when specified as relative.

Revert this for now to the previous wrapper-based mechanism, but tweaked
slightly to avoid hardcoding the sysroot path into the wrapper (based on the
bits in the rpm recipe).

[YOCTO #6211]

[Pulled from meta-mentor by RP]

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
buildstats-summary.bbclass: Import useful bbclass from meta-mentor

This class summarizes sstate reuse at the end of the build, so you know how
much of your build was done from scratch.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
git: don't hardcode the full path to perl

Hardcoded paths to perl don't make sense, use from the environment instead.

[Patch taken from meta-mentor by RP]

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf: Add QEMU_OPTION for ppc7400 as used by qemuppc

Currently, qemuppc prints warnings about gdk-pixbuf postinstalls
not working due to illegal instructions. This is due to qemu
running with the wrong cpu type. Add an option for ppc7400 so
that qemuppc works correctly.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemuwrapper-cross: Use QEMU_OPTIONS

The correct cpu options are needed in order to correctly run some CPU
types. This information is available in QEMU_OPTIONS, use it. This
avoids architectures like qemuppc failing postinstalls.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf/qemu: Move QEMU_OPTIONS to qemu.bbclass

The QEMU_OPTIONS variables belong in qemu.bbclass so move them there. The
only users of them inherit qemu.bbclass. There is no point in pushing
these into every recipe.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
native.bbclass: Properly define directories

For most users this commit will have no effect. But if you come across the idea of giving
different names for paths, you'll get some troubles.

When a recipe inherit native, properly define bindir, sbindir, includedir, sysconfdir, datadir
(using xxxdir_native definitions from meta/conf/bitbake.conf).

For example, edit "${BASE_WORKDIR}/${MULTIMACH_TARGET_SYS}/quilt-native/temp/log.do_configure"
and see what are the arguments given by oe_runconf.

Notice that ${docdir}, ${mandir}, ${infodir}, ${localstatedir} have no associated _native definition.

Signed-off-by: Matthieu Crapet <Matthieu.Crapet@ingenico.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
neard: fix more parallel build issues

One fix, another appears...  root-cause to a magic dependency hiding at the
bottom of the Makefile, and add all binaries to it.

[ YOCTO #6416 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
alsa-tools: Add missing pkgconfg dependency

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
binconfig-disabled: Add class and use

This adds a binconfig-disabled class which can be used by recipes where
a -config file is installed but we wish to disable it and just rely on
the .pc files instead.

Rather than simply deleting it, we make the script "exit 1" so that it
can be found in PATH and raise a build error rather than something
silently falling back to the build system for example.

Rather than randomly finding -config files, this adds in the
specification of a list of binconfig scripts which is more deterministic
and maintainable moving forward.

This patch converts various users in OE-Core to use this, a world build
of OE-Core tests out ok with this change. There will likely be issues in
other layers however, hence this being a RFT.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
icu backoff due to gtk-webkit

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
autotools: Improve configure dependency code for finding m4 files

We have an open bug about the warnings issues in builds from an sstate
cache when something like glib-2.0 gets rebuilt. The issue is that
sstate is "clever" and prunes unneeded dependencies out the tree.

For example is X depends on pkgconfig-native but we've already build X
and installed it from sstate, it will not get installed when you build Y
which depends on X.

This patch changes the logic to match the sstate behaviour and prune out
unnecessary dependencies from the scope of aclocal. This in turn removes
the warning about missing manifest files.

The issue is that this patch exposes holes in our DEPENDS in recipes,
specifically that some native tools are not listed, specifically, and
problematically, pkgconfig, gtk-doc and intltool-native in particular.

I've sent out patches against OE-Core that address the bulk of the
issues there however I'm conscious this is probably going to a bug issue
in other layers and may be too annoying to consider at this point. The
other alternative is simply to turn the warning into a debug statement.

I appreciate the code below has commented blocks, this is simply debug
I've left around for now. It will be cleaned from any final version.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-module-split: Add support for KERNEL_MODULE_AUTOLOAD and KERNEL_MODULE_PROBECONF

The current module_autoload_* and module_conf_* variables are error
both ugly and error prone. They aren't registered in the task checksums
so changes to them aren't reflected in the build. This turns out to
be near impossible to fix with the current variable format in any
sensible way :(.

This patch replace module_autoload with the list of variables in
KERNEL_MODULE_AUTOLOAD which is a much simpler and usable API. An
error is printed if an old style variable is encountered. It should
be simple to convert to this.

module_conf_* are harder to deal with since there is data associated
with it, it isn't simply a flag. We need a list of variables that are set
in order to be able to correctly handle the task checksum so we add
KERNEL_MODULE_PROBECONF for this purpose and error if the user hasn't
added a module to it when they should have.

[YOCTO #5786]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>