Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

at-spi2-core: wrap at-spi-bus-launcher #67320

Merged
merged 1 commit into from Aug 23, 2019

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Aug 23, 2019

Currently the following warnings and errors are logged on GNOME startup:

Aug 22 19:34:16 kaiser dbus-daemon[1229]: [session uid=132 pid=1229] Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service' requested by ':1.8' (uid=132 pid=1246 comm="/nix/store/5anz
kdq6src76c4lm4m98w2a8f3j2cc4-gnome-" label="kernel")
Aug 22 19:34:16 kaiser systemd[1223]: Starting Accessibility services bus...
Aug 22 19:34:16 kaiser at-spi-bus-laun[1341]: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
Aug 22 19:34:16 kaiser dbus-daemon[1229]: [session uid=132 pid=1229] Successfully activated service 'org.a11y.Bus'
Aug 22 19:34:16 kaiser systemd[1223]: Started Accessibility services bus.
Aug 22 19:34:16 kaiser at-spi-bus-launcher[1341]: dbus-daemon[1345]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=132 pid=1246 comm="/nix/store/5anzkdq6src76c4lm4m98w2a8f3j2cc4-gnom
e-" label="kernel")
Aug 22 19:34:16 kaiser at-spi-bus-launcher[1341]: dbus-daemon[1345]: Successfully activated service 'org.a11y.atspi.Registry'
Aug 22 19:34:16 kaiser at-spi-bus-launcher[1341]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
[…]
Aug 22 19:34:26 kaiser dbus-daemon[1775]: [session uid=1000 pid=1775] Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service' requested by ':1.10' (uid=1000 pid=1852 comm="/nix/store/0k7r7imgs4zw3c9csldq7clmcyn4cy6k-gnome-" label="kernel")
Aug 22 19:34:26 kaiser systemd[1769]: Starting Accessibility services bus...
Aug 22 19:34:26 kaiser at-spi-bus-laun[1858]: g_settings_schema_source_lookup: assertion 'source != NULL' failed
Aug 22 19:34:26 kaiser at-spi-bus-laun[1858]: g_settings_schema_source_lookup: assertion 'source != NULL' failed
Aug 22 19:34:26 kaiser dbus-daemon[1775]: [session uid=1000 pid=1775] Successfully activated service 'org.a11y.Bus'
Aug 22 19:34:26 kaiser systemd[1769]: Started Accessibility services bus.
Aug 22 19:34:26 kaiser at-spi-bus-launcher[1858]: dbus-daemon[1862]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 pid=1852 comm="/nix/store/0k7r7imgs4zw3c9csldq7clmcyn4cy6k-gnome-" label="kernel")
Aug 22 19:34:26 kaiser at-spi-bus-launcher[1858]: dbus-daemon[1862]: Successfully activated service 'org.a11y.atspi.Registry'
Aug 22 19:34:26 kaiser at-spi-bus-launcher[1858]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry

This patch starts wrapping the binary, fixing one of the stragglers from #14120.

Unfortunately, we could not use wrapGAppsHook due to dependency cycle.

cc @worldofpeace

@worldofpeace
Copy link
Contributor

worldofpeace commented Aug 23, 2019

Can you add a comment why we aren't using wrapGAppsHook?

And do you still think we should have

gnome3.dconf.lib gtk3

as deps for wrapGAppsHook?
(perhaps we need a bootstrap version)

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

I think, yeah gtk3 has no business being there. It is much more nuanced with dconf.lib. Since some GSettings backend is required for almost everything (including GTK) but we cannot specify dependencies on abstract interfaces (matched by ABI/D-Bus interface/icon names…) instead of concrete packages and there was only one practical backend on Linux, we are adding it everywhere. Icons are in similar situation but there are countless alternatives so I prefer for them to be chosen by user.

There was some love given to the keyfile backend recently so perhaps we could drop the dconf backend by default and only set it in GNOME module.

I am more and more sceptical with regards to wrapGAppsHook. I agree that it is convenient but it will gladly wrap all binaries with everything in inputs, even things only needed for tests. I would like to experiment with some more targetted methods like the AST modifications/Coccinelle.

@jtojnar jtojnar mentioned this pull request Aug 23, 2019
@worldofpeace
Copy link
Contributor

I think, yeah gtk3 has no business being there. It is much more nuanced with dconf.lib.

Right, and currently we have to wrap gtk3's demos manually because the hook depends on it.

concrete packages and there was only one practical backend on Linux, we are adding it everywhere. Icons are in similar situation but there are countless alternatives so I prefer for them to be chosen by user.

I agree on the case where there's many alternates, at least in the practical sense it's a case where that is acceptable.

