mirror of
https://git.proxmox.com/git/rustc
synced 2026-08-11 18:33:20 +00:00
Restore dont-download-stage0 patch to build the orig-dl tarball with the hashes
This commit is contained in:
parent
add58cb7c4
commit
cd338699f6
1
debian/TODO.Debian
vendored
1
debian/TODO.Debian
vendored
@ -1,6 +1,5 @@
|
||||
For 1.15.1:
|
||||
|
||||
* Check that build with bundled dl/ doesn't try to download the checksums again
|
||||
* See if we can go back to debhelper compat 9 as that makes backporting easier
|
||||
* B-D binutils-multiarch -> binutils since upstream no longer do that in the tests
|
||||
|
||||
|
||||
50
debian/patches/d-dont-download-stage0.patch
vendored
Normal file
50
debian/patches/d-dont-download-stage0.patch
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
Description: Don't download SHA256 if it's already available locally
|
||||
In Debian we provide the stage0 tarballs as a separate component so that the
|
||||
buildds don't need to access the network during the build.
|
||||
Author: Ximin Luo <infinity0@debian.org>
|
||||
Forwarded: not-needed
|
||||
---
|
||||
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
||||
--- a/src/bootstrap/bootstrap.py
|
||||
+++ b/src/bootstrap/bootstrap.py
|
||||
@@ -22,15 +22,17 @@
|
||||
from time import time
|
||||
|
||||
|
||||
-def get(url, path, verbose=False):
|
||||
+def get(url, path, verbose=False, use_local_hash_if_present=False):
|
||||
sha_url = url + ".sha256"
|
||||
with tempfile.NamedTemporaryFile(delete=False) as temp_file:
|
||||
temp_path = temp_file.name
|
||||
- with tempfile.NamedTemporaryFile(suffix=".sha256", delete=False) as sha_file:
|
||||
- sha_path = sha_file.name
|
||||
+ sha_path = path + ".sha256"
|
||||
|
||||
try:
|
||||
- download(sha_path, sha_url, False, verbose)
|
||||
+ if use_local_hash_if_present and os.path.exists(sha_path):
|
||||
+ print("using already-download file " + sha_path)
|
||||
+ else:
|
||||
+ download(sha_path, sha_url, False, verbose)
|
||||
if os.path.exists(path):
|
||||
if verify(path, sha_path, False):
|
||||
if verbose:
|
||||
@@ -47,7 +49,6 @@
|
||||
print("moving {} to {}".format(temp_path, path))
|
||||
shutil.move(temp_path, path)
|
||||
finally:
|
||||
- delete_if_present(sha_path, verbose)
|
||||
delete_if_present(temp_path, verbose)
|
||||
|
||||
|
||||
--- a/src/etc/get-stage0.py
|
||||
+++ b/src/etc/get-stage0.py
|
||||
@@ -31,7 +31,7 @@
|
||||
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, use_local_hash_if_present=True)
|
||||
|
||||
stage0_dst = triple + '/stage0'
|
||||
if os.path.exists(stage0_dst):
|
||||
1
debian/patches/series
vendored
1
debian/patches/series
vendored
@ -17,6 +17,7 @@ u-arm-on-64bit-kernel.diff
|
||||
d-rust-gdb-paths
|
||||
d-rust-lldb-paths
|
||||
d-add-soname.patch
|
||||
d-dont-download-stage0.patch
|
||||
d-fix-configure-for-deb-arches.patch
|
||||
d-dynamic-link-llvm.patch
|
||||
d-use-system-jquery.patch
|
||||
|
||||
Loading…
Reference in New Issue
Block a user