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

wrong merging of kernel "optional" setting #71803

Closed
teto opened this issue Oct 23, 2019 · 3 comments · Fixed by #84032
Closed

wrong merging of kernel "optional" setting #71803

teto opened this issue Oct 23, 2019 · 3 comments · Fixed by #84032
Assignees
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: kernel

Comments

@teto
Copy link
Member

teto commented Oct 23, 2019

Describe the bug

The optional character of a kernel configuration is set to true upon merging instead of false.

The fix is to update kernel_config.nix to:

  mergeFalseByDefault = locs: defs:
    if defs == [] then abort "This case should never happen."
    else if any (x: x.value == false) defs then false
    else true;

I need to update/check the tests too

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
@teto teto self-assigned this Oct 23, 2019
@teto
Copy link
Member Author

teto commented Oct 24, 2019

Also fixing this or some other fixes I have makes kernel compilation fail
because the config asks for a module but ends up with a yes (the value for
INET_TCP_DIAG is not requested thus it gets set to the default of INET_DIAG,
which is 'y').

config INET_TCP_DIAG
	depends on INET_DIAG
	def_tristate INET_DIAG

teto added a commit to teto/nixpkgs that referenced this issue Apr 1, 2020
Addresses NixOS#71803:
Kernel options are not merged as described, especially the "optional"
aspects. The error silences legitimate warnings.
@stale
Copy link

stale bot commented Jun 1, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 1, 2020
@teto
Copy link
Member Author

teto commented Jun 1, 2020

fixed in staging

@teto teto closed this as completed Jun 1, 2020
github-actions bot pushed a commit to nix-community/nixpkgs.lib that referenced this issue Dec 4, 2022
Addresses NixOS/nixpkgs#71803:
Kernel options are not merged as described, especially the "optional"
aspects. The error silences legitimate warnings.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: kernel
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant