diff options
author | Doug Goldstein <cardoe@gentoo.org> | 2016-10-24 00:26:05 -0500 |
---|---|---|
committer | Doug Goldstein <cardoe@gentoo.org> | 2016-10-24 00:27:17 -0500 |
commit | d63d593dfdc5fb7dd1256663daac7b978aa892af (patch) | |
tree | 411515df5733e4bbeb9654c2526d389875df7129 /dev-lang/rust | |
parent | dev-lang/rust: have src_prepare use default (diff) | |
download | gentoo-d63d593dfdc5fb7dd1256663daac7b978aa892af.tar.gz gentoo-d63d593dfdc5fb7dd1256663daac7b978aa892af.tar.bz2 gentoo-d63d593dfdc5fb7dd1256663daac7b978aa892af.zip |
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@gentoo.org>
Diffstat (limited to 'dev-lang/rust')
-rw-r--r-- | dev-lang/rust/files/rust-1.12.0-disable-fetching-stage0.patch | 36 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.12.0.ebuild | 2 | ||||
-rw-r--r-- | dev-lang/rust/rust-1.12.1.ebuild | 2 |
3 files changed, 40 insertions, 0 deletions
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 000000000000..14d0b321e051 --- /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 ca00a6b2a937..e608fbde2b38 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 ca00a6b2a937..e608fbde2b38 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 |