gcc-runtime: Add packaging for libgfortran (and also tweak others)

Add packaging for libgfortran and libquadmath as well as tweak the packaging
for libmudflap since it was broken.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
useradd: Handle users from a package being used in others

If there is a package A (TUNE_PKGARCH) which is depended upon by B which
is MACHINE_ARCH and you build B for machine X, then Y, the user isn't
present in the sysroot for machine Y since the useradd code is never
triggered.

The change ensures the code does get triggered and the user is present.

[YOCTO 4739]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package_rpm.bbclass: Fix no_recommendations and package_exclude

When the code was refactored to address review comments, the wrong version
was sent to the community.  Replace the $1 with ${target_rootfs}

Fix identified by: Yue Tao <yue.tao@windriver.com>

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
connman: Ignore the NFS root network interface in init script

The connman init.d script tried to ignore all the network interfaces
if NFS root is configured. We should only ignore the interface
that is used by NFS root.

[YOCTO #4587]

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
package.bbclass: skip already-stripped QA test if asked for

Some packages like grub have already stripped binaries e.g.

ERROR: QA Issue: File '/boot/grub/kernel.img' from grub was already
stripped, this will prevent future debugging!
ERROR: QA run found fatal errors. Please consider fixing them.

We would like to have a possibility to skip it using something like

INSANE_SKIP_${PN} = "already-stripped"

This adds the logic to do so

it acts at PN level and not at package level. so something like

INSANE_SKIP_${PN}-misc = "already-stripped" wont work.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
run-postinsts: move script execution from S98 to S99 in rcS.d

Apparently, when opkg/dpkg and run-postinsts are installed in the same
time, opkg/dpkg postinstall overwrites the run-postinsts link in rcS.d.
This will make run-postinsts script useless and the delayed postinstalls
will not be run.

This issue happens only when 'package-management' is disabled and, in
the same time, dpkg/opkg ends up in the image: either pulled by some
dependency or manually installed.

With this patch, both opkg/dpkg and run-postinsts scripts will run but
the former will silently fail because the package metadata is removed from
the image since 'pacakge-management' is disabled.

[YOCTO #4484]

Signed-off-by: Laurentiu Palcu <laurentiu.palcu@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
devshell: Don't corrupt the fakeroot variables

The devshell anonymous python fragment overwrites variables in the
datastore with their expanded versions. If this runs before the code
in allarch.bbclass which changes TARGET_OS, we can end up with different
directories in the fakeroot environment variables, some expanded with
the original TARGET_OS value.

The devshell code only needs to run before the task itself so we change
to trigger it to run at task execution time only using a flag.

[YOCTO #4795]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-firmware: correct name of Marvell license file

Follow upstream in changing the name of the license file for Marvell
firmware:

  commit 2e79e60b7e4771427327ed508fa27b90d841afcb
  Author: Bing Zhao <bzhao@marvell.com>
  Date:   Fri Jan 7 16:06:56 2011 -0800

    linux-firmware: use single license file for Marvell firmwares

    Libertas and mwl8k firmware images are under the same license.

    Signed-off-by: Bing Zhao <bzhao@marvell.com>
    Signed-off-by: Brian Cavagnolo <brian@cozybit.com>
    Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

  :000000 100644 0000000... 3224e1b... A  LICENCE.Marvell
  :100644 000000 1fd8766... 0000000... D  LICENCE.libertas
  :100644 000000 3224e1b... 0000000... D  LICENCE.mwl8k
  :100644 100644 d0740ce... 35b82c8... M  WHENCE

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-firmware: package Marvell SD8787 firmware

Also split out Marvell license as separate package.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oeqa/runtime: add basic scanelf test

This uses scanelf from the pax-utils package and scans the binaries in PATH
for TEXTREL and RPATH information. For a sato image with pax-utils installed
it shows no output (which is good).

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
resolvconf: specify configuration for systemd-tmpfiles --update

Running systemd-tmpfiles --update without specifying a configuration
file results in all tmpfiles.d configuration files being processed.

/usr/lib/tmpfiles.d/systemd.conf creates /run/nologin on boot to
prevent non-root users from logging in while the system is booting.
If systemd-tmpfiles --update is run after the system has started,
it will still create /run/nologin which would prevent non-root users
from logging in with the message "System is booting up.".

Signed-off-by: Jonathan Liu <net147@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
core-image-directfb: Use 'distro_features_check' class

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
core-image-weston: Ensure wayland distro feature is enabled

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
lib/oeqa/qemurunner: Use a timeout in select() call

A 0 value to select.select() immediately returns with no timeout. This was
pegging the cpu at 100% for the python process which was bad and may be
contributing to some of the timeout problems.

Profile from -P of a core-image-minimal before:

    97526792 function calls (97525652 primitive calls) in 45.189 seconds

and after:

       50204 function calls (49064 primitive calls) in 17.318 seconds

Saving 97.5 million function calls has to be good :)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: split out systemd-binfmt as a separate package

If binfmt_misc was compiled as a module but isn't installed then systemd-binfmt
will put an automounter on /proc/sys/fs/binfmt_misc and when it attempts to
automount (e.g. when df is called) it can't find support for the filesystem, and
throws an error.

As binfmt_misc isn't commonly used, split this helper into it's own package, add
a dependency on kernel-module-binfmt-misc, and ensure the service gets started
when it's installed.

[ YOCTO #4863 ]

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

Bluez5 doesn't install libbluetooth by default. This is required
by connman, ofono or other packages.

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
bluez5: Rename tests package to testtools

Bluez5 ships some tools that can be used to test its
functionality.

The installation can be tested using "make check" and
this should be included in a ptest package.

[YB #5028]

Signed-off-by: Mihai Prica <mihai.prica@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
linux-yocto/3.10: update meta SRCREV for beagleboard config changes

Updating the beagleboard configuration to match the 3.10 kernel changes.
With this, the beagle* boards boot out of the box, with no additional
changes required.

Simarpreet Singh <simar@linux.com>
Signed-off-by: Liming Wang <liming.wang@windriver.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kernel-yocto: improve error checking on non-git repos

While non-git kernel repos are not the preferred format for a kernel upstream,
they are supported. Depending on the creator of the archive the expanded
source directory name varies. If the recipe for the kernel doesn't properly
set S to the right value, a cryptic git error message is produced. We can
detect the situation and offer some advice on how to fix the issue.

A second check is also added in this commit for archive based kernel repos
which won't have a SRCREV to validate. If we have no SRCREV or SRCREV is
INVALID, we can exit the branch validation step immediately. This saves yet
another cryptic git error message and simplifies a custom tgz based recipe.

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
kern-tools: support no author patches

Updating the kern-toosl SRCREV to pick up the following fix:

    previous versions of the kern-tools supported the ability to import a bare
    patch, with no From: Subject: or other identifying fields that are typically
    in a full commit.

    The same type of commit with kgit-s2q will prompt for a author ID, just
    as git-quilt-import does. In build system environment that leads to an
    infinite loop and the commit is never pushed.

    To fix this issue, we add an interactive flag (-i), that when passed the
    prompt based behaviour is used. When it isn't passed (the default), the following
    name and email will be used for the git author:

       GIT_AUTHOR_NAME="invalid_git config"
       GIT_AUTHOR_EMAIL="<unknown@unknown>"

    And a bare/incomplete header patch will be applied.

[YOCTO #5100]

Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>