From 89eacb88ce5a3dab18801af3055b466a310469e4 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 8 Feb 2024 09:36:10 -0800 Subject: [PATCH] Update to 1.76.0. --- .gitignore | 2 + ...-only-show-PGO-warnings-when-verbose.patch | 33 -------------- rust.spec | 44 +++++++++++-------- ...atch => rustc-1.76.0-disable-libssh2.patch | 28 ++++++------ rustc-1.76.0-unbundle-sqlite.patch | 21 +++++++++ sources | 4 +- 6 files changed, 64 insertions(+), 68 deletions(-) delete mode 100644 0001-bootstrap-only-show-PGO-warnings-when-verbose.patch rename rustc-1.75.0-disable-libssh2.patch => rustc-1.76.0-disable-libssh2.patch (60%) create mode 100644 rustc-1.76.0-unbundle-sqlite.patch diff --git a/.gitignore b/.gitignore index 8b53132..85da98e 100644 --- a/.gitignore +++ b/.gitignore @@ -430,3 +430,5 @@ /rustc-1.74.0-src.tar.xz /rustc-1.74.1-src.tar.xz /rustc-1.75.0-src.tar.xz +/rustc-1.76.0-src.tar.xz +/wasi-libc-03b228e46bb02fcc5927253e1b8ad715072b1ae4.tar.gz diff --git a/0001-bootstrap-only-show-PGO-warnings-when-verbose.patch b/0001-bootstrap-only-show-PGO-warnings-when-verbose.patch deleted file mode 100644 index ca36844..0000000 --- a/0001-bootstrap-only-show-PGO-warnings-when-verbose.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 776146e9ebb6bbe17a37bfad955f3dac95317275 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Thu, 16 Nov 2023 10:42:23 -0800 -Subject: [PATCH] bootstrap: only show PGO warnings when verbose - -Building rustc with `--rust-profile-use` is currently dumping a lot of -warnings of "no profile data available for function" from `rustc_smir` -and `stable_mir`. These simply aren't exercised by the current profile- -gathering steps, but that's to be expected for new or experimental -functionality. I think for most people, these warnings will be just -noise, so it makes sense to only have them in verbose builds. ---- - src/bootstrap/src/core/build_steps/compile.rs | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs -index af69860df1c5..51e4195827fc 100644 ---- a/src/bootstrap/src/core/build_steps/compile.rs -+++ b/src/bootstrap/src/core/build_steps/compile.rs -@@ -887,7 +887,9 @@ fn run(self, builder: &Builder<'_>) { - } else if let Some(path) = &builder.config.rust_profile_use { - if compiler.stage == 1 { - cargo.rustflag(&format!("-Cprofile-use={path}")); -- cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function"); -+ if builder.is_verbose() { -+ cargo.rustflag("-Cllvm-args=-pgo-warn-missing-function"); -+ } - true - } else { - false --- -2.43.0 - diff --git a/rust.spec b/rust.spec index 6c02679..4c4600c 100644 --- a/rust.spec +++ b/rust.spec @@ -1,6 +1,6 @@ Name: rust -Version: 1.75.0 -Release: 3%{?dist} +Version: 1.76.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016) # ^ written as: (rust itself) and (bundled libraries) @@ -14,9 +14,9 @@ ExclusiveArch: %{rust_arches} # 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.74.0 -%global bootstrap_channel 1.74.0 -%global bootstrap_date 2023-11-16 +%global bootstrap_version 1.75.0 +%global bootstrap_channel 1.75.0 +%global bootstrap_date 2023-12-28 # Only the specified arches will use bootstrap binaries. # NOTE: Those binaries used to be uploaded with every new release, but that was @@ -44,10 +44,9 @@ ExclusiveArch: %{rust_arches} # We need CRT files for *-wasi targets, at least as new as the commit in # 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-20 -%global wasi_libc_ref bd950eb128bff337153de217b11270f948d04bb4 +#global wasi_libc_ref wasi-sdk-21 +%global wasi_libc_ref 03b228e46bb02fcc5927253e1b8ad715072b1ae4 %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} @@ -63,7 +62,7 @@ ExclusiveArch: %{rust_arches} # We can also choose to just use Rust's bundled LLVM, in case the system LLVM # is insufficient. Rust currently requires LLVM 15.0+. %global min_llvm_version 15.0.0 -%global bundled_llvm_version 17.0.5 +%global bundled_llvm_version 17.0.6 %bcond_with bundled_llvm # Requires stable libgit2 1.7, and not the next minor soname change. @@ -124,8 +123,8 @@ Patch3: 0001-Let-environment-variables-override-some-default-CPUs.patch Patch4: 0001-bootstrap-allow-disabling-target-self-contained.patch Patch5: 0002-set-an-external-library-path-for-wasm32-wasi.patch -# https://github.com/rust-lang/rust/pull/117982 -Patch6: 0001-bootstrap-only-show-PGO-warnings-when-verbose.patch +# We don't want to use the bundled library in libsqlite3-sys +Patch6: rustc-1.76.0-unbundle-sqlite.patch ### RHEL-specific patches below ### @@ -136,7 +135,7 @@ Source102: cargo_vendor.attr Source103: cargo_vendor.prov # Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) -Patch100: rustc-1.75.0-disable-libssh2.patch +Patch100: rustc-1.76.0-disable-libssh2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) @@ -206,6 +205,7 @@ BuildRequires: curl-devel BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(liblzma) BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(sqlite3) BuildRequires: pkgconfig(zlib) %if %{without bundled_libgit2} @@ -603,6 +603,7 @@ mkdir -p src/llvm-project/libunwind/ %clear_dir vendor/*jemalloc-sys*/jemalloc/ %clear_dir vendor/libffi-sys*/libffi/ %clear_dir vendor/libmimalloc-sys*/c_src/mimalloc/ +%clear_dir vendor/libsqlite3-sys*/{sqlite3,sqlcipher}/ %clear_dir vendor/libssh2-sys*/libssh2/ %clear_dir vendor/libz-sys*/src/zlib{,-ng}/ %clear_dir vendor/lzma-sys*/xz-*/ @@ -655,13 +656,15 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+' print(env) end} -# Set up shared environment variables for build/install/check -%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"} %{rustc_target_cpus} -%if %without disabled_libssh2 -# convince libssh2-sys to use the distro libssh2 -%global rust_env %{?rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1 -%endif -%global export_rust_env %{?rust_env:export %{rust_env}} +# Set up shared environment variables for build/install/check. +# *_USE_PKG_CONFIG=1 convinces *-sys crates to use the system library. +%global rust_env %{shrink: + %{?rustflags:RUSTFLAGS="%{rustflags}"} + %{rustc_target_cpus} + LIBSQLITE3_SYS_USE_PKG_CONFIG=1 + %{!?with_disabled_libssh2:LIBSSH2_SYS_USE_PKG_CONFIG=1} +} +%global export_rust_env export %{rust_env} %build %{export_rust_env} @@ -1049,6 +1052,9 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/" %changelog +* Thu Feb 08 2024 Josh Stone - 1.76.0-1 +- Update to 1.76.0. + * Tue Jan 30 2024 Josh Stone - 1.75.0-3 - Consolidate 32-bit build compromises. - Update rust-toolset and add rust-srpm-macros for ELN. diff --git a/rustc-1.75.0-disable-libssh2.patch b/rustc-1.76.0-disable-libssh2.patch similarity index 60% rename from rustc-1.75.0-disable-libssh2.patch rename to rustc-1.76.0-disable-libssh2.patch index 2b06046..2c6fba2 100644 --- a/rustc-1.75.0-disable-libssh2.patch +++ b/rustc-1.76.0-disable-libssh2.patch @@ -1,6 +1,6 @@ ---- ./rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2023-11-12 12:24:35.000000000 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.lock 2023-11-14 17:01:32.010125953 -0800 -@@ -2027,7 +2027,6 @@ +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-01-07 18:12:08.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-01-09 15:25:51.519781381 -0800 +@@ -2071,7 +2071,6 @@ dependencies = [ "cc", "libc", @@ -8,10 +8,12 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -2060,20 +2059,6 @@ +@@ -2113,20 +2112,6 @@ + "pkg-config", + "vcpkg", ] - - [[package]] +- +-[[package]] -name = "libssh2-sys" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" @@ -24,19 +26,17 @@ - "pkg-config", - "vcpkg", -] -- --[[package]] + + [[package]] name = "libz-sys" - version = "1.1.9" - source = "registry+https://github.com/rust-lang/crates.io-index" ---- ./rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-11-14 17:01:32.010125953 -0800 -+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-11-14 17:02:44.645097701 -0800 +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-01-09 15:23:02.369032291 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-01-09 15:24:44.015679666 -0800 @@ -40,7 +40,7 @@ - curl-sys = "0.4.68" + curl-sys = "0.4.70" filetime = "0.2.22" flate2 = { version = "1.0.28", default-features = false, features = ["zlib"] } -git2 = "0.18.1" +git2 = { version = "0.18.1", default-features = false, features = ["https"] } git2-curl = "0.19.0" - gix = { version = "0.55.2", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } + gix = { version = "0.56.0", default-features = false, features = ["blocking-http-transport-curl", "progress-tree", "revision"] } gix-features-for-configuration-only = { version = "0.35.0", package = "gix-features", features = [ "parallel" ] } diff --git a/rustc-1.76.0-unbundle-sqlite.patch b/rustc-1.76.0-unbundle-sqlite.patch new file mode 100644 index 0000000..6c1c667 --- /dev/null +++ b/rustc-1.76.0-unbundle-sqlite.patch @@ -0,0 +1,21 @@ +--- rustc-beta-src/src/tools/cargo/Cargo.lock.orig 2024-01-07 18:12:08.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.lock 2024-01-09 15:36:23.808367445 -0800 +@@ -2109,7 +2109,6 @@ + source = "registry+https://github.com/rust-lang/crates.io-index" + checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" + dependencies = [ +- "cc", + "pkg-config", + "vcpkg", + ] +--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2024-01-07 18:12:08.000000000 -0800 ++++ rustc-beta-src/src/tools/cargo/Cargo.toml 2024-01-09 15:36:18.534437627 -0800 +@@ -73,7 +73,7 @@ + pulldown-cmark = { version = "0.9.3", default-features = false } + rand = "0.8.5" + regex = "1.10.2" +-rusqlite = { version = "0.30.0", features = ["bundled"] } ++rusqlite = { version = "0.30.0", features = [] } + rustfix = { version = "0.7.0", path = "crates/rustfix" } + same-file = "1.0.6" + security-framework = "2.9.2" diff --git a/sources b/sources index c4c9dac..e29d03b 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (rustc-1.75.0-src.tar.xz) = 7b0f25d91b1b5c317980fc88e059200bd43b56a70b445fbc72fb9b96e09775bfd3a98e9bd9d662af80f0ce3aef527c777ee82777e96ca876f47a972d63da8606 -SHA512 (wasi-libc-bd950eb128bff337153de217b11270f948d04bb4.tar.gz) = 01e5cc3ebdab239f57816ff80f939fd87a5491a28951daf74b3310b118b4820c098ac9417771c9c6af55ca91d2cabe6498975ab9db4914aba754d87067cd1066 +SHA512 (rustc-1.76.0-src.tar.xz) = 92e16cfdeb91bde341fe6c2774d92868275b07aa1d46d870ddc9291eadfe4ea9af93e06586fa7d6b8d60534903945cbbe706d354c90272712989c58d2bf174bf +SHA512 (wasi-libc-03b228e46bb02fcc5927253e1b8ad715072b1ae4.tar.gz) = 56306817a6d683aeaf61c3376700804f143b9be101729693c1c88666ea201f02a3e7a3b32150f688a784ac4aae30e46bdbe3fc79a1a9c62e7b460d11ad509045