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 depends on utillinux #65363

Closed
ashkitten opened this issue Jul 25, 2019 · 8 comments
Closed

linux depends on utillinux #65363

ashkitten opened this issue Jul 25, 2019 · 8 comments

Comments

@ashkitten
Copy link
Contributor

since commit e8fcced, linux 4.15 and up depend on on utillinux. as far as i can tell, it does not need this dependency.

#32137 (comment) suggests that it was initially included for the eject binary, but i am not aware of that being a requirement and @ElvishJerricco reports that the kernel builds fine without the utillinux dependency.

furthermore, utillinux pulls in other unnecessary dependencies like systemd. if we truly need binaries which it provides, we should consider busybox as an alternative.

@ElvishJerricco
Copy link
Contributor

Also, if it turns out it is necessary, we should see if utillinuxMinimal would work instead, which would prevent e.g. the dep on systemd.

@FRidh
Copy link
Member

FRidh commented Jul 26, 2019

cc @pstn @dezgeg

@pstn
Copy link
Contributor

pstn commented Jul 29, 2019

util-linux is a minimal dependency as per kernel.org docs. At the time linux 4.15 wouldn't build without it, so i added it. If utillinuxMinimal is enough, I'm all for using it but I wouldn't blindly try it.

@oxalica
Copy link
Contributor

oxalica commented Mar 9, 2020

@pstn util-linux is under System utilities in docs instead of Kernel compilation. The derivation is to build the kernel image only.

I tried kernel 4.19 and 5.4, they are both built well without util-linux.
Since kernel 4.19 is the earliest version later than 4.15 in current nixos-unstable,
I'm not sure if it is really a dependency, for now.

@stale
Copy link

stale bot commented Sep 5, 2020

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 5, 2020
@oxalica
Copy link
Contributor

oxalica commented Sep 5, 2020

still important to me

In #86208, we partially fix the issue by replacing utillinux with utillinuxMinimal. But seems this issue is missed by them, @arianvp @flokli

I still think we should better totally remove utillinux as dependency if it works, because even in currently latest docs,

util-linux is under System utilities in docs instead of Kernel compilation. The derivation is to build the kernel image only.

Note that in docs, utillinux is in parallel with e2fsprogs and jfsutils, which are obviously not kernel compilation dependencies.

@stale stale bot removed the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Sep 5, 2020
@flokli
Copy link
Contributor

flokli commented Sep 6, 2020

@oxalica Thanks for the highlight - I wasn't aware of this issue.

#86208 stated:

With this change, the linux kernel (of which i don't fully understand
why it would depend on util-linux in the first place, but this was added in
https://github.com/NixOS/nixpkgs/pull/32137/files without too much
explanation) depends on the minimal version of util-linux too.

Looking at https://github.com/NixOS/nixpkgs/pull/32137/files#diff-aee78996e4a0d3c9af109b3dd4ae9ff7R245, utillinux (or now utillinuxMinimal) is only added for certain versions (>=4.15).

I assume we need to check for which version of the linux kernel it is required, and update the condition accordingly, so it's only included where it's needed.

Would you mind opening a PR updating the condition to do that, and see if you can still build all the linux_ attributes in nixpkgs?

@flokli
Copy link
Contributor

flokli commented Sep 6, 2020

fixed by #97294.

@flokli flokli closed this as completed Sep 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants