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

RunC has been excluded from rpm spec #246

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion dockerfiles/rpm.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ ARG CREATE_ARCHIVE
RUN --mount=type=bind,from=golang,source=/usr/local/go/,target=/usr/local/go/ \
--mount=type=bind,source=/src,target=/go/src,rw \
--mount=type=bind,source=/src/github.com/containerd/containerd,target=/root/rpmbuild/SOURCES/containerd \
--mount=type=bind,source=/src/github.com/opencontainers/runc,target=/root/rpmbuild/SOURCES/runc \
/root/build-rpm
ARG UID=0
ARG GID=0
Expand Down Expand Up @@ -116,6 +115,7 @@ RUN createrepo /build \
&& rm -rf /build/repodata
RUN containerd --version
RUN ctr --version
RUN dnf -y install runc
RUN runc --version

FROM scratch AS packages
Expand Down
18 changes: 3 additions & 15 deletions rpm/containerd.spec
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,15 @@ AutoReq: no
%define SHA256SUM0 08f057ece7e518b14cce2e9737228a5a899a7b58b78248a03e02f4a6c079eeaf
%global import_path github.com/containerd/containerd
%global gopath %{getenv:GOPATH}
%global runc_nokmem %{getenv:RUNC_NOKMEM}

Name: containerd.io
Provides: containerd
# For some reason on rhel 8 if we "provide" runc then it makes this package unsearchable
%if 0%{!?el8:1}
Provides: runc
%endif

# Obsolete packages
Obsoletes: containerd
Obsoletes: runc

# Conflicting packages
Conflicts: containerd
Conflicts: runc

Version: %{getenv:RPM_VERSION}
Release: %{getenv:RPM_RELEASE_VERSION}%{?dist}
Expand All @@ -51,7 +44,6 @@ URL: https://containerd.io
Source0: containerd
Source1: containerd.service
Source2: containerd.toml
Source3: runc
# container-selinux isn't a thing in suse flavors
%if %{undefined suse_version}
# amazonlinux2 doesn't have container-selinux either
Expand Down Expand Up @@ -97,10 +89,6 @@ fi
# symlink the go source path to our build directory
ln -s /go/src/%{import_path} %{_topdir}/BUILD

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
cd %{_topdir}/BUILD/


Expand All @@ -120,9 +108,6 @@ rm -f bin/containerd-stress
bin/containerd --version
bin/ctr --version

GO111MODULE=off make -C /go/src/github.com/opencontainers/runc BINDIR=%{_topdir}/BUILD/bin BUILDTAGS='seccomp apparmor selinux %{runc_nokmem}' runc install


%install
cd %{_topdir}/BUILD
mkdir -p %{buildroot}%{_bindir}
Expand Down Expand Up @@ -161,6 +146,9 @@ done


%changelog
* Mon Jul 20 2021 Alexandr Arefev <alexarefev@ya.ru> - 1.4.8-3.1
- Runc has been excluded from rpm package

* Mon Jul 19 2021 Sebastiaan van Stijn <thajeztah@docker.com> - 1.4.8-3.1
- Update to containerd 1.4.8 to address CVE-2021-32760

Expand Down