[{"id":1773111,"web_url":"http://patchwork.ozlabs.org/comment/1773111/","msgid":"<afa4f137-1ef8-6257-64ca-5ffc4b0f4d6c@mind.be>","list_archive_url":null,"date":"2017-09-21T21:23:09","subject":"Re: [Buildroot] [PATCH 1/9] dumb-init: new package","submitter":{"id":11809,"url":"http://patchwork.ozlabs.org/api/people/11809/","name":"Arnout Vandecappelle","email":"arnout@mind.be"},"content":"On 20-09-17 05:02, Christian Stewart wrote:\n> dumb-init is a minimal init process to act as PID 1 for containers.\n> \n> dumb-init can be used to satisfy docker-engine's docker-init binary\n> requirement.\n> \n> In many cases docker-init backing processes like dumb-init must be static, as\n> they are executed inside a container in an unknown environment.\n\n I really don't understand this requirement. The container is supposed to\ncontain this dumb-init executable as well as the rest of the Buildroot-generated\nfilesystem, right? So all required libs + dynamic loader will be there. Why does\nit need to be static, then? Is it going to be executed outside of the container?\n\n For docker-client, I can understand, because there the point is that\ndocker-engine runs outside of the container while within the container you have\nsome other OS, and docker-client is supposed to run inside the container as well.\n\n So please improve your explanation :-) Also, add it to the help text, so that\nthe user gets an idea why they would want to enable the option.\n\n> This\n> patch includes an option to specifically compile dumb-init statically, even if\n> the system is compiled dynamically.\n> \n> Signed-off-by: Christian Stewart <christian@paral.in>\n\n[snip]\n> diff --git a/package/dumb-init/Config.in b/package/dumb-init/Config.in\n> new file mode 100644\n> index 0000000000..aaad119a15\n> --- /dev/null\n> +++ b/package/dumb-init/Config.in\n> @@ -0,0 +1,16 @@\n> +config BR2_PACKAGE_DUMB_INIT\n> +\tbool \"dumb-init\"\n> +\thelp\n> +\t  dumb-init is a simple but valid init binary to\n> +\t  act as PID 1 for containers.\n\n Please wrap at 72 columns, not less.\n\n> +\n> +\t  https://github.com/Yelp/dumb-init\n> +\n> +if BR2_PACKAGE_DUMB_INIT\n> +\n> +config BR2_PACKAGE_DUMB_INIT_STATIC\n> +\tbool \"build static\"\n> +\thelp\n> +\t  Enables static compilation for dumb-init.\n> +\n> +endif\n> diff --git a/package/dumb-init/dumb-init.hash b/package/dumb-init/dumb-init.hash\n> new file mode 100644\n> index 0000000000..4705ce4368\n> --- /dev/null\n> +++ b/package/dumb-init/dumb-init.hash\n> @@ -0,0 +1,2 @@\n> +# Locally computed\n> +sha256\t74486997321bd939cad2ee6af030f481d39751bc9aa0ece84ed55f864e309a3f\tv1.2.0.tar.gz\n> diff --git a/package/dumb-init/dumb-init.mk b/package/dumb-init/dumb-init.mk\n> new file mode 100644\n> index 0000000000..cc24ffafa1\n> --- /dev/null\n> +++ b/package/dumb-init/dumb-init.mk\n> @@ -0,0 +1,27 @@\n> +################################################################################\n> +#\n> +# dumb-init\n> +#\n> +################################################################################\n> +\n> +DUMB_INIT_VERSION = v1.2.0\n> +DUMB_INIT_SITE = https://github.com/Yelp/dumb-init/archive\n> +DUMB_INIT_SOURCE = $(DUMB_INIT_VERSION).tar.gz\n> +DUMB_INIT_LICENSE = MIT\n> +DUMB_INIT_LICENSE_FILES = LICENSE\n> +\n> +ifeq ($(BR2_PACKAGE_DUMB_INIT_STATIC),y)\n> +DUMB_INIT_CFLAGS += -static\n> +endif\n> +\n> +define DUMB_INIT_BUILD_CMDS\n> +\t$(TARGET_CC) \\\n> +\t\t$(DUMB_INIT_CFLAGS) \\\n\n You also have to pass TARGET_CFLAGS and TARGET_LDFLAGS. Probably the easiest is\nto collect those in DUMB_INIT_CFLAGS as well. Well, that's assuming you don't\nremove that option :-)\n\n Regards,\n Arnout\n\n> +\t\t-o $(@D)/dumb-init $(@D)/dumb-init.c\n> +endef\n> +\n> +define DUMB_INIT_INSTALL_TARGET_CMDS\n> +\t$(INSTALL) -D -m 0755 $(@D)/dumb-init $(TARGET_DIR)/usr/bin/dumb-init\n> +endef\n> +\n> +$(eval $(generic-package))\n>","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.137; helo=fraxinus.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","Received":["from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xyqNF58MSz9s7f\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 07:23:25 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id C31C588CB7;\n\tThu, 21 Sep 2017 21:23:23 +0000 (UTC)","from fraxinus.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id sxXGoEYMCIU3; Thu, 21 Sep 2017 21:23:23 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby fraxinus.osuosl.org (Postfix) with ESMTP id 0E2B588C8C;\n\tThu, 21 Sep 2017 21:23:23 +0000 (UTC)","from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138])\n\tby ash.osuosl.org (Postfix) with ESMTP id 739A31CEBC4\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 21 Sep 2017 21:23:21 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 6D74B89AA7\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 21 Sep 2017 21:23:21 +0000 (UTC)","from whitealder.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id BABdFOifejDb for <buildroot@lists.busybox.net>;\n\tThu, 21 Sep 2017 21:23:20 +0000 (UTC)","from exchange.essensium.com (220.77.144.195.ipv4.evonet.be\n\t[195.144.77.220])\n\tby whitealder.osuosl.org (Postfix) with ESMTP id 53E4B899F3\n\tfor <buildroot@buildroot.org>; Thu, 21 Sep 2017 21:23:20 +0000 (UTC)","from [10.8.0.14] (10.3.7.11) by beleexch01.local.ess-mail.com\n\t(10.3.7.8) with Microsoft SMTP Server (TLS) id 15.0.847.32;\n\tThu, 21 Sep 2017 23:23:12 +0200"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","To":"Christian Stewart <christian@paral.in>, <buildroot@buildroot.org>","References":"<20170920030210.19446-1-christian@paral.in>\n\t<20170920030210.19446-2-christian@paral.in>","From":"Arnout Vandecappelle <arnout@mind.be>","Organization":"Essensium/Mind","Message-ID":"<afa4f137-1ef8-6257-64ca-5ffc4b0f4d6c@mind.be>","Date":"Thu, 21 Sep 2017 23:23:09 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.3.0","MIME-Version":"1.0","In-Reply-To":"<20170920030210.19446-2-christian@paral.in>","Content-Language":"en-GB","X-Originating-IP":"[10.3.7.11]","X-ClientProxiedBy":"beleexch01.local.ess-mail.com (10.3.7.8) To\n\tbeleexch01.local.ess-mail.com (10.3.7.8)","Cc":"thomas.petazzoni@free-electrons.com, geoff@infradead.org","Subject":"Re: [Buildroot] [PATCH 1/9] dumb-init: new package","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}},{"id":1773177,"web_url":"http://patchwork.ozlabs.org/comment/1773177/","msgid":"<CA+h8R2qdgu4DUiWN7fOA22MhuqzdEOdnRN0iDc7_wxfEsVT3uw@mail.gmail.com>","list_archive_url":null,"date":"2017-09-21T23:13:08","subject":"Re: [Buildroot] [PATCH 1/9] dumb-init: new package","submitter":{"id":66856,"url":"http://patchwork.ozlabs.org/api/people/66856/","name":"Christian Stewart","email":"christian@paral.in"},"content":"Hi Arnout,\n\nOn Thu, Sep 21, 2017 at 10:23 PM, Arnout Vandecappelle:\n>  I really don't understand this requirement. The container is supposed to\n> contain this dumb-init executable as well as the rest of the Buildroot-generated\n> filesystem, right? So all required libs + dynamic loader will be there. Why does\n> it need to be static, then? Is it going to be executed outside of the container?\n\nThe container is NOT supposed to contain this. Putting dumb-init and\ntini inside the container was a workaround for when Docker did not\ninit the containers properly with a pid 1 manager. Docker has fixed\nthis \"issue\" by adding the --init option to the run command which uses\nthe provided docker-init binary as the PID 1. It will be executed\nINSIDE the container as the Pid 1, and has no access to the parent\nsystem.\n\n\n>  So please improve your explanation :-) Also, add it to the help text, so that\n> the user gets an idea why they would want to enable the option.\n\nThe option is enabled automatically by docker-engine as a dependency\nbecause it will not work at all without building it statically. The\noption is there so that if you decide for some reason you want tini or\ndumb-init in your target system with the absence of docker, which is\nvalid in some cases where you might be doing a cgroup isolation / jail\n/ other pid 1 situation without Docker and still want the init\nprocess.\n\nChristian","headers":{"Return-Path":"<buildroot-bounces@busybox.net>","X-Original-To":["incoming@patchwork.ozlabs.org","buildroot@lists.busybox.net"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","buildroot@osuosl.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=busybox.net\n\t(client-ip=140.211.166.133; helo=hemlock.osuosl.org;\n\tenvelope-from=buildroot-bounces@busybox.net;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=paral-in.20150623.gappssmtp.com\n\theader.i=@paral-in.20150623.gappssmtp.com header.b=\"0G3juXE8\";\n\tdkim-atps=neutral"],"Received":["from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xysqQ3j6Yz9t2S\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 22 Sep 2017 09:13:38 +1000 (AEST)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 590F48742B;\n\tThu, 21 Sep 2017 23:13:36 +0000 (UTC)","from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id siKultvPLtJS; Thu, 21 Sep 2017 23:13:35 +0000 (UTC)","from ash.osuosl.org (ash.osuosl.org [140.211.166.34])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id 9CBCE86C3C;\n\tThu, 21 Sep 2017 23:13:35 +0000 (UTC)","from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133])\n\tby ash.osuosl.org (Postfix) with ESMTP id 0346A1C0674\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 21 Sep 2017 23:13:34 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n\tby hemlock.osuosl.org (Postfix) with ESMTP id F23AA86C3C\n\tfor <buildroot@lists.busybox.net>;\n\tThu, 21 Sep 2017 23:13:33 +0000 (UTC)","from hemlock.osuosl.org ([127.0.0.1])\n\tby localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024)\n\twith ESMTP id 2FyLA5j8HPSH for <buildroot@lists.busybox.net>;\n\tThu, 21 Sep 2017 23:13:33 +0000 (UTC)","from mail-lf0-f46.google.com (mail-lf0-f46.google.com\n\t[209.85.215.46])\n\tby hemlock.osuosl.org (Postfix) with ESMTPS id 95CE586A68\n\tfor <buildroot@buildroot.org>; Thu, 21 Sep 2017 23:13:32 +0000 (UTC)","by mail-lf0-f46.google.com with SMTP id c80so7179977lfh.0\n\tfor <buildroot@buildroot.org>; Thu, 21 Sep 2017 16:13:32 -0700 (PDT)","from mail-lf0-f48.google.com (mail-lf0-f48.google.com.\n\t[209.85.215.48]) by smtp.gmail.com with ESMTPSA id\n\th18sm407629lfl.19.2017.09.21.16.13.29 for <buildroot@buildroot.org>\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tThu, 21 Sep 2017 16:13:29 -0700 (PDT)","by mail-lf0-f48.google.com with SMTP id b127so7156285lfe.9\n\tfor <buildroot@buildroot.org>; Thu, 21 Sep 2017 16:13:29 -0700 (PDT)","by 10.179.65.186 with HTTP; Thu, 21 Sep 2017 16:13:08 -0700 (PDT)"],"X-Virus-Scanned":["amavisd-new at osuosl.org","amavisd-new at osuosl.org"],"X-Greylist":"from auto-whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=paral-in.20150623.gappssmtp.com; s=20150623;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=RwH9CmNs774Hws4zI2x7BSLn2jopHvaRt1Lsy74/tbc=;\n\tb=0G3juXE8cwTFEytFmYU6Y8ZZVBzoo4+QhTylXMxYg4nt9cFTbL5qypsLxAXetb1nqO\n\tzuJwafnMh9+uUy4ftsiUAR+LyrK6Lzca2hHO16836cBuBTAPnkBYkI4qDTQRYn15htkZ\n\ty+qO0PzrYzylTU/oGoZgIB70RaQ89undUJ6SeIgBJGRh3uF2Lmr5aqTQYVXURGJo9qRf\n\t2kysBW+pqCBEhbObqKYDNGZTgb3pOGL5cMwbikw1dKegVFKrupmcg5T9ghZ+Em6ljjbf\n\t+twtB59iNJNuqrBCfGCrtJMWVURCxl7+/AVeYMM3N2UAyW305mPl4udmiyOwqmj7kcEo\n\t4dPQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=RwH9CmNs774Hws4zI2x7BSLn2jopHvaRt1Lsy74/tbc=;\n\tb=twehe09GbU3NU7JSeEEmCqoweU49rEO7Okw2VQJg5BUQMHewR7itr/Bgay6jayRJL/\n\tMK9hmkpalvFOhQjGgFH4uh/E3V6Z9fjXCYcvn3dlO8cf1aoxSu77R4Bg1M7S1LHWNNyc\n\tE7nw6KtR/neEkHSC7eNoxiYjYE8e7BleM37ARn0wYckctK97kLl6xkpwMLyFjELLAkmD\n\tQiboeGSr3rBYj2JfB5XU7jrp43M703RI2X38ry0lBE8Ftn46GgUlRHJB1tTsBDobcaUy\n\tdCkw+nwSpqtRl+Mo6BVrZNGHbHf8kMS1C8oQKBrlxq4IkUWhq8Ksm4zroKLCBKq5O265\n\t42jw==","X-Gm-Message-State":"AHPjjUhTIu+oYeFPRSVyd6CMus/RRgO5CLdW8jJBA+xnY2xvfYSVxSY1\n\txjzclRlaby3IAVPL5sTbpTPcylig","X-Received":["by 10.25.217.203 with SMTP id s72mr1164423lfi.68.1506035610170; \n\tThu, 21 Sep 2017 16:13:30 -0700 (PDT)","by 10.46.95.131 with SMTP id x3mr1640891lje.94.1506035609133;\n\tThu, 21 Sep 2017 16:13:29 -0700 (PDT)"],"X-Google-Smtp-Source":"AOwi7QBzkWQeJjWTmnh3Ntk8Hy0xysFD/MPQu2ush0yFj3hgEqTrn9RlN8O37ucYNeykSZrlg9B4eejrBC0wlnnxfxU=","MIME-Version":"1.0","In-Reply-To":"<afa4f137-1ef8-6257-64ca-5ffc4b0f4d6c@mind.be>","References":"<20170920030210.19446-1-christian@paral.in>\n\t<20170920030210.19446-2-christian@paral.in>\n\t<afa4f137-1ef8-6257-64ca-5ffc4b0f4d6c@mind.be>","From":"Christian Stewart <christian@paral.in>","Date":"Fri, 22 Sep 2017 00:13:08 +0100","X-Gmail-Original-Message-ID":"<CA+h8R2qdgu4DUiWN7fOA22MhuqzdEOdnRN0iDc7_wxfEsVT3uw@mail.gmail.com>","Message-ID":"<CA+h8R2qdgu4DUiWN7fOA22MhuqzdEOdnRN0iDc7_wxfEsVT3uw@mail.gmail.com>","To":"Arnout Vandecappelle <arnout@mind.be>","Cc":"Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,\n\tGeoff Levand <geoff@infradead.org>,\n\tBuildroot Mailing List <buildroot@buildroot.org>","Subject":"Re: [Buildroot] [PATCH 1/9] dumb-init: new package","X-BeenThere":"buildroot@busybox.net","X-Mailman-Version":"2.1.18-1","Precedence":"list","List-Id":"Discussion and development of buildroot <buildroot.busybox.net>","List-Unsubscribe":"<http://lists.busybox.net/mailman/options/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=unsubscribe>","List-Archive":"<http://lists.busybox.net/pipermail/buildroot/>","List-Post":"<mailto:buildroot@busybox.net>","List-Help":"<mailto:buildroot-request@busybox.net?subject=help>","List-Subscribe":"<http://lists.busybox.net/mailman/listinfo/buildroot>,\n\t<mailto:buildroot-request@busybox.net?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"buildroot-bounces@busybox.net","Sender":"\"buildroot\" <buildroot-bounces@busybox.net>"}}]