diff options
author | Jeroen Roovers <jer@gentoo.org> | 2013-11-17 17:25:04 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2013-11-17 17:25:04 +0000 |
commit | aa90c44fd5f261c1c1a65993211080c80b5906de (patch) | |
tree | ad7906c5732bb965fb4081b4393f3839f6fa039c /x11-drivers | |
parent | Version bump (diff) | |
download | gentoo-2-aa90c44fd5f261c1c1a65993211080c80b5906de.tar.gz gentoo-2-aa90c44fd5f261c1c1a65993211080c80b5906de.tar.bz2 gentoo-2-aa90c44fd5f261c1c1a65993211080c80b5906de.zip |
Move /etc/modprobe.d/nvidia.conf sed call to pkg_preinst (bug #491414).
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key A792A613)
Diffstat (limited to 'x11-drivers')
5 files changed, 92 insertions, 70 deletions
diff --git a/x11-drivers/nvidia-drivers/ChangeLog b/x11-drivers/nvidia-drivers/ChangeLog index 60817a4b2e14..fe52e830d0e6 100644 --- a/x11-drivers/nvidia-drivers/ChangeLog +++ b/x11-drivers/nvidia-drivers/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for x11-drivers/nvidia-drivers # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.495 2013/11/13 21:01:56 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/ChangeLog,v 1.496 2013/11/17 17:25:04 jer Exp $ + + 17 Nov 2013; Jeroen Roovers <jer@gentoo.org> nvidia-drivers-173.14.38.ebuild, + nvidia-drivers-304.116.ebuild, nvidia-drivers-325.15.ebuild, + nvidia-drivers-331.20.ebuild: + Move /etc/modprobe.d/nvidia.conf sed call to pkg_preinst (bug #491414). 13 Nov 2013; Mike Gilbert <floppym@gentoo.org> nvidia-drivers-331.20.ebuild: Comment out broken pax-usercopy patch. diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.38.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.38.ebuild index 802c396ce900..90bf06235823 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.38.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.38.ebuild @@ -1,8 +1,9 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.38.ebuild,v 1.6 2013/11/07 00:40:40 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-173.14.38.ebuild,v 1.7 2013/11/17 17:25:04 jer Exp $ EAPI=5 + inherit eutils flag-o-matic linux-mod multilib nvidia-driver portability \ unpacker user versionator @@ -312,19 +313,11 @@ src_install() { if use kernel_linux; then linux-mod_src_install - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia + # This file is tweaked with the appropriate video group in + # pkg_preinst, see bug #491414 insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf elif use kernel_FreeBSD; then insinto /boot/modules doins "${WORKDIR}/${NV_PACKAGE}/src/nvidia.kld" @@ -506,7 +499,20 @@ src_install-libs() { } pkg_preinst() { - use kernel_linux && linux-mod_pkg_postinst + if use kernel_linux; then + linux-mod_pkg_preinst + + local videogroup="$(egetent group video | cut -d ':' -f 3)" + if [ -z "${videogroup}" ]; then + eerror "Failed to determine the video group gid" + die "Failed to determine the video group gid" + else + sed -i \ + -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" \ + "${D}"/etc/modprobe.d/nvidia.conf || die + fi + fi # Clean the dynamic libGL stuff's home to ensure # we dont have stale libs floating around diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-304.116.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-304.116.ebuild index ae4761354e29..138514d5af6b 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-304.116.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-304.116.ebuild @@ -1,9 +1,8 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-304.116.ebuild,v 1.1 2013/11/06 17:31:46 jer Exp $ - -EAPI=4 +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-304.116.ebuild,v 1.2 2013/11/17 17:25:04 jer Exp $ +EAPI=5 inherit eutils flag-o-matic linux-info linux-mod multilib nvidia-driver \ portability toolchain-funcs unpacker user versionator udev @@ -172,8 +171,8 @@ src_prepare() { ewarn "Using PAX patches is not supported. You will be asked to" ewarn "use a standard kernel should you have issues. Should you" ewarn "need support with these patches, contact the PaX team." - epatch "${FILESDIR}"/${PN}-pax-const.patch - epatch "${FILESDIR}"/${PN}-pax-usercopy.patch + epatch "${FILESDIR}"/${PN}-pax-const.patch + epatch "${FILESDIR}"/${PN}-pax-usercopy.patch fi cat <<- EOF > "${S}"/nvidia.icd @@ -244,33 +243,24 @@ src_install() { if use kernel_linux; then linux-mod_src_install - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia + # This file is tweaked with the appropriate video group in + # pkg_preinst, see bug #491414 insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf || die + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf # Ensures that our device nodes are created when not using X exeinto "$(udev_get_udevdir)" doexe "${FILESDIR}"/nvidia-udev.sh udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules - elif use kernel_FreeBSD; then if use x86-fbsd; then insinto /boot/modules - doins "${S}/src/nvidia.kld" || die + doins "${S}/src/nvidia.kld" fi exeinto /boot/modules - doexe "${S}/src/nvidia.ko" || die + doexe "${S}/src/nvidia.ko" fi # NVIDIA kernel <-> userspace driver config lib @@ -284,7 +274,7 @@ src_install() { if use X; then # Xorg DDX driver insinto /usr/$(get_libdir)/xorg/modules/drivers - doins ${NV_X11}/nvidia_drv.so || die "failed to install nvidia_drv.so" + doins ${NV_X11}/nvidia_drv.so # Xorg GLX driver donvidia ${NV_X11}/libglx.so ${NV_SOVER} \ @@ -326,23 +316,23 @@ src_install() { exeinto /opt/bin/ if use X; then - doexe ${NV_OBJ}/nvidia-xconfig || die + doexe ${NV_OBJ}/nvidia-xconfig fi if use kernel_linux ; then - doexe ${NV_OBJ}/nvidia-debugdump || die - doexe ${NV_OBJ}/nvidia-cuda-proxy-control || die - doexe ${NV_OBJ}/nvidia-cuda-proxy-server || die - doexe ${NV_OBJ}/nvidia-smi || die + doexe ${NV_OBJ}/nvidia-debugdump + doexe ${NV_OBJ}/nvidia-cuda-proxy-control + doexe ${NV_OBJ}/nvidia-cuda-proxy-server + doexe ${NV_OBJ}/nvidia-smi newinitd "${FILESDIR}/nvidia-smi.init" nvidia-smi fi if use tools; then - doexe ${NV_OBJ}/nvidia-settings || die + doexe ${NV_OBJ}/nvidia-settings fi exeinto /usr/bin/ - doexe ${NV_OBJ}/nvidia-bug-report.sh || die + doexe ${NV_OBJ}/nvidia-bug-report.sh # Desktop entries for nvidia-settings if use tools ; then @@ -410,7 +400,20 @@ src_install-libs() { } pkg_preinst() { - use kernel_linux && linux-mod_pkg_preinst + if use kernel_linux; then + linux-mod_pkg_preinst + + local videogroup="$(egetent group video | cut -d ':' -f 3)" + if [ -z "${videogroup}" ]; then + eerror "Failed to determine the video group gid" + die "Failed to determine the video group gid" + else + sed -i \ + -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" \ + "${D}"/etc/modprobe.d/nvidia.conf || die + fi + fi # Clean the dynamic libGL stuff's home to ensure # we dont have stale libs floating around diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild index 3a26b2f7a2a0..d60ee5ed545d 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild,v 1.5 2013/11/02 17:55:25 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-325.15.ebuild,v 1.6 2013/11/17 17:25:04 jer Exp $ EAPI=5 @@ -240,25 +240,16 @@ src_install() { if use kernel_linux; then linux-mod_src_install - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia + # This file is tweaked with the appropriate video group in + # pkg_preinst, see bug #491414 insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf # Ensures that our device nodes are created when not using X exeinto "$(udev_get_udevdir)" doexe "${FILESDIR}"/nvidia-udev.sh udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules - elif use kernel_FreeBSD; then if use x86-fbsd; then insinto /boot/modules @@ -404,7 +395,20 @@ src_install-libs() { } pkg_preinst() { - use kernel_linux && linux-mod_pkg_preinst + if use kernel_linux; then + linux-mod_pkg_preinst + + local videogroup="$(egetent group video | cut -d ':' -f 3)" + if [ -z "${videogroup}" ]; then + eerror "Failed to determine the video group gid" + die "Failed to determine the video group gid" + else + sed -i \ + -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" \ + "${D}"/etc/modprobe.d/nvidia.conf || die + fi + fi # Clean the dynamic libGL stuff's home to ensure # we dont have stale libs floating around diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-331.20.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-331.20.ebuild index c06facae51bd..28c516a1c5e0 100644 --- a/x11-drivers/nvidia-drivers/nvidia-drivers-331.20.ebuild +++ b/x11-drivers/nvidia-drivers/nvidia-drivers-331.20.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-331.20.ebuild,v 1.2 2013/11/13 21:01:56 floppym Exp $ +# $Header: /var/cvsroot/gentoo-x86/x11-drivers/nvidia-drivers/nvidia-drivers-331.20.ebuild,v 1.3 2013/11/17 17:25:04 jer Exp $ EAPI=5 @@ -240,25 +240,16 @@ src_install() { if use kernel_linux; then linux-mod_src_install - VIDEOGROUP="$(egetent group video | cut -d ':' -f 3)" - if [ -z "$VIDEOGROUP" ]; then - eerror "Failed to determine the video group gid." - die "Failed to determine the video group gid." - fi - # Add the aliases - [ -f "${FILESDIR}/nvidia-169.07" ] || die "nvidia missing in FILESDIR" - sed -e 's:PACKAGE:'${PF}':g' \ - -e 's:VIDEOGID:'${VIDEOGROUP}':' "${FILESDIR}"/nvidia-169.07 > \ - "${WORKDIR}"/nvidia + # This file is tweaked with the appropriate video group in + # pkg_preinst, see bug #491414 insinto /etc/modprobe.d - newins "${WORKDIR}"/nvidia nvidia.conf + newins "${FILESDIR}"/nvidia-169.07 nvidia.conf # Ensures that our device nodes are created when not using X exeinto "$(udev_get_udevdir)" doexe "${FILESDIR}"/nvidia-udev.sh udev_newrules "${FILESDIR}"/nvidia.udev-rule 99-nvidia.rules - elif use kernel_FreeBSD; then if use x86-fbsd; then insinto /boot/modules @@ -404,7 +395,20 @@ src_install-libs() { } pkg_preinst() { - use kernel_linux && linux-mod_pkg_preinst + if use kernel_linux; then + linux-mod_pkg_preinst + + local videogroup="$(egetent group video | cut -d ':' -f 3)" + if [ -z "${videogroup}" ]; then + eerror "Failed to determine the video group gid" + die "Failed to determine the video group gid" + else + sed -i \ + -e "s:PACKAGE:${PF}:g" \ + -e "s:VIDEOGID:${videogroup}:" \ + "${D}"/etc/modprobe.d/nvidia.conf || die + fi + fi # Clean the dynamic libGL stuff's home to ensure # we dont have stale libs floating around |