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

localtime: use upstream unit, fix polkit rules #63204

Merged
merged 2 commits into from Jun 19, 2019

Conversation

michaelpj
Copy link
Contributor

Motivation for this change

Fixes #55288.

localtime's systemd unit and polkit rules weren't being installed since ed473e6, which moves it to using buildGoPackage. This caused two issues:

  • We weren't using make install, so we weren't installing all the build products to the output at all.
  • buildGoPackage puts the bin output first, so the bare package references in the module were getting the bin output rather than the out output, and so wouldn't see the polkit rules anyway.

This PR fixes those issue.s

Along the way, I made us actually use the upstream unit, which works fine in my testing. With these changes and the recent geoclue changes, localtime now actually works on my system.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • 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 nix-review --run "nix-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)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

- Use the right variables and `make install` to ensure all products are
installed.
- Remove unneeded build inputs: we don't need systemd or polkit to
install the service or polkit rules.
@michaelpj
Copy link
Contributor Author

cc @Mic92 perhaps, who merged #52627?

@worldofpeace
Copy link
Contributor

I've tested that at least the services would start in a vm.

Also don't allocate a user - the upstream unit uses DynamicUser.
@worldofpeace worldofpeace merged commit d672cee into NixOS:master Jun 19, 2019
@worldofpeace
Copy link
Contributor

Thanks for fixing this @michaelpj, it's a great improvement.

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.

localtimed user can't set timezone
2 participants