From patchwork Thu Nov 8 03:24:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 994635 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.136; helo=silver.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="ZmO26Uak"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42r7vY1Llnz9sBk for ; Thu, 8 Nov 2018 14:25:12 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 3818627B00; Thu, 8 Nov 2018 03:25:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z5hLbb0LtNAN; Thu, 8 Nov 2018 03:25:06 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D8D3222F23; Thu, 8 Nov 2018 03:25:06 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 789DE1BF3BD for ; Thu, 8 Nov 2018 03:25:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 757BF85039 for ; Thu, 8 Nov 2018 03:25:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Xgq7PvZaAS5U for ; Thu, 8 Nov 2018 03:25:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 2C5D585DE1 for ; Thu, 8 Nov 2018 03:25:05 +0000 (UTC) Received: by mail-pg1-f193.google.com with SMTP id i4-v6so8227033pgq.9 for ; Wed, 07 Nov 2018 19:25:05 -0800 (PST) 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=TE+v9Tkvnc6aFN7BtGesTEbcSfwgTMX6R7kaOJGDRXg=; b=ZmO26UakjtZqlEW0qgpCKtmb4TUCFBXxgT/ELAWyXmy4ph50/V+BTL8Zgad+a/D/VA BhY1KrIiB/cSJkeIuWskBCYR2PatHhb+kJDfWwg7mXZB3p/SodXi+ywYPRjxwVwNyNuL toN7eN2W1QYQnc3TXuKMKtbY3JYhfaJATcR3paEjueKG/hUe1+IBpb+943Kv/5lBLVBr c3ZaR8I5nXinREjaRk2whf2Ihm3qBtJpjEraeFvv8scIKSiJbjUazQ4VZ5GHuAyJjB6J 7M3FuUZ1oj+XhV/mpUelAembSudZCzV/FAzXaDnoRUw6+jqu3k/XlFFYKU9t6oopCbTd kFIA== 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=TE+v9Tkvnc6aFN7BtGesTEbcSfwgTMX6R7kaOJGDRXg=; b=Hz+7TELt+pf78ZFStqEdbRDrDOhdejaXDIMFW7lY41bRgMqk2BuC5II6lquqxNwrRX neRUCfduQiZgrbsuIWxKJebeVoBuEmb4Z4J+06URbUOMmg2CCvSEEUzCkcGcC+MepA7j boF7hOyclQy2PsiLsa3Q5Xiqjo4UDohMMcVFxiAla9UqHMLLRaw5E7l/w8Ory0gHD4FP Sr9EvM5eZa8q+KShXltS/qhSd8RJNmrsEt/8bOTTt577qtEnq3/cmSnWyfKPjA5/nTET J0+PDnSMJSg6qRrS8OdXRY59CyFrkiW+p0X0qb9PvWxRnxIMcMTwduIcoUKqElSbwHGP s2Yw== X-Gm-Message-State: AGRZ1gLLCSVP7iWgdm0nwW/c/JO2f2QCiADjeJCdoe8TsC1bEZmahTrq +/kzjPVb2HuYEB2GzkMfombCReNvFHQ= X-Google-Smtp-Source: AJdET5dImmEjA4fHd0B7bxHThukRs9bHOFA9Z7Q9QhCDtP3pdTgk+NZge+VuaHbh1X3hxbeBaoGfSA== X-Received: by 2002:a63:e247:: with SMTP id y7mr2391462pgj.84.1541647503544; Wed, 07 Nov 2018 19:25:03 -0800 (PST) Received: from localhost.localdomain ([165.254.106.58]) by smtp.gmail.com with ESMTPSA id i22-v6sm3698602pfj.82.2018.11.07.19.25.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 19:25:02 -0800 (PST) From: Christian Stewart To: buildroot@buildroot.org Date: Wed, 7 Nov 2018 19:24:58 -0800 Message-Id: <20181108032458.1028-1-christian@paral.in> X-Mailer: git-send-email 2.18.1 Subject: [Buildroot] [PATCH v8 1/1] docker-engine: split docker-{cli, engine}, bump to v18.06.1-ce X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hamilton Southworth , 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/engine: daemon, "dockerd" binary - github.com/docker/cli: "docker" command line interface 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. Docker repositories "engine" and "cli" recently started tagging releases as recent as the latest stable v18.06.1. The CLI is no longer automatically included with the engine. Users will need to select BR2_PACKAGE_DOCKER_CLI to produce a both docker and dockerd target binaries. Docker CLI can be statically compiled. This enables usage of the system docker client binary to access the parent daemon API from within containers, where shared libraries are not available. Signed-off-by: Christian Stewart --- Changes since v4: - Use latest stable release v18.06.1 Changes since v5: - Clarify commit message - Move legacy option to 2018.11 segment and clarify helptext - Daemon no longer automatically selects CLI - Remove duplicate journald build tag merge artifact in docker-engine - Remove unnecessary IAMSTATIC declaration - Remove unnecessary containerd -> docker-containerd link Changes since v6: - Remove static docker client option, causes SIGILL on thumb2 arm Changes since v7: - Re-introduce static compilation option for client by disabling cgo - Without cgo, there are no shared-linked dependencies for the docker cli --- 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 | 31 ++++++++++++++++++++++++ package/docker-engine/Config.in | 6 ----- package/docker-engine/docker-engine.hash | 2 +- package/docker-engine/docker-engine.mk | 25 ++++--------------- 8 files changed, 74 insertions(+), 27 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 c3df37ddd9..3ceefc98b1 100644 --- a/Config.in.legacy +++ b/Config.in.legacy @@ -145,6 +145,15 @@ endif ############################################################################### comment "Legacy options removed in 2018.11" +config BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT + bool "docker-engine static client option renamed" + select BR2_LEGACY + select BR2_PACKAGE_DOCKER_CLI_STATIC + help + BR2_PACKAGE_DOCKER_ENGINE_STATIC_CLIENT has been renamed to + BR2_PACKAGE_DOCKER_CLI_STATIC, following the package split of + docker-engine and docker-cli. + config BR2_TARGET_XLOADER bool "xloader has been removed" select BR2_LEGACY diff --git a/package/Config.in b/package/Config.in index 712e360402..8ca88e7d28 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2105,6 +2105,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..50a81792d0 --- /dev/null +++ b/package/docker-cli/docker-cli.hash @@ -0,0 +1,2 @@ +# Locally calculated +sha256 47eda354afc199693aa338f5b2bb87e4511354c02561ddc6520a06d169921bdf docker-cli-v18.06.1-ce.tar.gz diff --git a/package/docker-cli/docker-cli.mk b/package/docker-cli/docker-cli.mk new file mode 100644 index 0000000000..46449fa058 --- /dev/null +++ b/package/docker-cli/docker-cli.mk @@ -0,0 +1,31 @@ +############################################################################### +# +# docker-cli +# +################################################################################ + +DOCKER_CLI_VERSION = v18.06.1-ce +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_TAGS = cgo autogen +DOCKER_CLI_BUILD_TARGETS = cmd/docker + +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' +DOCKER_CLI_TAGS += osusergo netgo +DOCKER_CLI_GO_ENV = CGO_ENABLED=no +endif + +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 8feb11b48c..11f17820a7 100644 --- a/package/docker-engine/Config.in +++ b/package/docker-engine/Config.in @@ -26,12 +26,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 config BR2_PACKAGE_DOCKER_ENGINE_DRIVER_BTRFS diff --git a/package/docker-engine/docker-engine.hash b/package/docker-engine/docker-engine.hash index 6c0ed338a5..d5167a41a0 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 df4a3d2100d9b55c36288e721277dc61e4ceded5738423b09fe0d5ed42369f54 docker-engine-v18.06.1-ce.tar.gz diff --git a/package/docker-engine/docker-engine.mk b/package/docker-engine/docker-engine.mk index ba84b4cf0a..7023d40f58 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.1-ce +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 @@ -30,15 +26,9 @@ DOCKER_ENGINE_DEPENDENCIES += libseccomp endif ifeq ($(BR2_INIT_SYSTEMD),y) -DOCKER_ENGINE_TAGS += journald DOCKER_ENGINE_DEPENDENCIES += systemd +DOCKER_ENGINE_TAGS += systemd journald endif - -ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y) -DOCKER_ENGINE_TAGS += daemon -DOCKER_ENGINE_BUILD_TARGETS += cmd/dockerd -endif - ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_EXPERIMENTAL),y) DOCKER_ENGINE_TAGS += experimental endif @@ -65,7 +55,6 @@ DOCKER_ENGINE_INSTALL_BINS = $(notdir $(DOCKER_ENGINE_BUILD_TARGETS)) define DOCKER_ENGINE_RUN_AUTOGEN cd $(@D) && \ - GITCOMMIT="$$(echo $(DOCKER_ENGINE_COMMIT) | head -c7)" \ BUILDTIME="$$(date)" \ VERSION="$(patsubst v%,%,$(DOCKER_ENGINE_VERSION))" \ PKG_CONFIG="$(PKG_CONFIG_HOST_BINARY)" $(TARGET_MAKE_ENV) \ @@ -74,8 +63,6 @@ endef DOCKER_ENGINE_POST_CONFIGURE_HOOKS += DOCKER_ENGINE_RUN_AUTOGEN -ifeq ($(BR2_PACKAGE_DOCKER_ENGINE_DAEMON),y) - define DOCKER_ENGINE_INSTALL_INIT_SYSTEMD $(INSTALL) -D -m 0644 $(@D)/contrib/init/systemd/docker.service \ $(TARGET_DIR)/usr/lib/systemd/system/docker.service @@ -90,6 +77,4 @@ define DOCKER_ENGINE_USERS - - docker -1 * - - - Docker Application Container Framework endef -endif - $(eval $(golang-package))