rpcbind: Make user's home directory /

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
xserver-nodm-init: Only start in runlevel 5

Runlevel 3 is often multi-user without X, so don't start the X
server in runlevel 3. This allows one to start up a machine without
X running from the bootloader.

Signed-off-by: Dan McGregor <dan.mcgregor@usask.ca>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/contrib/build-perf-test: Update eglibc -> glibc

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
piglit: add bash to RDEPENDS_piglit

Bash:
piglit/usr/lib/piglit/tests/asmparsertest/make_test_list.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/asmparsertest/vp-tex.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/spec/glsl-1.10/variable-index-read.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/spec/glsl-1.10/variable-index-write.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/spec/arb_shader_texture_lod/compiler/make_tex_lod_tests.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/spec/glsl-1.20/execution/outerProduct-const.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/spec/glsl-1.20/execution/outerProduct.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/spec/glsl-1.20/compiler/built-in-functions/outerProduct-invalid-parameters.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/glslparsertest/glsl2/make_tex_lod_tests.sh:#!/bin/bash
piglit/usr/lib/piglit/tests/glslparsertest/glsl2/make_tex_rect_tests.sh:#!/bin/bash

The bash scripts are in the tests directory, we had planned to move the
tests into the ptest pkg, but that would make piglit unusable without
installing piglit-ptest.

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
qemu-native: only depends on libxext-native when x11

Fixed when build without x11 in DISTRO_FEATURES:
ERROR: libxext-native was skipped: missing required distro feature 'x11' (not in DISTRO_FEATURES)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: upgrade to 216

Upgrade systemd from 213 to 216.

systemd-older-kernel.patch is removed as it's fixed in 216.

0001-uClibc-doesn-t-implement-pwritev-preadv.patch is removed because
the file it patches has been removed from the project.

0001-util-Including-missing.h-to-get-MAX_HANDLE_SZ.patch is removed because
it has been merged.

0001-missing.h-add-fake-__NR_memfd_create-for-MIPS.patch is backported
to fix compilation error for mips.

Below are the required kernel versions for systemd 216.
        Linux kernel >= 3.0
        Linux kernel >= 3.3 for loop device partition support features with nspawn
        Linux kernel >= 3.8 for Smack support

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: add PACKAGECONFIG for 'journal-upload'

Add PACKAGECONFIG for 'journal-upload' and disable it by default.
Once enabled, it will add 'curl' to its dependency.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: make runlevel work in non-runlevel targets

Previously, after booting into the targets like multi-user.target or
graphical.target, the output of `runlevel' command is 'unknown'.

This is confusing for users. Normally, we would expect mutli-user.target
would have a `runlevel' output of 'N 3'.
This is the behaviour of Fedora20.

This patch installs symlinks for systemd-update-utmp-runlevel.service
in do_install task to fix the above problem.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
update-rc.d: fix logic in populate_packages_updatercd

The 'and' logic for the check is wrong. To make things clear, please
see the example below.

Say that we have a recipe A, which has a sysv-init style init script named
initA and no corresponding service file. The recipe inherits update-rc.d,
but it doesn't inherit systemd.bbclass. The DISTRO_FEATURES has 'systemd'
inside it, but it doesn't have 'sysvinit'. Now if we build an image, with
the 'and' logic in the check, the symlinks for initA would not be installed
into /etc/rc?.d directory.
This is incorrect. Because there's no corresponding service. The symlinks
in /etc/rc?.d/ should be created so that the service would be correctly
started at boot time.

The logic should really be 'or' in the check. This is actually what the code
was when it was originally written.

Several different situations are listed below to prove the correctness of the
'or' logic.

If 'sysvinit' is in DISTRO_FEATURES, the initA script would always be installed
with corresponding preisnt/postinst generated and added.

