libudev: clarify that udev_monitor_receive_device() is non-blocking

Based on a patch from: Sam Thursfield <ssssam@gmail.com>
https://bugs.freedesktop.org/show_bug.cgi?id=51202
systemd: return error when asked to stop unknown unit

Command systemctl stop foo.service, will print error message, when
foo.service is unknown to systemd, i.e. there is no unit file loaded for
this service.
https://bugzilla.redhat.com/show_bug.cgi?id=732874
vconsole-setup: enable utf-8 mode explicitly

Rather than assuming the console is in utf-8 mode if nothing else is
specified, be a bit more robust and enable it explicitly.

This fixes a regression compared with Arch's initscripts when not
using a framebuffer as the old VGA console would not be in utf-8
mode by default.

Furthermore, this would allow vconsole-setup to be used after boot
to change the vconsole into utf-8 mode in case it has been set to
non-utf-8 mode for whatever reason. I.e, the following would leave
the console in utf-8 mode as expected:

 # export LANG=en_US.ISO-8859-1
 # /usr/lib/systemd/systemd-vconsole-setup
 # export LANG=en_US.UTF-8
 # /usr/lib/systemd/systemd-vconsole-setup

Reported-by: Xyne <xyne@archlinx.ca>
Reported-by: Thomas Bächler <thomas@archlinux.org>
Cc: Dave Reisner <dreisner@archlinux.org>
login: initialize XDG_RUNTIME_DIR as /run/user/$UID instead of /run/user/$USER

The sssd folks would like to place the kerberos credential cache in
XDG_RUNTIME_DIR, but need to do that in the PAM auth hooks, before
pam_systemd is run as part of the PAM session setup. Hence, in order to
make this easy for them: avoid usage of usernames, and use user IDs
instead thus making an additional NSS lookup unnecessary in the kerberos
bits, but still have the directory well-defined so that the kerberos
bits can determine it before pam_systemd is run.
analyze: Python 3 compatibility

Plot verb doesn't currently work b/c Cairo bug sending to stdout in python 3.
tmpfiles: exclude the first level directories in /run/user from automatic clean up

It's logind's job to maintain those user dirs, so avoid automatic clean
up for them. However, we do cover everything within them.
update TODO
update TODO
logind: expose CanGraphical and CanTTY properties on seat objects

Since we boot so fast now that gdm might get started before the
graphics drivers are properly loaded and probed we might end up
announcing seat0 to gdm before it has graphics capabilities. Which will
cause gdm/X11 cause to fail later on.

To fix this race, let's expose CanGraphical and CanTTY fields on all
seats, which clarify whether a seat is suitable for gdm resp, suitable
for text logins. gdm then needs to watch CanGraphical and spawn X11 on
it only if it is true.

This way:

USB graphics seats will expose CanGraphical=yes, CanTTY=no

Machines with no graphics drivers at all, but a text console:
CanGraphical=no, CanTTY=yes

Machines with CONFIG_VT turned off: CanGraphical=yes, CanTTY=no

And the most important case: seat0 where the graphics driver has not
been probed yet boot up with CanGraphical=no, CanTTY=yes first, which
then changes to CanGraphical=yes as soon as the probing is complete.
logind: introduce a state for session, being one of online, active, closing

online = logged in
active = logged in and session is in the fg
closing = nominally logged out but some left-over processes still around

Related to:

https://bugzilla.gnome.org/show_bug.cgi?id=677556
man: document new sd_session_get_state() call
login: wrap CanTTY and CanGraphical seat attributes in libsystemd-login
rpm: include RPM macro definition for .spec snippets

Let's try to standardize a bit the RPM macros used for
installing/uninstalling services.

This only covers the non-SysV compat bits, since that tends to vary
widely between the various distros.

Usage:

Add %{?systemd_requires} to the header of the spec file. And then:

%post
%systemd_post foobar.service

%preun
%systemd_preun foobar.service

%postun
%systemd_postun foobar.service

And, instead of the latter, in case the service shall be restarted on updates:

%postun
%systemd_postun_restart foobar.service
man: document the new RPM macros in daemon(7)
preset: don't look for preset files in /lib unless /usr is split off
readahead: merge three binaries into one

since the binaries share much of the same code and we better load only
one binary instead of two from disk at early boot let's merge the three
readahead binaries into one. This also allows us to drop a lot of
duplicated code.
readahead: make use of util.h's page_size() call
readahead: use log_error() for logging errors
readahead: make sure to close pack file before exiting, to be valgrind clean
readahead: minor code style fixes