From patchwork Thu Oct 19 00:22:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 827887 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.133; helo=hemlock.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="CAa9ntZt"; 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 3yHVFJ00rSz9t7W for ; Thu, 19 Oct 2017 11:30:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 0131088A0D; Thu, 19 Oct 2017 00:30:09 +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 O-RV13Rfnlur; Thu, 19 Oct 2017 00:30:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 689BD88A99; Thu, 19 Oct 2017 00:30:03 +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 48DFB1CE75C for ; Thu, 19 Oct 2017 00:30:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 43162889D4 for ; Thu, 19 Oct 2017 00:30:02 +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 A+mQA+t7K2VX for ; Thu, 19 Oct 2017 00:30:01 +0000 (UTC) X-Greylist: delayed 00:06:49 by SQLgrey-1.7.6 Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) by hemlock.osuosl.org (Postfix) with ESMTPS id B37C388A0D for ; Thu, 19 Oct 2017 00:30:01 +0000 (UTC) Received: by mail-it0-f65.google.com with SMTP id f187so8423497itb.1 for ; Wed, 18 Oct 2017 17:30:01 -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=pOXkIOnYPxZlG/hU22ZKbGcEEFevTnvHTF/OSZxz9fc=; b=CAa9ntZt7QMAqybcMnkYSSdRWsbV4NRsrYBd+VtIJLG431Hte82IV+4lL+NUD0ducQ cj77I9wLXq4hPLkd/zkliYZVhf41KKaBF7EK6mI65Xbps6Ab/ciNkJ+EeWdomM0lqQVA Jp4nwJixp1F+E/Rd2dNh3XHBvggivn1lJdARdq+8lWevV5LGiF25GK0MzWFVO9q+LHUF B46dIsS++N7LlBFkkAgqS6qauwoVEYdN1MLasXh+XQ87HtLM/AwIUKZGZVjar0sqyHEm g3z6CvUESqud8JQ29VnJaTZQ3iwhA8OWdLcPtjUhQA6+U9UI/J5VNxguGkWOBo/dx0BG pK0Q== 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=pOXkIOnYPxZlG/hU22ZKbGcEEFevTnvHTF/OSZxz9fc=; b=dKxjSCgcJmyO6I5JfuczrZoE7/M7Aw4byI3FSNLcU3VN+wpKjdf0EtiuA5+iuM8HVl cAkXjUrNH+/l/RKpbKvwurBSwoTqmqbtbJ2hDm458VQQnEWlneDaJ9czkLZ7ua3Q1cV/ ZH1CNWo1pG0kHorn7X4FSHo/yeDSY3AKzSKTYVVT//aowSMkVla47kqyiD5jn7fCaP5X clz03q70aQqGE3Gw+wuNgNVOvCMRrQeh7up/E5Vs24gS4dzP5E/68Y61NHRY3uG/Wx2y CNnzfE3IBrsOr76Csq7SZZLVzgaV3WK6SYe6nXoil8b9IpeEy1beSCd37JWK2OzWZQxY ZHSw== X-Gm-Message-State: AMCzsaVKvhesnpKD7H0ibClM3gQuR8d4P9NW8kYFwppiWTy6npHQrsE3 4t8nxnNzkWLXqF84IAm7BdL1cRNm X-Google-Smtp-Source: ABhQp+R1D//Ll76vslc/ilh3Q3ao7v5HZzfANt4BeYi/JbTitaouq1TQdx51ZkMjUFppckwIhxoWyg== X-Received: by 10.36.9.144 with SMTP id 138mr235357itm.106.1508372594054; Wed, 18 Oct 2017 17:23:14 -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.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 18 Oct 2017 17:23:13 -0700 (PDT) From: Christian Stewart To: buildroot@buildroot.org Date: Wed, 18 Oct 2017 20:22:57 -0400 Message-Id: <20171019002257.27646-12-christian@paral.in> X-Mailer: git-send-email 2.13.6 In-Reply-To: <20171019002257.27646-1-christian@paral.in> References: <20171019002257.27646-1-christian@paral.in> Cc: Christian Stewart , fontaine.fabrice@gmail.com Subject: [Buildroot] [PATCH 12/12] docker-engine: don't link against libsystemd without systemd 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" Docker links against libsystemd unconditionally in the latest release. This is entirely unnecessary, and the included patch disables this behavior in the absence of the systemd build tag, which is now set when systemd is enabled in buildroot. This fixes linking errors when building against sysv, and avoids adding a hard dependency on systemd in Docker. Docker-Engine should also use the target pkgconfig, not the host pkgconfig. This is fixed in this patch. Signed-off-by: Christian Stewart --- ...king-against-libsystemd-with-absence-of-s.patch | 54 ++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 package/docker-engine/0001-disable-linking-against-libsystemd-with-absence-of-s.patch diff --git a/package/docker-engine/0001-disable-linking-against-libsystemd-with-absence-of-s.patch b/package/docker-engine/0001-disable-linking-against-libsystemd-with-absence-of-s.patch new file mode 100644 index 0000000000..9a8b126d5f --- /dev/null +++ b/package/docker-engine/0001-disable-linking-against-libsystemd-with-absence-of-s.patch @@ -0,0 +1,54 @@ +From 56ab23f03df71d6cd084a9f4fd9c382e47b0e26e Mon Sep 17 00:00:00 2001 +From: Christian Stewart +Date: Wed, 20 Sep 2017 18:09:26 +0100 +Subject: [PATCH] disable linking against libsystemd with absence of systemd + build tag + +For some reason, as of this release, Docker now MUST link against libsystemd. + +This is not for a good reason. It's because of two lines in the daemon startup, +which notify the systemd daemon that the daemon is done starting. + +Requiring the presence of an entire systemd library to build Docker is not +suitable for Buildroot. This patch adds a build tag called "systemd," which +when not set, will disable linking against libsystemd. + +Signed-off-by: Christian Stewart +--- + components/engine/cmd/dockerd/daemon_linux.go | 2 +- + components/engine/cmd/dockerd/daemon_linux_nosystemd.go | 13 +++++++++++++ + 2 files changed, 14 insertions(+), 1 deletion(-) + create mode 100644 components/engine/cmd/dockerd/daemon_linux_nosystemd.go + +diff --git a/components/engine/cmd/dockerd/daemon_linux.go b/components/engine/cmd/dockerd/daemon_linux.go +index a909ee4fbd..89c16bac2f 100644 +--- a/components/engine/cmd/dockerd/daemon_linux.go ++++ b/components/engine/cmd/dockerd/daemon_linux.go +@@ -1,4 +1,4 @@ +-// +build linux ++// +build linux,systemd + + package main + +diff --git a/components/engine/cmd/dockerd/daemon_linux_nosystemd.go b/components/engine/cmd/dockerd/daemon_linux_nosystemd.go +new file mode 100644 +index 0000000000..4f7e92af0f +--- /dev/null ++++ b/components/engine/cmd/dockerd/daemon_linux_nosystemd.go +@@ -0,0 +1,13 @@ ++// +build linux,!systemd ++ ++package main ++ ++// preNotifySystem sends a message to the host when the API is active, but before the daemon is ++func preNotifySystem() { ++ // noop without systemd ++} ++ ++// notifySystem sends a message to the host when the server is ready to be used ++func notifySystem() { ++ // noop without systemd ++} +-- +2.13.5 +