From patchwork Wed Mar 7 22:19:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 882839 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="iSsD20+n"; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zxSkT6v43z9sgx for ; Thu, 8 Mar 2018 09:20:01 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 658D2879D1; Wed, 7 Mar 2018 22:19:58 +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 2-2PpliOyy2m; Wed, 7 Mar 2018 22:19:56 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 714A685EBA; Wed, 7 Mar 2018 22:19:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 5B37C1C0547 for ; Wed, 7 Mar 2018 22:19:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 4FAE62E542 for ; Wed, 7 Mar 2018 22:19:52 +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 cKu+zKq6axY8 for ; Wed, 7 Mar 2018 22:19:51 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f194.google.com (mail-wr0-f194.google.com [209.85.128.194]) by silver.osuosl.org (Postfix) with ESMTPS id 4DAF82E617 for ; Wed, 7 Mar 2018 22:19:51 +0000 (UTC) Received: by mail-wr0-f194.google.com with SMTP id k9so3734466wre.9 for ; Wed, 07 Mar 2018 14:19:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/HZ8kW1GNVK6ScoMNOiGZVEIDQIdFqHxZPGS6BlbkZY=; b=iSsD20+nb9nsjxe0LY2ag0s4fnC5sxpusAXjFlgzl7juuQq+HyPKdLfhb/O9deiVd6 3DnXvGMeCgHxgNZv0g4LJLRn0XFRF6Cj9xfuAu59wwNTMw2XZ4/MdYOuf754HReEbjP8 xSWdNVJtRTulvSHmnruC1uVEaBIJbcHxMwdm0= 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=/HZ8kW1GNVK6ScoMNOiGZVEIDQIdFqHxZPGS6BlbkZY=; b=JX9CpNL8yAk9bpibS8Y9lUxD4uwSKfDi/UWQDZHL13bPXyUuBv1rMLU8U4MTryGIUa DlLjVx8RLOWzukS85OGqYNFYZO+0ALUXT6uHxjlNd1YrS4D5PsazFA+mwD/gRUEB5/cb iBar6MtnPKBEW34bbPsHLrajeab6xuPasOsKFkjbih980iN0Q/yceOtBV9MF8yhW2VYN hI19NVI8r169BfmWRlX9ZO+6uxECCYQ69FgqrGlsh203FFmwxNxWrZp/Cgsvg8+IiYDI aY31LRkN8SzyW4QMmgfJMrgx4sE24T4i8wqRxeRk2oCS7KJXLVGmHcZjbNvikR2XKNpR iYXg== X-Gm-Message-State: APf1xPC0GZTeTcruGqQmj2p0oC+Hw8TribdUZl1tgCmOjZvgx38YEBM0 FZmMzGyI3ZXqLixGn80/FOqUTCXJnS4= X-Google-Smtp-Source: AG47ELt9fFU2kbklfvASBnZUEKNNYRKdwA3UZFVblHaswiLOfuA69uX5pWLvAu7HlRbPgg3QP7VcyA== X-Received: by 10.223.172.167 with SMTP id o36mr21941084wrc.34.1520461189575; Wed, 07 Mar 2018 14:19:49 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id n29sm7662011wmi.32.2018.03.07.14.19.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 07 Mar 2018 14:19:48 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 7 Mar 2018 23:19:36 +0100 Message-Id: <1520461179-31679-5-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1520461179-31679-1-git-send-email-angelo@amarulasolutions.com> References: <1520461179-31679-1-git-send-email-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH v3 4/7] package/runc: converting to golang infrastructure 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: Angelo Compagnucci MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" This patch converts the runc package to the new golang infrastructure. Signed-off-by: Angelo Compagnucci --- package/runc/runc.mk | 37 +++++-------------------------------- 1 file changed, 5 insertions(+), 32 deletions(-) diff --git a/package/runc/runc.mk b/package/runc/runc.mk index fb3fec2..f497b6d 100644 --- a/package/runc/runc.mk +++ b/package/runc/runc.mk @@ -9,42 +9,15 @@ RUNC_SITE = $(call github,opencontainers,runc,$(RUNC_VERSION)) RUNC_LICENSE = Apache-2.0 RUNC_LICENSE_FILES = LICENSE -RUNC_DEPENDENCIES = host-go +RUNC_GOPATH = Godeps/_workspace -RUNC_GOPATH = "$(@D)/Godeps/_workspace" -RUNC_MAKE_ENV = $(HOST_GO_TARGET_ENV) \ - CGO_ENABLED=1 \ - GOBIN="$(@D)/bin" \ - GOPATH="$(RUNC_GOPATH)" \ - PATH=$(BR_PATH) +RUNC_GO_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION) -RUNC_GLDFLAGS = \ - -X main.gitCommit=$(RUNC_VERSION) - -ifeq ($(BR2_STATIC_LIBS),y) -RUNC_GLDFLAGS += -extldflags '-static' -endif - -RUNC_GOTAGS = cgo static_build +RUNC_GO_TAGS = cgo static_build ifeq ($(BR2_PACKAGE_LIBSECCOMP),y) -RUNC_GOTAGS += seccomp +RUNC_GO_TAGS += seccomp RUNC_DEPENDENCIES += libseccomp host-pkgconf endif -define RUNC_CONFIGURE_CMDS - mkdir -p $(RUNC_GOPATH)/src/github.com/opencontainers - ln -s $(@D) $(RUNC_GOPATH)/src/github.com/opencontainers/runc -endef - -define RUNC_BUILD_CMDS - cd $(@D) && $(RUNC_MAKE_ENV) $(HOST_DIR)/bin/go \ - build -v -o $(@D)/bin/runc \ - -tags "$(RUNC_GOTAGS)" -ldflags "$(RUNC_GLDFLAGS)" . -endef - -define RUNC_INSTALL_TARGET_CMDS - $(INSTALL) -D -m 0755 $(@D)/bin/runc $(TARGET_DIR)/usr/bin/runc -endef - -$(eval $(generic-package)) +$(eval $(golang-package))