dbus patch: update to latest revision
Merge pull request #3 from phmccarty/dbus-patch

dbus patch: update to latest revision
Merge pull request #2 from phmccarty/master

Two improvements for user-session@.service
dbus patch: update to dbus-1.6.8

Fuzzy patches make me nervous
Merge pull request #4 from mmonaco/master

dbus-1.6.8
Explicitly stop systemd user session units at shutdown.

Taken from:
  http://gitweb.merproject.org/gitweb?p=mer-core/systemd.git;a=patch;h=18ee801483fc71f4c423c8e16b039f5902e879b9
See also:
  https://bugs.nemomobile.org/show_bug.cgi?id=502

This is a stop-gap measure to shutdown any remaining user-session's.

Systemd still has a race (even in 195) that kills the logic in
user sessions before it can properly exit that same user session. Hence,
the user sessions time out shutting down for 90 seconds. This unit
forces the shutdown procedure again which works.

This is not supposed to be a final solution, which is why I'm
merging it here instead of pushing this fix to systemd itself. Ultimately
this patch needs to be dropped and the original logic made functional.

Thanks to the Mer project for coming up with this one.

=======
From 18ee801483fc71f4c423c8e16b039f5902e879b9 Mon Sep 17 00:00:00 2001
From: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
Date: Thu, 11 Oct 2012 12:07:07 +0300
Subject: [PATCH] Added file /lib/systemd/system/systemd-stop-user-sessions.service
 Fixes NEMO#502: Shutdown is not working properly when systemd user session is used

Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
---
 systemd-stop-user-sessions.service |   20 ++++++++++++++++++++
 systemd.changes                    |    4 ++++
 systemd.spec                       |    6 ++++++
 3 files changed, 30 insertions(+), 0 deletions(-)
 create mode 100644 systemd-stop-user-sessions.service

diff --git a/systemd-stop-user-sessions.service b/systemd-stop-user-sessions.service
new file mode 100644
index 0000000..ce24c0f
--- /dev/null
+++ b/systemd-stop-user-sessions.service
@@ -0,0 +1,20 @@
+#  This file is part of systemd.
+#
+#  systemd is free software; you can redistribute it and/or modify it
+#  under the terms of the GNU Lesser General Public License as published by
+#  the Free Software Foundation; either version 2.1 of the License, or
+#  (at your option) any later version.
+
+[Unit]
+Description=Disable User Sessions
+Documentation=man:systemd-user-sessions.service(8)
+Before=shutdown.target
+DefaultDependencies=no
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+ExecStart=/lib/systemd/systemd-user-sessions stop
+
+[Install]
+WantedBy=shutdown.target
diff --git a/systemd.changes b/systemd.changes
index caadfbd..5865f2b 100644
--- a/systemd.changes
+++ b/systemd.changes
@@ -1,3 +1,7 @@
+* Thu Oct 11 2012 Pekka Lundstrom <pekka.lundstrom@jollamobile.com> - 187
+- Added file /lib/systemd/system/systemd-stop-user-sessions.service
+  Fixes NEMO#502: Shutdown is not working properly when systemd user session is used
+
 * Mon Aug 27 2012 Marko Saukko <marko.saukko@jollamobile.com> - 187
 - Fix tty1 autostart by excluding the file in /etc/systemd/system/getty.target.wants/

diff --git a/systemd.spec b/systemd.spec
index 607570e..9c78060 100644
--- a/systemd.spec
+++ b/systemd.spec
@@ -28,6 +28,7 @@ Requires:       filesystem >= 3
 # fsck with -l option was introduced in 2.21.2 packaging
 Requires:       util-linux >= 2.21.2
 Source0:        http://www.freedesktop.org/software/systemd/%{name}-%{version}.tar.xz
+Source1:        systemd-stop-user-sessions.service
 Patch0:         systemd-185-pkgconfigdir.patch
 Patch1:	        systemd-187-reintroduce-support-for-deprecated-oom.patch
 Patch2:		systemd-187-video.patch
@@ -255,6 +256,11 @@ rm %{buildroot}/%{_docdir}/systemd/*

 mkdir -p %{buildroot}/etc/systemd/system/basic.target.wants

+# Fix shutdown hang problem with user-serssions
+install -D -m 644 %{SOURCE1} %{buildroot}/lib/systemd/system/systemd-stop-user-sessions.service
+mkdir -p %{buildroot}/lib/systemd/system/shutdown.target.wants
+ln -s ../systemd-stop-user-sessions.service %{buildroot}/lib/systemd/system/shutdown.target.wants/systemd-stop-user-sessions.service
+
 #console-ttyMFD2
 ln -s ../serial-getty@.service %{buildroot}/lib/systemd/system/getty.target.wants/serial-getty@ttyMFD2.service
Rev to v6.
Make sure we kill getty@tty1.service.

getty@tty1.service needs to be disabled if you run X on
tty1. This Conflicts makes sure it is.
Correct base license, rev to v7 for upcoming release.

This was never intended to be GPLv3, instead I'm pulling the license
from systemd as quite a few of the files are derivative of the
systemd versions.
Update some parts of the README.
configure: don't error if X isn't found, just warn

X is needed by the current user units, but Wayland-based units could be here one
day and when cross-compiling X isn't a true build requirement.

Signed-off-by: Ross Burton <ross.burton@intel.com>
Allow this unit to be used with systemctl enable
Update unit file to reflect some changes:

- cgroup path name
- mem_cg hints
- systemctl enable
- dbus path set with %U
openbox: Add units for Openbox

These are installed conditionally, only when Openbox is present.
Units for Steam - big picture mode.

These are useful for folks making a "steambox", or just to
close all your other appps while gaming. You can of course

   systemctl --user isolate steam.target

to switch to this.

Note that you probably should still run a window manager by
linking e.g. xfwm4.service into steam.target.wants.
Set Restart=on-failure for all relevant units.

This is a decent default for all of these units.
v8
Don't use %u in Description fields.