summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2011-05-20 12:09:50 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2011-05-20 12:09:50 +0200
commitf84d5c192a4efd7d4411d06dec91461c712f1c3c (patch)
treec360ae5850a2318dd7fb3445ad3b4db6e817303b
parent2dc9ffe687ef577b45b3a014481e0ba178f0e36a (diff)
parent00525c0cabbe3040080f499997de5a23a4675a7d (diff)
downloadconsolekit-f84d5c192a4efd7d4411d06dec91461c712f1c3c.tar.gz
Merge commit 'upstream/0.4.5'
-rw-r--r--ChangeLog56
-rw-r--r--NEWS6
-rwxr-xr-xconfigure26
-rw-r--r--configure.ac3
-rw-r--r--data/console-kit-log-system-restart.service.in1
-rw-r--r--data/console-kit-log-system-start.service.in1
-rw-r--r--data/console-kit-log-system-stop.service.in1
-rw-r--r--doc/dbus/ConsoleKit.xml4
-rw-r--r--src/ck-sysdeps-unix.c17
9 files changed, 90 insertions, 25 deletions
diff --git a/ChangeLog b/ChangeLog
index a1a4dc2..98440d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,55 @@
+commit 4a1e58fd29c7cdf48dea879191a45db2cfcca0d1
+Author: Colin Watson <cjwatson@ubuntu.com>
+Date: Sat Nov 20 17:57:22 2010 +0100
+
+ Retry opening console device on EIO
+
+ As reported in https://launchpad.net/bugs/544139, ConsoleKit sometimes
+ fails to
+ track the active VT. This particular case was tracked down to a
+ race condition
+ that happens if you try to open /dev/console while the current TTY
+ is currently
+ being closed. This yields an -EIO error, in which case CK should
+ just try
+ again.
+
+ For a more detailled summary of the problem from a kernel perspective,
+ please
+ see
+ https://bugs.launchpad.net/ubuntu/+source/linux/+bug/554172/comments/245
+ .
+
+ https://bugs.freedesktop.org/show_bug.cgi?id=31790
+
+ src/ck-sysdeps-unix.c | 17 +++++++++++++++++
+ 1 files changed, 17 insertions(+), 0 deletions(-)
+
+commit 14d5ef815d3f1a1a7d72bdc242c7ebb085372c8d
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Thu Apr 14 01:12:51 2011 +0200
+
+ systemd: don't pull in sysinit.target
+
+ In case of shutdown when sysinit.target is not up yet (i.e. emergency
+ mode or suchlike) ensure that we don't try to start sysinit.target
+ before shutting down.
+
+ data/console-kit-log-system-restart.service.in | 1 -
+ data/console-kit-log-system-start.service.in | 1 -
+ data/console-kit-log-system-stop.service.in | 1 -
+ 3 files changed, 0 insertions(+), 3 deletions(-)
+
+commit 91c73e774a033b6399624d8d5991543c70623ee0
+Author: Lennart Poettering <lennart@poettering.net>
+Date: Thu Feb 17 01:37:33 2011 +0100
+
+ build-sys: post release version bump
+
+ NEWS | 6 ++++++
+ configure.ac | 3 +--
+ 2 files changed, 7 insertions(+), 2 deletions(-)
+
commit f19bd45476536439b0f9fe01808f5d118238c5b1
Author: Lennart Poettering <lennart@poettering.net>
Date: Thu Feb 17 00:53:54 2011 +0100
@@ -3873,8 +3925,8 @@ Date: Thu Mar 8 21:24:25 2007 -0500
{tools => libck-connector}/.gitignore | 3 ++-
{tools => pam-ck-connector}/.gitignore | 2 +-
tools/.gitignore | 2 +-
- tools/linux/.gitignore | 9 +++++++++
- 5 files changed, 14 insertions(+), 3 deletions(-)
+ tools/{ => linux}/.gitignore | 3 ++-
+ 5 files changed, 7 insertions(+), 4 deletions(-)
commit 1702970a3ea3de88f04623f69a3ab5260f77d2c5
Author: William Jon McCann <mccann@jhu.edu>
diff --git a/NEWS b/NEWS
index 3d56f7d..81c3225 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,10 @@
==============
+Version 0.4.4
+==============
+
+ * systemd fixes (Lennart Poettering)
+
+==============
Version 0.4.3
==============
diff --git a/configure b/configure
index b836956..283b93f 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for ConsoleKit 0.4.4.
+# Generated by GNU Autoconf 2.68 for ConsoleKit 0.4.5.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit>.
#
@@ -571,8 +571,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='ConsoleKit'
PACKAGE_TARNAME='ConsoleKit'
-PACKAGE_VERSION='0.4.4'
-PACKAGE_STRING='ConsoleKit 0.4.4'
+PACKAGE_VERSION='0.4.5'
+PACKAGE_STRING='ConsoleKit 0.4.5'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit'
PACKAGE_URL=''
@@ -830,11 +830,6 @@ LDFLAGS
LIBS
CPPFLAGS
CPP
-CPPFLAGS
-CC
-LDFLAGS
-LIBS
-CPPFLAGS
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
@@ -1392,7 +1387,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures ConsoleKit 0.4.4 to adapt to many kinds of systems.
+\`configure' configures ConsoleKit 0.4.5 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1462,7 +1457,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of ConsoleKit 0.4.4:";;
+ short | recursive ) echo "Configuration of ConsoleKit 0.4.5:";;
esac
cat <<\_ACEOF
@@ -1610,7 +1605,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-ConsoleKit configure 0.4.4
+ConsoleKit configure 0.4.5
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -1979,7 +1974,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by ConsoleKit $as_me 0.4.4, which was
+It was created by ConsoleKit $as_me 0.4.5, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2797,7 +2792,7 @@ fi
# Define the identity of the package.
PACKAGE='ConsoleKit'
- VERSION='0.4.4'
+ VERSION='0.4.5'
cat >>confdefs.h <<_ACEOF
@@ -15282,7 +15277,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by ConsoleKit $as_me 0.4.4, which was
+This file was extended by ConsoleKit $as_me 0.4.5, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -15348,7 +15343,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-ConsoleKit config.status 0.4.4
+ConsoleKit config.status 0.4.5
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
@@ -17170,4 +17165,3 @@ if test x${have_polkit} = xno -a x${msg_rbac_shutdown} = xno; then
echo " ConsoleKit.conf to match your distro/site to avoid NASTY SECURITY HOLES."
echo ""
fi
-
diff --git a/configure.ac b/configure.ac
index ad5d541..0efc489 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
AC_PREREQ(2.59c)
AC_INIT([ConsoleKit],
- [0.4.4],
+ [0.4.5],
[https://bugs.freedesktop.org/enter_bug.cgi?product=ConsoleKit],
[ConsoleKit])
@@ -457,4 +457,3 @@ if test x${have_polkit} = xno -a x${msg_rbac_shutdown} = xno; then
echo " ConsoleKit.conf to match your distro/site to avoid NASTY SECURITY HOLES."
echo ""
fi
-
diff --git a/data/console-kit-log-system-restart.service.in b/data/console-kit-log-system-restart.service.in
index d69333f..4d787e3 100644
--- a/data/console-kit-log-system-restart.service.in
+++ b/data/console-kit-log-system-restart.service.in
@@ -1,7 +1,6 @@
[Unit]
Description=Console System Reboot Logging
DefaultDependencies=no
-Wants=sysinit.target
After=sysinit.target console-kit-log-system-start.service
Before=shutdown.target
diff --git a/data/console-kit-log-system-start.service.in b/data/console-kit-log-system-start.service.in
index e84c5b1..200685d 100644
--- a/data/console-kit-log-system-start.service.in
+++ b/data/console-kit-log-system-start.service.in
@@ -1,7 +1,6 @@
[Unit]
Description=Console System Startup Logging
DefaultDependencies=no
-Wants=sysinit.target
After=sysinit.target
Before=shutdown.target
diff --git a/data/console-kit-log-system-stop.service.in b/data/console-kit-log-system-stop.service.in
index 8e7a4d0..1b8b528 100644
--- a/data/console-kit-log-system-stop.service.in
+++ b/data/console-kit-log-system-stop.service.in
@@ -1,7 +1,6 @@
[Unit]
Description=Console System Shutdown Logging
DefaultDependencies=no
-Wants=sysinit.target
After=sysinit.target console-kit-log-system-start.service
Before=shutdown.target
diff --git a/doc/dbus/ConsoleKit.xml b/doc/dbus/ConsoleKit.xml
index c1797bf..8762cd6 100644
--- a/doc/dbus/ConsoleKit.xml
+++ b/doc/dbus/ConsoleKit.xml
@@ -10,8 +10,8 @@
<book id="index">
<bookinfo>
- <title>ConsoleKit 0.4.4 Documentation</title>
- <releaseinfo>Version 0.4.4</releaseinfo>
+ <title>ConsoleKit 0.4.5 Documentation</title>
+ <releaseinfo>Version 0.4.5</releaseinfo>
<authorgroup>
<author>
<firstname>William Jon</firstname>
diff --git a/src/ck-sysdeps-unix.c b/src/ck-sysdeps-unix.c
index e4ab16b..4a1736c 100644
--- a/src/ck-sysdeps-unix.c
+++ b/src/ck-sysdeps-unix.c
@@ -26,6 +26,7 @@
#include <unistd.h>
#include <string.h>
#include <errno.h>
+#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
@@ -150,9 +151,25 @@ open_a_console (char *fnam)
{
int fd;
+again:
fd = open (fnam, O_RDONLY | O_NOCTTY);
if (fd < 0 && errno == EACCES)
fd = open (fnam, O_WRONLY | O_NOCTTY);
+#ifdef __linux__
+ if (fd < 0 && errno == EIO) {
+ /* Linux can return EIO if the tty is currently closing,
+ * which can happen if multiple processes are opening and
+ * closing the console in parallel. Unfortunately it can
+ * also return EIO in more serious situations too (see
+ * https://bugs.launchpad.net/bugs/554172), but there isn't
+ * much we can do about that since we really need a console
+ * fd.
+ */
+ struct timespec ts = { 0, 100000000 }; /* 0.1 seconds */
+ nanosleep (&ts, NULL);
+ goto again;
+ }
+#endif
if (fd < 0)
return -1;