Skip to content

kernel: Fix infinite recursion between version and patches#306790

Merged
dasJ merged 3 commits intoNixOS:masterfrom
roberth:fix-nixos-kernelPackages-kernel-version-kernelPatches-recursion
Apr 28, 2024
Merged

kernel: Fix infinite recursion between version and patches#306790
dasJ merged 3 commits intoNixOS:masterfrom
roberth:fix-nixos-kernelPackages-kernel-version-kernelPatches-recursion

Conversation

@roberth
Copy link
Member

@roberth roberth commented Apr 25, 2024

Description of changes

Make the kernel version not depend on the patches and such, so that the correct kernel version is available to patch expressions without infinite recursion.

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/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 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.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added the 6.topic: kernel The Linux kernel label Apr 25, 2024
@ofborg ofborg bot added 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 Apr 25, 2024
@wegank wegank added the 12.approvals: 1 This PR was reviewed and approved by one person. label Apr 26, 2024
@dasJ dasJ merged commit 7ceda3c into NixOS:master Apr 28, 2024
@alyssais
Copy link
Member

alyssais commented May 3, 2024

This has broken rust-out-of-tree-module for kernels with Rust support, which you can reproduce by attempting to evaluate nixosTests.kernel-rust. Would you mind having a look?

error:
       … while evaluating the attribute 'drvPath'
         at /home/qyliss/src/nixpkgs/lib/customisation.nix:365:7:
          364|     in commonAttrs // {
          365|       drvPath = assert condition; drv.drvPath;
             |       ^
          366|       outPath = assert condition; drv.outPath;

       … while calling the 'derivationStrict' builtin
         at <nix/derivation-internal.nix>:9:12:
            8|
            9|   strict = derivationStrict drvAttrs;
             |            ^
           10|

       … while evaluating the option `nodes.machine.system.systemBuilderCommands':

       … while evaluating definitions from `/home/qyliss/src/nixpkgs/nixos/modules/system/boot/kernel.nix':

       (stack trace truncated; use '--show-trace' to show the full, detailed trace)

       error: Package ‘rust-out-of-tree-module’ in /home/qyliss/src/nixpkgs/pkgs/os-specific/linux/rust-out-of-tree-module/default.nix:21 is marked as broken, refusing to evaluate.

       a) To temporarily allow broken packages, you can use an environment variable
          for a single invocation of the nix tools.

            $ export NIXPKGS_ALLOW_BROKEN=1

          Note: When using `nix shell`, `nix build`, `nix develop`, etc with a flake,
                then pass `--impure` in order to allow use of environment variables.

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

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

@roberth roberth mentioned this pull request May 3, 2024
13 tasks
@roberth
Copy link
Member Author

roberth commented May 3, 2024

@alyssais Sorry about that, my mistake. This fixes the eval: #308763

alyssais pushed a commit that referenced this pull request May 3, 2024
I thought it was module based, but it wasn't.

Fixes #306790 (comment)

> This has broken [...] Rust support
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

6.topic: kernel The Linux kernel 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. 12.approvals: 1 This PR was reviewed and approved by one person.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants