From patchwork Wed Oct 25 09:26:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Angelo Compagnucci X-Patchwork-Id: 830156 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.138; helo=whitealder.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=gmail.com header.i=@gmail.com header.b="LN3IJL7H"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yMPtH4Jd2z9sRV for ; Wed, 25 Oct 2017 20:27:19 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 29F9E824FD; Wed, 25 Oct 2017 09:27:11 +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 4N-WksBAAtqQ; Wed, 25 Oct 2017 09:27:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 6EBB788C55; Wed, 25 Oct 2017 09:27:08 +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 262B71C0621 for ; Wed, 25 Oct 2017 09:27:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 20FA588C55 for ; Wed, 25 Oct 2017 09:27:02 +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 kc2eXNKqCchp for ; Wed, 25 Oct 2017 09:27:01 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm0-f68.google.com (mail-wm0-f68.google.com [74.125.82.68]) by whitealder.osuosl.org (Postfix) with ESMTPS id 36E5C824FD for ; Wed, 25 Oct 2017 09:27:01 +0000 (UTC) Received: by mail-wm0-f68.google.com with SMTP id u138so543028wmu.5 for ; Wed, 25 Oct 2017 02:27:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=HW5Ui31yJb8tT6Nl8iI7G89Nn0bw+Q5wxMx9+X841Vs=; b=LN3IJL7HLbtfaxlNyGSZogNac+RKrwsgEUyujn88IuzWYtFfoEN5uLHAAXA5ApErTZ QS+pXCucgXXO036r0XzboZllh3UyHT/fydW8RYAHQv3wF6Z3QxVV2eO7fVzYLQgn41QC v0FH8sPuQc97mMIUeVbHgfwOCJ5Dp3VqKEZVlhLSeTRNkiFaL+9+xKlI90ki2ta/968h N6oSDWuQ6UVj5f55wm6gwKT1Hb+LJ2BNK3kWMGnHiBR8ee3eQ2MEEDTgTe2S8bS/WVE/ 58JLTgqVeIp5WN19NI1qAz/F86Qeh0dOqbaP+1rTSib9R8whpfh+68+yPQfhzRmqZmE6 B4dw== 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=HW5Ui31yJb8tT6Nl8iI7G89Nn0bw+Q5wxMx9+X841Vs=; b=HMUAQkPIeh+xwIDZ1MmDlebwF7orgJ3d9Jidf8/XoO0hQv4mrwd6sbXYISC/uUedO/ BTnPMio7V8aFr0fVCloQtpLtuKS4V+XoytMcabWCRB430TA4EdS7GQ96qcrBPlEMuGDT EgRv0TvuHiqKKHMnfsqz2fYiGoW9hMM9jV+RQR9OWwaIVxjoYUD9TVvQTjoWpq4JB3qg ciNWdMVhMnh4+yW1cwQAUhre3eLugyU7Em6qOoAPmt+qJTVeXdO32EyLVNwaYM/lCy4P QeYqnXgFeXRxxinFNNhL6U3Tw2IXzKfu3VMhAMvYQqhPwZvCsZLm8usPjaQPom/OnC3Z tDdA== X-Gm-Message-State: AMCzsaU3OxntmKeXTLLR3iRibyK5O8Pw5n7X+OTRS21sUShPjowWBxZN qt65unfM76lC0eKQ8nFzYUi6zqgB X-Google-Smtp-Source: ABhQp+Rs4V2cvfYGtmvv3FsCwVHO0ypkRtFky8hHoAPlhfbkB5/VugEvlDRMt1Kw31ZRLVrTKWt8Fw== X-Received: by 10.28.101.4 with SMTP id z4mr1157348wmb.77.1508923619156; Wed, 25 Oct 2017 02:26:59 -0700 (PDT) Received: from localhost.localdomain ([89.202.204.147]) by smtp.gmail.com with ESMTPSA id q7sm2009311wrg.97.2017.10.25.02.26.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Oct 2017 02:26:58 -0700 (PDT) From: Angelo Compagnucci To: buildroot@buildroot.org Date: Wed, 25 Oct 2017 11:26:48 +0200 Message-Id: <1508923609-2022-4-git-send-email-angelo.compagnucci@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508923609-2022-1-git-send-email-angelo.compagnucci@gmail.com> References: <1508923609-2022-1-git-send-email-angelo.compagnucci@gmail.com> Cc: christian@paral.in Subject: [Buildroot] [RFC v5 4/5] package/runc: converting to golang infrastructure 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" This patch converts the runc package to the new golang infrastructure. Signed-off-by: Angelo Compagnucci --- package/runc/runc.mk | 38 ++++---------------------------------- 1 file changed, 4 insertions(+), 34 deletions(-) diff --git a/package/runc/runc.mk b/package/runc/runc.mk index 0b51e11..2855ce3 100644 --- a/package/runc/runc.mk +++ b/package/runc/runc.mk @@ -9,43 +9,13 @@ RUNC_SITE = $(call github,opencontainers,runc,$(RUNC_VERSION)) RUNC_LICENSE = Apache-2.0 RUNC_LICENSE_FILES = LICENSE -RUNC_DEPENDENCIES = host-go +RUNC_GO_LDFLAGS = -X main.gitCommit=$(RUNC_VERSION) -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_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 $(RUNC_GOPATH)/src/github.com/opencontainers/runc && \ - $(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))