diff options
author | Ionen Wolkens <ionen@gentoo.org> | 2022-04-15 15:16:01 -0400 |
---|---|---|
committer | Ionen Wolkens <ionen@gentoo.org> | 2022-04-15 16:38:33 -0400 |
commit | 78f19f2a5efedcf7950df56f74781ed770c1884f (patch) | |
tree | b1fdeb9ef22a336fcb556023a4f5e5d1484a18fd /x11-drivers | |
parent | sci-geosciences/qgis: Drop 3.22.4 (diff) | |
download | gentoo-78f19f2a5efedcf7950df56f74781ed770c1884f.tar.gz gentoo-78f19f2a5efedcf7950df56f74781ed770c1884f.tar.bz2 gentoo-78f19f2a5efedcf7950df56f74781ed770c1884f.zip |
x11-drivers/nvidia-drivers: use egetent + better sanity check
Switching to egetent wasn't very useful given the limited use-cases
where nvidia-drivers can be installed (and there's no egetgroupid)
but, given there's talk to improve its ROOT / crossdev support, it
may be good to finally change this.
Also add sanity-check to ensure we got a number, still skip assert
so failure will give the sanity-check's error message.
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
Diffstat (limited to 'x11-drivers')
4 files changed, 12 insertions, 12 deletions
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild index 6a54413a0717..70758e3edab6 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-390.147.ebuild @@ -5,7 +5,7 @@ EAPI=7 MODULES_OPTIONAL_USE="driver" inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ - systemd toolchain-funcs unpacker + systemd toolchain-funcs unpacker user-info NV_KERNEL_MAX="5.15" NV_URI="https://download.nvidia.com/XFree86/" @@ -398,8 +398,8 @@ pkg_preinst() { linux-mod_pkg_preinst # set video group id based on live system (bug #491414) - local g=$(getent group video | cut -d: -f3) - [[ ${g} ]] || die "Failed to determine video group id" + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die } diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild index ee701aece3c6..927302a8b1f7 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.103.01.ebuild @@ -5,7 +5,7 @@ EAPI=7 MODULES_OPTIONAL_USE="driver" inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ - systemd toolchain-funcs unpacker + systemd toolchain-funcs unpacker user-info NV_KERNEL_MAX="5.17" NV_URI="https://download.nvidia.com/XFree86/" @@ -372,8 +372,8 @@ pkg_preinst() { linux-mod_pkg_preinst # set video group id based on live system (bug #491414) - local g=$(getent group video | cut -d: -f3) - [[ ${g} ]] || die "Failed to determine video group id" + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die # try to find driver mismatches using temporary supported-gpus.json diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.26.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.26.ebuild index 42bea619cccf..a04389a83803 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.26.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-470.62.26.ebuild @@ -5,7 +5,7 @@ EAPI=8 MODULES_OPTIONAL_USE="driver" inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ - systemd toolchain-funcs unpacker + systemd toolchain-funcs unpacker user-info NV_KERNEL_MAX="5.15" NV_PIN="470.103.01" @@ -372,8 +372,8 @@ pkg_preinst() { linux-mod_pkg_preinst # set video group id based on live system (bug #491414) - local g=$(getent group video | cut -d: -f3) - [[ ${g} ]] || die "Failed to determine video group id" + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die # try to find driver mismatches using temporary supported-gpus.json diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-510.60.02.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-510.60.02.ebuild index faaeef172255..869bb3b67904 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-510.60.02.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-510.60.02.ebuild @@ -5,7 +5,7 @@ EAPI=8 MODULES_OPTIONAL_USE="driver" inherit desktop flag-o-matic linux-mod multilib readme.gentoo-r1 \ - systemd toolchain-funcs unpacker + systemd toolchain-funcs unpacker user-info NV_KERNEL_MAX="5.17" @@ -386,8 +386,8 @@ pkg_preinst() { linux-mod_pkg_preinst # set video group id based on live system (bug #491414) - local g=$(getent group video | cut -d: -f3) - [[ ${g} ]] || die "Failed to determine video group id" + local g=$(egetent group video | cut -d: -f3) + [[ ${g} =~ ^[0-9]+$ ]] || die "Failed to determine video group id (got '${g}')" sed -i "s/@VIDEOGID@/${g}/" "${ED}"/etc/modprobe.d/nvidia.conf || die # try to find driver mismatches using temporary supported-gpus.json |