Skip to content

Commit

Permalink
x11-drivers/nvidia-drivers: Move the package to /usr
Browse files Browse the repository at this point in the history
- move the package to /usr
- remove the nvidia-metadata package

Signed-off-by: Sayan Chowdhury <[email protected]>
  • Loading branch information
sayanchowdhury committed Jun 16, 2023
1 parent 11637c6 commit 2716a3f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 48 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ RDEPEND="${RDEPEND}
sys-power/acpid
sys-process/lsof
sys-process/procps
x11-drivers/nvidia-metadata
x11-drivers/nvidia-drivers
"

# OEM specific bits that need to go in USR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ IUSE=""

RDEPEND="
~app-emulation/wa-linux-agent-${PV}
x11-drivers/nvidia-drivers
"

# for coreos-base/common-oem-files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,6 @@
"enabled": true,
"contents": "[Unit]\nDescription=amazon-ssm-agent\nAfter=network-online.target\n\n[Service]\nType=simple\nWorkingDirectory=/oem\nExecStart=/oem/bin/amazon-ssm-agent\nKillMode=process\nRestart=on-failure\nRestartForceExitStatus=SIGPIPE\nRestartSec=15min\n\n[Install]\nWantedBy=multi-user.target\n"
},
{
"name": "nvidia.service",
"enabled": true
}
]
},
"storage": {
Expand Down Expand Up @@ -45,14 +41,6 @@
},
"mode": 493
},
{
"filesystem": "root",
"path": "/etc/systemd/system/nvidia.service",
"contents": {
"source": "oem:///units/nvidia.service"
},
"mode": 292
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ REQUIRED_USE="^^ ( ec2 openstack brightbox )"
RDEPEND="
ec2? ( app-emulation/amazon-ssm-agent )
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
"

# no source directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,4 @@ RDEPEND="
coreos-base/coreos
coreos-base/coreos-dev
coreos-base/flatcar-eks
x11-drivers/nvidia-drivers
"
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function extract_nvidia_installer() {
function run_nspawn_container() {
echo Spawn system-nspawn container to install the NVIDIA drivers

sudo systemd-nspawn --read-only --volatile=overlay --image="${FLATCAR_ROOT_WORKDIR}/${FLATCAR_DEVELOPER_CONTAINER}" --bind="${FLATCAR_ROOT_WORKDIR}/${NVIDIA_WORKDIR}":/nvidia --bind=/oem/bin:/app/bin/ /app/bin/install-nvidia "$NVIDIA_DRIVER_BASENAME"
sudo systemd-nspawn --read-only --volatile=overlay --image="${FLATCAR_ROOT_WORKDIR}/${FLATCAR_DEVELOPER_CONTAINER}" --bind="${FLATCAR_ROOT_WORKDIR}/${NVIDIA_WORKDIR}":/nvidia --bind=/usr/lib/nvidia/bin:/app/bin/ /app/bin/install-nvidia "$NVIDIA_DRIVER_BASENAME"
}

function copy_nvidia_build_artifacts() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ After=network-online.target
Type=simple
Restart=no
Environment=PATH=/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
ExecStart=/oem/bin/setup-nvidia
ExecStart=/usr/lib/nvidia/bin/setup-nvidia

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@

EAPI=7

inherit systemd

DESCRIPTION="NVIDIA drivers"
HOMEPAGE=""
SRC_URI=""
Expand All @@ -15,14 +17,12 @@ IUSE=""
# no source directory
S="${WORKDIR}"

RDEPEND="
=x11-drivers/nvidia-metadata-${PV}
"

src_install() {
insinto "/oem"
doins -r "${FILESDIR}/units"
exeinto "/oem/bin"
systemd_dounit "${FILESDIR}/units/nvidia.service"
systemd_enable_service multi-user.target nvidia.service
exeinto "/usr/lib/nvidia/bin"
doexe "${FILESDIR}/bin/install-nvidia"
doexe "${FILESDIR}/bin/setup-nvidia"
insinto "/usr/share/flatcar"
doins "${FILESDIR}/nvidia-metadata"
}

This file was deleted.

0 comments on commit 2716a3f

Please sign in to comment.