diff --git a/.gitignore b/.gitignore index d39e79a..8e6f3fc 100644 --- a/.gitignore +++ b/.gitignore @@ -114,3 +114,11 @@ /rust-1.24.0-powerpc64-unknown-linux-gnu.tar.xz /rust-1.24.0-s390x-unknown-linux-gnu.tar.xz /rust-1.24.0-x86_64-unknown-linux-gnu.tar.xz +/rustc-1.26.0-src.tar.xz +/rust-1.25.0-aarch64-unknown-linux-gnu.tar.xz +/rust-1.25.0-armv7-unknown-linux-gnueabihf.tar.xz +/rust-1.25.0-i686-unknown-linux-gnu.tar.xz +/rust-1.25.0-powerpc64le-unknown-linux-gnu.tar.xz +/rust-1.25.0-powerpc64-unknown-linux-gnu.tar.xz +/rust-1.25.0-s390x-unknown-linux-gnu.tar.xz +/rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz diff --git a/0001-Allow-installing-rustfmt-without-config.extended.patch b/0001-Allow-installing-rustfmt-without-config.extended.patch deleted file mode 100644 index 531761f..0000000 --- a/0001-Allow-installing-rustfmt-without-config.extended.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 86f7d8939d19d42e21d4e794e648f0aef14eeec9 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Thu, 22 Mar 2018 18:31:32 -0700 -Subject: [PATCH] Allow installing rustfmt without config.extended - -This assertion was preventing `./x.py install rustfmt` if attempted -without an "extended" build configuration, but it actually builds and -installs just fine. ---- - src/bootstrap/dist.rs | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs -index eca06eac7f30..142296b20958 100644 ---- a/src/bootstrap/dist.rs -+++ b/src/bootstrap/dist.rs -@@ -1186,7 +1186,6 @@ impl Step for Rustfmt { - let build = builder.build; - let stage = self.stage; - let target = self.target; -- assert!(build.config.extended); - - println!("Dist Rustfmt stage{} ({})", stage, target); - let src = build.src.join("src/tools/rustfmt"); --- -2.14.3 - diff --git a/0001-Ignore-stack-probes-tests-on-powerpc-s390x-too.patch b/0001-Ignore-stack-probes-tests-on-powerpc-s390x-too.patch deleted file mode 100644 index c6d83cc..0000000 --- a/0001-Ignore-stack-probes-tests-on-powerpc-s390x-too.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b404ec4b4880db7f6aea23ebf778869dfd6ecf99 Mon Sep 17 00:00:00 2001 -From: Josh Stone -Date: Thu, 29 Mar 2018 10:25:32 -0700 -Subject: [PATCH] Ignore stack-probes tests on powerpc/s390x too - -We only support stack probes on x86 and x86_64. -Other arches are already ignored. ---- - src/test/codegen/stack-probes.rs | 1 + - src/test/run-pass/stack-probes-lto.rs | 2 ++ - src/test/run-pass/stack-probes.rs | 2 ++ - 3 files changed, 5 insertions(+) - -diff --git a/src/test/codegen/stack-probes.rs b/src/test/codegen/stack-probes.rs -index af400ff3bcbd..51ebc42a0dd6 100644 ---- a/src/test/codegen/stack-probes.rs -+++ b/src/test/codegen/stack-probes.rs -@@ -11,6 +11,7 @@ - // ignore-arm - // ignore-aarch64 - // ignore-powerpc -+// ignore-s390x - // ignore-aarch64 - // ignore-wasm - // ignore-emscripten -diff --git a/src/test/run-pass/stack-probes-lto.rs b/src/test/run-pass/stack-probes-lto.rs -index e7fa3bc0a75c..d1cb75909c15 100644 ---- a/src/test/run-pass/stack-probes-lto.rs -+++ b/src/test/run-pass/stack-probes-lto.rs -@@ -10,6 +10,8 @@ - - // ignore-arm - // ignore-aarch64 -+// ignore-powerpc -+// ignore-s390x - // ignore-wasm - // ignore-cloudabi no processes - // ignore-emscripten no processes -diff --git a/src/test/run-pass/stack-probes.rs b/src/test/run-pass/stack-probes.rs -index 67b3962ee5fb..78c5782be383 100644 ---- a/src/test/run-pass/stack-probes.rs -+++ b/src/test/run-pass/stack-probes.rs -@@ -10,6 +10,8 @@ - - // ignore-arm - // ignore-aarch64 -+// ignore-powerpc -+// ignore-s390x - // ignore-wasm - // ignore-cloudabi no processes - // ignore-emscripten no processes --- -2.14.3 - diff --git a/pull-49959.patch b/pull-49959.patch new file mode 100644 index 0000000..b281425 --- /dev/null +++ b/pull-49959.patch @@ -0,0 +1,195 @@ +From cc2906cb26304301709557a88ac4a3334b88616b Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Fri, 13 Apr 2018 16:52:54 -0700 +Subject: [PATCH 1/3] rustbuild: allow building tools with debuginfo + +Debugging information for the extended tools is currently disabled for +concerns about the size. This patch adds `--enable-debuginfo-tools` to +let one opt into having that debuginfo. + +This is useful for debugging the tools in distro packages. We always +strip debuginfo into separate packages anyway, so the extra size is not +a concern in regular use. +--- + CONTRIBUTING.md | 1 + + config.toml.example | 4 ++++ + src/bootstrap/builder.rs | 12 ++++++++---- + src/bootstrap/config.rs | 5 +++++ + src/bootstrap/configure.py | 1 + + 5 files changed, 19 insertions(+), 4 deletions(-) + +diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md +index 7a62405f0596..73d4188d6954 100644 +--- a/CONTRIBUTING.md ++++ b/CONTRIBUTING.md +@@ -121,6 +121,7 @@ configuration used in the build process. Some options to note: + #### `[rust]`: + - `debuginfo = true` - Build a compiler with debuginfo. Makes building rustc slower, but then you can use a debugger to debug `rustc`. + - `debuginfo-lines = true` - An alternative to `debuginfo = true` that doesn't let you use a debugger, but doesn't make building rustc slower and still gives you line numbers in backtraces. ++- `debuginfo-tools = true` - Build the extended tools with debuginfo. + - `debug-assertions = true` - Makes the log output of `debug!` work. + - `optimize = false` - Disable optimizations to speed up compilation of stage1 rust, but makes the stage1 compiler x100 slower. + +diff --git a/config.toml.example b/config.toml.example +index 68bc7dfe720f..bd18a604a9c8 100644 +--- a/config.toml.example ++++ b/config.toml.example +@@ -262,6 +262,10 @@ + # standard library. + #debuginfo-only-std = false + ++# Enable debuginfo for the extended tools: cargo, rls, rustfmt ++# Adding debuginfo increases their sizes by a factor of 3-4. ++#debuginfo-tools = false ++ + # Whether or not jemalloc is built and enabled + #use-jemalloc = true + +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index 7ff64af91967..ae19c66d6070 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -622,10 +622,14 @@ impl<'a> Builder<'a> { + cargo.env("RUSTDOC_LIBDIR", self.rustc_libdir(self.compiler(2, self.build.build))); + } + +- if mode != Mode::Tool { +- // Tools don't get debuginfo right now, e.g. cargo and rls don't +- // get compiled with debuginfo. +- // Adding debuginfo increases their sizes by a factor of 3-4. ++ if mode == Mode::Tool { ++ // Tools like cargo and rls don't get debuginfo by default right now, but this can be ++ // enabled in the config. Adding debuginfo increases their sizes by a factor of 3-4. ++ if self.config.rust_debuginfo_tools { ++ cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()); ++ cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()); ++ } ++ } else { + cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()); + cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()); + cargo.env("RUSTC_FORCE_UNSTABLE", "1"); +diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs +index 239316d45c49..95d138b9fab2 100644 +--- a/src/bootstrap/config.rs ++++ b/src/bootstrap/config.rs +@@ -94,6 +94,7 @@ pub struct Config { + pub rust_debuginfo: bool, + pub rust_debuginfo_lines: bool, + pub rust_debuginfo_only_std: bool, ++ pub rust_debuginfo_tools: bool, + pub rust_rpath: bool, + pub rustc_parallel_queries: bool, + pub rustc_default_linker: Option, +@@ -282,6 +283,7 @@ struct Rust { + debuginfo: Option, + debuginfo_lines: Option, + debuginfo_only_std: Option, ++ debuginfo_tools: Option, + experimental_parallel_queries: Option, + debug_jemalloc: Option, + use_jemalloc: Option, +@@ -462,6 +464,7 @@ impl Config { + let mut llvm_assertions = None; + let mut debuginfo_lines = None; + let mut debuginfo_only_std = None; ++ let mut debuginfo_tools = None; + let mut debug = None; + let mut debug_jemalloc = None; + let mut debuginfo = None; +@@ -499,6 +502,7 @@ impl Config { + debuginfo = rust.debuginfo; + debuginfo_lines = rust.debuginfo_lines; + debuginfo_only_std = rust.debuginfo_only_std; ++ debuginfo_tools = rust.debuginfo_tools; + optimize = rust.optimize; + ignore_git = rust.ignore_git; + debug_jemalloc = rust.debug_jemalloc; +@@ -582,6 +586,7 @@ impl Config { + }; + config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default); + config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default); ++ config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default); + + let default = debug == Some(true); + config.debug_jemalloc = debug_jemalloc.unwrap_or(default); +diff --git a/src/bootstrap/configure.py b/src/bootstrap/configure.py +index b06968d313ba..a0123da6d8ff 100755 +--- a/src/bootstrap/configure.py ++++ b/src/bootstrap/configure.py +@@ -79,6 +79,7 @@ o("llvm-release-debuginfo", "llvm.release-debuginfo", "build LLVM with debugger + o("debuginfo", "rust.debuginfo", "build with debugger metadata") + o("debuginfo-lines", "rust.debuginfo-lines", "build with line number debugger metadata") + o("debuginfo-only-std", "rust.debuginfo-only-std", "build only libstd with debugging information") ++o("debuginfo-tools", "rust.debuginfo-tools", "build extended tools with debugging information") + o("debug-jemalloc", "rust.debug-jemalloc", "build jemalloc with --enable-debug --enable-fill") + v("save-toolstates", "rust.save-toolstates", "save build and test status of external tools into this file") + +-- +2.17.0 + + +From bc7403d067b3e2a154df1ef088377cb2a75f429c Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Fri, 13 Apr 2018 21:57:53 -0700 +Subject: [PATCH 2/3] Avoid specific claims about debuginfo size + +--- + config.toml.example | 2 +- + src/bootstrap/builder.rs | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/config.toml.example b/config.toml.example +index bd18a604a9c8..effe00843810 100644 +--- a/config.toml.example ++++ b/config.toml.example +@@ -263,7 +263,7 @@ + #debuginfo-only-std = false + + # Enable debuginfo for the extended tools: cargo, rls, rustfmt +-# Adding debuginfo increases their sizes by a factor of 3-4. ++# Adding debuginfo makes them several times larger. + #debuginfo-tools = false + + # Whether or not jemalloc is built and enabled +diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs +index ae19c66d6070..6874efa5a4c7 100644 +--- a/src/bootstrap/builder.rs ++++ b/src/bootstrap/builder.rs +@@ -624,7 +624,7 @@ impl<'a> Builder<'a> { + + if mode == Mode::Tool { + // Tools like cargo and rls don't get debuginfo by default right now, but this can be +- // enabled in the config. Adding debuginfo increases their sizes by a factor of 3-4. ++ // enabled in the config. Adding debuginfo makes them several times larger. + if self.config.rust_debuginfo_tools { + cargo.env("RUSTC_DEBUGINFO", self.config.rust_debuginfo.to_string()); + cargo.env("RUSTC_DEBUGINFO_LINES", self.config.rust_debuginfo_lines.to_string()); +-- +2.17.0 + + +From 93734e9c46e30acc9a51f19c56511ce8516b6855 Mon Sep 17 00:00:00 2001 +From: Josh Stone +Date: Fri, 13 Apr 2018 21:58:21 -0700 +Subject: [PATCH 3/3] Make debuginfo-tools always default false + +--- + src/bootstrap/config.rs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs +index 95d138b9fab2..1b4b2c5fb2a5 100644 +--- a/src/bootstrap/config.rs ++++ b/src/bootstrap/config.rs +@@ -586,7 +586,7 @@ impl Config { + }; + config.rust_debuginfo_lines = debuginfo_lines.unwrap_or(default); + config.rust_debuginfo_only_std = debuginfo_only_std.unwrap_or(default); +- config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(default); ++ config.rust_debuginfo_tools = debuginfo_tools.unwrap_or(false); + + let default = debug == Some(true); + config.debug_jemalloc = debug_jemalloc.unwrap_or(default); +-- +2.17.0 + diff --git a/rust.spec b/rust.spec index d774b1b..9bd64c4 100644 --- a/rust.spec +++ b/rust.spec @@ -8,10 +8,10 @@ # To bootstrap from scratch, set the channel and date from src/stage0.txt # e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24 # or nightly wants some beta-YYYY-MM-DD -%global bootstrap_rust 1.24.0 -%global bootstrap_cargo 0.25.0 +%global bootstrap_rust 1.25.0 +%global bootstrap_cargo 0.26.0 %global bootstrap_channel %{bootstrap_rust} -%global bootstrap_date 2018-02-15 +%global bootstrap_date 2018-03-29 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -27,6 +27,13 @@ %bcond_with bundled_llvm %endif +# Some targets don't have libgit2 +%if 0%{?rhel} && !0%{?epel} +%bcond_without bundled_libgit2 +%else +%bcond_with bundled_libgit2 +%endif + # LLDB only works on some architectures %ifarch %{arm} aarch64 %{ix86} x86_64 # LLDB isn't available everywhere... @@ -39,29 +46,31 @@ %bcond_with lldb %endif - +# Some sub-packages are versioned independently of the rust compiler and runtime itself. +%global rustc_version 1.26.0 +%global cargo_version %{rustc_version} +%global rustfmt_version 0.4.1 +%global rls_version 0.126.0 Name: rust -Version: 1.25.0 +Version: %{rustc_version} Release: 1%{?dist} Summary: The Rust Programming Language -License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) +License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) URL: https://www.rust-lang.org ExclusiveArch: %{rust_arches} %if "%{channel}" == "stable" -%global rustc_package rustc-%{version}-src +%global rustc_package rustc-%{rustc_version}-src %else %global rustc_package rustc-%{channel}-src %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz -# https://github.com/rust-lang/rust/pull/49290 -Patch1: 0001-Allow-installing-rustfmt-without-config.extended.patch - -# https://github.com/rust-lang/rust/pull/49484 -Patch2: 0001-Ignore-stack-probes-tests-on-powerpc-s390x-too.patch +# rustbuild: allow building tools with debuginfo +# https://github.com/rust-lang/rust/pull/49959 +Patch1: pull-49959.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) @@ -107,10 +116,10 @@ Provides: bundled(%{name}-bootstrap) = %{bootstrap_rust} %else BuildRequires: cargo >= %{bootstrap_cargo} %if 0%{?fedora} >= 27 -BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{version}) +BuildRequires: (%{name} >= %{bootstrap_rust} with %{name} <= %{rustc_version}) %else BuildRequires: %{name} >= %{bootstrap_rust} -BuildConflicts: %{name} > %{version} +BuildConflicts: %{name} > %{rustc_version} %endif %global local_rust_root %{_prefix} %endif @@ -119,8 +128,12 @@ BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ncurses-devel -BuildRequires: zlib-devel BuildRequires: curl +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(liblzma) +BuildRequires: pkgconfig(libssh2) +BuildRequires: pkgconfig(openssl) +BuildRequires: pkgconfig(zlib) %if 0%{?rhel} && 0%{?rhel} <= 7 %global python python2 @@ -157,17 +170,16 @@ BuildRequires: procps-ng BuildRequires: gdb # TODO: work on unbundling these! -Provides: bundled(hoedown) = 3.0.7 Provides: bundled(jquery) = 2.1.4 Provides: bundled(libbacktrace) = 6.1.0 Provides: bundled(miniz) = 1.16~beta+r1 # Virtual provides for folks who attempt "dnf install rustc" -Provides: rustc = %{version}-%{release} -Provides: rustc%{?_isa} = %{version}-%{release} +Provides: rustc = %{rustc_version}-%{release} +Provides: rustc%{?_isa} = %{rustc_version}-%{release} # Always require our exact standard library -Requires: %{name}-std-static%{?_isa} = %{version}-%{release} +Requires: %{name}-std-static%{?_isa} = %{rustc_version}-%{release} # The C compiler is needed at runtime just for linking. Someday rustc might # invoke the linker directly, and then we'll only need binutils. @@ -175,7 +187,7 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release} Requires: /usr/bin/cc # ALL Rust libraries are private, because they don't keep an ABI. -%global _privatelibs lib.*-[[:xdigit:]]*[.]so.* +%global _privatelibs lib(.*-[[:xdigit:]]*|rustc.*)[.]so.* %global __provides_exclude ^(%{_privatelibs})$ %global __requires_exclude ^(%{_privatelibs})$ %global __provides_exclude_from ^%{_docdir}/.*$ @@ -228,7 +240,7 @@ This package includes the common functionality for %{name}-gdb and %{name}-lldb. Summary: GDB pretty printers for Rust BuildArch: noarch Requires: gdb -Requires: %{name}-debugger-common = %{version}-%{release} +Requires: %{name}-debugger-common = %{rustc_version}-%{release} %description gdb This package includes the rust-gdb script, which allows easier debugging of Rust @@ -245,7 +257,7 @@ Summary: LLDB pretty printers for Rust Requires: lldb Requires: python-lldb -Requires: %{name}-debugger-common = %{version}-%{release} +Requires: %{name}-debugger-common = %{rustc_version}-%{release} %description lldb This package includes the rust-lldb script, which allows easier debugging of Rust @@ -266,20 +278,68 @@ This package includes HTML documentation for the Rust programming language and its standard library. +%package -n cargo +Summary: Rust's package manager and build tool +Version: %{cargo_version} +%if %with bundled_libgit2 +Provides: bundled(libgit2) = 0.26.0 +%else +BuildRequires: pkgconfig(libgit2) >= 0.24 +%endif +# For tests: +BuildRequires: git +# Cargo is not much use without Rust +Requires: rust + +%description -n cargo +Cargo is a tool that allows Rust projects to declare their various dependencies +and ensure that you'll always get a repeatable build. + + +%package -n cargo-doc +Summary: Documentation for Cargo +Version: %{cargo_version} +BuildArch: noarch +# Cargo no longer builds its own documentation +# https://github.com/rust-lang/cargo/pull/4904 +Requires: rust-doc + +%description -n cargo-doc +This package includes HTML documentation for Cargo. + + %package -n rustfmt-preview Summary: Tool to find and fix Rust formatting issues -Version: 0.3.8 +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 = %{version} +Provides: rustfmt = %{rustfmt_version} %description -n rustfmt-preview A tool for formatting Rust code according to style guidelines. +%package -n rls-preview +Summary: Rust Language Server for IDE integration +Version: %{rls_version} +Provides: rls = %{rls_version} +%if %with bundled_libgit2 +Provides: bundled(libgit2) = 0.26.0 +%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 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 src Summary: Sources for the Rust standard library BuildArch: noarch @@ -289,6 +349,16 @@ This package includes source files for the Rust standard library. It may be useful as a reference for code completion tools in various editors. +%package analysis +Summary: Compiler analysis data for the Rust standard library +Requires: rust-std-static%{?_isa} = %{rustc_version}-%{release} + +%description 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. + + %prep %ifarch %{bootstrap_arches} @@ -301,8 +371,7 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} -%patch1 -p1 -b .dist-rustfmt -%patch2 -p1 -b .ignore-ibm +%patch1 -p1 %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure @@ -319,7 +388,6 @@ rm -rf src/llvm/ rm -rf src/llvm-emscripten/ # extract bundled licenses for packaging -cp src/rt/hoedown/LICENSE src/rt/hoedown/LICENSE-hoedown sed -e '/*\//q' src/libbacktrace/backtrace.h \ >src/libbacktrace/LICENSE-libbacktrace @@ -350,6 +418,11 @@ find src/vendor -name .cargo-checksum.json \ %build +%if %without bundled_libgit2 +# convince libgit2-sys to use the distro libgit2 +export LIBGIT2_SYS_USE_PKG_CONFIG=1 +%endif + %{?cmake_path:export PATH=%{cmake_path}:$PATH} %{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} @@ -362,12 +435,12 @@ find src/vendor -name .cargo-checksum.json \ %ifarch %{arm} # full debuginfo is exhausting memory; just do libstd for now # https://github.com/rust-lang/rust/issues/45854 -#define enable_debuginfo --enable-debuginfo --enable-debuginfo-only-std --disable-debuginfo-lines +#define enable_debuginfo --enable-debuginfo --enable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines # but f26 rpm doesn't like having some binaries with and without debuginfo, so disable it all :( -%define enable_debuginfo --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-lines +%define enable_debuginfo --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines %global debug_package %{nil} %else -%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-lines +%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines %endif %configure --disable-option-checking \ @@ -379,11 +452,11 @@ find src/vendor -name .cargo-checksum.json \ --disable-jemalloc \ --disable-rpath \ %{enable_debuginfo} \ + --enable-extended \ --enable-vendor \ --release-channel=%{channel} %{python} ./x.py build -%{python} ./x.py build src/tools/rustfmt %{python} ./x.py doc @@ -393,9 +466,6 @@ find src/vendor -name .cargo-checksum.json \ %{?rustflags:export RUSTFLAGS="%{rustflags}"} DESTDIR=%{buildroot} %{python} ./x.py install -DESTDIR=%{buildroot} %{python} ./x.py install rustfmt -DESTDIR=%{buildroot} %{python} ./x.py install src - # Make sure the shared libraries are in the proper libdir %if "%{_libdir}" != "%{common_libdir}" @@ -430,12 +500,38 @@ rm -f %{buildroot}%{_docdir}/%{name}/README.md rm -f %{buildroot}%{_docdir}/%{name}/COPYRIGHT rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-APACHE rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-MIT +rm -f %{buildroot}%{_docdir}/%{name}/LICENSE-THIRD-PARTY rm -f %{buildroot}%{_docdir}/%{name}/*.old # Sanitize the HTML documentation find %{buildroot}%{_docdir}/%{name}/html -empty -delete find %{buildroot}%{_docdir}/%{name}/html -type f -exec chmod -x '{}' '+' +# Create the path for crate-devel packages +mkdir -p %{buildroot}%{_datadir}/cargo/registry + +# Cargo no longer builds its own documentation +# https://github.com/rust-lang/cargo/pull/4904 +mkdir -p %{buildroot}%{_docdir}/cargo/html +cat < %{buildroot}%{_docdir}/cargo/html/index.html + + + + + + + cargo-doc redirection + + + Cargo documentation has been moved to the rust-doc package. + If you are not redirected automatically, please follow this + link. + + +EOF + %if %without lldb rm -f %{buildroot}%{_bindir}/rust-lldb rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* @@ -449,7 +545,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* # The results are not stable on koji, so mask errors and just log it. %{python} ./x.py test --no-fail-fast || : -%{python} ./x.py test --no-fail-fast src/tools/rustfmt || : +%{python} ./x.py test --no-fail-fast cargo || : +%{python} ./x.py test --no-fail-fast rls || : +%{python} ./x.py test --no-fail-fast rustfmt || : %ldconfig_scriptlets @@ -458,7 +556,6 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %files %license COPYRIGHT LICENSE-APACHE LICENSE-MIT %license src/libbacktrace/LICENSE-libbacktrace -%license src/rt/hoedown/LICENSE-hoedown %doc README.md %{_bindir}/rustc %{_bindir}/rustdoc @@ -510,6 +607,21 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %license %{_docdir}/%{name}/html/*.txt +%files -n cargo +%license src/tools/cargo/LICENSE-APACHE src/tools/cargo/LICENSE-MIT src/tools/cargo/LICENSE-THIRD-PARTY +%doc src/tools/cargo/README.md +%{_bindir}/cargo +%{_mandir}/man1/cargo*.1* +%{_sysconfdir}/bash_completion.d/cargo +%{_datadir}/zsh/site-functions/_cargo +%dir %{_datadir}/cargo +%dir %{_datadir}/cargo/registry + + +%files -n cargo-doc +%{_docdir}/cargo/html + + %files -n rustfmt-preview %{_bindir}/rustfmt %{_bindir}/cargo-fmt @@ -517,12 +629,31 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %license src/tools/rustfmt/LICENSE-{APACHE,MIT} +%files -n rls-preview +%{_bindir}/rls +%doc src/tools/rls/{README.md,COPYRIGHT,debugging.md} +%license src/tools/rls/LICENSE-{APACHE,MIT} + + %files src %dir %{rustlibdir} %{rustlibdir}/src +%files analysis +%{rustlibdir}/%{rust_triple}/analysis/ + + %changelog +* Thu May 10 2018 Josh Stone - 1.26.0-1 +- Update to 1.26.0. + +* Mon Apr 16 2018 Dan Callaghan - 1.25.0-3 +- Add cargo, rls, and analysis + +* Tue Apr 10 2018 Josh Stone - 1.25.0-2 +- Filter codegen-backends from Provides too. + * Thu Mar 29 2018 Josh Stone - 1.25.0-1 - Update to 1.25.0. diff --git a/sources b/sources index f314e88..122a20b 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.25.0-src.tar.xz) = 45baaaa47d8b6433f61b1a6f2637d8f4fe013b534a8a94365025dfcf786815c95111b9bd3beb2544ba8587fb4c8b38431765c4d68bc9c19285da4ccf7c7eeda2 +SHA512 (rustc-1.26.0-src.tar.xz) = 563b910ecf4b2a0d798a1201177f733333e64efad49e5aceec5adc66a8c6903df391c9afc0fdd8284348c08082e0c4de1e5cb68efe6797594de43ca93e4ad7a2 diff --git a/sources-bootstrap b/sources-bootstrap index 9c4838f..353015a 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.25.0-src.tar.xz) = 45baaaa47d8b6433f61b1a6f2637d8f4fe013b534a8a94365025dfcf786815c95111b9bd3beb2544ba8587fb4c8b38431765c4d68bc9c19285da4ccf7c7eeda2 -SHA512 (rust-1.24.0-aarch64-unknown-linux-gnu.tar.xz) = c8be9bd2929d5a9ac96524bdbbc3b137c703a54d6bdf19a8abee69fcb2cf7d11693a79c520571da021fb0c059de5f759f6c0336d4e42f278584c0ec3783983ce -SHA512 (rust-1.24.0-armv7-unknown-linux-gnueabihf.tar.xz) = 57383893b1015377857509f9d485629fc181408089c577b725e52577e5cc44a69f557c8311324473008d879e7917105077045591e72c7d09b4b57bcf020fd39d -SHA512 (rust-1.24.0-i686-unknown-linux-gnu.tar.xz) = d7e4ae046bea9c8fd5709fc316965bd0422afc1b7cf2b35bebc8899524bb5e12c1e685dc395e96f43957ab9b6ab3039fa0c0306751b6f1771bd6550d559e66a8 -SHA512 (rust-1.24.0-powerpc64le-unknown-linux-gnu.tar.xz) = f1a6ad1b66ce4e928a7f7aed8476fedc9ef93ef8520aa34781a5e7e8e2ab2ac3b13fc325d37bd30bc9cc3dc709b2286436b6c68eae1748c434860b51643afa1b -SHA512 (rust-1.24.0-powerpc64-unknown-linux-gnu.tar.xz) = 0a2fbe4017c2c69e5fc2b35591f40fa45cf03be93ed0c03c56fb10d76dd78f7a86c40552afb60e360aa05447faf278e2988a9a0056a21950ba05daad1bf070a1 -SHA512 (rust-1.24.0-s390x-unknown-linux-gnu.tar.xz) = 252342cad4d41f7f972aec7a96e2ed0c8044af9a8c02bfdb36e47b591fad33df4234c141b7532e62f33d7f57af2191cbfb88606e2c59e927b08e41d9f0f8d2a5 -SHA512 (rust-1.24.0-x86_64-unknown-linux-gnu.tar.xz) = 876e5d66b5531a5dd1c42b8b2f073bc463a6dead348d5857f43b0047a4f6b101d26c7b29d6bbe1c1ea64cb6ca8c36d0159ff4dc75418e4216e7e585b169276ff +SHA512 (rustc-1.26.0-src.tar.xz) = 563b910ecf4b2a0d798a1201177f733333e64efad49e5aceec5adc66a8c6903df391c9afc0fdd8284348c08082e0c4de1e5cb68efe6797594de43ca93e4ad7a2 +SHA512 (rust-1.25.0-aarch64-unknown-linux-gnu.tar.xz) = 404ecd4dc1e49fba41d7ade947877f621aa762e43eb5a8f604823fe297e8023f095cd449610240ed235723baaac96064eb38445794e27708edcdbca998d939e3 +SHA512 (rust-1.25.0-armv7-unknown-linux-gnueabihf.tar.xz) = 63bf72c6011f9ccb052496d09d1ecc37d5c2ec8260ade2ef9b7bca6fb0dc8b77f5d27eb77c1136cef6f986f2fec90577399b0f9c57e757838904ab4030f93f6d +SHA512 (rust-1.25.0-i686-unknown-linux-gnu.tar.xz) = 75ad5cb5e00fabc24aaa46236cc6f2193a7543fd0944c0717c11a56d9c420d20463ad683558d86f5d42abacfb89d15f9cabf404c912a5e24a28e6716c8003e8f +SHA512 (rust-1.25.0-powerpc64le-unknown-linux-gnu.tar.xz) = f4a37b82a8cd2a9a50d6cc7db0b09513829388e72ab13e8b6d633a166c9f15fd3692d06131e8546636e9e6a8b7dae93345d063f88d64ab876da582d7156ebdee +SHA512 (rust-1.25.0-powerpc64-unknown-linux-gnu.tar.xz) = 853c7a009c2b5a80d625bad024faa92193041461213761a9d4bdf33d5bb958c4f81b966cb8af1a5abbde6d393650f74c6a18a5ba9f709bce04d0da4f0e15ee7a +SHA512 (rust-1.25.0-s390x-unknown-linux-gnu.tar.xz) = 864919cf590377f47c6fb11dec3f0b9999ca5db3c002d3f253efbb7ad268e5f0a7d6f590411fed14c2068f08fb100ae76c33a5165f689d98b0798e227cf22632 +SHA512 (rust-1.25.0-x86_64-unknown-linux-gnu.tar.xz) = aea93ff64f620a1dd6b48d07ec3dcbc126b2f5c17b4697c096ec8cd02a3c7dfec7ae7d5df70a55eceb372897ad12f3d01c67d5aaea0167a80270931c61323f78