All of lore.kernel.org
 help / color / mirror / Atom feed
From: Romain Naour <romain.naour@smile.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v3 2/8] dumb-init: new package
Date: Sat, 31 Mar 2018 17:42:24 +0200	[thread overview]
Message-ID: <8e3b124c-2961-bd82-f788-9c94eddb84ab@smile.fr> (raw)
In-Reply-To: <20180304004346.331-3-christian@paral.in>

Hi Christian,

Le 04/03/2018 ? 01:43, Christian Stewart a ?crit?:
> dumb-init is a minimal init process to act as PID 1 for containers.
> 
> Static compilation is used, as dumb-init will typically be executed inside a
> container.
> 
> dumb-init can satisfy docker-engine's docker-init requirement.
> 
> Signed-off-by: Christian Stewart <christian@paral.in>
> 
> ---
> 
> Changes since v1:
> 
>  - Upgraded to v1.2.1
>  - Added license hash
> ---
>  package/Config.in                |  1 +
>  package/dumb-init/Config.in      |  7 +++++++
>  package/dumb-init/dumb-init.hash |  3 +++
>  package/dumb-init/dumb-init.mk   | 24 ++++++++++++++++++++++++
>  4 files changed, 35 insertions(+)
>  create mode 100644 package/dumb-init/Config.in
>  create mode 100644 package/dumb-init/dumb-init.hash
>  create mode 100644 package/dumb-init/dumb-init.mk
> 
> diff --git a/package/Config.in b/package/Config.in
> index 5bdaa24340..dd42db79ec 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1906,6 +1906,7 @@ comment "Utilities"
>  	source "package/crudini/Config.in"
>  	source "package/dialog/Config.in"
>  	source "package/dtach/Config.in"
> +	source "package/dumb-init/Config.in"
>  	source "package/easy-rsa/Config.in"
>  	source "package/file/Config.in"
>  	source "package/gnupg/Config.in"
> diff --git a/package/dumb-init/Config.in b/package/dumb-init/Config.in
> new file mode 100644
> index 0000000000..e817493605
> --- /dev/null
> +++ b/package/dumb-init/Config.in
> @@ -0,0 +1,7 @@
> +config BR2_PACKAGE_DUMB_INIT

The code use fork(), so a depends on BR2_USE_MMU must be added here.

> +	bool "dumb-init"
> +	help
> +	  dumb-init is a simple but valid init binary to
> +	  act as PID 1 for containers.
> +
> +	  https://github.com/Yelp/dumb-init
> diff --git a/package/dumb-init/dumb-init.hash b/package/dumb-init/dumb-init.hash
> new file mode 100644
> index 0000000000..9e74ff5580
> --- /dev/null
> +++ b/package/dumb-init/dumb-init.hash
> @@ -0,0 +1,3 @@
> +# Locally computed
> +sha256	56858088d9d6c911c227d196fcbfca06aff31fbe83e1519f9cabe5cf6f11b242	dumb-init-v1.2.1.tar.gz
> +sha256	4d74123f166ad8f147e9939bfb451578db84823f22b48fd64b1086d3654a0149  LICENSE
> diff --git a/package/dumb-init/dumb-init.mk b/package/dumb-init/dumb-init.mk
> new file mode 100644
> index 0000000000..4ebbff1930
> --- /dev/null
> +++ b/package/dumb-init/dumb-init.mk
> @@ -0,0 +1,24 @@
> +################################################################################
> +#
> +# dumb-init
> +#
> +################################################################################
> +
> +DUMB_INIT_VERSION = v1.2.1
> +DUMB_INIT_SITE = $(call github,Yelp,dumb-init,$(DUMB_INIT_VERSION))
> +
> +DUMB_INIT_LICENSE = MIT
> +DUMB_INIT_LICENSE_FILES = LICENSE
> +DUMB_INIT_CFLAGS += -static

Why you need to add -static ?
Also $(TARGET_CFLAGS) may be used here.

Best regards,
Romain

> +
> +define DUMB_INIT_BUILD_CMDS
> +	$(TARGET_CC) \
> +		$(DUMB_INIT_CFLAGS) \
> +		-o $(@D)/dumb-init $(@D)/dumb-init.c
> +endef
> +
> +define DUMB_INIT_INSTALL_TARGET_CMDS
> +	$(INSTALL) -D -m 0755 $(@D)/dumb-init $(TARGET_DIR)/usr/bin/dumb-init
> +endef
> +
> +$(eval $(generic-package))
> 

  reply	other threads:[~2018-03-31 15:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-04  0:43 [Buildroot] [PATCH v3 0/8] upgrade docker-engine and associated components Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 1/8] tini: new package Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 2/8] dumb-init: " Christian Stewart
2018-03-31 15:42   ` Romain Naour [this message]
2018-03-31 17:42     ` Christian Stewart
2018-04-01 12:43   ` Thomas Petazzoni
2018-04-06 21:50     ` Christian Stewart
2018-04-07  6:20       ` Thomas Petazzoni
2018-04-10 16:24         ` Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 3/8] docker-engine: add support for init processes Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 4/8] docker-proxy: new package Christian Stewart
2018-03-11 21:34   ` Peter Korsgaard
2018-03-04  0:43 ` [Buildroot] [PATCH v3 5/8] docker-engine: add dependency on docker-proxy Christian Stewart
2018-03-11 21:35   ` Peter Korsgaard
2018-03-04  0:43 ` [Buildroot] [PATCH v3 6/8] runc: bump to 9f9c96235cc Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 7/8] docker-containerd: bump to v1.0.2 Christian Stewart
2018-03-04  0:43 ` [Buildroot] [PATCH v3 8/8] docker-engine: bump to v18.03.0-ce-rc1 Christian Stewart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8e3b124c-2961-bd82-f788-9c94eddb84ab@smile.fr \
    --to=romain.naour@smile.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.