Merge branch 'master' into epel7

This commit is contained in:
Josh Stone 2018-12-06 13:11:55 -08:00
commit 067006102e
5 changed files with 184 additions and 37 deletions

8
.gitignore vendored
View File

@ -163,3 +163,11 @@
/rust-1.29.2-s390x-unknown-linux-gnu.tar.xz
/rust-1.29.2-x86_64-unknown-linux-gnu.tar.xz
/rustc-1.30.1-src.tar.xz
/rustc-1.31.0-src.tar.xz
/rust-1.30.0-aarch64-unknown-linux-gnu.tar.xz
/rust-1.30.0-armv7-unknown-linux-gnueabihf.tar.xz
/rust-1.30.0-i686-unknown-linux-gnu.tar.xz
/rust-1.30.0-powerpc64le-unknown-linux-gnu.tar.xz
/rust-1.30.0-powerpc64-unknown-linux-gnu.tar.xz
/rust-1.30.0-s390x-unknown-linux-gnu.tar.xz
/rust-1.30.0-x86_64-unknown-linux-gnu.tar.xz

View 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

View File

@ -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.29.2
%global bootstrap_cargo 1.29.0
%global bootstrap_rust 1.30.0
%global bootstrap_cargo 1.30.0
%global bootstrap_channel %{bootstrap_rust}
%global bootstrap_date 2018-10-12
%global bootstrap_date 2018-10-25
# Only the specified arches will use bootstrap binaries.
#global bootstrap_arches %%{rust_arches}
@ -55,15 +55,15 @@
# 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!
%global rustc_version 1.30.1
%global cargo_version 1.30.0
%global rustfmt_version 0.99.4
%global rls_version 0.130.5
%global rustc_version 1.31.0
%global cargo_version 1.31.0
%global rustfmt_version 1.0.0
%global rls_version 1.31.6
%global clippy_version 0.0.212
Name: rust
Version: %{rustc_version}
Release: 7%{?dist}
Release: 8%{?dist}
Summary: The Rust Programming Language
License: (ASL 2.0 or MIT) and (BSD and MIT)
# ^ written as: (rust itself) and (bundled libraries)
@ -77,6 +77,9 @@ ExclusiveArch: %{rust_arches}
%endif
Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
# https://github.com/rust-lang/rust/pull/56394
Patch1: 0001-Deal-with-EINTR-in-net-timeout-tests.patch
# Get the Rust triple for any arch.
%{lua: function rust_triple(arch)
local abi = "gnu"
@ -157,7 +160,7 @@ BuildRequires: %{python}
%if %with bundled_llvm
BuildRequires: cmake3 >= 3.4.3
Provides: bundled(llvm) = 7.0
Provides: bundled(llvm) = 8.0.0~svn
%else
BuildRequires: cmake >= 2.8.11
%if 0%{?epel}
@ -220,10 +223,15 @@ Requires: /usr/bin/cc
# Use hardening ldflags.
%global rustflags -Clink-arg=-Wl,-z,relro,-z,now
%if %{without bundled_llvm} && "%{llvm_root}" != "%{_prefix}"
%if %{without bundled_llvm}
%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?scl:1}
%global llvm_has_filecheck 1
%endif
%if "%{llvm_root}" != "%{_prefix}"
# https://github.com/rust-lang/rust/issues/40717
%global library_path $(%{llvm_root}/bin/llvm-config --libdir)
%endif
%endif
%description
Rust is a systems programming language that runs blazingly fast, prevents
@ -297,7 +305,7 @@ Version: %{cargo_version}
Provides: bundled(libgit2) = 0.27
%endif
%if %with bundled_libssh2
Provides: bundled(libssh2) = 1.8.1
Provides: bundled(libssh2) = 1.8.1~dev
%endif
# For tests:
BuildRequires: git
@ -321,21 +329,20 @@ Requires: rust-doc = %{rustc_version}-%{release}
This package includes HTML documentation for Cargo.
%package -n rustfmt-preview
%package -n rustfmt
Summary: Tool to find and fix Rust formatting issues
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.
%package -n rls-preview
%package -n rls
Summary: Rust Language Server for IDE integration
Version: %{rls_version}
Provides: rls = %{rls_version}
@ -343,29 +350,36 @@ Provides: rls = %{rls_version}
Provides: bundled(libgit2) = 0.27
%endif
%if %with bundled_libssh2
Provides: bundled(libssh2) = 1.8.1
Provides: bundled(libssh2) = 1.8.1~dev
%endif
Requires: rust-analysis
# /usr/bin/rls is dynamically linked against internal rustc libs
Requires: %{name}%{?_isa} = %{rustc_version}-%{release}
%description -n rls-preview
# 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
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.
%package -n clippy-preview
%package -n clippy
Summary: Lints to catch common mistakes and improve your Rust code
Version: %{clippy_version}
License: MPLv2.0
Provides: clippy = %{clippy_version}
Requires: cargo
# /usr/bin/clippy-driver is dynamically linked against internal rustc libs
Requires: %{name}%{?_isa} = %{rustc_version}-%{release}
%description -n clippy-preview
# 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
A collection of lints to catch common mistakes and improve your Rust code.
@ -400,6 +414,8 @@ test -f '%{local_rust_root}/bin/rustc'
%setup -q -n %{rustc_package}
%patch1 -p1
%if "%{python}" == "python3"
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
%endif
@ -482,7 +498,8 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1
--libdir=%{common_libdir} \
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
--local-rust-root=%{local_rust_root} \
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} --disable-codegen-tests \
%{!?with_bundled_llvm: --llvm-root=%{llvm_root} \
%{!?llvm_has_filecheck: --disable-codegen-tests} \
%{!?with_llvm_static: --enable-llvm-link-shared } } \
--disable-jemalloc \
--disable-rpath \
@ -652,24 +669,24 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%{_docdir}/cargo/html
%files -n rustfmt-preview
%files -n rustfmt
%{_bindir}/rustfmt
%{_bindir}/cargo-fmt
%doc src/tools/rustfmt/{README,CHANGELOG,Configurations}.md
%license src/tools/rustfmt/LICENSE-{APACHE,MIT}
%files -n rls-preview
%files -n rls
%{_bindir}/rls
%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md}
%license src/tools/rls/LICENSE-{APACHE,MIT}
%files -n clippy-preview
%files -n clippy
%{_bindir}/cargo-clippy
%{_bindir}/clippy-driver
%doc src/tools/clippy/{README.md,CHANGELOG.md}
%license src/tools/clippy/LICENSE
%license src/tools/clippy/LICENSE-{APACHE,MIT}
%files src
@ -682,6 +699,10 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
%changelog
* Thu Dec 06 2018 Josh Stone <jistone@redhat.com> - 1.31.0-8
- Update to 1.31.0 -- Rust 2018!
- clippy/rls/rustfmt are no longer -preview
* Thu Nov 08 2018 Josh Stone <jistone@redhat.com> - 1.30.1-7
- Update to 1.30.1.

View File

@ -1 +1 @@
SHA512 (rustc-1.30.1-src.tar.xz) = e466db81b9a82239670c48b876dc7390fcdda28c6390308691ddf2e0c12a39b57bd5ddb18322d1b4cd58165f69a666c7d83bee6573049da3b94e401657459bf5
SHA512 (rustc-1.31.0-src.tar.xz) = 38fb8c759a517defd64ca75a22d5deb1fa543fc13f127c73010741c40bc00935bf3b46743a95a22e98e37df5aa21d72203acabaecf8c0b23439e3b5c68f2fbec

View File

@ -1,8 +1,8 @@
SHA512 (rustc-1.30.1-src.tar.xz) = e466db81b9a82239670c48b876dc7390fcdda28c6390308691ddf2e0c12a39b57bd5ddb18322d1b4cd58165f69a666c7d83bee6573049da3b94e401657459bf5
SHA512 (rust-1.29.2-aarch64-unknown-linux-gnu.tar.xz) = f871359a3b1ac54fb237921204d98ef4fac06830e9835849538397c27d40283662c0f6ab3f6eafe0e9ef63182a460e26d615111055430ece0fe94ddf7ad03914
SHA512 (rust-1.29.2-armv7-unknown-linux-gnueabihf.tar.xz) = bff1220781eca904a93d2cefafed3587e3f76e1dc04fbef09a0281295b6c06491c5fa327830c430d31df80eb7a3e64eac7f45739bc118e3626854f96dce246e2
SHA512 (rust-1.29.2-i686-unknown-linux-gnu.tar.xz) = faac22aec54d0754ff991f2a34ed7b8bfefa8dc9720d247eec1c6b671bbc701907146a796699591e4a677a0f378b9d96bfea5b33452f05dd876c668525f9f33d
SHA512 (rust-1.29.2-powerpc64le-unknown-linux-gnu.tar.xz) = b9181da601a467f46713f2f438fc7ad69c46fc310e62a8d45f665744c8578491d832b8624ff454c19c94f1694fa406846a82289250241030a70b2cb4b88913d1
SHA512 (rust-1.29.2-powerpc64-unknown-linux-gnu.tar.xz) = 1af0b55bc62d7641d33e2d33aadaf474298d3284cb2d914be0240eae54e20f464513db4b04f7518385dc5135498c58ec18e0d4cc6341c9e165847536479f44dc
SHA512 (rust-1.29.2-s390x-unknown-linux-gnu.tar.xz) = f76a030257edbdd993d7a4e83da895c8b4749904fb2252a125b3e4ef4331a1cb2c389ec54a372bea413718e3dad987e4b17eb29d301c29ba330222502e6b9b75
SHA512 (rust-1.29.2-x86_64-unknown-linux-gnu.tar.xz) = 8bc05942a72b186ea1765831bea6921f734e2dd58790a8e427a6d63a2db0d9064937d3198ca3febffeba73b1cc3bef716155ef6cb32127ddeef29ac884cde4b8
SHA512 (rustc-1.31.0-src.tar.xz) = 38fb8c759a517defd64ca75a22d5deb1fa543fc13f127c73010741c40bc00935bf3b46743a95a22e98e37df5aa21d72203acabaecf8c0b23439e3b5c68f2fbec
SHA512 (rust-1.30.0-aarch64-unknown-linux-gnu.tar.xz) = 47459ea5a92418fdbfed9517d2ca741d02d8342e87e8b0e191103ff5407e39da917534445008a036cf043f0e8aff15a5d8c1884b0144ce4022f626fcfb5a46c6
SHA512 (rust-1.30.0-armv7-unknown-linux-gnueabihf.tar.xz) = c2849807e1fd37dc175ea4e41345076f5b24944471c191539b625eb59183d899c1f416b99bac8365ead20d2b49ede4254ccf39dc8006e17721a031f11fa42348
SHA512 (rust-1.30.0-i686-unknown-linux-gnu.tar.xz) = 76542f5d1f030696c6fb2aea6d4d7d3cb5739a16b7ce38f85cd7295d8f5ff1f1854266a5d30830898ab2fc06030be10d70f246c1391f241b8d9cba243d9ff992
SHA512 (rust-1.30.0-powerpc64le-unknown-linux-gnu.tar.xz) = 18095b68c6a5a4be32d4ad3413a251fe570c22d2c793852de6247fde5e061fc6d77bbcd812fff7e5bae7361c9588d7e41ef89ad791da678c89763acddc06a88f
SHA512 (rust-1.30.0-powerpc64-unknown-linux-gnu.tar.xz) = 8d371215eb3ba6b2f1fa9cc05ede5dd1cac873c82dde0f508f962cd27a13b15b814a6a9fdbce92b524dcebbb19294cd607c29d2d123cde1daefb61cd57090010
SHA512 (rust-1.30.0-s390x-unknown-linux-gnu.tar.xz) = 19a2f218b3104cfa5e5578365cc9927c818ddf721e4e8eb381bba1bd182fdefd9ad085ba4cbe8248fdbf5b173081ca1a2648b5be5fad62a0a324c3ade7f21ae7
SHA512 (rust-1.30.0-x86_64-unknown-linux-gnu.tar.xz) = 09d272bcc5b062815135d64441162b737078799328418adc4a4734fee69fcb9ad6abcbdc77b399688998481f0453915231b8b6d31b1d4066ac578035272c19f0