From 457e0516540f4ec71788da067286beb82a4e6a20 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 17 Mar 2017 11:54:30 -0700 Subject: [PATCH 1/7] Limit rust-lldb arches Using "BuildArch: noarch" and "ExclusiveArch: %arches noarch" per the guidelines for runtime dependencies here: https://fedoraproject.org/wiki/Packaging:Guidelines#Noarch_with_unported_dependencies --- rust.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 1cab21c..9009765 100644 --- a/rust.spec +++ b/rust.spec @@ -43,7 +43,7 @@ Name: rust Version: 1.16.0 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -208,6 +208,9 @@ programs. %package lldb Summary: LLDB pretty printers for Rust BuildArch: noarch + +# LLDB is only available on some architectures +ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 noarch Requires: lldb %description lldb @@ -409,6 +412,9 @@ make check || : %changelog +* Fri Mar 17 2017 Josh Stone - 1.16.0-2 +- Limit rust-lldb arches + * Thu Mar 16 2017 Josh Stone - 1.16.0-1 - Update to 1.16.0. - Use rustbuild instead of the old makefiles. From 3c0f5fef47f98585ea19a405a6020fd5883d824b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 17 Mar 2017 12:08:09 -0700 Subject: [PATCH 2/7] Drop rust-llvm ExclusiveArch: noarch This seemed to make the whole rust.spec attempt a noarch build! --- rust.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 9009765..a14ba78 100644 --- a/rust.spec +++ b/rust.spec @@ -210,7 +210,7 @@ Summary: LLDB pretty printers for Rust BuildArch: noarch # LLDB is only available on some architectures -ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 noarch +ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 Requires: lldb %description lldb From c34ccf6a5e1b18320679b85da4c70362201c97ea Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 17 Mar 2017 13:29:07 -0700 Subject: [PATCH 3/7] rust-lldb requires python-lldb --- rust.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/rust.spec b/rust.spec index a14ba78..1d23353 100644 --- a/rust.spec +++ b/rust.spec @@ -212,6 +212,7 @@ BuildArch: noarch # LLDB is only available on some architectures ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 Requires: lldb +Requires: python-lldb %description lldb This package includes the rust-lldb script, which allows easier debugging of Rust From 9245da2d8afb9f4be37b7d56104e6b1d0a7d4c40 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 20 Mar 2017 12:09:48 -0700 Subject: [PATCH 4/7] Make rust-lldb arch-specific to deal with lldb deps --- rust.spec | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/rust.spec b/rust.spec index 1d23353..85fa005 100644 --- a/rust.spec +++ b/rust.spec @@ -32,18 +32,23 @@ %bcond_with bundled_llvm %endif +# LLDB only works on some architectures +%ifarch %{arm} aarch64 %{ix86} x86_64 # LLDB isn't available everywhere... -%if 0%{?rhel} -%bcond_with lldb -%else +%if !0%{?rhel} %bcond_without lldb +%else +%bcond_with lldb +%endif +%else +%bcond_with lldb %endif Name: rust Version: 1.16.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -207,10 +212,10 @@ programs. %package lldb Summary: LLDB pretty printers for Rust -BuildArch: noarch -# LLDB is only available on some architectures -ExclusiveArch: %{arm} aarch64 %{ix86} x86_64 +# It could be noarch, but lldb has limited availability +#BuildArch: noarch + Requires: lldb Requires: python-lldb @@ -413,6 +418,9 @@ make check || : %changelog +* Mon Mar 20 2017 Josh Stone - 1.16.0-3 +- Make rust-lldb arch-specific to deal with lldb deps + * Fri Mar 17 2017 Josh Stone - 1.16.0-2 - Limit rust-lldb arches From 2e9a258bc16bcc259e5d078183753aa9d4e2de34 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 22 Mar 2017 13:18:56 -0700 Subject: [PATCH 5/7] cmake is only needed for bundled llvm --- rust.spec | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rust.spec b/rust.spec index 85fa005..fc1f50a 100644 --- a/rust.spec +++ b/rust.spec @@ -120,13 +120,12 @@ BuildRequires: zlib-devel BuildRequires: python2 BuildRequires: curl +%if %with bundled_llvm %if 0%{?epel} BuildRequires: cmake3 %else BuildRequires: cmake %endif - -%if %with bundled_llvm Provides: bundled(llvm) = 3.9 %else BuildRequires: llvm-devel >= 3.7 @@ -268,7 +267,7 @@ sed -i.jemalloc -e '1i // ignore-test jemalloc is disabled' \ src/test/compile-fail/allocator-rust-dylib-is-jemalloc.rs \ src/test/run-pass/allocator-default.rs -%if 0%{?epel} +%if %{with bundled_llvm} && 0%{?epel} mkdir -p cmake-bin ln -s /usr/bin/cmake3 cmake-bin/cmake %global cmake_path $PWD/cmake-bin From 2453b710d43f1f9cacc53b4e9caa2da2f9c888ac Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 31 Mar 2017 11:00:59 -0700 Subject: [PATCH 6/7] Use llvm3.9 to fix rawhide FTBFS with llvm-4 However, plugins currently don't work well with dynamic LLVM in non-standard library paths: https://github.com/rust-lang/rust/issues/40717 --- rust.spec | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/rust.spec b/rust.spec index fc1f50a..a3ac93e 100644 --- a/rust.spec +++ b/rust.spec @@ -128,13 +128,20 @@ BuildRequires: cmake %endif Provides: bundled(llvm) = 3.9 %else -BuildRequires: llvm-devel >= 3.7 +%if 0%{?fedora} >= 27 +%global llvm llvm3.9 +%global llvm_root %{_libdir}/%{llvm} +%else +%global llvm llvm +%global llvm_root %{_prefix} +%endif +BuildRequires: %{llvm}-devel >= 3.7 %if %with llvm_static -BuildRequires: llvm-static +BuildRequires: %{llvm}-static BuildRequires: libffi-devel %else # Make sure llvm-config doesn't see it. -BuildConflicts: llvm-static +BuildConflicts: %{llvm}-static %endif %endif @@ -182,6 +189,14 @@ Requires: rust-rpm-macros %global _find_debuginfo_opts -g %undefine _include_minidebuginfo +# Use hardening ldflags. +%global rustflags -Clink-arg=-Wl,-z,relro,-z,now + +%if %{without bundled_llvm} && "%{llvm_root}" != "%{_prefix}" +# https://github.com/rust-lang/rust/issues/40717 +%global rustflags %{rustflags} -Clink-arg=-L%{llvm_root}/lib +%endif + %description Rust is a systems programming language that runs blazingly fast, prevents segfaults, and guarantees thread safety. @@ -286,9 +301,6 @@ sed -i.ffi -e '$a #[link(name = "ffi")] extern {}' \ %build %{?cmake_path:export PATH=%{cmake_path}:$PATH} - -# Use hardening ldflags. -%global rustflags -Clink-arg=-Wl,-z,relro,-z,now export RUSTFLAGS="%{rustflags}" # We're going to override --libdir when configuring to get rustlib into a @@ -300,7 +312,7 @@ export RUSTFLAGS="%{rustflags}" --libdir=%{common_libdir} \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ --enable-local-rust --local-rust-root=%{local_rust_root} \ - %{!?with_bundled_llvm: --llvm-root=%{_prefix} --disable-codegen-tests \ + %{!?with_bundled_llvm: --llvm-root=%{llvm_root} --disable-codegen-tests \ %{!?with_llvm_static: --enable-llvm-link-shared } } \ --disable-jemalloc \ --disable-rpath \ From 28e2de568a27b1a65fb27dd76a75d6473b6f82f2 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 27 Apr 2017 15:49:04 -0700 Subject: [PATCH 7/7] Update to 1.17.0. --- .gitignore | 8 +++++++ rust.spec | 60 ++++++++++++++++++++++++++++------------------- sources | 2 +- sources-bootstrap | 16 ++++++------- 4 files changed, 53 insertions(+), 33 deletions(-) diff --git a/.gitignore b/.gitignore index 9431ef3..f4b853f 100644 --- a/.gitignore +++ b/.gitignore @@ -41,3 +41,11 @@ /rust-1.15.1-s390x-unknown-linux-gnu.tar.gz /rust-1.15.1-x86_64-unknown-linux-gnu.tar.gz /rustc-1.16.0-src.tar.gz +/rustc-1.17.0-src.tar.gz +/rust-1.16.0-aarch64-unknown-linux-gnu.tar.gz +/rust-1.16.0-armv7-unknown-linux-gnueabihf.tar.gz +/rust-1.16.0-i686-unknown-linux-gnu.tar.gz +/rust-1.16.0-powerpc64le-unknown-linux-gnu.tar.gz +/rust-1.16.0-powerpc64-unknown-linux-gnu.tar.gz +/rust-1.16.0-s390x-unknown-linux-gnu.tar.gz +/rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz diff --git a/rust.spec b/rust.spec index a3ac93e..027dcff 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.15.1 -%global bootstrap_cargo 0.16.0 +%global bootstrap_rust 1.16.0 +%global bootstrap_cargo 0.17.0 %global bootstrap_channel %{bootstrap_rust} -%global bootstrap_date 2017-02-09 +%global bootstrap_date 2017-03-11 # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} @@ -26,7 +26,7 @@ # We can also choose to just use Rust's bundled LLVM, in case the system LLVM # is insufficient. Rust currently requires LLVM 3.7+. -%if 0%{?rhel} +%if 0%{?rhel} && !0%{?epel} %bcond_without bundled_llvm %else %bcond_with bundled_llvm @@ -47,8 +47,8 @@ Name: rust -Version: 1.16.0 -Release: 3%{?dist} +Version: 1.17.0 +Release: 1%{?dist} Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -128,7 +128,7 @@ BuildRequires: cmake %endif Provides: bundled(llvm) = 3.9 %else -%if 0%{?fedora} >= 27 +%if 0%{?fedora} >= 26 || 0%{?epel} %global llvm llvm3.9 %global llvm_root %{_libdir}/%{llvm} %else @@ -212,10 +212,19 @@ This package includes the standard libraries for building applications written in Rust. +%package debugger-common +Summary: Common debugger pretty printers for Rust +BuildArch: noarch + +%description debugger-common +This package includes the common functionality for %{name}-gdb and %{name}-lldb. + + %package gdb Summary: GDB pretty printers for Rust BuildArch: noarch Requires: gdb +Requires: %{name}-debugger-common = %{version}-%{release} %description gdb This package includes the rust-gdb script, which allows easier debugging of Rust @@ -232,6 +241,7 @@ Summary: LLDB pretty printers for Rust Requires: lldb Requires: python-lldb +Requires: %{name}-debugger-common = %{version}-%{release} %description lldb This package includes the rust-lldb script, which allows easier debugging of Rust @@ -320,14 +330,14 @@ export RUSTFLAGS="%{rustflags}" --enable-vendor \ --release-channel=%{channel} -%make_build %{!?rhel:-Onone} +./x.py dist %install %{?cmake_path:export PATH=%{cmake_path}:$PATH} export RUSTFLAGS="%{rustflags}" -%make_install +DESTDIR=%{buildroot} ./x.py dist --install # The libdir libraries are identical to those under rustlib/, and we need # the latter in place to support dynamic linking for compiler plugins, so we'll @@ -366,10 +376,8 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %{?cmake_path:export PATH=%{cmake_path}:$PATH} export RUSTFLAGS="%{rustflags}" -# Note, many of the tests execute in parallel threads, -# so it's better not to use a parallel make here. # The results are not stable on koji, so mask errors and just log it. -make check || : +./x.py test || : %post -p /sbin/ldconfig @@ -399,36 +407,40 @@ make check || : %{rustlibdir}/%{rust_triple}/lib/*.rlib -%files gdb -%{_bindir}/rust-gdb +%files debugger-common %dir %{rustlibdir} %dir %{rustlibdir}/etc %{rustlibdir}/etc/debugger_*.py* + + +%files gdb +%{_bindir}/rust-gdb %{rustlibdir}/etc/gdb_*.py* %if %with lldb %files lldb %{_bindir}/rust-lldb -%dir %{rustlibdir} -%dir %{rustlibdir}/etc -%{rustlibdir}/etc/debugger_*.py* %{rustlibdir}/etc/lldb_*.py* %endif %files doc +%docdir %{_docdir}/%{name} %dir %{_docdir}/%{name} -%license %{_docdir}/%{name}/html/FiraSans-LICENSE.txt -%license %{_docdir}/%{name}/html/Heuristica-LICENSE.txt -%license %{_docdir}/%{name}/html/LICENSE-APACHE.txt -%license %{_docdir}/%{name}/html/LICENSE-MIT.txt -%license %{_docdir}/%{name}/html/SourceCodePro-LICENSE.txt -%license %{_docdir}/%{name}/html/SourceSerifPro-LICENSE.txt -%doc %{_docdir}/%{name}/html/ +%dir %{_docdir}/%{name}/html +%{_docdir}/%{name}/html/*/ +%{_docdir}/%{name}/html/*.html +%{_docdir}/%{name}/html/*.css +%{_docdir}/%{name}/html/*.js +%{_docdir}/%{name}/html/*.woff +%license %{_docdir}/%{name}/html/*.txt %changelog +* Thu Apr 27 2017 Josh Stone - 1.17.0-1 +- Update to 1.17.0. + * Mon Mar 20 2017 Josh Stone - 1.16.0-3 - Make rust-lldb arch-specific to deal with lldb deps diff --git a/sources b/sources index 4651efd..6c6dc07 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (rustc-1.16.0-src.tar.gz) = 096b1b7406be9bc61161bb7cdd2061f2bc2174c161a31f4ed6ceecf7fc379f315fc2f7cb9f6c134ea4f8519c27bf6e5a3f712cf1e56d5785831d8c8374eb0ba5 +SHA512 (rustc-1.17.0-src.tar.gz) = 781799b29d83b4f0f433814bd818df034526db8e7f88c2df51d3b814eacafe8098d4bbe47ace951e1943325b3267b244007cf04f1f11083645b25aeacd40ebb6 diff --git a/sources-bootstrap b/sources-bootstrap index 003464d..9faa4b4 100644 --- a/sources-bootstrap +++ b/sources-bootstrap @@ -1,8 +1,8 @@ -SHA512 (rustc-1.16.0-src.tar.gz) = 096b1b7406be9bc61161bb7cdd2061f2bc2174c161a31f4ed6ceecf7fc379f315fc2f7cb9f6c134ea4f8519c27bf6e5a3f712cf1e56d5785831d8c8374eb0ba5 -SHA512 (rust-1.15.1-aarch64-unknown-linux-gnu.tar.gz) = 734103680ffdc175a5a5f3278a338f839031119aa16c2440bee18668e9dffefe470aab1d78d13377e2e0bbd726b2044402aac6369d66653bf1715f4638f61693 -SHA512 (rust-1.15.1-armv7-unknown-linux-gnueabihf.tar.gz) = d3606e416571e741857c834bc8080e985e3269856577d342eebd2ebef2b7c3e6c0d085c2d03059a880f2e32c835f6d69277953eeac86b897bd67f4fc8893d961 -SHA512 (rust-1.15.1-i686-unknown-linux-gnu.tar.gz) = 13d602842e7a2ef360c80d3ec84ecd5d6c742ea6dad642394a2a57b28554a7758905b37daaf2bcc549428c5f9383307270f8508e8685748b906fc2b9230bc4ad -SHA512 (rust-1.15.1-powerpc64le-unknown-linux-gnu.tar.gz) = e2608b6e9b34aa1c5f3de09a4785e4efe67170af06fa9f975b096d64e7debd012952e8c5c54d067ad0ed2704acb5cf1b62721e0e3f14a767fa61b1cd51f6bad2 -SHA512 (rust-1.15.1-powerpc64-unknown-linux-gnu.tar.gz) = 33552de33ad63330cb6e104f77105bf9b16eb20e43b8dee3303032b14e2540ac58b27f59e4ad5bb4c87f76a891c59e188a074db48e2e95ef4463d274d5721269 -SHA512 (rust-1.15.1-s390x-unknown-linux-gnu.tar.gz) = 083ad5b3cdaf5d7b56d4a6b02dbca8bbb9b0fb9a79a5d4799e5e6295a9a1248eef0ddb05df780f611b80537bd0372f47a2bbbe23063cd00c5eac616dd29eb043 -SHA512 (rust-1.15.1-x86_64-unknown-linux-gnu.tar.gz) = e089c455b1a7507aeed4652f05c0672c4e996e708c46f4405191f4b3a9d08403cab27f1a5a63f865d9a8f099f6ca980d2d2eef37aaa5e7e5bd751a3224e88b84 +SHA512 (rustc-1.17.0-src.tar.gz) = 781799b29d83b4f0f433814bd818df034526db8e7f88c2df51d3b814eacafe8098d4bbe47ace951e1943325b3267b244007cf04f1f11083645b25aeacd40ebb6 +SHA512 (rust-1.16.0-aarch64-unknown-linux-gnu.tar.gz) = 6f1cd5a9884c2a595c43fda7ce283035ebe901510615006163eba3dea757169ca76239b2c64b506d2c396debb01b4bfe8d7b1c5ea9138ba646bb19f5a55b33bc +SHA512 (rust-1.16.0-armv7-unknown-linux-gnueabihf.tar.gz) = 4aead298cec7c25c256da84be22790eb38e527f4478d180ccb7cffaf88736c4f7e762a30deba53e14feda049b1814ccdd91c38a86ce2106d8518de4079740739 +SHA512 (rust-1.16.0-i686-unknown-linux-gnu.tar.gz) = 7a780a107d98c6a8883f95dbb5a5ec95bad52fb1e735afba29b47411b450d464cbc8dfe73d35de1eb18b9a1f9ea727daa1ca9d3042e2a98c67ad570d328e139d +SHA512 (rust-1.16.0-powerpc64le-unknown-linux-gnu.tar.gz) = e1afc94bc6f80eeb6371d7037afd3fdaea189b6d0c2c5b569f6fb5976d7a7d105da57d2cf46b067a418f15083e62418fe6f3d6b40f6e2357d018b692fdb3a1a7 +SHA512 (rust-1.16.0-powerpc64-unknown-linux-gnu.tar.gz) = e93a509a84c433893c7ceb68720bbc30f097afd933178dc513273a32d3c6a37b4e234c11216bf730ac4fa28fc1ce9538b7e0ecde46c165145e72171a2cb7170a +SHA512 (rust-1.16.0-s390x-unknown-linux-gnu.tar.gz) = 45184f2b4d6ed21c90bef96380008d4787effa46986172053b366f7424e22c097577e720c88faa2acfbbb7dd41ed36596bfc691dcd8bf8d96278e34ec75666a2 +SHA512 (rust-1.16.0-x86_64-unknown-linux-gnu.tar.gz) = f3d381c0e47e0af02eb116376422c3e48295c2854c6ad8c03d4c13e662f3cc1fdddf25923f7b3ef358c5cf670ed67d75e2197162434a81d5f9499e6e0e2d1054