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

nixos/powerdns: Use upstream systemd service file #74525

Closed
wants to merge 1 commit into from
Closed

nixos/powerdns: Use upstream systemd service file #74525

wants to merge 1 commit into from

Conversation

bartelsielski
Copy link

@bartelsielski bartelsielski commented Nov 28, 2019

Motivation for this change

Use upstream systemd service file, reducing maintainer overhead.

Note: powerdns no longer runs inside a chrooted environment. This seems to be
against the policy of the upstream developers [link].

Things done
  • 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 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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @Mic92

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Nov 28, 2019

Align with upstream systemd service file. journald already stores the timestamp anyway.

Is there a reason why the upstream unit file is not being used?

@bartelsielski
Copy link
Author

@rnhmjoj Because nixos modules are written by hand.

Am I missing something really obvious here? 😕

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Nov 28, 2019

@rnhmjoj Because nixos modules are written by hand.

Yes, but I think you can use units installed by a package. If I remember correctly syncthing does it.

EDIT:

Looking at these commits it seems all you only have to do is:

systemd.packages = [ cfg.package ]

provided the package exports a unit file.

@bartelsielski bartelsielski changed the title nixos/powerdns: Add '--log-timestamp=no' command line flag nixos/powerdns: Use upstream systemd service file Nov 28, 2019
@bartelsielski
Copy link
Author

A little more work is needed to handle the configuration correctly, testing needs to be redone, ...

@rnhmjoj Thanks for introducing me to the systemd.packages option.

@rnhmjoj
Copy link
Contributor

rnhmjoj commented Nov 28, 2019

I didn't notice the --config-dir=${configDir} at the end of the line: It looks like the ExecStart still need to be written manually.

@Mic92
Copy link
Member

Mic92 commented Nov 29, 2019

Just add set ExecStart in the NixOS module and it will override this option in the provided unit file as well.

@stale
Copy link

stale bot commented Jun 10, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 10, 2020
@rnhmjoj
Copy link
Contributor

rnhmjoj commented Jun 10, 2020

Ooh, I had completely forgotten this PR, sorry. It's still relevant, can you rebase your changes?
The notice should be moved to 20.09.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 10, 2020
powerdns no longer runs inside a chrooted environment. This seems to be
against the policy of the upstream developers [1].

[1] PowerDNS/pdns#4179 (comment)
@bartelsielski bartelsielski deleted the powerdns_journald branch August 13, 2020 07:14
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

3 participants