I am more and more skeptical with regards to wrapGAppsHook. I agree that it is convenient but it will gladly wrap all binaries with everything in inputs, even things only needed for tests. I would like to experiment with some more targeted methods like the AST modifications/Coccinelle.

Or wrappers in general. They're very convenient and we have them in qt now as well, but the drawbacks are pretty well observed at this point. Any alternatives or targeted methods like the AST modifications for gsettings could give us something more streamlined 👍

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

Hmm, this might cause a regression on non-gnome-session systems if I read the code correctly in this late hour.

Previously, /etc/xdg/autostart/at-spi-dbus-bus.desktop would launch at-spi-bus-launcher with --launch-immediately flag. The launcher would then, in the absence of gsettings-desktop-schemas decide to enable the accessibility since it was told to launch immediately.

After this, we will always rely on the setting value (unless the launcher is run manually with --a11y=1).

Currently the following warnings and errors are logged on GNOME startup:

	Aug 22 19:34:16 kaiser dbus-daemon[1229]: [session uid=132 pid=1229] Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service' requested by ':1.8' (uid=132 pid=1246 comm="/nix/store/5anz
	kdq6src76c4lm4m98w2a8f3j2cc4-gnome-" label="kernel")
	Aug 22 19:34:16 kaiser systemd[1223]: Starting Accessibility services bus...
	Aug 22 19:34:16 kaiser at-spi-bus-laun[1341]: Using the 'memory' GSettings backend.  Your settings will not be saved or shared with other applications.
	Aug 22 19:34:16 kaiser dbus-daemon[1229]: [session uid=132 pid=1229] Successfully activated service 'org.a11y.Bus'
	Aug 22 19:34:16 kaiser systemd[1223]: Started Accessibility services bus.
	Aug 22 19:34:16 kaiser at-spi-bus-launcher[1341]: dbus-daemon[1345]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=132 pid=1246 comm="/nix/store/5anzkdq6src76c4lm4m98w2a8f3j2cc4-gnom
	e-" label="kernel")
	Aug 22 19:34:16 kaiser at-spi-bus-launcher[1341]: dbus-daemon[1345]: Successfully activated service 'org.a11y.atspi.Registry'
	Aug 22 19:34:16 kaiser at-spi-bus-launcher[1341]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
	[…]
	Aug 22 19:34:26 kaiser dbus-daemon[1775]: [session uid=1000 pid=1775] Activating via systemd: service name='org.a11y.Bus' unit='at-spi-dbus-bus.service' requested by ':1.10' (uid=1000 pid=1852 comm="/nix/store/0k7r7imgs4zw3c9csldq7clmcyn4cy6k-gnome-" label="kernel")
	Aug 22 19:34:26 kaiser systemd[1769]: Starting Accessibility services bus...
	Aug 22 19:34:26 kaiser at-spi-bus-laun[1858]: g_settings_schema_source_lookup: assertion 'source != NULL' failed
	Aug 22 19:34:26 kaiser at-spi-bus-laun[1858]: g_settings_schema_source_lookup: assertion 'source != NULL' failed
	Aug 22 19:34:26 kaiser dbus-daemon[1775]: [session uid=1000 pid=1775] Successfully activated service 'org.a11y.Bus'
	Aug 22 19:34:26 kaiser systemd[1769]: Started Accessibility services bus.
	Aug 22 19:34:26 kaiser at-spi-bus-launcher[1858]: dbus-daemon[1862]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=1000 pid=1852 comm="/nix/store/0k7r7imgs4zw3c9csldq7clmcyn4cy6k-gnome-" label="kernel")
	Aug 22 19:34:26 kaiser at-spi-bus-launcher[1858]: dbus-daemon[1862]: Successfully activated service 'org.a11y.atspi.Registry'
	Aug 22 19:34:26 kaiser at-spi-bus-launcher[1858]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry

This patch starts wrapping the binary, fixing one of the stragglers from NixOS#14120.

Unfortunately, we could not use wrapGAppsHook due to dependency cycle.
@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

The desktop file contains OnlyShowIn=GNOME;Unity; so the issue is moot.

@jtojnar jtojnar force-pushed the at-spi-bus-launcher-schemas branch from ac8b0b2 to 1adfc32 Compare August 23, 2019 22:43
@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

Added the comment.

@worldofpeace
Copy link
Contributor

The desktop file contains OnlyShowIn=GNOME;Unity; so the issue is moot.

Shouldn't be an issue for Pantheon either with the patched autostart.

@jtojnar jtojnar merged commit 2e1f990 into NixOS:staging Aug 23, 2019
@jtojnar jtojnar deleted the at-spi-bus-launcher-schemas branch August 23, 2019 22:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants