From 48a53e8e4ec5dec432af0efa38128a2bf8d9bce0 Mon Sep 17 00:00:00 2001 From: Anton Novojilov Date: Thu, 6 Jun 2024 16:24:04 +0300 Subject: [PATCH] Add spec for runsc --- specs/runsc.spec | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/specs/runsc.spec b/specs/runsc.spec index 2412bc68b..3d045381f 100644 --- a/specs/runsc.spec +++ b/specs/runsc.spec @@ -14,6 +14,7 @@ Source1: https://storage.googleapis.com/gvisor/releases/release/%{version Source10: https://storage.googleapis.com/gvisor/releases/release/%{version}/x86_64/runsc.sha512 Source11: https://storage.googleapis.com/gvisor/releases/release/%{version}/x86_64/containerd-shim-runsc-v1.sha512 +Requires: docker-ce systemd kernel > 4.14.77 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -46,6 +47,22 @@ install -pDm 755 %{SOURCE1} \ %clean rm -rf %{buildroot} +%post +if [[ $1 -eq 1 ]] ; then + %{_bindir}/runsc install &>/dev/null || : + systemctl reload docker &>/dev/null || : +fi + +%preun +if [[ $1 -eq 0 ]] ; then + systemctl reload docker &>/dev/null || : +fi + +%postun +if [[ $1 -ge 1 ]] ; then + systemctl daemon-reload &>/dev/null || : +fi + ################################################################################ %files