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

Add missing \n in configuration generator for systemd-boot #44935

Merged
merged 1 commit into from Aug 12, 2018

Conversation

thblt
Copy link
Contributor

@thblt thblt commented Aug 12, 2018

Motivation for this change

This adds a missing \n in the configuratin generator for systemd-boot (formerly gummiboot). Because of the missing \n, the following config bit:

boot.loader.systemd-boot.editor = false;
boot.loader.systemd-boot.consoleMode = "auto";

would produce a file ending with:

editor 0console-mode auto

instead of

editor 0
console-mode auto
Things done

(None yet, sorry. I have no idea how to test this, and I assume the change is straightforward enough. Just tell me if you want any of these tests done, I'll look up how :)

  • 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.

@thblt thblt changed the title Add missing \n in Add missing \n in confiugration generator for systemd-boot Aug 12, 2018
@thblt thblt changed the title Add missing \n in confiugration generator for systemd-boot Add missing \n in configuration generator for systemd-boot Aug 12, 2018
@srhb srhb self-assigned this Aug 12, 2018
@srhb
Copy link
Contributor

srhb commented Aug 12, 2018

I ran some of our installer and uefi tests with systemd-boot.consoleMode set, and everything seems to be just fine. Thank you! :)

@thblt
Copy link
Contributor Author

thblt commented Aug 12, 2018

@srhb Notice you also need boot.loader.systemd-boot.editor = false;, which is where the actual bug lies! (Also, please tell me if I can help testing!)

@srhb
Copy link
Contributor

srhb commented Aug 12, 2018

@thblt If you're curious, I've mostly been hand-editing nixos/tests/installer.nix and running it with nix-build :) I'll try your suggestion as well.

Also, could you please amend the commit message to fit CONTRIBUTING.md? It should be "nixos/systemd-boot: Add missing newline" or something like that. :)

This fixes an issue where setting both
`boot.loader.systemd-boot.editor` to `false` and
`boot.loader.systemd-boot.consoleMode` to any value would concatenate
the two configuration lines in the output, resulting in an invalid
`loader.conf`.
@thblt
Copy link
Contributor Author

thblt commented Aug 12, 2018

Also, could you please amend the commit message to fit CONTRIBUTING.md?

Should be good.

@srhb
Copy link
Contributor

srhb commented Aug 12, 2018

Thank you again! 🥇

@srhb srhb merged commit fb72358 into NixOS:master Aug 12, 2018
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

4 participants