Merge branch 'master' into epel7

This commit is contained in:
Josh Stone 2019-09-27 20:50:58 -07:00
commit 4aa461329e
7 changed files with 167 additions and 54 deletions

8
.gitignore vendored
View File

@ -222,3 +222,11 @@
/rust-1.36.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.36.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.36.0-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.38.0-src.tar.xz
/rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.37.0-i686-unknown-linux-gnu.tar.xz
/rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.37.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz

View File

@ -0,0 +1,74 @@
From 2bf05f208272cd58c57f4d7d8d0e10fdb22e8719 Mon Sep 17 00:00:00 2001
From: Josh Stone <jistone@redhat.com>
Date: Fri, 27 Sep 2019 12:33:08 -0700
Subject: [PATCH] [WIP] minimize the rust-std component
---
src/bootstrap/dist.rs | 45 +++++++++++++++----------------------------
1 file changed, 16 insertions(+), 29 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 552965863d10..76fbd07f9fb5 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -667,41 +667,28 @@ impl Step for Std {
return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
}
- // We want to package up as many target libraries as possible
- // for the `rust-std` package, so if this is a host target we
- // depend on librustc and otherwise we just depend on libtest.
- if builder.hosts.iter().any(|t| t == target) {
- builder.ensure(compile::Rustc { compiler, target });
- } else {
- if builder.no_std(target) == Some(true) {
- // the `test` doesn't compile for no-std targets
- builder.ensure(compile::Std { compiler, target });
- } else {
- builder.ensure(compile::Test { compiler, target });
- }
- }
+ builder.ensure(compile::Std { compiler, target });
+ builder.ensure(compile::Test { compiler, target });
let image = tmpdir(builder).join(format!("{}-{}-image", name, target));
let _ = fs::remove_dir_all(&image);
- let dst = image.join("lib/rustlib").join(target);
+ let dst = image.join("lib/rustlib").join(target).join("lib");
t!(fs::create_dir_all(&dst));
- let mut src = builder.sysroot_libdir(compiler, target).to_path_buf();
- src.pop(); // Remove the trailing /lib folder from the sysroot_libdir
- builder.cp_filtered(&src, &dst, &|path| {
- if let Some(name) = path.file_name().and_then(|s| s.to_str()) {
- if name == builder.config.rust_codegen_backends_dir.as_str() {
- return false
- }
- if name == "bin" {
- return false
- }
- if name.contains("LLVM") {
- return false
- }
+
+ let compiler_to_use = builder.compiler_for(compiler.stage, compiler.host, target);
+ let stamp = dbg!(compile::libstd_stamp(builder, compiler_to_use, target));
+ for (path, host) in builder.read_stamp_file(&stamp) {
+ if !host {
+ builder.copy(&path, &dst.join(path.file_name().unwrap()));
}
- true
- });
+ }
+ let stamp = dbg!(compile::libtest_stamp(builder, compiler_to_use, target));
+ for (path, host) in builder.read_stamp_file(&stamp) {
+ if !host {
+ builder.copy(&path, &dst.join(path.file_name().unwrap()));
+ }
+ }
let mut cmd = rust_installer(builder);
cmd.arg("generate")
--
2.21.0

View File

@ -9,10 +9,10 @@
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
# or nightly wants some beta-YYYY-MM-DD
# Note that cargo matches the program version here, not its crate version.
%global bootstrap_rust 1.36.0
%global bootstrap_cargo 1.36.0
%global bootstrap_channel 1.36.0
%global bootstrap_date 2019-07-04
%global bootstrap_rust 1.37.0
%global bootstrap_cargo 1.37.0
%global bootstrap_channel 1.37.0
%global bootstrap_date 2019-08-15
# Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches}
@ -55,8 +55,8 @@
%endif
Name: rust
Version: 1.37.0
Release: 1%{?dist}
Version: 1.38.0
Release: 2%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -74,9 +74,16 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# We do have the necessary fix in our LLVM 7.
Patch1: rust-pr57840-llvm7-debuginfo-variants.patch
# Mask a warning-as-error when rebuilding 1.38 with 1.38
Patch2: rustc-1.38.0-rebuild-bootstrap.patch
# Reduce the size of rust-std
# https://github.com/rust-lang/rust/pull/64823
Patch3: 0001-WIP-minimize-the-rust-std-component.patch
# libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys
# will try to build it statically -- instead we turn off the feature.
Patch10: rustc-1.37.0-disable-http2.patch
Patch10: rustc-1.38.0-disable-http2.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
@ -408,6 +415,8 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1 -R
%patch2 -p1
%patch3 -p1
%if %without curl_http2
%patch10 -p1
@ -465,6 +474,10 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \
find vendor -name .cargo-checksum.json \
-exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+'
# Sometimes Rust sources start with #![...] attributes, and "smart" editors think
# it's a shebang and make them executable. Then brp-mangle-shebangs gets upset...
find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
%build
@ -550,9 +563,11 @@ find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \
(cd "%{buildroot}%{rustlibdir}/%{rust_triple}/lib" &&
find ../../../../%{_lib} -maxdepth 1 -name '*.so' |
while read lib; do
# make sure they're actually identical!
cmp "$lib" "${lib##*/}"
ln -v -f -s -t . "$lib"
if [ -f "${lib##*/}" ]; then
# make sure they're actually identical!
cmp "$lib" "${lib##*/}"
ln -v -f -s -t . "$lib"
fi
done)
# Remove installer artifacts (manifests, uninstall scripts, etc.)
@ -716,6 +731,12 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Fri Sep 27 2019 Josh Stone <jistone@redhat.com> - 1.38.0-2
- Filter the libraries included in rust-std (rhbz1756487)
* Thu Sep 26 2019 Josh Stone <jistone@redhat.com> - 1.38.0-1
- Update to 1.38.0.
* Thu Aug 15 2019 Josh Stone <jistone@redhat.com> - 1.37.0-1
- Update to 1.37.0.
- Disable HTTP/2 support, lacking in system libcurl.

View File

@ -1,41 +1,7 @@
--- rustc-1.37.0-src/Cargo.lock.orig 2019-08-12 23:27:22.000000000 -0700
+++ rustc-1.37.0-src/Cargo.lock 2019-08-16 14:23:18.346656639 -0700
@@ -700,7 +700,6 @@ source = "registry+https://github.com/ru
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
- "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1400,15 +1399,6 @@ dependencies = [
]
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "libssh2-sys"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4341,7 +4331,6 @@ source = "registry+https://github.com/ru
"checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"
"checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6"
"checksum libgit2-sys 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "941a41e23f77323b8c9d2ee118aec9ee39dfc176078c18b4757d3bad049d9ff7"
-"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"
--- rustc-1.37.0-src/src/tools/cargo/Cargo.toml.orig 2019-08-12 23:27:40.000000000 -0700
+++ rustc-1.37.0-src/src/tools/cargo/Cargo.toml 2019-08-16 14:21:20.165084813 -0700
@@ -24,7 +24,7 @@ bytesize = "1.0"
crates-io = { path = "crates/crates-io", version = "0.26" }
crates-io = { path = "crates/crates-io", version = "0.27" }
crossbeam-utils = "0.6"
crypto-hash = "0.3.1"
-curl = { version = "0.4.21", features = ['http2'] }
@ -73,3 +39,37 @@
if let Err(e) = result {
warn!("ignoring libcurl {} error: {}", $msg, e);
}
--- rustc-1.38.0-src/Cargo.lock.orig 2019-09-23 14:15:52.000000000 -0700
+++ rustc-1.38.0-src/Cargo.lock 2019-09-27 20:48:18.209596817 -0700
@@ -673,7 +673,6 @@ source = "registry+https://github.com/ru
dependencies = [
"cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
- "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)",
"openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)",
"pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)",
@@ -1473,15 +1472,6 @@ dependencies = [
]
[[package]]
-name = "libnghttp2-sys"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-dependencies = [
- "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)",
- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)",
-]
-
-[[package]]
name = "libssh2-sys"
version = "0.2.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4485,7 +4475,6 @@ source = "registry+https://github.com/ru
"checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb"
"checksum libflate 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "90c6f86f4b0caa347206f916f8b687b51d77c6ef8ff18d52dd007491fd580529"
"checksum libgit2-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4c179ed6d19cd3a051e68c177fbbc214e79ac4724fac3a850ec9f3d3eb8a5578"
-"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4"
"checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d"
"checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe"
"checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54"

