import rust-1.56.1-2.el9
This commit is contained in:
parent
da8ffc040e
commit
48b986c6e7
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,3 +1,2 @@
|
||||
SOURCES/openssl-0.10.35.crate
|
||||
SOURCES/openssl-sys-0.9.65.crate
|
||||
SOURCES/rustc-1.54.0-src.tar.xz
|
||||
SOURCES/rustc-1.56.1-src.tar.xz
|
||||
SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
||||
|
@ -1,3 +1,2 @@
|
||||
30b1d249820fb830ab1fbd0910c39dbd8976f3de SOURCES/openssl-0.10.35.crate
|
||||
c4f319fbe5ce983a1b958f7df6b572a1b2752784 SOURCES/openssl-sys-0.9.65.crate
|
||||
1577242bee41fe6c1aee17d47ae791f4bfc1f8c3 SOURCES/rustc-1.54.0-src.tar.xz
|
||||
a79516231c4391e37990bdda0efdafdc51697fab SOURCES/rustc-1.56.1-src.tar.xz
|
||||
b8865d1192852214d6d9b0a0957d4b36c16832aa SOURCES/wasi-libc-ad5133410f66b93a2381db5b542aad5e0964db96.tar.gz
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,6 +1,6 @@
|
||||
--- rustc-beta-src/Cargo.lock.orig 2021-06-04 15:56:04.141227630 -0700
|
||||
+++ rustc-beta-src/Cargo.lock 2021-06-04 16:03:04.461396826 -0700
|
||||
@@ -885,7 +885,6 @@
|
||||
--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-19 18:03:53.928187581 -0700
|
||||
+++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:05:41.443522980 -0700
|
||||
@@ -877,7 +877,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -8,7 +8,7 @@
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1904,16 +1903,6 @@
|
||||
@@ -1907,16 +1906,6 @@
|
||||
checksum = "7fc7aa29613bd6a620df431842069224d8bc9011086b1db4c0e0cd47fa03ec9a"
|
||||
|
||||
[[package]]
|
||||
@ -23,22 +23,22 @@
|
||||
-
|
||||
-[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.2"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- rustc-beta-src/src/tools/cargo/Cargo.toml.orig 2021-06-04 15:56:04.143227587 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/Cargo.toml 2021-06-04 15:57:56.931857927 -0700
|
||||
--- rustc-1.56.0-src/src/tools/cargo/Cargo.toml.orig 2021-10-19 18:03:53.930187532 -0700
|
||||
+++ rustc-1.56.0-src/src/tools/cargo/Cargo.toml 2021-10-19 18:05:13.663211469 -0700
|
||||
@@ -25,7 +25,7 @@
|
||||
cargo-util = { path = "crates/cargo-util", version = "0.1.0" }
|
||||
cargo-util = { path = "crates/cargo-util", version = "0.1.1" }
|
||||
crates-io = { path = "crates/crates-io", version = "0.33.0" }
|
||||
crossbeam-utils = "0.8"
|
||||
-curl = { version = "0.4.23", features = ["http2"] }
|
||||
+curl = { version = "0.4.23", features = [] }
|
||||
curl-sys = "0.4.22"
|
||||
env_logger = "0.8.1"
|
||||
-curl = { version = "0.4.38", features = ["http2"] }
|
||||
+curl = { version = "0.4.38", features = [] }
|
||||
curl-sys = "0.4.48"
|
||||
env_logger = "0.9.0"
|
||||
pretty_env_logger = { version = "0.4", optional = true }
|
||||
--- rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-05-22 15:22:31.000000000 -0700
|
||||
+++ rustc-beta-src/src/tools/cargo/src/cargo/core/package.rs 2021-06-04 16:00:03.903190293 -0700
|
||||
@@ -416,14 +416,8 @@
|
||||
--- rustc-1.56.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2021-10-18 02:52:56.000000000 -0700
|
||||
+++ rustc-1.56.0-src/src/tools/cargo/src/cargo/core/package.rs 2021-10-19 18:03:53.931187507 -0700
|
||||
@@ -417,14 +417,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
|
||||
@@ -596,7 +590,7 @@
|
||||
@@ -653,7 +647,7 @@
|
||||
macro_rules! try_old_curl {
|
||||
($e:expr, $msg:expr) => {
|
||||
let result = $e;
|
@ -1,6 +1,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 @@
|
||||
--- rustc-1.56.0-src/Cargo.lock.orig 2021-10-18 02:52:36.000000000 -0700
|
||||
+++ rustc-1.56.0-src/Cargo.lock 2021-10-19 18:00:47.999793566 -0700
|
||||
@@ -1895,7 +1895,6 @@
|
||||
dependencies = [
|
||||
"cc",
|
||||
"libc",
|
||||
@ -8,7 +8,7 @@
|
||||
"libz-sys",
|
||||
"openssl-sys",
|
||||
"pkg-config",
|
||||
@@ -1693,20 +1692,6 @@
|
||||
@@ -1918,20 +1917,6 @@
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -27,11 +27,11 @@
|
||||
-
|
||||
-[[package]]
|
||||
name = "libz-sys"
|
||||
version = "1.1.2"
|
||||
version = "1.1.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
--- 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 @@
|
||||
--- rustc-1.56.0-src/vendor/git2/Cargo.toml.orig 2021-10-18 04:05:54.000000000 -0700
|
||||
+++ rustc-1.56.0-src/vendor/git2/Cargo.toml 2021-10-19 17:57:37.960500359 -0700
|
||||
@@ -52,7 +52,7 @@
|
||||
version = "0.1.39"
|
||||
|
||||
[features]
|
124
SPECS/rust.spec
124
SPECS/rust.spec
@ -1,6 +1,6 @@
|
||||
# Only x86_64 and i686 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 ppc64 ppc64le s390x
|
||||
%global rust_arches x86_64 i686 aarch64 ppc64le s390x
|
||||
|
||||
# The channel can be stable, beta, or nightly
|
||||
%{!?channel: %global channel stable}
|
||||
@ -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.53.0
|
||||
%global bootstrap_cargo 1.53.0
|
||||
%global bootstrap_channel 1.53.0
|
||||
%global bootstrap_date 2021-06-17
|
||||
%global bootstrap_rust 1.55.0
|
||||
%global bootstrap_cargo 1.55.0
|
||||
%global bootstrap_channel 1.55.0
|
||||
%global bootstrap_date 2021-09-09
|
||||
|
||||
# Only the specified arches will use bootstrap binaries.
|
||||
#global bootstrap_arches %%{rust_arches}
|
||||
@ -22,10 +22,19 @@
|
||||
# reproducible between hosts, so only x86_64 actually builds it.
|
||||
%ifarch x86_64
|
||||
%if 0%{?fedora} || 0%{?rhel} >= 8
|
||||
%global cross_targets wasm32-unknown-unknown
|
||||
%global cross_targets wasm32-unknown-unknown wasm32-wasi
|
||||
%endif
|
||||
%endif
|
||||
|
||||
# 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
|
||||
%global forgeurl1 https://github.com/WebAssembly/wasi-libc
|
||||
%global commit1 ad5133410f66b93a2381db5b542aad5e0964db96
|
||||
%forgemeta -z 1
|
||||
%undefine distprefix1
|
||||
%global wasi_libc_source %{forgesource1}
|
||||
%global wasi_libc_dir %{_builddir}/%{extractdir1}
|
||||
|
||||
# Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases.
|
||||
%bcond_with llvm_static
|
||||
|
||||
@ -61,7 +70,7 @@
|
||||
%endif
|
||||
|
||||
Name: rust
|
||||
Version: 1.54.0
|
||||
Version: 1.56.1
|
||||
Release: 2%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||
@ -75,8 +84,11 @@ ExclusiveArch: %{rust_arches}
|
||||
%global rustc_package rustc-%{channel}-src
|
||||
%endif
|
||||
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
Source1: %{wasi_libc_source}
|
||||
# Sources for bootstrap_arches are inserted by lua below
|
||||
|
||||
# This internal rust-abi change broke s390x -- revert for now.
|
||||
# An internal rust-abi change broke s390x, but it's fixed in LLVM 12.0.1.
|
||||
# We'll revert the change on Fedora 33 that has an unpatched LLVM 11.
|
||||
# https://github.com/rust-lang/rust/issues/80810#issuecomment-781784032
|
||||
Patch1: 0001-Revert-Auto-merge-of-79547.patch
|
||||
|
||||
@ -86,24 +98,16 @@ Patch2: 0001-Use-lld-provided-by-system-for-wasm.patch
|
||||
### RHEL-specific patches below ###
|
||||
|
||||
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
|
||||
Patch100: rustc-1.48.0-disable-libssh2.patch
|
||||
Patch100: rustc-1.56.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.53.0-disable-http2.patch
|
||||
Patch101: rustc-1.56.0-disable-http2.patch
|
||||
|
||||
# kernel rh1410097 causes too-small stacks for PIE.
|
||||
# (affects RHEL6 kernels when building for RHEL7)
|
||||
Patch102: rustc-1.51.0-no-default-pie.patch
|
||||
|
||||
# Add support for OpenSSL 3.0.0
|
||||
# https://github.com/rust-lang/rust/pull/86529/
|
||||
# https://github.com/sfackler/rust-openssl/pull/1264
|
||||
Patch103: rust-openssl-300.patch
|
||||
Source103: https://crates.io/api/v1/crates/openssl/0.10.35/download#/openssl-0.10.35.crate
|
||||
Source104: https://crates.io/api/v1/crates/openssl-sys/0.9.65/download#/openssl-sys-0.9.65.crate
|
||||
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
local abi = "gnu"
|
||||
@ -134,6 +138,7 @@ end}
|
||||
.."/rust-%{bootstrap_channel}")
|
||||
local target_arch = rpm.expand("%{_target_cpu}")
|
||||
for i, arch in ipairs(bootstrap_arches) do
|
||||
i = 100 + i
|
||||
print(string.format("Source%d: %s-%s.tar.xz\n",
|
||||
i, base, rust_triple(arch)))
|
||||
if arch == target_arch then
|
||||
@ -184,7 +189,8 @@ BuildRequires: %{python}
|
||||
|
||||
%if %with bundled_llvm
|
||||
BuildRequires: cmake3 >= 3.13.4
|
||||
Provides: bundled(llvm) = 12.0.0
|
||||
BuildRequires: ninja-build
|
||||
Provides: bundled(llvm) = 13.0.0
|
||||
%else
|
||||
BuildRequires: cmake >= 2.8.11
|
||||
%if 0%{?epel} == 7
|
||||
@ -263,10 +269,11 @@ BuildRequires: %{devtoolset_name}-gcc-c++
|
||||
%global rustlibdir %{common_libdir}/rustlib
|
||||
|
||||
%if %defined cross_targets
|
||||
BuildRequires: clang
|
||||
# brp-strip-static-archive breaks the archive index for wasm
|
||||
%global __os_install_post \
|
||||
%__os_install_post \
|
||||
find %{buildroot}%{rustlibdir} -type f -path '*/wasm*/lib/*.rlib' -exec ranlib '{}' ';' \
|
||||
find '%{buildroot}%{rustlibdir}' -type f -path '*/wasm*/lib/*.rlib' -print -exec '%{llvm_root}/bin/llvm-ranlib' '{}' ';' \
|
||||
%{nil}
|
||||
%endif
|
||||
|
||||
@ -287,23 +294,29 @@ written in Rust.
|
||||
%if %defined cross_targets
|
||||
%{lua: do
|
||||
for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
|
||||
local requires = rpm.expand("Requires: rust = %{version}-%{release}")
|
||||
if string.sub(triple, 1, 4) == "wasm" then
|
||||
requires = requires .. "\nRequires: lld >= 8.0"
|
||||
end
|
||||
local subs = {
|
||||
triple = triple,
|
||||
requires = requires,
|
||||
verrel = rpm.expand("%{version}-%{release}"),
|
||||
wasm = string.sub(triple, 1, 4) == "wasm" and 1 or 0,
|
||||
wasi = string.find(triple, "-wasi") and 1 or 0,
|
||||
}
|
||||
local s = string.gsub([[
|
||||
|
||||
%package std-static-{{triple}}
|
||||
Summary: Standard library for Rust
|
||||
BuildArch: noarch
|
||||
{{requires}}
|
||||
Requires: rust = {{verrel}}
|
||||
%if {{wasm}}
|
||||
Requires: lld >= 8.0
|
||||
%endif
|
||||
%if {{wasi}}
|
||||
Provides: bundled(wasi-libc)
|
||||
%endif
|
||||
|
||||
%description std-static-{{triple}}
|
||||
This package includes the standard libraries for building applications
|
||||
written in Rust for the {{triple}} target.
|
||||
|
||||
]], "{{(%w+)}}", subs)
|
||||
print(s)
|
||||
end
|
||||
@ -464,9 +477,17 @@ test -f '%{local_rust_root}/bin/cargo'
|
||||
test -f '%{local_rust_root}/bin/rustc'
|
||||
%endif
|
||||
|
||||
%if %defined cross_targets
|
||||
%forgesetup -z 1
|
||||
%endif
|
||||
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
%if 0%{?fedora} == 33
|
||||
# revert only for LLVM 11
|
||||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
%patch2 -p1
|
||||
|
||||
%if %with disabled_libssh2
|
||||
@ -509,12 +530,6 @@ rm -rf vendor/libgit2-sys/libgit2/
|
||||
rm -rf vendor/libssh2-sys/
|
||||
%endif
|
||||
|
||||
# Add support for OpenSSL 3.0.0
|
||||
rm -rf vendor/openssl{,-sys}/
|
||||
tar -xf %{SOURCE103} -C vendor/
|
||||
tar -xf %{SOURCE104} -C vendor/
|
||||
%patch103 -p1
|
||||
|
||||
# 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
|
||||
|
||||
@ -581,6 +596,22 @@ if [ "$max_cpus" -ge 1 -a "$max_cpus" -lt "$ncpus" ]; then
|
||||
ncpus="$max_cpus"
|
||||
fi
|
||||
|
||||
%if %defined cross_targets
|
||||
%make_build -C %{wasi_libc_dir}
|
||||
%{lua: do
|
||||
local wasi_root = rpm.expand("%{wasi_libc_dir}") .. "/sysroot"
|
||||
local set_wasi_root = ""
|
||||
for triple in string.gmatch(rpm.expand("%{cross_targets}"), "%S+") do
|
||||
if string.find(triple, "-wasi") then
|
||||
set_wasi_root = set_wasi_root .. " --set target." .. triple .. ".wasi-root=" .. wasi_root
|
||||
end
|
||||
end
|
||||
if wasi_root ~= "" then
|
||||
rpm.define("set_wasi_root "..set_wasi_root)
|
||||
end
|
||||
end}
|
||||
%endif
|
||||
|
||||
%configure --disable-option-checking \
|
||||
--libdir=%{common_libdir} \
|
||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||
@ -599,7 +630,8 @@ fi
|
||||
--tools=analysis,cargo,clippy,rls,rustfmt,src \
|
||||
--enable-vendor \
|
||||
--enable-verbose-tests \
|
||||
%{?codegen_units_std} \
|
||||
%{?set_wasi_root} \
|
||||
--dist-compression-formats=gz \
|
||||
--release-channel=%{channel} \
|
||||
--release-description="%{?fedora:Fedora }%{?rhel:Red Hat }%{version}-%{release}"
|
||||
|
||||
@ -696,6 +728,12 @@ rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll*
|
||||
%check
|
||||
export %{rust_env}
|
||||
|
||||
# Sanity-check the installed binaries, debuginfo-stripped and all.
|
||||
%{buildroot}%{_bindir}/cargo new build/hello-world
|
||||
env RUSTC=%{buildroot}%{_bindir}/rustc \
|
||||
LD_LIBRARY_PATH="%{buildroot}%{_libdir}:$LD_LIBRARY_PATH" \
|
||||
%{buildroot}%{_bindir}/cargo run --manifest-path build/hello-world/Cargo.toml
|
||||
|
||||
# The results are not stable on koji, so mask errors and just log it.
|
||||
# Some of the larger test artifacts are manually cleaned to save space.
|
||||
%{python} ./x.py test --no-fail-fast --stage 2 || :
|
||||
@ -705,7 +743,10 @@ rm -rf "./build/%{rust_triple}/test/"
|
||||
rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
||||
|
||||
%{python} ./x.py test --no-fail-fast --stage 2 clippy || :
|
||||
|
||||
env RLS_TEST_WAIT_FOR_AGES=1 \
|
||||
%{python} ./x.py test --no-fail-fast --stage 2 rls || :
|
||||
|
||||
%{python} ./x.py test --no-fail-fast --stage 2 rustfmt || :
|
||||
|
||||
|
||||
@ -739,13 +780,20 @@ rm -rf "./build/%{rust_triple}/stage2-tools/%{rust_triple}/cit/"
|
||||
local subs = {
|
||||
triple = triple,
|
||||
rustlibdir = rpm.expand("%{rustlibdir}"),
|
||||
wasi = string.find(triple, "-wasi") and 1 or 0,
|
||||
}
|
||||
local s = string.gsub([[
|
||||
|
||||
%files std-static-{{triple}}
|
||||
%dir {{rustlibdir}}
|
||||
%dir {{rustlibdir}}/{{triple}}
|
||||
%dir {{rustlibdir}}/{{triple}}/lib
|
||||
{{rustlibdir}}/{{triple}}/lib/*.rlib
|
||||
%if {{wasi}}
|
||||
%dir {{rustlibdir}}/{{triple}}/lib/self-contained
|
||||
{{rustlibdir}}/{{triple}}/lib/self-contained/crt*.o
|
||||
%endif
|
||||
|
||||
]], "{{(%w+)}}", subs)
|
||||
print(s)
|
||||
end
|
||||
@ -836,6 +884,16 @@ end}
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Dec 01 2021 Josh Stone <jistone@redhat.com> - 1.56.1-2
|
||||
- Add rust-std-static-wasm32-wasi
|
||||
Resolves: rhbz#1980082
|
||||
|
||||
* Thu Nov 04 2021 Josh Stone <jistone@redhat.com> - 1.56.1-1
|
||||
- Update to 1.56.1.
|
||||
|
||||
* Fri Oct 29 2021 Josh Stone <jistone@redhat.com> - 1.55.0-1
|
||||
- Update to 1.55.0.
|
||||
|
||||
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.54.0-2
|
||||
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
||||
Related: rhbz#1991688
|
||||
|
Loading…
Reference in New Issue
Block a user