If 'sysvinit' is not in DISTRO_FEATURES, we have three situations.
1) A has initA and A.service.
   In such situation, systemd.bbclass would set INHIBIT_UPDATERCD_BBCLASS,
   so no preinst/postinst about update-rc.d would be added and the symlinks
   for initA would not be created.

2) A has initA, and the functionality of initA is not implemented internally
   in systemd.
   In such situation, symlinks for initA would be installed.

3) A has initA, and the functionality of initA is implemented internally in
   systemd or in some other recipe.
   Examples for such situation are alsa-state and keymaps in OE.
   In such situation, we need to set INHIBIT_UPDATERCD_BBCLASS in the recipe
   so that there would be no preinst/postinst scripts about update-rc.d added.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
alsa-state: fix pkg_postinst and set INHIBIT_UPDATERCD_BBCLASS

As alsa-state inherits update-rc.d, the update-rc.d part inpostinst script
has already been handled in update-rc.d.bbclass.

Besides, we need to set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit'
is not in DISTRO_FEATURES. This is because the init script is not installed
in such situation, adding update-rc.d part in the preinst/postinst scripts
just makes no sense.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
keymaps: fix for systemd

Only install 'keymap.sh' script if 'sysvinit' is in DISTRO_FEATURES.
This is because systemd internally provides a mechanism to implement
the functionality this script tries to implement. Please see
systemd-vconsole-setup.service for more details.

Also we set 'INHIBIT_UPDATERCD_BBCLASS' to "1" if 'sysvinit' is not
in DISTRO_FEATURES.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: add kbd-keymaps to RRECOMMENDS of systemd-vconsole-setup

systemd-vconsole-setup.service not only configures font but also
keymaps.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
v86d: set INHIBIT_UPDATERCD_BBCLASS if 'sysvinit' not in DISTRO_FEATURES

Set INHIBIT_UPDATERCD_BBCLASS to "1" if 'sysvinit' is not in DISTRO_FEATURES.

The functionality of the init script 'fbsetup' is implemented internally in
systemd. So fbsetup is not installed if 'sysvinit' is in DISTRO_FEATURES.

That's why we need to set INHIBIT_UPDATERCD_BBCLASS to "1" to avoid
generation of update-rc.d related preinst/postinst scripts.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
systemd: add support for executing scripts under /etc/rcS.d

This patch adds support for systemd to execute scripts under /etc/rcS.d.

To be compitable, all services translated from /etc/rcS.d/ scripts would
run before services translated from /etc/rcN.d scripts.

[YOCTO #5159]

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
dhcp: add systemd service files

Add dhcpd.service and dhcrelay.service to support systemd systems.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
acpid: upgrade to 2.0.22 and add systemd support

For acpid needs to upgrade to work correctly with the new kernel.
The new version now uses autotools.

Also add systemd unit file.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cups: make cups daemon start correctly

The cups daemon needs the lpadmin group to start correctly.

Also add 'procps' to RDEPENDS if 'sysvinit' is in DISTRO_FEATURES,
because the init script shipped with cups needs it.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
cups: add systemd support

Add systemd unit files.

Also remove sysvinit related files if 'sysvinit' is not in
DISTRO_FEATURES.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
rpcbind: avoid entering failed status after stopping daemon

Exiting with '2' is actually expected with rpcbind, because it catches
SIGTERM and exits with '2' explicitly.

The related code is as follows.

(void) signal(SIGTERM, terminate);

/*
 * Catch the signal and die
 */
static void
terminate(int dummy /*__unused*/)
{
        close(rpcbindlockfd);
        unlink(_PATH_RPCBINDSOCK);
        unlink(RPCBINDDLOCK);
        syslog(LOG_ERR,
                "rpcbind terminating on signal. Restart with \"rpcbind -w\"");
        write_warmstart(); /* Dump yourself */
        exit(2);
}

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
at: remove dependency on initscripts

The 'at' package actually doesn't have runtime dependency on
VIRTUAL-RUNTIME_initscripts, so remove this dependency.

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>