View File

@ -0,0 +1,10 @@
--- rustc-1.38.0-src/src/bootstrap/builder.rs 2019-09-23 14:15:52.000000000 -0700
+++ rustc-1.38.0-src/src/bootstrap/builder.rs 2019-09-26 10:45:49.663995011 -0700
@@ -140,6 +140,7 @@
impl StepDescription {
fn from<S: Step>() -> StepDescription {
+ #[allow(unused_unsafe)] // for rebuild bootstrapping
StepDescription {
default: S::DEFAULT,
only_hosts: S::ONLY_HOSTS,

View File

@ -1 +1 @@
SHA512 (rustc-1.37.0-src.tar.xz) = bfee43f578e6d44ead950b870b9fd31087e1bd3f917611f5dce7ad56504b83185edf43e297e8d1304e9e97b9a580d1e6adf6608ab8ed6dee0dc8c5153cdbc5d4
SHA512 (rustc-1.38.0-src.tar.xz) = b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a

View File

@ -1,8 +1,8 @@
SHA512 (rustc-1.37.0-src.tar.xz) = bfee43f578e6d44ead950b870b9fd31087e1bd3f917611f5dce7ad56504b83185edf43e297e8d1304e9e97b9a580d1e6adf6608ab8ed6dee0dc8c5153cdbc5d4
SHA512 (rust-1.36.0-aarch64-unknown-linux-gnu.tar.xz) = 77ffd9aa0dfdbb886a51c8d17e3e348c777226e859a48374dad8be20b9a3c7130c7f46d9173753e4ac4a264b45610767ba2625df4192773913892a13a255d3d6
SHA512 (rust-1.36.0-armv7-unknown-linux-gnueabihf.tar.xz) = b31e34f44df17d89f9f2a609a5b5b2320f43691e06ead257d893766abf8764a158adff0265dd60bf1f63dd98f0bf6bc64ae3b9e9f45200fbd7dfcaec3ba85d01
SHA512 (rust-1.36.0-i686-unknown-linux-gnu.tar.xz) = 34bcb93ec7a313a28ac20cd853e37419c4607f4035a367015826bd797401a2ada20ee99ae9028b6115c9db8aa1d4f74b74fb08ed09ab528d5946bc26c754b182
SHA512 (rust-1.36.0-powerpc64le-unknown-linux-gnu.tar.xz) = 02f32b544b0a55ba6f6fc4852f18766107bc0ce2c50488db11605e8a10e5965dd44e8332905c00080b08576370f2f0297ecbe12ba9fe01b4c24cdb9fd03ad64f
SHA512 (rust-1.36.0-powerpc64-unknown-linux-gnu.tar.xz) = 20bdd2b427549c866343962abefc4ffc356a1cb6965c754f28f19b05c234cb9c0abccbce036013deba1dc7699c2889ec954fff2b944953385624be54ee7a733e
SHA512 (rust-1.36.0-s390x-unknown-linux-gnu.tar.xz) = c637b8f50cbce3333280f43ce4b97d3f75ddae429ee34461837c3c3869e20aed8c5e76f7a58998f617dc0ffc2e6afd00908e5de05f4c7ed9a8c34d5dbc7ce916
SHA512 (rust-1.36.0-x86_64-unknown-linux-gnu.tar.xz) = 3f14dda1e09ef8c8168600f4d70ba60cb2a1086ad9edb5eed708d0ffc16fdb9c582ce350a93afcd64b78f87737e37d4f099703835a1ec9837a5721c2335e17c7
SHA512 (rustc-1.38.0-src.tar.xz) = b756d29a7a222bc7b5c7f42ff397346ab840f78e559f93e6e36b65e76eea525cf429899fe4de9fb8966623a2225b552feef9fa831bee50f9e25c976fa2af8c0a
SHA512 (rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz) = c70054f589aa2aecfbd6a89f567306e0cf5d3eb56e5a544ced0a5d212f14033dab10559d22dd6b07945e45a25d8de14fc7897c9d24c0d8149548a06b404ca9d2
SHA512 (rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz) = 6d9e055f36a2e912f30bebb25afdd3188019a438f208d3db67b38078bd5c37633c38fd48da15ba80640399babf89221e727a2bf43990aee269fcc5c91cd412b4
SHA512 (rust-1.37.0-i686-unknown-linux-gnu.tar.xz) = b59377350f82efd10c7afe0f7a28ecbd5355719d841d40c98bec0f01961233f7a19bed2581a111a76cde8dd8dc68a019fa7d3da66cb7ebcb002ba52a14a7e573
SHA512 (rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz) = 366c8920448000bfb4baa3a47588a1c7bc81e18afb8d40f0efc824e429e9e6900efbdb4c9003fb45b9d8595328bd612bd63f390a7d3dedbb30b7dc57fc12abf3
SHA512 (rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz) = e8e5cf1c64bd3eec389cef022e1c7bae4618fb6966505d2e762d10e7f443fece43b8b95c989c020bdf739abaf9c3f036230df46f6477a2ccd517a7bdef2ba0d7
SHA512 (rust-1.37.0-s390x-unknown-linux-gnu.tar.xz) = 14f403d3ce9df2a2baba1db13c9f039d7118d7e0c8285ca19ea0284c32e80c3f786660dedef4d1758b2227f91732b8e7deccbf3f38c2b3491738c1408d6bfd0e
SHA512 (rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz) = c4d48aa12cb929d6600f9cce81bb612c504aa1b3b3f8e76352af3a76b737dcbe0d31e8d139c17884b11aef9f12a55c4908fb8f3ff63dfa92533e4bd0a729914f