pseudo: fix memory leak and missed privilege drop

qemu.bbclass adds PSEUDO_UNLOAD=1 in qemu_run_binary to avoid reference to
pseudo functions that may not exist in the target environment.  This patch
detects the addition of that variable within the environment to which the
call applies, even if not present in the parent environment.

As a side effect it fixes a memory leak.

[YOCTO #4843]

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
distcc: add init.d/distcc status command for LSB compliance

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
irda-utils: add init.d/irattach status command for LSB compliance

Signed-off-by: Roy.Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
acpid: install events directory at default.

acpid: install events directory at default.

If rule directory "${sysconfdir}/acpi/events" is inexist,
the acpid initscript will exit with success, but the daemon will be not running.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
acpid: print message if rule directory is inexist

acpid: print message if rule directory is inexist

If rule directory is inexist, the acpid initscript will exit with success,
but the daemon will be not running.
Print message in this case to tell user that the daemon is not running.

Signed-off-by: Bian Naimeng <biannm@cn.fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
busybox-syslog: add configuration file /etc/syslog.conf

By default, busybox has CONFIG_FEATURE_SYSLOGD_CFG enabled, but it
doesn't ship a configuration file.

This patch adds a configuration file (/etc/syslog.conf) to the
busybox-syslog package. This configuration file mainly serves as a
placeholder now.

The advantages of this change are:
1. Make the users aware of the fact that the /etc/syslog.conf file
   will actually be parsed by busybox's syslogd utility. And configuring
   that file will change the logging behaviour.
2. In a systemd based system, this file will prevent the same configuration
   file provided by the sysklogd package from messing things up.

[YOCTO #5066]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
sysklogd: lower the ALTERNATIVE_PRIORITY in case of systemd

The sysklogd package hasn't got systemd support yet. So in case of
a systemd based system, the commands and corresponding configuration
files should have a lower priority than that of the busybox's syslogd
and klogd utilities. These two utilities from busybox have internal
systemd support if CONFIG_FEATURE_SYSTEMD is enabled. And that config
item is enabled by default.

[YOCTO #5066]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
waf.bbclass: add waf build system class

Add a new build system class for waf.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
eglinfo: add recipes for x11 and fb backends

eglinfo is a small utility for printing out information about EGL as well
as about its client APIs, OpenGL / OpenGLES 1.x / OpenGLES 2.x / OpenVG.

Recipe originally by Carlos Rafael Giani <dv@pseudoterminal.org>.

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

Since its initial commit from the classic OpenEmbedded repository
in 43e94412c45b4b79485a64010c76d89b245bb235, serialization was
commented out, reportedly due to some issue with powerpc in the
boost version 1.36. In the classic OpenEmbedded repository,
serialization has been added again since version 1.4x.

The commit removes the outdated comment and adds serialization to
the BOOST_LIBS after testing `bitbake boost` and bitbaking some
applications using boost from the meta-ros layer for qemuppc.

Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
chkconfig: remove linuxstdbase symlinks

These links were moved to the lsb package because lsbsetup was to be
removed.  Subsequently an earlier patch that moved them to chkconfig was
also merged.  This results in duplicate installations that generate a
warning when building core-image-lsb under DISTRO=poky-lsb which enables the
linuxstdbase feature.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oeqa/oetest: oeRuntimeTest: enable long messages

Set longMessage to True for all tests derived from oeRuntimeTest, in
order to have somewhat info on assertions with cryptic or no messages.

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oeqa/utils/sshcontrol: tweak ssh options

Add ssh_options to be used, the same, by ssh and scp:
Decrease LogLevel to ERROR, to suppress warnings (e.g. ssh host
verifications, two warnings in case of having openssh with hpn patches);
We no longer presume that the first line is a warning.

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
oeqa/runtime/scp: replace dd call

Use a file object to generate a our test file instead of calling `dd`;
removes dd's output from testimage.log, keeps unittest output clean.
Also remove unused imports.

Signed-off-by: Mihai Lindner <mihaix.lindner@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
local.conf.sample.extended: Add an example of how to enable fortran

Add an example of how to enable FORTRAN from local.conf. Make
it clear this is not officially supported.

[YOCTO #5091]

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>
kernel.bbclass, image.bbclass: Implement kernel INITRAMFS dependency and bundling

This patch aims to fix the following two cases for the INITRAMFS generation.
  1) Allow an image recipe to specify a paired INITRAMFS recipe such
     as core-image-minimal-initramfs.  This allows building a base
     image which always generates the needed initramfs image in one step
  2) Allow building a single binary which contains a kernel and
     the initramfs.

A key requirement of the initramfs is to be able to add kernel
modules.  The current implementation of the INITRAMFS_IMAGE variable
has a circular dependency when using kernel modules in the initramfs
image.bb file that is caused by kernel.bbclass trying to build the
initramfs before the kernel's do_install rule.

The solution for this problem is to have the kernel's
do_bundle_initramfs_image task depend on the do_rootfs from the
INITRAMFS_IMAGE and not some intermediate point.  The image.bbclass
will also sets up dependencies to make the initramfs creation task run
last.

The code to bundle the kernel and initramfs together has been added.
At a high level, all it is doing is invoking a second compilation of
the kernel but changing the value of CONFIG_INITRAMFS_SOURCE to point
to the generated initramfs from the image recipe.

[YOCTO #4072]

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Acked-by: Bruce Ashfield <bruce.ashfield@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
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>