kernel.bbclass: make FILES package-specific

Fix QA warnings seen when using 'traditional' kernel recipes e.g.:

WARNING: QA Issue: .../recipes-kernel/linux/linux_3.0.18.bb: Variable
FILES is set as not being package specific, please fix this.

Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
boot-directdisk/bootimg/image-vmdk: remove more nostamps for image generation

We have removed the nostamps for do_rootfs and do_build, so it seems
reasonable to remove the stamps for do_bootimg, do_bootdirectdisk and
do_vmdkimg.

The current problem is that the do_vmdkimg always re-run, but the
do_rootfs may not, so the code like below in the do_rootfs function
doesn't re-run and cause problems (the symlink exists when the
do_vmdkimg creates the symlink again):

    if d.getVar('IMAGE_LINK_NAME', True):
        cmds += "\trm -f ${DEPLOY_DIR_IMAGE}/${IMAGE_LINK_NAME}.*"

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
buildhistory-diff: improve bad command-line argument handling

* Check for existence of specified buildhistory directory and show a
  proper error message if it doesn't
* Show an error message instead of a traceback with a mangled revision
  if one of the specified git revisions is invalid
* Show usage information if --help is specified
* Write error messages to stderr

Fixes [YOCTO #4313].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/buildhistory: track contents of selected files in images

Add a BUILDHISTORY_IMAGE_FILES variable specifying a space-separated
list of files within an image to copy into buildhistory, so that changes
to them can be tracked. Typically this would be used for configuration
files, and by default this includes /etc/passwd and /etc/group, but the
user is free to extend this list by setting the variable in local.conf.

Implements [YOCTO #4154].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
classes/insane: add check for PN in OVERRIDES

If a recipe is named such that its PN value matches something already in
OVERRIDES (such as when PN happens to be the same as MACHINE or DISTRO),
it can have unexpected consequences. Assignments such as
FILES_${PN} = "xyz" effectively turn into FILES = "xyz".

Implements [YOCTO #4288].

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf: update way to set default ROOT_HOME

Use "??=" to set default ROOT_HOME. It can be overwrote by developer
with "?=" in any layer and at same time it also can be overwrote in
local.conf.

Signed-off-by: Kang Kai <kai.kang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
python: remove the default optimization

We had hard coded python-native and python's default optimization to 1,
which made the "assert" statement didn't work, and removed the "-O/-OO"
(optimization options), the target python had a "-N" option to disable
the default optimization, but the native python didn't.

I think that we can set the environment variable PYTHONOPTIMIZE or use
"python -O" if we need to optimize, but I'm not sure whether we need to
set it by default, it would confuse the user or cause/hide unexpected
problems if the "assert" doesn't work.

[YOCTO #4427]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rpm: ensure __mkdir_p matches __mkdir

They differ at times because one is set from the db_cv_path_mkdir and the other is
found during config time for the host (/usr/bin/mkdir), in the macros we should just
use __mkdir for the __mkdir_p variant.

[YOCTO #4452]

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu: add ext4 to the list of extracted extensions

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
runqemu-internal: support for ext2 and ext4 not only ext3

Don't check only for ext3 fstype, we can boot ext2 and ext4 just
as well.

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
imagetest-qemu.bbclass, qemuimage-testlib: add support for more FSTYPES

qemuimage-testlib hardcodes ext3 as fs type. This adds support for more
images types which are supported by runqemu: ext[234]/jffs2/btrfs.

I've skipped (for now) vmdk (which qemu can boot) because:
 - we don't have network on images without connman because of the way
runqemu starts vmdk images (can't pass kernel args for network config)
 - qemuimage-testlib-pythonhelper relies on '192.168' being in the output of
ps to return the pid

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tcp-wrappers: Rename conflicting variable STRINGS in Makefile

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
tcp-wrappers: fix indentation

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bitbake.conf: export STRINGS

* remove STRINGS export from systemd

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
librsvg: update gdk-pixbuf loader cache when staging native package

librsvg installs an svg loader for gdk-pixbuf; in order for the native version
of the loader to be usable by gdk-pixbuf-native we have to update the loader
cache.

Signed-off-by: Tomas Frydrych <tomas@sleepfive.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
libmpc: upgraded to 1.0.1

License changed from LGPLv2 to LGPLv3.
The automake patch was integrated upstream in a different form.

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
python-scons: upgraded to 2.3.0

"2013" was added in the 'Copyright' line in LICENSE.txt.

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
git: upgrated to 1.8.2.2

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
bison: upgraded to 2.7.1

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
iptables: upgrade to 1.4.18

fix-link-failure-ip6t-NETMAP.patch removed;
already included in upstream.

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>