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

Bug#1034623: unblock: qtbase-opensource-src/5.15.8+dfsg-7



Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
X-Debbugs-Cc: qtbase-opensource-src@packages.debian.org
Control: affects -1 + src:qtbase-opensource-src

Please unblock package qtbase-opensource-src, thanks!

[ Reason ]
This upload fixes the accessibility of Qt5 application started as root.
Bug#1033995

[ Impact ]
Normally users wouldn't run applications as root, but one notable
exception is the calamares installer, which is based on qt5 and runs as
root, and it currently is completely inaccessible to blind users, and
this fix makes it possible for blind users to use it.

[ Tests ]
This was tested by hand, as well as by upstream.

[ Risks ]
The code is quite simple. It went through a few iterations because of
the complexity of the initialization of Qt applications. In the end, the
solution that was commited upstream (using QMetaObject::invokeMethod
to delay initialization of accessibility) is very similar to another
upstream fix that had gone in in july 2022 and hasn't met any problems
since then.

[ 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 testing

unblock qtbase-opensource-src/5.15.8+dfsg-7
diff -Nru qtbase-opensource-src-5.15.8+dfsg/debian/changelog qtbase-opensource-src-5.15.8+dfsg/debian/changelog
--- qtbase-opensource-src-5.15.8+dfsg/debian/changelog	2023-02-27 09:28:53.000000000 +0100
+++ qtbase-opensource-src-5.15.8+dfsg/debian/changelog	2023-04-13 01:24:34.000000000 +0200
@@ -1,3 +1,31 @@
+qtbase-opensource-src (5.15.8+dfsg-7) unstable; urgency=medium
+
+  * Update a11y_root.diff. This time the code waits for Qt loop to process the
+    check (Closes: #1033995, #1034160, #1034271).
+
+ -- Lisandro Damián Nicanor Pérez Meyer <lisandro@debian.org>  Wed, 12 Apr 2023 20:24:34 -0300
+
+qtbase-opensource-src (5.15.8+dfsg-6) unstable; urgency=medium
+
+  * Use the new, fixed version of a11y_root.diff from Samuel Thibault
+    (again closes: #1033995).
+
+ -- Dmitry Shachnev <mitya57@debian.org>  Tue, 11 Apr 2023 14:25:22 +0300
+
+qtbase-opensource-src (5.15.8+dfsg-5) unstable; urgency=medium
+
+  * Revert the last upload. Unfortunately, it caused regressions
+    (closes: #1034160, #1034169, #1034191).
+
+ -- Dmitry Shachnev <mitya57@debian.org>  Mon, 10 Apr 2023 23:58:16 +0300
+
+qtbase-opensource-src (5.15.8+dfsg-4) unstable; urgency=medium
+
+  * Add a patch to fix accessibility on XCB when running as root
+    (closes: #1033995).
+
+ -- Dmitry Shachnev <mitya57@debian.org>  Sun, 09 Apr 2023 21:23:36 +0300
+
 qtbase-opensource-src (5.15.8+dfsg-3) unstable; urgency=medium
 
   * Use ${DEB_HOST_GNU_TYPE} substitution in debian/qt5-qmake.install.
diff -Nru qtbase-opensource-src-5.15.8+dfsg/debian/patches/a11y_root.diff qtbase-opensource-src-5.15.8+dfsg/debian/patches/a11y_root.diff
--- qtbase-opensource-src-5.15.8+dfsg/debian/patches/a11y_root.diff	1970-01-01 01:00:00.000000000 +0100
+++ qtbase-opensource-src-5.15.8+dfsg/debian/patches/a11y_root.diff	2023-04-13 00:50:31.000000000 +0200
@@ -0,0 +1,33 @@
+Description: fix accessibility on XCB when running as root
+ Accessibility actually works when running applications as root, but we
+ would never properly connect, since the enabledChanged signal would be
+ emitted from the constructor in this case. So after connecting the
+ signal, check the value by hand to make sure not to miss the
+ notification.
+ .
+ Only applications running as root would be affected, because all other
+ applications would go through the asynchronous pattern of getting the
+ bus address from dbus instead.
+Origin: https://codereview.qt-project.org/c/qt/qtbase/+/205196
+Bug: https://bugs.debian.org/1033995
+Last-Update: 2023-04-12
+
+--- a/src/platformsupport/linuxaccessibility/bridge.cpp
++++ b/src/platformsupport/linuxaccessibility/bridge.cpp
+@@ -65,6 +65,16 @@ QSpiAccessibleBridge::QSpiAccessibleBrid
+ {
+     dbusConnection = new DBusConnection();
+     connect(dbusConnection, SIGNAL(enabledChanged(bool)), this, SLOT(enabledChanged(bool)));
++    // Now that we have connected the signal, make sure we didn't miss a change,
++    // e.g. when running as root or when AT_SPI_BUS_ADDRESS is set by hand.
++    // But do that only on next loop, once dbus is really settled.
++    QMetaObject::invokeMethod(
++        this,
++        [this] {
++            if (dbusConnection->isEnabled())
++                enabledChanged(true);
++        },
++        Qt::QueuedConnection);
+ }
+
+ void QSpiAccessibleBridge::enabledChanged(bool enabled)
diff -Nru qtbase-opensource-src-5.15.8+dfsg/debian/patches/series qtbase-opensource-src-5.15.8+dfsg/debian/patches/series
--- qtbase-opensource-src-5.15.8+dfsg/debian/patches/series	2023-02-27 09:28:53.000000000 +0100
+++ qtbase-opensource-src-5.15.8+dfsg/debian/patches/series	2023-04-13 00:57:07.000000000 +0200
@@ -29,3 +29,4 @@
 cross_build_mysql.diff
 cast_types_for_egl_x11_test.diff
 revert_startBlocking_removal.diff
+a11y_root.diff

Reply to: