mirror of
https://abf.rosa.ru/djam/rust.git
synced 2025-02-23 18:02:53 +00:00
Updated to 1.31.0
This commit is contained in:
parent
445feca53b
commit
c1661f6d89
3 changed files with 156 additions and 26 deletions
6
.abf.yml
6
.abf.yml
|
@ -1,4 +1,4 @@
|
|||
sources:
|
||||
rust-1.29.2-i686-unknown-linux-gnu.tar.xz: 6915fa704cc042dc35450bbf374518354cc73d7c
|
||||
rust-1.29.2-x86_64-unknown-linux-gnu.tar.xz: c3d34cce54274791c410f8fa27862c5b285d9159
|
||||
rustc-1.30.1-src.tar.xz: 0aa3e757e2a1cbffd50291392d03bc0881121083
|
||||
rust-1.30.0-i686-unknown-linux-gnu.tar.xz: da90ccc0a4f16ea4db8f87fc0a862744f2ac30df
|
||||
rust-1.30.0-x86_64-unknown-linux-gnu.tar.xz: 12901cf47732ad13ccc3fbea0aba853544644676
|
||||
rustc-1.31.0-src.tar.xz: 79878ca48506ee7d17cd8375fca5f9950699c097
|
||||
|
|
118
0001-Deal-with-EINTR-in-net-timeout-tests.patch
Normal file
118
0001-Deal-with-EINTR-in-net-timeout-tests.patch
Normal file
|
@ -0,0 +1,118 @@
|
|||
From f107514aef0b25b0d959941df1e45b18a478151b Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 30 Nov 2018 15:33:40 -0800
|
||||
Subject: [PATCH] Deal with EINTR in net timeout tests
|
||||
|
||||
We've seen sporadic QE failures in the timeout tests on this assertion:
|
||||
|
||||
assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
|
||||
|
||||
So there's an error, but not either of the expected kinds. Adding a
|
||||
format to show the kind revealed `ErrorKind::Interrupted` (`EINTR`).
|
||||
|
||||
For the cases that were using `read`, we can just use `read_exact` to
|
||||
keep trying after interruption. For those using `recv_from`, we have to
|
||||
manually loop until we get a non-interrupted result.
|
||||
---
|
||||
src/libstd/net/tcp.rs | 10 ++++++----
|
||||
src/libstd/net/udp.rs | 20 ++++++++++++++++----
|
||||
src/libstd/sys/unix/ext/net.rs | 10 ++++++----
|
||||
3 files changed, 28 insertions(+), 12 deletions(-)
|
||||
|
||||
diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs
|
||||
index ad212a547579..be797803233a 100644
|
||||
--- a/src/libstd/net/tcp.rs
|
||||
+++ b/src/libstd/net/tcp.rs
|
||||
@@ -1548,8 +1548,9 @@ mod tests {
|
||||
|
||||
let mut buf = [0; 10];
|
||||
let start = Instant::now();
|
||||
- let kind = stream.read(&mut buf).err().expect("expected error").kind();
|
||||
- assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
|
||||
+ let kind = stream.read_exact(&mut buf).err().expect("expected error").kind();
|
||||
+ assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut,
|
||||
+ "unexpected_error: {:?}", kind);
|
||||
assert!(start.elapsed() > Duration::from_millis(400));
|
||||
drop(listener);
|
||||
}
|
||||
@@ -1570,8 +1571,9 @@ mod tests {
|
||||
assert_eq!(b"hello world", &buf[..]);
|
||||
|
||||
let start = Instant::now();
|
||||
- let kind = stream.read(&mut buf).err().expect("expected error").kind();
|
||||
- assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
|
||||
+ let kind = stream.read_exact(&mut buf).err().expect("expected error").kind();
|
||||
+ assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut,
|
||||
+ "unexpected_error: {:?}", kind);
|
||||
assert!(start.elapsed() > Duration::from_millis(400));
|
||||
drop(listener);
|
||||
}
|
||||
diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs
|
||||
index 0ebe3284b4f0..fc68abae05a0 100644
|
||||
--- a/src/libstd/net/udp.rs
|
||||
+++ b/src/libstd/net/udp.rs
|
||||
@@ -1030,8 +1030,14 @@ mod tests {
|
||||
let mut buf = [0; 10];
|
||||
|
||||
let start = Instant::now();
|
||||
- let kind = stream.recv_from(&mut buf).err().expect("expected error").kind();
|
||||
- assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
|
||||
+ loop {
|
||||
+ let kind = stream.recv_from(&mut buf).err().expect("expected error").kind();
|
||||
+ if kind != ErrorKind::Interrupted {
|
||||
+ assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut,
|
||||
+ "unexpected_error: {:?}", kind);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
assert!(start.elapsed() > Duration::from_millis(400));
|
||||
}
|
||||
|
||||
@@ -1049,8 +1055,14 @@ mod tests {
|
||||
assert_eq!(b"hello world", &buf[..]);
|
||||
|
||||
let start = Instant::now();
|
||||
- let kind = stream.recv_from(&mut buf).err().expect("expected error").kind();
|
||||
- assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut);
|
||||
+ loop {
|
||||
+ let kind = stream.recv_from(&mut buf).err().expect("expected error").kind();
|
||||
+ if kind != ErrorKind::Interrupted {
|
||||
+ assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut,
|
||||
+ "unexpected_error: {:?}", kind);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
assert!(start.elapsed() > Duration::from_millis(400));
|
||||
}
|
||||
|
||||
diff --git a/src/libstd/sys/unix/ext/net.rs b/src/libstd/sys/unix/ext/net.rs
|
||||
index 55f43ccd7db4..737437c76b7c 100644
|
||||
--- a/src/libstd/sys/unix/ext/net.rs
|
||||
+++ b/src/libstd/sys/unix/ext/net.rs
|
||||
@@ -1654,8 +1654,9 @@ mod test {
|
||||
or_panic!(stream.set_read_timeout(Some(Duration::from_millis(1000))));
|
||||
|
||||
let mut buf = [0; 10];
|
||||
- let kind = stream.read(&mut buf).err().expect("expected error").kind();
|
||||
- assert!(kind == io::ErrorKind::WouldBlock || kind == io::ErrorKind::TimedOut);
|
||||
+ let kind = stream.read_exact(&mut buf).err().expect("expected error").kind();
|
||||
+ assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut,
|
||||
+ "unexpected_error: {:?}", kind);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -1675,8 +1676,9 @@ mod test {
|
||||
or_panic!(stream.read(&mut buf));
|
||||
assert_eq!(b"hello world", &buf[..]);
|
||||
|
||||
- let kind = stream.read(&mut buf).err().expect("expected error").kind();
|
||||
- assert!(kind == io::ErrorKind::WouldBlock || kind == io::ErrorKind::TimedOut);
|
||||
+ let kind = stream.read_exact(&mut buf).err().expect("expected error").kind();
|
||||
+ assert!(kind == ErrorKind::WouldBlock || kind == ErrorKind::TimedOut,
|
||||
+ "unexpected_error: {:?}", kind);
|
||||
}
|
||||
|
||||
// Ensure the `set_read_timeout` and `set_write_timeout` calls return errors
|
||||
--
|
||||
2.19.1
|
||||
|
58
rust.spec
58
rust.spec
|
@ -25,9 +25,9 @@
|
|||
# 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.
|
||||
%define bootstrap_rust 1.29.2
|
||||
%define bootstrap_cargo 1.29.0
|
||||
%define bootstrap_date 2018-10-12
|
||||
%define bootstrap_rust 1.30.0
|
||||
%define bootstrap_cargo 1.30.0
|
||||
%define bootstrap_date 2018-10-25
|
||||
|
||||
%bcond_without bootstrap
|
||||
|
||||
|
@ -47,10 +47,10 @@
|
|||
# Some sub-packages are versioned independently of the rust compiler and runtime itself.
|
||||
# Also beware that if any of these are not changed in a version bump, then the release
|
||||
# number should still increase, not be reset to 1!
|
||||
%define rustc_version 1.30.1
|
||||
%define cargo_version 1.30.0
|
||||
%define rustfmt_version 0.99.4
|
||||
%define rls_version 0.130.5
|
||||
%define rustc_version 1.31.0
|
||||
%define cargo_version 1.31.0
|
||||
%define rustfmt_version 1.0.0
|
||||
%define rls_version 1.31.6
|
||||
%define clippy_version 0.0.212
|
||||
|
||||
%ifarch x86_64
|
||||
|
@ -69,7 +69,7 @@
|
|||
Summary: The Rust Programming Language
|
||||
Name: rust
|
||||
Version: %{rustc_version}
|
||||
Release: 1
|
||||
Release: 8
|
||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||
Group: Development/Rust
|
||||
# ^ written as: (rust itself) and (bundled libraries)
|
||||
|
@ -79,6 +79,8 @@ Source0: https://static.rust-lang.org/dist/rustc-%{rustc_version}-src.tar.xz
|
|||
Source1: https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-x86_64-unknown-linux-gnu.tar.xz
|
||||
Source2: https://static.rust-lang.org/dist/rust-%{bootstrap_rust}-i686-unknown-linux-gnu.tar.xz
|
||||
Source10: rust.rpmlintrc
|
||||
# https://github.com/rust-lang/rust/pull/56394
|
||||
Patch1: 0001-Deal-with-EINTR-in-net-timeout-tests.patch
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: curl
|
||||
BuildRequires: pkgconfig(libcurl)
|
||||
|
@ -230,27 +232,26 @@ and ensure that you'll always get a repeatable build.
|
|||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package -n rustfmt-preview
|
||||
%package -n rustfmt
|
||||
Summary: Tool to find and fix Rust formatting issues
|
||||
Group: Development/Rust
|
||||
Version: %{rustfmt_version}
|
||||
Requires: cargo
|
||||
# Despite the lower version, our rustfmt-preview is newer than rustfmt-0.9.
|
||||
# It's expected to stay "preview" until it's released as 1.0.
|
||||
Obsoletes: rustfmt <= 0.9.0
|
||||
Provides: rustfmt = %{rustfmt_version}
|
||||
# The component/package was rustfmt-preview until Rust 1.31.
|
||||
Obsoletes: rustfmt-preview < 1.0.0
|
||||
Provides: rustfmt-preview = %{rustfmt_version}-%{release}
|
||||
|
||||
%description -n rustfmt-preview
|
||||
%description -n rustfmt
|
||||
A tool for formatting Rust code according to style guidelines.
|
||||
|
||||
%files -n rustfmt-preview
|
||||
%files -n rustfmt
|
||||
%doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md
|
||||
%{_bindir}/rustfmt
|
||||
%{_bindir}/cargo-fmt
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package -n rls-preview
|
||||
%package -n rls
|
||||
Summary: Rust Language Server for IDE integration
|
||||
Version: %{rls_version}
|
||||
Group: Development/Rust
|
||||
|
@ -258,34 +259,40 @@ Provides: rls = %{rls_version}
|
|||
Requires: rust-analysis
|
||||
# /usr/bin/rls is dynamically linked against internal rustc libs
|
||||
Requires: %{name} = %{rustc_version}-%{release}
|
||||
# The component/package was rls-preview until Rust 1.31.
|
||||
Obsoletes: rls-preview < 1.31.6
|
||||
Provides: rls-preview = %{rls_version}-%{release}
|
||||
|
||||
%description -n rls-preview
|
||||
%description -n rls
|
||||
The Rust Language Server provides a server that runs in the background,
|
||||
providing IDEs, editors, and other tools with information about Rust programs.
|
||||
It supports functionality such as 'goto definition', symbol search,
|
||||
reformatting, and code completion, and enables renaming and refactorings.
|
||||
|
||||
%files -n rls-preview
|
||||
%files -n rls
|
||||
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
|
||||
%{_bindir}/rls
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
%package -n clippy-preview
|
||||
%package -n clippy
|
||||
Summary: Lints to catch common mistakes and improve your Rust code
|
||||
Version: %{clippy_version}
|
||||
License: MPLv2.0
|
||||
Group: Development/Rust
|
||||
Provides: clippy = %{clippy_version}
|
||||
Requires: cargo
|
||||
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
|
||||
Requires: %{name} = %{rustc_version}-%{release}
|
||||
# The component/package was clippy-preview until Rust 1.31.
|
||||
Obsoletes: clippy-preview <= 0.0.212
|
||||
Provides: clippy-preview = %{clippy_version}-%{release}
|
||||
|
||||
%description -n clippy-preview
|
||||
%description -n clippy
|
||||
A collection of lints to catch common mistakes and improve your Rust code.
|
||||
|
||||
%files -n clippy-preview
|
||||
%files -n clippy
|
||||
%doc src/tools/clippy/{README.md,CHANGELOG.md}
|
||||
%doc src/tools/clippy/LICENSE-{APACHE,MIT}
|
||||
%{_bindir}/cargo-clippy
|
||||
%{_bindir}/clippy-driver
|
||||
|
||||
|
@ -337,6 +344,10 @@ test -f '%{local_rust_root}/bin/cargo'
|
|||
test -f '%{local_rust_root}/bin/rustc'
|
||||
%endif
|
||||
|
||||
%if %{without bootstrap}
|
||||
%patch1 -p1
|
||||
%endif
|
||||
|
||||
%setup -qn rustc-%{rustc_version}-src
|
||||
|
||||
# python3
|
||||
|
@ -394,7 +405,8 @@ export RUSTFLAGS="%{rustflags}"
|
|||
--libdir=%{_libdir} \
|
||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||
--local-rust-root=%{local_rust_root} \
|
||||
--llvm-root=%{_prefix} --disable-codegen-tests \
|
||||
--llvm-root=%{_prefix} \
|
||||
--disable-codegen-tests \
|
||||
--disable-jemalloc \
|
||||
--disable-rpath \
|
||||
--enable-extended \
|
||||
|
|
Loading…
Add table
Reference in a new issue