[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#994022: marked as done (bullseye-pu: package java-atk-wrapper/0.38.0-2+deb11u1)



Your message dated Sat, 09 Oct 2021 12:09:40 +0100
with message-id <81741a2f4e370c14a3bec08b7fe6e2b10c32267b.camel@adam-barratt.org.uk>
and subject line Closing p-u bugs for updates in 11.1
has caused the Debian Bug report #994022,
regarding bullseye-pu: package java-atk-wrapper/0.38.0-2+deb11u1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
994022: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=994022
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
Tags: buster
User: release.debian.org@packages.debian.org
Usertags: pu

(this is the same content as for the buster update request for the same
package)

[ Reason ]
As reported on
https://lists.debian.org/debian-accessibility/2021/06/msg00003.html
when from an Xorg sesssion one runs

systemctl lightdm restart

which thus restarts the X server, or when for some reason the X session
crashes and the user is back at the lightdm login screen, after logging
back in the java applications are not accessible with the Orca screen
reader.

This is because the user's dbus session bus survives the restart/crash,
which is on purpose as discussed in 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=992990
and thus the accessibility at-spi stack survives the restart/crash,
which is fine for orca etc. but since a new X server is used, the
address of the at-spi stack is not stored any more as the AT_SPI_BUS
X root property. Non-java applications are fine with that since
nowadays they use the dbus session bus to find the at-spi stack bus.
java-atk-wrapper however was still not using that, and was still using
the AT_SPI_BUS X root property which is considered deprecated.

The proposed changes make java-atk-wrapper use the dbus session bus,
like other accessible applications. It is then not a problem any more
that the restarted user session has a new X server without the
AT_SPI_BUS X root property.

[ Impact ]
Whenever an X session crashes or lightdm is restarted, java applications
in the new user sessions are not accessible to blind people through the
Orca screen reader.

[ Tests ]
I tested it with some VMs on my laptop, and tested by the original
user reporter.

[ Risks ]
The code is quite simple, is committed upstream, and just follows the
current practice of all other accessible applicatoins.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in (old)stable
  [X] the issue is verified as fixed in unstable

[ Changes ]
The code change the startup of java applications: if the AT_SPI_BUS X
root property is not found, they use dbus-send to achieve the standard
at-spi stack bus discovery.

[ Other info ]
This is the same request as for buster.
diff -Nru java-atk-wrapper-0.38.0/debian/changelog java-atk-wrapper-0.38.0/debian/changelog
--- java-atk-wrapper-0.38.0/debian/changelog	2021-01-01 15:05:05.000000000 +0100
+++ java-atk-wrapper-0.38.0/debian/changelog	2021-08-26 02:50:17.000000000 +0200
@@ -1,3 +1,9 @@
+java-atk-wrapper (0.38.0-2+deb11u1) bullseye; urgency=medium
+
+  * patches/dbus: Also detect at-spi through dbus.
+
+ -- Samuel Thibault <sthibault@debian.org>  Thu, 26 Aug 2021 02:50:17 +0200
+
 java-atk-wrapper (0.38.0-2) unstable; urgency=medium
 
   [ Samuel Thibault ]
diff -Nru java-atk-wrapper-0.38.0/debian/patches/dbus java-atk-wrapper-0.38.0/debian/patches/dbus
--- java-atk-wrapper-0.38.0/debian/patches/dbus	1970-01-01 01:00:00.000000000 +0100
+++ java-atk-wrapper-0.38.0/debian/patches/dbus	2021-08-26 02:50:17.000000000 +0200
@@ -0,0 +1,50 @@
+commit 43576f265a16de8f1cd16c8a09d0e6a6006cbe3c
+Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
+Date:   Thu Aug 26 02:49:06 2021 +0200
+
+    Also use dbus to detect accessibility being enabled
+    
+    This is required if for some reason the AT_SPI_BUS property is not set.
+    That happens for instance if for some reason the dbus session bus (and thus
+    the at-spi bus) is reused between X sessions.
+
+diff --git a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
+index cb267fd..d91b985 100644
+--- a/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
++++ b/wrapper/org/GNOME/Accessibility/AtkWrapper.java.in
+@@ -32,6 +32,11 @@ import java.lang.management.*;
+ 
+ public class AtkWrapper {
+   static boolean accessibilityEnabled = false;
++  static void initAtk() {
++    System.loadLibrary("atk-wrapper");
++    if (AtkWrapper.initNativeLibrary())
++      accessibilityEnabled = true;
++  }
+   static {
+     try {
+       Process p = Runtime.getRuntime().exec("@XPROP@ -root");
+@@ -39,13 +44,20 @@ public class AtkWrapper {
+       String result;
+       while ((result = b.readLine()) != null) {
+         if (result.indexOf("AT_SPI_IOR") >= 0 || result.indexOf("AT_SPI_BUS") >= 0) {
+-          System.loadLibrary("atk-wrapper");
+-          if (AtkWrapper.initNativeLibrary())
+-            accessibilityEnabled = true;
++          initAtk();
+           break;
+         }
+       }
+ 
++      if (!accessibilityEnabled) {
++        p = Runtime.getRuntime().exec("dbus-send --session --dest=org.a11y.Bus --print-reply /org/a11y/bus org.a11y.Bus.GetAddress");
++        b = new BufferedReader(new InputStreamReader (p.getInputStream ()));
++        while ((b.readLine()) != null);
++        p.waitFor();
++        if (p.exitValue() == 0)
++          initAtk();
++      }
++
+       java.util.List<GarbageCollectorMXBean> gcbeans = ManagementFactory.getGarbageCollectorMXBeans();
+       for (GarbageCollectorMXBean gcbean : gcbeans) {
+ 	NotificationEmitter emitter = (NotificationEmitter) gcbean;
diff -Nru java-atk-wrapper-0.38.0/debian/patches/series java-atk-wrapper-0.38.0/debian/patches/series
--- java-atk-wrapper-0.38.0/debian/patches/series	2020-08-02 02:27:36.000000000 +0200
+++ java-atk-wrapper-0.38.0/debian/patches/series	2021-08-26 02:50:17.000000000 +0200
@@ -1,3 +1,4 @@
 java-1.7
 
 atk-dep
+dbus

--- End Message ---
--- Begin Message ---
Package: release.debian.org
Version: 11.1

Hi,

The updates relating to these bugs were included in this morning's 11.1
point release for bullseye.

Regards,

Adam

--- End Message ---

Reply to: