Skip to content

nixos: luksroot: toString-ify keyFileSize usage#194530

Merged
roberth merged 1 commit intoNixOS:masterfrom
colemickens:stage-1-systemd-luksroot-toString-fix
Oct 11, 2022
Merged

nixos: luksroot: toString-ify keyFileSize usage#194530
roberth merged 1 commit intoNixOS:masterfrom
colemickens:stage-1-systemd-luksroot-toString-fix

Conversation

@colemickens
Copy link
Member

Description of changes

Fixes a small issue with luksroot's implementation for systemd-stage-1 when keyFileSize (int) is used in a string without conversion.

cc: @dasJ

without this PR:

error: cannot coerce an integer to a string

       at /nix/store/yr20q5ja0shqbgcp3c229h0anp5bqw6x-source/nixos/modules/system/boot/luksroot.nix:485:57:

          484|       ++ optional (v.keyFileOffset != null) "keyfile-offset=${v.keyFileOffset}"
          485|       ++ optional (v.keyFileSize != null) "keyfile-size=${v.keyFileSize}"
             |                                                         ^
          486|     ;
(use '--show-trace' to show detailed location information)

(and this PR does indeed then fix it)

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.11 Release Notes (or backporting 22.05 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@colemickens colemickens requested a review from dasJ as a code owner October 5, 2022 03:13
@github-actions github-actions 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/` labels Oct 5, 2022
@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Oct 5, 2022
@roberth
Copy link
Member

roberth commented Oct 6, 2022

Seems like the same would apply to the offset.

@colemickens colemickens force-pushed the stage-1-systemd-luksroot-toString-fix branch from 2effcff to 3d5d6fc Compare October 6, 2022 22:06
@colemickens
Copy link
Member Author

@roberth doh, of course, thank you; fixed and pushed.

Copy link
Contributor

@ElvishJerricco ElvishJerricco left a comment

Choose a reason for hiding this comment

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

LGTM

@roberth roberth merged commit 129fd1a into NixOS:master Oct 11, 2022
@colemickens colemickens deleted the stage-1-systemd-luksroot-toString-fix branch December 30, 2022 01:30
@colemickens colemickens restored the stage-1-systemd-luksroot-toString-fix branch December 30, 2022 01:30
@colemickens colemickens deleted the stage-1-systemd-luksroot-toString-fix branch December 30, 2022 01:30
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: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants