canonical / nvidia-graphics-drivers

Packaging scripts for nvidia-graphics-drivers in Ubuntu
43 stars 34 forks source link

Please let libnvidia-compute-418 provide a versioned libcuda1 #26

Closed ginggs closed 5 years ago

ginggs commented 5 years ago

dpkg has supported versioned Provides since 1.17.11, so this feature should already be available in Xenial and Bionic.

Let's add the versioned Provides now and once fully tested, we can start phasing out the ever-growing list of libcuda-5.0-1, libcuda-5.5-1, etc.

ginggs commented 5 years ago

This works for me:

--- a/debian/templates/control.in
+++ b/debian/templates/control.in
@@ -8,7 +8,7 @@
 Vcs-Browser: https://github.com/tseliot/nvidia-graphics-drivers/tree/#FLAVOUR#
 Build-Depends:
  debhelper (>= 9),
- dpkg-dev (>= 1.17),
+ dpkg-dev (>= 1.17.11~),
  xz-utils,
  dkms,
  libxext6 [!ppc64el],
@@ -112,7 +112,9 @@
   ${misc:Depends}, ${shlibs:Depends}
 Provides: nvidia-opencl-icd, opencl-icd, libcuda-5.0-1, libcuda-5.5-1,
  libcuda-6.0-1, libcuda-6.5-1, libcuda-7.0-1, libcuda-7.5-1, libcuda-8.0-1,
- libcuda-9.0-1, libcuda-9.1-1, libcuda-9.2-1, libcuda-10.0-1
+ libcuda-9.0-1, libcuda-9.1-1, libcuda-9.2-1, libcuda-10.0-1,
+ libcuda1 (= ${source:Version}),
+ libnvidia-ml1 (= ${source:Version})
 Conflicts: nvidia-opencl-icd, libcuda-5.0-1, libcuda-5.5-1,
  libcuda-6.0-1, libcuda-6.5-1, libcuda-7.0-1, libcuda-7.5-1, libcuda-8.0-1,
  libcuda-9.0-1, libcuda-9.1-1, libcuda-9.2-1, libcuda-10.0-1
tseliot commented 5 years ago

What's the rationale of this? Being able to depend on, say, libcuda1 (>= 418.43), rather than on the CUDA release?

ginggs commented 5 years ago

Exactly. The nvidia-cuda-toolkit package in Debian has this dependency (because libcuda1 is a real package there) and then they added the | libcuda-5.0-1 alternate virtual dependency for Ubuntu sometime around Saucy, when versioned Provides did not exist yet.

tseliot commented 5 years ago

All right then, pushed.

ginggs commented 5 years ago

Fixed in https://github.com/tseliot/nvidia-graphics-drivers/commit/f90c34c3e5fa36718de2a4b4add9ba10ead8d0cc