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

ibus: fix dconf db installation #85892

Merged
merged 3 commits into from Apr 24, 2020
Merged

ibus: fix dconf db installation #85892

merged 3 commits into from Apr 24, 2020

Conversation

symphorien
Copy link
Member

Motivation for this change

Fix a warning when running ibus-daemon:

(ibus-dconf:15691): dconf-WARNING **: 21:49:24.018: unable to open file '/etc/dconf/db/ibus': Failed to open file ?/etc/dconf/db/ibus?: open() failed: No such file or directory; expect degraded performance

cc @jtojnar @worldofpeace about dconf.

Things done
  • Tested that ibus still works and that the warning is gone in a vm
  • ran the gnome and gnome-xorg tests to ensure the dconf.profiles options has not regressed
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@@ -47,6 +48,14 @@ let
makeWrapper ${glib.dev}/bin/glib-mkenums $out/bin/glib-mkenums --unset PYTHONPATH
'';
};
# make-dconf-override-db.sh needs to execute dbus-launch in the sandbox,
Copy link
Contributor

Choose a reason for hiding this comment

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

What error does this cause?

Copy link
Member Author

Choose a reason for hiding this comment

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

dbus[19730]: Failed to start message bus: Failed to open "/etc/dbus-1/session.conf": No such file or directory

I wrote it in the comment.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, right. I did not notice we were previously replacing the file with a blank script.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can confirm this works to copy the default value from GSettings schemas to the dconf database. Though I do not understand why would they do it, unless they do not use GSettings and access dconf database directly.

Fixes this warning at ibus-daemon startup:

(ibus-dconf:15691): dconf-WARNING **: 21:49:24.018: unable to open file '/etc/dconf/db/ibus': Failed to open file ?/etc/dconf/db/ibus?: open() failed: No such file or directory; expect degraded performance
@symphorien
Copy link
Member Author

Thanks for your review comments. I incorporated them.

@ttuegel
Copy link
Member

ttuegel commented Apr 24, 2020

The ibus aspect of this looks okay to me, but I don't know enough about the dconf aspect to say.

@symphorien
Copy link
Member Author

The ibus test does not pass, but it didn't pass before either:
before

# Start of ibus tests
# MESSAGE: Failed to generate IBusConfig: Configuration daemon is not running.
Bail out! ERROR:ibus-config.c:23:finish_create_config_async_success: assertion failed: (IBUS_IS_CONFIG (config))
FAIL: ibus/ibus-config.test (Child process killed by signal 6)

After:

# Start of ibus tests
ok 1 /ibus/create-config-async
Bail out! IBUS-FATAL-WARNING: org.freedesktop.IBus.Config.GetValue: GDBus.Error:org.freedesktop.DBus.Error.Failed: Config value [test:v1] does not exist.
FAIL: ibus/ibus-config.test (Child process killed by signal 5)

which looks better but not good enough yet...

@symphorien
Copy link
Member Author

I fixed the test by running ibus-daemon inside the session via systemd instead of via ssh. It's slightly mysterious to me though.

@worldofpeace worldofpeace merged commit 78a9359 into NixOS:master Apr 24, 2020
@worldofpeace
Copy link
Contributor

worldofpeace commented Apr 24, 2020

I fixed the test by running ibus-daemon inside the session via systemd instead of via ssh. It's slightly mysterious to me though.

It seems fine to me, and it works ✨

@worldofpeace
Copy link
Contributor

I noticed an issue with the tests that introduced an eval issue #85970 (comment). Reverted for now.

@symphorien symphorien mentioned this pull request Apr 25, 2020
10 tasks
@symphorien
Copy link
Member Author

reopened and fixed in #85992

@worldofpeace worldofpeace mentioned this pull request Aug 11, 2020
10 tasks
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

4 participants