From patchwork Wed Dec 6 10:56:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 845124 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.137; helo=fraxinus.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=amarulasolutions-com.20150623.gappssmtp.com header.i=@amarulasolutions-com.20150623.gappssmtp.com header.b="yPVlJzgP"; 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 3ysFtl0qH3z9s84 for ; Wed, 6 Dec 2017 21:57:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 55086880AB; Wed, 6 Dec 2017 10:57:16 +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 Bed-EpgOlzZG; Wed, 6 Dec 2017 10:57:14 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0A4C08800A; Wed, 6 Dec 2017 10:57:14 +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 AC8D61C041E for ; Wed, 6 Dec 2017 10:57:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A9ED18807E for ; Wed, 6 Dec 2017 10:57:10 +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 cEL4UAfd5VUg for ; Wed, 6 Dec 2017 10:57:09 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by fraxinus.osuosl.org (Postfix) with ESMTPS id BDCF987FE8 for ; Wed, 6 Dec 2017 10:57:08 +0000 (UTC) Received: by mail-wr0-f195.google.com with SMTP id h1so3391564wre.12 for ; Wed, 06 Dec 2017 02:57:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=9zGdCr3YQZpuzztuyPalf8oX/ichAFXi9GZU9CpcIAY=; b=yPVlJzgPvG8QiaihwmY1lJQFuJv+CsNdf/h3vMbk846r7bkL1WRcr59oVB2EpI9NZd xxag1nQdOO4LHTcrcQll0NNTN9dFBD9MY+cDh0DEVU0oiEIp52ujYBwDQ17Ya4kl7VsL cR16dDEh2tjas4uduWNy4oFbHJOSFI65qbmzkEXIGbt96azBCgrkluEvqWJ7rEwWcnhA EYfBBhD56Qsmgc698LgsxEBPJljHrjrCzvK+TbaT/UiL2tdH0Q3hct3bx1LboelNUTwT mQyf8GphA/9jOk6xU2wa+ECxlJuHxHAbC9lcjYCaGw3fyrMCekXJdA1RTOp2NcKqsMQZ njEQ== 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=9zGdCr3YQZpuzztuyPalf8oX/ichAFXi9GZU9CpcIAY=; b=HPnNSzRSKQTuanjeHOiwzLL0OqVGR8/Kugg3YKK7WoX6hR9j5Y3W6P0D3FILmPyDef bFlK4nyGacSaXj2ZBl7JxgTJD+ho5qIiXM/YDeE/BqJJxxDj0kptgcgnAX10onc3A/yL pzayuo7y3LOUm/Sd3Ax+raVANHtv10tnWkAoHr0Aqj4sgnrU5Hscgi6JopRNbsqX6YdL F3YTolWJMU2/Z6BqCVZcbVe9TnlO9x+rkR7T6RrO32+PfrvFZ77VLsdx9d3SLOBNB21o cyIWyahuCFlYSzVMkQZ50m/ZavT48195Yp4dI1AOby9MsZWEZSfNIqavWlAA3sjnrzOE uh1A== X-Gm-Message-State: AJaThX4flh1H2Q4Qd9rP2EBVEIIk1lDv8toqlU8U/pTngrjZQwSKWKej ML4jnD4j4xYPO7Z59LK/YbOJnXKe9YM= X-Google-Smtp-Source: AGs4zMZ/EfXuKQ9GIEgrOh+XdPxlgGG82ZgpYdZxWsRMsRkiIvQ7+q8jOuHIwl2cVGUeGMCkQ3hh1A== X-Received: by 10.223.174.211 with SMTP id y77mr18777229wrc.196.1512557827050; Wed, 06 Dec 2017 02:57:07 -0800 (PST) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id 31sm2433971wrm.59.2017.12.06.02.57.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 06 Dec 2017 02:57:06 -0800 (PST) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 6 Dec 2017 11:56:56 +0100 Message-Id: <1512557817-431-5-git-send-email-angelo@amarulasolutions.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1512557817-431-1-git-send-email-angelo@amarulasolutions.com> References: <1512557817-431-1-git-send-email-angelo@amarulasolutions.com> Subject: [Buildroot] [PATCH 4/5] 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" From: Angelo Compagnucci 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))