Adventures in building my own nvidia driver packages

Richard Shaw hobbes1069 at gmail.com
Tue May 3 01:33:10 CEST 2011


I review my messages before posting and I thought I might sound a
little complaintive, which is not my intent, so I'm adding this
preface. Being a new packager I'm trying to improve my skills so I try
building new versions of other packages to see if I can do it.
---

Well I'm still waiting on a fix for OpenGL 1.5 on newer Nvidia cards
(support was dropped but a lot of people playing older games
complained).

I was hoping that the new drivers fixed the problem but really didn't
want to use their .run package since I'm already using RPMFusion
drivers.

So being a packager I decided to give it a whirl. Downloaded the
x86_64 driver package and then after trying to build the rpm package
figured out I needed the 32bit package as well...

Got that sorted out and then found out there's a new library
libnvidia-ml.so or something like that that's not currently packaged,
so I stuck it in %{nvidialibdir} (shouldn't this macro start with %{_
since it's a directory?)

Next I realized I had to build the kernel modules so I pulled the
source for it and inspected the spec file.

I was a bit confused by the comments for Source0: since neither URL
provided were useful.

I decided to inspect the build directory since everything you need is
provided in the nvidia .run package, right?

Sure enough the archive I was looking for was right there. So I'm
making a suggestion that:

# Source is created from these files:
#ftp://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}-pkg0.run
#ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg0.run

# <switch me> when sources are on kwizart's repo
Source0:       http://rpms.kwizart.net/fedora/SOURCES/nvidia-kmod-data-%{version}.tar.bz2
#Source0:
http://www.diffingo.com/downloads/livna/kmod-data/nvidia-kmod-data-%{version}.tar.bz2
# </switch me>

I see two problems with this, the first part of the comment is
technically correct but incomplete since per the Fedora packaging
guidelines it should tell a person all the steps required to get or
create the source.

The second part seems to be completely obsolete since neither link
gets you a recent source.

I'm proposing that it be changed to something like:

# Source is created from files contained in one of the following
packages depending on arch built:
# ftp://download.nvidia.com/XFree86/Linux-x86/%{version}/NVIDIA-Linux-x86-%{version}-pkg0.run
# ftp://download.nvidia.com/XFree86/Linux-x86_64/%{version}/NVIDIA-Linux-x86_64-%{version}-pkg0.run
#
# Alternatively, building the xorg-x11-drv-nvidia package, at least
through it's prep section, will create
# the needed archive in it's build directory.

After I figured that out everything went smoothly although my specific
issue goes unresolved, maybe next months driver will have it fixed.

I can file a bug if my suggestions have merit but wanted to get input
from others before doing so.

Thanks,
Richard


More information about the rpmfusion-developers mailing list