Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OS native runc rather than bundling on RHEL8 #231

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions rpm/containerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand All @@ -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
Expand Down Expand Up @@ -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/


Expand All @@ -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
Expand Down Expand Up @@ -161,6 +172,9 @@ done


%changelog
* Fri Mar 18 2022 Göran Uddeborg <goeran@uddeborg.se>
- Use OS version of runc on RHEL8 to avoid conflict with podman.

* Fri Mar 04 2022 Sebastiaan van Stijn <thajeztah@docker.com> - 1.5.10-3.1
- Update containerd to v1.5.10

Expand Down