From 8a56671d18a3f1953ea973b1b744bc9cb97b72b9 Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Mon, 6 Sep 2021 12:22:04 +0200 Subject: [PATCH] Update package definitions Signed-off-by: Evan Lezar --- packaging/debian/nvidia-container-toolkit.install | 2 +- packaging/debian/nvidia-container-toolkit.postinst | 6 +++--- packaging/debian/nvidia-container-toolkit.postrm | 2 +- packaging/rpm/SPECS/nvidia-container-toolkit.spec | 10 +++++----- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/packaging/debian/nvidia-container-toolkit.install b/packaging/debian/nvidia-container-toolkit.install index 0faa1ede..2f2bee2a 100644 --- a/packaging/debian/nvidia-container-toolkit.install +++ b/packaging/debian/nvidia-container-toolkit.install @@ -1,4 +1,4 @@ config.toml /etc/nvidia-container-runtime -nvidia-container-toolkit /usr/bin +nvidia-container-runtime-hook /usr/bin nvidia-container-runtime /usr/bin nvidia-ctk /usr/bin diff --git a/packaging/debian/nvidia-container-toolkit.postinst b/packaging/debian/nvidia-container-toolkit.postinst index 6666d5d2..a58d42d5 100644 --- a/packaging/debian/nvidia-container-toolkit.postinst +++ b/packaging/debian/nvidia-container-toolkit.postinst @@ -7,9 +7,9 @@ NVIDIA_CONTAINER_TOOLKIT=/usr/bin/nvidia-container-toolkit case "$1" in configure) - if [ -f "${NVIDIA_CONTAINER_TOOLKIT}" ]; then - if [ ! -e "${NVIDIA_CONTAINER_RUNTIME_HOOK}" ]; then - ln -s ${NVIDIA_CONTAINER_TOOLKIT} ${NVIDIA_CONTAINER_RUNTIME_HOOK} + if [ -f "${NVIDIA_CONTAINER_RUNTIME_HOOK}" ]; then + if [ ! -e "${NVIDIA_CONTAINER_TOOLKIT}" ]; then + ln -s ${NVIDIA_CONTAINER_RUNTIME_HOOK} ${NVIDIA_CONTAINER_TOOLKIT} fi fi ;; diff --git a/packaging/debian/nvidia-container-toolkit.postrm b/packaging/debian/nvidia-container-toolkit.postrm index 688c65b1..bf4e8a5a 100644 --- a/packaging/debian/nvidia-container-toolkit.postrm +++ b/packaging/debian/nvidia-container-toolkit.postrm @@ -7,7 +7,7 @@ NVIDIA_CONTAINER_TOOLKIT=/usr/bin/nvidia-container-toolkit case "$1" in purge) - [ -L "${NVIDIA_CONTAINER_RUNTIME_HOOK}" ] && rm ${NVIDIA_CONTAINER_RUNTIME_HOOK} + [ -L "${NVIDIA_CONTAINER_TOOLKIT}" ] && rm ${NVIDIA_CONTAINER_TOOLKIT} ;; upgrade|failed-upgrade|remove|abort-install|abort-upgrade|disappear) diff --git a/packaging/rpm/SPECS/nvidia-container-toolkit.spec b/packaging/rpm/SPECS/nvidia-container-toolkit.spec index 3f682bde..8fa15bb9 100644 --- a/packaging/rpm/SPECS/nvidia-container-toolkit.spec +++ b/packaging/rpm/SPECS/nvidia-container-toolkit.spec @@ -10,7 +10,7 @@ Summary: NVIDIA container runtime hook URL: https://github.com/NVIDIA/nvidia-container-runtime License: Apache-2.0 -Source0: nvidia-container-toolkit +Source0: nvidia-container-runtime-hook Source1: nvidia-container-runtime Source2: nvidia-ctk Source3: config.toml @@ -38,7 +38,7 @@ cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} %{SOURCE6} %install mkdir -p %{buildroot}%{_bindir} -install -m 755 -t %{buildroot}%{_bindir} nvidia-container-toolkit +install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime-hook install -m 755 -t %{buildroot}%{_bindir} nvidia-container-runtime install -m 755 -t %{buildroot}%{_bindir} nvidia-ctk @@ -52,14 +52,14 @@ mkdir -p %{buildroot}/usr/share/containers/oci/hooks.d install -m 644 -t %{buildroot}/usr/share/containers/oci/hooks.d oci-nvidia-hook.json %posttrans -ln -sf %{_bindir}/nvidia-container-toolkit %{_bindir}/nvidia-container-runtime-hook +ln -sf %{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-toolkit %postun -rm -f %{_bindir}/nvidia-container-runtime-hook +rm -f %{_bindir}/nvidia-container-runtime-toolkit %files %license LICENSE -%{_bindir}/nvidia-container-toolkit +%{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-runtime %{_bindir}/nvidia-ctk %config /etc/nvidia-container-runtime/config.toml