tini: add version 0.18.0 as docker-init provider

This removes the warning that docker can't find docker-init
in PATH.

This recipe is based on the recipe from meta-resin.

Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
This commit is contained in:
Pascal Bach 2018-05-30 11:17:59 +02:00 committed by Bruce Ashfield
parent 33eb70520a
commit 4987f02577
3 changed files with 61 additions and 1 deletions

View File

@ -74,7 +74,7 @@ RDEPENDS_${PN} = "util-linux iptables \
"
RDEPENDS_${PN} += "virtual/containerd virtual/runc"
RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat"
RRECOMMENDS_${PN} = "kernel-module-dm-thin-pool kernel-module-nf-nat docker-init"
RSUGGESTS_${PN} = "lxc rt-tests"
DOCKER_PKG="github.com/docker/docker"

View File

@ -0,0 +1,28 @@
From b99ef9954a34cffd85a5cc09922b201ae11b494d Mon Sep 17 00:00:00 2001
From: Theodor Gherzan <theodor@resin.io>
Date: Mon, 5 Jun 2017 18:16:56 +0200
Subject: [PATCH] Do not strip the output binary, allow yocto to do this
Upstream-Status: Inappropriate [configuration specific]
Signed-off-by: Theodor Gherzan <theodor@resin.io>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b5b93ba..c2907e2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,7 +54,7 @@ if(NOT HAS_BUILTIN_FORTIFY)
endif()
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu99 -Werror -Wextra -Wall -pedantic-errors -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat")
-set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-s")
+set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-Bsymbolic-functions -Wl,-z,relro")
# Build
--
2.7.4

View File

@ -0,0 +1,32 @@
HOMEPAGE = "http://github.com/krallin/tini"
SUMMARY = "Minimal init for containers"
DESCRIPTION = "Tini is the simplest init you could think of. All Tini does is \
spawn a single child (Tini is meant to be run in a container), and wait for \
it to exit all the while reaping zombies and performing signal forwarding. "
SRCREV = "fec3683b971d9c3ef73f284f176672c44b448662"
SRC_URI = " \
git://github.com/krallin/tini.git \
file://0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch \
"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=ffc9091894702bc5dcf4cc0085561ef5"
S = "${WORKDIR}/git"
BBCLASSEXTEND = "native"
# tini links with -static, so no PIE for us
SECURITY_CFLAGS_pn-${PN} = "${SECURITY_NO_PIE_CFLAGS}"
inherit cmake
do_install() {
mkdir -p ${D}/${bindir}
install -m 0755 ${B}/tini-static ${D}/${bindir}/docker-init
}
# Tini is the currently the provider for docker-init
PROVIDES += "docker-init"
RPROVIDES_${PN} = "docker-init"