From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QaAIt-0006Cm-Ul for garchives@archives.gentoo.org; Fri, 24 Jun 2011 17:36:28 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 66FAF1C03F; Fri, 24 Jun 2011 17:35:53 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 0E0771C03F for ; Fri, 24 Jun 2011 17:35:52 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0FBD52AC00A for ; Fri, 24 Jun 2011 17:35:52 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 5CBE58003C for ; Fri, 24 Jun 2011 17:35:51 +0000 (UTC) From: "Alexandre Restovtsev" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Alexandre Restovtsev" Message-ID: <5894528e3d3f33049db21603f3303391d859f3a3.tetromino@gentoo> Subject: [gentoo-commits] proj/gnome:master commit in: app-accessibility/at-spi2-core/files/, app-accessibility/at-spi2-core/ X-VCS-Repository: proj/gnome X-VCS-Files: app-accessibility/at-spi2-core/at-spi2-core-2.0.2-r1.ebuild app-accessibility/at-spi2-core/at-spi2-core-2.0.2.ebuild app-accessibility/at-spi2-core/files/at-spi2-core-2.0.2-abort-if-already-running.patch X-VCS-Directories: app-accessibility/at-spi2-core/files/ app-accessibility/at-spi2-core/ X-VCS-Committer: tetromino X-VCS-Committer-Name: Alexandre Restovtsev X-VCS-Revision: 5894528e3d3f33049db21603f3303391d859f3a3 Date: Fri, 24 Jun 2011 17:35:51 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 14087b2f5bd8282060ccd4273ed6c5c6 commit: 5894528e3d3f33049db21603f3303391d859f3a3 Author: Alexandre Rostovtsev gmail com> AuthorDate: Wed Jun 15 15:41:01 2011 +0000 Commit: Alexandre Restovtsev gmail com> CommitDate: Sun Jun 19 02:21:56 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/gnome.git;a=3D= commit;h=3D5894528e app-accessibility/at-spi2-core: patch for gnome bug #652215 Resolves the problem where multiple instances of at-spi-bus-launcher could get started after running a gnome application as root, breaking accessibility support for the session and resulting in "Couldn't register with accessibility bus" error messages. The patch is taken from upstream git master branch; gnome-3-0 branch hasn't been fixed yet. --- ...e-2.0.2.ebuild =3D> at-spi2-core-2.0.2-r1.ebuild} | 4 + ...-spi2-core-2.0.2-abort-if-already-running.patch | 88 ++++++++++++++= ++++++ 2 files changed, 92 insertions(+), 0 deletions(-) diff --git a/app-accessibility/at-spi2-core/at-spi2-core-2.0.2.ebuild b/a= pp-accessibility/at-spi2-core/at-spi2-core-2.0.2-r1.ebuild similarity index 83% rename from app-accessibility/at-spi2-core/at-spi2-core-2.0.2.ebuild rename to app-accessibility/at-spi2-core/at-spi2-core-2.0.2-r1.ebuild index 41c561a..2d960fa 100644 --- a/app-accessibility/at-spi2-core/at-spi2-core-2.0.2.ebuild +++ b/app-accessibility/at-spi2-core/at-spi2-core-2.0.2-r1.ebuild @@ -39,5 +39,9 @@ src_prepare() { # disable teamspaces test since that requires Novell.ICEDesktop.Daemon epatch "${FILESDIR}/${PN}-2.0.2-disable-teamspaces-test.patch" =20 + # https://bugzilla.gnome.org/show_bug.cgi?id=3D652215 + # Fixed in upstream git master branch, but not in gnome-3-0 branch + epatch "${FILESDIR}/${PN}-2.0.2-abort-if-already-running.patch" + gnome2_src_prepare } diff --git a/app-accessibility/at-spi2-core/files/at-spi2-core-2.0.2-abor= t-if-already-running.patch b/app-accessibility/at-spi2-core/files/at-spi2= -core-2.0.2-abort-if-already-running.patch new file mode 100644 index 0000000..0e39dcf --- /dev/null +++ b/app-accessibility/at-spi2-core/files/at-spi2-core-2.0.2-abort-if-al= ready-running.patch @@ -0,0 +1,88 @@ +From 72b5b5733841657af00f31370d26bdfd5a0b60b7 Mon Sep 17 00:00:00 2001 +From: Mike Gorse +Date: Thu, 09 Jun 2011 16:50:58 +0000 +Subject: Make the bus launcher abort if an instance is already running + +Upon starting up, at-spi-bus-launcher now looks for an X property with +the bus address and tries to connect to it, aborting if successful. +This fixes a bug where, if the launcher was run twice (perhaps by both +an autostart script and a request for the bus address), the second +instance would start its main loop, eventually abort, and delete the X +property, which would cause a new X property to be created later, +overriding the old one, if a different user requested the address, +leading to a11y breakage. +--- +diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c +index 9300979..dcc35e4 100644 +--- a/bus/at-spi-bus-launcher.c ++++ b/bus/at-spi-bus-launcher.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include +=20 + #include + #include +@@ -349,6 +350,49 @@ is_a11y_using_corba (void) + return result; + } +=20 ++static gboolean ++already_running () ++{ ++ Atom AT_SPI_BUS; ++ Atom actual_type; ++ Display *bridge_display; ++ int actual_format; ++ unsigned char *data =3D NULL; ++ unsigned long nitems; ++ unsigned long leftover; ++ gboolean result =3D FALSE; ++ ++ bridge_display =3D XOpenDisplay (NULL); ++ if (!bridge_display) ++ return FALSE; ++ =20 ++ AT_SPI_BUS =3D XInternAtom (bridge_display, "AT_SPI_BUS", False); ++ XGetWindowProperty (bridge_display, ++ XDefaultRootWindow (bridge_display), ++ AT_SPI_BUS, 0L, ++ (long) BUFSIZ, False, ++ (Atom) 31, &actual_type, &actual_format, ++ &nitems, &leftover, &data); ++ ++ if (data) ++ { ++ GDBusConnection *bus; ++ GError *error =3D NULL; ++ const gchar *old_session =3D g_getenv ("DBUS_SESSION_BUS_ADDRESS"); ++ /* TODO: Is there a better way to connect? This is really hacky */ ++ g_setenv ("DBUS_SESSION_BUS_ADDRESS", data, TRUE); ++ bus =3D g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error); ++ g_setenv ("DBUS_SESSION_BUS_ADDRESS", old_session, TRUE); ++ if (bus !=3D NULL) ++ result =3D TRUE; ++ g_object_unref (bus); ++ } ++ ++ XCloseDisplay (bridge_display); ++ return result; ++} ++ ++ + int + main (int argc, + char **argv) +@@ -363,6 +407,9 @@ main (int argc, + if (is_a11y_using_corba ()) + return 0; +=20 ++ if (already_running ()) ++ return 0; ++ + _global_app =3D g_slice_new0 (A11yBusLauncher); + _global_app->loop =3D g_main_loop_new (NULL, FALSE); + _global_app->launch_immediately =3D (argc =3D=3D 2 && strcmp (argv[1]= , "--launch-immediately") =3D=3D 0); +-- +cgit v0.9