NVIDIA / open-gpu-kernel-modules

NVIDIA Linux open GPU kernel module source
Other
15.02k stars 1.24k forks source link

DKMS Infrastructure #11

Open sempervictus opened 2 years ago

sempervictus commented 2 years ago

As far as i know, most users consume the old proprietary driver as a DKMS package for their distro to permit building against upstream/binary kernels which they are not compiling from source every time they update the kernel or driver pacakge. If the relevant DKMS build files and structure are in this repository, it's less likely to end up with the "per-distro-implementation" schism normally left up to the downstream packagers.

aritger commented 2 years ago

Good idea. Tagging as an enhancement.

aritger commented 2 years ago

For reference, we've filed NVIDIA-internal bug 3642567 for this request.

sempervictus commented 2 years ago

Thank you. I'm guessing you could rip the DKMS setups from Arch Linux packaging (its just .sh scripts) or Ubuntu/RHEL-types pretty easily. If the Makefile then contains a make dkms option which takes a DESTDIR paramter for chroot-targets (pacakge scaffold roots), then all downstream users could leverage it to build their respective DKMS packages from this repo.

svenstaro commented 2 years ago

I might be misunderstanding the intention of this issue, but as far as I'm concerned, I think I managed to get dkms working fine in the Arch package. Please give it a test and see whether it's working as intended. See here for the PKGBUILD.

ryao commented 2 years ago

Not every distribution uses DKMS, so please do not make DKMS a hard requirement. Otherwise, you might see some per distribution patching in the opposite direction. Doing it like ZFSOnLinux where DKMS is a wrapper around the existing build system would be great.

Making DKMS a wrapper around the existing build system rather than rewriting the build system to be DKMS should go without saying, but just in case, I am saying it anyway.