From 4987f02577432e518e627c2c139c378b8b6a9678 Mon Sep 17 00:00:00 2001 From: Pascal Bach Date: Wed, 30 May 2018 11:17:59 +0200 Subject: 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 Signed-off-by: Bruce Ashfield --- recipes-containers/docker/docker_git.bb | 2 +- ...p-the-output-binary-allow-yocto-to-do-thi.patch | 28 +++++++++++++++++++ recipes-containers/tini/tini_0.18.0.bb | 32 ++++++++++++++++++++++ 3 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch create mode 100644 recipes-containers/tini/tini_0.18.0.bb diff --git a/recipes-containers/docker/docker_git.bb b/recipes-containers/docker/docker_git.bb index 790170e9..73e01203 100644 --- a/recipes-containers/docker/docker_git.bb +++ b/recipes-containers/docker/docker_git.bb @@ -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" diff --git a/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch b/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch new file mode 100644 index 00000000..6797720c --- /dev/null +++ b/recipes-containers/tini/tini/0001-Do-not-strip-the-output-binary-allow-yocto-to-do-thi.patch @@ -0,0 +1,28 @@ +From b99ef9954a34cffd85a5cc09922b201ae11b494d Mon Sep 17 00:00:00 2001 +From: Theodor Gherzan +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 +--- + 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 + diff --git a/recipes-containers/tini/tini_0.18.0.bb b/recipes-containers/tini/tini_0.18.0.bb new file mode 100644 index 00000000..7c124a89 --- /dev/null +++ b/recipes-containers/tini/tini_0.18.0.bb @@ -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" -- cgit v1.2.3-54-g00ecf