-
Notifications
You must be signed in to change notification settings - Fork 151
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
Stop handling dkms.conf as a bash/shell script #414
Comments
Sorry for the late reply, got busy at work. It's fine for me but I think it's a bit risky. I believe ZFS will not be the only case where copious amounts of bash scripts end up in the DKMS configuration file. For those cases, we would need to constantly extend to meet their demand where it makes sense, or they will keep on rolling out their own DKMS along with the rest, like AMD was doing. |
No need to apologise - IRL get in the way. I think it's beneficial to first get some rough numbers and if the number are favourable work from there. I've done a list for Arch below - @scaronni if you can do one (as time permits) for distros you care about that'll be appreciated. Let me start with Arch proper, only. The AUR (user repos) have 400 of varying quality.
From the above - there are two maybes (nvidia & nvidia-open) and the rest are easily fixable. Will chip through as time permits. Aside: some packages seem somewhat borked (acpi-call, bbswitch, etc) aka |
That sounds like a Debian thing ;-) That placeholder is substituted by dh_dkms at package build time while generating/installing dkms.conf into the package. |
my gut feeling says that must be rather two than one major release of all major distributions, the second phase with more annoying deprecation warnings I expect that there are many third-party out-of-tree modules that are not part of any Linux distribution and that need (minor) adjustments for this proposed change ... |
Not sure I follow... Are you saying that dkms transition should be defined by Linux distribution releases? Although before we even remotely get there, let's try and address the known problematic cases. IRL got in the way, let me see if I can open a PR or two. |
Some out of tree kernel modules also add conditions based on which kernel you are building against, for example: https://github.com/intel/ipu6-drivers/blob/master/dkms.conf This is very handy as you can have the same source tree usable for multiple kernel versions. This is going to change further now for IPU6 drivers as in kernel 6.10 some more modules have been merged, and some even with differences (so the out of tree kernel module still takes precedence). I don't think it's a good idea to consider the |
Here's a snippet which has been invented by me:
Purpose: Avoid freezing a VM by too many parallel compilation jobs. |
This script reminds me of https://imgs.xkcd.com/comics/workflow.png and somewhat illustrates why I think this task is worth while. In particular, the hardcoded enough_ram checked against the total memory. The memory required depends on the job itself - compare nvidia vs bbswitch for example. Where the build can OOM long even with a fraction of the total memory being used. |
Today dkms sources the dkms.conf, effectively treating it as a shell script instead of data/configuration file.
That in itself isn't great since:
Combining the above, we end up with a substantial surface for misuse/abuse and co.
One rather benign example is #413 where dos<>unix line endings result in fatal breakage.
@xuzhen has already done a ton of great work here - see #265.
IMHO to unwrap/finish this completely we should:
@xuzhen @scaronni @anbe42 what do you think of this idea? If you know of any projects/packages where this will be a problem, can you share some details - name, distro/upstream URL, etc.
Thanks o/
The text was updated successfully, but these errors were encountered: