[pkg-nvidia-devel] looking at Ubuntu nvidia package?

Andres Mejia mcitadel at gmail.com
Wed Mar 17 03:50:37 UTC 2010

On Tuesday 16 March 2010 14:36:21 Harald Dunkel wrote:
> On 02/06/10 06:54, Harald Dunkel wrote:
> > Ubuntu went for another approach: There are basically 3 packages:
> >
> > 	nvidia-current
> > 	nvidia-current-dev
> > 	nvidia-current-modalias
> >
> > The kernel module is managed using dkms. The libraries to use are
> > selected via ldconfig.
> >
> > I really like this idea.
> To show how this might work in Debian I have ported the Ubuntu packages.
> If you are interested in these experimental(!) packages, please check
> 	http://darkharri.de/nvidia-current/
> This is Nvidia's driver version #195.36.15. It is still beta. Use at
> your own risk.
> Currently nvidia-current requires to register an extra module directory
> in your xorg.conf:
> 	Section "Files"
> 	    ModulePath      "/usr/lib/xorg/extra-modules"
> 	    ModulePath      "/usr/lib/xorg/modules"
> The sequence is important. Ubuntu's Xserver has been patched to search
> this extra directory by default.
> Have fun

Ok, I'm taking a quick glance at the file list from packages.ubuntu.com for
nvidia-current. I see that all libraries have been moved from /usr/lib to
/usr/lib/nvidia-current. I do like this approach where the nvidia libraries for
libGL and libglx are kept seperate from mesa and you say ldconfig is used to
maintain the necessary bindings I presume.

There are some concerns I have though. So nvidia-current will contain the latest
nvidia libraries and drivers I presume. Now if nvidia decides to bump the major
version of any of their libraries, say libcuda, there will be a problem with
respect to updating nvidia-current. Updating with the new library will remove
the old library, causing programs linked with the old library not to be usable,
at least until they're rebuilt using the new library. You can't just simply
rename the new library to the name of the old library, or create a symlink,
since there would have (supposedly) been a valid reason for the soname bump to
begin with.

The common practice for library packaging in Debian (and thus Ubuntu) is to
place each library in its own package with the name of the library and its
soname major version. Thus libcuda.so.1 and whatever it points to should go in a
package named libcuda1. In this way, applications that were built with a
particular version of a library will continue to depend on those libraries.

Another concern is how every library is installed from this single package. Is
it really necessary to have each and every library installed? It would be better
to seperate the libraries to their own seperate packages and have packages
depend on the libraries they need. Also, the lib*.so symlinks are installed from
this package. Those usually go into the development package.

Also there's the sources to build the driver itself. Couldn't this also be
placed in it's own package?

Now on to the nvidia-current-dev package. I see all headers have been moved to
/usr/include/nvidia-current. I presume anyone developing programs with these
headers will need to modify the build systems of their applications in order to
use the headers in this new location. Shouldn't be a big problem however, in my
opinion. I see the static libraries are placed in /usr/lib/nvidia-current. The
lib*.so symlinks for every library should also be placed in this package.

With nvidia-current-modaliases, I can't say I know what that does exactly, so I
don't have any particular opinion about it.

I'll be taking a look at these new packages from Ubuntu at some point and see
how the linker bindings are set. I guess I should do it soon before the Debian
release freeze. No promises though. There will most likely be some changes I do
with respect to the libraries.


More information about the Pkg-nvidia-devel mailing list