From patchwork Sat Jan 26 10:23:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Stewart X-Patchwork-Id: 1031429 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.133; helo=hemlock.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="VD19pFwq"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43msSV0G48z9sDB for ; Sat, 26 Jan 2019 21:24:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E04E187089; Sat, 26 Jan 2019 10:24:05 +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 VO6M3lbZC96V; Sat, 26 Jan 2019 10:24:04 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6407186DA3; Sat, 26 Jan 2019 10:24:04 +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 BBF931BF355 for ; Sat, 26 Jan 2019 10:24:02 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B75CE22610 for ; Sat, 26 Jan 2019 10:24:02 +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 qiXFbQyB96sq for ; Sat, 26 Jan 2019 10:24:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by silver.osuosl.org (Postfix) with ESMTPS id 65D5821F76 for ; Sat, 26 Jan 2019 10:24:01 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id z10so5215775pgp.7 for ; Sat, 26 Jan 2019 02:24:01 -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:mime-version :content-transfer-encoding; bh=H9A1K6Sd0lxMCw2/8F6CAlQwLCMMFSoUZsmn416jiro=; b=VD19pFwqVjBQBl3OdaIKjKbjEwng5lv/eClWUwQVAg4xnyhqpTfp7XuHtNuCc6lG9G j/rClgMjdd83hAW+fBPEhp8zui9kEEbO674S7RCfEpnTOiyrCA5SPsR3HYQdlE2AKyWJ xVjoTAv022bQJ5i4ATSO9/XFOl2w6nVtHXJu0s3bqzvM3DjBWUXe9aPt7bJIZ1wUKHlk gGn6nDqHtwABAn3rOTMB8uIPuUPICoa9aeT4GzFKXsnY8WXQavexwAMUsq/W6SvoX+gf amhXGnEdpwH7AmNO3csPFJePPT7fq+VaNWRn3tn6fXpVwZRYQLyj2xNRacgvTzkei9+o hYYA== 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:mime-version :content-transfer-encoding; bh=H9A1K6Sd0lxMCw2/8F6CAlQwLCMMFSoUZsmn416jiro=; b=XWt6TJ8YREnrpesh/do6PhUfqh7ciAro784bZQYnx68tnpv7DMHUaKwhqCKvvp6g2x UHbwwJxrvv5Oy3JG1oiSc2c2x1mXggAHwI72rAkJuwr66UIz2NfD0kUBkAwcqq8pZxf3 75tBFeb1YIB2DsjjVASc0WSFcSSdBZMWsy6VdZl0TQqwv1jxDZmrnspcbdXquD21yjUm SRLXmRsy9f44MufJkLk3s6aI62/QhPm/lOBslOpDKtNrOvvn+jBaPlD9XoS3p9pKBGGm gZzPp6MiJyxpgFFWIxho5+TW5s54ZygXHmwgGiEOgxJkfKaAo6tPTO4OXzeYQhqTTXKH 4ZRw== X-Gm-Message-State: AJcUukfGZWixYZ2ZCAlT7sEy77i5YjhiHUeOMQWvFaj+EQ57EZSo+N4D 1kFFwA72b0Iy/OWN1bRxV05ye2+EGbk= X-Google-Smtp-Source: ALg8bN69j2TYE+uldizg1dHMG59qJmmeg/q3K95oOHIXtU7aC+6Jpt6ZvzeJQ7EIYBBFh6V7aTWjMw== X-Received: by 2002:a63:ee0e:: with SMTP id e14mr12735349pgi.8.1548498240356; Sat, 26 Jan 2019 02:24:00 -0800 (PST) Received: from localhost.localdomain (cpe-172-91-133-215.socal.res.rr.com. [172.91.133.215]) by smtp.gmail.com with ESMTPSA id w6sm2748629pga.72.2019.01.26.02.23.58 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 26 Jan 2019 02:23:59 -0800 (PST) From: Christian Stewart To: buildroot@buildroot.org Date: Sat, 26 Jan 2019 02:23:55 -0800 Message-Id: <20190126102355.24766-1-christian@paral.in> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] go: explicitly disable modules to avoid unintended network lookup 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 , Anisse Astier , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Go "modules" refers to the dependency fetching, verification (hashing), and version control system built into Go as of 1.11. It is not desirable to have Go modules enabled in Buildroot in the normal case, as Buildroot manages downloading the sources, and third party dependency managers are typically not used. In the absence of the GO111MODULE environment variable, the Go compiler will correctly compile using the "vendor" version of dependencies downloaded by Buildroot during the compilation process for Go-based packages. However, if the user sets the GO111MODULE=yes environment variable, the Go compiler will download the Go dependencies for Buildroot packages, using the modules system. This is potentially unintended behavior from user environment variables. This commit sets the GO111MODULE=off variable in the Go target and host compilation environments, disabling Go modules support for Buildroot mainline packages. Signed-off-by: Christian Stewart --- package/go/go.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/go/go.mk b/package/go/go.mk index 7755a3f785..1558b55e21 100644 --- a/package/go/go.mk +++ b/package/go/go.mk @@ -42,6 +42,7 @@ HOST_GO_ROOT = $(HOST_DIR)/lib/go # For the convienience of target packages. HOST_GO_TOOLDIR = $(HOST_GO_ROOT)/pkg/tool/linux_$(GO_GOARCH) HOST_GO_TARGET_ENV = \ + GO111MODULE=off \ GOARCH=$(GO_GOARCH) \ GOROOT="$(HOST_GO_ROOT)" \ CC="$(TARGET_CC)" \ @@ -61,6 +62,7 @@ endif # The go build system is not compatible with ccache, so use # HOSTCC_NOCCACHE. See https://github.com/golang/go/issues/11685. HOST_GO_MAKE_ENV = \ + GO111MODULE=off \ GOROOT_BOOTSTRAP=$(HOST_GO_BOOTSTRAP_ROOT) \ GOROOT_FINAL=$(HOST_GO_ROOT) \ GOROOT="$(@D)" \