14 |
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 |
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 |
15 |
# or nightly wants some beta-YYYY-MM-DD |
# or nightly wants some beta-YYYY-MM-DD |
16 |
# Note that cargo matches the program version here, not its crate version. |
# Note that cargo matches the program version here, not its crate version. |
17 |
%global bootstrap_rust 1.47.0 |
%global bootstrap_rust 1.48.0 |
18 |
%global bootstrap_cargo 1.47.0 |
%global bootstrap_cargo 1.48.0 |
19 |
%global bootstrap_channel 1.47.0 |
%global bootstrap_channel 1.48.0 |
20 |
%global bootstrap_date 2020-10-08 |
%global bootstrap_date 2020-11-19 |
21 |
|
|
22 |
# Only the specified arches will use bootstrap binaries. |
# Only the specified arches will use bootstrap binaries. |
23 |
#global bootstrap_arches %%{rust_arches} |
#global bootstrap_arches %%{rust_arches} |
80 |
%endif |
%endif |
81 |
|
|
82 |
Name: rust |
Name: rust |
83 |
Version: 1.48.0 |
Version: 1.49.0 |
84 |
Release: %mkrel 5 |
Release: %mkrel 1 |
85 |
Summary: The Rust Programming Language |
Summary: The Rust Programming Language |
86 |
%if 0%{?mageia} |
%if 0%{?mageia} |
87 |
Group: Development/Other |
Group: Development/Other |
98 |
%endif |
%endif |
99 |
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz |
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz |
100 |
|
|
|
# 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 |
|
|
|
|
101 |
### RHEL-specific patches below ### |
### RHEL-specific patches below ### |
102 |
|
|
103 |
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) |
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949) |
105 |
|
|
106 |
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys |
# libcurl on RHEL7 doesn't have http2, but since cargo requests it, curl-sys |
107 |
# will try to build it statically -- instead we turn off the feature. |
# will try to build it statically -- instead we turn off the feature. |
108 |
Patch101: rustc-1.48.0-disable-http2.patch |
Patch101: rustc-1.49.0-disable-http2.patch |
109 |
|
|
110 |
# kernel rh1410097 causes too-small stacks for PIE. |
# kernel rh1410097 causes too-small stacks for PIE. |
111 |
# (affects RHEL6 kernels when building for RHEL7) |
# (affects RHEL6 kernels when building for RHEL7) |
188 |
BuildRequires: pkgconfig(libgit2) >= 1.0.0 |
BuildRequires: pkgconfig(libgit2) >= 1.0.0 |
189 |
%endif |
%endif |
190 |
|
|
191 |
%if %{without disabled_libssh2} && %{without bundled_libssh2} |
%if %{without disabled_libssh2} |
192 |
# needs libssh2_userauth_publickey_frommemory |
# needs libssh2_userauth_publickey_frommemory |
193 |
BuildRequires: pkgconfig(libssh2) >= 1.6.0 |
BuildRequires: pkgconfig(libssh2) >= 1.6.0 |
194 |
%endif |
%endif |
210 |
%global llvm llvm |
%global llvm llvm |
211 |
%global llvm_root %{_prefix} |
%global llvm_root %{_prefix} |
212 |
%endif |
%endif |
213 |
BuildRequires: %{llvm}-devel >= 8.0 |
BuildRequires: %{llvm}-devel >= 9.0 |
214 |
%if %with llvm_static |
%if %with llvm_static |
215 |
BuildRequires: %{llvm}-static |
BuildRequires: %{llvm}-static |
216 |
BuildRequires: libffi-devel |
BuildRequires: libffi-devel |
334 |
%if %with bundled_libgit2 |
%if %with bundled_libgit2 |
335 |
Provides: bundled(libgit2) = 1.1.0 |
Provides: bundled(libgit2) = 1.1.0 |
336 |
%endif |
%endif |
|
%if %with bundled_libssh2 |
|
|
Provides: bundled(libssh2) = 1.9.0~dev |
|
|
%endif |
|
337 |
# For tests: |
# For tests: |
338 |
BuildRequires: git |
BuildRequires: git |
339 |
# Cargo is not much use without Rust |
# Cargo is not much use without Rust |
440 |
|
|
441 |
%setup -q -n %{rustc_package} |
%setup -q -n %{rustc_package} |
442 |
|
|
|
%patch1 -p1 -d library/backtrace |
|
|
%patch2 -p1 |
|
|
|
|
443 |
%if %with disabled_libssh2 |
%if %with disabled_libssh2 |
444 |
%patch100 -p1 |
%patch100 -p1 |
445 |
%endif |
%endif |
466 |
# Remove other unused vendored libraries |
# Remove other unused vendored libraries |
467 |
rm -rf vendor/curl-sys/curl/ |
rm -rf vendor/curl-sys/curl/ |
468 |
rm -rf vendor/jemalloc-sys/jemalloc/ |
rm -rf vendor/jemalloc-sys/jemalloc/ |
469 |
|
rm -rf vendor/libssh2-sys/libssh2/ |
470 |
rm -rf vendor/libz-sys/src/zlib/ |
rm -rf vendor/libz-sys/src/zlib/ |
471 |
rm -rf vendor/libz-sys/src/zlib-ng/ |
rm -rf vendor/libz-sys/src/zlib-ng/ |
472 |
rm -rf vendor/lzma-sys/xz-*/ |
rm -rf vendor/lzma-sys/xz-*/ |
476 |
rm -rf vendor/libgit2-sys/libgit2/ |
rm -rf vendor/libgit2-sys/libgit2/ |
477 |
%endif |
%endif |
478 |
|
|
|
%if %without bundled_libssh2 |
|
|
rm -rf vendor/libssh2-sys/libssh2/ |
|
|
%endif |
|
479 |
%if %with disabled_libssh2 |
%if %with disabled_libssh2 |
480 |
rm -rf vendor/libssh2-sys/ |
rm -rf vendor/libssh2-sys/ |
481 |
%endif |
%endif |
515 |
# convince libgit2-sys to use the distro libgit2 |
# convince libgit2-sys to use the distro libgit2 |
516 |
%global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1 |
%global rust_env %{rust_env} LIBGIT2_SYS_USE_PKG_CONFIG=1 |
517 |
%endif |
%endif |
518 |
%if %without bundled_libssh2 |
%if %without disabled_libssh2 |
519 |
# convince libssh2-sys to use the distro libssh2 |
# convince libssh2-sys to use the distro libssh2 |
520 |
%global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1 |
%global rust_env %{rust_env} LIBSSH2_SYS_USE_PKG_CONFIG=1 |
521 |
%endif |
%endif |