Blob Blame Raw
# Generated by go2rpm
%bcond_without check

# https://github.com/containerd/cri
%global goipath         github.com/containerd/cri
Version:                1.11.1

%gometa

%global common_description %{expand:
Cri is a native plugin of containerd 1.1 and above. It is built into containerd
and enabled by default.}

%global golicenses      LICENSE
%global godocs          docs CONTRIBUTING.md code-of-conduct.md README.md

Name:           %{goname}
Release:        4%{?dist}
Summary:        Containerd Plugin for Kubernetes Container Runtime Interface

# Upstream license specification: Apache-2.0
License:        ASL 2.0
URL:            %{gourl}
Source0:        %{gosource}
# Update test based on new CRI
# https://github.com/containerd/cri/commit/0580ce45fd7c5c630361e5cf1ac9ffed3a7eb8be
Patch0:         0001-Update-test-based-on-new-CRI.patch
# Replace Skip with Skipf in the intergration test.
Patch1:         https://github.com/containerd/cri/commit/54b1c00b3b307b0fadd10c02d9467a6545c2c4d5.patch#/0001-Fix-compile-error-with-go1.10.2.patch
# To use with newer github.com/containernetworking/plugins
Patch2:         0001-move-namespace-creation-to-testutils.patch
# Replace stringid with simple rand reader
Patch3:         0001-Replace-stringid-with-simple-rand-reader.patch
# To use newer opencontainers/selinux
Patch4:         0001-bump-opencontainers-selinux-to-v1.2.patch

