diff --git a/0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch b/0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch index b66ea34..4689844 100644 --- a/0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch +++ b/0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch @@ -1,7 +1,8 @@ -From fbd3fbdb24563a9d8fd3651f6bdc90bbbbd81d3e Mon Sep 17 00:00:00 2001 +From e9491f4aa3b1c2c0f9b1fdc684e986ba035a5486 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 1 May 2020 16:50:10 -0700 -Subject: [PATCH] Use a non-existent test path instead of clobbering /dev/null +Subject: [PATCH 1/3] Use a non-existent test path instead of clobbering + /dev/null Signed-off-by: Raine Makelainen --- diff --git a/llvm-targets.patch b/0002-Set-proper-llvm-targets.patch similarity index 51% rename from llvm-targets.patch rename to 0002-Set-proper-llvm-targets.patch index f2caa37..bf0d9a9 100644 --- a/llvm-targets.patch +++ b/0002-Set-proper-llvm-targets.patch @@ -1,5 +1,17 @@ ---- config.toml.example 2020-06-01 18:44:15.000000000 +0300 -+++ config.toml.example.new 2020-06-17 12:42:44.752144283 +0300 +From 60d68652869d79e75d30c45ae8a7575bc2da6019 Mon Sep 17 00:00:00 2001 +From: Matti Kosola +Date: Thu, 9 Jul 2020 11:22:10 +0000 +Subject: [PATCH 2/3] Set proper llvm targets. + +Signed-off-by: Matti Kosola +--- + config.toml.example | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/config.toml.example b/config.toml.example +index 9121d1e1799..7990f01ab42 100644 +--- a/config.toml.example ++++ b/config.toml.example @@ -63,7 +63,7 @@ # support. You'll need to write a target specification at least, and most # likely, teach rustc about the C ABI of the target. Get in touch with the @@ -9,3 +21,6 @@ # LLVM experimental targets to build support for. These targets are specified in # the same format as above, but since these targets are experimental, they are +-- +2.26.2 + diff --git a/disable-statx.patch b/0003-Disable-statx-for-all-builds.-JB-50106.patch similarity index 55% rename from disable-statx.patch rename to 0003-Disable-statx-for-all-builds.-JB-50106.patch index d907986..8366d93 100644 --- a/disable-statx.patch +++ b/0003-Disable-statx-for-all-builds.-JB-50106.patch @@ -1,4 +1,10 @@ -Disable statx for all builds. +From 191c6df3cfb0a3daae7ba40966ed22f8a63af453 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tomi=20Lepp=C3=A4nen?= +Date: Fri, 26 Jun 2020 11:58:19 +0300 +Subject: [PATCH 3/3] Disable statx for all builds. JB#50106 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit libstd implements statx using syscall and thus it will not work on scratchbox2. Moreover as it is supported only by Linux 4.11 and newer @@ -6,10 +12,17 @@ it's little use for us at the moment. It can be disabled and which means that optional extra information is set to None. Software should handle that gracefully without issues thanks to rust's type system. +Signed-off-by: Tomi Leppänen --- ---- rustc-1.44.0-src/src/libstd/sys/unix/fs.rs.old 2020-06-01 18:44:16.000000000 +0300 -+++ rustc-1.44.0-src/src/libstd/sys/unix/fs.rs 2020-06-26 12:42:46.438070586 +0300 -@@ -58,20 +58,9 @@ + src/libstd/sys/unix/fs.rs | 15 ++------------- + 1 file changed, 2 insertions(+), 13 deletions(-) + +diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs +index a233aa47dff..45fb192fc8c 100644 +--- a/src/libstd/sys/unix/fs.rs ++++ b/src/libstd/sys/unix/fs.rs +@@ -58,20 +58,9 @@ pub struct File(FileDesc); // https://github.com/rust-lang/rust/pull/67774 macro_rules! cfg_has_statx { ({ $($then_tt:tt)* } else { $($else_tt:tt)* }) => { @@ -32,3 +45,6 @@ that gracefully without issues thanks to rust's type system. } cfg_has_statx! {{ +-- +2.26.2 + diff --git a/rust.changes b/rust.changes index 7093f88..d7c6177 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,9 @@ +* Fri Jul 10 2020 Matti Kosola - 1.44.0+git3 +- [rust] Clean up packaging. JB#50106 +- [rust] Use default codegen units. JB#50106 +- [rust] Disable tests for arm. JB#50106 +- [rust] Disable aarch64 build. JB#50106 + * Fri Jun 26 2020 Tomi Leppänen - 1.44.0+git2 - [rust] Disable statx for all builds. JB#50106 diff --git a/rust.spec b/rust.spec index bccf7e0..0f24eba 100644 --- a/rust.spec +++ b/rust.spec @@ -15,8 +15,7 @@ %bcond_without lldb Name: rust -# TODO: Suffix version at the end with +git1 -Version: %{rust_version}+git2 +Version: %{rust_version}+git3 Release: 1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) @@ -24,12 +23,14 @@ License: (ASL 2.0 or MIT) and (BSD and MIT) URL: https://www.rust-lang.org %global rustc_package rustc-%{rust_version}-src -Source0: https://static.rust-lang.org/dist/rustc-%{rust_version}-src.tar.gz -Source1: https://static.rust-lang.org/dist/rust-%{rust_version}-%{rust_triple}.tar.gz +Source0: rustc-%{rust_version}-src.tar.gz +Source100: rust-%{rust_version}-i686-unknown-linux-gnu.tar.gz +Source101: rust-%{rust_version}-armv7-unknown-linux-gnueabihf.tar.gz +Source200: README.md Patch1: 0001-Use-a-non-existent-test-path-instead-of-clobbering-d.patch -Patch2: llvm-targets.patch -Patch3: disable-statx.patch +Patch2: 0002-Set-proper-llvm-targets.patch +Patch3: 0003-Disable-statx-for-all-builds.-JB-50106.patch %global bootstrap_root rust-%{rust_version}-%{rust_triple} %global local_rust_root %{_builddir}/%{bootstrap_root}/usr @@ -40,7 +41,6 @@ BuildRequires: cmake BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: ncurses-devel -# BuildRequires: curl BuildRequires: pkgconfig(libcurl) # build.rs and boostrap/config.rs => cargo_native_static? BuildRequires: pkgconfig(liblzma) @@ -56,6 +56,8 @@ BuildRequires: procps # debuginfo-gdb tests need gdb BuildRequires: gdb +# Disable aach64 build +ExcludeArch: aarch64 # Virtual provides for folks who attempt "dnf install rustc" Provides: rustc = %{version}-%{release} @@ -145,8 +147,11 @@ and ensure that you'll always get a repeatable build. %prep - -%setup -q -n %{bootstrap_root} -T -b 1 +%ifarch %ix86 +%setup -q -n %{bootstrap_root} -T -b 100 +%else +%setup -q -n %{bootstrap_root} -T -b 101 +%endif ./install.sh --components=cargo,rustc,rust-std-%{rust_triple} \ --prefix=%{local_rust_root} --disable-ldconfig test -f '%{local_rust_root}/bin/cargo' @@ -155,7 +160,7 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} %patch1 -p1 -%patch2 -p0 +%patch2 -p1 %patch3 -p1 sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure @@ -212,8 +217,6 @@ export RUSTFLAGS="%{rustflags}" # %define enable_debuginfo --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines %define enable_debuginfo --debuginfo-level=0 --debuginfo-level-std=2 --disable-debuginfo --disable-debuginfo-only-std --disable-debuginfo-tools --disable-debuginfo-lines -%define codegen_units_std --set rust.codegen-units-std=1 - %configure --disable-option-checking \ --libdir=%{common_libdir} \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ @@ -233,8 +236,6 @@ export RUSTFLAGS="%{rustflags}" --llvm-root=/usr/ \ --enable-parallel-compiler -# --set="parallel-compiler=true" - %{python} ./x.py build @@ -295,12 +296,14 @@ rm -f %{buildroot}%{_bindir}/rustdoc rm -fr %{buildroot}%{_mandir}/man1 %check +%ifarch %ix86 %{?cmake_path:export PATH=%{cmake_path}:$PATH} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # 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 cargo || : +%endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig