From 375b75425b9b973f9bcc2c795b44849240e1cc1b Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 20 Feb 2023 11:43:19 -0700 Subject: [PATCH 1/6] Ship rust-toolset for EPEL7 --- rust.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rust.spec b/rust.spec index 5a377de..4d60a3c 100644 --- a/rust.spec +++ b/rust.spec @@ -84,7 +84,7 @@ Name: rust Version: 1.67.1 -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) @@ -548,7 +548,7 @@ feature for the Rust standard library. The RLS (Rust Language Server) uses this data to provide information about the Rust standard library. -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} %package toolset Summary: Rust Toolset @@ -846,7 +846,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_* # We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp) rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll* -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} # This allows users to build packages using Rust Toolset. %{__install} -D -m 644 %{S:100} %{buildroot}%{rpmmacrodir}/macros.rust-toolset %endif @@ -1033,13 +1033,16 @@ end} %{rustlibdir}/%{rust_triple}/analysis/ -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} %files toolset %{rpmmacrodir}/macros.rust-toolset %endif %changelog +* Mon Feb 20 2023 Orion Poplawski - 1.67.1-2 +- Ship rust-toolset for EPEL7 + * Thu Feb 09 2023 Josh Stone - 1.67.1-1 - Update to 1.67.1. From 7f5b9608ec19e481fd248e44882e42828cf28ed1 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 20 Feb 2023 15:30:35 -0700 Subject: [PATCH 2/6] Make rust-toolset noarch --- rust.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 4d60a3c..0073cdb 100644 --- a/rust.spec +++ b/rust.spec @@ -552,8 +552,9 @@ data to provide information about the Rust standard library. %package toolset Summary: Rust Toolset -Requires: rust%{?_isa} = %{version}-%{release} -Requires: cargo%{?_isa} = %{version}-%{release} +BuildArch: noarch +Requires: rust = %{version}-%{release} +Requires: cargo = %{version}-%{release} %description toolset This is the metapackage for Rust Toolset, bringing in the Rust compiler, From b85b429e0026b2de8dabad1a4bdef2e4337d6053 Mon Sep 17 00:00:00 2001 From: David Michael Date: Tue, 7 Mar 2023 10:26:00 -0500 Subject: [PATCH 3/6] Add a virtual Provides to rust-std-static with the target triple This supports depending on a variable target using something like the following since the other target stdlib subpackages are named by this convention. BuildRequires: rust-std-static-%{cargo_target} --- rust.spec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 0073cdb..47628ee 100644 --- a/rust.spec +++ b/rust.spec @@ -84,7 +84,7 @@ Name: rust Version: 1.67.1 -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) @@ -330,6 +330,7 @@ This package includes the Rust compiler and documentation generator. %package std-static Summary: Standard library for Rust +Provides: %{name}-std-static-%{rust_triple} = %{version}-%{release} Requires: %{name} = %{version}-%{release} Requires: glibc-devel%{?_isa} >= 2.11 @@ -1041,6 +1042,9 @@ end} %changelog +* Tue Mar 07 2023 David Michael - 1.67.1-3 +- Add a virtual Provides to rust-std-static containing the target triple. + * Mon Feb 20 2023 Orion Poplawski - 1.67.1-2 - Ship rust-toolset for EPEL7 From a07799699ff200fe13adbdc0780398794d1b6c11 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 9 Mar 2023 08:52:34 -0800 Subject: [PATCH 4/6] Update to 1.68.0. --- .gitignore | 2 + 0001-Fix-Async-Generator-ABI.patch | 55 ------------------- rust.spec | 32 ++++++----- ....patch => rustc-1.68.0-disable-http2.patch | 46 ++++++++-------- sources | 4 +- 5 files changed, 46 insertions(+), 93 deletions(-) delete mode 100644 0001-Fix-Async-Generator-ABI.patch rename rustc-1.67.0-disable-http2.patch => rustc-1.68.0-disable-http2.patch (75%) diff --git a/.gitignore b/.gitignore index d66305a..357f367 100644 --- a/.gitignore +++ b/.gitignore @@ -412,3 +412,5 @@ /rustc-1.66.1-src.tar.xz /rustc-1.67.0-src.tar.xz /rustc-1.67.1-src.tar.xz +/rustc-1.68.0-src.tar.xz +/wasi-libc-wasi-sdk-19.tar.gz diff --git a/0001-Fix-Async-Generator-ABI.patch b/0001-Fix-Async-Generator-ABI.patch deleted file mode 100644 index 34dd1bc..0000000 --- a/0001-Fix-Async-Generator-ABI.patch +++ /dev/null @@ -1,55 +0,0 @@ -From ecf812777a260e35ec9cd0c7d9dbd17a3f5cf5f9 Mon Sep 17 00:00:00 2001 -From: Arpad Borsos -Date: Tue, 29 Nov 2022 23:17:08 +0100 -Subject: [PATCH] Fix Async Generator ABI - -This change was missed when making async generators implement `Future` directly. -It did not cause any problems in codegen so far, as `GeneratorState<(), Output>` -happens to have the same ABI as `Poll`. ---- - compiler/rustc_ty_utils/src/abi.rs | 22 +++++++++++++++++----- - 1 file changed, 17 insertions(+), 5 deletions(-) - -diff --git a/compiler/rustc_ty_utils/src/abi.rs b/compiler/rustc_ty_utils/src/abi.rs -index 73c7eb6992f0..d644cbccea11 100644 ---- a/compiler/rustc_ty_utils/src/abi.rs -+++ b/compiler/rustc_ty_utils/src/abi.rs -@@ -85,7 +85,7 @@ fn fn_sig_for_fn_abi<'tcx>( - bound_vars, - ) - } -- ty::Generator(_, substs, _) => { -+ ty::Generator(did, substs, _) => { - let sig = substs.as_generator().poly_sig(); - - let bound_vars = tcx.mk_bound_variable_kinds( -@@ -104,10 +104,22 @@ fn fn_sig_for_fn_abi<'tcx>( - let env_ty = tcx.mk_adt(pin_adt_ref, pin_substs); - - let sig = sig.skip_binder(); -- let state_did = tcx.require_lang_item(LangItem::GeneratorState, None); -- let state_adt_ref = tcx.adt_def(state_did); -- let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]); -- let ret_ty = tcx.mk_adt(state_adt_ref, state_substs); -+ // The `FnSig` and the `ret_ty` here is for a generators main -+ // `Generator::resume(...) -> GeneratorState` function in case we -+ // have an ordinary generator, or the `Future::poll(...) -> Poll` -+ // function in case this is a special generator backing an async construct. -+ let ret_ty = if tcx.generator_is_async(did) { -+ let state_did = tcx.require_lang_item(LangItem::Poll, None); -+ let state_adt_ref = tcx.adt_def(state_did); -+ let state_substs = tcx.intern_substs(&[sig.return_ty.into()]); -+ tcx.mk_adt(state_adt_ref, state_substs) -+ } else { -+ let state_did = tcx.require_lang_item(LangItem::GeneratorState, None); -+ let state_adt_ref = tcx.adt_def(state_did); -+ let state_substs = tcx.intern_substs(&[sig.yield_ty.into(), sig.return_ty.into()]); -+ tcx.mk_adt(state_adt_ref, state_substs) -+ }; -+ - ty::Binder::bind_with_vars( - tcx.mk_fn_sig( - [env_ty, sig.resume_ty].iter(), --- -2.39.1 - diff --git a/rust.spec b/rust.spec index 47628ee..6589fd3 100644 --- a/rust.spec +++ b/rust.spec @@ -1,4 +1,4 @@ -# Only x86_64 and i686 are Tier 1 platforms at this time. +# Only x86_64, i686, and aarch64 are Tier 1 platforms at this time. # https://doc.rust-lang.org/nightly/rustc/platform-support.html %global rust_arches x86_64 i686 armv7hl aarch64 ppc64le s390x @@ -8,9 +8,9 @@ # To bootstrap from scratch, set the channel and date from src/stage0.json # e.g. 1.59.0 wants rustc: 1.58.0-2022-01-13 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_version 1.66.0 -%global bootstrap_channel 1.66.0 -%global bootstrap_date 2022-12-15 +%global bootstrap_version 1.67.1 +%global bootstrap_channel 1.67.1 +%global bootstrap_date 2023-02-09 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -35,7 +35,7 @@ # src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh # (updated per https://github.com/rust-lang/rust/pull/96907) %global wasi_libc_url https://github.com/WebAssembly/wasi-libc -%global wasi_libc_ref wasi-sdk-17 +%global wasi_libc_ref wasi-sdk-19 %global wasi_libc_name wasi-libc-%{wasi_libc_ref} %global wasi_libc_source %{wasi_libc_url}/archive/%{wasi_libc_ref}/%{wasi_libc_name}.tar.gz %global wasi_libc_dir %{_builddir}/%{wasi_libc_name} @@ -83,8 +83,8 @@ %endif Name: rust -Version: 1.67.1 -Release: 3%{?dist} +Version: 1.68.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) @@ -106,10 +106,6 @@ Patch1: 0001-Use-lld-provided-by-system-for-wasm.patch # Set a substitute-path in rust-gdb for standard library sources. Patch2: rustc-1.61.0-rust-gdb-substitute-path.patch -# Fix Async Generator ABI (rhbz2168622) -# https://github.com/rust-lang/rust/pull/105082 -Patch3: 0001-Fix-Async-Generator-ABI.patch - ### RHEL-specific patches below ### # Simple rpm macros for rust-toolset (as opposed to full rust-packaging) @@ -120,7 +116,7 @@ Patch100: rustc-1.65.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.67.0-disable-http2.patch +Patch101: rustc-1.68.0-disable-http2.patch # kernel rh1410097 causes too-small stacks for PIE. # (affects RHEL6 kernels when building for RHEL7) @@ -332,7 +328,7 @@ This package includes the Rust compiler and documentation generator. Summary: Standard library for Rust Provides: %{name}-std-static-%{rust_triple} = %{version}-%{release} Requires: %{name} = %{version}-%{release} -Requires: glibc-devel%{?_isa} >= 2.11 +Requires: glibc-devel%{?_isa} >= 2.17 %description std-static This package includes the standard libraries for building applications @@ -586,7 +582,6 @@ test -f '%{local_rust_root}/bin/rustc' %patch1 -p1 %patch2 -p1 -%patch3 -p1 %if %with disabled_libssh2 %patch100 -p1 @@ -656,6 +651,12 @@ 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 '{}' '+' +# The distro flags are only appropriate for the host, not our cross-targets, +# and they're not as fine-grained as the settings we choose for std vs rustc. +%if %defined build_rustflags +%global build_rustflags %{nil} +%endif + # Set up shared environment variables for build/install/check %global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"} %if 0%{?cmake_path:1} @@ -1042,6 +1043,9 @@ end} %changelog +* Thu Mar 09 2023 Josh Stone - 1.68.0-1 +- Update to 1.68.0. + * Tue Mar 07 2023 David Michael - 1.67.1-3 - Add a virtual Provides to rust-std-static containing the target triple. diff --git a/rustc-1.67.0-disable-http2.patch b/rustc-1.68.0-disable-http2.patch similarity index 75% rename from rustc-1.67.0-disable-http2.patch rename to rustc-1.68.0-disable-http2.patch index 7b346e9..09c4339 100644 --- a/rustc-1.67.0-disable-http2.patch +++ b/rustc-1.68.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-beta-src/Cargo.lock.orig 2023-01-24 13:25:47.822917185 -0800 -+++ rustc-beta-src/Cargo.lock 2023-01-24 13:25:47.824917142 -0800 -@@ -1062,7 +1062,6 @@ +--- rustc-beta-src/Cargo.lock.orig 2023-03-03 17:26:41.309081970 -0800 ++++ rustc-beta-src/Cargo.lock 2023-03-03 17:26:41.311081929 -0800 +@@ -1152,7 +1152,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -2181,16 +2180,6 @@ +@@ -2399,16 +2398,6 @@ checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a" [[package]] @@ -25,20 +25,20 @@ name = "libz-sys" version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-01-24 13:25:47.824917142 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-01-24 13:26:29.209044200 -0800 +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-03-03 17:26:41.311081929 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-03 17:27:32.999013773 -0800 @@ -21,7 +21,7 @@ cargo-platform = { path = "crates/cargo-platform", version = "0.1.2" } cargo-util = { path = "crates/cargo-util", version = "0.2.3" } - crates-io = { path = "crates/crates-io", version = "0.35.0" } + crates-io = { path = "crates/crates-io", version = "0.35.1" } -curl = { version = "0.4.44", features = ["http2"] } +curl = { version = "0.4.44", features = [] } curl-sys = "0.4.59" env_logger = "0.10.0" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-01-21 17:17:19.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-01-24 13:25:47.824917142 -0800 -@@ -403,16 +403,9 @@ +--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-02-26 19:02:38.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-03 17:26:41.311081929 -0800 +@@ -402,16 +402,9 @@ sources: SourceMap<'cfg>, config: &'cfg Config, ) -> CargoResult> { @@ -58,18 +58,9 @@ Ok(PackageSet { packages: package_ids -@@ -658,7 +651,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); - } ---- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-01-21 17:17:19.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-01-24 13:25:47.824917142 -0800 -@@ -223,16 +223,8 @@ +--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-02-26 19:02:38.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-03-03 17:26:41.311081929 -0800 +@@ -220,16 +220,8 @@ } self.fetch_started = true; @@ -88,3 +79,14 @@ self.config .shell() +--- rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs.orig 2023-02-26 19:02:38.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs 2023-03-03 17:29:54.808076261 -0800 +@@ -116,7 +116,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/sources b/sources index a139b61..1d510ad 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.67.1-src.tar.xz) = 42d77ee93b168ae139b026138fb48d925624ff436a836aa97ee235f870e61ea11643b0cf7ad20bcafda774c6cd3855a4bc10a2e2ed1c4d82c6f15158963b304d -SHA512 (wasi-libc-wasi-sdk-17.tar.gz) = 5870f86d4a8431edefaef41163d1fa7eddeabcfa6bc5794c7bf18b4fd320b6ea43c261a7e41966d0da1490a2d96b9742c82cbcca7c56bb404830722664cab376 +SHA512 (rustc-1.68.0-src.tar.xz) = f6cc5c06488080f2d7ce8c4f5adf7ca8ae8b10caea627b57876b051593af1201a48823d0abf5fcbcd344b46606b53957569db9844d647a5fdc4abca06e260f3a +SHA512 (wasi-libc-wasi-sdk-19.tar.gz) = 312f4d01d1b1108c24a1e9b233648ec44408ec1b7c17e8a65288038a94f117be9ed8181c60f99f9593ff80ca380f53c51756357bad466cd65027cb23a3646d23 From b4bb093ae0542643ac4d4d3d3e439153e7d1c5f9 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 23 Mar 2023 08:42:27 -0700 Subject: [PATCH 5/6] Update to 1.68.1. --- .gitignore | 1 + rust.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 357f367..32af96d 100644 --- a/.gitignore +++ b/.gitignore @@ -414,3 +414,4 @@ /rustc-1.67.1-src.tar.xz /rustc-1.68.0-src.tar.xz /wasi-libc-wasi-sdk-19.tar.gz +/rustc-1.68.1-src.tar.xz diff --git a/rust.spec b/rust.spec index 6589fd3..fb51bb8 100644 --- a/rust.spec +++ b/rust.spec @@ -83,7 +83,7 @@ %endif Name: rust -Version: 1.68.0 +Version: 1.68.1 Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -1043,6 +1043,9 @@ end} %changelog +* Thu Mar 23 2023 Josh Stone - 1.68.1-1 +- Update to 1.68.1. + * Thu Mar 09 2023 Josh Stone - 1.68.0-1 - Update to 1.68.0. diff --git a/sources b/sources index 1d510ad..4d7894e 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.68.0-src.tar.xz) = f6cc5c06488080f2d7ce8c4f5adf7ca8ae8b10caea627b57876b051593af1201a48823d0abf5fcbcd344b46606b53957569db9844d647a5fdc4abca06e260f3a +SHA512 (rustc-1.68.1-src.tar.xz) = cf3921bc260db54b0f3afc0e6bc9fe8d560ddb81de5d2d4496746307d42a8010291f119d0cfc463996efce6ef829a0494b4eb6145e21c94fd113ff51ee010e21 SHA512 (wasi-libc-wasi-sdk-19.tar.gz) = 312f4d01d1b1108c24a1e9b233648ec44408ec1b7c17e8a65288038a94f117be9ed8181c60f99f9593ff80ca380f53c51756357bad466cd65027cb23a3646d23 From 7ac7a42b5e2fd46d73d2a0946c55109c03e22966 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 28 Mar 2023 10:11:01 -0700 Subject: [PATCH 6/6] Update to 1.68.2. --- .gitignore | 1 + rust.spec | 5 ++++- sources | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 32af96d..ebd8c24 100644 --- a/.gitignore +++ b/.gitignore @@ -415,3 +415,4 @@ /rustc-1.68.0-src.tar.xz /wasi-libc-wasi-sdk-19.tar.gz /rustc-1.68.1-src.tar.xz +/rustc-1.68.2-src.tar.xz diff --git a/rust.spec b/rust.spec index fb51bb8..d01c2c4 100644 --- a/rust.spec +++ b/rust.spec @@ -83,7 +83,7 @@ %endif Name: rust -Version: 1.68.1 +Version: 1.68.2 Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -1043,6 +1043,9 @@ end} %changelog +* Tue Mar 28 2023 Josh Stone - 1.68.2-1 +- Update to 1.68.2. + * Thu Mar 23 2023 Josh Stone - 1.68.1-1 - Update to 1.68.1. diff --git a/sources b/sources index 4d7894e..63e72f1 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.68.1-src.tar.xz) = cf3921bc260db54b0f3afc0e6bc9fe8d560ddb81de5d2d4496746307d42a8010291f119d0cfc463996efce6ef829a0494b4eb6145e21c94fd113ff51ee010e21 +SHA512 (rustc-1.68.2-src.tar.xz) = 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3 SHA512 (wasi-libc-wasi-sdk-19.tar.gz) = 312f4d01d1b1108c24a1e9b233648ec44408ec1b7c17e8a65288038a94f117be9ed8181c60f99f9593ff80ca380f53c51756357bad466cd65027cb23a3646d23