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]>
Co-authored-by: Kai Lüke <[email protected]>
  • Loading branch information
sayanchowdhury and pothos committed Jun 16, 2023
1 parent 11637c6 commit 23a4a25
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 49 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 @@ -24,7 +24,7 @@ function download_flatcar_developer_container() {
then
rm -f "${FLATCAR_ROOT_WORKDIR}/"flatcar_developer_container*.bin
FLATCAR_REMOTE_FILENAME=${FLATCAR_DEVELOPER_CONTAINER%%-*}.bin.bz2
if [[ "$(curl -I -s -o /dev/null -w "%{http_code}" "https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}")" == 200 ]]
if [[ "$(curl -I --retry-delay 1 --retry 60 --retry-connrefused --retry-max-time 60 --connect-timeout 20 -L -s -o /dev/null -w "%{http_code}" "https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}")" == 200 ]]
then
FLATCAR_DEVELOPER_CONTAINER_URL="https://${GROUP}.release.flatcar-linux.net/${FLATCAR_RELEASE_BOARD}/${FLATCAR_RELEASE_VERSION}/${FLATCAR_REMOTE_FILENAME}"
else
Expand Down 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 23a4a25

Please sign in to comment.