File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree 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
@@ -64,6 +70,9 @@ Requires: libseccomp
6470# and libseccomp is named libseccomp2
6571Requires: libseccomp2
6672%endif
73+ %if 0%{?rhel } >= 8
74+ Requires: runc
75+ %endif
6776BuildRequires: make
6877BuildRequires: gcc
6978BuildRequires: systemd
8897# symlink the go source path to our build directory
8998ln -s /go/src/%{import_path } %{_topdir }/BUILD
9099
100+ %if 0%{?rhel } <= 7
91101if [ ! -d %{_topdir }/SOURCES/runc ]; then
92102 # Copy over our source code from our gopath to our source directory
93103 cp -rf /go/src/github.com/opencontainers/runc %{_topdir }/SOURCES/runc
94104fi
105+ %endif
95106cd %{_topdir }/BUILD/
96107
97108
@@ -108,7 +119,9 @@ rm -f bin/containerd-stress
108119bin/containerd --version
109120bin/ctr --version
110121
122+ %if 0%{?rhel } <= 7
111123GO111MODULE= auto make -C /go/src/github.com/opencontainers/runc BINDIR= %{_topdir }/BUILD/bin BUILDTAGS= 'seccomp apparmor selinux %{runc_nokmem }' runc install
124+ %endif
112125
113126
114127%install
You can’t perform that action at this time.
0 commit comments