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

gnome-photos: 3.32.0 → 3.32.1 #67318

Merged
merged 9 commits into from Aug 23, 2019
Merged

gnome-photos: 3.32.0 → 3.32.1 #67318

merged 9 commits into from Aug 23, 2019

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Aug 23, 2019

  • Moves some GNOME packages to top-level namespace
  • Upgrades gnome-photos
  • Adds installed tests

@worldofpeace
Copy link
Contributor

worldofpeace commented Aug 23, 2019

@jtojnar I think gnome-photos tests probably need dconf.

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

Yeah, but it is not enough. Currently debugging that.

@jtojnar jtojnar force-pushed the gnome-photos branch 2 times, most recently from a168d2a to 0044924 Compare August 23, 2019 02:16
@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

With the following debug patch

diff --git a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix
index cca98c43dc7..6b3b3f7d0ad 100644
--- a/nixos/modules/services/desktops/gnome3/at-spi2-core.nix
+++ b/nixos/modules/services/desktops/gnome3/at-spi2-core.nix
@@ -4,7 +4,17 @@
 
 with lib;
 
-{
+let
+  package = pkgs.at-spi2-core.overrideAttrs (attrs: {
+    nativeBuildInputs = attrs.nativeBuildInputs ++ [ pkgs.makeWrapper ];
+
+    postFixup = ''
+      wrapProgram $out/libexec/at-spi-bus-launcher \
+        --prefix XDG_DATA_DIRS : ${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}
+    '';
+  });
+
+in {
 
   ###### interface
 
@@ -30,9 +40,9 @@
 
   config = mkMerge [
     (mkIf config.services.gnome3.at-spi2-core.enable {
-      environment.systemPackages = [ pkgs.at-spi2-core ];
-      services.dbus.packages = [ pkgs.at-spi2-core ];
-      systemd.packages = [ pkgs.at-spi2-core ];
+      environment.systemPackages = [ package ];
+      services.dbus.packages = [ package ];
+      systemd.packages = [ package ];
     })
 
     (mkIf (!config.services.gnome3.at-spi2-core.enable) {
diff --git a/nixos/tests/gnome-photos.nix b/nixos/tests/gnome-photos.nix
index 74c1aea4db2..aa5c4d8def0 100644
--- a/nixos/tests/gnome-photos.nix
+++ b/nixos/tests/gnome-photos.nix
@@ -16,6 +16,7 @@
 
   testScript = ''
     $machine->waitForX;
-    $machine->succeed("gnome-desktop-testing-runner -d '${pkgs.gnome-photos.installedTests}/share'");
+    $machine->execute("env G_MESSAGES_DEBUG=all gnome-desktop-testing-runner -d '${pkgs.gnome-photos.installedTests}/share' gnome-photos/basic.py.test");
+    $machine->execute("cat /tmp/dogtail-root/logs/.basic-wrapped_*_debug");
   '';
 })

all warnings disappear but the test is still failing:

machine: running command: env G_MESSAGES_DEBUG=all gnome-desktop-testing-runner -d '/nix/store/0vw0sgclpn171hnnivvwgwpsgsdms6y5-gnome-photos-3.32.1-installedTests/share' gnome-photos/basic.py.test
machine# [   26.102431] dbus-daemon[803]: [session uid=0 pid=801] Activating service name='org.a11y.Bus' requested by ':1.0' (uid=0 pid=839 comm="/nix/store/2zqdjd1xrg4nljkkxi9mw6bgy132rz1x-python")
machine# [   26.194530] dbus-daemon[803]: [session uid=0 pid=801] Successfully activated service 'org.a11y.Bus'
machine# [   26.238909] org.a11y.Bus[803]: dbus-daemon[855]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=0 pid=839 comm="/nix/store/2zqdjd1xrg4nljkkxi9mw6bgy132rz1x-python")
machine# [   26.423570] org.a11y.Bus[803]: dbus-daemon[855]: Successfully activated service 'org.a11y.atspi.Registry'
machine# [   26.438842] org.a11y.Bus[803]: SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
machine# [   26.591853] dbus-daemon[803]: [session uid=0 pid=801] Activating service name='ca.desrt.dconf' requested by ':1.3' (uid=0 pid=839 comm="/nix/store/2zqdjd1xrg4nljkkxi9mw6bgy132rz1x-python")
machine# [   26.695121] dbus-daemon[803]: [session uid=0 pid=801] Successfully activated service 'ca.desrt.dconf'
machine# [   27.006613] gnome-desktop-testing-runner[837]: Executing: gnome-photos/basic.py.test
machine# [   27.590633] gnome-desktop-testing-runner[837]: FAIL: gnome-photos/basic.py.test (Child process exited with code 1)
machine# [   27.613062] gnome-desktop-testing-runner[837]: SUMMARY: total=1; passed=0; skipped=0; failed=1; user=0.7s; system=0.5s; maxrss=67848

It succeeds in my user session:

nix run -f . gnome-desktop-testing ostree -c env G_MESSAGES_DEBUG=all gnome-desktop-testing-runner -d $(nix-build -A gnome-photos.installedTests --no-out-link)/share gnome-photos/basic.py.test

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

The missing part was adding gnome-photos to services.dbus.packages and enabling the accessibility for dogtail to work. Wow, that is hideous – perhaps we should create a package providing gsettings wrapped with desktop schemas.

@worldofpeace
Copy link
Contributor

I came upon that as well maybe 15 minutes ago. It caused an involuntary cringe, I had to look away 🤣

@worldofpeace
Copy link
Contributor

Wow, that is hideous – perhaps we should create a package providing gsettings wrapped with desktop schemas.

Is there a metric on how many other tests use dogtail? I'd dislike having to copy the same hack.

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

I think it is quite rare (< 10 projects relying on it). Some packages were even removing it as it has not been maintained until recently.

testScript = ''
$machine->waitForX;
# dogtail needs accessibility enabled
$machine->succeed("env GIO_EXTRA_MODULES='${lib.getLib pkgs.gnome3.dconf}/lib/gio/modules' XDG_DATA_DIRS='${pkgs.gsettings-desktop-schemas}/share/gsettings-schemas/${pkgs.gsettings-desktop-schemas.name}' ${pkgs.glib.bin}/bin/gsettings set org.gnome.desktop.interface toolkit-accessibility true 2>&1");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make let the environment variables string into the testScript so it's clearer to read?

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with above comment.

@worldofpeace
Copy link
Contributor

Oh, I see warnings in the test for tracker dbus interfaces

machine# [   20.071667] .gnome-photos-w[903]: Unable to create PhotosTrackerQueue: Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Tracker1 was not provided by any .service files
machine# [   20.131247] .gnome-photos-w[903]: Unable to create PhotosTrackerQueue: Failed to load SPARQL backend: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Tracker1 was not provided by any .service files

Think we should enable them?

@jtojnar
Copy link
Contributor Author

jtojnar commented Aug 23, 2019

I tried but then it also wants dleyna and since the test just checks if the interface works, I did not want to descend into this rabbit hole.

Copy link
Contributor

@worldofpeace worldofpeace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. No 🐇 today 😄

@ofborg ofborg bot requested a review from worldofpeace August 23, 2019 17:46
@jtojnar jtojnar merged commit a8d3aeb into NixOS:master Aug 23, 2019
@jtojnar jtojnar deleted the gnome-photos branch August 23, 2019 17:49
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