From patchwork Sun Jul 15 01:07:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 944025 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=paral.in 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="smpoMG4C"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41SpWn3FDyz9rxs for ; Sun, 15 Jul 2018 11:15:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 5F80285926; Sun, 15 Jul 2018 01:15:46 +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 Dc8nldiRkB1e; Sun, 15 Jul 2018 01:15:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 1B8A583619; Sun, 15 Jul 2018 01:15:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 82E8B1C002D for ; Sun, 15 Jul 2018 01:15:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 80B2F836E6 for ; Sun, 15 Jul 2018 01:15:43 +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 HrvVl1HHhY1S for ; Sun, 15 Jul 2018 01:15:42 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qt0-f170.google.com (mail-qt0-f170.google.com [209.85.216.170]) by whitealder.osuosl.org (Postfix) with ESMTPS id 895B0836E5 for ; Sun, 15 Jul 2018 01:15:42 +0000 (UTC) Received: by mail-qt0-f170.google.com with SMTP id y5-v6so30234905qti.12 for ; Sat, 14 Jul 2018 18:15:42 -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:in-reply-to:references; bh=Q1nSjamYVPn9icPfl5xN47+LXgjvz8nRUKUubFvePNE=; b=smpoMG4CGU+JaICON7FnW8hH/pUgxFnRY820fDL7xbY+8fjQcst9u9NHX1ZqSZTfGy cxHFY4louS7nSZlVt4Oxk+S2Dnqf1onEDuUNBiyXeqChHWcdUG7NdMYLGAnjy3Sor2ki gIU00eHJnIzyFXqUV4O3WKI1audrzhExZLtwoxguODaLG2Ejv6zTb6PcbUGS/opXhR27 9f43o4DLeetgtE3Gw/vyA5a/JkYgxqcpjFP4m+DLQ44FqczLnu4GTZoyxoD8mH4EFcce MOeejLTXeypFgCYuyMENJyDy3HA8SPDzt5tRAwNbWG+engrGWLcC/P0gB2CnunXPPD3f LDIw== 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:in-reply-to :references; bh=Q1nSjamYVPn9icPfl5xN47+LXgjvz8nRUKUubFvePNE=; b=SqIECCmK/OknlKz0/jupbuT5+Ndim9c9AP4z4YVcMbaQEl0AbsaHhKSHI14a8dSQ7B PLdkVN4iJHqRtLH+OX3kKf8rg+cP2s7McxLny6+dixjAqlqvpMof0Qm8/hN2drdMCbK2 BPM2xLFz9J9UAEreduHUoT8/BIpFak1nNXlL5N+swkTkEr8nEu26sr9/BWRPBXZYp/wT +4/iUMKKEy8WoxC4LNY+C3fcaRIUjS9TiehXKVJGqQoC0CQhmQ1ZLwJjwq4GGw8ez8vy XyxUdVAHpnd34wbC7MSakJIHXuB68X+/SLiT7uy9MAdBwbgWdWzZbTLL24XtG6w7Ml2U JViA== X-Gm-Message-State: AOUpUlFqp3iE2vh+hu7E0YGZrWZQSlxwnAtFug4WaLbkZmjuhhJ0KFIs /h+++0vgD94orSZTFIDdX8uvlsM2 X-Google-Smtp-Source: AAOMgpeclg49E+66rvUKLsIjZkiXpKkNo1gzt+2ujN7hJdp2i2ItRlxZcWHjOD9WWRNHt5wgn3Fa4w== X-Received: by 2002:aed:2561:: with SMTP id w30-v6mr10190567qtc.240.1531616866966; Sat, 14 Jul 2018 18:07:46 -0700 (PDT) Received: from localhost.localdomain ([165.254.106.58]) by smtp.gmail.com with ESMTPSA id a17-v6sm1867480qkb.62.2018.07.14.18.07.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 14 Jul 2018 18:07:45 -0700 (PDT) From: Christian Stewart To: buildroot@buildroot.org Date: Sat, 14 Jul 2018 18:07:26 -0700 Message-Id: <20180715010732.21765-6-christian@paral.in> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180715010732.21765-1-christian@paral.in> References: <20180715010732.21765-1-christian@paral.in> Subject: [Buildroot] [PATCH 6/6] docker-engine: split into docker-{cli, engine}, bump v2018.06-ce-rc3 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Christian Stewart , Thomas Petazzoni , Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Docker upstream has split the Docker daemon and CLI into separate codebases: - github.com/docker/docker-engine: daemon, remains in docker-engine - github.com/docker/cli: cli, split into docker-cli and selected by engine This commit splits the docker-engine package into docker-engine and docker-cli. Conveniently, the Docker project has begun maintaining two separate release-tagged repositories for the CLI and daemon as of v18.06-ce-rc1. Previous versions were tagged in a common "docker-ce" repository which makes compilation awkward for Buildroot, especially due to some limitations in the new Go package infrastructure. Legacy flags are added to ease the transition: - BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT=y -> BR2_PACKAGE_DOCKER_CLI_STATIC - docker-engine selects docker-cli Docker repositories "engine" and "cli" recently started tagging releases as recent as v18.06-ce-rc1, so we pull the latest tagged release v18.06-ce-rc3 and upgrade to v18.06-ce when it is released. Signed-off-by: Christian Stewart --- Config.in.legacy | 9 +++++++++ package/Config.in | 1 + package/docker-cli/Config.in | 25 +++++++++++++++++++++++++ package/docker-cli/docker-cli.hash | 2 ++ package/docker-cli/docker-cli.mk | 29 +++++++++++++++++++++++++++++ package/docker-engine/Config.in | 7 +------ package/docker-engine/docker-engine.hash | 2 +- package/docker-engine/docker-engine.mk | 32 ++++++++++++++------------------ 8 files changed, 82 insertions(+), 25 deletions(-) create mode 100644 package/docker-cli/Config.in create mode 100644 package/docker-cli/docker-cli.hash create mode 100644 package/docker-cli/docker-cli.mk diff --git a/Config.in.legacy b/Config.in.legacy index 9743ebd08f..4cf9d05b9c 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -242,6 +242,15 @@ config BR2_GDB_VERSION_7_10 ############################################################################### comment "Legacy options removed in 2018.05" +config BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT + bool "docker-engine static client option renamed" + select BR2_LEGACY + select BR2_PACKAGE_DOCKER_CLI_STATIC + help + For consistency reasons, the option + BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT has been renamed to + BR2_PACKAGE_DOCKER_CLI_STATIC + config BR2_PACKAGE_MEDIAART_BACKEND_NONE bool "libmediaart none backend option renamed" select BR2_LEGACY diff --git a/package/Config.in b/package/Config.in index 2aeb8d0f10..28c1452a0f 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2007,6 +2007,7 @@ menu "System tools" source "package/dcron/Config.in" source "package/ddrescue/Config.in" source "package/debianutils/Config.in" + source "package/docker-cli/Config.in" source "package/docker-compose/Config.in" source "package/docker-containerd/Config.in" source "package/docker-engine/Config.in" diff --git a/package/docker-cli/Config.in b/package/docker-cli/Config.in new file mode 100644 index 0000000000..82c35c453d --- /dev/null +++ b/package/docker-cli/Config.in @@ -0,0 +1,25 @@ +config BR2_PACKAGE_DOCKER_CLI + bool "docker-cli" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS + depends on BR2_TOOLCHAIN_HAS_THREADS + help + Docker is a platform to build, ship, + and run applications as lightweight containers. + + https://github.com/docker/cli + +if BR2_PACKAGE_DOCKER_CLI + +config BR2_PACKAGE_DOCKER_CLI_STATIC + bool "build static client" + depends on !BR2_STATIC_LIBS + help + Build a static docker client. + +endif + +comment "docker-cli needs a toolchain w/ threads" + depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS + depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/docker-cli/docker-cli.hash b/package/docker-cli/docker-cli.hash new file mode 100644 index 0000000000..92b821de36 --- /dev/null +++ b/package/docker-cli/docker-cli.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 06a302b43d6a2110ca33808077ca025f4adf9992c32a3cebc5373ecc3cdd44a2 docker-cli-v18.06.0-ce-rc3.tar.gz diff --git a/package/docker-cli/docker-cli.mk b/package/docker-cli/docker-cli.mk new file mode 100644 index 0000000000..f11a8b514e --- /dev/null +++ b/package/docker-cli/docker-cli.mk @@ -0,0 +1,29 @@ +############################################################################### +# +# docker-cli +# +################################################################################ + +DOCKER_CLI_VERSION = v18.06.0-ce-rc3 +DOCKER_CLI_SITE = $(call github,docker,cli,$(DOCKER_CLI_VERSION)) +DOCKER_CLI_WORKSPACE = gopath + +DOCKER_CLI_LICENSE = Apache-2.0 +DOCKER_CLI_LICENSE_FILES = LICENSE + +DOCKER_CLI_DEPENDENCIES = host-go host-pkgconf + +DOCKER_CLI_LDFLAGS = \ + -X github.com/docker/cli/cli.GitCommit=$(DOCKER_CLI_VERSION) \ + -X github.com/docker/cli/cli.Version=$(DOCKER_CLI_VERSION) + +ifeq ($(BR2_PACKAGE_DOCKER_CLI_STATIC),y) +DOCKER_CLI_LDFLAGS += -extldflags '-static' +endif + +DOCKER_CLI_TAGS = cgo autogen +DOCKER_CLI_BUILD_TARGETS = cmd/docker + +DOCKER_CLI_INSTALL_BINS = $(notdir $(DOCKER_CLI_BUILD_TARGETS)) + +$(eval $(golang-package)) diff --git a/package/docker-engine/Config.in b/package/docker-engine/Config.in index a76940b6c0..e1e8ce0065 100644 --- a/package/docker-engine/Config.in +++ b/package/docker-engine/Config.in @@ -3,6 +3,7 @@ config BR2_PACKAGE_DOCKER_ENGINE depends on BR2_PACKAGE_HOST_GO_ARCH_SUPPORTS depends on BR2_PACKAGE_HOST_GO_CGO_LINKING_SUPPORTS depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_DOCKER_CLI help Docker is a platform to build, ship, and run applications as lightweight containers. @@ -26,12 +27,6 @@ config BR2_PACKAGE_DOCKER_ENGINE_DAEMON config BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL bool "build experimental features" -config BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT - bool "build static client" - depends on !BR2_STATIC_LIBS - help - Build a static docker client. - if BR2_PACKAGE_DOCKER_ENGINE_DAEMON choice diff --git a/package/docker-engine/docker-engine.hash b/package/docker-engine/docker-engine.hash index 6c0ed338a5..592f570a09 100644 --- a/package/docker-engine/docker-engine.hash +++ b/package/docker-engine/docker-engine.hash @@ -1,2 +1,2 @@ # Locally calculated -sha256 4716df117d867b82ddab2e82395cd40aa3d0925a689eedcec8919729e4c9f121 docker-engine-v17.05.0-ce.tar.gz +sha256 faf546bf0fdcf32d4f9ddbe67759fb39871dc9ea42bddffea23286fcdbf28842 docker-engine-v18.06.0-ce-rc3.tar.gz diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk index a85f4b5784..b251befa09 100644 --- a/package/docker-engine/docker-engine.mk +++ b/package/docker-engine/docker-engine.mk @@ -4,25 +4,21 @@ # ################################################################################ -DOCKER_ENGINE_VERSION = v17.05.0-ce -DOCKER_ENGINE_COMMIT = 89658bed64c2a8fe05a978e5b87dbec409d57a0f -DOCKER_ENGINE_SITE = $(call github,docker,docker,$(DOCKER_ENGINE_VERSION)) +DOCKER_ENGINE_VERSION = v18.06.0-ce-rc3 +DOCKER_ENGINE_SITE = $(call github,docker,engine,$(DOCKER_ENGINE_VERSION)) DOCKER_ENGINE_LICENSE = Apache-2.0 DOCKER_ENGINE_LICENSE_FILES = LICENSE DOCKER_ENGINE_DEPENDENCIES = host-go host-pkgconf +DOCKER_ENGINE_SRC_SUBDIR = github.com/docker/docker DOCKER_ENGINE_LDFLAGS = \ -X main.GitCommit=$(DOCKER_ENGINE_VERSION) \ -X main.Version=$(DOCKER_ENGINE_VERSION) -ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT),y) -DOCKER_ENGINE_LDFLAGS += -extldflags '-static' -endif - DOCKER_ENGINE_TAGS = cgo exclude_graphdriver_zfs autogen -DOCKER_ENGINE_BUILD_TARGETS = cmd/docker +DOCKER_ENGINE_BUILD_TARGETS = cmd/dockerd ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) DOCKER_ENGINE_TAGS += seccomp @@ -32,11 +28,7 @@ endif ifeq ($(BR2_INIT_SYSTEMD),y) DOCKER_ENGINE_TAGS += journald DOCKER_ENGINE_DEPENDENCIES += systemd -endif - -ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y) -DOCKER_ENGINE_TAGS += daemon -DOCKER_ENGINE_BUILD_TARGETS += cmd/dockerd +DOCKER_ENGINE_TAGS += systemd journald endif ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y) @@ -64,15 +56,16 @@ endif DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS)) ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_INIT_DUMB_INIT),y) -DOCKER_ENGINE_INSTALL_BINS += dumb-init +DOCKER_ENGINE_INIT_BIN = dumb-init else -DOCKER_ENGINE_INSTALL_BINS += tini +DOCKER_ENGINE_INIT_BIN = tini endif define DOCKER_ENGINE_RUN_AUTOGEN cd $(@D) && \ GITCOMMIT="$$(echo $(DOCKER_ENGINE_COMMIT) | head -c7)" \ BUILDTIME="$$(date)" \ + IAMSTATIC="true" \ VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \ bash ./hack/make/.go-autogen @@ -80,7 +73,12 @@ endef DOCKER_ENGINE_POST_CONFIGURE_HOOKS += DOCKER_ENGINE_RUN_AUTOGEN -ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y) +define DOCKER_ENGINE_LINK_INIT + ln -s $(DOCKER_ENGINE_INIT_BIN) \ + $(TARGET_DIR)/usr/bin/$(DOCKER_ENGINE_INIT_BIN) +endef + +DOCKER_ENGINE_POST_INSTALL_HOOKS += DOCKER_ENGINE_LINK_INIT define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \ @@ -96,6 +94,4 @@ define DOCKER_ENGINE_USERS - - docker -1 * - - - Docker Application Container Framework endef -endif - $(eval $(golang-package))