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/dnsdist: init module #37289

Merged
merged 2 commits into from Jun 13, 2018
Merged

nixos/dnsdist: init module #37289

merged 2 commits into from Jun 13, 2018

Conversation

disassembler
Copy link
Member

@disassembler disassembler commented Mar 18, 2018

Motivation for this change

Adds dnsdist which is now the recommended way to run an authoritative and recursor DNS service using powerdns if you need ACL's.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-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 nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin

The following builds were skipped because they don't evaluate on x86_64-darwin: dnsdist, powerdns

No log is available.

@disassembler
Copy link
Member Author

I also think this should go into 18.03 since the recursor options have been removed from authoritative powerdns server.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: dnsdist

The following builds were skipped because they don't evaluate on aarch64-linux: powerdns

Partial log (click to expand)

make[1]: Leaving directory '/build/dnsdist-1.2.1'
post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1
shrinking /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1/bin/dnsdist
gzipping man pages under /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1/share/man/
strip is /nix/store/3zq400fri5dv7d30lpxlqm2v9y1iis6j-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1/lib  /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1/bin
patching script interpreter paths in /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1
checking for references to /build in /nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1...
/nix/store/wanlm33rc5z3gi0cblkg0zg9qgn7vb2y-dnsdist-1.2.1

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: dnsdist, powerdns

Partial log (click to expand)

post-installation fixup
shrinking RPATHs of ELF executables and libraries in /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1
shrinking /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1/bin/dnsdist
gzipping man pages under /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1/share/man/
strip is /nix/store/fzcs0fn6bb04m82frhlb78nc03ny3w55-binutils-2.28.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1/lib  /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1/bin
patching script interpreter paths in /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1
checking for references to /build in /nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1...
/nix/store/24mvm9p8d6vzcz8lb5fylswjp9wr24nc-dnsdist-1.2.1
/nix/store/qf30lgdzn4xhysjfpbry2w0mg7f4k7ns-powerdns-4.1.1

PrivateTmp=true;
PrivateDevices=true;
CapabilityBoundingSet="CAP_NET_BIND_SERVICE CAP_SETGID CAP_SETUID";
ExecStart = "${pkgs.dnsdist}/bin/dnsdist --uid=nobody --gid=nogroup --supervised --disable-syslog --config ${configFile}";
Copy link
Member

Choose a reason for hiding this comment

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

Can you look into systemd's DynamicUser instead of nobody? If we run every service as nobody the user separation is undermined.

@disassembler
Copy link
Member Author

disassembler commented Mar 19, 2018 via email

@Mic92
Copy link
Member

Mic92 commented Mar 19, 2018

@disassembler yes.

@vcunat
Copy link
Member

vcunat commented May 1, 2018

Still interested in this? A dnsdist expression was merged in #38658, though without a service.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: powerdns

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: powerdns

Partial log (click to expand)

copying path '/nix/store/8v6cpmd211q4z0maxna8fqykfxpfaar5-lua-5.2.3' from 'https://cache.nixos.org'...
copying path '/nix/store/gnj95a4hip3mrnnk9p14lx0h1di37a4k-postgresql-9.6.8' from 'https://cache.nixos.org'...
copying path '/nix/store/lwlc1dr54lj5w5pm4hc90m84qkklr3lk-libyaml-cpp-0.6.2-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/k52s6140w4wdcsk7w0jwx46rdckp452j-protobuf-3.4.1' from 'https://cache.nixos.org'...
copying path '/nix/store/vpjvqgsv062y0p09yxw2dy7s4lrg2vw3-unixODBC-2.3.6' from 'https://cache.nixos.org'...
copying path '/nix/store/w2asz62sw3p89jk5w9qswrk9qcwdq9z1-boost-1.59.0-dev' from 'https://cache.nixos.org'...
copying path '/nix/store/rbzwx24wi9z5zl7rnkf3qix3ws48psi6-opendbx-1.4.6' from 'https://cache.nixos.org'...
copying path '/nix/store/r1lhranc4wpzjzjhrnp8ca5w2z0dd76v-mysql-5.7.20' from 'https://cache.nixos.org'...
copying path '/nix/store/5fsgf2hxg8mlym9sk1prkrg7kxmp9pbg-powerdns-4.1.1' from 'https://cache.nixos.org'...
/nix/store/5fsgf2hxg8mlym9sk1prkrg7kxmp9pbg-powerdns-4.1.1

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: powerdns

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnsupportedSystem = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnsupportedSystem = true; }
to ~/.config/nixpkgs/config.nix.


@xeji xeji changed the title dnsdist: init at 1.2.1 nixos/dnsdist: init module Jun 13, 2018
@xeji xeji merged commit bffc59b into NixOS:master Jun 13, 2018
@xeji xeji mentioned this pull request Jun 13, 2018
8 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

5 participants