2019-10-10 17:19:05 +03:00
|
|
|
%bcond_with debug
|
|
|
|
|
|
|
|
%if %{with debug}
|
|
|
|
%global _dwz_low_mem_die_limit 0
|
|
|
|
%else
|
|
|
|
%global debug_package %{nil}
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if ! 0%{?gobuild:1}
|
|
|
|
%define gobuild(o:) go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x %{?**};
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%global import_path github.com/containerd/containerd
|
2019-04-04 10:36:11 +00:00
|
|
|
|
2019-09-05 10:57:58 +03:00
|
|
|
%define oname containerd
|
|
|
|
|
|
|
|
Summary: A daemon to control runC
|
|
|
|
Name: docker-containerd
|
2025-02-10 22:00:28 +00:00
|
|
|
Version: 1.7.25
|
2019-10-10 17:19:05 +03:00
|
|
|
Release: 1
|
2019-09-05 10:57:58 +03:00
|
|
|
License: ASL 2.0
|
|
|
|
Group: System/Kernel and hardware
|
2025-02-10 22:00:28 +00:00
|
|
|
URL: https://containerd.io
|
|
|
|
Source0: https://github.com/containerd/containerd/archive/v%{version}.tar.gz?/%{oname}-%{version}.tar.gz
|
2019-10-10 17:19:05 +03:00
|
|
|
Source1: containerd.service
|
|
|
|
Source2: containerd.toml
|
2019-09-05 10:57:58 +03:00
|
|
|
BuildRequires: glibc-static-devel
|
2025-02-10 22:00:28 +00:00
|
|
|
BuildRequires: go
|
2017-09-11 14:29:16 +03:00
|
|
|
BuildRequires: btrfs-devel
|
2019-09-05 10:57:58 +03:00
|
|
|
BuildRequires: pkgconfig(libseccomp)
|
2020-11-27 10:00:45 +00:00
|
|
|
Requires: runc
|
2016-06-17 15:20:11 +03:00
|
|
|
|
|
|
|
%description
|
2017-09-11 14:29:16 +03:00
|
|
|
Containerd is a daemon with an API and a command line client, to manage
|
|
|
|
containers on one machine.
|
2016-06-17 15:20:11 +03:00
|
|
|
|
2017-09-11 14:29:16 +03:00
|
|
|
It uses runC to run containers according to the OCI specification.
|
|
|
|
Containerd has advanced features such as seccomp and user namespace
|
|
|
|
support as well as checkpoint and restore for cloning and live migration
|
|
|
|
of containers.
|
2016-06-17 15:20:11 +03:00
|
|
|
|
2019-09-05 10:57:58 +03:00
|
|
|
%files
|
|
|
|
%doc *.md LICENSE NOTICE
|
2019-10-10 17:19:05 +03:00
|
|
|
%{_bindir}/containerd
|
|
|
|
%{_bindir}/containerd-shim
|
|
|
|
%{_bindir}/docker-containerd
|
|
|
|
%{_bindir}/docker-containerd-shim
|
|
|
|
%{_bindir}/ctr
|
|
|
|
%{_unitdir}/containerd.service
|
|
|
|
%dir %{_sysconfdir}/containerd
|
|
|
|
%config(noreplace) %{_sysconfdir}/containerd/config.toml
|
2016-06-17 15:20:11 +03:00
|
|
|
|
2019-09-05 10:57:58 +03:00
|
|
|
#------------------------------------------------------------------
|
2016-06-17 15:20:11 +03:00
|
|
|
|
2019-09-05 10:57:58 +03:00
|
|
|
%prep
|
|
|
|
%setup -qn %{oname}-%{version}
|
2016-06-17 15:20:11 +03:00
|
|
|
|
2019-09-05 10:57:58 +03:00
|
|
|
%build
|
2025-02-10 22:00:28 +00:00
|
|
|
#mkdir -p src/%(dirname %{import_path})
|
|
|
|
#ln -s ../../.. src/%{import_path}
|
|
|
|
#export GOPATH=$(pwd):%{_libdir}/golang
|
|
|
|
export LDFLAGS="-s w -X %{import_path}/version.Package=%{import_path} -X %{import_path}/version.Version=%{version} -X %{import_path}/version.Revision="
|
|
|
|
go build -o bin/containerd ./cmd/containerd
|
|
|
|
go build -o bin/containerd-shim ./cmd/containerd-shim
|
|
|
|
go build -o bin/ctr ./cmd/ctr
|
2016-06-17 15:20:11 +03:00
|
|
|
|
|
|
|
%install
|
2019-10-10 17:19:05 +03:00
|
|
|
install -D -m 0755 bin/containerd %{buildroot}%{_bindir}/containerd
|
|
|
|
install -D -m 0755 bin/containerd-shim %{buildroot}%{_bindir}/containerd-shim
|
|
|
|
install -D -m 0755 bin/ctr %{buildroot}%{_bindir}/ctr
|
|
|
|
install -D -m 0644 %{SOURCE1} %{buildroot}%{_unitdir}/containerd.service
|
|
|
|
install -D -m 0644 %{SOURCE2} %{buildroot}%{_sysconfdir}/containerd/config.toml
|
|
|
|
|
|
|
|
ln -s containerd %{buildroot}%{_bindir}/docker-containerd
|
|
|
|
ln -s containerd-shim %{buildroot}%{_bindir}/docker-containerd-shim
|
|
|
|
|
|
|
|
%post
|
|
|
|
%systemd_post containerd.service
|
|
|
|
|
|
|
|
%preun
|
|
|
|
%systemd_preun containerd.service
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%systemd_postun_with_restart containerd.service
|