From 2503a331a1658ad07b36566519e4b3c16863d4cd Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sat, 2 Feb 2019 13:20:15 +0000 Subject: [PATCH 1/2] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- rust.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 0a67749..857ab7a 100644 --- a/rust.spec +++ b/rust.spec @@ -54,7 +54,7 @@ Name: rust Version: 1.32.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -685,6 +685,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Sat Feb 02 2019 Fedora Release Engineering - 1.32.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Thu Jan 17 2019 Josh Stone - 1.32.0-1 - Update to 1.32.0. From eedc93590e9f557e1466712a515e02aef63c0d08 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 28 Feb 2019 11:53:56 -0800 Subject: [PATCH 2/2] Update to 1.33.0. --- .gitignore | 8 ++++ ...e.py-try-import-_thread-for-Python-3.patch | 33 --------------- ...rust-gdb-relax-the-GDB-version-regex.patch | 30 ++++++++++++++ rust-pr57840-llvm7-debuginfo-variants.patch | 32 +++++++++++++++ rust.spec | 41 +++++++++++-------- sources | 2 +- sources-bootstrap | 16 ++++---- 7 files changed, 104 insertions(+), 58 deletions(-) delete mode 100644 0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch create mode 100644 0001-rust-gdb-relax-the-GDB-version-regex.patch create mode 100644 rust-pr57840-llvm7-debuginfo-variants.patch diff --git a/.gitignore b/.gitignore index cc7d9d1..2bb1e3e 100644 --- a/.gitignore +++ b/.gitignore @@ -178,3 +178,11 @@ /rust-1.31.1-powerpc64-unknown-linux-gnu.tar.xz /rust-1.31.1-s390x-unknown-linux-gnu.tar.xz /rust-1.31.1-x86_64-unknown-linux-gnu.tar.xz +/rustc-1.33.0-src.tar.xz +/rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.32.0-i686-unknown-linux-gnu.tar.xz +/rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.32.0-s390x-unknown-linux-gnu.tar.xz +/rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz diff --git a/0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch b/0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch deleted file mode 100644 index 78b84c2..0000000 --- a/0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch +++ /dev/null @@ -1,33 +0,0 @@ -From d9ddc39052c91568936427e3dee087b608140cf4 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Tue, 8 Jan 2019 13:19:50 -0800 -Subject: [PATCH] lldb_batchmode.py: try `import _thread` for Python 3 - ---- - src/etc/lldb_batchmode.py | 7 ++++++- - 1 file changed, 6 insertions(+), 1 deletion(-) - -diff --git a/src/etc/lldb_batchmode.py b/src/etc/lldb_batchmode.py -index 6b4c44806740..537b419b3279 100644 ---- a/src/etc/lldb_batchmode.py -+++ b/src/etc/lldb_batchmode.py -@@ -18,10 +18,15 @@ import lldb - import os - import sys - import threading --import thread - import re - import time - -+try: -+ import thread -+except ModuleNotFoundError: -+ # The `thread` module was renamed to `_thread` in Python 3. -+ import _thread as thread -+ - # Set this to True for additional output - DEBUG_OUTPUT = False - --- -2.20.1 - diff --git a/0001-rust-gdb-relax-the-GDB-version-regex.patch b/0001-rust-gdb-relax-the-GDB-version-regex.patch new file mode 100644 index 0000000..6905230 --- /dev/null +++ b/0001-rust-gdb-relax-the-GDB-version-regex.patch @@ -0,0 +1,30 @@ +From 9430423cab6909792fb1b3a850f1c3c8974a5111 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Tue, 15 Jan 2019 15:14:17 -0800 +Subject: [PATCH] [rust-gdb] relax the GDB version regex + +The pretty-printer script is checking `gdb.VERSION` to see if it's at +least 8.1 for some features. With `re.match`, it will only find the +version at the beginning of that string, but in Fedora the string is +something like "Fedora 8.2-5.fc29". Using `re.search` instead will find +the first location that matches anywhere, so it will find my 8.2. +--- + src/etc/gdb_rust_pretty_printing.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/etc/gdb_rust_pretty_printing.py b/src/etc/gdb_rust_pretty_printing.py +index 08ae289d6037..b9413563fd9f 100755 +--- a/src/etc/gdb_rust_pretty_printing.py ++++ b/src/etc/gdb_rust_pretty_printing.py +@@ -16,7 +16,7 @@ rust_enabled = 'set language rust' in gdb.execute('complete set language ru', to + # This fix went in 8.1, so check for that. + # See https://github.com/rust-lang/rust/issues/56730 + gdb_81 = False +-_match = re.match('([0-9]+)\\.([0-9]+)', gdb.VERSION) ++_match = re.search('([0-9]+)\\.([0-9]+)', gdb.VERSION) + if _match: + if int(_match.group(1)) > 8 or (int(_match.group(1)) == 8 and int(_match.group(2)) >= 1): + gdb_81 = True +-- +2.20.1 + diff --git a/rust-pr57840-llvm7-debuginfo-variants.patch b/rust-pr57840-llvm7-debuginfo-variants.patch new file mode 100644 index 0000000..71996bc --- /dev/null +++ b/rust-pr57840-llvm7-debuginfo-variants.patch @@ -0,0 +1,32 @@ +commit ab998a2eeb2bcdc69ce70c814af97f0d1302a404 (from d17f62d857c70508efbf60be41135880bcd2e062) +Merge: d17f62d857c7 9452a8dfa3ba +Author: Mazdak Farrokhzad +Date: Thu Jan 24 00:20:00 2019 +0100 + + Rollup merge of #57840 - tromey:fix-issue-57762, r=nikic + + Fix issue 57762 + + against a stock LLVM 7. LLVM 7 was released without a necessary fix + for a bug in the DWARF discriminant code. + + This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7. + + Closes #57762 + +diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs +index 6deedd0b5ea3..9f63038c3623 100644 +--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs ++++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs +@@ -1164,7 +1164,10 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool { + // On MSVC we have to use the fallback mode, because LLVM doesn't + // lower variant parts to PDB. + return cx.sess().target.target.options.is_like_msvc +- || llvm_util::get_major_version() < 7; ++ // LLVM version 7 did not release with an important bug fix; ++ // but the required patch is in the LLVM 8. Rust LLVM reports ++ // 8 as well. ++ || llvm_util::get_major_version() < 8; + } + + // Describes the members of an enum value: An enum is described as a union of diff --git a/rust.spec b/rust.spec index 857ab7a..6daecc5 100644 --- a/rust.spec +++ b/rust.spec @@ -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.31.1 -%global bootstrap_cargo 1.31.0 +%global bootstrap_rust 1.32.0 +%global bootstrap_cargo 1.32.0 %global bootstrap_channel %{bootstrap_rust} -%global bootstrap_date 2018-12-20 +%global bootstrap_date 2019-01-17 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -53,8 +53,8 @@ %endif Name: rust -Version: 1.32.0 -Release: 2%{?dist} +Version: 1.33.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -71,8 +71,12 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # https://github.com/rust-dev-tools/rls-analysis/pull/160 Patch1: 0001-Try-to-get-the-target-triple-from-rustc-itself.patch -# https://github.com/rust-lang/rust/pull/57453 -Patch2: 0001-lldb_batchmode.py-try-import-_thread-for-Python-3.patch +# https://github.com/rust-lang/rust/pull/57647 +Patch2: 0001-rust-gdb-relax-the-GDB-version-regex.patch + +# Revert https://github.com/rust-lang/rust/pull/57840 +# We do have the necessary fix in our LLVM 7. +Patch3: rust-pr57840-llvm7-debuginfo-variants.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) @@ -157,8 +161,9 @@ BuildRequires: cmake3 >= 3.4.3 Provides: bundled(llvm) = 8.0.0~svn %else BuildRequires: cmake >= 2.8.11 -%if 0%{?epel} -%global llvm llvm5.0 +%if 0%{?epel} || 0%{?fedora} >= 30 +# TODO: for f30+, we'll be ready for LLVM8 in Rust 1.34 +%global llvm llvm7.0 %endif %if %defined llvm %global llvm_root %{_libdir}/%{llvm} @@ -166,7 +171,7 @@ BuildRequires: cmake >= 2.8.11 %global llvm llvm %global llvm_root %{_prefix} %endif -BuildRequires: %{llvm}-devel >= 5.0 +BuildRequires: %{llvm}-devel >= 6.0 %if %with llvm_static BuildRequires: %{llvm}-static BuildRequires: libffi-devel @@ -181,7 +186,7 @@ BuildRequires: gdb # TODO: work on unbundling these! Provides: bundled(libbacktrace) = 8.1.0 -Provides: bundled(miniz) = 1.16~beta+r1 +Provides: bundled(miniz) = 2.0.7 # Virtual provides for folks who attempt "dnf install rustc" Provides: rustc = %{version}-%{release} @@ -218,7 +223,7 @@ Requires: /usr/bin/cc %global rustflags -Clink-arg=-Wl,-z,relro,-z,now %if %{without bundled_llvm} -%if 0%{?fedora} || 0%{?rhel} > 7 || 0%{?scl:1} +%if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1} %global llvm_has_filecheck 1 %endif %if "%{llvm_root}" != "%{_prefix}" @@ -405,6 +410,7 @@ pushd vendor/rls-analysis %patch1 -p1 popd %patch2 -p1 +%patch3 -p1 -R %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure @@ -422,9 +428,8 @@ rm -rf src/tools/clang rm -rf src/tools/lld rm -rf src/tools/lldb -# extract bundled licenses for packaging -sed -e '/*\//q' src/libbacktrace/backtrace.h \ - >src/libbacktrace/LICENSE-libbacktrace +# rename bundled license for packaging +cp -a vendor/backtrace-sys/src/libbacktrace/LICENSE{,-libbacktrace} %if %{with bundled_llvm} && 0%{?epel} mkdir -p cmake-bin @@ -586,7 +591,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %files %license COPYRIGHT LICENSE-APACHE LICENSE-MIT -%license src/libbacktrace/LICENSE-libbacktrace +%license vendor/backtrace-sys/src/libbacktrace/LICENSE-libbacktrace %doc README.md %{_bindir}/rustc %{_bindir}/rustdoc @@ -598,6 +603,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %dir %{rustlibdir}/%{rust_triple}/lib %{rustlibdir}/%{rust_triple}/lib/*.so %{rustlibdir}/%{rust_triple}/codegen-backends/ +%exclude %{_bindir}/{cargo-,}miri %files std-static @@ -685,6 +691,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Feb 28 2019 Josh Stone - 1.33.0-1 +- Update to 1.33.0. + * Sat Feb 02 2019 Fedora Release Engineering - 1.32.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 6e7d3bc..2eff6dd 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.32.0-src.tar.xz) = 487c405fed6430f62d2d0c38b65f6223b1c5074c7a0d3734dc8b3bb72fca255f5727e49541749569713a0c3e9a67eff574ba5698e8dceca6f0ef20b50f99aa42 +SHA512 (rustc-1.33.0-src.tar.xz) = 3291e4e19f75f44c81e6fcf4c01edc7c9d326eca43722381231abcf2e99f4314059ba59a29b79f5511ad9421c358c45e8fe18584d6954d17fe2aabad0f9d9147 diff --git a/sources-bootstrap b/sources-bootstrap index 2904e91..6d14e05 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.32.0-src.tar.xz) = 487c405fed6430f62d2d0c38b65f6223b1c5074c7a0d3734dc8b3bb72fca255f5727e49541749569713a0c3e9a67eff574ba5698e8dceca6f0ef20b50f99aa42 -SHA512 (rust-1.31.1-aarch64-unknown-linux-gnu.tar.xz) = c45aebda96a2df0e24efc7dc75cb913f6f92f6214582863367f3556a335d9a5ddf5bb487cb33dee7a48ab1d4dc986bd1fcf32f85b75d07558b1d18d89b26fd30 -SHA512 (rust-1.31.1-armv7-unknown-linux-gnueabihf.tar.xz) = 78b1681f44274c9a0bf62c7646c5a2c85164c5f4dd4349a757b512dd82d435a4f2779c4b6653c8c3f66986512438d1b23e4af15defbbe9f489c0119141ef1942 -SHA512 (rust-1.31.1-i686-unknown-linux-gnu.tar.xz) = ee2c2bb2c1bb0f6e7f8eaeb4b2f0a8de7f53e8da675ec05cb56cab9bc4faa18b7075f5843226d7f9459e1208cc3fb1b90c65063b4a5a3828b04f8ff3c93ebe39 -SHA512 (rust-1.31.1-powerpc64le-unknown-linux-gnu.tar.xz) = e64f586b632b85d07e18c61e5ce18a69404d89e302ecd8b4495e09e2b2f62bd3f32455b3d0d81cfa2d0031c003f23797421587cf6f314ce5b18b12157e1e9a3b -SHA512 (rust-1.31.1-powerpc64-unknown-linux-gnu.tar.xz) = 9a4427735e345d5e8f860ceab497c0ea3efd001c04322f5d2ecf0d5ac76e27feb1a247bb42662446ae39bf52eca75455b01a4c27341d6241406aa6feab1d1d4b -SHA512 (rust-1.31.1-s390x-unknown-linux-gnu.tar.xz) = ce6999f7d27468143a9a288fd1bda9f3ec42475f8b8473518be41358a2144317abf8076ed9527a10db94b5b89cf920f04217ce7a78ec214aa3e073a8419675bc -SHA512 (rust-1.31.1-x86_64-unknown-linux-gnu.tar.xz) = 3bf37bc419acd7820c7e33d7b44e6cba7f3b556ca8880fee2f65b1648596f069e0bc590a3a7acc10c60a0328f83787a172650d9c26cf21aa14782dcd9a97ec3a +SHA512 (rustc-1.33.0-src.tar.xz) = 3291e4e19f75f44c81e6fcf4c01edc7c9d326eca43722381231abcf2e99f4314059ba59a29b79f5511ad9421c358c45e8fe18584d6954d17fe2aabad0f9d9147 +SHA512 (rust-1.32.0-aarch64-unknown-linux-gnu.tar.xz) = b077c54bf38935a55a36fec39d1822562da760489ca924d48978e87b9ac5dc4b5107a7eb08dea0412a5a44c255428c649e31f07a5a67567c715de8644581018d +SHA512 (rust-1.32.0-armv7-unknown-linux-gnueabihf.tar.xz) = abadddae0a8de3ee326d1145e3bbe571d9ec0d80261569b6350dbc0fa38b9d31590933c318785f92b75c7add35d7b45e7713a3f1ef7dfd3de085b7255a855b2a +SHA512 (rust-1.32.0-i686-unknown-linux-gnu.tar.xz) = bec62be3e9f5e37197c10357a386a7083941f44151eab28e7a1c8892c0e8e65d168e1220d5e807bb55b9c86ef046bad5cb23fad89def9cb51d22ff69fb436172 +SHA512 (rust-1.32.0-powerpc64le-unknown-linux-gnu.tar.xz) = 058c1ebe58bb22e8ff791a74edb058e7494e2673dd1d91ffad646ec71cfdc240e934b44fbae6e58639143b33161d314224e7d1c7b2cc35677bf9eab901e130eb +SHA512 (rust-1.32.0-powerpc64-unknown-linux-gnu.tar.xz) = e4c70ab500feccb2ed67435857f584381be051ba7b2d70cea55b0c94b846e61ba10930a20ceceb67ec981daa5baa166fc6dea7c14ac9ac28270c30841d9c16a1 +SHA512 (rust-1.32.0-s390x-unknown-linux-gnu.tar.xz) = 4f32934472356d9b7e15abb0fa07be9eddccc7b9e0a1834bbee5ff279c6ece9174d942e2feed611f9b697613ee3b76f8a8ab68559b6d075e740aeab117223325 +SHA512 (rust-1.32.0-x86_64-unknown-linux-gnu.tar.xz) = 5c5def0c415b0f34e1e7476841a0bd3f91fe4bde8321c7b06b1cd2a3d10a3d676ed16a26561929ce39c3c2cbcf7a16960c5decca9e385afe8295da32b4fb7a17