Skip to content

nixos: add StateDirectory for fprintd #62088

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

Merged
merged 1 commit into from
May 26, 2019

Conversation

michaelpj
Copy link
Contributor

Motivation for this change

Fixes #62082. There is a MR open upstream to fix this with StateDirectory, but for now this seems like a good fix.

cc @abbradar

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.

Sorry, something went wrong.

@ofborg ofborg bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels May 26, 2019
@@ -50,6 +50,14 @@ in

systemd.packages = [ cfg.package ];

# The upstream unit does not use StateDirectory, so will
# fail if the directory it needs is not present. Should be
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure systemd.services.fprintd.serviceConfig.StateDirectory = "fprint" works too, should get merged with the upstream unit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Huh, does that work even when there's an existing upstream unit that we use?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Great, seems to work. I'll use that instead.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah I found out about this too recently, seems that systemd can merge multiple unit files at runtime.

@michaelpj michaelpj force-pushed the fix/fprintd-state-dir branch from 8717e32 to 9131bf5 Compare May 26, 2019 17:07
@michaelpj michaelpj changed the title nixos: add tmpfiles rule for fprintd nixos: add StateDirectory for fprintd May 26, 2019
@infinisil infinisil merged commit 841fb94 into NixOS:master May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fprintd fails to start if /var/lib/fprint doesn't exist
2 participants