[ConsoleKit/f14/master] Fix systemd execution ordering
Lennart Poettering
lennart at fedoraproject.org
Tue Sep 14 02:21:51 UTC 2010
commit 73f1b064a9347985138add03d4a2c9a18cb3e908
Author: Lennart Poettering <lennart at poettering.net>
Date: Tue Sep 14 04:21:04 2010 +0200
Fix systemd execution ordering
...e-sure-the-file-system-is-writable-before.patch | 59 ++++++++++++++++++++
ConsoleKit.spec | 20 ++++++-
2 files changed, 77 insertions(+), 2 deletions(-)
---
diff --git a/0001-systemd-make-sure-the-file-system-is-writable-before.patch b/0001-systemd-make-sure-the-file-system-is-writable-before.patch
new file mode 100644
index 0000000..5aa97af
--- /dev/null
+++ b/0001-systemd-make-sure-the-file-system-is-writable-before.patch
@@ -0,0 +1,59 @@
+From c163d26a97f4f69422ec4ea0cfe4c7e211d824c1 Mon Sep 17 00:00:00 2001
+From: Lennart Poettering <lennart at poettering.net>
+Date: Tue, 14 Sep 2010 01:08:06 +0200
+Subject: [PATCH] systemd: make sure the file system is writable before we write log data
+
+---
+ data/console-kit-log-system-restart.service.in | 3 ++-
+ data/console-kit-log-system-start.service.in | 3 ++-
+ data/console-kit-log-system-stop.service.in | 3 ++-
+ 3 files changed, 6 insertions(+), 3 deletions(-)
+
+diff --git a/data/console-kit-log-system-restart.service.in b/data/console-kit-log-system-restart.service.in
+index 905b330..ad8f624 100644
+--- a/data/console-kit-log-system-restart.service.in
++++ b/data/console-kit-log-system-restart.service.in
+@@ -1,8 +1,9 @@
+ [Unit]
+ Description=Console System Reboot Logging
+ DefaultDependencies=no
++Wants=local-fs.target sysinit.target
++After=local-fs.target sysinit.target console-kit-system-start.service
+ Before=poweroff.service reboot.service halt.service killall.service
+-After=console-kit-system-start.service
+
+ [Service]
+ Type=oneshot
+diff --git a/data/console-kit-log-system-start.service.in b/data/console-kit-log-system-start.service.in
+index 56e1022..ccda7f4 100644
+--- a/data/console-kit-log-system-start.service.in
++++ b/data/console-kit-log-system-start.service.in
+@@ -1,8 +1,9 @@
+ [Unit]
+ Description=Console System Startup Logging
+ DefaultDependencies=no
++Wants=local-fs.target sysinit.target
++After=local-fs.target sysinit.target
+ Before=poweroff.service reboot.service halt.service killall.service
+-After=local-fs.target
+
+ [Service]
+ Type=oneshot
+diff --git a/data/console-kit-log-system-stop.service.in b/data/console-kit-log-system-stop.service.in
+index 3292238..928e6bf 100644
+--- a/data/console-kit-log-system-stop.service.in
++++ b/data/console-kit-log-system-stop.service.in
+@@ -1,8 +1,9 @@
+ [Unit]
+ Description=Console System Shutdown Logging
+ DefaultDependencies=no
++Wants=local-fs.target sysinit.target
++After=local-fs.target sysinit.target console-kit-system-start.service
+ Before=poweroff.service reboot.service halt.service killall.service
+-After=console-kit-system-start.service
+
+ [Service]
+ Type=oneshot
+--
+1.7.2.3
+
diff --git a/ConsoleKit.spec b/ConsoleKit.spec
index 6f2c3dc..582756b 100644
--- a/ConsoleKit.spec
+++ b/ConsoleKit.spec
@@ -6,13 +6,14 @@
Summary: System daemon for tracking users, sessions and seats
Name: ConsoleKit
Version: 0.4.2
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2+
Group: System Environment/Libraries
URL: http://www.freedesktop.org/wiki/Software/ConsoleKit
Source0: http://www.freedesktop.org/software/ConsoleKit/dist/ConsoleKit-%{version}.tar.bz2
# Convert to new upstart syntax
Patch0: ConsoleKit-0.4.1-upstart06.patch
+Patch1: 0001-systemd-make-sure-the-file-system-is-writable-before.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: dbus >= %{dbus_version}
@@ -84,6 +85,7 @@ This package contains developer documentation for ConsoleKit.
%prep
%setup -q
%patch0 -p1 -b .upstart06
+%patch1 -p1 -b .systemd
%build
%configure --with-pid-file=%{_localstatedir}/run/console-kit-daemon.pid --enable-pam-module --with-pam-module-dir=/%{_lib}/security --enable-docbook-docs --docdir=%{_datadir}/doc/%{name}-%{version}
@@ -113,9 +115,20 @@ rm -rf $RPM_BUILD_ROOT
%post
if [ -f /var/log/ConsoleKit/history ]; then
- chmod a+r /var/log/ConsoleKit/history
+ chmod a+r /var/log/ConsoleKit/history
+fi
+if [ $1 -eq 1 ]; then
+ /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+fi
+
+%preun
+if [ $1 -eq 0 ]; then
+ /bin/systemctl stop console-kit-daemon.service >/dev/null 2>&1 || :
fi
+%postun
+/bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
%files
%defattr(-,root,root,-)
%doc %dir %{_datadir}/doc/%{name}-%{version}
@@ -179,6 +192,9 @@ fi
%doc %{_datadir}/doc/%{name}-%{version}/spec/*
%changelog
+* Tue Sep 14 2010 Lennart Poettering <lpoetter at redhat.com> - 0.4.2-2
+- Fix systemd execution ordering
+
* Fri Sep 3 2010 Lennart Poettering <lpoetter at redhat.com> - 0.4.2-1
- New upstream release
More information about the scm-commits
mailing list