From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <gentoo-commits+bounces-907763-garchives=archives.gentoo.org@lists.gentoo.org>
Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by finch.gentoo.org (Postfix) with ESMTPS id 22147138B7F
	for <garchives@archives.gentoo.org>; Mon, 24 Oct 2016 05:27:53 +0000 (UTC)
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id BD8BFE07FC;
	Mon, 24 Oct 2016 05:27:48 +0000 (UTC)
Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by pigeon.gentoo.org (Postfix) with ESMTPS id 8CB48E07F5
	for <gentoo-commits@lists.gentoo.org>; Mon, 24 Oct 2016 05:27:48 +0000 (UTC)
Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.gentoo.org (Postfix) with ESMTPS id E80FB341660
	for <gentoo-commits@lists.gentoo.org>; Mon, 24 Oct 2016 05:27:46 +0000 (UTC)
Received: from localhost.localdomain (localhost [127.0.0.1])
	by oystercatcher.gentoo.org (Postfix) with ESMTP id 2952A308
	for <gentoo-commits@lists.gentoo.org>; Mon, 24 Oct 2016 05:27:45 +0000 (UTC)
From: "Doug Goldstein" <cardoe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
Reply-To: gentoo-dev@lists.gentoo.org, "Doug Goldstein" <cardoe@gentoo.org>
Message-ID: <1477286837.d63d593dfdc5fb7dd1256663daac7b978aa892af.cardoe@gentoo>
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
X-VCS-Repository: repo/gentoo
X-VCS-Files: dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch dev-lang/rust/rust-1.12.0.ebuild dev-lang/rust/rust-1.12.1.ebuild
X-VCS-Directories: dev-lang/rust/ dev-lang/rust/files/
X-VCS-Committer: cardoe
X-VCS-Committer-Name: Doug Goldstein
X-VCS-Revision: d63d593dfdc5fb7dd1256663daac7b978aa892af
X-VCS-Branch: master
Date: Mon, 24 Oct 2016 05:27:45 +0000 (UTC)
Precedence: bulk
List-Post: <mailto:gentoo-commits@lists.gentoo.org>
List-Help: <mailto:gentoo-commits+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org>
X-BeenThere: gentoo-commits@lists.gentoo.org
X-Archives-Salt: 112b16d3-4e0e-44d4-9caa-f740475d1b80
X-Archives-Hash: 986bc3dc67f97a98b6059c421f0a0185

commit:     d63d593dfdc5fb7dd1256663daac7b978aa892af
Author:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 24 05:26:05 2016 +0000
Commit:     Doug Goldstein <cardoe <AT> gentoo <DOT> org>
CommitDate: Mon Oct 24 05:27:17 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63d593d

dev-lang/rust: fix network-less builds

When building without a network connection or FEATURES=network-sandbox
the build would fail due to the build process reaching out to the
internet to fetch down some files that the package manager already got
for it. This neuters that network access and uses the existing files.

Signed-off-by: Doug Goldstein <cardoe <AT> gentoo.org>

 .../rust-1.12.0-disable-fetching-stage0.patch      | 36 ++++++++++++++++++++++
 dev-lang/rust/rust-1.12.0.ebuild                   |  2 ++
 dev-lang/rust/rust-1.12.1.ebuild                   |  2 ++
 3 files changed, 40 insertions(+)

diff --git a/dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch b/dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch
new file mode 100644
index 00000000..14d0b32
--- /dev/null
+++ b/dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch
@@ -0,0 +1,36 @@
+From b6a4c78ef7b4bc6c32145f27e8a679d5baf36f90 Mon Sep 17 00:00:00 2001
+From: Doug Goldstein <cardoe@cardoe.com>
+Date: Mon, 24 Oct 2016 00:01:37 -0500
+Subject: [PATCH] disable fetching stage0 and use whats there
+
+In Gentoo and Yocto alike we do not allow build environments network
+access and as a result the package manager is responsible for fetching
+down all the files necessary. In both they are configured to fetch down
+the compiler and unpack it and place the stage0 tarball inside of the
+'dl' directory for the build system to use. Unfortunately it
+unconditionally attempts to fetch down the files and ignores what is
+already available so this avoids that behavior and just uses what's in
+the 'dl' directory.
+
+Upstream-Status: Not upstreamable
+Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
+---
+ src/etc/get-stage0.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/etc/get-stage0.py b/src/etc/get-stage0.py
+index 127251c..2889c07 100644
+--- a/src/etc/get-stage0.py
++++ b/src/etc/get-stage0.py
+@@ -31,7 +31,7 @@ def main(triple):
+     filename = 'rustc-{}-{}.tar.gz'.format(channel, triple)
+     url = 'https://static.rust-lang.org/dist/{}/{}'.format(date, filename)
+     dst = dl_dir + '/' + filename
+-    bootstrap.get(url, dst)
++    #bootstrap.get(url, dst)
+ 
+     stage0_dst = triple + '/stage0'
+     if os.path.exists(stage0_dst):
+-- 
+2.7.3
+

diff --git a/dev-lang/rust/rust-1.12.0.ebuild b/dev-lang/rust/rust-1.12.0.ebuild
index ca00a6b..e608fbd 100644
--- a/dev-lang/rust/rust-1.12.0.ebuild
+++ b/dev-lang/rust/rust-1.12.0.ebuild
@@ -55,6 +55,8 @@ PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=("${FILESDIR}/rust-1.12.0-disable-fetching-stage0.patch")
+
 src_unpack() {
 	unpack "rustc-${PV}-src.tar.gz" || die
 	mkdir "${MY_P}/dl" || die

diff --git a/dev-lang/rust/rust-1.12.1.ebuild b/dev-lang/rust/rust-1.12.1.ebuild
index ca00a6b..e608fbd 100644
--- a/dev-lang/rust/rust-1.12.1.ebuild
+++ b/dev-lang/rust/rust-1.12.1.ebuild
@@ -55,6 +55,8 @@ PDEPEND=">=app-eselect/eselect-rust-0.3_pre20150425"
 
 S="${WORKDIR}/${MY_P}"
 
+PATCHES=("${FILESDIR}/rust-1.12.0-disable-fetching-stage0.patch")
+
 src_unpack() {
 	unpack "rustc-${PV}-src.tar.gz" || die
 	mkdir "${MY_P}/dl" || die