[packages/docker] do not require custom build of tini

glen glen at pld-linux.org
Tue Nov 15 04:31:18 CET 2016


commit 7397034b4379db6eba16cea06821c04d9027fbe0
Author: Elan Ruusamäe <glen at delfi.ee>
Date:   Tue Nov 15 05:30:34 2016 +0200

    do not require custom build of tini

 docker.spec     |  6 ++++--
 init-args.patch | 28 ++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)
---
diff --git a/docker.spec b/docker.spec
index 60070ee..dddb498 100644
--- a/docker.spec
+++ b/docker.spec
@@ -17,7 +17,7 @@
 Summary:	Docker: the open-source application container engine
 Name:		docker
 Version:	1.13.0
-Release:	0.3
+Release:	0.5
 License:	Apache v2.0
 Group:		Applications/System
 # https://github.com/docker/docker/releases
@@ -35,6 +35,7 @@ Source5:	%{name}d.sh
 Source7:	%{name}.init
 Source8:	%{name}.sysconfig
 Patch0:		systemd.patch
+Patch1:		init-args.patch
 URL:		http://www.docker.com/
 BuildRequires:	btrfs-progs-devel >= 3.16.1
 BuildRequires:	cmake
@@ -145,6 +146,7 @@ mv containerd-%{containerd_commit}* containerd
 mv libnetwork-%{libnetwork_commit}* libnetwork
 mv tini-* tini
 %patch0 -p1
+%patch1 -p1
 
 install -d vendor/src/github.com/docker
 ln -s $(pwd) vendor/src/github.com/docker/docker
@@ -174,7 +176,7 @@ go build -ldflags="$PROXY_LDFLAGS" \
 
 # build docker-init
 cd tini
-cmake -DMINIMAL=ON .
+cmake .
 %{__make}
 cd ..
 
diff --git a/init-args.patch b/init-args.patch
new file mode 100644
index 0000000..18bd5c8
--- /dev/null
+++ b/init-args.patch
@@ -0,0 +1,28 @@
+
+do not require custom build of tini
+
+https://github.com/krallin/tini/issues/55#issuecomment-260507562
+
+host# docker run --init --rm -it glen/pld bash -l
+bash-4.4# /dev/init -- sh -c 'echo "kala" "maja"; cat /proc/$$/cmdline|tr "\0" "\n">cmdline'
+[WARN  tini (39)] Tini is not running as PID 1 and isn't registered as a child subreaper.
+Zombie processes will not be re-parented to Tini, so zombie reaping won't work.
+To fix the problem, use the -s option or set the environment variable TINI_SUBREAPER to register Tini as a child subreaper, or run Tini as PID 1.
+kala maja
+bash-4.4# cat cmdline
+sh
+-c
+echo "kala" "maja"; cat /proc/$$/cmdline|tr "\0" "\n">cmdline
+bash-4.4#
+
+--- docker-1.13.0-rc1/daemon/oci_linux.go~	2016-11-11 12:27:33.000000000 +0200
++++ docker-1.13.0-rc1/daemon/oci_linux.go	2016-11-15 02:42:25.660635864 +0200
+@@ -593,7 +593,7 @@
+ 	if c.HostConfig.PidMode.IsPrivate() {
+ 		if (c.HostConfig.Init != nil && *c.HostConfig.Init) ||
+ 			(c.HostConfig.Init == nil && daemon.configStore.Init) {
+-			s.Process.Args = append([]string{"/dev/init", c.Path}, c.Args...)
++			s.Process.Args = append([]string{"/dev/init", "--", c.Path}, c.Args...)
+ 			var path string
+ 			if daemon.configStore.InitPath == "" && c.HostConfig.InitPath == "" {
+ 				path, err = exec.LookPath(DefaultInitBinary)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/docker.git/commitdiff/7397034b4379db6eba16cea06821c04d9027fbe0



More information about the pld-cvs-commit mailing list