From: "Doug Goldstein" <cardoe@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/
Date: Mon, 24 Oct 2016 05:27:45 +0000 (UTC) [thread overview]
Message-ID: <1477286837.d63d593dfdc5fb7dd1256663daac7b978aa892af.cardoe@gentoo> (raw)
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
next reply other threads:[~2016-10-24 5:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-24 5:27 Doug Goldstein [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-10-18 9:05 [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/files/, dev-lang/rust/ Dirkjan Ochtman
2019-01-26 3:50 Georgy Yakovlev
2019-03-07 4:40 Georgy Yakovlev
2019-04-14 8:03 Georgy Yakovlev
2019-04-24 16:31 Georgy Yakovlev
2019-05-26 6:27 Georgy Yakovlev
2019-06-19 0:35 Georgy Yakovlev
2019-09-26 22:06 Georgy Yakovlev
2020-03-28 19:08 Georgy Yakovlev
2020-04-10 11:28 Stefan Strogin
2020-06-05 8:53 Stefan Strogin
2020-10-28 1:42 Georgy Yakovlev
2020-11-24 0:41 Georgy Yakovlev
2021-04-05 4:27 Georgy Yakovlev
2021-04-18 1:24 Georgy Yakovlev
2021-05-02 16:45 Georgy Yakovlev
2021-06-18 7:46 Georgy Yakovlev
2021-06-18 9:16 Georgy Yakovlev
2021-08-09 19:03 Georgy Yakovlev
2021-12-06 22:42 Georgy Yakovlev
2022-09-15 3:15 Georgy Yakovlev
2022-09-16 1:46 Georgy Yakovlev
2022-09-23 20:06 Georgy Yakovlev
2022-10-13 17:41 Georgy Yakovlev
2022-10-20 18:19 Georgy Yakovlev
2022-11-13 19:14 Georgy Yakovlev
2023-02-09 20:36 Georgy Yakovlev
2023-07-20 18:48 Ionen Wolkens
2023-08-04 12:30 WANG Xuerui
2023-10-02 8:13 WANG Xuerui
2024-02-11 6:01 Sam James
2024-10-12 4:04 Sam James
2024-12-01 8:23 Arthur Zamarin
2024-12-10 7:22 Joonas Niilola
2025-02-05 18:33 Arthur Zamarin
2025-02-25 19:29 Sam James
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1477286837.d63d593dfdc5fb7dd1256663daac7b978aa892af.cardoe@gentoo \
--to=cardoe@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox