mirror of
https://abf.rosa.ru/djam/docker-containerd.git
synced 2025-02-23 14:22:50 +00:00
84 lines
2.5 KiB
RPMSpec
84 lines
2.5 KiB
RPMSpec
%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
|
|
|
|
%define oname containerd
|
|
|
|
Summary: A daemon to control runC
|
|
Name: docker-containerd
|
|
Version: 1.7.25
|
|
Release: 1
|
|
License: ASL 2.0
|
|
Group: System/Kernel and hardware
|
|
URL: https://containerd.io
|
|
Source0: https://github.com/containerd/containerd/archive/v%{version}.tar.gz?/%{oname}-%{version}.tar.gz
|
|
Source1: containerd.service
|
|
Source2: containerd.toml
|
|
BuildRequires: glibc-static-devel
|
|
BuildRequires: go
|
|
BuildRequires: btrfs-devel
|
|
BuildRequires: pkgconfig(libseccomp)
|
|
Requires: runc
|
|
|
|
%description
|
|
Containerd is a daemon with an API and a command line client, to manage
|
|
containers on one machine.
|
|
|
|
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.
|
|
|
|
%files
|
|
%doc *.md LICENSE NOTICE
|
|
%{_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
|
|
|
|
#------------------------------------------------------------------
|
|
|
|
%prep
|
|
%setup -qn %{oname}-%{version}
|
|
|
|
%build
|
|
#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
|
|
|
|
%install
|
|
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
|