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

linux: add flavor metadata #102005

Merged
merged 2 commits into from Oct 30, 2020
Merged

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.
@jonringer jonringer requested a review from NeQuissimus Oct 29, 2020
@jonringer
Copy link
Contributor Author

@jonringer jonringer commented Oct 29, 2020

$ 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
@jonringer
Copy link
Contributor Author

@jonringer jonringer commented Oct 30, 2020

@NeQuissimus do you mind giving this a quick review?

Copy link
Member

@NeQuissimus NeQuissimus left a comment

I like it a lot!

@jonringer jonringer merged commit f24fa1e into NixOS:master Oct 30, 2020
18 of 19 checks passed
18 of 19 checks passed
@github-actions
tests
Details
@github-actions
action
Details
@ofborg
linux, linux.passthru.tests, linuxPackages.usbip, linuxPackages.usbip.passthru.tests on x86_64-darwin
Details
@ofborg
Evaluation Performance Report Evaluator Performance Report
Details
@github-actions
Wait for ofborg
Details
@ofborg
grahamcofborg-eval ^.^!
Details
@ofborg
grahamcofborg-eval-check-meta config.nix: checkMeta = true
Details
@ofborg
grahamcofborg-eval-darwin nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-lib-tests nix-build --arg pkgs import ./. {} ./lib/tests/release.nix
Details
@ofborg
grahamcofborg-eval-nixos nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixos-options nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./nixos/
Details
@ofborg
grahamcofborg-eval-nixpkgs-manual nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-tarball nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-nixpkgs-unstable-jobset nix-instantiate --arg nixpkgs { outPath=./.; revCount=999999; shortRev="3f014d6"; rev="3f014d643cdb9bf7de1c185cab5ae950d81125ea"; } ./pkgs/t
Details
@ofborg
grahamcofborg-eval-package-list nix-env -qa --json --file .
Details
@ofborg
grahamcofborg-eval-package-list-no-aliases nix-env -qa --json --file . --arg config { allowAliases = false; }
Details
@ofborg
linux, linux.passthru.tests, linuxPackages.usbip, linuxPackages.usbip.passthru.tests on aarch64-linux Success
Details
@ofborg
linux, linux.passthru.tests, linuxPackages.usbip, linuxPackages.usbip.passthru.tests on x86_64-linux Success
Details
@jonringer jonringer deleted the jonringer:add-kernel-flavor-information branch Oct 31, 2020
@jonringer jonringer mentioned this pull request Oct 31, 2020
4 of 10 tasks
@ajs124
Copy link
Member

@ajs124 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

@jonringer jonringer commented Nov 1, 2020

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

@jonringer jonringer commented Nov 1, 2020

@ajs124 do you mind trying your configuration against #102395

@jonringer
Copy link
Contributor Author

@jonringer 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 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

@jonringer jonringer commented Nov 1, 2020

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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants