From patchwork Thu Oct 19 00:22:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 827886 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=paral-in.20150623.gappssmtp.com header.i=@paral-in.20150623.gappssmtp.com header.b="CCnoR6WC"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yHVFC3lhfz9t6x for ; Thu, 19 Oct 2017 11:30:06 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 8E75E8863A; Thu, 19 Oct 2017 00:30:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UhahwmmYanil; Thu, 19 Oct 2017 00:29:58 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 593D388637; Thu, 19 Oct 2017 00:29:58 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 669891CE75C for ; Thu, 19 Oct 2017 00:29:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 420DF88A0E for ; Thu, 19 Oct 2017 00:29:56 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id F1UeWm5pyFlv for ; Thu, 19 Oct 2017 00:29:55 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-io0-f193.google.com (mail-io0-f193.google.com [209.85.223.193]) by hemlock.osuosl.org (Postfix) with ESMTPS id 383B388A0D for ; Thu, 19 Oct 2017 00:29:55 +0000 (UTC) Received: by mail-io0-f193.google.com with SMTP id p186so8130490ioe.12 for ; Wed, 18 Oct 2017 17:29:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paral-in.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=OIDY5+fulEg6kj2wIbLmeR26CaP0Bq6Dy046B0QDRcM=; b=CCnoR6WCF6K9vdYIvwJNyt/vWC91mhx8zNdd8fqqOd3kI1YA98au8nO3EsGpjGDVik E+uH9R1IJ5pHRdhsO5c9FqP2ld5bjKLhgVmSttlTMRkg9nkuU0OPcxuMpdjJLGzDCXtN q5RapcA2p9zKnzMkhfM4L0NNDvS4LLvEtYXB++84tHS79W2sAO5SW6uSNkN7mo8GY9hY 9K0G+U/DLNh9pQbs1CVON1b24OP3R/LFXKfzM2Xo9NCeKvb8kd/ijvI9Cx24Lx7YzGvI yHsY9iHNy0sIfjF//72HlnU+NZqn+BLt2xWAUJ2wqLNQrJClJbULU004KdSJ5Yw4rOk8 QeMA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=OIDY5+fulEg6kj2wIbLmeR26CaP0Bq6Dy046B0QDRcM=; b=j8hWwXnmPoJQCh8na6ctjCdVCT3H+wxsMdCvmNd/VRuiRRhEYNi8ysC/OiT2I5rXvG /+DkG1inabLJ0Xmn1m++X1/Vn4CKhLmcU7o/AHMT6eKtdV4oyf9BwS+czM/V5kETZ43G ZqtxCAKM/3m+2acGF/5ydToma6VH1R+vOJmqLhnyXILVPTzutVORkrKIUtNksnNPurrC W2+IJHyjeLADjllEptOmImX4aXCYMkXKHiaVFr5ATa9ziQixFiuI3W+JqEal3p9lT8A/ EJ4lB+BT2bb5oRACTxz0MwaA9FH58Dh+N6zKLTd14jR7RjiJ085qJ/HyVcpJFn9Ajg4e 9wDw== X-Gm-Message-State: AMCzsaWPHOFUwp0cfacIiPY0/0OrAW/n9PrMPN4n1c6XVsVwxL45Zq+N jRvLHNxcL+VD/Ei3wEDkwU5W9T29 X-Google-Smtp-Source: ABhQp+R6hprnh/ETQxH8vECdoD0nh9mEe9ku785MDBasKattdoK0QOB3jAkS3cDKaz6jWYzU6pOi4w== X-Received: by 10.107.189.129 with SMTP id n123mr446441iof.48.1508372584625; Wed, 18 Oct 2017 17:23:04 -0700 (PDT) Received: from localhost.localdomain (69-174-167-231.lfytina2.metronetinc.net. [69.174.167.231]) by smtp.gmail.com with ESMTPSA id w136sm89624ita.36.2017.10.18.17.23.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Oct 2017 17:23:03 -0700 (PDT) From: Christian Stewart To: buildroot@buildroot.org Date: Wed, 18 Oct 2017 20:22:46 -0400 Message-Id: <20171019002257.27646-1-christian@paral.in> X-Mailer: git-send-email 2.13.6 Cc: Christian Stewart , fontaine.fabrice@gmail.com Subject: [Buildroot] [PATCH 01/12] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" dumb-init is a minimal init process to act as PID 1 for containers. dumb-init can be used to satisfy docker-engine's docker-init binary requirement. In many cases docker-init backing processes like dumb-init must be static, as they are executed inside a container in an unknown environment. This patch includes an option to specifically compile dumb-init statically, even if the system is compiled dynamically. Signed-off-by: Christian Stewart --- package/Config.in | 1 + package/dumb-init/Config.in | 16 ++++++++++++++++ package/dumb-init/dumb-init.hash | 2 ++ package/dumb-init/dumb-init.mk | 28 ++++++++++++++++++++++++++++ 4 files changed, 47 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 a27f55aec1..c161634daf 100644 --- a/package/Config.in +++ b/package/Config.in @@ -1862,6 +1862,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/file/Config.in" source "package/easy-rsa/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..56ca6dc7b1 --- /dev/null +++ b/package/dumb-init/Config.in @@ -0,0 +1,16 @@ +config BR2_PACKAGE_DUMB_INIT + 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 + +if BR2_PACKAGE_DUMB_INIT + +config BR2_PACKAGE_DUMB_INIT_STATIC + bool "build static" + help + Enables static compilation for dumb-init. + +endif diff --git a/package/dumb-init/dumb-init.hash b/package/dumb-init/dumb-init.hash new file mode 100644 index 0000000000..e7987b36e2 --- /dev/null +++ b/package/dumb-init/dumb-init.hash @@ -0,0 +1,2 @@ +# Locally computed +sha256 74486997321bd939cad2ee6af030f481d39751bc9aa0ece84ed55f864e309a3f dumb-init-v1.2.0.tar.gz diff --git a/package/dumb-init/dumb-init.mk b/package/dumb-init/dumb-init.mk new file mode 100644 index 0000000000..f2855122fb --- /dev/null +++ b/package/dumb-init/dumb-init.mk @@ -0,0 +1,28 @@ +################################################################################ +# +# dumb-init +# +################################################################################ + +DUMB_INIT_VERSION = v1.2.0 +DUMB_INIT_SITE = $(call github,Yelp,dumb-init,$(DUMB_INIT_VERSION)) + +DUMB_INIT_LICENSE = MIT +DUMB_INIT_LICENSE_FILES = LICENSE +DUMB_INIT_CFLAGS=$(TARGET_CFLAGS) $(TARGET_LDFLAGS) + +ifeq ($(BR2_PACKAGE_DUMB_INIT_STATIC),y) +DUMB_INIT_CFLAGS += -static +endif + +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))