mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-09-24 04:59:14 -07:00
x11-drivers/nvidia-drivers: fix build with USE=-modules
At same time update/shorten comment a bit, esp. to mention that it may
not be included without initramfs regen and this is more of a best
effort solution (thankfully *most* users would include neither modules
on an initramfs and it wouldn't matter).
Fixes: dacc7d5a54
Closes: https://bugs.gentoo.org/940564
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
@@ -401,12 +401,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -388,12 +388,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -452,12 +452,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -452,12 +452,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -443,12 +443,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -442,12 +442,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -445,12 +445,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
@@ -448,12 +448,13 @@ documentation that is installed alongside this README."
|
||||
insinto /etc/sandbox.d
|
||||
newins - 20nvidia <<<'SANDBOX_PREDICT="/dev/nvidiactl:/dev/nvidia-caps:/dev/char"'
|
||||
|
||||
# Dracut does not include /etc/modprobe.d if hostonly=no, but we do need this
|
||||
# to ensure that the nouveau blacklist is applied
|
||||
# https://github.com/dracut-ng/dracut-ng/issues/674
|
||||
# https://bugs.gentoo.org/932781
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}/usr/lib/dracut/dracut.conf.d/10-${PN}.conf" || die
|
||||
# dracut does not use /etc/modprobe.d if hostonly=no, but want to make sure
|
||||
# our settings are used for bug 932781#c8 and nouveau blacklist if either
|
||||
# modules are included (however, just best-effort without initramfs regen)
|
||||
if use modules; then
|
||||
echo "install_items+=\" ${EPREFIX}/etc/modprobe.d/nvidia.conf \"" >> \
|
||||
"${ED}"/usr/lib/dracut/dracut.conf.d/10-${PN}.conf || die
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
|
||||
Reference in New Issue
Block a user