Update to 1.69.0.

Obsolete rust-analysis.
This commit is contained in:
Josh Stone 2023-04-20 09:47:54 -07:00
parent 7ac7a42b5e
commit 77613da92c
4 changed files with 73 additions and 57 deletions

2
.gitignore vendored
View File

@ -416,3 +416,5 @@
/wasi-libc-wasi-sdk-19.tar.gz
/rustc-1.68.1-src.tar.xz
/rustc-1.68.2-src.tar.xz
/rustc-1.69.0-src.tar.xz
/wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz

View File

@ -1,6 +1,6 @@
# 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
%global rust_arches x86_64 i686 armv7hl aarch64 ppc64le s390x riscv64
# The channel can be stable, beta, or nightly
%{!?channel: %global channel stable}
@ -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.67.1
%global bootstrap_channel 1.67.1
%global bootstrap_date 2023-02-09
%global bootstrap_version 1.68.2
%global bootstrap_channel 1.68.2
%global bootstrap_date 2023-03-28
# 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,8 @@
# 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-19
#global wasi_libc_ref wasi-sdk-20
%global wasi_libc_ref 1dfe5c302d1c5ab621f7abf04620fae92700fd22
%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}
@ -44,9 +45,9 @@
%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 12.0+.
%global min_llvm_version 13.0.0
%global bundled_llvm_version 15.0.6
# is insufficient. Rust currently requires LLVM 14.0+.
%global min_llvm_version 14.0.0
%global bundled_llvm_version 15.0.7
%bcond_with bundled_llvm
# Requires stable libgit2 1.5, and not the next minor soname change.
@ -83,7 +84,7 @@
%endif
Name: rust
Version: 1.68.2
Version: 1.69.0
Release: 1%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
@ -116,7 +117,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.68.0-disable-http2.patch
Patch101: rustc-1.69.0-disable-http2.patch
# kernel rh1410097 causes too-small stacks for PIE.
# (affects RHEL6 kernels when building for RHEL7)
@ -139,7 +140,14 @@ Patch102: rustc-1.65.0-no-default-pie.patch
return arch.."-unknown-linux-"..abi
end}
# Get the environment form of a Rust triple
%{lua: function rust_triple_env(triple)
local sub = string.gsub(triple, "-", "_")
return string.upper(sub)
end}
%global rust_triple %{lua: print(rust_triple(rpm.expand("%{_target_cpu}")))}
%global rust_triple_env %{lua: print(rust_triple_env(rpm.expand("%{rust_triple}")))}
%if %defined bootstrap_arches
# For each bootstrap arch, add an additional binary Source.
@ -215,7 +223,7 @@ Provides: bundled(llvm) = %{bundled_llvm_version}
%else
BuildRequires: cmake >= 2.8.11
%if 0%{?epel} == 7
%global llvm llvm13
%global llvm llvm14
%endif
%if %defined llvm
%global llvm_root %{_libdir}/%{llvm}
@ -252,7 +260,7 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
Requires: /usr/bin/cc
%if 0%{?epel} == 7
%global devtoolset_name devtoolset-9
%global devtoolset_name devtoolset-11
BuildRequires: %{devtoolset_name}-binutils
BuildRequires: %{devtoolset_name}-gcc
BuildRequires: %{devtoolset_name}-gcc-c++
@ -317,6 +325,10 @@ find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)'
%{nil}
%endif
# This component was removed as of Rust 1.69.0.
# https://github.com/rust-lang/rust/pull/101841
Obsoletes: %{name}-analysis < 1.69.0~
%description
Rust is a systems programming language that runs blazingly fast, prevents
segfaults, and guarantees thread safety.
@ -531,20 +543,6 @@ This package includes source files for the Rust standard library. It may be
useful as a reference for code completion tools in various editors.
%package analysis
Summary: Compiler analysis data for the Rust standard library
%if 0%{?rhel} && 0%{?rhel} < 8
Requires: %{name}-std-static%{?_isa} = %{version}-%{release}
%else
Recommends: %{name}-std-static%{?_isa} = %{version}-%{release}
%endif
%description analysis
This package contains analysis data files produced with rustc's -Zsave-analysis
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}
%package toolset
@ -580,20 +578,20 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1
%patch2 -p1
%patch -P1 -p1
%patch -P2 -p1
%if %with disabled_libssh2
%patch100 -p1
%patch -P100 -p1
%endif
%if %without curl_http2
%patch101 -p1
%patch -P101 -p1
rm -rf vendor/libnghttp2-sys/
%endif
%if 0%{?rhel} && 0%{?rhel} < 8
%patch102 -p1
%patch -P102 -p1
%endif
# Use our explicit python3 first
@ -657,9 +655,26 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
%global build_rustflags %{nil}
%endif
# These are similar to __cflags_arch_* in /usr/lib/rpm/redhat/macros
%if 0%{?fedora} || 0%{?rhel} >= 9
%ifarch x86_64
%global rust_target_cpu %[0%{?rhel} >= 10 ? "x86-64-v3" : ""]
%global rust_target_cpu %[0%{?rhel} == 9 ? "x86-64-v2" : "%{rust_target_cpu}"]
%endif
%ifarch s390x
%global rust_target_cpu %[0%{?rhel} >= 9 ? "z14" : "zEC12"]
%endif
%ifarch ppc64le
%global rust_target_cpu %[0%{?rhel} >= 9 ? "pwr9" : "pwr8"]
%endif
%endif
# Set up shared environment variables for build/install/check
%global rust_env %{?rustflags:RUSTFLAGS="%{rustflags}"}
%if 0%{?cmake_path:1}
%if "%{?rust_target_cpu}" != ""
%global rust_env %{?rust_env} CARGO_TARGET_%{rust_triple_env}_RUSTFLAGS=-Ctarget-cpu=%{rust_target_cpu}
%endif
%if %defined cmake_path
%global rust_env %{?rust_env} PATH="%{cmake_path}:$PATH"
%endif
%if %without disabled_libssh2
@ -668,7 +683,6 @@ find -name '*.rs' -type f -perm /111 -exec chmod -v -x '{}' '+'
%endif
%global export_rust_env %{?rust_env:export %{rust_env}}
%build
%{export_rust_env}
@ -754,7 +768,7 @@ end}
--set build.install-stage=2 \
--set build.test-stage=2 \
--enable-extended \
--tools=analysis,cargo,clippy,rls,rust-analyzer,rustfmt,src \
--tools=cargo,clippy,rls,rust-analyzer,rustfmt,src \
--enable-vendor \
--enable-verbose-tests \
--dist-compression-formats=gz \
@ -1032,10 +1046,6 @@ end}
%{rustlibdir}/src
%files analysis
%{rustlibdir}/%{rust_triple}/analysis/
%if 0%{?rhel}
%files toolset
%{rpmmacrodir}/macros.rust-toolset
@ -1043,6 +1053,10 @@ end}
%changelog
* Thu Apr 20 2023 Josh Stone <jistone@redhat.com> - 1.69.0-1
- Update to 1.69.0.
- Obsolete rust-analysis.
* Tue Mar 28 2023 Josh Stone <jistone@redhat.com> - 1.68.2-1
- Update to 1.68.2.

View File

@ -1,6 +1,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 @@
--- rustc-beta-src/Cargo.lock.orig 2023-03-23 17:10:30.810989345 -0700
+++ rustc-beta-src/Cargo.lock 2023-03-23 17:10:30.812989303 -0700
@@ -1142,7 +1142,6 @@
dependencies = [
"cc",
"libc",
@ -8,7 +8,7 @@
"libz-sys",
"openssl-sys",
"pkg-config",
@@ -2399,16 +2398,6 @@
@@ -2375,16 +2374,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-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" }
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2023-03-23 17:10:30.812989303 -0700
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2023-03-23 17:11:26.242836664 -0700
@@ -23,7 +23,7 @@
cargo-util = { path = "crates/cargo-util", version = "0.2.3" }
crates-io = { path = "crates/crates-io", version = "0.35.1" }
clap = "4.1.3"
crates-io = { path = "crates/crates-io", version = "0.36.0" }
-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-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 @@
filetime = "0.2.9"
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2023-03-19 00:20:55.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2023-03-23 17:10:30.812989303 -0700
@@ -401,16 +401,9 @@
sources: SourceMap<'cfg>,
config: &'cfg Config,
) -> CargoResult<PackageSet<'cfg>> {
@ -58,8 +58,8 @@
Ok(PackageSet {
packages: package_ids
--- 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
--- rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs.orig 2023-03-19 00:20:55.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/sources/registry/http_remote.rs 2023-03-23 17:10:30.813989282 -0700
@@ -220,16 +220,8 @@
}
self.fetch_started = true;
@ -79,8 +79,8 @@
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
--- rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs.orig 2023-03-19 00:20:55.000000000 -0700
+++ rustc-beta-src/src/tools/cargo/src/cargo/util/network.rs 2023-03-23 17:10:30.813989282 -0700
@@ -116,7 +116,7 @@
macro_rules! try_old_curl {
($e:expr, $msg:expr) => {

View File

@ -1,2 +1,2 @@
SHA512 (rustc-1.68.2-src.tar.xz) = 8b085d0351e19100e9abc24b10c44a0939a1d35ba23421da4ece345d7373f7dbad1dc6a2ae153c1259404dd96b41e2682e711cf2b0b63fd03a196760cddbcdd3
SHA512 (wasi-libc-wasi-sdk-19.tar.gz) = 312f4d01d1b1108c24a1e9b233648ec44408ec1b7c17e8a65288038a94f117be9ed8181c60f99f9593ff80ca380f53c51756357bad466cd65027cb23a3646d23
SHA512 (rustc-1.69.0-src.tar.xz) = 724398fc208ec18adbd8ba81a445e23d1001b746990f36b869126be8a45f1cdfa75f5b9cbdd0abbab506f91a56d3736ab247677699ebd69525245558cfc01a60
SHA512 (wasi-libc-1dfe5c302d1c5ab621f7abf04620fae92700fd22.tar.gz) = 6f813bc7822746c161932de6b84fb965111400a1a38c25dd0981209d588b9ccafe1a5923349110c536f1b7cda707dfa2d0be42c92b2fa6fd89c957eda27bda27