commit:     3742a22fe46420b694bb5b550341956ccfdd93aa
Author:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
AuthorDate: Tue Dec 28 19:26:19 2021 +0000
Commit:     Ionen Wolkens <ionen <AT> gentoo <DOT> org>
CommitDate: Tue Dec 28 19:48:30 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3742a22f

x11-drivers/nvidia-drivers: add out-of-tree modules to README.gentoo

While this applies to every ebuilds that build modules, nvidia-drivers
is often a user's first or only experience with these and support
requests from those that did not know are somewhat common (e.g.
upgraded kernel without rebuilding, or built modules against the
wrong kernel).

While wiki is better for a lot of these things, having more sources
mention this material increase chances to reach users.

Signed-off-by: Ionen Wolkens <ionen <AT> gentoo.org>

 .../nvidia-drivers/nvidia-drivers-390.147.ebuild      | 19 ++++++++++++++++---
 .../nvidia-drivers/nvidia-drivers-460.91.03-r2.ebuild | 19 ++++++++++++++++---
 .../nvidia-drivers/nvidia-drivers-470.62.16.ebuild    | 19 ++++++++++++++++---
 .../nvidia-drivers/nvidia-drivers-470.94.ebuild       | 19 ++++++++++++++++---
 .../nvidia-drivers/nvidia-drivers-495.46-r10.ebuild   | 19 ++++++++++++++++---
 .../nvidia-drivers/nvidia-drivers-495.46-r20.ebuild   | 19 ++++++++++++++++---
 .../nvidia-drivers/nvidia-drivers-495.46.ebuild       | 19 ++++++++++++++++---
 7 files changed, 112 insertions(+), 21 deletions(-)

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild
index e2113aa452bb..27bc1f65bc9b 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild
@@ -250,9 +250,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-460.91.03-r2.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-460.91.03-r2.ebuild
index 655467d6bb9f..61240f76f26d 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-460.91.03-r2.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-460.91.03-r2.ebuild
@@ -230,9 +230,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.16.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.16.ebuild
index fd2f86147ae7..6de4753fb633 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.16.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.16.ebuild
@@ -243,9 +243,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.94.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-470.94.ebuild
index 8b978b4e3911..bba3a75169aa 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.94.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.94.ebuild
@@ -243,9 +243,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild
index 02a6354ec0a0..9983bd4e0e6b 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r10.ebuild
@@ -257,9 +257,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r20.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r20.ebuild
index 5506a22853f2..6ef95b7be24f 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r20.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46-r20.ebuild
@@ -255,9 +255,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild 
b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild
index f1b40b9e892b..38e290de75f8 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-495.46.ebuild
@@ -246,9 +246,22 @@ src_install() {
        local DISABLE_AUTOFORMATTING=yes
        local DOC_CONTENTS="\
 Trusted users should be in the 'video' group to use NVIDIA devices.
-You can add yourself by using: gpasswd -a my-user video
-
-See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options.\
+You can add yourself by using: gpasswd -a my-user video\
+$(usex driver "
+
+Like all out-of-tree kernel modules, it is necessary to rebuild
+${PN} after upgrading or rebuilding the Linux kernel
+by for example running \`emerge @module-rebuild\`. Alternatively,
+if using a distribution kernel (sys-kernel/gentoo-kernel{,-bin}),
+this can be automated by setting USE=dist-kernel globally.
+
+Loaded kernel modules also must not mismatch with the installed
+${PN} version (excluding -r revision), meaning should
+ensure \`eselect kernel list\` points to the kernel that will be
+booted before building and preferably reboot after upgrading
+${PN} (the ebuild will emit a warning if mismatching).
+
+See '${EPREFIX}/etc/modprobe.d/nvidia.conf' for modules options." '')\
 $(use amd64 && usex abi_x86_32 '' "
 
 Note that without USE=abi_x86_32 on ${PN}, 32bit applications

Reply via email to