[arch-commits] Commit in xorg-server/repos (4 files)
Jan de Groot
jgc at archlinux.org
Fri Apr 10 19:11:07 UTC 2009
Date: Friday, April 10, 2009 @ 15:11:07
Author: jgc
Revision: 34653
Merged revisions 34615 via svnmerge from
svn+ssh://svn.archlinux.org/srv/svn-packages/xorg-server/trunk
........
r34615 | jgc | 2009-04-10 13:38:16 +0000 (Fri, 10 Apr 2009) | 3 lines
upgpkg: xorg-server 1.6.0-3
Add a commit from upstream server-1.6 branch
Revert the commit that makes X wait for hal. This results in loss of input hotplugging when hal is not available on startup
........
Added:
xorg-server/repos/testing-i686/hal-wait.patch
(from rev 34615, xorg-server/trunk/hal-wait.patch)
Modified:
xorg-server/repos/testing-i686/ (properties)
xorg-server/repos/testing-i686/PKGBUILD
xorg-server/repos/testing-i686/server-1.6.patch
------------------+
PKGBUILD | 11 ++-
hal-wait.patch | 162 +++++++++++++++++++++++++++++++++++++++++++++++++++++
server-1.6.patch | 23 +++++++
3 files changed, 193 insertions(+), 3 deletions(-)
Property changes on: xorg-server/repos/testing-i686
___________________________________________________________________
Modified: svnmerge-integrated
- /xorg-server/trunk:1-34100
+ /xorg-server/trunk:1-34652
Modified: testing-i686/PKGBUILD
===================================================================
--- testing-i686/PKGBUILD 2009-04-10 19:00:59 UTC (rev 34652)
+++ testing-i686/PKGBUILD 2009-04-10 19:11:07 UTC (rev 34653)
@@ -4,7 +4,7 @@
pkgname=xorg-server
pkgver=1.6.0
-pkgrel=2
+pkgrel=3
pkgdesc="X.Org X servers"
arch=('i686' 'x86_64')
license=('custom')
@@ -18,10 +18,12 @@
install=xorg-server.install
source=(${url}/releases/individual/xserver/${pkgname}-${pkgver}.tar.bz2
xorg-redhat-die-ugly-pattern-die-die-die.patch
- server-1.6.patch)
+ server-1.6.patch
+ hal-wait.patch)
md5sums=('aafe73f5807ce8bb534727ecb72467c7'
'1a336eb22e27cbf443ec5a2ecddfa93c'
- 'bf0b1c3dba3d7e470c9701039b0dfc7c')
+ '064559385557ad02432a1e800b92b14e'
+ 'f16d2caef84e1a9c4075b6c5e145512d')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -31,6 +33,9 @@
# Upstream fixes from server-1.6 branch
patch -Np1 -i "${srcdir}/server-1.6.patch" || return 1
+ # Revert waiting for hal, assume hal won't show up when initial connect fails
+ patch -R -Np1 -i "${srcdir}/hal-wait.patch" || return 1
+
# Fix dbus config path
sed -i -e 's/\$(sysconfdir)/\/etc/' config/Makefile.* || return 1
Copied: xorg-server/repos/testing-i686/hal-wait.patch (from rev 34615, xorg-server/trunk/hal-wait.patch)
===================================================================
--- testing-i686/hal-wait.patch (rev 0)
+++ testing-i686/hal-wait.patch 2009-04-10 19:11:07 UTC (rev 34653)
@@ -0,0 +1,162 @@
+From 6b8bbbd21b39181e9dd3175fa73c05008c361ba2 Mon Sep 17 00:00:00 2001
+From: Peter Hutterer <peter.hutterer at who-t.net>
+Date: Wed, 04 Feb 2009 01:50:18 +0000
+Subject: config: if we can't connect to HAL, listen for a startup notification.
+
+If HAL isn't available when we try to connect, the registered NameOwnerChanged
+signal handler waits until HAL is available. Once we connected to HAL, we
+unregister the signal handler again.
+This allows HAL to be started in parallel or after the server has started.
+
+Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
+(cherry picked from commit 4844bff58f296b2851be4e6b955c3a68d02437a9)
+
+Signed-off-by: Keith Packard <keithp at keithp.com>
+---
+diff --git a/config/hal.c b/config/hal.c
+index 8dfbb07..36fa839 100644
+--- a/config/hal.c
++++ b/config/hal.c
+@@ -467,11 +467,10 @@ disconnect_hook(void *data)
+ info->system_bus = NULL;
+ }
+
+-static void
+-connect_hook(DBusConnection *connection, void *data)
++static BOOL
++connect_and_register(DBusConnection *connection, struct config_hal_info *info)
+ {
+ DBusError error;
+- struct config_hal_info *info = data;
+ char **devices;
+ int num_devices, i;
+
+@@ -479,8 +478,10 @@ connect_hook(DBusConnection *connection, void *data)
+
+ dbus_error_init(&error);
+
+- if (!info->hal_ctx)
+- info->hal_ctx = libhal_ctx_new();
++ if (info->hal_ctx)
++ return TRUE; /* already registered, pretend we did something */
++
++ info->hal_ctx = libhal_ctx_new();
+ if (!info->hal_ctx) {
+ LogMessage(X_ERROR, "config/hal: couldn't create HAL context\n");
+ goto out_err;
+@@ -512,7 +513,7 @@ connect_hook(DBusConnection *connection, void *data)
+
+ dbus_error_free(&error);
+
+- return;
++ return TRUE;
+
+ out_ctx2:
+ if (!libhal_ctx_shutdown(info->hal_ctx, &error))
+@@ -526,6 +527,104 @@ out_err:
+ info->hal_ctx = NULL;
+ info->system_bus = NULL;
+
++ return FALSE;
++}
++
++
++/**
++ * Handle NewOwnerChanged signals to deal with HAL startup at X server runtime.
++ *
++ * NewOwnerChanged is send once when HAL shuts down, and once again when it
++ * comes back up. Message has three arguments, first is the name
++ * (org.freedesktop.Hal), the second one is the old owner, third one is new
++ * owner.
++ */
++static DBusHandlerResult
++ownerchanged_handler(DBusConnection *connection, DBusMessage *message, void *data)
++{
++ int ret = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
++
++ if (dbus_message_is_signal(message,
++ "org.freedesktop.DBus",
++ "NameOwnerChanged")) {
++ DBusError error;
++ char *name, *old_owner, *new_owner;
++
++ dbus_error_init(&error);
++ dbus_message_get_args(message, &error,
++ DBUS_TYPE_STRING, &name,
++ DBUS_TYPE_STRING, &old_owner,
++ DBUS_TYPE_STRING, &new_owner,
++ DBUS_TYPE_INVALID);
++
++ if (dbus_error_is_set(&error)) {
++ ErrorF("[config/hal] failed to get NameOwnerChanged args: %s (%s)\n",
++ error.name, error.message);
++ } else if (name && strcmp(name, "org.freedesktop.Hal") == 0) {
++
++ if (!old_owner || !strlen(old_owner)) {
++ DebugF("[config/hal] HAL startup detected.\n");
++ if (connect_and_register(connection, (struct config_hal_info*)data))
++ dbus_connection_unregister_object_path(connection,
++ "/org/freedesktop/DBus");
++ else
++ ErrorF("[config/hal] Failed to connect to HAL bus.\n");
++ }
++
++ ret = DBUS_HANDLER_RESULT_HANDLED;
++ }
++ dbus_error_free(&error);
++ }
++
++ return ret;
++}
++
++/**
++ * Register a handler for the NameOwnerChanged signal.
++ */
++static BOOL
++listen_for_startup(DBusConnection *connection, void *data)
++{
++ DBusObjectPathVTable vtable = { .message_function = ownerchanged_handler, };
++ DBusError error;
++ const char MATCH_RULE[] = "sender='org.freedesktop.DBus',"
++ "interface='org.freedesktop.DBus',"
++ "type='signal',"
++ "path='/org/freedesktop/DBus',"
++ "member='NameOwnerChanged'";
++ int rc = FALSE;
++
++ dbus_error_init(&error);
++ dbus_bus_add_match(connection, MATCH_RULE, &error);
++ if (!dbus_error_is_set(&error)) {
++ if (dbus_connection_register_object_path(connection,
++ "/org/freedesktop/DBus",
++ &vtable,
++ data))
++ rc = TRUE;
++ else
++ ErrorF("[config/hal] cannot register object path.\n");
++ } else {
++ ErrorF("[config/hal] couldn't add match rule: %s (%s)\n", error.name,
++ error.message);
++ ErrorF("[config/hal] cannot detect a HAL startup.\n");
++ }
++
++ dbus_error_free(&error);
++
++ return rc;
++}
++
++static void
++connect_hook(DBusConnection *connection, void *data)
++{
++ struct config_hal_info *info = data;
++
++ if (listen_for_startup(connection, data) &&
++ connect_and_register(connection, info))
++ dbus_connection_unregister_object_path(connection,
++ "/org/freedesktop/DBus");
++
+ return;
+ }
+
+--
+cgit v0.8.2
Modified: testing-i686/server-1.6.patch
===================================================================
--- testing-i686/server-1.6.patch 2009-04-10 19:00:59 UTC (rev 34652)
+++ testing-i686/server-1.6.patch 2009-04-10 19:11:07 UTC (rev 34653)
@@ -538,3 +538,26 @@
}
else {
if (dst->geom->label_font) {
+From b7dc7374bbcb708eee6eec26ff141619f914d8eb Mon Sep 17 00:00:00 2001
+From: Eamon Walsh <ewalsh at tycho.nsa.gov>
+Date: Mon, 09 Mar 2009 21:28:40 +0000
+Subject: Correct access mode in call to dixLookupWindow() within RRSelectInput.
+
+Reported by Alan Coopersmith.
+(cherry picked from commit 6544490700051b3b5e88ac1890d71b35634c9100)
+---
+diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
+index 5a2ea71..0925875 100644
+--- a/randr/rrdispatch.c
++++ b/randr/rrdispatch.c
+@@ -76,7 +76,7 @@ ProcRRSelectInput (ClientPtr client)
+ int rc;
+
+ REQUEST_SIZE_MATCH(xRRSelectInputReq);
+- rc = dixLookupWindow(&pWin, stuff->window, client, DixWriteAccess);
++ rc = dixLookupWindow(&pWin, stuff->window, client, DixReceiveAccess);
+ if (rc != Success)
+ return rc;
+ pHead = (RREventPtr *)SecurityLookupIDByType(client,
+--
+cgit v0.8.2
More information about the arch-commits
mailing list