mirror of
https://abf.rosa.ru/djam/docker-containerd.git
synced 2025-02-23 14:22:50 +00:00
Updated to 1.3.0
This commit is contained in:
parent
dc7793259e
commit
2be8f3f54a
5 changed files with 78 additions and 91 deletions
2
.abf.yml
2
.abf.yml
|
@ -1,2 +1,2 @@
|
||||||
sources:
|
sources:
|
||||||
containerd-1.2.8.tar.gz: bf6c043ed0ec6c5317eec7232cd690070e9aa87f
|
containerd-1.3.0.tar.gz: ec755fe333f1b2b11976399b90096f2a3fdb0559
|
||||||
|
|
13
containerd.service
Normal file
13
containerd.service
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[Unit]
|
||||||
|
Description=containerd container runtime
|
||||||
|
Documentation=https://containerd.io
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStartPre=/sbin/modprobe overlay
|
||||||
|
ExecStart=/usr/bin/containerd
|
||||||
|
Delegate=yes
|
||||||
|
KillMode=process
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
15
containerd.toml
Normal file
15
containerd.toml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
#root = "/var/lib/containerd"
|
||||||
|
#state = "/run/containerd"
|
||||||
|
#subreaper = true
|
||||||
|
#oom_score = 0
|
||||||
|
|
||||||
|
#[grpc]
|
||||||
|
# address = "/run/containerd/containerd.sock"
|
||||||
|
# uid = 0
|
||||||
|
# gid = 0
|
||||||
|
|
||||||
|
#[debug]
|
||||||
|
# address = "/run/containerd/debug.sock"
|
||||||
|
# uid = 0
|
||||||
|
# gid = 0
|
||||||
|
# level = "info"
|
|
@ -1,16 +1,31 @@
|
||||||
%define debug_package %{nil}
|
%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
|
%define oname containerd
|
||||||
|
|
||||||
Summary: A daemon to control runC
|
Summary: A daemon to control runC
|
||||||
Name: docker-containerd
|
Name: docker-containerd
|
||||||
Version: 1.2.8
|
Version: 1.3.0
|
||||||
Release: 2
|
Release: 1
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
Group: System/Kernel and hardware
|
Group: System/Kernel and hardware
|
||||||
Url: http://www.docker.com
|
Url: http://www.docker.com
|
||||||
Source0: https://github.com/containerd/containerd/archive/v%{version}.tar.gz?/%{oname}-%{version}.tar.gz
|
%global commit 9754871865f7fe2f4e74d43e2fc7ccd237edcbce
|
||||||
Patch0: fix-run-docker-containerd-path.patch
|
%global tag v%{version}
|
||||||
|
Source0: https://github.com/containerd/containerd/archive/%{tag}.tar.gz?/%{oname}-%{version}.tar.gz
|
||||||
|
Source1: containerd.service
|
||||||
|
Source2: containerd.toml
|
||||||
BuildRequires: glibc-static-devel
|
BuildRequires: glibc-static-devel
|
||||||
BuildRequires: golang
|
BuildRequires: golang
|
||||||
BuildRequires: btrfs-devel
|
BuildRequires: btrfs-devel
|
||||||
|
@ -28,38 +43,44 @@ of containers.
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%doc *.md LICENSE NOTICE
|
%doc *.md LICENSE NOTICE
|
||||||
%{_bindir}/*
|
%{_bindir}/containerd
|
||||||
%{_presetdir}/86-%{oname}.preset
|
%{_bindir}/containerd-shim
|
||||||
%{_unitdir}/%{oname}.service
|
%{_bindir}/docker-containerd
|
||||||
|
%{_bindir}/docker-containerd-shim
|
||||||
|
%{_bindir}/ctr
|
||||||
|
%{_unitdir}/containerd.service
|
||||||
|
%dir %{_sysconfdir}/containerd
|
||||||
|
%config(noreplace) %{_sysconfdir}/containerd/config.toml
|
||||||
|
|
||||||
#------------------------------------------------------------------
|
#------------------------------------------------------------------
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -qn %{oname}-%{version}
|
%setup -qn %{oname}-%{version}
|
||||||
%patch0 -p1
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mv vendor src
|
mkdir -p src/%(dirname %{import_path})
|
||||||
ln -s $(pwd) src/github.com/%{oname}/%{oname}
|
ln -s ../../.. src/%{import_path}
|
||||||
export GOPATH=$(pwd)
|
export GOPATH=$(pwd):%{_libdir}/golang
|
||||||
%make
|
export LDFLAGS="-X %{import_path}/version.Package=%{import_path} -X %{import_path}/version.Version=%{tag} -X %{import_path}/version.Revision=%{commit}"
|
||||||
|
go build -o bin/containerd %{import_path}/cmd/containerd
|
||||||
|
go build -o bin/containerd-shim %{import_path}/cmd/containerd-shim
|
||||||
|
go build -o bin/ctr %{import_path}/cmd/ctr
|
||||||
|
|
||||||
%install
|
%install
|
||||||
# install binary
|
install -D -m 0755 bin/containerd %{buildroot}%{_bindir}/containerd
|
||||||
install -d %{buildroot}%{_bindir}
|
install -D -m 0755 bin/containerd-shim %{buildroot}%{_bindir}/containerd-shim
|
||||||
install -p -m 755 bin/* %{buildroot}%{_bindir}
|
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
|
||||||
|
|
||||||
# install systemd/init scripts
|
ln -s containerd %{buildroot}%{_bindir}/docker-containerd
|
||||||
install -d %{buildroot}%{_unitdir}
|
ln -s containerd-shim %{buildroot}%{_bindir}/docker-containerd-shim
|
||||||
sed -e 's,/usr/local,%{_prefix},g' %{oname}.service > %{buildroot}%{_unitdir}/%{oname}.service
|
|
||||||
|
|
||||||
install -d %{buildroot}%{_presetdir}
|
%post
|
||||||
cat > %{buildroot}%{_presetdir}/86-%{oname}.preset << EOF
|
%systemd_post containerd.service
|
||||||
enable %{oname}.service
|
|
||||||
EOF
|
|
||||||
|
|
||||||
# Docker expects stuff to be named its way...
|
%preun
|
||||||
cd %{buildroot}%{_bindir}
|
%systemd_preun containerd.service
|
||||||
for i in *; do
|
|
||||||
ln -sf $i docker-$i
|
%postun
|
||||||
done
|
%systemd_postun_with_restart containerd.service
|
||||||
|
|
|
@ -1,62 +0,0 @@
|
||||||
Index: containerd-1.2.6/client_unix_test.go
|
|
||||||
===================================================================
|
|
||||||
--- containerd-1.2.6/client_unix_test.go
|
|
||||||
+++ containerd-1.2.6/client_unix_test.go 2019-05-05 19:07:43.625687652 +0200
|
|
||||||
@@ -24,8 +24,8 @@
|
|
||||||
|
|
||||||
const (
|
|
||||||
defaultRoot = "/var/lib/containerd-test"
|
|
||||||
- defaultState = "/run/containerd-test"
|
|
||||||
- defaultAddress = "/run/containerd-test/containerd.sock"
|
|
||||||
+ defaultState = "/run/docker/libcontainerd-test"
|
|
||||||
+ defaultAddress = "/run/docker/libcontainerd-test/containerd.sock"
|
|
||||||
)
|
|
||||||
|
|
||||||
var (
|
|
||||||
Index: containerd-1.2.6/releases/v1.0.0-rc.0.toml
|
|
||||||
===================================================================
|
|
||||||
--- containerd-1.2.6/releases/v1.0.0-rc.0.toml
|
|
||||||
+++ containerd-1.2.6/releases/v1.0.0-rc.0.toml 2019-05-05 19:09:22.725066455 +0200
|
|
||||||
@@ -45,7 +45,7 @@
|
|
||||||
Memory improvements over beta 2...
|
|
||||||
```
|
|
||||||
RSS CMD
|
|
||||||
- 3644 containerd-shim -namespace default -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/default/test10 -address /run/containerd/containerd.sock -containerd-binary /usr/local/bin/containerd -debug
|
|
||||||
+ 3644 containerd-shim -namespace default -workdir /var/lib/containerd/io.containerd.runtime.v1.linux/default/test10 -address /run/docker/libcontainerd/containerd.sock -containerd-binary /usr/local/bin/containerd -debug
|
|
||||||
15320 docker-containerd-shim --namespace moby --workdir /var/lib/docker/containerd/daemon/io.containerd.runtime.v1.linux/moby/ffa219303c1419b179393a1123f176bb4268337432b0ca7945bc7ac66db73cad --address /var/run/docker/containerd/docker-containerd.sock --runtime-root /var/run/docker/
|
|
||||||
```
|
|
||||||
|
|
||||||
Index: containerd-1.2.6/defaults/defaults_unix.go
|
|
||||||
===================================================================
|
|
||||||
--- containerd-1.2.6/defaults/defaults_unix.go
|
|
||||||
+++ containerd-1.2.6/defaults/defaults_unix.go 2019-05-05 19:06:51.858012156 +0200
|
|
||||||
@@ -24,12 +24,12 @@
|
|
||||||
DefaultRootDir = "/var/lib/containerd"
|
|
||||||
// DefaultStateDir is the default location used by containerd to store
|
|
||||||
// transient data
|
|
||||||
- DefaultStateDir = "/run/containerd"
|
|
||||||
+ DefaultStateDir = "/run/docker/libcontainerd"
|
|
||||||
// DefaultAddress is the default unix socket address
|
|
||||||
- DefaultAddress = "/run/containerd/containerd.sock"
|
|
||||||
+ DefaultAddress = "/run/docker/libcontainerd/containerd.sock"
|
|
||||||
// DefaultDebugAddress is the default unix socket address for pprof data
|
|
||||||
- DefaultDebugAddress = "/run/containerd/debug.sock"
|
|
||||||
+ DefaultDebugAddress = "/run/docker/libcontainerd/debug.sock"
|
|
||||||
// DefaultFIFODir is the default location used by client-side cio library
|
|
||||||
// to store FIFOs.
|
|
||||||
- DefaultFIFODir = "/run/containerd/fifo"
|
|
||||||
+ DefaultFIFODir = "/run/docker/libcontainerd/fifo"
|
|
||||||
)
|
|
||||||
Index: containerd-1.2.6/runtime/v1/linux/proc/process.go
|
|
||||||
===================================================================
|
|
||||||
--- containerd-1.2.6/runtime/v1/linux/proc/process.go
|
|
||||||
+++ containerd-1.2.6/runtime/v1/linux/proc/process.go 2019-05-05 19:08:28.213408157 +0200
|
|
||||||
@@ -23,7 +23,7 @@
|
|
||||||
)
|
|
||||||
|
|
||||||
// RuncRoot is the path to the root runc state directory
|
|
||||||
-const RuncRoot = "/run/containerd/runc"
|
|
||||||
+const RuncRoot = "/run/docker/libcontainerd/runc"
|
|
||||||
|
|
||||||
func stateName(v interface{}) string {
|
|
||||||
switch v.(type) {
|
|
Loading…
Add table
Reference in a new issue