mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2024-11-25 21:39:10 +00:00
Preserve a temporary copy of nvidia-container-runtime-hook during rpm update,
to avoid being destroyed by when updating from <=1.10.0 Signed-off-by: Claudius Volz <c.volz@gmx.de>
This commit is contained in:
parent
50d7fb8f41
commit
f93b6a13f4
@ -52,7 +52,16 @@ install -m 755 -t %{buildroot}/usr/libexec/oci/hooks.d oci-nvidia-hook
|
|||||||
mkdir -p %{buildroot}/usr/share/containers/oci/hooks.d
|
mkdir -p %{buildroot}/usr/share/containers/oci/hooks.d
|
||||||
install -m 644 -t %{buildroot}/usr/share/containers/oci/hooks.d oci-nvidia-hook.json
|
install -m 644 -t %{buildroot}/usr/share/containers/oci/hooks.d oci-nvidia-hook.json
|
||||||
|
|
||||||
|
%post
|
||||||
|
mkdir -p %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
||||||
|
cp -af %{_bindir}/nvidia-container-runtime-hook %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit
|
||||||
|
|
||||||
%posttrans
|
%posttrans
|
||||||
|
if [ ! -e %{_bindir}/nvidia-container-runtime-hook ]; then
|
||||||
|
# reparing lost file nvidia-container-runtime-hook
|
||||||
|
cp -avf %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit/nvidia-container-runtime-hook %{_bindir}
|
||||||
|
fi
|
||||||
|
rm -f %{_localstatedir}/lib/rpm-state/nvidia-container-toolkit/nvidia-container-runtime-hook
|
||||||
ln -sf %{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-toolkit
|
ln -sf %{_bindir}/nvidia-container-runtime-hook %{_bindir}/nvidia-container-toolkit
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
|
Loading…
Reference in New Issue
Block a user