Skip to content

linux: add flavor metadata #102005

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

Merged
merged 2 commits into from
Oct 30, 2020

Conversation

jonringer
Copy link
Contributor

@jonringer jonringer commented Oct 29, 2020

Motivation for this change

part of #101863

This is what I had in mind @NeQuissimus

I chose usbip because of https://hydra.nixos.org/eval/1622654?filter=linuxPackages&compare=1622624&full=#tabs-still-fail . Just being used as an example.

Ideally i would backport the metadata commit to 20.09 and disable the remaining failing kernel modules

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • 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 nixpkgs-review --run "nixpkgs-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)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

Sorry, something went wrong.

@jonringer jonringer requested a review from NeQuissimus October 29, 2020 08:31
@jonringer
Copy link
Contributor Author

$ nix-env -f /home/jon/.cache/nixpkgs-review/pr-102005/nixpkgs -qaP --xml --out-path --show-trace --meta
Nothing changed
https://github.com/NixOS/nixpkgs/pull/102005

@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 Oct 29, 2020
@jonringer
Copy link
Contributor Author

@NeQuissimus do you mind giving this a quick review?

Copy link
Member

@NeQuissimus NeQuissimus left a comment

Choose a reason for hiding this comment

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

I like it a lot!

@jonringer jonringer merged commit f24fa1e into NixOS:master Oct 30, 2020
@jonringer jonringer added the 9.needs: port to stable A PR needs a backport to the stable release. label Oct 30, 2020
@jonringer jonringer deleted the add-kernel-flavor-information branch October 31, 2020 04:42
@jonringer jonringer added 8.has: port to stable A PR already has a backport to the stable release. and removed 9.needs: port to stable A PR needs a backport to the stable release. labels Oct 31, 2020
@ajs124
Copy link
Member

ajs124 commented Nov 1, 2020

I think this might have broken linuxManualConfig. We were using it like this, which doesn't work anymore now:

(pkgs.linuxPackagesFor (pkgs.linuxManualConfig {
    inherit (pkgs) stdenv;
    inherit version;
    src = /some-kernel/src;
    allowImportFromDerivation = false;
    configfile = ./some-kernel.config;
    config = ./that-same-kernel.config-as.nix;
  }));

@jonringer
Copy link
Contributor Author

this only added items to passthru. It should not have caused any regressions.

I can't reproduce any errors with the above code.

@ajs124
Copy link
Member

ajs124 commented Nov 1, 2020

I just tested this on top of 6330a9a. This is my test.nix:

let pkgs = import ./. {};
in pkgs.linuxPackagesFor (pkgs.linuxManualConfig {
  inherit (pkgs) stdenv;
  inherit (pkgs.linux) version;
  src = pkgs.linux.src;
  allowImportFromDerivation = false;
  configfile = ./test.nix;
  config = {
    "CONFIG_MODULES" = "y";
  };
})

Running nix-build test.nix results in:

error: --- EvalError ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- nix-build
at: (18041:68) in file: /home/andy/nixpkgs/pkgs/top-level/all-packages.nix

 18040| 
 18041|   linuxPackagesFor = kernel: lib.makeExtensible (self: with self; {
      |                                                                    ^
 18042|     callPackage = newScope self;

attribute 'isHardened' missing

@jonringer
Copy link
Contributor Author

@ajs124 do you mind trying your configuration against #102395

@jonringer
Copy link
Contributor Author

jonringer commented Nov 1, 2020

Full disclosure, I was only thinking about hydra. And there's no hydra jobs which use linuxManualConfig.

If there was usage, then ofborg with checkMeta = true; would have caught this.

@ajs124
Copy link
Member

ajs124 commented Nov 1, 2020

#102395 seems to work. I mean, it fails to evaluate, because ixgbevf-4.6.1-5.4.73 is marked as broken, but that's probably to be expected. And building .kernel evaluates/starts building.

There is linuxPackages_custom_tinyconfig_kernel in nixpkgs, which uses linuxPackages_custom, which uses linuxManualConfig. That didn't break though, because… idk.

@jonringer
Copy link
Contributor Author

I'm not sure either, and I got a cache hit. Could be coming from master? not sure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: port to stable A PR already has a backport to the stable release. 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.

None yet

3 participants