Can I use COPR to package Nvidia drivers?

It seems that the Nvidia driver does not use an open source license, so can I use COPR to package the drivers in this situation? I’m just here to confirm.

I don’t think so, since their licensing is not in line with the Fedora community’s requirements:

https://docs.pagure.org/copr.copr/user_documentation.html#what-i-can-build-in-copr

Can I ask why you’re packaging the drivers if RPM Fusion already provides them?

https://rpmfusion.org/Howto/NVIDIA

It doesn’t directly provide Nvidia kernel modules, does it?
I directly packaged the compiled kernel modules.

Rpmfusion packages (akmod-nvidia) do not provide the kmod-nvidia packages directly. The kernel modules must be compiled for each kernel version separately to match what is installed (and are compiled locally).

The way akmod-nvidia works is to automatically compile and install a new kmod each time a kernel version is upgraded.

If I read your question and intent properly you wish to provide the kmod (kernel modules) directly which likely would cause lots of problems if the modules provided do not match the kernel version.

It would seem much better to rely on automatically compiling a matching kernel module exactly when needed, as is done by the rpmfusion packages.

1 Like

I wrote the spec file myself, so I can make the nvidia kernel module compile on the specified kernel version and only allow installation on the corresponding version of the kernel, so the issue you mentioned does not exist for me.

As for the hardware aspect, according to the Nvidia documentation I have seen, it does not mention that it must be compiled on the hardware to be used, only making requirements for the version of the kernel.

I have to wonder why you want to reinvent the wheel. The rpmfusion repo has done a wonderful job of providing the drivers for nvidia GPUs and does not only packaging but testing before releasing a new version.

There are many issues seen by fedora users when using the drivers directly from nvidia or from negativo17 or from other sites which are almost 100% solved by using the drivers only from rpmfusion.

Yes, it is a single source to rely on, but has been quite dedicated in providing quality and functional packages for considerable time.

Using it requires installing too many software packages and a bunch of development tools. You can understand that I offloaded the compilation work from my local host to the cloud.

If you do that, you have to make sure you compile a new version every time Fedora releases a new version of the kernel. I guess the maintainers at rpmfusion got tired of doing that.

For me, it’s just a matter of clicking a button and downloading the compiled module package. If I could use COPR, the process would be simplified, but unfortunately I cannot use COPR.

This seems reasonable on systems that may be short on resources (RAM, CPU, and/or driver space) but for most that seems not an issue.

The packaging work has been completed, and only this issue has been found so far: Fedora 41 Beta Upgrade - GNOME Settings and many default apps won't open.

1 Like

If anyone wishes to build their own nvidia package, you can take a look at my repository: GitHub - fxzxmicah/nvidia-driver: Build nvidia-driver for personal use of Fedora.