Skip to content

nixos/rspamd: Fix enable for locals and overrides#49792

Merged
fpletz merged 1 commit intoNixOS:masterfrom
griff:rspamd-multifile-enable
Nov 6, 2018
Merged

nixos/rspamd: Fix enable for locals and overrides#49792
fpletz merged 1 commit intoNixOS:masterfrom
griff:rspamd-multifile-enable

Conversation

@griff
Copy link
Contributor

@griff griff commented Nov 5, 2018

Motivation for this change

When implementing #49620 I included an enable option for both the
locals and overrides options but the code writing the files didn't
actually look at enable and so would write the file regardless of its
value. I also set the type to loaOf which should have been attrsOf
since the code was not written to handle the options being lists.

This fixes both of those issues.

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 nox --run "nox-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)
  • Fits CONTRIBUTING.md.

When implementing NixOS#49620 I included an enable option for both the
locals and overrides options but the code writing the files didn't
actually look at enable and so would write the file regardless of its
value. I also set the type to loaOf which should have been attrsOf
since the code was not written to handle the options being lists.

This fixes both of those issues.
@GrahamcOfBorg GrahamcOfBorg 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 Nov 5, 2018
@fpletz
Copy link
Member

fpletz commented Nov 5, 2018

@GrahamcOfBorg test rspamd.customLuaRules

@fpletz fpletz merged commit 159a5f3 into NixOS:master Nov 6, 2018
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: tests.rspamd.customLuaRules

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 207.28s
cleaning up
killing machine (pid 600)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/2xnd5ln1q9mnj6xdnzz6z2aq4n2himq5-vm-test-run-rspamd-custom-lua-rules

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: tests.rspamd.customLuaRules

Partial log (click to expand)

machine: exit status 1
syncing
machine: running command: sync
machine: exit status 0
test script finished in 112.92s
cleaning up
killing machine (pid 631)
vde_switch: EOF on stdin, cleaning up and exiting
vde_switch: Could not remove ctl dir '/build/vde1.ctl': Directory not empty
/nix/store/y9a9n7fm9h6qdakhrfk12w4cgnzf6dc0-vm-test-run-rspamd-custom-lua-rules

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.

3 participants