Add patch to fix a11y on login screen
This commit is contained in:
parent
fe3b7d634e
commit
34109b2a38
@ -1,12 +1,15 @@
|
|||||||
Name: at-spi2-core
|
Name: at-spi2-core
|
||||||
Version: 2.38.0
|
Version: 2.38.0
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Protocol definitions and daemon for D-Bus at-spi
|
Summary: Protocol definitions and daemon for D-Bus at-spi
|
||||||
|
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
URL: http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
|
URL: http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
|
||||||
Source0: http://download.gnome.org/sources/at-spi2-core/2.38/%{name}-%{version}.tar.xz
|
Source0: http://download.gnome.org/sources/at-spi2-core/2.38/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
# https://gitlab.gnome.org/GNOME/at-spi2-core/-/issues/25
|
||||||
|
Patch0: fix-login-screen-a11y.patch
|
||||||
|
|
||||||
BuildRequires: dbus-devel
|
BuildRequires: dbus-devel
|
||||||
BuildRequires: gettext
|
BuildRequires: gettext
|
||||||
BuildRequires: glib2-devel
|
BuildRequires: glib2-devel
|
||||||
@ -15,7 +18,7 @@ BuildRequires: gtk-doc
|
|||||||
BuildRequires: libXtst-devel
|
BuildRequires: libXtst-devel
|
||||||
BuildRequires: libXi-devel
|
BuildRequires: libXi-devel
|
||||||
BuildRequires: meson
|
BuildRequires: meson
|
||||||
BuildRequires: systemd
|
BuildRequires: systemd-devel
|
||||||
|
|
||||||
Requires: dbus
|
Requires: dbus
|
||||||
|
|
||||||
@ -77,6 +80,9 @@ API documentation for libatspi.
|
|||||||
%{_libdir}/pkgconfig/atspi-2.pc
|
%{_libdir}/pkgconfig/atspi-2.pc
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Sep 24 2020 Michael Catanzaro <mcatanzaro@redhat.com> - 2.38.0-2
|
||||||
|
- Add patch to fix a11y on login screen
|
||||||
|
|
||||||
* Sat Sep 12 2020 Kalev Lember <klember@redhat.com> - 2.38.0-1
|
* Sat Sep 12 2020 Kalev Lember <klember@redhat.com> - 2.38.0-1
|
||||||
- Update to 2.38.0
|
- Update to 2.38.0
|
||||||
|
|
||||||
|
118
fix-login-screen-a11y.patch
Normal file
118
fix-login-screen-a11y.patch
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
From 260a4414ac26cc5e91dc56b6a10b5dda3dae22cd Mon Sep 17 00:00:00 2001
|
||||||
|
From: Michael Catanzaro <mcatanzaro@gnome.org>
|
||||||
|
Date: Thu, 24 Sep 2020 15:06:44 -0500
|
||||||
|
Subject: [PATCH] Don't use dbus-broker if not running under systemd
|
||||||
|
|
||||||
|
Since gdm@febeb9a9, gdm no longer runs a systemd user session, because
|
||||||
|
gdm supports multiseat but systemd only allows one graphical session per
|
||||||
|
user. Since gdm currently runs as the gdm user, that means we cannot use
|
||||||
|
systemd there. Benjamin Berg says we could fix that by changing gdm to
|
||||||
|
use temporary users for each seat, but that would be a lot of work.
|
||||||
|
|
||||||
|
Meanwhile, dbus-broker relies on systemd to autostart D-Bus services. So
|
||||||
|
if we are not running a systemd user session, nothing gets autostarted
|
||||||
|
in response to D-Bus calls. That means orca never gets any response to
|
||||||
|
its method calls to org.a11y.atspi.Registry, and we wind up with no
|
||||||
|
accessibility on the gnome-shell login screen.
|
||||||
|
|
||||||
|
Fix this by implementing Benjamin's suggested check to see if we are
|
||||||
|
running under systemd before using dbus-broker. So now we will use
|
||||||
|
dbus-daemon on the login screen, but we will still use dbus-broker for
|
||||||
|
the user session (except in distros that still prefer dbus-daemon...
|
||||||
|
which is actually the default configuration). libsystemd is added as a
|
||||||
|
build dependency whenever built with dbus-broker support, which should
|
||||||
|
be uncontroversial because it won't work without systemd.
|
||||||
|
|
||||||
|
I expect dbus-daemon is going to live alongside dbus-broker for a long
|
||||||
|
time, because it seems very hard for us to migrate fully.
|
||||||
|
|
||||||
|
Big thanks to Benjamin Berg for discovering the problem and suggesting
|
||||||
|
this solution.
|
||||||
|
|
||||||
|
Fixes #25
|
||||||
|
---
|
||||||
|
bus/at-spi-bus-launcher.c | 18 ++++++++++++++++++
|
||||||
|
bus/meson.build | 11 ++++++++++-
|
||||||
|
2 files changed, 28 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/bus/at-spi-bus-launcher.c b/bus/at-spi-bus-launcher.c
|
||||||
|
index 362fd05f..d7c66900 100644
|
||||||
|
--- a/bus/at-spi-bus-launcher.c
|
||||||
|
+++ b/bus/at-spi-bus-launcher.c
|
||||||
|
@@ -39,6 +39,9 @@
|
||||||
|
#include <X11/Xlib.h>
|
||||||
|
#include <X11/Xatom.h>
|
||||||
|
#endif
|
||||||
|
+#ifdef DBUS_BROKER
|
||||||
|
+#include <systemd/sd-login.h>
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
A11Y_BUS_STATE_IDLE = 0,
|
||||||
|
@@ -392,11 +395,26 @@ static gboolean
|
||||||
|
ensure_a11y_bus_broker (A11yBusLauncher *app, char *config_path)
|
||||||
|
{
|
||||||
|
char *argv[] = { DBUS_BROKER, config_path, "--scope", "user", NULL };
|
||||||
|
+ char *unit;
|
||||||
|
struct sockaddr_un addr = { .sun_family = AF_UNIX };
|
||||||
|
socklen_t addr_len = sizeof(addr);
|
||||||
|
GPid pid;
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
|
+ /* This detects whether we are running under systemd. We only try to
|
||||||
|
+ * use dbus-broker if we are running under systemd because D-Bus
|
||||||
|
+ * service activation won't work otherwise.
|
||||||
|
+ */
|
||||||
|
+ if (sd_pid_get_user_unit (getpid (), &unit) >= 0)
|
||||||
|
+ {
|
||||||
|
+ free (unit);
|
||||||
|
+ }
|
||||||
|
+ else
|
||||||
|
+ {
|
||||||
|
+ app->state = A11Y_BUS_STATE_ERROR;
|
||||||
|
+ return FALSE;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if ((app->listenfd = socket (PF_UNIX, SOCK_STREAM | SOCK_NONBLOCK, 0)) < 0)
|
||||||
|
g_error ("Failed to create listening socket: %s", strerror (errno));
|
||||||
|
|
||||||
|
diff --git a/bus/meson.build b/bus/meson.build
|
||||||
|
index 0fff5a89..f6c32c99 100644
|
||||||
|
--- a/bus/meson.build
|
||||||
|
+++ b/bus/meson.build
|
||||||
|
@@ -48,13 +48,16 @@ else
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
+needs_systemd = false
|
||||||
|
if get_option('dbus_broker') != 'default'
|
||||||
|
launcher_args += '-DDBUS_BROKER="@0@"'.format(get_option('dbus_broker'))
|
||||||
|
+ needs_systemd = true
|
||||||
|
else
|
||||||
|
dbus_broker = find_program('dbus-broker-launch',
|
||||||
|
required: false)
|
||||||
|
if dbus_broker.found()
|
||||||
|
launcher_args += '-DDBUS_BROKER="@0@"'.format(dbus_broker.path())
|
||||||
|
+ needs_systemd = true
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
|
@@ -62,9 +65,15 @@ if get_option('default_bus') == 'dbus-broker'
|
||||||
|
launcher_args += '-DWANT_DBUS_BROKER'
|
||||||
|
endif
|
||||||
|
|
||||||
|
+if needs_systemd
|
||||||
|
+ systemd_dep = dependency('libsystemd')
|
||||||
|
+else
|
||||||
|
+ systemd_dep = dependency('', required: false)
|
||||||
|
+endif
|
||||||
|
+
|
||||||
|
executable('at-spi-bus-launcher', 'at-spi-bus-launcher.c',
|
||||||
|
include_directories: [ root_inc, include_directories('.') ],
|
||||||
|
- dependencies: [ gio_dep, x11_deps ],
|
||||||
|
+ dependencies: [ gio_dep, systemd_dep, x11_deps ],
|
||||||
|
c_args: launcher_args,
|
||||||
|
install: true,
|
||||||
|
install_dir: atspi_libexecdir)
|
||||||
|
--
|
||||||
|
GitLab
|
Loading…
Reference in New Issue
Block a user