File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,6 +105,7 @@ RUN chown -R ${UID}:${GID} /archive /build
105105#
106106# NOTE: Installation of source-packages is not currently tested here.
107107FROM distro-image AS verify-packages
108+ ARG BASE
108109COPY scripts/.rpm-helpers /root/
109110RUN . /root/.rpm-helpers; install_package createrepo
110111RUN if [ -d "/etc/zypp/repos.d/" ]; then ln -s "/etc/zypp/repos.d" "/etc/yum.repos.d" ; fi \
@@ -116,7 +117,8 @@ RUN createrepo /build \
116117 && rm -rf /build/repodata
117118RUN containerd --version
118119RUN ctr --version
119- RUN runc --version
120+ # Don't try to run runc on RHEL/CentOS as we don't package it anymore.
121+ RUN if [ "${BASE}" != "rhel" ] && [ "${BASE}" != "centos" ]; then runc --version; fi
120122
121123FROM scratch AS packages
122124COPY --from=build-packages /archive /archive
Original file line number Diff line number Diff line change @@ -30,18 +30,22 @@ AutoReq: no
3030
3131Name: containerd.io
3232Provides: containerd
33- # For some reason on rhel >= 8 if we "provide" runc then it makes this package unsearchable
33+ # On RHEL >= 8 OS, runc is packaged by Red Hat so it won't be provided by this package.
3434%if 0%{?rhel } <= 7
3535Provides: runc
3636%endif
3737
3838# Obsolete packages
3939Obsoletes: containerd
40+ %if 0%{?rhel } <= 7
4041Obsoletes: runc
42+ %endif
4143
4244# Conflicting packages
4345Conflicts: containerd
46+ %if 0%{?rhel } <= 7
4447Conflicts: runc
48+ %endif
4549
4650Version: %{getenv:RPM_VERSION }
4751Release: %{getenv:RPM_RELEASE_VERSION }%{?dist }
@@ -51,7 +55,9 @@ URL: https://containerd.io
5155Source0: containerd
5256Source1: containerd.service
5357Source2: containerd.toml
58+ %if 0%{?rhel } <= 7
5459Source3: runc
60+ %endif
5561# container-selinux isn't a thing in suse flavors
5662%if %{undefined suse_version}
5763# amazonlinux2 doesn't have container-selinux either
8894# symlink the go source path to our build directory
8995ln -s /go/src/%{import_path } %{_topdir }/BUILD
9096
97+ %if 0%{?rhel } <= 7
9198if [ ! -d %{_topdir }/SOURCES/runc ]; then
9299 # Copy over our source code from our gopath to our source directory
93100 cp -rf /go/src/github.com/opencontainers/runc %{_topdir }/SOURCES/runc
94101fi
102+ %endif
95103cd %{_topdir }/BUILD/
96104
97105
@@ -108,7 +116,9 @@ rm -f bin/containerd-stress
108116bin/containerd --version
109117bin/ctr --version
110118
119+ %if 0%{?rhel } <= 7
111120GO111MODULE= auto make -C /go/src/github.com/opencontainers/runc BINDIR= %{_topdir }/BUILD/bin BUILDTAGS= 'seccomp apparmor selinux %{runc_nokmem }' runc install
121+ %endif
112122
113123
114124%install
You can’t perform that action at this time.
0 commit comments