BuildRequires:  golang(github.com/containerd/cgroups)
BuildRequires:  golang(github.com/containerd/containerd)
BuildRequires:  golang(github.com/containerd/containerd/api/events)
BuildRequires:  golang(github.com/containerd/containerd/api/services/containers/v1)
BuildRequires:  golang(github.com/containerd/containerd/api/services/diff/v1)
BuildRequires:  golang(github.com/containerd/containerd/api/services/images/v1)
BuildRequires:  golang(github.com/containerd/containerd/api/services/namespaces/v1)
BuildRequires:  golang(github.com/containerd/containerd/api/services/tasks/v1)
BuildRequires:  golang(github.com/containerd/containerd/api/types)
BuildRequires:  golang(github.com/containerd/containerd/cio)
BuildRequires:  golang(github.com/containerd/containerd/containers)
BuildRequires:  golang(github.com/containerd/containerd/content)
BuildRequires:  golang(github.com/containerd/containerd/contrib/apparmor)
BuildRequires:  golang(github.com/containerd/containerd/contrib/seccomp)
BuildRequires:  golang(github.com/containerd/containerd/diff/walking/plugin)
BuildRequires:  golang(github.com/containerd/containerd/errdefs)
BuildRequires:  golang(github.com/containerd/containerd/events)
BuildRequires:  golang(github.com/containerd/containerd/gc/scheduler)
BuildRequires:  golang(github.com/containerd/containerd/images)
BuildRequires:  golang(github.com/containerd/containerd/leases)
BuildRequires:  golang(github.com/containerd/containerd/log)
BuildRequires:  golang(github.com/containerd/containerd/metrics/cgroups)
BuildRequires:  golang(github.com/containerd/containerd/mount)
BuildRequires:  golang(github.com/containerd/containerd/namespaces)
BuildRequires:  golang(github.com/containerd/containerd/oci)
BuildRequires:  golang(github.com/containerd/containerd/platforms)
BuildRequires:  golang(github.com/containerd/containerd/plugin)
BuildRequires:  golang(github.com/containerd/containerd/reference)
BuildRequires:  golang(github.com/containerd/containerd/remotes)
BuildRequires:  golang(github.com/containerd/containerd/remotes/docker)
BuildRequires:  golang(github.com/containerd/containerd/runtime/linux/runctypes)
BuildRequires:  golang(github.com/containerd/containerd/runtime/v1/linux)
BuildRequires:  golang(github.com/containerd/containerd/services)
BuildRequires:  golang(github.com/containerd/containerd/services/containers)
BuildRequires:  golang(github.com/containerd/containerd/services/content)
BuildRequires:  golang(github.com/containerd/containerd/services/diff)
BuildRequires:  golang(github.com/containerd/containerd/services/events)
BuildRequires:  golang(github.com/containerd/containerd/services/healthcheck)
BuildRequires:  golang(github.com/containerd/containerd/services/images)
BuildRequires:  golang(github.com/containerd/containerd/services/introspection)
BuildRequires:  golang(github.com/containerd/containerd/services/leases)
BuildRequires:  golang(github.com/containerd/containerd/services/namespaces)
BuildRequires:  golang(github.com/containerd/containerd/services/snapshots)
BuildRequires:  golang(github.com/containerd/containerd/services/tasks)
BuildRequires:  golang(github.com/containerd/containerd/services/version)
BuildRequires:  golang(github.com/containerd/containerd/snapshots)
BuildRequires:  golang(github.com/containerd/containerd/snapshots/overlay)
BuildRequires:  golang(github.com/containerd/containerd/version)
BuildRequires:  golang(github.com/containerd/continuity/fs)
BuildRequires:  golang(github.com/containerd/fifo)
BuildRequires:  golang(github.com/containerd/go-cni)
BuildRequires:  golang(github.com/containerd/typeurl)
BuildRequires:  golang(github.com/containernetworking/plugins/pkg/ns)
BuildRequires:  golang(github.com/davecgh/go-spew/spew)
BuildRequires:  golang(github.com/docker/distribution/digestset)
BuildRequires:  golang(github.com/docker/distribution/reference)
BuildRequires:  golang(github.com/docker/docker/pkg/ioutils)
BuildRequires:  golang(github.com/docker/docker/pkg/signal)
BuildRequires:  golang(github.com/docker/docker/pkg/stringid)
BuildRequires:  golang(github.com/docker/docker/pkg/symlink)
BuildRequires:  golang(github.com/docker/docker/pkg/system)
BuildRequires:  golang(github.com/docker/docker/pkg/truncindex)
BuildRequires:  golang(github.com/gogo/protobuf/gogoproto)
BuildRequires:  golang(github.com/gogo/protobuf/proto)
BuildRequires:  golang(github.com/gogo/protobuf/types)
BuildRequires:  golang(github.com/opencontainers/go-digest)
BuildRequires:  golang(github.com/opencontainers/image-spec/identity)
BuildRequires:  golang(github.com/opencontainers/image-spec/specs-go)
BuildRequires:  golang(github.com/opencontainers/image-spec/specs-go/v1)
BuildRequires:  golang(github.com/opencontainers/runc/libcontainer/apparmor)
BuildRequires:  golang(github.com/opencontainers/runc/libcontainer/devices)
BuildRequires:  golang(github.com/opencontainers/runc/libcontainer/seccomp)
BuildRequires:  golang(github.com/opencontainers/runtime-spec/specs-go)
BuildRequires:  golang(github.com/opencontainers/runtime-tools/generate)
BuildRequires:  golang(github.com/opencontainers/runtime-tools/validate)
BuildRequires:  golang(github.com/opencontainers/selinux/go-selinux)
BuildRequires:  golang(github.com/opencontainers/selinux/go-selinux/label)
BuildRequires:  golang(github.com/pkg/errors)
BuildRequires:  golang(github.com/sirupsen/logrus)
BuildRequires:  golang(github.com/syndtr/gocapability/capability)
BuildRequires:  golang(github.com/urfave/cli)
BuildRequires:  golang(golang.org/x/net/context)
BuildRequires:  golang(golang.org/x/sys/unix)
BuildRequires:  golang(google.golang.org/grpc)
BuildRequires:  golang(k8s.io/apimachinery/pkg/util/clock)
BuildRequires:  golang(k8s.io/apimachinery/pkg/util/net)
BuildRequires:  golang(k8s.io/apimachinery/pkg/util/runtime)
BuildRequires:  golang(k8s.io/client-go/tools/remotecommand)
BuildRequires:  golang(k8s.io/client-go/util/cert)
BuildRequires:  golang(k8s.io/cri-api/pkg/apis)
BuildRequires:  golang(k8s.io/cri-api/pkg/apis/runtime/v1alpha2)
BuildRequires:  golang(k8s.io/kubernetes/pkg/kubelet/remote)
BuildRequires:  golang(k8s.io/kubernetes/pkg/kubelet/server/streaming)
BuildRequires:  golang(k8s.io/kubernetes/pkg/kubelet/util)
BuildRequires:  golang(k8s.io/utils/exec)

%if %{with check}
# Tests
BuildRequires:  golang(github.com/golang/protobuf/proto)
BuildRequires:  golang(github.com/stretchr/testify/assert)
BuildRequires:  golang(github.com/stretchr/testify/require)
%endif

%description
%{common_description}

%gopkg

%prep
%goprep
%autopatch -p1
rm -rf cmd
find . -name "*.go" -exec sed -i "s|k8s.io/kubernetes/pkg/kubelet/apis/cri|k8s.io/cri-api/pkg/apis|" "{}" +;

%install
%gopkginstall

%if %{with check}
%check
# integration: needs network
%gocheck -d integration -d pkg/server
%endif

%gopkgfiles

%changelog
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.1-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Wed Jul 10 00:57:58 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1.11.1-3
- Fix previous patch

* Wed Jul 10 00:34:13 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1.11.1-2
- Add patch to use newer opencontainers/selinux

* Wed May 01 16:42:39 CEST 2019 Robert-André Mauchin <zebob.m@gmail.com> - 1.11.1-1
- Initial package