commit: 701b87679ae89e02d11be22d235081fa55ae58be
Author: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Wed Jul 21 14:42:42 2021 +0000
Commit: Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Wed Jul 21 19:42:49 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=701b8767
x11-drivers/nvidia-drivers: rename 390.xx filesdir files
nvidia-390.conf was named the same as the other nvidia-*.conf,
but it serves a completely different purpose. Then nvidia-169.07
differed from the rest.
nvidia-390.conf -> nvidia-drm-outputclass-390.conf
nvidia-169.07 -> nvidia-390.conf
At same time, also adjust for prefix (as unlikely as it is, running
a prefix Xorg server with prefix nvidia-drivers[-driver] is possible).
Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>
x11-drivers/nvidia-drivers/files/nvidia-169.07 | 14 --------------
x11-drivers/nvidia-drivers/files/nvidia-390.conf | 21 ++++++++++++++-------
.../files/nvidia-drm-outputclass-390.conf | 7 +++++++
.../nvidia-drivers/nvidia-drivers-390.143-r1.ebuild | 6 +++---
4 files changed, 24 insertions(+), 24 deletions(-)
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-169.07
b/x11-drivers/nvidia-drivers/files/nvidia-169.07
deleted file mode 100644
index a96b0cd1e40..00000000000
--- a/x11-drivers/nvidia-drivers/files/nvidia-169.07
+++ /dev/null
@@ -1,14 +0,0 @@
-# Nvidia drivers support
-alias char-major-195 nvidia
-alias /dev/nvidiactl char-major-195
-
-# To tweak the driver the following options can be used, note that
-# you should be careful, as it could cause instability!! For more
-# options see /usr/share/doc/PACKAGE/README
-#
-# !!! SECURITY WARNING !!!
-# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
-# WHAT YOU ARE DOING.
-# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
-# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
-options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0
NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-390.conf
b/x11-drivers/nvidia-drivers/files/nvidia-390.conf
index 7666989fa47..a96b0cd1e40 100644
--- a/x11-drivers/nvidia-drivers/files/nvidia-390.conf
+++ b/x11-drivers/nvidia-drivers/files/nvidia-390.conf
@@ -1,7 +1,14 @@
-Section "OutputClass"
- Identifier "nvidia"
- MatchDriver "nvidia-drm"
- Driver "nvidia"
- Option "AllowEmptyInitialConfiguration"
- ModulePath "/usr/%LIBDIR%/extensions/nvidia"
-EndSection
+# Nvidia drivers support
+alias char-major-195 nvidia
+alias /dev/nvidiactl char-major-195
+
+# To tweak the driver the following options can be used, note that
+# you should be careful, as it could cause instability!! For more
+# options see /usr/share/doc/PACKAGE/README
+#
+# !!! SECURITY WARNING !!!
+# DO NOT MODIFY OR REMOVE THE DEVICE FILE RELATED OPTIONS UNLESS YOU KNOW
+# WHAT YOU ARE DOING.
+# ONLY ADD TRUSTED USERS TO THE VIDEO GROUP, THESE USERS MAY BE ABLE TO CRASH,
+# COMPROMISE, OR IRREPARABLY DAMAGE THE MACHINE.
+options nvidia NVreg_DeviceFileMode=432 NVreg_DeviceFileUID=0
NVreg_DeviceFileGID=VIDEOGID NVreg_ModifyDeviceFiles=1
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf
b/x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf
new file mode 100644
index 00000000000..f459c69dad8
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drm-outputclass-390.conf
@@ -0,0 +1,7 @@
+Section "OutputClass"
+ Identifier "nvidia"
+ MatchDriver "nvidia-drm"
+ Driver "nvidia"
+ Option "AllowEmptyInitialConfiguration"
+ ModulePath "@LIBDIR@/extensions/nvidia"
+EndSection
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild
b/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild
index 86fc5834f0e..4d8f0d912d0 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.143-r1.ebuild
@@ -163,8 +163,8 @@ src_prepare() {
sed 's/__NV_VK_ICD__/libGLX_nvidia.so.0/' \
nvidia_icd.json.template > nvidia_icd.json || die
- sed "s/%LIBDIR%/$(get_libdir)/g" "${FILESDIR}/nvidia-390.conf" \
- > nvidia-drm-outputclass.conf || die
+ sed "s|@LIBDIR@|${EPREFIX}/usr/$(get_libdir)|" \
+ "${FILESDIR}"/nvidia-drm-outputclass-390.conf >
nvidia-drm-outputclass.conf || die
gzip -d nvidia-{cuda-mps-control,smi}.1.gz || die
}
@@ -268,7 +268,7 @@ src_install() {
linux-mod_src_install
insinto /etc/modprobe.d
- newins "${FILESDIR}"/nvidia-169.07 nvidia.conf
+ newins "${FILESDIR}"/nvidia-390.conf nvidia.conf
doins "${FILESDIR}"/nvidia-blacklist-nouveau.conf
doins "${FILESDIR}"/nvidia-rmmod.conf
fi