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/systemd-boot: conform backend to rfc 125 #263442

Merged
merged 1 commit into from
Nov 15, 2023

Conversation

JulienMalka
Copy link
Member

@JulienMalka JulienMalka commented Oct 25, 2023

Description of changes

This converts the systemd-boot backend to use the bootspec to conform to RCF 125.

The bootloader backends will avoid reading data from the other files and directories when possible, preferring the information in the bootspec.

The only functional difference with before, is that the describe_generation function as been removed and replaced by the label item of the bootspec, this will induce a change of format of the entries, but should contain the same information as before.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • 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/)
  • 23.11 Release Notes (or backporting 23.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
  • Fits CONTRIBUTING.md.

@JulienMalka
Copy link
Member Author

JulienMalka commented Oct 26, 2023

@ofborg test systemd-boot

@JulienMalka JulienMalka marked this pull request as draft October 30, 2023 23:28
@JulienMalka JulienMalka marked this pull request as ready for review October 31, 2023 00:13
@JulienMalka JulienMalka force-pushed the systemd-boot-bootspec branch 2 times, most recently from 6c105ee to b4bfb45 Compare November 1, 2023 14:26
kernel_params = "init=%s " % profile_path(profile, generation, specialisation, "init")
kernel_params = "init=%s " % bootspec.init

kernel_params = kernel_params + " ".join(bootspec.kernelParams)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
kernel_params = kernel_params + " ".join(bootspec.kernelParams)
kernel_params = " ".join([f"init={bootspec.init}"] + bootspec.kernelParams)

Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

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

LGTM. Can merge.

@RaitoBezarius RaitoBezarius marked this pull request as draft November 14, 2023 19:35
@RaitoBezarius RaitoBezarius marked this pull request as ready for review November 14, 2023 19:35
Copy link
Member

@RaitoBezarius RaitoBezarius left a comment

Choose a reason for hiding this comment

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

Drop the lol please of the commit.

Now the builder is using Bootspec documents.
@RaitoBezarius RaitoBezarius merged commit 75fbff2 into NixOS:master Nov 15, 2023
19 checks passed
@JulienMalka JulienMalka deleted the systemd-boot-bootspec branch November 15, 2023 07:40
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.

2 participants