From f55288c08171dea0c05afd5ffb9c276b4e51807eb9c1c7bb1871f774c43ee5d0 Mon Sep 17 00:00:00 2001 From: Luke Jones Date: Sat, 9 Nov 2019 09:53:14 +0000 Subject: [PATCH 1/3] Accepting request 746768 from home:aplanas:branches:devel:languages:rust - Add hopefully-fix-rustdoc-build.patch to fix rustdoc compilation - Update to version 1.39.0 + Language - You can now create async functions and blocks with async fn, async move {}, and async {} respectively, and you can now call .await on async expressions. - You can now use certain attributes on function, closure, and function pointer parameters. - You can now take shared references to bind-by-move patterns in the if guards of match arms. + Compiler - Added tier 3 support for the i686-unknown-uefi target. - Added tier 3 support for the sparc64-unknown-openbsd target. - rustc will now trim code snippets in diagnostics to fit in your terminal. - You can now pass --show-output argument to test binaries to print the output of successful tests. + For more details: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1390-2019-11-07 - Drop patches already merged in upstream: + rust-61206-assume-tarball-llvm-is-fresh.patch + add-option-to-allow-warnings.patch OBS-URL: https://build.opensuse.org/request/show/746768 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=233 --- add-option-to-allow-warnings.patch | 112 ------------------ hopefully-fix-rustdoc-build.patch | 35 ++++++ ignore-Wstring-conversion.patch | 34 +++--- rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz | 3 - ....37.0-armv7-unknown-linux-gnueabihf.tar.xz | 3 - rust-1.37.0-i686-unknown-linux-gnu.tar.xz | 3 - rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz | 3 - ...-1.37.0-powerpc64-unknown-linux-gnu.tar.xz | 3 - ....37.0-powerpc64le-unknown-linux-gnu.tar.xz | 3 - rust-1.37.0-s390x-unknown-linux-gnu.tar.xz | 3 - rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz | 3 - rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz | 3 + ....38.0-armv7-unknown-linux-gnueabihf.tar.xz | 3 + rust-1.38.0-i686-unknown-linux-gnu.tar.xz | 3 + rust-1.38.0-powerpc-unknown-linux-gnu.tar.xz | 3 + ...-1.38.0-powerpc64-unknown-linux-gnu.tar.xz | 3 + ....38.0-powerpc64le-unknown-linux-gnu.tar.xz | 3 + rust-1.38.0-s390x-unknown-linux-gnu.tar.xz | 3 + rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz | 3 + rust-61206-assume-tarball-llvm-is-fresh.patch | 73 ------------ rust.changes | 30 +++++ rust.spec | 17 ++- rustc-1.38.0-src.tar.xz | 3 - rustc-1.39.0-src.tar.xz | 3 + 24 files changed, 116 insertions(+), 239 deletions(-) delete mode 100644 add-option-to-allow-warnings.patch create mode 100644 hopefully-fix-rustdoc-build.patch delete mode 100644 rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz delete mode 100644 rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz delete mode 100644 rust-1.37.0-i686-unknown-linux-gnu.tar.xz delete mode 100644 rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz delete mode 100644 rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz delete mode 100644 rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz delete mode 100644 rust-1.37.0-s390x-unknown-linux-gnu.tar.xz delete mode 100644 rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz create mode 100644 rust-1.38.0-i686-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-powerpc-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-s390x-unknown-linux-gnu.tar.xz create mode 100644 rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz delete mode 100644 rust-61206-assume-tarball-llvm-is-fresh.patch delete mode 100644 rustc-1.38.0-src.tar.xz create mode 100644 rustc-1.39.0-src.tar.xz diff --git a/add-option-to-allow-warnings.patch b/add-option-to-allow-warnings.patch deleted file mode 100644 index a4c709d..0000000 --- a/add-option-to-allow-warnings.patch +++ /dev/null @@ -1,112 +0,0 @@ -From 935c1c86070dfac3515a4296bf991cdf544bae27 Mon Sep 17 00:00:00 2001 -From: Marc-Antoine Perennou -Date: Tue, 27 Aug 2019 09:37:51 +0200 -Subject: [PATCH] rustbuild: allow disabling deny(warnings) for bootstrap - -When deny-warnings is not specified or set to true, the behaviour is the same as before. -When deny-warnings is set to false, warnings are now allowed - -Fixes #63911 - -Signed-off-by: Marc-Antoine Perennou ---- - src/bootstrap/bin/main.rs | 3 --- - src/bootstrap/bin/rustc.rs | 8 +++----- - src/bootstrap/bin/rustdoc.rs | 3 --- - src/bootstrap/bootstrap.py | 2 ++ - src/bootstrap/lib.rs | 3 --- - src/build_helper/lib.rs | 3 --- - 6 files changed, 5 insertions(+), 17 deletions(-) - -diff --git a/src/bootstrap/bin/main.rs b/src/bootstrap/bin/main.rs -index bd1a87c5744d..138b7f4b2610 100644 ---- a/src/bootstrap/bin/main.rs -+++ b/src/bootstrap/bin/main.rs -@@ -5,9 +5,6 @@ - //! parent directory, and otherwise documentation can be found throughout the `build` - //! directory in each respective module. - --// NO-RUSTC-WRAPPER --#![deny(warnings, rust_2018_idioms, unused_lifetimes)] -- - use std::env; - - use bootstrap::{Config, Build}; -diff --git a/src/bootstrap/bin/rustc.rs b/src/bootstrap/bin/rustc.rs -index ce92ce026967..8cb48df14bfe 100644 ---- a/src/bootstrap/bin/rustc.rs -+++ b/src/bootstrap/bin/rustc.rs -@@ -15,9 +15,6 @@ - //! switching compilers for the bootstrap and for build scripts will probably - //! never get replaced. - --// NO-RUSTC-WRAPPER --#![deny(warnings, rust_2018_idioms, unused_lifetimes)] -- - use std::env; - use std::ffi::OsString; - use std::io; -@@ -124,8 +121,9 @@ fn main() { - - if env::var_os("RUSTC_DENY_WARNINGS").is_some() && - env::var_os("RUSTC_EXTERNAL_TOOL").is_none() { -- // When extending this list, search for `NO-RUSTC-WRAPPER` and add the new lints -- // there as well, some code doesn't go through this `rustc` wrapper. -+ // When extending this list, add the new lints to the RUSTFLAGS of the -+ // build_bootstrap function of src/bootstrap/bootstrap.py as well as -+ // some code doesn't go through this `rustc` wrapper. - cmd.arg("-Dwarnings"); - cmd.arg("-Drust_2018_idioms"); - cmd.arg("-Dunused_lifetimes"); -diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs -index ff38ee8788f5..766a3463ecd8 100644 ---- a/src/bootstrap/bin/rustdoc.rs -+++ b/src/bootstrap/bin/rustdoc.rs -@@ -2,9 +2,6 @@ - //! - //! See comments in `src/bootstrap/rustc.rs` for more information. - --// NO-RUSTC-WRAPPER --#![deny(warnings, rust_2018_idioms, unused_lifetimes)] -- - use std::env; - use std::process::Command; - use std::path::PathBuf; -diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py -index 86901792d797..3c56131396f2 100644 ---- a/src/bootstrap/bootstrap.py -+++ b/src/bootstrap/bootstrap.py -@@ -631,6 +631,8 @@ def build_bootstrap(self): - target_linker = self.get_toml("linker", build_section) - if target_linker is not None: - env["RUSTFLAGS"] += "-C linker=" + target_linker + " " -+ if self.get_toml("deny-warnings", "rust") != "false": -+ env["RUSTFLAGS"] += "-Dwarnings -Drust_2018_idioms -Dunused_lifetimes " - - env["PATH"] = os.path.join(self.bin_root(), "bin") + \ - os.pathsep + env["PATH"] -diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs -index c0e0ad1a857b..575844028d56 100644 ---- a/src/bootstrap/lib.rs -+++ b/src/bootstrap/lib.rs -@@ -103,9 +103,6 @@ - //! More documentation can be found in each respective module below, and you can - //! also check out the `src/bootstrap/README.md` file for more information. - --// NO-RUSTC-WRAPPER --#![deny(warnings, rust_2018_idioms, unused_lifetimes)] -- - #![feature(core_intrinsics)] - #![feature(drain_filter)] - -diff --git a/src/build_helper/lib.rs b/src/build_helper/lib.rs -index 131d2034675e..f035a7119188 100644 ---- a/src/build_helper/lib.rs -+++ b/src/build_helper/lib.rs -@@ -1,6 +1,3 @@ --// NO-RUSTC-WRAPPER --#![deny(warnings, rust_2018_idioms, unused_lifetimes)] -- - use std::fs::File; - use std::path::{Path, PathBuf}; - use std::process::{Command, Stdio}; diff --git a/hopefully-fix-rustdoc-build.patch b/hopefully-fix-rustdoc-build.patch new file mode 100644 index 0000000..e02e698 --- /dev/null +++ b/hopefully-fix-rustdoc-build.patch @@ -0,0 +1,35 @@ +From 73369f32621f6a844a80a8513ae3ded901e4a406 Mon Sep 17 00:00:00 2001 +From: Mark Rousskov +Date: Tue, 5 Nov 2019 11:16:46 -0500 +Subject: [PATCH] Hopefully fix rustdoc build + +It's super unclear why this broke when we switched to beta but not +previously -- but at least it's hopefully fixed now. +--- + src/bootstrap/builder.rs | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +Index: rustc-1.39.0-src/src/bootstrap/builder.rs +=================================================================== +--- rustc-1.39.0-src.orig/src/bootstrap/builder.rs ++++ rustc-1.39.0-src/src/bootstrap/builder.rs +@@ -875,7 +875,18 @@ impl<'a> Builder<'a> { + // things still build right, please do! + match mode { + Mode::Std => metadata.push_str("std"), +- _ => {}, ++ // When we're building rustc tools, they're built with a search path ++ // that contains things built during the rustc build. For example, ++ // bitflags is built during the rustc build, and is a dependency of ++ // rustdoc as well. We're building rustdoc in a different target ++ // directory, though, which means that Cargo will rebuild the ++ // dependency. When we go on to build rustdoc, we'll look for ++ // bitflags, and find two different copies: one built during the ++ // rustc step and one that we just built. This isn't always a ++ // problem, somehow -- not really clear why -- but we know that this ++ // fixes things. ++ Mode::ToolRustc => metadata.push_str("tool-rustc"), ++ _ => {} + } + cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata); + diff --git a/ignore-Wstring-conversion.patch b/ignore-Wstring-conversion.patch index 3da8750..6a8efef 100644 --- a/ignore-Wstring-conversion.patch +++ b/ignore-Wstring-conversion.patch @@ -1,17 +1,17 @@ -*** rustc-1.30.0-src/src/librustc_llvm/build.rs 2018-10-25 09:00:01.000000000 +1300 ---- rust-patch/src/librustc_llvm/build.rs 2018-11-05 07:31:35.672765505 +1300 -*************** -*** 147,152 **** ---- 147,158 ---- - continue; - } - -+ // hack to avoid flag on openSUSE which is incompatible with GCC -+ if flag.starts_with("-W") && flag.contains("string-conversion") { -+ continue; -+ } -+ -+ - cfg.flag(flag); - } - +Index: rustc-1.39.0-src/src/librustc_llvm/build.rs +=================================================================== +--- rustc-1.39.0-src.orig/src/librustc_llvm/build.rs ++++ rustc-1.39.0-src/src/librustc_llvm/build.rs +@@ -137,6 +137,12 @@ fn main() { + continue; + } + ++ // hack to avoid flag on openSUSE which is incompatible with GCC ++ if flag.starts_with("-W") && flag.contains("string-conversion") { ++ continue; ++ } ++ ++ + cfg.flag(flag); + } + diff --git a/rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz b/rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz deleted file mode 100644 index 0c98aef..0000000 --- a/rust-1.37.0-aarch64-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aed553dbf457d8239eb3b01d4a2f422672772a0114aa43647294eca1b358d219 -size 124322996 diff --git a/rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz b/rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz deleted file mode 100644 index aa3eb9c..0000000 --- a/rust-1.37.0-armv7-unknown-linux-gnueabihf.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d4ed33497b3a3b89f5910fa140bbc9f4865ebf1735898bbe06266ef5944f6fca -size 126583596 diff --git a/rust-1.37.0-i686-unknown-linux-gnu.tar.xz b/rust-1.37.0-i686-unknown-linux-gnu.tar.xz deleted file mode 100644 index 5865aee..0000000 --- a/rust-1.37.0-i686-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f99daecd13c716b0c285b1c26225e71df2c7ca520a00285ba4c26ff767680ecb -size 177419360 diff --git a/rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz b/rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz deleted file mode 100644 index 86c8cb1..0000000 --- a/rust-1.37.0-powerpc-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d784f998e93e18e2daf369097c30eb4718d8d2a71372b0f3d0da2869942f19ec -size 124035536 diff --git a/rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz b/rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz deleted file mode 100644 index d937dc5..0000000 --- a/rust-1.37.0-powerpc64-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:539492d5bfcd21261843028e4f53f753f57bb8ed45faee394701f27c01aef63b -size 128662180 diff --git a/rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz b/rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz deleted file mode 100644 index 31cda0f..0000000 --- a/rust-1.37.0-powerpc64le-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:eecebeaa2100950196e604d5680f9a9e7b6e97c535c246011a2247fe6ce629fc -size 131763436 diff --git a/rust-1.37.0-s390x-unknown-linux-gnu.tar.xz b/rust-1.37.0-s390x-unknown-linux-gnu.tar.xz deleted file mode 100644 index 0b6af21..0000000 --- a/rust-1.37.0-s390x-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e5bcf4181d0ae65ec7a20f727fc29a13c7a4864e69344a1bc19721053b7daaf -size 141808296 diff --git a/rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz b/rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz deleted file mode 100644 index d2d7de4..0000000 --- a/rust-1.37.0-x86_64-unknown-linux-gnu.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b498a84947012064363607c29cdd2ba6fab9a5260212ec4a7151dafd0d079081 -size 165034364 diff --git a/rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz b/rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..d715c6f --- /dev/null +++ b/rust-1.38.0-aarch64-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6ab06ff04cc41e612dd55f3358a1239be8cceb0ad8018996d39ae3e3b23156d2 +size 235231988 diff --git a/rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz b/rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz new file mode 100644 index 0000000..1908f34 --- /dev/null +++ b/rust-1.38.0-armv7-unknown-linux-gnueabihf.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8b9ced4a6b6efe32ac41e2ec032f847223b48ead04dedd2172e08d98616a774 +size 243411104 diff --git a/rust-1.38.0-i686-unknown-linux-gnu.tar.xz b/rust-1.38.0-i686-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..5d9d885 --- /dev/null +++ b/rust-1.38.0-i686-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c488cea89cef760362868eb790896bdf31b3109e392f0d54b27b74bd214df33 +size 298169160 diff --git a/rust-1.38.0-powerpc-unknown-linux-gnu.tar.xz b/rust-1.38.0-powerpc-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..4ec05b8 --- /dev/null +++ b/rust-1.38.0-powerpc-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b4ef3d69c8f31cfecd697decedfc5663374f543cfdd0db3d090ebdd8172e10a5 +size 239750464 diff --git a/rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz b/rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..9f1b950 --- /dev/null +++ b/rust-1.38.0-powerpc64-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6d14e0e4c334472a34a4a0943305ad8ef2a824bcd48ec92b71a11307a7be74b1 +size 240082008 diff --git a/rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz b/rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..d9af4e8 --- /dev/null +++ b/rust-1.38.0-powerpc64le-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c253cc0f9441ab6ef4c2457e0ef8748c076d7d1897ab8a8a7bbb00308603a2b +size 244407488 diff --git a/rust-1.38.0-s390x-unknown-linux-gnu.tar.xz b/rust-1.38.0-s390x-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..b7d86af --- /dev/null +++ b/rust-1.38.0-s390x-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:797c15038950f7a20abcc51c738fe5948a222c9847f01bce03ca0c76fe142879 +size 291685528 diff --git a/rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz b/rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz new file mode 100644 index 0000000..0f7629b --- /dev/null +++ b/rust-1.38.0-x86_64-unknown-linux-gnu.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4e9a2ef90679a66c9f8c62b113b018866303645a69c4812d8290d8a7162ea190 +size 279859784 diff --git a/rust-61206-assume-tarball-llvm-is-fresh.patch b/rust-61206-assume-tarball-llvm-is-fresh.patch deleted file mode 100644 index 26d3b06..0000000 --- a/rust-61206-assume-tarball-llvm-is-fresh.patch +++ /dev/null @@ -1,73 +0,0 @@ -commit 53fe76479aab03b1fbe5b7184f45484886f769b1 -Author: Josh Stone -Date: Wed Sep 4 16:02:31 2019 -0700 - - Assume non-git LLVM is fresh if the stamp file exists - - Rustbuild usually writes the LLVM submodule commit in a stamp file, so - we can avoid rebuilding it unnecessarily. However, for builds from a - source tarball (non-git), we were assuming a rebuild is always needed. - This can cause a lot of extra work if any environment like `CFLAGS` - changed between steps like build and install, which are often separate - in distro builds. - - Now we also write an empty stamp file if the git commit is unknown, and - its presence is trusted to indicate that no rebuild is needed. An info - message reports that this is happening, along with the stamp file path - that can be deleted to force a rebuild anyway. - -diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs -index f02def3e1b0..7bf9ea2688f 100644 ---- a/src/bootstrap/native.rs -+++ b/src/bootstrap/native.rs -@@ -81,26 +81,29 @@ impl Step for Llvm { - (info, "src/llvm-project/llvm", builder.llvm_out(target), dir.join("bin")) - }; - -- if !llvm_info.is_git() { -- println!( -- "git could not determine the LLVM submodule commit hash. \ -- Assuming that an LLVM build is necessary.", -- ); -- } -- - let build_llvm_config = llvm_config_ret_dir - .join(exe("llvm-config", &*builder.config.build)); - let done_stamp = out_dir.join("llvm-finished-building"); - -- if let Some(llvm_commit) = llvm_info.sha() { -- if done_stamp.exists() { -+ if done_stamp.exists() { -+ if let Some(llvm_commit) = llvm_info.sha() { - let done_contents = t!(fs::read(&done_stamp)); - - // If LLVM was already built previously and the submodule's commit didn't change - // from the previous build, then no action is required. - if done_contents == llvm_commit.as_bytes() { -- return build_llvm_config -+ return build_llvm_config; - } -+ } else { -+ builder.info( -+ "Could not determine the LLVM submodule commit hash. \ -+ Assuming that an LLVM rebuild is not necessary.", -+ ); -+ builder.info(&format!( -+ "To force LLVM to rebuild, remove the file `{}`", -+ done_stamp.display() -+ )); -+ return build_llvm_config; - } - } - -@@ -303,9 +306,7 @@ impl Step for Llvm { - - cfg.build(); - -- if let Some(llvm_commit) = llvm_info.sha() { -- t!(fs::write(&done_stamp, llvm_commit)); -- } -+ t!(fs::write(&done_stamp, llvm_info.sha().unwrap_or(""))); - - build_llvm_config - } diff --git a/rust.changes b/rust.changes index fb9bea4..507f66f 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,33 @@ +------------------------------------------------------------------- +Fri Nov 8 23:43:13 UTC 2019 - Alberto Planas Dominguez + +- Add hopefully-fix-rustdoc-build.patch to fix rustdoc compilation + +------------------------------------------------------------------- +Thu Nov 7 15:33:25 UTC 2019 - Alberto Planas Dominguez + +- Update to version 1.39.0 + + Language + - You can now create async functions and blocks with async fn, + async move {}, and async {} respectively, and you can now call + .await on async expressions. + - You can now use certain attributes on function, closure, and + function pointer parameters. + - You can now take shared references to bind-by-move patterns in + the if guards of match arms. + + Compiler + - Added tier 3 support for the i686-unknown-uefi target. + - Added tier 3 support for the sparc64-unknown-openbsd target. + - rustc will now trim code snippets in diagnostics to fit in your + terminal. + - You can now pass --show-output argument to test binaries to + print the output of successful tests. + + For more details: + https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1390-2019-11-07 +- Drop patches already merged in upstream: + + rust-61206-assume-tarball-llvm-is-fresh.patch + + add-option-to-allow-warnings.patch + ------------------------------------------------------------------- Wed Oct 23 09:56:33 UTC 2019 - Ralf Haferkamp diff --git a/rust.spec b/rust.spec index 2e8c746..1637e35 100644 --- a/rust.spec +++ b/rust.spec @@ -17,11 +17,11 @@ # -%global version_current 1.38.0 -%global version_previous 1.37.0 -%global version_bootstrap 1.37.0 -# some sub-packages are versioned independantly -%global rustfmt_version 1.0.3 +%global version_current 1.39.0 +%global version_previous 1.38.0 +%global version_bootstrap 1.38.0 +# some sub-packages are versioned independently +%global rustfmt_version 1.4.8 %global clippy_version 0.0.212 # Build the rust target triple. # Some rust arches don't match what SUSE labels them. @@ -122,10 +122,8 @@ Source107: %{dl_url}/rust-%{version_bootstrap}-s390x-unknown-linux-gnu.tar. Source108: %{dl_url}/rust-%{version_bootstrap}-powerpc-unknown-linux-gnu.tar.xz # PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag Patch0: ignore-Wstring-conversion.patch -# PATCH-FIX-UPSTREAM: Fix bug with timestamps which caused LLVM to rebuild - https://github.com/rust-lang/rust/issues/61206 -Patch1: rust-61206-assume-tarball-llvm-is-fresh.patch -# PATCH-FIX-UPSTREAM: Adds an option to ignore warnings, primaraily used in this build to allow v1.38 to bootstrap itself -Patch2: add-option-to-allow-warnings.patch +# PATCH-FIX-UPSTREAM: fix rustdoc compilation: https://github.com/rust-lang/rust/issues/66224 +Patch1: hopefully-fix-rustdoc-build.patch BuildRequires: ccache # Leap 42 to 42.3, SLE12 SP1, SP2 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120200 @@ -376,7 +374,6 @@ This package includes HTML documentation for Cargo. %patch0 -p1 %patch1 -p1 -%patch2 -p1 # use python3 sed -i -e "1s|#!.*|#!%{_bindir}/python3|" x.py diff --git a/rustc-1.38.0-src.tar.xz b/rustc-1.38.0-src.tar.xz deleted file mode 100644 index cfc2fe0..0000000 --- a/rustc-1.38.0-src.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3a7991aa4cb44ef941d71636e45a95468b520dc6fc7cf725364925bd3e3d3a34 -size 96163304 diff --git a/rustc-1.39.0-src.tar.xz b/rustc-1.39.0-src.tar.xz new file mode 100644 index 0000000..21c3d8a --- /dev/null +++ b/rustc-1.39.0-src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1fbc4f171c29 +size 96495140 From a174f5b25f6a7549a99da63dee9b214dd163346c843157e62d755157b6b9ffcc Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 29 Nov 2019 14:25:00 +0000 Subject: [PATCH 2/3] Accepting request 750795 from home:aplanas:branches:devel:languages:rust - Re-format the spec file - Add a README to explain the update process - Add _service file for download the assets and re-base the patches OBS-URL: https://build.opensuse.org/request/show/750795 OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=234 --- README | 62 +++++++++++++++++++++ _service | 9 +++ rust.changes | 7 +++ rust.spec | 152 +++++++++++++++++++++++++++------------------------ 4 files changed, 160 insertions(+), 70 deletions(-) create mode 100644 README create mode 100644 _service diff --git a/README b/README new file mode 100644 index 0000000..a3ab7fc --- /dev/null +++ b/README @@ -0,0 +1,62 @@ +# Automatic updating via _service + +Edit the spec file, and update the variables related with the version +(in format X.YY.Z): + +- *version_current*: for the new version of Rust +- *version_previous*: for the previous version of Rust +- *version_bootstrap*: for the version used to compile Rust, it + recommended to use the same version that *version_previous* +- *rustfmt_version*: for the version of rustfmt cli, check the tarball + to find the correct version +- *clippy_version*: for the version of clippy, check the tarball to + find the correct version + +After that, we can execute the service file: + + osc service disabledrun + +If `osc` complains about a missing service component, double check +that the components are installed. For example, for Tumbleweed: + + zypper in obs-service-download_files obs-service-refresh_patches + +Finally, update the changelog based on the releases notes: + + https://github.com/rust-lang/rust/blob/master/RELEASES.md + +# Updating to a new version from upstream + +(Original link: https://en.opensuse.org/Rust) + +Branch the rust package in the devel:languages:rust project. + +You'll need to download precompiled binaries for the compiler used for +bootstrapping, and the actual source code for the compiler. In the +"Other Installation Methods" page listed below, note that it shows +links to .tar.gz packages and their .tar.gz.asc GPG signatures, but +.tar.xz versions are also available. + +*Binaries for bootstrapping* - Go to the "Other Installation Methods" +page from rust-lang.org and scroll down to the "Standalone installers" +section. Download the following: + +- rust--aarch64-unknown-linux-gnu.tar.xz +- rust--armv7-unknown-linux-gnueabihf.tar.xz +- rust--i686-unknown-linux-gnu.tar.xz +- rust--powerpc64le-unknown-linux-gnu.tar.xz +- rust--powerpc64-unknown-linux-gnu.tar.xz +- rust--s390x-unknown-linux-gnu.tar.xz +- rust--x86_64-unknown-linux-gnu.tar.xz + +*Compiler source code* - From the same page, but now in the "Source +code" section, download this: + + rustc--src.tar.xz + +Update those files in the source RPM. Check that all the patches still +apply. + +Update the version number in rust.spec. + +Add the release notes to rust.changes. \ No newline at end of file diff --git a/_service b/_service new file mode 100644 index 0000000..d4da8c5 --- /dev/null +++ b/_service @@ -0,0 +1,9 @@ + + + enable + + + enable + enable + + diff --git a/rust.changes b/rust.changes index 507f66f..4d12bbd 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Nov 25 13:25:52 UTC 2019 - Alberto Planas Dominguez + +- Re-format the spec file +- Add a README to explain the update process +- Add _service file for download the assets and re-base the patches + ------------------------------------------------------------------- Fri Nov 8 23:43:13 UTC 2019 - Alberto Planas Dominguez diff --git a/rust.spec b/rust.spec index 1637e35..285e7b4 100644 --- a/rust.spec +++ b/rust.spec @@ -1,7 +1,7 @@ # # spec file for package rust # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LLC # Copyright (c) 2019 Luke Jones, luke@ljones.dev # # All modifications and additions to the file contributed by third parties @@ -20,35 +20,46 @@ %global version_current 1.39.0 %global version_previous 1.38.0 %global version_bootstrap 1.38.0 + # some sub-packages are versioned independently %global rustfmt_version 1.4.8 %global clippy_version 0.0.212 + # Build the rust target triple. # Some rust arches don't match what SUSE labels them. %global rust_arch %{_arch} %global abi gnu + %ifarch armv7hl %global rust_arch armv7 %global abi gnueabihf %endif + %ifarch armv6hl %global rust_arch arm %global abi gnueabihf %endif + %ifarch ppc %global rust_arch powerpc %endif + %ifarch ppc64 %global rust_arch powerpc64 %endif + %ifarch ppc64le %global rust_arch powerpc64le %endif -# Must restrict the x86 build to i686 since i586 is currently unsupported + +# Must restrict the x86 build to i686 since i586 is currently +# unsupported %ifarch %{ix86} %global rust_arch i686 %endif + %global rust_triple %{rust_arch}-unknown-linux-%{abi} + # All sources and bootstraps are fetched form here %global dl_url https://static.rust-lang.org/dist @@ -56,10 +67,10 @@ %global common_libdir %{_prefix}/lib %global rustlibdir %{common_libdir}/rustlib -# Will build with distro LLVM by default, but the following -# versions do not have a version new enough, >= 6.0 -# add --without bundled_llvm option, i.e. enable bundled_llvm by default -# Leap 42 to 42.3, SLE12 SP1 to SLE12 SP3, Leap 15.0, SLE15 SP0 +# Will build with distro LLVM by default, but the following versions +# do not have a version new enough, >= 6.0 add --without bundled_llvm +# option, i.e. enable bundled_llvm by default Leap 42 to 42.3, SLE12 +# SP1 to SLE12 SP3, Leap 15.0, SLE15 SP0 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 150000 %bcond_without bundled_llvm %endif @@ -71,9 +82,6 @@ %bcond_without rls %endif -# enable the --with-rust_bootstrap flag -%bcond_with rust_bootstrap - # Debuginfo can exhaust memory on these architecture workers %ifarch %{arm} %{ix86} %define codegen_units --set rust.codegen-units=2 @@ -103,13 +111,16 @@ # Exclude implicitly-scanned Provides, especially the libLLVM.so ones: %global __provides_exclude_from ^%{rustlibdir}/.*$ +# enable the --with-rust_bootstrap flag +%bcond_with rust_bootstrap + Name: rust Version: %{version_current} Release: 0 Summary: A systems programming language License: MIT OR Apache-2.0 Group: Development/Languages/Rust -Url: https://www.rust-lang.org +URL: https://www.rust-lang.org Source0: %{dl_url}/rustc-%{version}-src.tar.xz Source99: %{name}-rpmlintrc Source100: %{dl_url}/rust-%{version_bootstrap}-x86_64-unknown-linux-gnu.tar.xz @@ -125,6 +136,15 @@ Patch0: ignore-Wstring-conversion.patch # PATCH-FIX-UPSTREAM: fix rustdoc compilation: https://github.com/rust-lang/rust/issues/66224 Patch1: hopefully-fix-rustdoc-build.patch BuildRequires: ccache +BuildRequires: curl +BuildRequires: fdupes +BuildRequires: git +BuildRequires: pkgconfig +BuildRequires: procps +BuildRequires: python3-base +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(zlib) # Leap 42 to 42.3, SLE12 SP1, SP2 %if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120200 # In these distros cmake is 2.x, so we need cmake3 for building llvm. @@ -133,8 +153,6 @@ BuildRequires: cmake3 # cmake got upgraded to 3.5 in SLE-12 SP2 BuildRequires: cmake %endif -BuildRequires: curl -BuildRequires: fdupes # In all of SLE12, the default gcc is 4.8. Rust's LLVM wants 5.1 at least. # So, we'll just use gcc7. %if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120500 @@ -142,74 +160,67 @@ BuildRequires: gcc7-c++ %else BuildRequires: gcc-c++ %endif -BuildRequires: git -BuildRequires: pkgconfig -BuildRequires: procps -BuildRequires: python3-base -BuildRequires: pkgconfig(libcurl) -# The following requires must mirror: -# LIBSSH2_SYS_USE_PKG_CONFIG +# The following requires must mirror: LIBSSH2_SYS_USE_PKG_CONFIG %if !%with rust_bootstrap || 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120500 BuildRequires: pkgconfig(libssh2) >= 1.4.3 %endif -BuildRequires: pkgconfig(openssl) -BuildRequires: pkgconfig(zlib) -# The compiler is not generally useful without the std library installed -# And the std library is exactly specific to the version of the compiler +# Real LLVM minimum version should be 7.x, but rust has a fallback +# mode +%if !%with bundled_llvm +BuildRequires: llvm-devel >= 6.0 +%endif +%if !%with rust_bootstrap +# We will now package cargo using the version number of rustc since it +# is being built from rust sources. Old cargo packages have a 0.x +# number +BuildRequires: cargo <= %{version_current} +BuildRequires: cargo >= %{version_previous} +BuildRequires: rust <= %{version_current} +BuildRequires: rust >= %{version_previous} +BuildRequires: rust-std-static <= %{version_current} +BuildRequires: rust-std-static >= %{version_previous} +%endif +# The compiler is not generally useful without the std library +# installed and the std library is exactly specific to the version of +# the compiler Requires: %{name}-std-static = %{version} Recommends: %{name}-doc Recommends: cargo Conflicts: rust Conflicts: rustc-bootstrap -# Restrict the architectures as building rust relies on being initially -# bootstrapped before we can build the n+1 release +# Restrict the architectures as building rust relies on being +# initially bootstrapped before we can build the n+1 release ExclusiveArch: x86_64 %{arm} aarch64 ppc ppc64 ppc64le s390x %{ix86} %ifarch %{ix86} ExclusiveArch: i686 %endif -# Real LLVM minimum version should be 7.x, but rust has a fallback mode -%if !%with bundled_llvm -BuildRequires: llvm-devel >= 6.0 -%endif -%if !%with rust_bootstrap -# We will now package cargo using the version number of rustc since -# it is being built from rust sources. Old cargo packages have a 0.x number -BuildRequires: cargo <= %{version_current} -BuildRequires: cargo >= %{version_previous} -BuildRequires: rust <= %{version_current} -BuildRequires: rust >= %{version_previous} -# This must be bumped to rust-std-static after 1.27.2 is in mainstream -BuildRequires: rust-std-static <= %{version_current} -BuildRequires: rust-std-static >= %{version_previous} -%endif %description -Rust is a systems programming language focused on three goals: -safety, speed, and concurrency. It maintains these goals without -having a garbage collector, making it a useful language for a -number of use cases other languages are not good at: embedding -in other languages, programs with specific space and time -requirements, and writing low-level code, like device drivers -and operating systems. It improves on current languages targeting -this space by having a number of compile-time safety checks -that produce no runtime overhead, while eliminating all -data races. Rust also aims to achieve "zero-cost abstractions", -even though some of these abstractions feel like those of a -high-level language. Even then, Rust still allows precise -control like a low-level language would. +Rust is a systems programming language focused on three goals: safety, +speed, and concurrency. It maintains these goals without having a +garbage collector, making it a useful language for a number of use +cases other languages are not good at: embedding in other languages, +programs with specific space and time requirements, and writing +low-level code, like device drivers and operating systems. It improves +on current languages targeting this space by having a number of +compile-time safety checks that produce no runtime overhead, while +eliminating all data races. Rust also aims to achieve "zero-cost +abstractions", even though some of these abstractions feel like those +of a high-level language. Even then, Rust still allows precise control +like a low-level language would. %package -n rust-std-static Summary: Standard library for Rust License: MIT OR Apache-2.0 Group: Development/Languages/Rust Requires: %{name} = %{version} -Obsoletes: rust-std < %{version} Conflicts: rust-std < %{version} +Obsoletes: rust-std < %{version} Provides: rust-std = %{version} %description -n rust-std-static -This package includes the standard libraries for building -applications written in Rust. +This package includes the standard libraries for building applications +written in Rust. %package -n rust-doc Summary: Rust documentation @@ -261,8 +272,8 @@ Requires: %{name}-src = %{version} The RLS 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. -It can be used with an IDE such as Gnome-Builder. +reformatting, and code completion, and enables renaming and +refactorings. It can be used with an IDE such as Gnome-Builder. %package -n rust-analysis Summary: Compiler analysis data for the Rust standard library @@ -271,9 +282,10 @@ Group: Development/Languages/Rust Requires: rust-std-static = %{version} %description -n rust-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. +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. %package -n rustfmt Summary: Code formatting tool for Rust lang @@ -281,6 +293,8 @@ License: MIT OR Apache-2.0 Group: Development/Languages/Rust Requires: %{name} = %{version} Requires: cargo = %{version} +Provides: cargo-fmt = %{rustfmt_version} +Provides: rustfmt = %{rustfmt_version} %if 0%{?suse_version} && 0%{?suse_version} < 1500 # Legacy SUSE-only form Supplements: packageand(%{name}:cargo) @@ -288,8 +302,6 @@ Supplements: packageand(%{name}:cargo) # Standard form Supplements: (%{name} and cargo) %endif -Provides: cargo-fmt = %{rustfmt_version} -Provides: rustfmt = %{rustfmt_version} %description -n rustfmt A tool for formatting Rust code according to style guidelines. @@ -311,11 +323,11 @@ Summary: The Rust package manager License: MIT OR Apache-2.0 Group: Development/Languages/Rust Requires: %{name} = %{version} -Obsoletes: cargo < %{version} Conflicts: cargo < %{version} -Provides: rustc:%{_bindir}/cargo = %{version} -Obsoletes: cargo-vendor < %{version} +Obsoletes: cargo < %{version} Conflicts: cargo-vendor < %{version} +Obsoletes: cargo-vendor < %{version} +Provides: rustc:%{_bindir}/cargo = %{version} %description -n cargo Cargo downloads dependencies of Rust projects and compiles it. @@ -586,7 +598,7 @@ rm -rf %{buildroot}/home %if %{with rls} %files -n rls -%if 0%{?suse_version} == 1315 +%if 0%{?suse_version} == 1315 && !0%{?is_opensuse} %doc src/tools/rls/LICENSE-{APACHE,MIT} %else %license src/tools/rls/LICENSE-{APACHE,MIT} @@ -599,7 +611,7 @@ rm -rf %{buildroot}/home %{rustlibdir}/%{rust_triple}/analysis/ %files -n rustfmt -%if 0%{?suse_version} == 1315 +%if 0%{?suse_version} == 1315 && !0%{?is_opensuse} %doc src/tools/rustfmt/LICENSE-{APACHE,MIT} %else %license src/tools/rustfmt/LICENSE-{APACHE,MIT} @@ -609,7 +621,7 @@ rm -rf %{buildroot}/home %{_bindir}/rustfmt %files -n clippy -%if 0%{?suse_version} == 1315 +%if 0%{?suse_version} == 1315 && !0%{?is_opensuse} %doc src/tools/clippy/LICENSE-{APACHE,MIT} %else %license src/tools/clippy/LICENSE-{APACHE,MIT} @@ -619,7 +631,7 @@ rm -rf %{buildroot}/home %{_bindir}/clippy-driver %files -n cargo -%if 0%{?suse_version} == 1315 +%if 0%{?suse_version} == 1315 && !0%{?is_opensuse} %doc src/tools/cargo/LICENSE-{APACHE,MIT,THIRD-PARTY} %else %license src/tools/cargo/LICENSE-{APACHE,MIT,THIRD-PARTY} From 92c01454dff7195e8979037b552b78e628c4cbaa0b6ce9ddf895255a0b29ecd6 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Fri, 29 Nov 2019 14:44:48 +0000 Subject: [PATCH 3/3] - Rename README to README.suse-maint and add it as a source to stop factory-auto from declining submissions automatically OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=235 --- README => README.suse-maint | 0 rust.changes | 6 ++++++ rust.spec | 2 ++ 3 files changed, 8 insertions(+) rename README => README.suse-maint (100%) diff --git a/README b/README.suse-maint similarity index 100% rename from README rename to README.suse-maint diff --git a/rust.changes b/rust.changes index 4d12bbd..1adabe1 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Nov 29 14:43:11 UTC 2019 - Neal Gompa + +- Rename README to README.suse-maint and add it as a source + to stop factory-auto from declining submissions automatically + ------------------------------------------------------------------- Mon Nov 25 13:25:52 UTC 2019 - Alberto Planas Dominguez diff --git a/rust.spec b/rust.spec index 285e7b4..2dbc2b5 100644 --- a/rust.spec +++ b/rust.spec @@ -131,6 +131,8 @@ Source105: %{dl_url}/rust-%{version_bootstrap}-powerpc64-unknown-linux-gnu. Source106: %{dl_url}/rust-%{version_bootstrap}-powerpc64le-unknown-linux-gnu.tar.xz Source107: %{dl_url}/rust-%{version_bootstrap}-s390x-unknown-linux-gnu.tar.xz Source108: %{dl_url}/rust-%{version_bootstrap}-powerpc-unknown-linux-gnu.tar.xz +# Make factory-auto stop complaining... +Source1000: README.suse-maint # PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag Patch0: ignore-Wstring-conversion.patch # PATCH-FIX-UPSTREAM: fix rustdoc compilation: https://github.com/rust-lang/rust/issues/66224