bitbake: compile tar-replacement firstly

Compiling tar-replacement or not is decided by version of host tar,
if the host tar version is lower than 1.23, Compiling tar-replacement
is needed.

When doing popoluate tar-replacement sysroot to write the tar to
sysroot, but writing is not finished. other packages probably
use the being written tar to unzip file, which will lead to failure
and report the below error:
"bitbake_build/tmp/sysroots/x86_64-linux/usr/bin/tar: Text file busy"

Now we compile tar-replacement firstly to ensure that a being written
tar command will not be used.

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
e2fsprogs: Fully remove/disable blkid

We've removed libblkid from e2fsprogs as it was being provided by util-linux. The blkid
binary is also provided there and providing it within e2fsprogs too, linked against
a different and potentially incompatible library we're likely asking for trouble.

It also leads to inconsistencies in the native sysroot since we don't consistently
get one given provider of blkid (but always the liblibid from util-linux).

To clean this up, fully remove/disable the blkid binary and package.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
e2fsprogs: Drop fsck binary

There are conflicts in the native sysroot over the fsck binary. Whilst
providing people with alternatives is good to a point, the source in util-linux
is clearly the copy which is now being maintained and moved forwards which the copy
in e2fsprogs being older and with less features.

The simplest solution is simply to no longer offer this and used the maintained
version from util-linux.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
udev: Drop hid2hci, its provided by bluez4 now

Our bluez4 recipe provides hid2hci now. udev removes this as of version 169,
we might as well remove it now to stop conflicts over the file in both
target file systems and the build sysroots.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
staging.bbclass: Might as well drop the applications, fonts and pixmap directories from ${datadir}

These cause various file conflicts and aren't useful within the sysroot anyway. We might
as well remove them. Whitelisting the contents of ${datadir} that *is* useful might
be a better option in future.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
ia32-base.inc: new include file

This is the ia32-base.inc moved over from meta-intel.  See meta-intel
for the complete history of contributions to this file.

Here's the initial commit text that explains the purpose of this file:

  The meta-intel BSPs currently have a number of machine settings common
  to all - factor these out into a common include file.

  Also add several new intel-specific XSERVER variables for building
  XSERVER variables in BSPs.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
archiver.bbclass: indent fixes

Several fixes:
* It uses mixed tab and whitespace as the indent in one function,
  Fix them to use "4 spaces" as the indent.

* Remove the unwanted blank, for example, more than one blank lines
  appeared together.

* Remove the tail whitespace.

[YOCTO #2619]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
archiver.bbclass: fix the coding style

* Make the comment line under 80 characters.
* Use the triple double quotes for the docstring.
* Add a whitespace behind the comma (,).
* Other minor fixes.

[YOCTO #2619]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
archiver.bbclass: fix the fakeroot and other issues

* Fix the fakeroot issue
  The archiver.bbclass is used for archiving sources, patches, and logs,
  it uses the "rpmbuild -bs" from the package_rpm.bbclass to generate the
  .src.rpm, but it didn't work (it's not easy to explain it clearly):

  Reason:
  - It directly used the "fakeroot" command, we don't have such a
    command in native tools, so it would use the fakeroot from the host,
    and it would fail when there is no fakeroot on the host.

  - The "rpmbuild -bs" doesn't need to work under root, but it is in the
    function do_package_write_rpm which is running under fakeroot, and
    "rpmbuild" needs to know the source file's user/group name, the source
    file is the tarball which is created by the postfuncs of do_unpack
    or do_patch which doesn't use the fakeroot, so the created file's
    owner would be the real user, e.g.: robert, but there is no such a
    user under our native tools' fakeroot(pseudo), then the rpmbuild would
    fail. It worked when use the host's fakeroot in the past was because
    that the host's fakeroot knows the users on the host.

  Fix:
  - Remove the incorrect "fakeroot".

  - Change the source file's owner to root.root under fakeroot will fix the
    problem.

* Other fixes:
  - The typo: "do_remove_taball -> do_remove_tarball" which will cause the
    tarball is not removed.

  - Add the _sourcedir defination to the rpmbuild command since the the
    SOURCES would be added to the specfile when archiver.bbclass is
    inherited, otherwise there would be errors when "rpmbuild -bb", though
    the build is OK. It only added the defination to "rpmbuild -bs",
    didn't add to "rpmbuild -bb".

[YOCTO #2619]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
archiver.bbclass: remove the "upper()" function

The configuration value from the conf file is lower case, e.g. srpm,
tar, so there is no reason to use the upper case which makes things
complicated.

[YOCTO #2619]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
copyleft_compliance.bbclass: remove the duplicated code

A part of the code in copyleft_compliance.bbclass is duplicated to
archiver.bbclass, remove the duplicated lines.

[YOCTO #2619]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
archiver.bbclass: fix the remove error

* The "tar-package" is used for saving the "Source" list for rpmbuild,
  there is no such a file when "ARCHIVER_MODE[type] ?= srpm", and there
  would be errors, it hadn't happen before was becuase that the remove
  function didn't work. Let the "rpmbuild --rmsource" to remove the
  Sources, and the remove function will just remove the tar-package file.

* Remove several unwanted "try ... exception" sentences, let the error
  raise rather than ignore them when the error happens.

* Remove several un-needed code.

[YOCTO #2619]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
perf: add bison and flex to DEPENDS

perf depends on bison and flex for event parsing - add them as
dependencies.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
ethtool: package update 3.4.1 -> 3.5

Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
runqemu-export-rootfs and friends: don't put pseudo db in target fs

In a few places, we have scripts which use <rootfs>/var/pseudo for
the pseudo state directory controlling a given filesystem. This
seems possibly risky because it means that stuff running under
qemu or whatnot could wipe out the data being used to handle that
rootfs. Move this to:
  <rootfs>/../$(basename_rootfs).pseudo_state
to avoid problems.

This also solves at least one case (not directly hit by yocto's
tree) wherein you could end up trying to remove a rootfs while
pseudo was using a database inside that rootfs, and thus the
remove would fail.

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
intltool: Add Upstream-Status and Signed-off-by to remove-xml-check.patch

Signed-off-by: Florin Sarbu <florin.sarbu@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
gail: remove

This functionality was integrated into GTK+ 2.13 and we've dropped support for
anything before that.

[ YOCTO #2954 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>