1
0
Stefan Dirsch 2c597297d3 Accepting request 1185229 from home:eeich:branches:X11:Drivers:Video:Redesign
- Add a second flavor for building the kernel module versions
  used by CUDA. The kmp targetting CUDA contains '-cuda' in
  its name to track its versions separately from the graphics
  kmp.
- Provide the meta package nv-prefer-signed-open-driver to
  make sure the latest available SUSE-build open driver is
  installed - independent of the latest available open driver
  version in he CUDA repository.
  Rationale:
  The package cuda-runtime provides the link between CUDA and
  the kernel driver version through a
  Requires: cuda-drivers >= %version
  This implies that a CUDA version will run withany kernel driver
  version equal or higher than a base version.
  nvidia-compute-G06 provides the glue layer between CUDA and
  a specific version of he kernel driver both by providing
  a set of base libraries and by requiring a specific kernel
  version. 'cuda-drivers' (provided by nvidia-compute-utils-G06)
  requires an unversioned nvidia-compute-G06. With this, the
  resolver will install the latest available and applicable
  nvidia-compute-G06.
  nv-prefer-signed-open-driver then represents the latest available
  open driver version and restricts the nvidia-compute-G06 version
  to it.

  * addresses boo#1223454

OBS-URL: https://build.opensuse.org/request/show/1185229
OBS-URL: https://build.opensuse.org/package/show/X11:Drivers:Video:Redesign/nvidia-open-driver-G06-signed?expand=0&rev=101
2024-07-04 11:29:38 +00:00

30 lines
1.3 KiB
Bash

flavor=%1
# Create symlinks for udev so these devices will get user ACLs by logind later (bnc#1000625)
mkdir -p /run/udev/static_node-tags/uaccess
mkdir -p /usr/lib/tmpfiles.d
ln -snf /dev/nvidiactl /run/udev/static_node-tags/uaccess/nvidiactl
ln -snf /dev/nvidia-uvm /run/udev/static_node-tags/uaccess/nvidia-uvm
ln -snf /dev/nvidia-uvm-tools /run/udev/static_node-tags/uaccess/nvidia-uvm-tools
ln -snf /dev/nvidia-modeset /run/udev/static_node-tags/uaccess/nvidia-modeset
cat > /usr/lib/tmpfiles.d/nvidia-logind-acl-trick-G06.conf << EOF
L /run/udev/static_node-tags/uaccess/nvidiactl - - - - /dev/nvidiactl
L /run/udev/static_node-tags/uaccess/nvidia-uvm - - - - /dev/nvidia-uvm
L /run/udev/static_node-tags/uaccess/nvidia-uvm-tools - - - - /dev/nvidia-uvm-tools
L /run/udev/static_node-tags/uaccess/nvidia-modeset - - - - /dev/nvidia-modeset
EOF
devid=-1
for dev in $(ls -d /sys/bus/pci/devices/*); do
vendorid=$(cat $dev/vendor)
if [ "$vendorid" == "0x10de" ]; then
class=$(cat $dev/class)
classid=${class%%00}
if [ "$classid" == "0x0300" -o "$classid" == "0x0302" ]; then
devid=$((devid+1))
ln -snf /dev/nvidia${devid} /run/udev/static_node-tags/uaccess/nvidia${devid}
echo "L /run/udev/static_node-tags/uaccess/nvidia${devid} - - - - /dev/nvidia${devid}" >> /usr/lib/tmpfiles.d/nvidia-logind-acl-trick-G06.conf
fi
fi
done