[arch-commits] Commit in xorg-server/trunk (2 files)

Jan Steffens heftig at archlinux.org
Tue Jun 30 21:10:11 UTC 2015


    Date: Tuesday, June 30, 2015 @ 23:10:11
  Author: heftig
Revision: 241622

Add a kdbus fix

Added:
  xorg-server/trunk/0001-systemd-logind-do-not-rely-on-directed-signals.patch
Modified:
  xorg-server/trunk/PKGBUILD

-----------------------------------------------------------+
 0001-systemd-logind-do-not-rely-on-directed-signals.patch |   55 ++++++++++++
 PKGBUILD                                                  |   14 ++-
 2 files changed, 65 insertions(+), 4 deletions(-)

Added: 0001-systemd-logind-do-not-rely-on-directed-signals.patch
===================================================================
--- 0001-systemd-logind-do-not-rely-on-directed-signals.patch	                        (rev 0)
+++ 0001-systemd-logind-do-not-rely-on-directed-signals.patch	2015-06-30 21:10:11 UTC (rev 241622)
@@ -0,0 +1,55 @@
+From 780a69aff0ff57ef813179a2f09556eaf488cdfc Mon Sep 17 00:00:00 2001
+From: David Herrmann <dh.herrmann at gmail.com>
+Date: Mon, 22 Jun 2015 21:13:05 +0200
+Subject: systemd-logind: do not rely on directed signals
+
+Right now, Xorg does not install DBus matches for "PauseDevice" /
+"ResumeDevice". Therefore, it should usually not receive those DBus
+signals from logind. It is just a coincidence that systemd-logind sends
+those signals in a directed manner right now. Therefore, dbus-daemon
+bypasses the broadcast matches.
+
+However, this is not ABI and Xorg should not rely on this. systemd-logind
+is free to send those signals as broadcasts, in which case Xorg will
+freeze the VT. Fix this by always installing those matches.
+
+Cc: Hans de Goede <hdegoede at redhat.com>
+Cc: Keith Packard <keithp at keithp.com>
+Reported-by: Jan Alexander Steffens <jan.steffens at gmail.com>
+Signed-off-by: David Herrmann <dh.herrmann at gmail.com>
+Reviewed-by: Hans de Goede <hdegoede at redhat.com>
+Tested-by: Hans de Goede <hdegoede at redhat.com>
+Signed-off-by: Hans de Goede <hdegoede at redhat.com>
+
+diff --git a/hw/xfree86/os-support/linux/systemd-logind.c b/hw/xfree86/os-support/linux/systemd-logind.c
+index 69e2f67..2612d9e 100644
+--- a/hw/xfree86/os-support/linux/systemd-logind.c
++++ b/hw/xfree86/os-support/linux/systemd-logind.c
+@@ -507,6 +507,24 @@ connect_hook(DBusConnection *connection, void *data)
+         goto cleanup;
+     }
+ 
++    dbus_bus_add_match(connection,
++        "type='signal',sender='org.freedesktop.login1',interface='org.freedesktop.login1.Session',member='PauseDevice'",
++        &error);
++    if (dbus_error_is_set(&error)) {
++        LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n",
++                   error.message);
++        goto cleanup;
++    }
++
++    dbus_bus_add_match(connection,
++        "type='signal',sender='org.freedesktop.login1',interface='org.freedesktop.login1.Session',member='ResumeDevice'",
++        &error);
++    if (dbus_error_is_set(&error)) {
++        LogMessage(X_ERROR, "systemd-logind: could not add match: %s\n",
++                   error.message);
++        goto cleanup;
++    }
++
+     /*
+      * HdG: This is not useful with systemd <= 208 since the signal only
+      * contains invalidated property names there, rather than property, val
+-- 
+cgit v0.10.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-06-30 21:10:09 UTC (rev 241621)
+++ PKGBUILD	2015-06-30 21:10:11 UTC (rev 241622)
@@ -5,7 +5,7 @@
 pkgbase=xorg-server
 pkgname=('xorg-server' 'xorg-server-xephyr' 'xorg-server-xdmx' 'xorg-server-xvfb' 'xorg-server-xnest' 'xorg-server-xwayland' 'xorg-server-common' 'xorg-server-devel')
 pkgver=1.17.2
-pkgrel=1 # build first with 0.1 and then rebuild it after xf86-input-evdev rebuild
+pkgrel=2
 arch=('i686' 'x86_64')
 license=('custom')
 url="http://xorg.freedesktop.org"
@@ -21,7 +21,8 @@
         xvfb-run
         xvfb-run.1
         0001-dix-Add-unaccelerated-valuators-to-the-ValuatorMask.patch
-        0002-dix-hook-up-the-unaccelerated-valuator-masks.patch)
+        0002-dix-hook-up-the-unaccelerated-valuator-masks.patch
+        "0001-systemd-logind-do-not-rely-on-directed-signals.patch")
 validpgpkeys=('7B27A3F1A6E18CD9588B4AE8310180050905E40C'
               'C383B778255613DFDB409D91DB221A6900000011'
               'DD38563A8A8224537D1F90E45B8A2D50A0ECD0D3')
@@ -31,7 +32,8 @@
             'ff0156309470fc1d378fd2e104338020a884295e285972cc88e250e031cc35b9'
             '2460adccd3362fefd4cdc5f1c70f332d7b578091fb9167bf88b5f91265bbd776'
             '3dc795002b8763a7d29db94f0af200131da9ce5ffc233bfd8916060f83a8fad7'
-            '416a1422eed71efcebb1d893de74e7f27e408323a56c4df003db37f5673b3f96')
+            '416a1422eed71efcebb1d893de74e7f27e408323a56c4df003db37f5673b3f96'
+            '3d7edab3a54d647e7d924b29d29f91b50212f308fcb1853a5aacd3181f58276c')
 
 prepare() {
   cd "${pkgbase}-${pkgver}"
@@ -38,11 +40,15 @@
   # fix FS#45229, merged upstream
   patch -Np1 -i ../0001-dix-Add-unaccelerated-valuators-to-the-ValuatorMask.patch
   patch -Np1 -i ../0002-dix-hook-up-the-unaccelerated-valuator-masks.patch
+
+  # fix VT switching with kdbus; from upstream
+  patch -Np1 -i "../0001-systemd-logind-do-not-rely-on-directed-signals.patch"
+
+  autoreconf -fvi
 }
 
 build() {
   cd "${pkgbase}-${pkgver}"
-  autoreconf -fi
   ./configure --prefix=/usr \
       --enable-ipv6 \
       --enable-dri \



More information about the arch-commits mailing list