Fix AT_SPI_BUS for Xwayland apps run as root (#1821345)

This commit is contained in:
Adam Williamson 2021-04-16 22:46:24 -07:00
parent 282e7deefa
commit d6dd6c34d4
2 changed files with 18 additions and 1 deletions

View File

@ -1,11 +1,14 @@
Name: at-spi2-core
Version: 2.40.0
Release: 1%{?dist}
Release: 2%{?dist}
Summary: Protocol definitions and daemon for D-Bus at-spi
License: LGPLv2+
URL: http://www.linuxfoundation.org/en/AT-SPI_on_D-Bus
Source0: http://download.gnome.org/sources/at-spi2-core/2.40/%{name}-%{version}.tar.xz
# scriptlet to set AT_SPI_BUS for XWayland apps that run as root (i.e. anaconda)
# https://bugzilla.redhat.com/show_bug.cgi?id=1821345
Source1: xwayland-session-scriptlet
BuildRequires: dbus-devel
BuildRequires: gettext
@ -46,6 +49,8 @@ API documentation for libatspi.
%install
%meson_install
install -d %{buildroot}%{_sysconfdir}/xdg/Xwayland-session.d
install -m 0755 %{SOURCE1} %{buildroot}%{_sysconfdir}/xdg/Xwayland-session.d/00-at-spi
%{find_lang} %{name}
@ -57,6 +62,12 @@ API documentation for libatspi.
%dir %{_datadir}/defaults/at-spi2
%{_datadir}/defaults/at-spi2/accessibility.conf
%{_sysconfdir}/xdg/autostart/at-spi-dbus-bus.desktop
# the 'logical' owner of this dir is gnome-settings-daemon, but g-s-d
# indirectly depends on this package, so depending on it to provide
# this directory would create a circular dependency. so we just co-own
# it instead
%dir %{_sysconfdir}/xdg/Xwayland-session.d
%{_sysconfdir}/xdg/Xwayland-session.d/00-at-spi
%{_libdir}/libatspi.so.*
%dir %{_libdir}/girepository-1.0
%{_libdir}/girepository-1.0/Atspi-2.0.typelib
@ -74,6 +85,9 @@ API documentation for libatspi.
%{_libdir}/pkgconfig/atspi-2.pc
%changelog
* Thu Apr 15 2021 Adam Williamson <awilliam@redhat.com> - 2.40.0-2
- Install a scriptlet to fix AT_SPI_BUS for Xwayland apps run as root (#1821345)
* Mon Mar 22 2021 Kalev Lember <klember@redhat.com> - 2.40.0-1
- Update to 2.40.0

View File

@ -0,0 +1,3 @@
#!/bin/sh
xprop -root -format AT_SPI_BUS 8s -set 'AT_SPI_BUS' "$( busctl call --user org.a11y.Bus /org/a11y/bus org.a11y.Bus GetAddress | sed 's/s "\(.*\)"/\1/' )"