From d62a20a4dedb7063ac3e43509847d5cbd84d5bca Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 16 Jul 2020 11:04:22 -0700 Subject: [PATCH 01/20] Update to 1.45.0. --- .gitignore | 8 +++ ...pr71782-Use-a-non-existent-test-path.patch | 56 ------------------- rust.spec | 28 +++++----- sources | 2 +- sources-bootstrap | 16 +++--- 5 files changed, 30 insertions(+), 80 deletions(-) delete mode 100644 rust-pr71782-Use-a-non-existent-test-path.patch diff --git a/.gitignore b/.gitignore index e840b80..35637e0 100644 --- a/.gitignore +++ b/.gitignore @@ -279,3 +279,11 @@ /rust-1.43.1-s390x-unknown-linux-gnu.tar.xz /rust-1.43.1-x86_64-unknown-linux-gnu.tar.xz /rustc-1.44.1-src.tar.xz +/rustc-1.45.0-src.tar.xz +/rust-1.44.0-x86_64-unknown-linux-gnu.tar.xz +/rust-1.44.0-i686-unknown-linux-gnu.tar.xz +/rust-1.44.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.44.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.44.0-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.44.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.44.0-s390x-unknown-linux-gnu.tar.xz diff --git a/rust-pr71782-Use-a-non-existent-test-path.patch b/rust-pr71782-Use-a-non-existent-test-path.patch deleted file mode 100644 index 463cb61..0000000 --- a/rust-pr71782-Use-a-non-existent-test-path.patch +++ /dev/null @@ -1,56 +0,0 @@ -From fbd3fbdb24563a9d8fd3651f6bdc90bbbbd81d3e Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Fri, 1 May 2020 16:50:10 -0700 -Subject: [PATCH] Use a non-existent test path instead of clobbering /dev/null - ---- - src/test/ui/non-ice-error-on-worker-io-fail.rs | 10 +++++++--- - src/test/ui/non-ice-error-on-worker-io-fail.stderr | 2 +- - 2 files changed, 8 insertions(+), 4 deletions(-) - -diff --git a/src/test/ui/non-ice-error-on-worker-io-fail.rs b/src/test/ui/non-ice-error-on-worker-io-fail.rs -index 8af17742850d..30779fc65c0f 100644 ---- a/src/test/ui/non-ice-error-on-worker-io-fail.rs -+++ b/src/test/ui/non-ice-error-on-worker-io-fail.rs -@@ -4,8 +4,12 @@ - // - // An attempt to `-o` into a directory we cannot write into should indeed - // be an error; but not an ICE. -+// -+// However, some folks run tests as root, which can write `/dev/` and end -+// up clobbering `/dev/null`. Instead we'll use a non-existent path, which -+// also used to ICE, but even root can't magically write there. - --// compile-flags: -o /dev/null -+// compile-flags: -o /does-not-exist/output - - // The error-pattern check occurs *before* normalization, and the error patterns - // are wildly different between build environments. So this is a cop-out (and we -@@ -15,10 +19,10 @@ - // error-pattern: error - - // On Mac OS X, we get an error like the below --// normalize-stderr-test "failed to write bytecode to /dev/null.non_ice_error_on_worker_io_fail.*" -> "io error modifying /dev/" -+// normalize-stderr-test "failed to write bytecode to /does-not-exist/output.non_ice_error_on_worker_io_fail.*" -> "io error modifying /does-not-exist/" - - // On Linux, we get an error like the below --// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /dev/" -+// normalize-stderr-test "couldn't create a temp dir.*" -> "io error modifying /does-not-exist/" - - // ignore-tidy-linelength - // ignore-windows - this is a unix-specific test -diff --git a/src/test/ui/non-ice-error-on-worker-io-fail.stderr b/src/test/ui/non-ice-error-on-worker-io-fail.stderr -index f732abc52b71..edadecf273a7 100644 ---- a/src/test/ui/non-ice-error-on-worker-io-fail.stderr -+++ b/src/test/ui/non-ice-error-on-worker-io-fail.stderr -@@ -1,6 +1,6 @@ - warning: ignoring --out-dir flag due to -o flag - --error: io error modifying /dev/ -+error: io error modifying /does-not-exist/ - - error: aborting due to previous error; 1 warning emitted - --- -2.26.2 - diff --git a/rust.spec b/rust.spec index df8f12e..723e884 100644 --- a/rust.spec +++ b/rust.spec @@ -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.43.1 -%global bootstrap_cargo 1.43.1 -%global bootstrap_channel 1.43.1 -%global bootstrap_date 2020-05-07 +%global bootstrap_rust 1.44.0 +%global bootstrap_cargo 1.44.0 +%global bootstrap_channel 1.44.0 +%global bootstrap_date 2020-06-04 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -21,7 +21,7 @@ %bcond_with llvm_static # We can also choose to just use Rust's bundled LLVM, in case the system LLVM -# is insufficient. Rust currently requires LLVM 7.0+. +# is insufficient. Rust currently requires LLVM 8.0+. %if 0%{?rhel} && !0%{?epel} %bcond_without bundled_llvm %else @@ -48,8 +48,8 @@ %endif Name: rust -Version: 1.44.1 -Release: 2%{?dist} +Version: 1.45.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -63,9 +63,6 @@ ExclusiveArch: %{rust_arches} %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz -# https://github.com/rust-lang/rust/pull/71782 -Patch1: rust-pr71782-Use-a-non-existent-test-path.patch - # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -146,7 +143,7 @@ BuildRequires: %{python} %if %with bundled_llvm BuildRequires: cmake3 >= 3.4.3 -Provides: bundled(llvm) = 9.0.1 +Provides: bundled(llvm) = 10.0.1 %else BuildRequires: cmake >= 2.8.11 %if 0%{?epel} @@ -394,8 +391,6 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} -%patch1 -p1 - %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure %endif @@ -506,6 +501,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 --disable-rpath \ %{enable_debuginfo} \ --enable-extended \ + --tools=analysis,cargo,clippy,rls,rustfmt,src \ --enable-vendor \ --enable-verbose-tests \ %{?codegen_units_std} \ @@ -613,7 +609,6 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %dir %{rustlibdir}/%{rust_triple} %dir %{rustlibdir}/%{rust_triple}/lib %{rustlibdir}/%{rust_triple}/lib/*.so -%exclude %{_bindir}/*miri %files std-static @@ -705,7 +700,10 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog -* Wed Jul 01 2020 Josh Stone - 1.44.1-2 +* Thu Jul 16 2020 Josh Stone - 1.45.0-1 +- Update to 1.45.0. + +* Wed Jul 01 2020 Jeff Law - 1.44.1-2 - Disable LTO * Thu Jun 18 2020 Josh Stone - 1.44.1-1 diff --git a/sources b/sources index 381d691..fbfacd4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.44.1-src.tar.xz) = 1c17002edae844a710db9b144c17171416330dc565343c65af8a6e112fb61555e2025bb4cf33cac1229d7df689e6ff8858b91ae00552400ccacafaf1de11849b +SHA512 (rustc-1.45.0-src.tar.xz) = ff049eb65b36e6c64531d56251ebd446336a782f26504eccf375df1c22fa94b5f18e84660cef423edb815c1b31a1a7c9e57aea4aa0779576f3b0d7e81e19427b diff --git a/sources-bootstrap b/sources-bootstrap index 82332cc..09c180b 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.44.1-src.tar.xz) = 1c17002edae844a710db9b144c17171416330dc565343c65af8a6e112fb61555e2025bb4cf33cac1229d7df689e6ff8858b91ae00552400ccacafaf1de11849b -SHA512 (rust-1.43.1-aarch64-unknown-linux-gnu.tar.xz) = b54fad5493344d2370bd77110f0ffb0231f41ab8aa9707e9303304957c5d9067dc83089432eb175605b78dc771dfcf7abfcce63d7fecdbb759dd224c17d12da0 -SHA512 (rust-1.43.1-armv7-unknown-linux-gnueabihf.tar.xz) = 0812b3229dd47f1b5cadb49020e68d28b4267ac0489d0c2e448f21e3b0b6519bbf216ac9b20b747e035033842a6eb3b13a98706f2eddca2c088d9396dcb2c21e -SHA512 (rust-1.43.1-i686-unknown-linux-gnu.tar.xz) = c7423bccfb15f3df6043ec1d81203c9db9b3229dedd347cab09d3cc3b183f53aa0707f59964efccd63418e1c6ad21e7ee7dcc1495eda8c4ecb55ee8e6b3ac034 -SHA512 (rust-1.43.1-powerpc64le-unknown-linux-gnu.tar.xz) = da447ec44ebf998290a73420437c8d434a6c196cfe1c3331a9adf40abf7acd97a231e352a8626bbfa961da8e0c4f450aa59d573254257f72cce4068eeb8112a1 -SHA512 (rust-1.43.1-powerpc64-unknown-linux-gnu.tar.xz) = 695591807892c8f08801cd145ebc6a91ee4222000210baaaa0d6c8acf1ac6a96f4bf2566871def04d15a9965b7e3ea4287e37d7851fb14010518694d8ede75e6 -SHA512 (rust-1.43.1-s390x-unknown-linux-gnu.tar.xz) = f087e50a91b1cc4a12bf15aea1cefbda9b89518febcecc0d56ea7d0a6a682be06cff7777d0a0b4812e96f3fb3295e7799bf200c1599c88cb7083a78d5002f14a -SHA512 (rust-1.43.1-x86_64-unknown-linux-gnu.tar.xz) = 2fc573ca2826d9f03044f746ae4d7715b4e31b9ac933289607aa3449a538bb4dfd519540576a1d0d286c0d754a7ba6ce38beef6aded1090d3af3091b6ba2a9ee +SHA512 (rustc-1.45.0-src.tar.xz) = ff049eb65b36e6c64531d56251ebd446336a782f26504eccf375df1c22fa94b5f18e84660cef423edb815c1b31a1a7c9e57aea4aa0779576f3b0d7e81e19427b +SHA512 (rust-1.44.0-x86_64-unknown-linux-gnu.tar.xz) = 25c762e07e178ffc1b96b4a113e437541d6dc18bd81fb9933af676e99ca391c6cdd8d420caabcfca1b3ddb987a84ff9eb1d0bdb3cca486e71925555f51ecaa4c +SHA512 (rust-1.44.0-i686-unknown-linux-gnu.tar.xz) = 85ee1d7cd4581d9cdc18f0cfe89b0c78c32039f658b85c5f6a60ac8047864234bdff955e02d6e15ae40dd98e8e27cb3d83fab978dba6373f9e487cfd2ba0b594 +SHA512 (rust-1.44.0-armv7-unknown-linux-gnueabihf.tar.xz) = 59fd1f0dc058118a838c4c3c66dd5a5c2acb1b05ebf4525188846577cb22c4b46a57605d6a9cede5fbd34c0b5c638434a186d1ce3693ace6be8105c265b59b7b +SHA512 (rust-1.44.0-aarch64-unknown-linux-gnu.tar.xz) = c853a585bd76730a9ed1e95c12baf2939928fd3c5ba7cc0f95c03ec472c0012f01d0b7d7c37e21dfdcc1d1eca4c7e392709a2585e42bc759b636e95b4ab870d0 +SHA512 (rust-1.44.0-powerpc64-unknown-linux-gnu.tar.xz) = dff9aa248cd0efd1b28c6254c040cd30356ce973a3ed525530db783d6f7ebcdd32568bfa5c68c2aba0bb312ee74f03d1c91361e69830fe79ddd4d31e73fc2865 +SHA512 (rust-1.44.0-powerpc64le-unknown-linux-gnu.tar.xz) = d74802fc29641d08b5e5d526e91258c71d914daf0f33abea71ad7d300da4ae39d457b9d4e95b0b0811ec8ed5e60e7d0292e8e928f3079189e07887ce115bd466 +SHA512 (rust-1.44.0-s390x-unknown-linux-gnu.tar.xz) = 39fac45e0c1e8786275ba30ed13d13334c7f0fc03d653a3e0a3e174d18e244d9e4bb99614ed1465e7a21befb2542ed4d3a54d4ea2702da449b1e6a7770a43970 From 2023d1f6b78598235ca43644a16b996fa09d22c0 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jul 2020 07:19:49 +0000 Subject: [PATCH 02/20] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rust.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 723e884..ff08fa4 100644 --- a/rust.spec +++ b/rust.spec @@ -49,7 +49,7 @@ Name: rust Version: 1.45.0 -Release: 1%{?dist} +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) @@ -700,6 +700,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Wed Jul 29 2020 Fedora Release Engineering - 1.45.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Thu Jul 16 2020 Josh Stone - 1.45.0-1 - Update to 1.45.0. From d2688a551805dbb0916cf1741397e57694612b6d Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 30 Jul 2020 11:41:32 -0700 Subject: [PATCH 03/20] Update to 1.45.1. --- .gitignore | 1 + rust.spec | 7 +++++-- sources | 2 +- sources-bootstrap | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index 35637e0..6c921e2 100644 --- a/.gitignore +++ b/.gitignore @@ -287,3 +287,4 @@ /rust-1.44.0-powerpc64-unknown-linux-gnu.tar.xz /rust-1.44.0-powerpc64le-unknown-linux-gnu.tar.xz /rust-1.44.0-s390x-unknown-linux-gnu.tar.xz +/rustc-1.45.1-src.tar.xz diff --git a/rust.spec b/rust.spec index ff08fa4..1489ff2 100644 --- a/rust.spec +++ b/rust.spec @@ -48,8 +48,8 @@ %endif Name: rust -Version: 1.45.0 -Release: 2%{?dist} +Version: 1.45.1 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -700,6 +700,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Jul 30 2020 Josh Stone - 1.45.1-1 +- Update to 1.45.1. + * Wed Jul 29 2020 Fedora Release Engineering - 1.45.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index fbfacd4..fe11332 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.45.0-src.tar.xz) = ff049eb65b36e6c64531d56251ebd446336a782f26504eccf375df1c22fa94b5f18e84660cef423edb815c1b31a1a7c9e57aea4aa0779576f3b0d7e81e19427b +SHA512 (rustc-1.45.1-src.tar.xz) = ef71a1706c84fa8557f481d310033285a41ecd9b8d537bacb846d01ed9954b679b915272db57cd96d5ee097cc0134899e584d517c467a9d2949496312e5995df diff --git a/sources-bootstrap b/sources-bootstrap index 09c180b..ffb5848 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,4 +1,4 @@ -SHA512 (rustc-1.45.0-src.tar.xz) = ff049eb65b36e6c64531d56251ebd446336a782f26504eccf375df1c22fa94b5f18e84660cef423edb815c1b31a1a7c9e57aea4aa0779576f3b0d7e81e19427b +SHA512 (rustc-1.45.1-src.tar.xz) = ef71a1706c84fa8557f481d310033285a41ecd9b8d537bacb846d01ed9954b679b915272db57cd96d5ee097cc0134899e584d517c467a9d2949496312e5995df SHA512 (rust-1.44.0-x86_64-unknown-linux-gnu.tar.xz) = 25c762e07e178ffc1b96b4a113e437541d6dc18bd81fb9933af676e99ca391c6cdd8d420caabcfca1b3ddb987a84ff9eb1d0bdb3cca486e71925555f51ecaa4c SHA512 (rust-1.44.0-i686-unknown-linux-gnu.tar.xz) = 85ee1d7cd4581d9cdc18f0cfe89b0c78c32039f658b85c5f6a60ac8047864234bdff955e02d6e15ae40dd98e8e27cb3d83fab978dba6373f9e487cfd2ba0b594 SHA512 (rust-1.44.0-armv7-unknown-linux-gnueabihf.tar.xz) = 59fd1f0dc058118a838c4c3c66dd5a5c2acb1b05ebf4525188846577cb22c4b46a57605d6a9cede5fbd34c0b5c638434a186d1ce3693ace6be8105c265b59b7b From 99cf40c754dcb1fb951a4f84db983262571c2a17 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 3 Aug 2020 10:33:21 -0700 Subject: [PATCH 04/20] Update to 1.45.2. --- .gitignore | 1 + rust.spec | 5 ++++- sources | 2 +- sources-bootstrap | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 6c921e2..6cde7da 100644 --- a/.gitignore +++ b/.gitignore @@ -288,3 +288,4 @@ /rust-1.44.0-powerpc64le-unknown-linux-gnu.tar.xz /rust-1.44.0-s390x-unknown-linux-gnu.tar.xz /rustc-1.45.1-src.tar.xz +/rustc-1.45.2-src.tar.xz diff --git a/rust.spec b/rust.spec index 1489ff2..4680a96 100644 --- a/rust.spec +++ b/rust.spec @@ -48,7 +48,7 @@ %endif Name: rust -Version: 1.45.1 +Version: 1.45.2 Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -700,6 +700,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Mon Aug 03 2020 Josh Stone - 1.45.2-1 +- Update to 1.45.2. + * Thu Jul 30 2020 Josh Stone - 1.45.1-1 - Update to 1.45.1. diff --git a/sources b/sources index fe11332..9c4067f 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.45.1-src.tar.xz) = ef71a1706c84fa8557f481d310033285a41ecd9b8d537bacb846d01ed9954b679b915272db57cd96d5ee097cc0134899e584d517c467a9d2949496312e5995df +SHA512 (rustc-1.45.2-src.tar.xz) = cc6250c0bc844e77ca6dd7ae013e434ed3009b001914114866ed31f28edf3960221454d131e298b15050e3b8153fb8298d509559c2f7307c64611aa8e36b4d25 diff --git a/sources-bootstrap b/sources-bootstrap index ffb5848..cd3a489 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,4 +1,4 @@ -SHA512 (rustc-1.45.1-src.tar.xz) = ef71a1706c84fa8557f481d310033285a41ecd9b8d537bacb846d01ed9954b679b915272db57cd96d5ee097cc0134899e584d517c467a9d2949496312e5995df +SHA512 (rustc-1.45.2-src.tar.xz) = cc6250c0bc844e77ca6dd7ae013e434ed3009b001914114866ed31f28edf3960221454d131e298b15050e3b8153fb8298d509559c2f7307c64611aa8e36b4d25 SHA512 (rust-1.44.0-x86_64-unknown-linux-gnu.tar.xz) = 25c762e07e178ffc1b96b4a113e437541d6dc18bd81fb9933af676e99ca391c6cdd8d420caabcfca1b3ddb987a84ff9eb1d0bdb3cca486e71925555f51ecaa4c SHA512 (rust-1.44.0-i686-unknown-linux-gnu.tar.xz) = 85ee1d7cd4581d9cdc18f0cfe89b0c78c32039f658b85c5f6a60ac8047864234bdff955e02d6e15ae40dd98e8e27cb3d83fab978dba6373f9e487cfd2ba0b594 SHA512 (rust-1.44.0-armv7-unknown-linux-gnueabihf.tar.xz) = 59fd1f0dc058118a838c4c3c66dd5a5c2acb1b05ebf4525188846577cb22c4b46a57605d6a9cede5fbd34c0b5c638434a186d1ce3693ace6be8105c265b59b7b From 105a7c00129f8f526fb3e15bce8c481874c2b88c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 27 Aug 2020 10:49:15 -0700 Subject: [PATCH 05/20] Update to 1.46.0. I've unbundled libgit2 for fedora >= 32, where we have libgit2-1.0.1. I've also pulled in some RHEL config and patches I had in other branches, but these should end up as no-ops for Fedora. --- .gitignore | 8 + ...er_exists-test-on-single-cpu-systems.patch | 29 ++++ rust.spec | 137 ++++++++++++------ rustc-1.42.0-disable-libssh2.patch | 42 ++++++ rustc-1.45.0-disable-http2.patch | 66 +++++++++ rustc-1.45.0-no-default-pie.patch | 20 +++ sources | 2 +- sources-bootstrap | 16 +- 8 files changed, 266 insertions(+), 54 deletions(-) create mode 100644 0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch create mode 100644 rustc-1.42.0-disable-libssh2.patch create mode 100644 rustc-1.45.0-disable-http2.patch create mode 100644 rustc-1.45.0-no-default-pie.patch diff --git a/.gitignore b/.gitignore index 6cde7da..25c173a 100644 --- a/.gitignore +++ b/.gitignore @@ -289,3 +289,11 @@ /rust-1.44.0-s390x-unknown-linux-gnu.tar.xz /rustc-1.45.1-src.tar.xz /rustc-1.45.2-src.tar.xz +/rustc-1.46.0-src.tar.xz +/rust-1.45.2-aarch64-unknown-linux-gnu.tar.xz +/rust-1.45.2-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.45.2-i686-unknown-linux-gnu.tar.xz +/rust-1.45.2-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.45.2-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.45.2-s390x-unknown-linux-gnu.tar.xz +/rust-1.45.2-x86_64-unknown-linux-gnu.tar.xz diff --git a/0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch b/0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch new file mode 100644 index 0000000..1650679 --- /dev/null +++ b/0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch @@ -0,0 +1,29 @@ +From 02fc16aece46abcd23d2ade2d969497f07fe26ab Mon Sep 17 00:00:00 2001 +From: Alex Crichton +Date: Fri, 7 Aug 2020 12:50:25 -0700 +Subject: [PATCH] Fix jobserver_exists test on single-cpu systems + +Closes #8595 +--- + tests/testsuite/jobserver.rs | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/tests/testsuite/jobserver.rs b/tests/testsuite/jobserver.rs +index 9e91c956cd75..16518ee2c614 100644 +--- a/tests/testsuite/jobserver.rs ++++ b/tests/testsuite/jobserver.rs +@@ -51,7 +51,10 @@ fn jobserver_exists() { + .file("src/lib.rs", "") + .build(); + +- p.cargo("build").run(); ++ // Explicitly use `-j2` to ensure that there's eventually going to be a ++ // token to read from `valdiate` above, since running the build script ++ // itself consumes a token. ++ p.cargo("build -j2").run(); + } + + #[cargo_test] +-- +2.26.2 + diff --git a/rust.spec b/rust.spec index 4680a96..ed134fb 100644 --- a/rust.spec +++ b/rust.spec @@ -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.44.0 -%global bootstrap_cargo 1.44.0 -%global bootstrap_channel 1.44.0 -%global bootstrap_date 2020-06-04 +%global bootstrap_rust 1.45.2 +%global bootstrap_cargo 1.45.2 +%global bootstrap_channel 1.45.2 +%global bootstrap_date 2020-08-03 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -22,33 +22,37 @@ # We can also choose to just use Rust's bundled LLVM, in case the system LLVM # is insufficient. Rust currently requires LLVM 8.0+. -%if 0%{?rhel} && !0%{?epel} -%bcond_without bundled_llvm -%else %bcond_with bundled_llvm + +# Requires stable libgit2 1.0 +%if 0%{?fedora} >= 32 +%bcond_with bundled_libgit2 +%else +%bcond_without bundled_libgit2 %endif -# libgit2-sys expects to use its bundled library, which is sometimes just a -# snapshot of libgit2's master branch. This can mean the FFI declarations -# won't match our released libgit2.so, e.g. having changed struct fields. -# So, tread carefully if you toggle this... -%bcond_without bundled_libgit2 - %if 0%{?rhel} -%bcond_without bundled_libssh2 +# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) +%bcond_without disabled_libssh2 %else -%bcond_with bundled_libssh2 +%bcond_with disabled_libssh2 +%endif + +%if 0%{?rhel} && 0%{?rhel} < 8 +%bcond_with curl_http2 +%else +%bcond_without curl_http2 %endif # LLDB isn't available everywhere... -%if !0%{?rhel} -%bcond_without lldb -%else +%if 0%{?rhel} && 0%{?rhel} < 8 %bcond_with lldb +%else +%bcond_without lldb %endif Name: rust -Version: 1.45.2 +Version: 1.46.0 Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -63,6 +67,23 @@ ExclusiveArch: %{rust_arches} %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz +# https://github.com/rust-lang/cargo/pull/8598 +Patch1: 0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch + +### RHEL-specific patches below ### + +# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) +Patch100: rustc-1.42.0-disable-libssh2.patch + +# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys +# will try to build it statically -- instead we turn off the feature. +Patch101: rustc-1.45.0-disable-http2.patch + +# kernel rh1410097 causes too-small stacks for PIE. +# (affects RHEL6 kernels when building for RHEL7) +Patch102: rustc-1.45.0-no-default-pie.patch + + # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -73,6 +94,8 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz arch = "powerpc64" elseif arch == "ppc64le" then arch = "powerpc64le" + elseif arch == "riscv64" then + arch = "riscv64gc" end return arch.."-unknown-linux-"..abi end} @@ -106,11 +129,11 @@ end} Provides: bundled(%{name}-bootstrap) = %{bootstrap_rust} %else BuildRequires: cargo >= %{bootstrap_cargo} -%if 0%{?fedora} >= 27 -BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version}) -%else +%if 0%{?rhel} && 0%{?rhel} < 8 BuildRequires: %{name} >= %{bootstrap_rust} BuildConflicts: %{name} > %{version} +%else +BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version}) %endif %global local_rust_root %{_prefix} %endif @@ -120,6 +143,8 @@ BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ncurses-devel BuildRequires: curl +# explicit curl-devel to avoid httpd24-curl (rhbz1540167) +BuildRequires: curl-devel BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(openssl) @@ -129,16 +154,12 @@ BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libgit2) >= 1.0.0 %endif -%if %without bundled_libssh2 +%if %{without disabled_libssh2} && %{without bundled_libssh2} # needs libssh2_userauth_publickey_frommemory BuildRequires: pkgconfig(libssh2) >= 1.6.0 %endif -%if 0%{?rhel} && 0%{?rhel} <= 7 -%global python python2 -%else %global python python3 -%endif BuildRequires: %{python} %if %with bundled_llvm @@ -146,7 +167,7 @@ BuildRequires: cmake3 >= 3.4.3 Provides: bundled(llvm) = 10.0.1 %else BuildRequires: cmake >= 2.8.11 -%if 0%{?epel} +%if 0%{?epel} == 7 %global llvm llvm9.0 %endif %if %defined llvm @@ -192,14 +213,14 @@ Requires: /usr/bin/cc # While we don't want to encourage dynamic linking to Rust shared libraries, as # there's no stable ABI, we still need the unallocated metadata (.rustc) to -# support custom-derive plugins like #[proc_macro_derive(Foo)]. But eu-strip is -# very eager by default, so we have to limit it to -g, only debugging symbols. -%if 0%{?fedora} >= 27 -# Newer find-debuginfo.sh supports --keep-section, which is preferable. rhbz1465997 -%global _find_debuginfo_opts --keep-section .rustc -%else +# support custom-derive plugins like #[proc_macro_derive(Foo)]. +%if 0%{?rhel} && 0%{?rhel} < 8 +# eu-strip is very eager by default, so we have to limit it to -g, only debugging symbols. %global _find_debuginfo_opts -g %undefine _include_minidebuginfo +%else +# Newer find-debuginfo.sh supports --keep-section, which is preferable. rhbz1465997 +%global _find_debuginfo_opts --keep-section .rustc %endif # Use hardening ldflags. @@ -251,11 +272,7 @@ programs. Summary: LLDB pretty printers for Rust BuildArch: noarch Requires: lldb -%if 0%{?fedora} >= 31 -Requires: python3-lldb -%else -Requires: python2-lldb -%endif +Requires: %{python}-lldb Requires: %{name}-debugger-common = %{version}-%{release} %description lldb @@ -391,8 +408,24 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} -%if "%{python}" == "python3" -sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure +%patch1 -p1 -d src/tools/cargo + +%if %with disabled_libssh2 +%patch100 -p1 +%endif + +%if %without curl_http2 +%patch101 -p1 +rm -rf vendor/libnghttp2-sys/ +%endif + +%if 0%{?rhel} && 0%{?rhel} < 8 +%patch102 -p1 -b .no-pie +%endif + +%if "%{python}" != "python3" +# Use our preferred python first +sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure %endif %if %without bundled_llvm @@ -413,6 +446,9 @@ rm -rf vendor/libgit2-sys/libgit2/ %if %without bundled_libssh2 rm -rf vendor/libssh2-sys/libssh2/ %endif +%if %with disabled_libssh2 +rm -rf vendor/libssh2-sys/ +%endif # This only affects the transient rust-installer, but let it use our dynamic xz-libs sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs @@ -420,7 +456,7 @@ sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs # rename bundled license for packaging cp -a vendor/backtrace-sys/src/libbacktrace/LICENSE{,-libbacktrace} -%if %{with bundled_llvm} && 0%{?epel} +%if %{with bundled_llvm} && 0%{?epel} == 7 mkdir -p cmake-bin ln -s /usr/bin/cmake3 cmake-bin/cmake %global cmake_path $PWD/cmake-bin @@ -472,7 +508,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %ifarch %{arm} %{ix86} s390x # full debuginfo is exhausting memory; just do libstd for now # https://github.com/rust-lang/rust/issues/45854 -%if (0%{?fedora} && 0%{?fedora} < 27) || (0%{?rhel} && 0%{?rhel} <= 7) +%if 0%{?rhel} && 0%{?rhel} < 8 # Older rpmbuild didn't work with partial debuginfo coverage. %global debug_package %{nil} %define enable_debuginfo --debuginfo-level=0 @@ -490,6 +526,14 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %define codegen_units_std --set rust.codegen-units-std=1 %endif +# Some builders have relatively little memory for their CPU count. +# At least 2GB per CPU is a good rule of thumb for building rustc. +ncpus=$(/usr/bin/getconf _NPROCESSORS_ONLN) +max_cpus=$(( ($(free -g | awk '/^Mem:/{print $2}') + 1) / 2 )) +if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then + ncpus="$max_cpus" +fi + %configure --disable-option-checking \ --libdir=%{common_libdir} \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ @@ -507,7 +551,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %{?codegen_units_std} \ --release-channel=%{channel} -%{python} ./x.py build +%{python} ./x.py build -j "$ncpus" --stage 2 %{python} ./x.py doc @@ -621,7 +665,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %files debugger-common %dir %{rustlibdir} %dir %{rustlibdir}/etc -%{rustlibdir}/etc/debugger_*.py* +%{rustlibdir}/etc/rust_*.py* %files gdb @@ -700,6 +744,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Aug 27 2020 Josh Stone - 1.46.0-1 +- Update to 1.46.0. + * Mon Aug 03 2020 Josh Stone - 1.45.2-1 - Update to 1.45.2. diff --git a/rustc-1.42.0-disable-libssh2.patch b/rustc-1.42.0-disable-libssh2.patch new file mode 100644 index 0000000..770ad34 --- /dev/null +++ b/rustc-1.42.0-disable-libssh2.patch @@ -0,0 +1,42 @@ +--- rustc-1.42.0-src/Cargo.lock.orig 2020-03-09 15:11:17.000000000 -0700 ++++ rustc-1.42.0-src/Cargo.lock 2020-04-02 16:39:22.268896227 -0700 +@@ -1796,7 +1796,6 @@ + dependencies = [ + "cc", + "libc", +- "libssh2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +@@ -1813,20 +1812,6 @@ + ] + + [[package]] +-name = "libssh2-sys" +-version = "0.2.14" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "36aa6e813339d3a063292b77091dfbbb6152ff9006a459895fa5bebed7d34f10" +-dependencies = [ +- "cc", +- "libc", +- "libz-sys", +- "openssl-sys", +- "pkg-config", +- "vcpkg", +-] +- +-[[package]] + name = "libz-sys" + version = "1.0.25" + source = "registry+https://github.com/rust-lang/crates.io-index" +--- rustc-1.42.0-src/vendor/git2/Cargo.toml.orig 2020-03-09 17:00:19.000000000 -0700 ++++ rustc-1.42.0-src/vendor/git2/Cargo.toml 2020-04-02 16:38:46.163664007 -0700 +@@ -55,7 +55,7 @@ + version = "0.1.39" + + [features] +-default = ["ssh", "https", "ssh_key_from_memory"] ++default = ["https"] + https = ["libgit2-sys/https", "openssl-sys", "openssl-probe"] + ssh = ["libgit2-sys/ssh"] + ssh_key_from_memory = ["libgit2-sys/ssh_key_from_memory"] diff --git a/rustc-1.45.0-disable-http2.patch b/rustc-1.45.0-disable-http2.patch new file mode 100644 index 0000000..875b22a --- /dev/null +++ b/rustc-1.45.0-disable-http2.patch @@ -0,0 +1,66 @@ +--- rustc-1.45.0-src/Cargo.lock.orig 2020-07-13 09:27:24.000000000 -0700 ++++ rustc-1.45.0-src/Cargo.lock 2020-07-16 12:12:32.253903599 -0700 +@@ -896,7 +896,6 @@ + dependencies = [ + "cc", + "libc", +- "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +@@ -1875,16 +1874,6 @@ + ] + + [[package]] +-name = "libnghttp2-sys" +-version = "0.1.2" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "02254d44f4435dd79e695f2c2b83cd06a47919adea30216ceaf0c57ca0a72463" +-dependencies = [ +- "cc", +- "libc", +-] +- +-[[package]] + name = "libz-sys" + version = "1.0.25" + source = "registry+https://github.com/rust-lang/crates.io-index" +--- rustc-1.45.0-src/src/tools/cargo/Cargo.toml.orig 2020-07-13 09:27:49.000000000 -0700 ++++ rustc-1.45.0-src/src/tools/cargo/Cargo.toml 2020-07-16 12:12:32.253903599 -0700 +@@ -25,7 +25,7 @@ + crates-io = { path = "crates/crates-io", version = "0.31.1" } + crossbeam-utils = "0.7" + crypto-hash = "0.3.1" +-curl = { version = "0.4.23", features = ["http2"] } ++curl = { version = "0.4.23", features = [] } + curl-sys = "0.4.22" + env_logger = "0.7.0" + pretty_env_logger = { version = "0.4", optional = true } +--- rustc-1.45.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-07-13 09:27:49.000000000 -0700 ++++ rustc-1.45.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-07-16 12:12:32.253903599 -0700 +@@ -393,14 +393,8 @@ + // Also note that pipelining is disabled as curl authors have indicated + // that it's buggy, and we've empirically seen that it's buggy with HTTP + // proxies. +- let mut multi = Multi::new(); +- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true); +- multi +- .pipelining(false, multiplexing) +- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?; +- +- // let's not flood crates.io with connections +- multi.set_max_host_connections(2)?; ++ let multi = Multi::new(); ++ let multiplexing = false; + + Ok(PackageSet { + packages: package_ids +@@ -563,7 +557,7 @@ + macro_rules! try_old_curl { + ($e:expr, $msg:expr) => { + let result = $e; +- if cfg!(target_os = "macos") { ++ if cfg!(any(target_os = "linux", target_os = "macos")) { + if let Err(e) = result { + warn!("ignoring libcurl {} error: {}", $msg, e); + } diff --git a/rustc-1.45.0-no-default-pie.patch b/rustc-1.45.0-no-default-pie.patch new file mode 100644 index 0000000..726df24 --- /dev/null +++ b/rustc-1.45.0-no-default-pie.patch @@ -0,0 +1,20 @@ +diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs +index dcce1d45298c..5c11f7276f26 100644 +--- a/src/librustc_codegen_ssa/back/link.rs ++++ b/src/librustc_codegen_ssa/back/link.rs +@@ -1184,10 +1184,12 @@ fn exec_linker( + } + + fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { +- let kind = match (crate_type, sess.crt_static(Some(crate_type)), sess.relocation_model()) { +- (CrateType::Executable, false, RelocModel::Pic) => LinkOutputKind::DynamicPicExe, ++ // Only use PIE if explicity specified. ++ let explicit_pic = matches!(sess.opts.cg.relocation_model, Some(RelocModel::Pic)); ++ let kind = match (crate_type, sess.crt_static(Some(crate_type)), explicit_pic) { ++ (CrateType::Executable, false, true) => LinkOutputKind::DynamicPicExe, + (CrateType::Executable, false, _) => LinkOutputKind::DynamicNoPicExe, +- (CrateType::Executable, true, RelocModel::Pic) => LinkOutputKind::StaticPicExe, ++ (CrateType::Executable, true, true) => LinkOutputKind::StaticPicExe, + (CrateType::Executable, true, _) => LinkOutputKind::StaticNoPicExe, + (_, true, _) => LinkOutputKind::StaticDylib, + (_, false, _) => LinkOutputKind::DynamicDylib, diff --git a/sources b/sources index 9c4067f..11a9b85 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.45.2-src.tar.xz) = cc6250c0bc844e77ca6dd7ae013e434ed3009b001914114866ed31f28edf3960221454d131e298b15050e3b8153fb8298d509559c2f7307c64611aa8e36b4d25 +SHA512 (rustc-1.46.0-src.tar.xz) = 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 diff --git a/sources-bootstrap b/sources-bootstrap index cd3a489..422747e 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.45.2-src.tar.xz) = cc6250c0bc844e77ca6dd7ae013e434ed3009b001914114866ed31f28edf3960221454d131e298b15050e3b8153fb8298d509559c2f7307c64611aa8e36b4d25 -SHA512 (rust-1.44.0-x86_64-unknown-linux-gnu.tar.xz) = 25c762e07e178ffc1b96b4a113e437541d6dc18bd81fb9933af676e99ca391c6cdd8d420caabcfca1b3ddb987a84ff9eb1d0bdb3cca486e71925555f51ecaa4c -SHA512 (rust-1.44.0-i686-unknown-linux-gnu.tar.xz) = 85ee1d7cd4581d9cdc18f0cfe89b0c78c32039f658b85c5f6a60ac8047864234bdff955e02d6e15ae40dd98e8e27cb3d83fab978dba6373f9e487cfd2ba0b594 -SHA512 (rust-1.44.0-armv7-unknown-linux-gnueabihf.tar.xz) = 59fd1f0dc058118a838c4c3c66dd5a5c2acb1b05ebf4525188846577cb22c4b46a57605d6a9cede5fbd34c0b5c638434a186d1ce3693ace6be8105c265b59b7b -SHA512 (rust-1.44.0-aarch64-unknown-linux-gnu.tar.xz) = c853a585bd76730a9ed1e95c12baf2939928fd3c5ba7cc0f95c03ec472c0012f01d0b7d7c37e21dfdcc1d1eca4c7e392709a2585e42bc759b636e95b4ab870d0 -SHA512 (rust-1.44.0-powerpc64-unknown-linux-gnu.tar.xz) = dff9aa248cd0efd1b28c6254c040cd30356ce973a3ed525530db783d6f7ebcdd32568bfa5c68c2aba0bb312ee74f03d1c91361e69830fe79ddd4d31e73fc2865 -SHA512 (rust-1.44.0-powerpc64le-unknown-linux-gnu.tar.xz) = d74802fc29641d08b5e5d526e91258c71d914daf0f33abea71ad7d300da4ae39d457b9d4e95b0b0811ec8ed5e60e7d0292e8e928f3079189e07887ce115bd466 -SHA512 (rust-1.44.0-s390x-unknown-linux-gnu.tar.xz) = 39fac45e0c1e8786275ba30ed13d13334c7f0fc03d653a3e0a3e174d18e244d9e4bb99614ed1465e7a21befb2542ed4d3a54d4ea2702da449b1e6a7770a43970 +SHA512 (rustc-1.46.0-src.tar.xz) = 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 +SHA512 (rust-1.45.2-aarch64-unknown-linux-gnu.tar.xz) = b4b3fb198bf85192563fb8b6017cf07f92b9c26d6e590efa9476aa878871839315db935e3353c664e635a229f17b0979bcfd31488e29e02ce0dc266d252b9e41 +SHA512 (rust-1.45.2-armv7-unknown-linux-gnueabihf.tar.xz) = dbf36643e87fc31cda5c0d5fc8b1589ce80531a94379060106ce81d525cd77c36ac6f89d5ae05d8872020baf31e5391422ed58c01ec6f801428d67e2e10896fb +SHA512 (rust-1.45.2-i686-unknown-linux-gnu.tar.xz) = afe81d38d8692e5792e111c3b2c83da4dffa99c9a8a89b5f1e10a6e449e49d4dd19d68c96d7b2f5013054d141bf4b1a08da1c2b877c7bbe87f81c19232020ecb +SHA512 (rust-1.45.2-powerpc64le-unknown-linux-gnu.tar.xz) = 6cb169efae4c847ba204fa24c1f40b4320e53928ab8966727971a5bc7a565eaa6142f40904cec93927543b25450db23d816c20653f53d3aa36ac616fe85ee6ba +SHA512 (rust-1.45.2-powerpc64-unknown-linux-gnu.tar.xz) = fbf909e5f9135d5216dbbc1be0d1e3159000c58b83bcdeb9839a12f5a9ff56261a61edfab93cd21800a90ff56bb9eff8a1ad83c60fa54bf0cf4b149219dbe914 +SHA512 (rust-1.45.2-s390x-unknown-linux-gnu.tar.xz) = 7727cfbeed29e8a1e79398392332b25b5498900f593f3d08414c70b44da0cd06dca0791a361956c47c3367e6572d59d885085d3cd99fd4a9c28c431a158ddbfd +SHA512 (rust-1.45.2-x86_64-unknown-linux-gnu.tar.xz) = dfd3ce0cc42ae82a2d13866c5c94c304b031e253a1485ccc1d6ecd62cc05018b01ac7b2183297bc45ada286b5e91d1344aa3d8417694ab834f8265c7838b4fd2 From aacb4980d2c7ccc07fd9105c8bb31468c5ccbec7 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Fri, 28 Aug 2020 23:03:37 +0200 Subject: [PATCH 06/20] fix LTO with doctests (backported cargo PR#8657) --- 0002-Fix-LTO-with-doctests.patch | 133 +++++++++++++++++++++++++++++++ rust.spec | 8 +- 2 files changed, 140 insertions(+), 1 deletion(-) create mode 100644 0002-Fix-LTO-with-doctests.patch diff --git a/0002-Fix-LTO-with-doctests.patch b/0002-Fix-LTO-with-doctests.patch new file mode 100644 index 0000000..e251c11 --- /dev/null +++ b/0002-Fix-LTO-with-doctests.patch @@ -0,0 +1,133 @@ +From 2c9deaabf99dab9998f6ddbbe496d19ff7ce31f0 Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Fri, 28 Aug 2020 21:56:45 +0200 +Subject: [PATCH 2/2] Fix LTO with doctests + +--- + .../src/cargo/core/compiler/context/mod.rs | 3 +- + .../cargo/src/cargo/core/compiler/mod.rs | 59 +++++---------- + src/tools/cargo/src/cargo/core/profiles.rs | 7 +- + src/tools/cargo/tests/testsuite/lto.rs | 71 ++++++++++++++++--- + 4 files changed, 85 insertions(+), 55 deletions(-) + +diff --git a/src/tools/cargo/src/cargo/core/compiler/context/mod.rs b/src/tools/cargo/src/cargo/core/compiler/context/mod.rs +index 52b954dd1..82831f423 100644 +--- a/src/tools/cargo/src/cargo/core/compiler/context/mod.rs ++++ b/src/tools/cargo/src/cargo/core/compiler/context/mod.rs +@@ -210,7 +210,8 @@ impl<'a, 'cfg> Context<'a, 'cfg> { + // Collect information for `rustdoc --test`. + if unit.mode.is_doc_test() { + let mut unstable_opts = false; +- let args = compiler::extern_args(&self, unit, &mut unstable_opts)?; ++ let mut args = compiler::extern_args(&self, unit, &mut unstable_opts)?; ++ args.extend(compiler::lto_args(&self, unit)); + self.compilation.to_doc_test.push(compilation::Doctest { + unit: unit.clone(), + args, +diff --git a/src/tools/cargo/src/cargo/core/compiler/mod.rs b/src/tools/cargo/src/cargo/core/compiler/mod.rs +index 9399c5042..47d2b9bb4 100644 +--- a/src/tools/cargo/src/cargo/core/compiler/mod.rs ++++ b/src/tools/cargo/src/cargo/core/compiler/mod.rs +@@ -783,49 +783,9 @@ fn build_base_args( + cmd.arg("-C").arg(format!("panic={}", panic)); + } + +- match cx.lto[unit] { +- lto::Lto::Run(None) => { +- cmd.arg("-C").arg("lto"); +- } +- lto::Lto::Run(Some(s)) => { +- cmd.arg("-C").arg(format!("lto={}", s)); +- } +- lto::Lto::Off => { +- cmd.arg("-C").arg("lto=off"); +- } +- lto::Lto::ObjectAndBitcode => {} // this is rustc's default +- lto::Lto::OnlyBitcode => { +- // Note that this compiler flag, like the one below, is just an +- // optimization in terms of build time. If we don't pass it then +- // both object code and bitcode will show up. This is lagely just +- // compat until the feature lands on stable and we can remove the +- // conditional branch. +- if cx +- .bcx +- .target_data +- .info(CompileKind::Host) +- .supports_embed_bitcode +- .unwrap() +- { +- cmd.arg("-Clinker-plugin-lto"); +- } +- } +- lto::Lto::OnlyObject => { +- if cx +- .bcx +- .target_data +- .info(CompileKind::Host) +- .supports_embed_bitcode +- .unwrap() +- { +- cmd.arg("-Cembed-bitcode=no"); +- } +- } +- } ++ cmd.args(<o_args(cx, unit)); + + if let Some(n) = codegen_units { +- // There are some restrictions with LTO and codegen-units, so we +- // only add codegen units when LTO is not used. + cmd.arg("-C").arg(&format!("codegen-units={}", n)); + } + +@@ -952,6 +912,23 @@ fn build_base_args( + Ok(()) + } + ++fn lto_args(cx: &Context<'_, '_>, unit: &Unit) -> Vec { ++ let mut result = Vec::new(); ++ let mut push = |arg: &str| { ++ result.push(OsString::from("-C")); ++ result.push(OsString::from(arg)); ++ }; ++ match cx.lto[unit] { ++ lto::Lto::Run(None) => push("lto"), ++ lto::Lto::Run(Some(s)) => push(&format!("lto={}", s)), ++ lto::Lto::Off => push("lto=off"), ++ lto::Lto::ObjectAndBitcode => {} // this is rustc's default ++ lto::Lto::OnlyBitcode => push("linker-plugin-lto"), ++ lto::Lto::OnlyObject => push("embed-bitcode=no"), ++ } ++ result ++} ++ + fn build_deps_args( + cmd: &mut ProcessBuilder, + cx: &mut Context<'_, '_>, +diff --git a/src/tools/cargo/src/cargo/core/profiles.rs b/src/tools/cargo/src/cargo/core/profiles.rs +index 6a28bd261..ca0c2e417 100644 +--- a/src/tools/cargo/src/cargo/core/profiles.rs ++++ b/src/tools/cargo/src/cargo/core/profiles.rs +@@ -302,7 +302,7 @@ impl Profiles { + }; + + match mode { +- CompileMode::Test | CompileMode::Bench => { ++ CompileMode::Test | CompileMode::Bench | CompileMode::Doctest => { + if release { + ( + InternedString::new("bench"), +@@ -315,10 +315,7 @@ impl Profiles { + ) + } + } +- CompileMode::Build +- | CompileMode::Check { .. } +- | CompileMode::Doctest +- | CompileMode::RunCustomBuild => { ++ CompileMode::Build | CompileMode::Check { .. } | CompileMode::RunCustomBuild => { + // Note: `RunCustomBuild` doesn't normally use this code path. + // `build_unit_profiles` normally ensures that it selects the + // ancestor's profile. However, `cargo clean -p` can hit this +-- +2.26.2 + diff --git a/rust.spec b/rust.spec index ed134fb..d5f9032 100644 --- a/rust.spec +++ b/rust.spec @@ -53,7 +53,7 @@ Name: rust Version: 1.46.0 -Release: 1%{?dist} +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) @@ -69,6 +69,8 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # https://github.com/rust-lang/cargo/pull/8598 Patch1: 0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch +# https://github.com/rust-lang/cargo/pull/8657 (backported) +Patch2: 0002-Fix-LTO-with-doctests.patch ### RHEL-specific patches below ### @@ -409,6 +411,7 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} %patch1 -p1 -d src/tools/cargo +%patch2 -p1 %if %with disabled_libssh2 %patch100 -p1 @@ -744,6 +747,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Fri Aug 28 2020 Fabio Valentini - 1.46.0-2 +- Fix LTO with doctests (backported cargo PR#8657). + * Thu Aug 27 2020 Josh Stone - 1.46.0-1 - Update to 1.46.0. From aac4471f406d3a0eae526133ff140062cd0374ea Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 9 Oct 2020 16:13:53 -0700 Subject: [PATCH 07/20] Update to 1.47.0. --- .gitignore | 8 ++ ...er_exists-test-on-single-cpu-systems.patch | 29 ---- ...iveEndian-in-symbolize-gimli-Context.patch | 28 ++++ 0002-Fix-LTO-with-doctests.patch | 133 ------------------ rust.spec | 78 +++++----- ....patch => rustc-1.47.0-disable-http2.patch | 26 ++-- ...atch => rustc-1.47.0-disable-libssh2.patch | 20 +-- sources | 2 +- sources-bootstrap | 16 +-- 9 files changed, 104 insertions(+), 236 deletions(-) delete mode 100644 0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch create mode 100644 0001-use-NativeEndian-in-symbolize-gimli-Context.patch delete mode 100644 0002-Fix-LTO-with-doctests.patch rename rustc-1.45.0-disable-http2.patch => rustc-1.47.0-disable-http2.patch (69%) rename rustc-1.42.0-disable-libssh2.patch => rustc-1.47.0-disable-libssh2.patch (58%) diff --git a/.gitignore b/.gitignore index 25c173a..a9378d6 100644 --- a/.gitignore +++ b/.gitignore @@ -297,3 +297,11 @@ /rust-1.45.2-powerpc64-unknown-linux-gnu.tar.xz /rust-1.45.2-s390x-unknown-linux-gnu.tar.xz /rust-1.45.2-x86_64-unknown-linux-gnu.tar.xz +/rustc-1.47.0-src.tar.xz +/rust-1.46.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.46.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.46.0-i686-unknown-linux-gnu.tar.xz +/rust-1.46.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.46.0-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.46.0-s390x-unknown-linux-gnu.tar.xz +/rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz diff --git a/0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch b/0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch deleted file mode 100644 index 1650679..0000000 --- a/0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 02fc16aece46abcd23d2ade2d969497f07fe26ab Mon Sep 17 00:00:00 2001 -From: Alex Crichton -Date: Fri, 7 Aug 2020 12:50:25 -0700 -Subject: [PATCH] Fix jobserver_exists test on single-cpu systems - -Closes #8595 ---- - tests/testsuite/jobserver.rs | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/tests/testsuite/jobserver.rs b/tests/testsuite/jobserver.rs -index 9e91c956cd75..16518ee2c614 100644 ---- a/tests/testsuite/jobserver.rs -+++ b/tests/testsuite/jobserver.rs -@@ -51,7 +51,10 @@ fn jobserver_exists() { - .file("src/lib.rs", "") - .build(); - -- p.cargo("build").run(); -+ // Explicitly use `-j2` to ensure that there's eventually going to be a -+ // token to read from `valdiate` above, since running the build script -+ // itself consumes a token. -+ p.cargo("build -j2").run(); - } - - #[cargo_test] --- -2.26.2 - diff --git a/0001-use-NativeEndian-in-symbolize-gimli-Context.patch b/0001-use-NativeEndian-in-symbolize-gimli-Context.patch new file mode 100644 index 0000000..81b7a63 --- /dev/null +++ b/0001-use-NativeEndian-in-symbolize-gimli-Context.patch @@ -0,0 +1,28 @@ +From 6f8efee8c936de65bc31610eea30abd5461a5dd1 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Thu, 8 Oct 2020 15:53:49 -0700 +Subject: [PATCH] use NativeEndian in symbolize::gimli::Context + +`Object` uses `NativeEndian`, so the `Context` should too. + +Cc: https://github.com/rust-lang/rust/issues/77410 +--- + src/symbolize/gimli.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/symbolize/gimli.rs b/src/symbolize/gimli.rs +index 58ed8bafca3d..273ff43f1c8c 100644 +--- a/src/symbolize/gimli.rs ++++ b/src/symbolize/gimli.rs +@@ -5,7 +5,7 @@ + //! intended to wholesale replace the `libbacktrace.rs` implementation. + + use self::gimli::read::EndianSlice; +-use self::gimli::LittleEndian as Endian; ++use self::gimli::NativeEndian as Endian; + use self::mmap::Mmap; + use self::stash::Stash; + use super::BytesOrWideString; +-- +2.26.2 + diff --git a/0002-Fix-LTO-with-doctests.patch b/0002-Fix-LTO-with-doctests.patch deleted file mode 100644 index e251c11..0000000 --- a/0002-Fix-LTO-with-doctests.patch +++ /dev/null @@ -1,133 +0,0 @@ -From 2c9deaabf99dab9998f6ddbbe496d19ff7ce31f0 Mon Sep 17 00:00:00 2001 -From: Fabio Valentini -Date: Fri, 28 Aug 2020 21:56:45 +0200 -Subject: [PATCH 2/2] Fix LTO with doctests - ---- - .../src/cargo/core/compiler/context/mod.rs | 3 +- - .../cargo/src/cargo/core/compiler/mod.rs | 59 +++++---------- - src/tools/cargo/src/cargo/core/profiles.rs | 7 +- - src/tools/cargo/tests/testsuite/lto.rs | 71 ++++++++++++++++--- - 4 files changed, 85 insertions(+), 55 deletions(-) - -diff --git a/src/tools/cargo/src/cargo/core/compiler/context/mod.rs b/src/tools/cargo/src/cargo/core/compiler/context/mod.rs -index 52b954dd1..82831f423 100644 ---- a/src/tools/cargo/src/cargo/core/compiler/context/mod.rs -+++ b/src/tools/cargo/src/cargo/core/compiler/context/mod.rs -@@ -210,7 +210,8 @@ impl<'a, 'cfg> Context<'a, 'cfg> { - // Collect information for `rustdoc --test`. - if unit.mode.is_doc_test() { - let mut unstable_opts = false; -- let args = compiler::extern_args(&self, unit, &mut unstable_opts)?; -+ let mut args = compiler::extern_args(&self, unit, &mut unstable_opts)?; -+ args.extend(compiler::lto_args(&self, unit)); - self.compilation.to_doc_test.push(compilation::Doctest { - unit: unit.clone(), - args, -diff --git a/src/tools/cargo/src/cargo/core/compiler/mod.rs b/src/tools/cargo/src/cargo/core/compiler/mod.rs -index 9399c5042..47d2b9bb4 100644 ---- a/src/tools/cargo/src/cargo/core/compiler/mod.rs -+++ b/src/tools/cargo/src/cargo/core/compiler/mod.rs -@@ -783,49 +783,9 @@ fn build_base_args( - cmd.arg("-C").arg(format!("panic={}", panic)); - } - -- match cx.lto[unit] { -- lto::Lto::Run(None) => { -- cmd.arg("-C").arg("lto"); -- } -- lto::Lto::Run(Some(s)) => { -- cmd.arg("-C").arg(format!("lto={}", s)); -- } -- lto::Lto::Off => { -- cmd.arg("-C").arg("lto=off"); -- } -- lto::Lto::ObjectAndBitcode => {} // this is rustc's default -- lto::Lto::OnlyBitcode => { -- // Note that this compiler flag, like the one below, is just an -- // optimization in terms of build time. If we don't pass it then -- // both object code and bitcode will show up. This is lagely just -- // compat until the feature lands on stable and we can remove the -- // conditional branch. -- if cx -- .bcx -- .target_data -- .info(CompileKind::Host) -- .supports_embed_bitcode -- .unwrap() -- { -- cmd.arg("-Clinker-plugin-lto"); -- } -- } -- lto::Lto::OnlyObject => { -- if cx -- .bcx -- .target_data -- .info(CompileKind::Host) -- .supports_embed_bitcode -- .unwrap() -- { -- cmd.arg("-Cembed-bitcode=no"); -- } -- } -- } -+ cmd.args(<o_args(cx, unit)); - - if let Some(n) = codegen_units { -- // There are some restrictions with LTO and codegen-units, so we -- // only add codegen units when LTO is not used. - cmd.arg("-C").arg(&format!("codegen-units={}", n)); - } - -@@ -952,6 +912,23 @@ fn build_base_args( - Ok(()) - } - -+fn lto_args(cx: &Context<'_, '_>, unit: &Unit) -> Vec { -+ let mut result = Vec::new(); -+ let mut push = |arg: &str| { -+ result.push(OsString::from("-C")); -+ result.push(OsString::from(arg)); -+ }; -+ match cx.lto[unit] { -+ lto::Lto::Run(None) => push("lto"), -+ lto::Lto::Run(Some(s)) => push(&format!("lto={}", s)), -+ lto::Lto::Off => push("lto=off"), -+ lto::Lto::ObjectAndBitcode => {} // this is rustc's default -+ lto::Lto::OnlyBitcode => push("linker-plugin-lto"), -+ lto::Lto::OnlyObject => push("embed-bitcode=no"), -+ } -+ result -+} -+ - fn build_deps_args( - cmd: &mut ProcessBuilder, - cx: &mut Context<'_, '_>, -diff --git a/src/tools/cargo/src/cargo/core/profiles.rs b/src/tools/cargo/src/cargo/core/profiles.rs -index 6a28bd261..ca0c2e417 100644 ---- a/src/tools/cargo/src/cargo/core/profiles.rs -+++ b/src/tools/cargo/src/cargo/core/profiles.rs -@@ -302,7 +302,7 @@ impl Profiles { - }; - - match mode { -- CompileMode::Test | CompileMode::Bench => { -+ CompileMode::Test | CompileMode::Bench | CompileMode::Doctest => { - if release { - ( - InternedString::new("bench"), -@@ -315,10 +315,7 @@ impl Profiles { - ) - } - } -- CompileMode::Build -- | CompileMode::Check { .. } -- | CompileMode::Doctest -- | CompileMode::RunCustomBuild => { -+ CompileMode::Build | CompileMode::Check { .. } | CompileMode::RunCustomBuild => { - // Note: `RunCustomBuild` doesn't normally use this code path. - // `build_unit_profiles` normally ensures that it selects the - // ancestor's profile. However, `cargo clean -p` can hit this --- -2.26.2 - diff --git a/rust.spec b/rust.spec index d5f9032..29b1481 100644 --- a/rust.spec +++ b/rust.spec @@ -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.45.2 -%global bootstrap_cargo 1.45.2 -%global bootstrap_channel 1.45.2 -%global bootstrap_date 2020-08-03 +%global bootstrap_rust 1.46.0 +%global bootstrap_cargo 1.46.0 +%global bootstrap_channel 1.46.0 +%global bootstrap_date 2020-08-27 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -52,8 +52,8 @@ %endif Name: rust -Version: 1.46.0 -Release: 2%{?dist} +Version: 1.47.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -67,19 +67,17 @@ ExclusiveArch: %{rust_arches} %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz -# https://github.com/rust-lang/cargo/pull/8598 -Patch1: 0001-Fix-jobserver_exists-test-on-single-cpu-systems.patch -# https://github.com/rust-lang/cargo/pull/8657 (backported) -Patch2: 0002-Fix-LTO-with-doctests.patch +# https://github.com/rust-lang/backtrace-rs/pull/373 +Patch1: 0001-use-NativeEndian-in-symbolize-gimli-Context.patch ### RHEL-specific patches below ### # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.42.0-disable-libssh2.patch +Patch100: rustc-1.47.0-disable-libssh2.patch # libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch101: rustc-1.45.0-disable-http2.patch +Patch101: rustc-1.47.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) @@ -166,7 +164,7 @@ BuildRequires: %{python} %if %with bundled_llvm BuildRequires: cmake3 >= 3.4.3 -Provides: bundled(llvm) = 10.0.1 +Provides: bundled(llvm) = 11.0.0 %else BuildRequires: cmake >= 2.8.11 %if 0%{?epel} == 7 @@ -191,9 +189,6 @@ BuildRequires: procps-ng # debuginfo-gdb tests need gdb BuildRequires: gdb -# TODO: work on unbundling these! -Provides: bundled(libbacktrace) = 1.0.20200219 - # Virtual provides for folks who attempt "dnf install rustc" Provides: rustc = %{version}-%{release} Provides: rustc%{?_isa} = %{version}-%{release} @@ -410,8 +405,7 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} -%patch1 -p1 -d src/tools/cargo -%patch2 -p1 +%patch1 -p1 -d library/backtrace %if %with disabled_libssh2 %patch100 -p1 @@ -456,9 +450,6 @@ rm -rf vendor/libssh2-sys/ # This only affects the transient rust-installer, but let it use our dynamic xz-libs sed -i.lzma -e '/LZMA_API_STATIC/d' src/bootstrap/tool.rs -# rename bundled license for packaging -cp -a vendor/backtrace-sys/src/libbacktrace/LICENSE{,-libbacktrace} - %if %{with bundled_llvm} && 0%{?epel} == 7 mkdir -p cmake-bin ln -s /usr/bin/cmake3 cmake-bin/cmake @@ -482,6 +473,20 @@ find vendor -name .cargo-checksum.json \ # 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 '{}' '+' +# Set up shared environment variables for build/install/check +%global rust_env RUSTFLAGS="%{rustflags}" +%if 0%{?cmake_path:1} +%global rust_env %{rust_env} PATH="%{cmake_path}:$PATH" +%endif +%if %without bundled_libgit2 +# convince libgit2-sys to use the distro libgit2 +%global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1 +%endif +%if %without bundled_libssh2 +# convince libssh2-sys to use the distro libssh2 +%global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1 +%endif + %build # This package fails to build with LTO due to undefined symbols. LTO @@ -490,18 +495,7 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+' # Disable LTO %define _lto_cflags %{nil} -%if %without bundled_libgit2 -# convince libgit2-sys to use the distro libgit2 -export LIBGIT2_SYS_USE_PKG_CONFIG=1 -%endif - -%if %without bundled_libssh2 -# convince libssh2-sys to use the distro libssh2 -export LIBSSH2_SYS_USE_PKG_CONFIG=1 -%endif - -%{?cmake_path:export PATH=%{cmake_path}:$PATH} -%{?rustflags:export RUSTFLAGS="%{rustflags}"} +export %{rust_env} # We're going to override --libdir when configuring to get rustlib into a # common path, but we'll fix the shared libraries during install. @@ -555,12 +549,11 @@ fi --release-channel=%{channel} %{python} ./x.py build -j "$ncpus" --stage 2 -%{python} ./x.py doc +%{python} ./x.py doc --stage 2 %install -%{?cmake_path:export PATH=%{cmake_path}:$PATH} -%{?rustflags:export RUSTFLAGS="%{rustflags}"} +export %{rust_env} DESTDIR=%{buildroot} %{python} ./x.py install @@ -624,13 +617,12 @@ ln -sT ../rust/html/cargo/ %{buildroot}%{_docdir}/cargo/html %if %without lldb rm -f %{buildroot}%{_bindir}/rust-lldb -rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* +rm -f %{buildroot}%{rustlibdir}/etc/lldb_* %endif %check -%{?cmake_path:export PATH=%{cmake_path}:$PATH} -%{?rustflags:export RUSTFLAGS="%{rustflags}"} +export %{rust_env} # The results are not stable on koji, so mask errors and just log it. %{python} ./x.py test --no-fail-fast || : @@ -645,7 +637,6 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %files %license COPYRIGHT LICENSE-APACHE LICENSE-MIT -%license vendor/backtrace-sys/src/libbacktrace/LICENSE-libbacktrace %doc README.md %{_bindir}/rustc %{_bindir}/rustdoc @@ -673,14 +664,14 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %files gdb %{_bindir}/rust-gdb -%{rustlibdir}/etc/gdb_*.py* +%{rustlibdir}/etc/gdb_* %exclude %{_bindir}/rust-gdbgui %if %with lldb %files lldb %{_bindir}/rust-lldb -%{rustlibdir}/etc/lldb_*.py* +%{rustlibdir}/etc/lldb_* %endif @@ -747,6 +738,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Oct 08 2020 Josh Stone - 1.47.0-1 +- Update to 1.47.0. + * Fri Aug 28 2020 Fabio Valentini - 1.46.0-2 - Fix LTO with doctests (backported cargo PR#8657). diff --git a/rustc-1.45.0-disable-http2.patch b/rustc-1.47.0-disable-http2.patch similarity index 69% rename from rustc-1.45.0-disable-http2.patch rename to rustc-1.47.0-disable-http2.patch index 875b22a..e59c892 100644 --- a/rustc-1.45.0-disable-http2.patch +++ b/rustc-1.47.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.45.0-src/Cargo.lock.orig 2020-07-13 09:27:24.000000000 -0700 -+++ rustc-1.45.0-src/Cargo.lock 2020-07-16 12:12:32.253903599 -0700 -@@ -896,7 +896,6 @@ +--- rustc-1.47.0-src/Cargo.lock.orig 2020-10-08 12:21:40.516837553 -0700 ++++ rustc-1.47.0-src/Cargo.lock 2020-10-08 12:23:25.327581933 -0700 +@@ -837,7 +837,6 @@ dependencies = [ "cc", "libc", @@ -8,14 +8,14 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1875,16 +1874,6 @@ +@@ -1642,16 +1641,6 @@ ] [[package]] -name = "libnghttp2-sys" --version = "0.1.2" +-version = "0.1.4+1.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "02254d44f4435dd79e695f2c2b83cd06a47919adea30216ceaf0c57ca0a72463" +-checksum = "03624ec6df166e79e139a2310ca213283d6b3c30810c54844f307086d4488df1" -dependencies = [ - "cc", - "libc", @@ -23,10 +23,10 @@ - -[[package]] name = "libz-sys" - version = "1.0.25" + version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.45.0-src/src/tools/cargo/Cargo.toml.orig 2020-07-13 09:27:49.000000000 -0700 -+++ rustc-1.45.0-src/src/tools/cargo/Cargo.toml 2020-07-16 12:12:32.253903599 -0700 +--- rustc-1.47.0-src/src/tools/cargo/Cargo.toml.orig 2020-10-07 01:04:03.000000000 -0700 ++++ rustc-1.47.0-src/src/tools/cargo/Cargo.toml 2020-10-08 12:22:17.830034534 -0700 @@ -25,7 +25,7 @@ crates-io = { path = "crates/crates-io", version = "0.31.1" } crossbeam-utils = "0.7" @@ -36,9 +36,9 @@ curl-sys = "0.4.22" env_logger = "0.7.0" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-1.45.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-07-13 09:27:49.000000000 -0700 -+++ rustc-1.45.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-07-16 12:12:32.253903599 -0700 -@@ -393,14 +393,8 @@ +--- rustc-1.47.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-10-07 01:04:03.000000000 -0700 ++++ rustc-1.47.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-10-08 12:23:11.246884961 -0700 +@@ -396,14 +396,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. @@ -55,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -563,7 +557,7 @@ +@@ -566,7 +560,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; diff --git a/rustc-1.42.0-disable-libssh2.patch b/rustc-1.47.0-disable-libssh2.patch similarity index 58% rename from rustc-1.42.0-disable-libssh2.patch rename to rustc-1.47.0-disable-libssh2.patch index 770ad34..5a03b13 100644 --- a/rustc-1.42.0-disable-libssh2.patch +++ b/rustc-1.47.0-disable-libssh2.patch @@ -1,6 +1,6 @@ ---- rustc-1.42.0-src/Cargo.lock.orig 2020-03-09 15:11:17.000000000 -0700 -+++ rustc-1.42.0-src/Cargo.lock 2020-04-02 16:39:22.268896227 -0700 -@@ -1796,7 +1796,6 @@ +--- rustc-1.47.0-src/Cargo.lock.orig 2020-10-07 00:53:22.000000000 -0700 ++++ rustc-1.47.0-src/Cargo.lock 2020-10-08 12:15:07.361298619 -0700 +@@ -1636,7 +1636,6 @@ dependencies = [ "cc", "libc", @@ -8,14 +8,14 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1813,20 +1812,6 @@ +@@ -1653,20 +1652,6 @@ ] [[package]] -name = "libssh2-sys" --version = "0.2.14" +-version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "36aa6e813339d3a063292b77091dfbbb6152ff9006a459895fa5bebed7d34f10" +-checksum = "eafa907407504b0e683786d4aba47acf250f114d37357d56608333fd167dd0fc" -dependencies = [ - "cc", - "libc", @@ -27,11 +27,11 @@ - -[[package]] name = "libz-sys" - version = "1.0.25" + version = "1.0.27" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.42.0-src/vendor/git2/Cargo.toml.orig 2020-03-09 17:00:19.000000000 -0700 -+++ rustc-1.42.0-src/vendor/git2/Cargo.toml 2020-04-02 16:38:46.163664007 -0700 -@@ -55,7 +55,7 @@ +--- rustc-1.47.0-src/vendor/git2/Cargo.toml.orig 2020-10-07 02:33:31.000000000 -0700 ++++ rustc-1.47.0-src/vendor/git2/Cargo.toml 2020-10-08 12:13:37.697228272 -0700 +@@ -49,7 +49,7 @@ version = "0.1.39" [features] diff --git a/sources b/sources index 11a9b85..748da43 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.46.0-src.tar.xz) = 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 +SHA512 (rustc-1.47.0-src.tar.xz) = 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 diff --git a/sources-bootstrap b/sources-bootstrap index 422747e..2e17a5a 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.46.0-src.tar.xz) = 099857f1d295043587a4e2a65ef3e6a90e12c8b6958e98535a1656c113c553f9a9b621aba8a19cf21bd8d2c79d27cbfa4b8e6fabbcb3cbfee23b545be7b450b4 -SHA512 (rust-1.45.2-aarch64-unknown-linux-gnu.tar.xz) = b4b3fb198bf85192563fb8b6017cf07f92b9c26d6e590efa9476aa878871839315db935e3353c664e635a229f17b0979bcfd31488e29e02ce0dc266d252b9e41 -SHA512 (rust-1.45.2-armv7-unknown-linux-gnueabihf.tar.xz) = dbf36643e87fc31cda5c0d5fc8b1589ce80531a94379060106ce81d525cd77c36ac6f89d5ae05d8872020baf31e5391422ed58c01ec6f801428d67e2e10896fb -SHA512 (rust-1.45.2-i686-unknown-linux-gnu.tar.xz) = afe81d38d8692e5792e111c3b2c83da4dffa99c9a8a89b5f1e10a6e449e49d4dd19d68c96d7b2f5013054d141bf4b1a08da1c2b877c7bbe87f81c19232020ecb -SHA512 (rust-1.45.2-powerpc64le-unknown-linux-gnu.tar.xz) = 6cb169efae4c847ba204fa24c1f40b4320e53928ab8966727971a5bc7a565eaa6142f40904cec93927543b25450db23d816c20653f53d3aa36ac616fe85ee6ba -SHA512 (rust-1.45.2-powerpc64-unknown-linux-gnu.tar.xz) = fbf909e5f9135d5216dbbc1be0d1e3159000c58b83bcdeb9839a12f5a9ff56261a61edfab93cd21800a90ff56bb9eff8a1ad83c60fa54bf0cf4b149219dbe914 -SHA512 (rust-1.45.2-s390x-unknown-linux-gnu.tar.xz) = 7727cfbeed29e8a1e79398392332b25b5498900f593f3d08414c70b44da0cd06dca0791a361956c47c3367e6572d59d885085d3cd99fd4a9c28c431a158ddbfd -SHA512 (rust-1.45.2-x86_64-unknown-linux-gnu.tar.xz) = dfd3ce0cc42ae82a2d13866c5c94c304b031e253a1485ccc1d6ecd62cc05018b01ac7b2183297bc45ada286b5e91d1344aa3d8417694ab834f8265c7838b4fd2 +SHA512 (rustc-1.47.0-src.tar.xz) = 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 +SHA512 (rust-1.46.0-aarch64-unknown-linux-gnu.tar.xz) = 53e5d8afadaa9505286dce4acbb911126d17bc7bf45ea4685070ff07be7f6c7860e543a7686eeac695e7e3e127ca38ba2f09b73467fbf5f92d0b2195467c51f2 +SHA512 (rust-1.46.0-armv7-unknown-linux-gnueabihf.tar.xz) = c7e320fd5169c99bf8a12fb5bf1c5fb19a05d14f75ce655e4b64cad3456594ef09be1da7ac34a09b5d84da0c857d1a6e5a0695b5ff04cda491ea92fea15d28dc +SHA512 (rust-1.46.0-i686-unknown-linux-gnu.tar.xz) = b01e9b06c9de50e43bc6b5e1a5e6cc49dab1cf28b9cf0a8b974d2630c7ed4c6a5df6f321c872e11eb622c42f1d8cfaec77c1b67254a84365464fe3415acfa07f +SHA512 (rust-1.46.0-powerpc64le-unknown-linux-gnu.tar.xz) = 986f0bf7995f35836b73fb7045cf43ae5efe0c2543c75c66cdcc0f8c1dd3513def3c291e021241e328142deaca690ce113526ffc870c4412a7841f244258a43e +SHA512 (rust-1.46.0-powerpc64-unknown-linux-gnu.tar.xz) = 40f9423d838cab74b9920372e728c4ca7057005d83af587387dd2b164a0bf93de65cebc035320bce25f80914c63ce65b84218b9a776b0b905428e4cba0821b8b +SHA512 (rust-1.46.0-s390x-unknown-linux-gnu.tar.xz) = b6146695225ff6d0516e7bb6bc4620599356bb89b14f429a09d9d7f8715a94e8e218402346d5c9a10eeb54c0bdc40fb179289216b0cb4edd5bdf886f6b69aab4 +SHA512 (rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz) = 95f5adc2d2137010c7e5ac8a0fc70485250b4f9a909cb8b164b35fffff76ab88e9b09d305bfac37324ed080c5fc7643001d2abec5454ca911dc3513f1af52c88 From 51a2a836f97e1d4343186ba9982e2fa0f46de0fb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 9 Oct 2020 20:31:11 -0700 Subject: [PATCH 08/20] Fix the doc link to raw::stat on s390x --- ...uate-stat-in-MetadataExt-as_raw_stat.patch | 46 +++++++++++++++++++ rust.spec | 4 ++ 2 files changed, 50 insertions(+) create mode 100644 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch diff --git a/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch b/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch new file mode 100644 index 0000000..bf6ef9c --- /dev/null +++ b/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch @@ -0,0 +1,46 @@ +From f200c1e7afdd04b42c01c0108735e5b14ca07d93 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Fri, 9 Oct 2020 20:12:26 -0700 +Subject: [PATCH] doc: disambiguate stat in MetadataExt::as_raw_stat + +A few architectures in `os::linux::raw` import `libc::stat`, rather than +defining that type directly. However, that also imports the _function_ +called `stat`, which makes this doc link ambiguous: + + error: `crate::os::linux::raw::stat` is both a struct and a function + --> library/std/src/os/linux/fs.rs:21:19 + | + 21 | /// [`stat`]: crate::os::linux::raw::stat + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link + | + = note: `-D broken-intra-doc-links` implied by `-D warnings` + help: to link to the struct, prefix with the item type + | + 21 | /// [`stat`]: struct@crate::os::linux::raw::stat + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + help: to link to the function, add parentheses + | + 21 | /// [`stat`]: crate::os::linux::raw::stat() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +We want the `struct`, so it's now prefixed accordingly. +--- + library/std/src/os/linux/fs.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs +index ff23c3d67e3b..9b7af97616c9 100644 +--- a/library/std/src/os/linux/fs.rs ++++ b/library/std/src/os/linux/fs.rs +@@ -20,7 +20,7 @@ pub trait MetadataExt { + /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the + /// cross-Unix abstractions contained within the raw stat. + /// +- /// [`stat`]: crate::os::linux::raw::stat ++ /// [`stat`]: struct@crate::os::linux::raw::stat + /// + /// # Examples + /// +-- +2.26.2 + diff --git a/rust.spec b/rust.spec index 29b1481..e45436e 100644 --- a/rust.spec +++ b/rust.spec @@ -70,6 +70,9 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # https://github.com/rust-lang/backtrace-rs/pull/373 Patch1: 0001-use-NativeEndian-in-symbolize-gimli-Context.patch +# https://github.com/rust-lang/rust/pull/77777 +Patch2: 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch + ### RHEL-specific patches below ### # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) @@ -406,6 +409,7 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} %patch1 -p1 -d library/backtrace +%patch2 -p1 %if %with disabled_libssh2 %patch100 -p1 From 8efa6f4d091c3bdb230bda0701cd22ec6721d67a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 10 Oct 2020 10:00:19 -0700 Subject: [PATCH 09/20] Make tests explicitly use stage 2 --- rust.spec | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/rust.spec b/rust.spec index e45436e..57aa187 100644 --- a/rust.spec +++ b/rust.spec @@ -629,11 +629,11 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_* export %{rust_env} # The results are not stable on koji, so mask errors and just log it. -%{python} ./x.py test --no-fail-fast || : -%{python} ./x.py test --no-fail-fast cargo || : -%{python} ./x.py test --no-fail-fast clippy || : -%{python} ./x.py test --no-fail-fast rls || : -%{python} ./x.py test --no-fail-fast rustfmt || : +%{python} ./x.py test --no-fail-fast --stage 2 || : +%{python} ./x.py test --no-fail-fast --stage 2 cargo || : +%{python} ./x.py test --no-fail-fast --stage 2 clippy || : +%{python} ./x.py test --no-fail-fast --stage 2 rls || : +%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || : %ldconfig_scriptlets From f92bb2f31c47e0d730cc375bb1e431dbd4ed8522 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Sat, 10 Oct 2020 20:06:02 -0600 Subject: [PATCH 10/20] Re-enable LTO --- rust.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/rust.spec b/rust.spec index 57aa187..6ab2407 100644 --- a/rust.spec +++ b/rust.spec @@ -53,7 +53,7 @@ Name: rust Version: 1.47.0 -Release: 1%{?dist} +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) @@ -493,12 +493,6 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+' %build -# This package fails to build with LTO due to undefined symbols. LTO -# was disabled in OpenSuSE as well, but with no real explanation why -# beyond the undefined symbols. It really should be investigated further. -# Disable LTO -%define _lto_cflags %{nil} - export %{rust_env} # We're going to override --libdir when configuring to get rustlib into a @@ -742,6 +736,9 @@ export %{rust_env} %changelog +* Sat Oct 10 2020 Jeff Law - 1.47.0-2 +- Re-enable LTO + * Thu Oct 08 2020 Josh Stone - 1.47.0-1 - Update to 1.47.0. From 457f56dd2523f370c359cf1144a0828a09a055e4 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 19 Nov 2020 10:47:24 -0800 Subject: [PATCH 11/20] Update to 1.48.0. --- .gitignore | 8 +++++ rust.spec | 32 +++++++++++-------- ....patch => rustc-1.48.0-disable-http2.patch | 18 +++++------ ...atch => rustc-1.48.0-disable-libssh2.patch | 18 +++++------ ...patch => rustc-1.48.0-no-default-pie.patch | 8 ++--- sources | 2 +- sources-bootstrap | 16 +++++----- 7 files changed, 56 insertions(+), 46 deletions(-) rename rustc-1.47.0-disable-http2.patch => rustc-1.48.0-disable-http2.patch (75%) rename rustc-1.47.0-disable-libssh2.patch => rustc-1.48.0-disable-libssh2.patch (58%) rename rustc-1.45.0-no-default-pie.patch => rustc-1.48.0-no-default-pie.patch (79%) diff --git a/.gitignore b/.gitignore index a9378d6..e66acbf 100644 --- a/.gitignore +++ b/.gitignore @@ -305,3 +305,11 @@ /rust-1.46.0-powerpc64-unknown-linux-gnu.tar.xz /rust-1.46.0-s390x-unknown-linux-gnu.tar.xz /rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz +/rustc-1.48.0-src.tar.xz +/rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.47.0-i686-unknown-linux-gnu.tar.xz +/rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.47.0-s390x-unknown-linux-gnu.tar.xz +/rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz diff --git a/rust.spec b/rust.spec index 6ab2407..3d078a2 100644 --- a/rust.spec +++ b/rust.spec @@ -1,5 +1,5 @@ # Only x86_64 and i686 are Tier 1 platforms at this time. -# https://forge.rust-lang.org/platform-support.html +# https://doc.rust-lang.org/nightly/rustc/platform-support.html %global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x # The channel can be stable, beta, or nightly @@ -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.46.0 -%global bootstrap_cargo 1.46.0 -%global bootstrap_channel 1.46.0 -%global bootstrap_date 2020-08-27 +%global bootstrap_rust 1.47.0 +%global bootstrap_cargo 1.47.0 +%global bootstrap_channel 1.47.0 +%global bootstrap_date 2020-10-08 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -52,8 +52,8 @@ %endif Name: rust -Version: 1.47.0 -Release: 2%{?dist} +Version: 1.48.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -76,15 +76,15 @@ Patch2: 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch ### RHEL-specific patches below ### # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.47.0-disable-libssh2.patch +Patch100: rustc-1.48.0-disable-libssh2.patch # libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch101: rustc-1.47.0-disable-http2.patch +Patch101: rustc-1.48.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) -Patch102: rustc-1.45.0-no-default-pie.patch +Patch102: rustc-1.48.0-no-default-pie.patch # Get the Rust triple for any arch. @@ -297,7 +297,7 @@ its standard library. %package -n cargo Summary: Rust's package manager and build tool %if %with bundled_libgit2 -Provides: bundled(libgit2) = 1.0.0 +Provides: bundled(libgit2) = 1.1.0 %endif %if %with bundled_libssh2 Provides: bundled(libssh2) = 1.9.0~dev @@ -343,7 +343,7 @@ A tool for formatting Rust code according to style guidelines. %package -n rls Summary: Rust Language Server for IDE integration %if %with bundled_libgit2 -Provides: bundled(libgit2) = 1.0.0 +Provides: bundled(libgit2) = 1.1.0 %endif %if %with bundled_libssh2 Provides: bundled(libssh2) = 1.9.0~dev @@ -421,7 +421,7 @@ rm -rf vendor/libnghttp2-sys/ %endif %if 0%{?rhel} && 0%{?rhel} < 8 -%patch102 -p1 -b .no-pie +%patch102 -p1 %endif %if "%{python}" != "python3" @@ -431,12 +431,14 @@ sed -i.try-python -e '/^try python3 /i try "%{python}" "$@"' ./configure %if %without bundled_llvm rm -rf src/llvm-project/ +mkdir -p src/llvm-project/libunwind/ %endif # Remove other unused vendored libraries rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ rm -rf vendor/libz-sys/src/zlib/ +rm -rf vendor/libz-sys/src/zlib-ng/ rm -rf vendor/lzma-sys/xz-*/ rm -rf vendor/openssl-src/openssl/ @@ -680,7 +682,6 @@ export %{rust_env} %{_docdir}/%{name}/html/*/ %{_docdir}/%{name}/html/*.html %{_docdir}/%{name}/html/*.css -%{_docdir}/%{name}/html/*.ico %{_docdir}/%{name}/html/*.js %{_docdir}/%{name}/html/*.png %{_docdir}/%{name}/html/*.svg @@ -736,6 +737,9 @@ export %{rust_env} %changelog +* Thu Nov 19 2020 Josh Stone - 1.48.0-1 +- Update to 1.48.0. + * Sat Oct 10 2020 Jeff Law - 1.47.0-2 - Re-enable LTO diff --git a/rustc-1.47.0-disable-http2.patch b/rustc-1.48.0-disable-http2.patch similarity index 75% rename from rustc-1.47.0-disable-http2.patch rename to rustc-1.48.0-disable-http2.patch index e59c892..a162fd0 100644 --- a/rustc-1.47.0-disable-http2.patch +++ b/rustc-1.48.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.47.0-src/Cargo.lock.orig 2020-10-08 12:21:40.516837553 -0700 -+++ rustc-1.47.0-src/Cargo.lock 2020-10-08 12:23:25.327581933 -0700 -@@ -837,7 +837,6 @@ +--- rustc-1.48.0-src/Cargo.lock.orig 2020-11-16 09:36:19.889728111 -0800 ++++ rustc-1.48.0-src/Cargo.lock 2020-11-16 09:36:19.890728089 -0800 +@@ -849,7 +849,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1642,16 +1641,6 @@ +@@ -1682,16 +1681,6 @@ ] [[package]] @@ -23,10 +23,10 @@ - -[[package]] name = "libz-sys" - version = "1.0.27" + version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.47.0-src/src/tools/cargo/Cargo.toml.orig 2020-10-07 01:04:03.000000000 -0700 -+++ rustc-1.47.0-src/src/tools/cargo/Cargo.toml 2020-10-08 12:22:17.830034534 -0700 +--- rustc-1.48.0-src/src/tools/cargo/Cargo.toml.orig 2020-11-16 06:02:09.000000000 -0800 ++++ rustc-1.48.0-src/src/tools/cargo/Cargo.toml 2020-11-16 09:36:19.890728089 -0800 @@ -25,7 +25,7 @@ crates-io = { path = "crates/crates-io", version = "0.31.1" } crossbeam-utils = "0.7" @@ -36,8 +36,8 @@ curl-sys = "0.4.22" env_logger = "0.7.0" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-1.47.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-10-07 01:04:03.000000000 -0700 -+++ rustc-1.47.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-10-08 12:23:11.246884961 -0700 +--- rustc-1.48.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-11-16 06:02:09.000000000 -0800 ++++ rustc-1.48.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-11-16 09:36:19.890728089 -0800 @@ -396,14 +396,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP diff --git a/rustc-1.47.0-disable-libssh2.patch b/rustc-1.48.0-disable-libssh2.patch similarity index 58% rename from rustc-1.47.0-disable-libssh2.patch rename to rustc-1.48.0-disable-libssh2.patch index 5a03b13..6916e74 100644 --- a/rustc-1.47.0-disable-libssh2.patch +++ b/rustc-1.48.0-disable-libssh2.patch @@ -1,6 +1,6 @@ ---- rustc-1.47.0-src/Cargo.lock.orig 2020-10-07 00:53:22.000000000 -0700 -+++ rustc-1.47.0-src/Cargo.lock 2020-10-08 12:15:07.361298619 -0700 -@@ -1636,7 +1636,6 @@ +--- rustc-1.48.0-src/Cargo.lock.orig 2020-11-16 06:01:53.000000000 -0800 ++++ rustc-1.48.0-src/Cargo.lock 2020-11-16 09:27:44.425104404 -0800 +@@ -1676,7 +1676,6 @@ dependencies = [ "cc", "libc", @@ -8,14 +8,14 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1653,20 +1652,6 @@ +@@ -1693,20 +1692,6 @@ ] [[package]] -name = "libssh2-sys" --version = "0.2.18" +-version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "eafa907407504b0e683786d4aba47acf250f114d37357d56608333fd167dd0fc" +-checksum = "ca46220853ba1c512fc82826d0834d87b06bcd3c2a42241b7de72f3d2fe17056" -dependencies = [ - "cc", - "libc", @@ -27,10 +27,10 @@ - -[[package]] name = "libz-sys" - version = "1.0.27" + version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.47.0-src/vendor/git2/Cargo.toml.orig 2020-10-07 02:33:31.000000000 -0700 -+++ rustc-1.47.0-src/vendor/git2/Cargo.toml 2020-10-08 12:13:37.697228272 -0700 +--- rustc-1.48.0-src/vendor/git2/Cargo.toml.orig 2020-11-16 06:27:49.000000000 -0800 ++++ rustc-1.48.0-src/vendor/git2/Cargo.toml 2020-11-16 09:27:44.425104404 -0800 @@ -49,7 +49,7 @@ version = "0.1.39" diff --git a/rustc-1.45.0-no-default-pie.patch b/rustc-1.48.0-no-default-pie.patch similarity index 79% rename from rustc-1.45.0-no-default-pie.patch rename to rustc-1.48.0-no-default-pie.patch index 726df24..bb6b3d1 100644 --- a/rustc-1.45.0-no-default-pie.patch +++ b/rustc-1.48.0-no-default-pie.patch @@ -1,8 +1,6 @@ -diff --git a/src/librustc_codegen_ssa/back/link.rs b/src/librustc_codegen_ssa/back/link.rs -index dcce1d45298c..5c11f7276f26 100644 ---- a/src/librustc_codegen_ssa/back/link.rs -+++ b/src/librustc_codegen_ssa/back/link.rs -@@ -1184,10 +1184,12 @@ fn exec_linker( +--- rustc-1.48.0-src/compiler/rustc_codegen_ssa/src/back/link.rs.orig 2020-11-16 06:01:53.000000000 -0800 ++++ rustc-1.48.0-src/compiler/rustc_codegen_ssa/src/back/link.rs 2020-11-16 09:37:15.779516797 -0800 +@@ -1185,10 +1185,12 @@ } fn link_output_kind(sess: &Session, crate_type: CrateType) -> LinkOutputKind { diff --git a/sources b/sources index 748da43..eb048bc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.47.0-src.tar.xz) = 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 +SHA512 (rustc-1.48.0-src.tar.xz) = 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 diff --git a/sources-bootstrap b/sources-bootstrap index 2e17a5a..bdfa9f7 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.47.0-src.tar.xz) = 6ba83c0158f8130ddeae7e070417a2121d8a548c8fe97e28bce116d84048636c75aaee78e0c92cd43a50f5679a1223fc226cc8c5ba9bbd1465e84c5c6034d5c9 -SHA512 (rust-1.46.0-aarch64-unknown-linux-gnu.tar.xz) = 53e5d8afadaa9505286dce4acbb911126d17bc7bf45ea4685070ff07be7f6c7860e543a7686eeac695e7e3e127ca38ba2f09b73467fbf5f92d0b2195467c51f2 -SHA512 (rust-1.46.0-armv7-unknown-linux-gnueabihf.tar.xz) = c7e320fd5169c99bf8a12fb5bf1c5fb19a05d14f75ce655e4b64cad3456594ef09be1da7ac34a09b5d84da0c857d1a6e5a0695b5ff04cda491ea92fea15d28dc -SHA512 (rust-1.46.0-i686-unknown-linux-gnu.tar.xz) = b01e9b06c9de50e43bc6b5e1a5e6cc49dab1cf28b9cf0a8b974d2630c7ed4c6a5df6f321c872e11eb622c42f1d8cfaec77c1b67254a84365464fe3415acfa07f -SHA512 (rust-1.46.0-powerpc64le-unknown-linux-gnu.tar.xz) = 986f0bf7995f35836b73fb7045cf43ae5efe0c2543c75c66cdcc0f8c1dd3513def3c291e021241e328142deaca690ce113526ffc870c4412a7841f244258a43e -SHA512 (rust-1.46.0-powerpc64-unknown-linux-gnu.tar.xz) = 40f9423d838cab74b9920372e728c4ca7057005d83af587387dd2b164a0bf93de65cebc035320bce25f80914c63ce65b84218b9a776b0b905428e4cba0821b8b -SHA512 (rust-1.46.0-s390x-unknown-linux-gnu.tar.xz) = b6146695225ff6d0516e7bb6bc4620599356bb89b14f429a09d9d7f8715a94e8e218402346d5c9a10eeb54c0bdc40fb179289216b0cb4edd5bdf886f6b69aab4 -SHA512 (rust-1.46.0-x86_64-unknown-linux-gnu.tar.xz) = 95f5adc2d2137010c7e5ac8a0fc70485250b4f9a909cb8b164b35fffff76ab88e9b09d305bfac37324ed080c5fc7643001d2abec5454ca911dc3513f1af52c88 +SHA512 (rustc-1.48.0-src.tar.xz) = 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 +SHA512 (rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz) = 7df7045df341f03508f1ad795a9117b39c1f4c4cc778c7fd9d78c42e7da662ce244d018084ac9e80d9409cf8b3b5d1ccc25ef4cb71a2b8727398d30a4e962e19 +SHA512 (rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz) = b207ab7c478dce6db4018527888f539938c8e77b5ceccb460b9d52ffee13a2329d225d03a605b60729cae6254129245bdd69730aebb6ec91dd0c83005cf25253 +SHA512 (rust-1.47.0-i686-unknown-linux-gnu.tar.xz) = 551204b4edfc1500aa83108c88b845997bb6befba0dd3401e9ae5294ab27960421f1b3130159946b996171c1d46f7532afa0c3ae767a9318985db0bb7c88dba0 +SHA512 (rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz) = d5c6580861786545f0540cc9591884fb9f2036061bdd451d17cf8bfb427008d365cacd14e5054028c72b83d1d5eb347ab74478a882cbbd7fcc75a7421657561c +SHA512 (rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz) = 46fa1c042aebb06db4185fed6ef3bc7772f2a13f2290a20f5499757aae2a05dc984026315be7b5813aac172f52f50565e56aa074d32f6271858590a9ceb9e1c7 +SHA512 (rust-1.47.0-s390x-unknown-linux-gnu.tar.xz) = dd5877b6ff5c310ca6aa23c1cc621e6b0675d4c46f5a06b2a0b107641b604a1a2101109ba8e286267bab1158768c601d5d9a922a8da72486c91755ef465720c0 +SHA512 (rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz) = f695986ab8e67636b0e92ca7ea223984121e3c22788434a6f1062690e7932f6b30c0c302160fef96831f821acedaf8a909bd3d00a9aa873c7200d2b8fa39013f From 6c5b7257595233d29b226987f0c8f16bd3de4325 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 1 Dec 2020 17:28:02 -0800 Subject: [PATCH 12/20] Never bundle libssh2 --- rust.spec | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/rust.spec b/rust.spec index 3d078a2..10ea348 100644 --- a/rust.spec +++ b/rust.spec @@ -157,7 +157,7 @@ BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(libgit2) >= 1.0.0 %endif -%if %{without disabled_libssh2} && %{without bundled_libssh2} +%if %{without disabled_libssh2} # needs libssh2_userauth_publickey_frommemory BuildRequires: pkgconfig(libssh2) >= 1.6.0 %endif @@ -299,9 +299,6 @@ Summary: Rust's package manager and build tool %if %with bundled_libgit2 Provides: bundled(libgit2) = 1.1.0 %endif -%if %with bundled_libssh2 -Provides: bundled(libssh2) = 1.9.0~dev -%endif # For tests: BuildRequires: git # Cargo is not much use without Rust @@ -345,9 +342,6 @@ Summary: Rust Language Server for IDE integration %if %with bundled_libgit2 Provides: bundled(libgit2) = 1.1.0 %endif -%if %with bundled_libssh2 -Provides: bundled(libssh2) = 1.9.0~dev -%endif Requires: rust-analysis # /usr/bin/rls is dynamically linked against internal rustc libs Requires: %{name}%{?_isa} = %{version}-%{release} @@ -437,6 +431,7 @@ mkdir -p src/llvm-project/libunwind/ # Remove other unused vendored libraries rm -rf vendor/curl-sys/curl/ rm -rf vendor/jemalloc-sys/jemalloc/ +rm -rf vendor/libssh2-sys/libssh2/ rm -rf vendor/libz-sys/src/zlib/ rm -rf vendor/libz-sys/src/zlib-ng/ rm -rf vendor/lzma-sys/xz-*/ @@ -446,9 +441,6 @@ rm -rf vendor/openssl-src/openssl/ rm -rf vendor/libgit2-sys/libgit2/ %endif -%if %without bundled_libssh2 -rm -rf vendor/libssh2-sys/libssh2/ -%endif %if %with disabled_libssh2 rm -rf vendor/libssh2-sys/ %endif @@ -488,7 +480,7 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+' # convince libgit2-sys to use the distro libgit2 %global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1 %endif -%if %without bundled_libssh2 +%if %without disabled_libssh2 # convince libssh2-sys to use the distro libssh2 %global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1 %endif From e3b256c65fc8ea4e154eed8f43727b2239c07412 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mon, 28 Dec 2020 19:00:26 +0100 Subject: [PATCH 13/20] Rebuild for libgit2 1.1.x Signed-off-by: Igor Raits --- rust.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 10ea348..85d735e 100644 --- a/rust.spec +++ b/rust.spec @@ -53,7 +53,7 @@ Name: rust Version: 1.48.0 -Release: 1%{?dist} +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) @@ -729,6 +729,9 @@ export %{rust_env} %changelog +* Mon Dec 28 19:00:26 CET 2020 Igor Raits - 1.48.0-2 +- Rebuild for libgit2 1.1.x + * Thu Nov 19 2020 Josh Stone - 1.48.0-1 - Update to 1.48.0. From 8d20a2058af8e531b14a80784bab58dae53b14c1 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mon, 28 Dec 2020 19:37:47 +0100 Subject: [PATCH 14/20] Build with bundled libgit2 (to avoid re-bootstrap) Signed-off-by: Igor Raits --- rust.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rust.spec b/rust.spec index 85d735e..db3d0b8 100644 --- a/rust.spec +++ b/rust.spec @@ -24,6 +24,7 @@ # is insufficient. Rust currently requires LLVM 8.0+. %bcond_with bundled_llvm +%global _with_bundled_libgit2 # Requires stable libgit2 1.0 %if 0%{?fedora} >= 32 %bcond_with bundled_libgit2 From 28e90c2b9d45ba5caf4f6f908e3fda9a2a1230b7 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mon, 28 Dec 2020 19:38:13 +0100 Subject: [PATCH 15/20] fixup! Build with bundled libgit2 (to avoid re-bootstrap) Signed-off-by: Igor Raits --- rust.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index db3d0b8..8a0000a 100644 --- a/rust.spec +++ b/rust.spec @@ -24,7 +24,7 @@ # is insufficient. Rust currently requires LLVM 8.0+. %bcond_with bundled_llvm -%global _with_bundled_libgit2 +%global _with_bundled_libgit2 1 # Requires stable libgit2 1.0 %if 0%{?fedora} >= 32 %bcond_with bundled_libgit2 From f6db939d0c8300c0f133a9c96bd82346b2b2ad2a Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Mon, 28 Dec 2020 19:53:09 +0100 Subject: [PATCH 16/20] Bootstrap Signed-off-by: Igor Raits --- rust.spec | 3 +-- sources | 7 +++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 8a0000a..094c244 100644 --- a/rust.spec +++ b/rust.spec @@ -15,7 +15,7 @@ %global bootstrap_date 2020-10-08 # Only the specified arches will use bootstrap binaries. -#global bootstrap_arches %%{rust_arches} +%global bootstrap_arches %%{rust_arches} # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static @@ -24,7 +24,6 @@ # is insufficient. Rust currently requires LLVM 8.0+. %bcond_with bundled_llvm -%global _with_bundled_libgit2 1 # Requires stable libgit2 1.0 %if 0%{?fedora} >= 32 %bcond_with bundled_libgit2 diff --git a/sources b/sources index eb048bc..bdfa9f7 100644 --- a/sources +++ b/sources @@ -1 +1,8 @@ SHA512 (rustc-1.48.0-src.tar.xz) = 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 +SHA512 (rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz) = 7df7045df341f03508f1ad795a9117b39c1f4c4cc778c7fd9d78c42e7da662ce244d018084ac9e80d9409cf8b3b5d1ccc25ef4cb71a2b8727398d30a4e962e19 +SHA512 (rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz) = b207ab7c478dce6db4018527888f539938c8e77b5ceccb460b9d52ffee13a2329d225d03a605b60729cae6254129245bdd69730aebb6ec91dd0c83005cf25253 +SHA512 (rust-1.47.0-i686-unknown-linux-gnu.tar.xz) = 551204b4edfc1500aa83108c88b845997bb6befba0dd3401e9ae5294ab27960421f1b3130159946b996171c1d46f7532afa0c3ae767a9318985db0bb7c88dba0 +SHA512 (rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz) = d5c6580861786545f0540cc9591884fb9f2036061bdd451d17cf8bfb427008d365cacd14e5054028c72b83d1d5eb347ab74478a882cbbd7fcc75a7421657561c +SHA512 (rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz) = 46fa1c042aebb06db4185fed6ef3bc7772f2a13f2290a20f5499757aae2a05dc984026315be7b5813aac172f52f50565e56aa074d32f6271858590a9ceb9e1c7 +SHA512 (rust-1.47.0-s390x-unknown-linux-gnu.tar.xz) = dd5877b6ff5c310ca6aa23c1cc621e6b0675d4c46f5a06b2a0b107641b604a1a2101109ba8e286267bab1158768c601d5d9a922a8da72486c91755ef465720c0 +SHA512 (rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz) = f695986ab8e67636b0e92ca7ea223984121e3c22788434a6f1062690e7932f6b30c0c302160fef96831f821acedaf8a909bd3d00a9aa873c7200d2b8fa39013f From 35653afd8f61bbb66e6dc14ca866179c4c336e82 Mon Sep 17 00:00:00 2001 From: Igor Raits Date: Tue, 29 Dec 2020 08:42:45 +0100 Subject: [PATCH 17/20] Revert "Bootstrap" This reverts commit f6db939d0c8300c0f133a9c96bd82346b2b2ad2a. --- rust.spec | 7 +++++-- sources | 7 ------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/rust.spec b/rust.spec index 094c244..176a75f 100644 --- a/rust.spec +++ b/rust.spec @@ -15,7 +15,7 @@ %global bootstrap_date 2020-10-08 # Only the specified arches will use bootstrap binaries. -%global bootstrap_arches %%{rust_arches} +#global bootstrap_arches %%{rust_arches} # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static @@ -53,7 +53,7 @@ Name: rust Version: 1.48.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -729,6 +729,9 @@ export %{rust_env} %changelog +* Tue Dec 29 2020 Igor Raits - 1.48.0-3 +- De-bootstrap + * Mon Dec 28 19:00:26 CET 2020 Igor Raits - 1.48.0-2 - Rebuild for libgit2 1.1.x diff --git a/sources b/sources index bdfa9f7..eb048bc 100644 --- a/sources +++ b/sources @@ -1,8 +1 @@ SHA512 (rustc-1.48.0-src.tar.xz) = 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 -SHA512 (rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz) = 7df7045df341f03508f1ad795a9117b39c1f4c4cc778c7fd9d78c42e7da662ce244d018084ac9e80d9409cf8b3b5d1ccc25ef4cb71a2b8727398d30a4e962e19 -SHA512 (rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz) = b207ab7c478dce6db4018527888f539938c8e77b5ceccb460b9d52ffee13a2329d225d03a605b60729cae6254129245bdd69730aebb6ec91dd0c83005cf25253 -SHA512 (rust-1.47.0-i686-unknown-linux-gnu.tar.xz) = 551204b4edfc1500aa83108c88b845997bb6befba0dd3401e9ae5294ab27960421f1b3130159946b996171c1d46f7532afa0c3ae767a9318985db0bb7c88dba0 -SHA512 (rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz) = d5c6580861786545f0540cc9591884fb9f2036061bdd451d17cf8bfb427008d365cacd14e5054028c72b83d1d5eb347ab74478a882cbbd7fcc75a7421657561c -SHA512 (rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz) = 46fa1c042aebb06db4185fed6ef3bc7772f2a13f2290a20f5499757aae2a05dc984026315be7b5813aac172f52f50565e56aa074d32f6271858590a9ceb9e1c7 -SHA512 (rust-1.47.0-s390x-unknown-linux-gnu.tar.xz) = dd5877b6ff5c310ca6aa23c1cc621e6b0675d4c46f5a06b2a0b107641b604a1a2101109ba8e286267bab1158768c601d5d9a922a8da72486c91755ef465720c0 -SHA512 (rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz) = f695986ab8e67636b0e92ca7ea223984121e3c22788434a6f1062690e7932f6b30c0c302160fef96831f821acedaf8a909bd3d00a9aa873c7200d2b8fa39013f From 3aadadbd4b2429a45fd1ae02261c8d37bff90eae Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 5 Jan 2021 16:07:24 -0800 Subject: [PATCH 18/20] Update to 1.49.0. --- .gitignore | 8 ++++ ...uate-stat-in-MetadataExt-as_raw_stat.patch | 46 ------------------- ...iveEndian-in-symbolize-gimli-Context.patch | 28 ----------- rust.spec | 30 +++++------- ....patch => rustc-1.49.0-disable-http2.patch | 24 +++++----- sources | 2 +- sources-bootstrap | 16 +++---- 7 files changed, 41 insertions(+), 113 deletions(-) delete mode 100644 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch delete mode 100644 0001-use-NativeEndian-in-symbolize-gimli-Context.patch rename rustc-1.48.0-disable-http2.patch => rustc-1.49.0-disable-http2.patch (73%) diff --git a/.gitignore b/.gitignore index e66acbf..becac4e 100644 --- a/.gitignore +++ b/.gitignore @@ -313,3 +313,11 @@ /rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz /rust-1.47.0-s390x-unknown-linux-gnu.tar.xz /rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz +/rustc-1.49.0-src.tar.xz +/rust-1.48.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.48.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.48.0-i686-unknown-linux-gnu.tar.xz +/rust-1.48.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.48.0-s390x-unknown-linux-gnu.tar.xz +/rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz diff --git a/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch b/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch deleted file mode 100644 index bf6ef9c..0000000 --- a/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch +++ /dev/null @@ -1,46 +0,0 @@ -From f200c1e7afdd04b42c01c0108735e5b14ca07d93 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Fri, 9 Oct 2020 20:12:26 -0700 -Subject: [PATCH] doc: disambiguate stat in MetadataExt::as_raw_stat - -A few architectures in `os::linux::raw` import `libc::stat`, rather than -defining that type directly. However, that also imports the _function_ -called `stat`, which makes this doc link ambiguous: - - error: `crate::os::linux::raw::stat` is both a struct and a function - --> library/std/src/os/linux/fs.rs:21:19 - | - 21 | /// [`stat`]: crate::os::linux::raw::stat - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link - | - = note: `-D broken-intra-doc-links` implied by `-D warnings` - help: to link to the struct, prefix with the item type - | - 21 | /// [`stat`]: struct@crate::os::linux::raw::stat - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - help: to link to the function, add parentheses - | - 21 | /// [`stat`]: crate::os::linux::raw::stat() - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -We want the `struct`, so it's now prefixed accordingly. ---- - library/std/src/os/linux/fs.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs -index ff23c3d67e3b..9b7af97616c9 100644 ---- a/library/std/src/os/linux/fs.rs -+++ b/library/std/src/os/linux/fs.rs -@@ -20,7 +20,7 @@ pub trait MetadataExt { - /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the - /// cross-Unix abstractions contained within the raw stat. - /// -- /// [`stat`]: crate::os::linux::raw::stat -+ /// [`stat`]: struct@crate::os::linux::raw::stat - /// - /// # Examples - /// --- -2.26.2 - diff --git a/0001-use-NativeEndian-in-symbolize-gimli-Context.patch b/0001-use-NativeEndian-in-symbolize-gimli-Context.patch deleted file mode 100644 index 81b7a63..0000000 --- a/0001-use-NativeEndian-in-symbolize-gimli-Context.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 6f8efee8c936de65bc31610eea30abd5461a5dd1 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Thu, 8 Oct 2020 15:53:49 -0700 -Subject: [PATCH] use NativeEndian in symbolize::gimli::Context - -`Object` uses `NativeEndian`, so the `Context` should too. - -Cc: https://github.com/rust-lang/rust/issues/77410 ---- - src/symbolize/gimli.rs | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/symbolize/gimli.rs b/src/symbolize/gimli.rs -index 58ed8bafca3d..273ff43f1c8c 100644 ---- a/src/symbolize/gimli.rs -+++ b/src/symbolize/gimli.rs -@@ -5,7 +5,7 @@ - //! intended to wholesale replace the `libbacktrace.rs` implementation. - - use self::gimli::read::EndianSlice; --use self::gimli::LittleEndian as Endian; -+use self::gimli::NativeEndian as Endian; - use self::mmap::Mmap; - use self::stash::Stash; - use super::BytesOrWideString; --- -2.26.2 - diff --git a/rust.spec b/rust.spec index 176a75f..88c3909 100644 --- a/rust.spec +++ b/rust.spec @@ -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.47.0 -%global bootstrap_cargo 1.47.0 -%global bootstrap_channel 1.47.0 -%global bootstrap_date 2020-10-08 +%global bootstrap_rust 1.48.0 +%global bootstrap_cargo 1.48.0 +%global bootstrap_channel 1.48.0 +%global bootstrap_date 2020-11-19 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -52,8 +52,8 @@ %endif Name: rust -Version: 1.48.0 -Release: 3%{?dist} +Version: 1.49.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -67,12 +67,6 @@ ExclusiveArch: %{rust_arches} %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz -# https://github.com/rust-lang/backtrace-rs/pull/373 -Patch1: 0001-use-NativeEndian-in-symbolize-gimli-Context.patch - -# https://github.com/rust-lang/rust/pull/77777 -Patch2: 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch - ### RHEL-specific patches below ### # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) @@ -80,7 +74,7 @@ Patch100: rustc-1.48.0-disable-libssh2.patch # libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch101: rustc-1.48.0-disable-http2.patch +Patch101: rustc-1.49.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) @@ -179,7 +173,7 @@ BuildRequires: cmake >= 2.8.11 %global llvm llvm %global llvm_root %{_prefix} %endif -BuildRequires: %{llvm}-devel >= 8.0 +BuildRequires: %{llvm}-devel >= 9.0 %if %with llvm_static BuildRequires: %{llvm}-static BuildRequires: libffi-devel @@ -402,9 +396,6 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} -%patch1 -p1 -d library/backtrace -%patch2 -p1 - %if %with disabled_libssh2 %patch100 -p1 %endif @@ -729,10 +720,13 @@ export %{rust_env} %changelog +* Tue Jan 05 2021 Josh Stone - 1.49.0-1 +- Update to 1.49.0. + * Tue Dec 29 2020 Igor Raits - 1.48.0-3 - De-bootstrap -* Mon Dec 28 19:00:26 CET 2020 Igor Raits - 1.48.0-2 +* Mon Dec 28 2020 Igor Raits - 1.48.0-2 - Rebuild for libgit2 1.1.x * Thu Nov 19 2020 Josh Stone - 1.48.0-1 diff --git a/rustc-1.48.0-disable-http2.patch b/rustc-1.49.0-disable-http2.patch similarity index 73% rename from rustc-1.48.0-disable-http2.patch rename to rustc-1.49.0-disable-http2.patch index a162fd0..d6c6aa7 100644 --- a/rustc-1.48.0-disable-http2.patch +++ b/rustc-1.49.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.48.0-src/Cargo.lock.orig 2020-11-16 09:36:19.889728111 -0800 -+++ rustc-1.48.0-src/Cargo.lock 2020-11-16 09:36:19.890728089 -0800 -@@ -849,7 +849,6 @@ +--- rustc-1.49.0-src/Cargo.lock.orig 2021-01-05 12:45:10.456414612 -0800 ++++ rustc-1.49.0-src/Cargo.lock 2021-01-05 12:45:10.458414575 -0800 +@@ -882,7 +882,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1682,16 +1681,6 @@ +@@ -1728,16 +1727,6 @@ ] [[package]] @@ -25,20 +25,20 @@ name = "libz-sys" version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.48.0-src/src/tools/cargo/Cargo.toml.orig 2020-11-16 06:02:09.000000000 -0800 -+++ rustc-1.48.0-src/src/tools/cargo/Cargo.toml 2020-11-16 09:36:19.890728089 -0800 +--- rustc-1.49.0-src/src/tools/cargo/Cargo.toml.orig 2021-01-05 12:45:10.458414575 -0800 ++++ rustc-1.49.0-src/src/tools/cargo/Cargo.toml 2021-01-05 12:47:25.966928554 -0800 @@ -25,7 +25,7 @@ crates-io = { path = "crates/crates-io", version = "0.31.1" } - crossbeam-utils = "0.7" + crossbeam-utils = "0.8" crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } +curl = { version = "0.4.23", features = [] } curl-sys = "0.4.22" - env_logger = "0.7.0" + env_logger = "0.8.1" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-1.48.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-11-16 06:02:09.000000000 -0800 -+++ rustc-1.48.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-11-16 09:36:19.890728089 -0800 -@@ -396,14 +396,8 @@ +--- rustc-1.49.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-12-28 19:03:25.000000000 -0800 ++++ rustc-1.49.0-src/src/tools/cargo/src/cargo/core/package.rs 2021-01-05 12:45:10.458414575 -0800 +@@ -408,14 +408,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. @@ -55,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -566,7 +560,7 @@ +@@ -584,7 +578,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; diff --git a/sources b/sources index eb048bc..9a88293 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.48.0-src.tar.xz) = 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 +SHA512 (rustc-1.49.0-src.tar.xz) = fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 diff --git a/sources-bootstrap b/sources-bootstrap index bdfa9f7..21fb440 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.48.0-src.tar.xz) = 4e12baa6893238a8d336ec9ebe891477d18676f271b32763474fa7a6a8b58fb3187dd4e2aa95bce482989b692cc2e1360221669d6811eec71b326f22a1756c23 -SHA512 (rust-1.47.0-aarch64-unknown-linux-gnu.tar.xz) = 7df7045df341f03508f1ad795a9117b39c1f4c4cc778c7fd9d78c42e7da662ce244d018084ac9e80d9409cf8b3b5d1ccc25ef4cb71a2b8727398d30a4e962e19 -SHA512 (rust-1.47.0-armv7-unknown-linux-gnueabihf.tar.xz) = b207ab7c478dce6db4018527888f539938c8e77b5ceccb460b9d52ffee13a2329d225d03a605b60729cae6254129245bdd69730aebb6ec91dd0c83005cf25253 -SHA512 (rust-1.47.0-i686-unknown-linux-gnu.tar.xz) = 551204b4edfc1500aa83108c88b845997bb6befba0dd3401e9ae5294ab27960421f1b3130159946b996171c1d46f7532afa0c3ae767a9318985db0bb7c88dba0 -SHA512 (rust-1.47.0-powerpc64le-unknown-linux-gnu.tar.xz) = d5c6580861786545f0540cc9591884fb9f2036061bdd451d17cf8bfb427008d365cacd14e5054028c72b83d1d5eb347ab74478a882cbbd7fcc75a7421657561c -SHA512 (rust-1.47.0-powerpc64-unknown-linux-gnu.tar.xz) = 46fa1c042aebb06db4185fed6ef3bc7772f2a13f2290a20f5499757aae2a05dc984026315be7b5813aac172f52f50565e56aa074d32f6271858590a9ceb9e1c7 -SHA512 (rust-1.47.0-s390x-unknown-linux-gnu.tar.xz) = dd5877b6ff5c310ca6aa23c1cc621e6b0675d4c46f5a06b2a0b107641b604a1a2101109ba8e286267bab1158768c601d5d9a922a8da72486c91755ef465720c0 -SHA512 (rust-1.47.0-x86_64-unknown-linux-gnu.tar.xz) = f695986ab8e67636b0e92ca7ea223984121e3c22788434a6f1062690e7932f6b30c0c302160fef96831f821acedaf8a909bd3d00a9aa873c7200d2b8fa39013f +SHA512 (rustc-1.49.0-src.tar.xz) = fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 +SHA512 (rust-1.48.0-aarch64-unknown-linux-gnu.tar.xz) = 6ebbd936b1bc2ccf30b62dbbbc6f3986fb57738d89e33a23d58bab09be57a445c17df7912866add91cc108ef7547d229a08c6206db2d2fb00d72887ff6a0894d +SHA512 (rust-1.48.0-armv7-unknown-linux-gnueabihf.tar.xz) = 9763b0c5bc5dc7b265b86636ed32947aab98bd9b5732c4b298ade93e9a09bab82ad37fc7ca2d7c97dfd87634756b3c55015d47696c0a6ed2cb44be03659bcf55 +SHA512 (rust-1.48.0-i686-unknown-linux-gnu.tar.xz) = b8b3c5407304a333fc6c10ad70363589a88673640dda7b5fde8971097e679f56a8c733da31b2183044ae2ce30700db923cc3c3cb8c590d785df680b60b199451 +SHA512 (rust-1.48.0-powerpc64le-unknown-linux-gnu.tar.xz) = 7ddd2b0599872012f8613ccab456622cb05a0a43587b7d389e8b7fdf9381f0387763726d892da931233c89e8e3ce45c2b303ed00b1cce1f91c88d8f88d6b148d +SHA512 (rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz) = f79e1f984cc3c4dce08599418be2885666e0b6f73e639b10e97ffff4b900606d880c0596b6c2ab7c5f999cfc364d22b2ca6ab88db6ba38b8b227670b222fe23b +SHA512 (rust-1.48.0-s390x-unknown-linux-gnu.tar.xz) = b2b1565f3b1cc0c3bf4aa06aba1da7df775c6e29c892ca7727d0e549f175b632080433be2586e799c5636231de6c678f0228dedee8358fbf167016a1f7d25389 +SHA512 (rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz) = 0784e156e70c47386abfa88ecfeb62b1109364459b1fee225de0749c30379c4eb443ff3ff7faa7dc1a6ff373bc6eb43997007f937889cb35daf940a74641753b From 259615dcc04989c859f998513ae5b0ca4dc0c1a4 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 27 Jan 2021 16:44:01 +0000 Subject: [PATCH 19/20] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rust.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 88c3909..89c6e76 100644 --- a/rust.spec +++ b/rust.spec @@ -53,7 +53,7 @@ Name: rust Version: 1.49.0 -Release: 1%{?dist} +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) @@ -720,6 +720,9 @@ export %{rust_env} %changelog +* Wed Jan 27 2021 Fedora Release Engineering - 1.49.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jan 05 2021 Josh Stone - 1.49.0-1 - Update to 1.49.0. From 8148cbf67890e233c779daeddd4a4dfd5557fdf2 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 19 Feb 2021 10:25:21 -0800 Subject: [PATCH 20/20] Update to 1.50.0. --- .gitignore | 7 ++ 0001-Revert-Auto-merge-of-79547.patch | 102 ++++++++++++++++++++++++++ rust.spec | 36 ++++++--- sources | 2 +- sources-bootstrap | 15 ++-- 5 files changed, 142 insertions(+), 20 deletions(-) create mode 100644 0001-Revert-Auto-merge-of-79547.patch diff --git a/.gitignore b/.gitignore index becac4e..c43d28a 100644 --- a/.gitignore +++ b/.gitignore @@ -321,3 +321,10 @@ /rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz /rust-1.48.0-s390x-unknown-linux-gnu.tar.xz /rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz +/rustc-1.50.0-src.tar.xz +/rust-1.49.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.49.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.49.0-i686-unknown-linux-gnu.tar.xz +/rust-1.49.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.49.0-s390x-unknown-linux-gnu.tar.xz +/rust-1.49.0-x86_64-unknown-linux-gnu.tar.xz diff --git a/0001-Revert-Auto-merge-of-79547.patch b/0001-Revert-Auto-merge-of-79547.patch new file mode 100644 index 0000000..b2e58a1 --- /dev/null +++ b/0001-Revert-Auto-merge-of-79547.patch @@ -0,0 +1,102 @@ +From eaf7ea1fc339e1ff348ed941ed2e8c4d66f3e458 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Thu, 18 Feb 2021 19:14:58 -0800 +Subject: [PATCH] Revert "Auto merge of #79547 - erikdesjardins:byval, + r=nagisa" + +This reverts commit a094ff9590b83c8f94d898f92c2964a5803ded06, reversing +changes made to d37afad0cc87bf709ad10c85319296ac53030f03. +--- + compiler/rustc_middle/src/ty/layout.rs | 12 ++++++------ + ...return-value-in-reg.rs => return-value-in-reg.rs} | 4 ++-- + src/test/codegen/union-abi.rs | 11 +++-------- + 3 files changed, 11 insertions(+), 16 deletions(-) + rename src/test/codegen/{arg-return-value-in-reg.rs => return-value-in-reg.rs} (74%) + +diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs +index b545b92c9252..545f6aee1a21 100644 +--- a/compiler/rustc_middle/src/ty/layout.rs ++++ b/compiler/rustc_middle/src/ty/layout.rs +@@ -2849,7 +2849,7 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) { + || abi == SpecAbi::RustIntrinsic + || abi == SpecAbi::PlatformIntrinsic + { +- let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>| { ++ let fixup = |arg: &mut ArgAbi<'tcx, Ty<'tcx>>, is_ret: bool| { + if arg.is_ignore() { + return; + } +@@ -2887,9 +2887,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) { + _ => return, + } + +- // Pass and return structures up to 2 pointers in size by value, matching `ScalarPair`. +- // LLVM will usually pass these in 2 registers, which is more efficient than by-ref. +- let max_by_val_size = Pointer.size(cx) * 2; ++ // Return structures up to 2 pointers in size by value, matching `ScalarPair`. LLVM ++ // will usually return these in 2 registers, which is more efficient than by-ref. ++ let max_by_val_size = if is_ret { Pointer.size(cx) * 2 } else { Pointer.size(cx) }; + let size = arg.layout.size; + + if arg.layout.is_unsized() || size > max_by_val_size { +@@ -2901,9 +2901,9 @@ fn adjust_for_abi(&mut self, cx: &C, abi: SpecAbi) { + arg.cast_to(Reg { kind: RegKind::Integer, size }); + } + }; +- fixup(&mut self.ret); ++ fixup(&mut self.ret, true); + for arg in &mut self.args { +- fixup(arg); ++ fixup(arg, false); + } + return; + } +diff --git a/src/test/codegen/arg-return-value-in-reg.rs b/src/test/codegen/return-value-in-reg.rs +similarity index 74% +rename from src/test/codegen/arg-return-value-in-reg.rs +rename to src/test/codegen/return-value-in-reg.rs +index a69291d47821..4bc0136c5e32 100644 +--- a/src/test/codegen/arg-return-value-in-reg.rs ++++ b/src/test/codegen/return-value-in-reg.rs +@@ -1,4 +1,4 @@ +-//! Check that types of up to 128 bits are passed and returned by-value instead of via pointer. ++//! This test checks that types of up to 128 bits are returned by-value instead of via out-pointer. + + // compile-flags: -C no-prepopulate-passes -O + // only-x86_64 +@@ -11,7 +11,7 @@ pub struct S { + c: u32, + } + +-// CHECK: define i128 @modify(i128{{( %0)?}}) ++// CHECK: define i128 @modify(%S* noalias nocapture dereferenceable(16) %s) + #[no_mangle] + pub fn modify(s: S) -> S { + S { a: s.a + s.a, b: s.b + s.b, c: s.c + s.c } +diff --git a/src/test/codegen/union-abi.rs b/src/test/codegen/union-abi.rs +index f282fd237054..afea01e9a2d0 100644 +--- a/src/test/codegen/union-abi.rs ++++ b/src/test/codegen/union-abi.rs +@@ -63,16 +63,11 @@ pub union UnionU128{a:u128} + #[no_mangle] + pub fn test_UnionU128(_: UnionU128) -> UnionU128 { loop {} } + +-pub union UnionU128x2{a:(u128, u128)} +-// CHECK: define void @test_UnionU128x2(i128 %_1.0, i128 %_1.1) +-#[no_mangle] +-pub fn test_UnionU128x2(_: UnionU128x2) { loop {} } +- + #[repr(C)] +-pub union CUnionU128x2{a:(u128, u128)} +-// CHECK: define void @test_CUnionU128x2(%CUnionU128x2* {{.*}} %_1) ++pub union CUnionU128{a:u128} ++// CHECK: define void @test_CUnionU128(%CUnionU128* {{.*}} %_1) + #[no_mangle] +-pub fn test_CUnionU128x2(_: CUnionU128x2) { loop {} } ++pub fn test_CUnionU128(_: CUnionU128) { loop {} } + + pub union UnionBool { b:bool } + // CHECK: define zeroext i1 @test_UnionBool(i8 %b) +-- +2.29.2 + diff --git a/rust.spec b/rust.spec index 89c6e76..fbba9fa 100644 --- a/rust.spec +++ b/rust.spec @@ -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.48.0 -%global bootstrap_cargo 1.48.0 -%global bootstrap_channel 1.48.0 -%global bootstrap_date 2020-11-19 +%global bootstrap_rust 1.49.0 +%global bootstrap_cargo 1.49.0 +%global bootstrap_channel 1.49.0 +%global bootstrap_date 2020-12-31 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -21,11 +21,11 @@ %bcond_with llvm_static # We can also choose to just use Rust's bundled LLVM, in case the system LLVM -# is insufficient. Rust currently requires LLVM 8.0+. +# is insufficient. Rust currently requires LLVM 9.0+. %bcond_with bundled_llvm -# Requires stable libgit2 1.0 -%if 0%{?fedora} >= 32 +# Requires stable libgit2 1.1 +%if 0%{?fedora} >= 34 %bcond_with bundled_libgit2 %else %bcond_without bundled_libgit2 @@ -52,8 +52,8 @@ %endif Name: rust -Version: 1.49.0 -Release: 2%{?dist} +Version: 1.50.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -67,6 +67,10 @@ ExclusiveArch: %{rust_arches} %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz +# This internal rust-abi change broke s390x -- revert for now. +# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032 +Patch1: 0001-Revert-Auto-merge-of-79547.patch + ### RHEL-specific patches below ### # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) @@ -148,7 +152,7 @@ BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(zlib) %if %without bundled_libgit2 -BuildRequires: pkgconfig(libgit2) >= 1.0.0 +BuildRequires: pkgconfig(libgit2) >= 1.1.0 %endif %if %{without disabled_libssh2} @@ -396,6 +400,8 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} +%patch1 -p1 + %if %with disabled_libssh2 %patch100 -p1 %endif @@ -529,7 +535,8 @@ fi --enable-vendor \ --enable-verbose-tests \ %{?codegen_units_std} \ - --release-channel=%{channel} + --release-channel=%{channel} \ + --release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}" %{python} ./x.py build -j "$ncpus" --stage 2 %{python} ./x.py doc --stage 2 @@ -603,6 +610,9 @@ rm -f %{buildroot}%{_bindir}/rust-lldb rm -f %{buildroot}%{rustlibdir}/etc/lldb_* %endif +# We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp) +rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll* + %check export %{rust_env} @@ -677,6 +687,7 @@ export %{rust_env} %license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY %doc src/tools/cargo/README.md %{_bindir}/cargo +%{_libexecdir}/cargo* %{_mandir}/man1/cargo*.1* %{_sysconfdir}/bash_completion.d/cargo %{_datadir}/zsh/site-functions/_cargo @@ -720,6 +731,9 @@ export %{rust_env} %changelog +* Thu Feb 11 2021 Josh Stone - 1.50.0-1 +- Update to 1.50.0. + * Wed Jan 27 2021 Fedora Release Engineering - 1.49.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild diff --git a/sources b/sources index 9a88293..a9788dc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.49.0-src.tar.xz) = fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 +SHA512 (rustc-1.50.0-src.tar.xz) = df3c83c0fdc9ebce6fdccddda781dea0cdbd88d2b2a8220cac40cc3a8fa957923ae834d1fa45283d4ad227b334bd9e220e37a4a1ad7a1c7aeb806ed9ed387245 diff --git a/sources-bootstrap b/sources-bootstrap index 21fb440..78e4cd5 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,7 @@ -SHA512 (rustc-1.49.0-src.tar.xz) = fd8bc67ec0a73d3b6bf9c1fabb7ea981ef817644b4e6ced982fa90b12eae9b55de074634a670bdfb38bfee6588603e818ddcbcc2f2a05f83057c061b4194b4b7 -SHA512 (rust-1.48.0-aarch64-unknown-linux-gnu.tar.xz) = 6ebbd936b1bc2ccf30b62dbbbc6f3986fb57738d89e33a23d58bab09be57a445c17df7912866add91cc108ef7547d229a08c6206db2d2fb00d72887ff6a0894d -SHA512 (rust-1.48.0-armv7-unknown-linux-gnueabihf.tar.xz) = 9763b0c5bc5dc7b265b86636ed32947aab98bd9b5732c4b298ade93e9a09bab82ad37fc7ca2d7c97dfd87634756b3c55015d47696c0a6ed2cb44be03659bcf55 -SHA512 (rust-1.48.0-i686-unknown-linux-gnu.tar.xz) = b8b3c5407304a333fc6c10ad70363589a88673640dda7b5fde8971097e679f56a8c733da31b2183044ae2ce30700db923cc3c3cb8c590d785df680b60b199451 -SHA512 (rust-1.48.0-powerpc64le-unknown-linux-gnu.tar.xz) = 7ddd2b0599872012f8613ccab456622cb05a0a43587b7d389e8b7fdf9381f0387763726d892da931233c89e8e3ce45c2b303ed00b1cce1f91c88d8f88d6b148d -SHA512 (rust-1.48.0-powerpc64-unknown-linux-gnu.tar.xz) = f79e1f984cc3c4dce08599418be2885666e0b6f73e639b10e97ffff4b900606d880c0596b6c2ab7c5f999cfc364d22b2ca6ab88db6ba38b8b227670b222fe23b -SHA512 (rust-1.48.0-s390x-unknown-linux-gnu.tar.xz) = b2b1565f3b1cc0c3bf4aa06aba1da7df775c6e29c892ca7727d0e549f175b632080433be2586e799c5636231de6c678f0228dedee8358fbf167016a1f7d25389 -SHA512 (rust-1.48.0-x86_64-unknown-linux-gnu.tar.xz) = 0784e156e70c47386abfa88ecfeb62b1109364459b1fee225de0749c30379c4eb443ff3ff7faa7dc1a6ff373bc6eb43997007f937889cb35daf940a74641753b +SHA512 (rustc-1.50.0-src.tar.xz) = df3c83c0fdc9ebce6fdccddda781dea0cdbd88d2b2a8220cac40cc3a8fa957923ae834d1fa45283d4ad227b334bd9e220e37a4a1ad7a1c7aeb806ed9ed387245 +SHA512 (rust-1.49.0-aarch64-unknown-linux-gnu.tar.xz) = fa81b618359c2952de941e094eabfe2966e3c1a39a1b20452a77f1a68a54dde9cc5cade18db911cf448ffe947d934461ce752112bd9b5b5430e1fcdabbd8b56a +SHA512 (rust-1.49.0-armv7-unknown-linux-gnueabihf.tar.xz) = 1cba85fc958371aeb1d521e8842ad576e65d244147e2c75c34eaa776552ed025434d10284fa976d901d6cede69f6db3e5fdd770005ca0b93bb5e3202b9f9392a +SHA512 (rust-1.49.0-i686-unknown-linux-gnu.tar.xz) = b4d39cb234314f013969b5db3d365d21719d7a01f2dc0816e4f221c5e6d4abecd7f9e83f54b8640173d00d3e701cb3cbb61cef32f00db9356139005a1ce3bd19 +SHA512 (rust-1.49.0-powerpc64le-unknown-linux-gnu.tar.xz) = c17eb27ec4dbcc56da3edffbc57e0edda99744d6a0d38369fa08af066894aeb13dd78c7b8055f2246fc3bf13c654842675ea4df44b7bc8852e0f9952acdf7e7c +SHA512 (rust-1.49.0-s390x-unknown-linux-gnu.tar.xz) = 25259ea2e499c89459b14571e2c54f230d642af9cfe539dc2b8be15eff0e23b8c6e60af4c567bcbb6c6c185b4537eaab19c3395fce48b1f6e5ef1234efc31e3a +SHA512 (rust-1.49.0-x86_64-unknown-linux-gnu.tar.xz) = c008aa50e17db6a0134fb85235a958258d345410f5063bc77175f7c28b2e35895427b9e68cd1ac9acb769769c83313cd59fe6465b453e891cf415a2514b7722d