diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild index 93c9426be88..a215fdea4b0 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/coreos/coreos-0.0.1.ebuild @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-azure/oem-azure-2.6.0.2-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-azure/oem-azure-2.6.0.2-r3.ebuild index 24fa7fbe41c..2deb8188405 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-azure/oem-azure-2.6.0.2-r3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-azure/oem-azure-2.6.0.2-r3.ebuild @@ -14,7 +14,6 @@ IUSE="" RDEPEND=" ~app-emulation/wa-linux-agent-${PV} - x11-drivers/nvidia-drivers " # for coreos-base/common-oem-files diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/files/base/base-ec2.ign b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/files/base/base-ec2.ign index fea34428cb1..2db3eb7a096 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/files/base/base-ec2.ign +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/files/base/base-ec2.ign @@ -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": { @@ -45,14 +41,6 @@ }, "mode": 493 }, - { - "filesystem": "root", - "path": "/etc/systemd/system/nvidia.service", - "contents": { - "source": "oem:///units/nvidia.service" - }, - "mode": 292 - } ] } } diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/oem-ec2-compat-0.1.2-r3.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/oem-ec2-compat-0.1.2-r3.ebuild index e6767279b35..d6b1bc7a845 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/oem-ec2-compat-0.1.2-r3.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-base/oem-ec2-compat/oem-ec2-compat-0.1.2-r3.ebuild @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild index e95bd1644dc..e9a082a32ee 100644 --- a/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/coreos-devel/board-packages/board-packages-0.0.1.ebuild @@ -34,5 +34,4 @@ RDEPEND=" coreos-base/coreos coreos-base/coreos-dev coreos-base/flatcar-eks - x11-drivers/nvidia-drivers " diff --git a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia index 588ef082e5e..0c6f52e1584 100644 --- a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia +++ b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/bin/setup-nvidia @@ -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 @@ -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() { diff --git a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-metadata/files/nvidia-metadata b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/nvidia-metadata similarity index 100% rename from sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-metadata/files/nvidia-metadata rename to sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/nvidia-metadata diff --git a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/units/nvidia.service b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/units/nvidia.service index d4283e9d35e..1b36dfe873c 100644 --- a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/units/nvidia.service +++ b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/files/units/nvidia.service @@ -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 diff --git a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17-r1.ebuild b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17-r2.ebuild similarity index 62% rename from sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17-r1.ebuild rename to sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17-r2.ebuild index 6a1db822a98..53465ec289a 100644 --- a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17-r1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-drivers/nvidia-drivers-525.105.17-r2.ebuild @@ -3,6 +3,8 @@ EAPI=7 +inherit systemd + DESCRIPTION="NVIDIA drivers" HOMEPAGE="" SRC_URI="" @@ -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" } diff --git a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-metadata/nvidia-metadata-525.105.17.ebuild b/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-metadata/nvidia-metadata-525.105.17.ebuild deleted file mode 100644 index 10a2a0a72d9..00000000000 --- a/sdk_container/src/third_party/coreos-overlay/x11-drivers/nvidia-metadata/nvidia-metadata-525.105.17.ebuild +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright (c) 2021 Kinvolk GmbH. All rights reserved. -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -DESCRIPTION="NVIDIA drivers release version and configuration" -HOMEPAGE="" -SRC_URI="" - -LICENSE="Apache-2.0" -SLOT="0" -KEYWORDS="amd64 arm64" -IUSE="" - -# no source directory -S="${WORKDIR}" - -RDEPEND="" - -src_install() { - insinto "/usr/share/flatcar" - doins "${FILESDIR}/nvidia-metadata" -}