diff --git a/rpm/containerd.spec b/rpm/containerd.spec index 749e7270..8a552a86 100644 --- a/rpm/containerd.spec +++ b/rpm/containerd.spec @@ -30,18 +30,23 @@ AutoReq: no Name: containerd.io Provides: containerd -# For some reason on rhel 8 if we "provide" runc then it makes this package unsearchable +# Since runc lives in in a module stream on RHEL 8, it won't work to provide +# it here. Better to use the OS version. %if 0%{!?el8:1} Provides: runc %endif # Obsolete packages Obsoletes: containerd +%if 0%{!?el8:1} Obsoletes: runc +%endif # Conflicting packages Conflicts: containerd +%if 0%{!?el8:1} Conflicts: runc +%endif Version: %{getenv:RPM_VERSION} Release: %{getenv:RPM_RELEASE_VERSION}%{?dist} @@ -64,6 +69,9 @@ Requires: libseccomp # and libseccomp is named libseccomp2 Requires: libseccomp2 %endif +%if 0%{?el8:1} +Requires: runc +%endif BuildRequires: make BuildRequires: gcc BuildRequires: systemd @@ -97,10 +105,12 @@ fi # symlink the go source path to our build directory ln -s /go/src/%{import_path} %{_topdir}/BUILD +%if 0%{!?el8:1} if [ ! -d %{_topdir}/SOURCES/runc ]; then # Copy over our source code from our gopath to our source directory cp -rf /go/src/github.com/opencontainers/runc %{_topdir}/SOURCES/runc fi +%endif cd %{_topdir}/BUILD/ @@ -120,8 +130,9 @@ rm -f bin/containerd-stress bin/containerd --version bin/ctr --version +%if 0%{!?el8:1} GO111MODULE=auto make -C /go/src/github.com/opencontainers/runc BINDIR=%{_topdir}/BUILD/bin BUILDTAGS='seccomp apparmor selinux %{runc_nokmem}' runc install - +%endif %install cd %{_topdir}/BUILD @@ -161,6 +172,9 @@ done %changelog +* Fri Mar 18 2022 Göran Uddeborg +- Use OS version of runc on RHEL8 to avoid conflict with podman. + * Fri Mar 04 2022 Sebastiaan van Stijn - 1.5.10-3.1 - Update containerd to v1.5.10