From 76c6164a97e05d9289a7fa0c7f6c105d29e60254 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Mon, 19 Sep 2016 22:32:53 -0700 Subject: [PATCH 01/30] Bootstrap el7, with bundled llvm --- rust.spec | 41 +++++++++++++++++++++++++++++++++++------ 1 file changed, 35 insertions(+), 6 deletions(-) diff --git a/rust.spec b/rust.spec index 1fa3240..d399ed1 100644 --- a/rust.spec +++ b/rust.spec @@ -4,10 +4,15 @@ # 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 -%bcond_with bootstrap +%bcond_without bootstrap %global bootstrap_channel 1.10.0 %global bootstrap_date 2016-07-05 +%if 0%{?rhel} +%global _with_bundled_llvm 1 +%endif +%bcond_with bundled_llvm + # Use "rebuild" when building with a distro rustc of the same version. # Turn this off when the distro has the prior release, matching bootstrap. # Note, 1.12 will be able to autodetect this via PR34779. @@ -22,7 +27,7 @@ Name: rust Version: 1.11.0 -Release: 3%{?dist} +Release: 3%{?dist}.1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -57,11 +62,15 @@ Patch1: rust-1.11.0-no-bootstrap-download.patch # merged for 1.13.0 Patch2: rust-pr35814-armv7-no-neon.patch -BuildRequires: make +%if 0%{?rhel} +BuildRequires: cmake3 +%else BuildRequires: cmake +%endif + +BuildRequires: make BuildRequires: gcc BuildRequires: gcc-c++ -BuildRequires: llvm-devel BuildRequires: zlib-devel BuildRequires: python2 BuildRequires: curl @@ -79,6 +88,12 @@ BuildRequires: %{name} >= %{bootstrap_channel} # make check: src/test/run-pass/wait-forked-but-failed-child.rs BuildRequires: /usr/bin/ps +%if %with bundled_llvm +Provides: bundled(llvm) = 3.8 +Provides: bundled(compiler-rt) = 3.8 +%else +BuildRequires: llvm-devel + # Rust started using cmake for its bundled compiler-rt, but this requires # llvm-static to be installed. But then llvm-config starts printing flags # for static linkage, with no way to force it shared. @@ -94,6 +109,8 @@ Provides: bundled(compiler-rt) = 3.8 %global clang_builtins %{_libdir}/clang/3.8.0/lib/libclang_rt.builtins-%{_target_cpu}.a %endif +%endif + # TODO: work on unbundling these! Provides: bundled(hoedown) = 3.0.5 Provides: bundled(jquery) = 2.1.4 @@ -151,8 +168,11 @@ its standard library. %patch2 -p1 -b .no-neon # unbundle -rm -rf src/llvm/ src/jemalloc/ +rm -rf src/jemalloc/ +%if %without bundled_llvm +rm -rf src/llvm/ rm -rf src/compiler-rt/ +%endif # extract bundled licenses for packaging cp src/rt/hoedown/LICENSE src/rt/hoedown/LICENSE-hoedown @@ -179,6 +199,10 @@ sed -i.nomips -e '/target=mips/,+1s/^/# unsupported /' \ sed -i.libdir -e '/^HLIB_RELATIVE/s/lib$/$$(CFG_LIBDIR_RELATIVE)/' mk/main.mk %endif +%if 0%{?rhel} +sed -i.cmake -e 's/CFG_CMAKE cmake/&3/' configure +%endif + %if %with bootstrap mkdir -p dl/ cp -t dl/ %{?SOURCE1} %{?SOURCE2} %{?SOURCE3} %{?SOURCE4} @@ -189,14 +213,16 @@ cp -t dl/ %{?SOURCE1} %{?SOURCE2} %{?SOURCE3} %{?SOURCE4} %configure --disable-option-checking \ --build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \ %{!?with_bootstrap:--enable-local-rust --local-rust-root=%{_prefix} %{?with_rebuild:--enable-local-rebuild}} \ - --llvm-root=%{_prefix} --disable-codegen-tests \ + %{!?with_bundled_llvm:--llvm-root=%{_prefix} --disable-codegen-tests} \ --disable-jemalloc \ --disable-rpath \ --enable-debuginfo \ --release-channel=%{channel} +%if %without bundled_llvm # Bypass the compiler-rt build -- see above. cp %{clang_builtins} ./%{rust_triple}/rt/libcompiler-rt.a +%endif %make_build VERBOSE=1 @@ -273,6 +299,9 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Mon Sep 19 2016 Josh Stone - 1.11.0-3.1 +- Bootstrap el7, with bundled llvm + * Sat Sep 03 2016 Josh Stone - 1.11.0-3 - Rebuild without bootstrap binaries. From 25c127f58c7b64b7aa26b5b86ccfa9e4ea2d5963 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 20 Sep 2016 00:36:43 -0700 Subject: [PATCH 02/30] Rebuild without bootstrap binaries. --- rust.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index d399ed1..3dd8ec7 100644 --- a/rust.spec +++ b/rust.spec @@ -4,7 +4,7 @@ # 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 -%bcond_without bootstrap +%bcond_with bootstrap %global bootstrap_channel 1.10.0 %global bootstrap_date 2016-07-05 @@ -27,7 +27,7 @@ Name: rust Version: 1.11.0 -Release: 3%{?dist}.1 +Release: 3%{?dist}.2 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -299,6 +299,9 @@ make check-lite VERBOSE=1 -k || echo "make check-lite exited with code $?" %changelog +* Tue Sep 20 2016 Josh Stone - 1.11.0-3.2 +- Rebuild without bootstrap binaries. + * Mon Sep 19 2016 Josh Stone - 1.11.0-3.1 - Bootstrap el7, with bundled llvm From 7a5fc2b50448e012953b8b639dde3dabcae1a49a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 22 Oct 2016 00:05:33 -0700 Subject: [PATCH 03/30] Bootstrap aarch64. --- rust.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index b761526..fc081ad 100644 --- a/rust.spec +++ b/rust.spec @@ -4,7 +4,7 @@ # 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 -%bcond_with bootstrap +%bcond_without bootstrap %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 @@ -311,9 +311,10 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog -* Thu Oct 20 2016 Josh Stone - 1.12.1-1 +* Sat Oct 22 2016 Josh Stone - 1.12.1-1 - Update to 1.12.1. - Merge package changes from rawhide. +- Bootstrap aarch64. * Tue Sep 20 2016 Josh Stone - 1.11.0-3.2 - Rebuild without bootstrap binaries. From d1dacf862b01a34eb9289cdd8d467bd7c82c3904 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Sat, 22 Oct 2016 10:23:50 -0700 Subject: [PATCH 04/30] Rebuild without bootstrap binaries. --- rust.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index fc081ad..8aa3dad 100644 --- a/rust.spec +++ b/rust.spec @@ -4,7 +4,7 @@ # 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 -%bcond_without bootstrap +%bcond_with bootstrap %global bootstrap_channel 1.11.0 %global bootstrap_date 2016-08-16 @@ -30,7 +30,7 @@ Name: rust Version: 1.12.1 -Release: 1%{?dist} +Release: 1%{?dist}.1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and ISC and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -311,6 +311,9 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog +* Sat Oct 22 2016 Josh Stone - 1.12.1-1.1 +- Rebuild without bootstrap binaries. + * Sat Oct 22 2016 Josh Stone - 1.12.1-1 - Update to 1.12.1. - Merge package changes from rawhide. From 01270bce1ce0e5cf4d8762716322249efbd94742 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 3 Jan 2017 16:35:47 -0800 Subject: [PATCH 05/30] Revert the ppc64/ppc64le bootstrap The upstream binaries are built with GLIBC_2.22 symbols, from Ubuntu 16.04, so they're not usable on epel7. --- rust.spec | 2 -- 1 file changed, 2 deletions(-) diff --git a/rust.spec b/rust.spec index bd7525b..b992b86 100644 --- a/rust.spec +++ b/rust.spec @@ -13,7 +13,6 @@ # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} -%global bootstrap_arches ppc64 ppc64le # We generally don't want llvm-static present at all, since llvm-config will # make us link statically. But we can opt in, e.g. to aid LLVM rebases. @@ -355,7 +354,6 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : * Tue Jan 03 2017 Josh Stone - 1.14.0-1 - Update to 1.14.0. - Rewrite bootstrap logic to target specific arches. -- Bootstrap ppc64, ppc64le. * Thu Nov 10 2016 Josh Stone - 1.13.0-1 - Update to 1.13.0. From b705f891eb17c04fea713b276a30a845986cc064 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 3 Jan 2017 16:38:58 -0800 Subject: [PATCH 06/30] drop bootstrap sources too --- sources | 2 -- 1 file changed, 2 deletions(-) diff --git a/sources b/sources index ed9eb7a..df26fff 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ SHA512 (rustc-1.14.0-src.tar.gz) = 3d7ea4ed29ade247a40e586b1966752af508f2d93fb6695027189f4fe012af910dc2ad554acf3a661134a4371c9699fc0e04fae1dcf8f2f49691797b5c9ed356 -SHA512 (rustc-1.13.0-powerpc64le-unknown-linux-gnu.tar.gz) = 8f0da5280c15404153ad94fde5a56b3e5a46726901d808a4115d5b1cec1010c19b788df7ba3af991958cb75174cb2628ae4c5e2d0c17011e250c373445f22cf1 -SHA512 (rustc-1.13.0-powerpc64-unknown-linux-gnu.tar.gz) = 7ce759eaf889478f441c84f78ccb00766ac1b202eb498dcb87fcedb71f7fda3c6605135ad271aa3f6edc86d9b9508fa597a2dbcd9d086288acb7bbc023c1fd62 From fce6ca15f9219262cbe4c4115e32c48ff6b5e8bf Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 3 Jan 2017 17:39:44 -0800 Subject: [PATCH 07/30] No really, we're not ready for other arches --- rust.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index b992b86..26a614e 100644 --- a/rust.spec +++ b/rust.spec @@ -1,6 +1,7 @@ # Only x86_64 and i686 are Tier 1 platforms at this time. # https://forge.rust-lang.org/platform-support.html -%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x +#global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x +%global rust_arches x86_64 i686 armv7hl aarch64 # The channel can be stable, beta, or nightly %{!?channel: %global channel stable} From 8e69a79270b55d867710b707459bd1acdca5911a Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 10 Feb 2017 17:48:37 -0800 Subject: [PATCH 08/30] Bootstrap ppc64 and ppc64le --- .gitignore | 2 ++ rust.spec | 14 +++++++++++--- sources | 2 ++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index d71d88a..ae43125 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,5 @@ /rustc-1.14.0-powerpc64-unknown-linux-gnu.tar.gz /rustc-1.14.0-s390x-unknown-linux-gnu.tar.gz /rustc-1.14.0-x86_64-unknown-linux-gnu.tar.gz +/rustc-1.15.0-powerpc64-unknown-linux-gnu.tar.gz +/rustc-1.15.0-powerpc64le-unknown-linux-gnu.tar.gz diff --git a/rust.spec b/rust.spec index 018e5b8..df00c27 100644 --- a/rust.spec +++ b/rust.spec @@ -1,7 +1,6 @@ # Only x86_64 and i686 are Tier 1 platforms at this time. # https://forge.rust-lang.org/platform-support.html -#global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x -%global rust_arches x86_64 i686 armv7hl aarch64 +%global rust_arches x86_64 i686 armv7hl aarch64 ppc64 ppc64le s390x # The channel can be stable, beta, or nightly %{!?channel: %global channel stable} @@ -14,6 +13,14 @@ # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} +%global bootstrap_arches ppc64 ppc64le + +# Temporarily override the bootstrap channel for powerpc. The binaries used +# here are also *not* the upstream ones, but rather custom cross-compliations +# by jistone using the newer docker images with ABI changes found here: +# https://github.com/rust-lang/rust/pull/39382 +%global orig_bootstrap_channel %{bootstrap_channel} +%global bootstrap_channel 1.15.0 # We generally don't want llvm-static present at all, since llvm-config will # make us link statically. But we can opt in, e.g. to aid LLVM rebases. @@ -90,7 +97,7 @@ end} %global local_rust_root %{_builddir}/%{bootstrap_root}/rustc Provides: bundled(%{name}-bootstrap) = %{bootstrap_channel} %else -BuildRequires: %{name} >= %{bootstrap_channel} +BuildRequires: %{name} >= %{orig_bootstrap_channel} BuildConflicts: %{name} > %{version} %global local_rust_root %{_prefix} %endif @@ -353,6 +360,7 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : - Require rust-rpm-macros for new crate packaging. - Keep shared libraries under rustlib/, only debug-stripped. - Merge and clean up conditionals for epel7. +- Bootstrap ppc64 and ppc64le. * Tue Jan 03 2017 Josh Stone - 1.14.0-1 - Update to 1.14.0. diff --git a/sources b/sources index 519fbb6..2f68732 100644 --- a/sources +++ b/sources @@ -1 +1,3 @@ SHA512 (rustc-1.15.1-src.tar.gz) = 10d533b17cf7f92b9dff14b399b5dd0ac8b68284eea072c85ede78a4e4c2c4fce8c781777124c64798057aceb6444535e02e067fd67ba3633c3e828fb4d2d339 +SHA512 (rustc-1.15.0-powerpc64-unknown-linux-gnu.tar.gz) = 5e556a51fbc36b71d68677bd0ad79e35c2168a3a1f0f22550fefbb3a2817c84bdc1540b5dc3b17122a7921928392aa63c475060238abb826d6e243062aadbf7a +SHA512 (rustc-1.15.0-powerpc64le-unknown-linux-gnu.tar.gz) = 6d50d20abec91bf6a35ccbbdb2c6dc2f5e185c70b60826be4db8fcc6f49cde16f9be78035a2fc1777d8c68809aec527b9feae355d6abbea66f101960bb1187e9 From 358469cfaa21e299cc589f8ad90a7105bf8137d7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 10 Feb 2017 20:52:47 -0800 Subject: [PATCH 09/30] Rebuild without bootstrap binaries. --- rust.spec | 15 +++++---------- sources | 2 -- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/rust.spec b/rust.spec index df00c27..af72ab1 100644 --- a/rust.spec +++ b/rust.spec @@ -13,14 +13,6 @@ # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} -%global bootstrap_arches ppc64 ppc64le - -# Temporarily override the bootstrap channel for powerpc. The binaries used -# here are also *not* the upstream ones, but rather custom cross-compliations -# by jistone using the newer docker images with ABI changes found here: -# https://github.com/rust-lang/rust/pull/39382 -%global orig_bootstrap_channel %{bootstrap_channel} -%global bootstrap_channel 1.15.0 # We generally don't want llvm-static present at all, since llvm-config will # make us link statically. But we can opt in, e.g. to aid LLVM rebases. @@ -41,7 +33,7 @@ Name: rust Version: 1.15.1 -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) @@ -97,7 +89,7 @@ end} %global local_rust_root %{_builddir}/%{bootstrap_root}/rustc Provides: bundled(%{name}-bootstrap) = %{bootstrap_channel} %else -BuildRequires: %{name} >= %{orig_bootstrap_channel} +BuildRequires: %{name} >= %{bootstrap_channel} BuildConflicts: %{name} > %{version} %global local_rust_root %{_prefix} %endif @@ -355,6 +347,9 @@ make check-lite VERBOSE=1 -k || python2 src/etc/check-summary.py tmp/*.log || : %changelog +* Fri Feb 10 2017 Josh Stone - 1.15.1-2 +- Rebuild without bootstrap binaries. + * Fri Feb 10 2017 Josh Stone - 1.15.1-1 - Update to 1.15.1. - Require rust-rpm-macros for new crate packaging. diff --git a/sources b/sources index 2f68732..519fbb6 100644 --- a/sources +++ b/sources @@ -1,3 +1 @@ SHA512 (rustc-1.15.1-src.tar.gz) = 10d533b17cf7f92b9dff14b399b5dd0ac8b68284eea072c85ede78a4e4c2c4fce8c781777124c64798057aceb6444535e02e067fd67ba3633c3e828fb4d2d339 -SHA512 (rustc-1.15.0-powerpc64-unknown-linux-gnu.tar.gz) = 5e556a51fbc36b71d68677bd0ad79e35c2168a3a1f0f22550fefbb3a2817c84bdc1540b5dc3b17122a7921928392aa63c475060238abb826d6e243062aadbf7a -SHA512 (rustc-1.15.0-powerpc64le-unknown-linux-gnu.tar.gz) = 6d50d20abec91bf6a35ccbbdb2c6dc2f5e185c70b60826be4db8fcc6f49cde16f9be78035a2fc1777d8c68809aec527b9feae355d6abbea66f101960bb1187e9 From e11de0784672ab69252c9d68595168284d85bc36 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 9 Jan 2018 14:18:01 -0800 Subject: [PATCH 10/30] fix binaryen on aarch64 --- binaryen-cmake-aarch64.patch | 13 +++++++++++++ rust.spec | 6 ++++++ 2 files changed, 19 insertions(+) create mode 100644 binaryen-cmake-aarch64.patch diff --git a/binaryen-cmake-aarch64.patch b/binaryen-cmake-aarch64.patch new file mode 100644 index 0000000..48752da --- /dev/null +++ b/binaryen-cmake-aarch64.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index fbd0bedb9109..e863ae9f2a05 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -122,6 +122,8 @@ ELSE() + set(TARGET_ARCH "x86-64") + elseif (${FILE_OUTPUT} MATCHES "Intel 80386") + set(TARGET_ARCH "i386") ++ elseif (${FILE_OUTPUT} MATCHES "aarch64") ++ set(TARGET_ARCH "ARM64") + elseif (${FILE_OUTPUT} MATCHES "ARM") + set(TARGET_ARCH "ARM") + else () diff --git a/rust.spec b/rust.spec index 64c3e53..b589e48 100644 --- a/rust.spec +++ b/rust.spec @@ -62,6 +62,8 @@ ExclusiveArch: %{rust_arches} %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz +Patch1: binaryen-cmake-aarch64.patch + # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -282,6 +284,10 @@ test -f '%{local_rust_root}/bin/rustc' %setup -q -n %{rustc_package} +pushd src/binaryen +%patch1 -p1 -b.aarch64 +popd + # We're disabling jemalloc, but rust-src still wants it. # rm -rf src/jemalloc/ From 4b19ef4596de08d923248f2e41709961e5f8dab7 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 8 Aug 2018 13:33:52 -0700 Subject: [PATCH 11/30] Revert part of pr50949 for LLVM5 --- ...vm-remove-closure-env-alloca-hack-ar.patch | 62 +++++++++++++++++++ rust.spec | 7 +++ 2 files changed, 69 insertions(+) create mode 100644 0001-rustc_codegen_llvm-remove-closure-env-alloca-hack-ar.patch diff --git a/0001-rustc_codegen_llvm-remove-closure-env-alloca-hack-ar.patch b/0001-rustc_codegen_llvm-remove-closure-env-alloca-hack-ar.patch new file mode 100644 index 0000000..82b8dbb --- /dev/null +++ b/0001-rustc_codegen_llvm-remove-closure-env-alloca-hack-ar.patch @@ -0,0 +1,62 @@ +From da579ef75e4a8ca11fb98b24a0a3ea0c7ccffeeb Mon Sep 17 00:00:00 2001 +From: Eduard-Mihai Burtescu +Date: Mon, 21 May 2018 20:38:41 +0300 +Subject: [PATCH] rustc_codegen_llvm: remove closure env alloca hack around + upvar debuginfo. + +--- + src/librustc_codegen_llvm/mir/mod.rs | 24 ++---------------------- + 1 file changed, 2 insertions(+), 22 deletions(-) + +diff --git a/src/librustc_codegen_llvm/mir/mod.rs b/src/librustc_codegen_llvm/mir/mod.rs +index a91a6e251aa7..d34f881bf9dd 100644 +--- a/src/librustc_codegen_llvm/mir/mod.rs ++++ b/src/librustc_codegen_llvm/mir/mod.rs +@@ -583,23 +583,6 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, + }; + let upvar_tys = upvar_substs.upvar_tys(def_id, tcx); + +- // Store the pointer to closure data in an alloca for debuginfo +- // because that's what the llvm.dbg.declare intrinsic expects. +- +- // FIXME(eddyb) this shouldn't be necessary but SROA seems to +- // mishandle DW_OP_plus not preceded by DW_OP_deref, i.e. it +- // doesn't actually strip the offset when splitting the closure +- // environment into its components so it ends up out of bounds. +- let env_ptr = if !env_ref { +- let scratch = PlaceRef::alloca(bx, +- bx.cx.layout_of(tcx.mk_mut_ptr(arg.layout.ty)), +- "__debuginfo_env_ptr"); +- bx.store(place.llval, scratch.llval, scratch.align); +- scratch.llval +- } else { +- place.llval +- }; +- + for (i, (decl, ty)) in mir.upvar_decls.iter().zip(upvar_tys).enumerate() { + let byte_offset_of_var_in_env = closure_layout.fields.offset(i).bytes(); + +@@ -611,10 +594,7 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, + }; + + // The environment and the capture can each be indirect. +- +- // FIXME(eddyb) see above why we have to keep +- // a pointer in an alloca for debuginfo atm. +- let mut ops = if env_ref || true { &ops[..] } else { &ops[1..] }; ++ let mut ops = if env_ref { &ops[..] } else { &ops[1..] }; + + let ty = if let (true, &ty::TyRef(_, ty, _)) = (decl.by_ref, &ty.sty) { + ty +@@ -624,7 +604,7 @@ fn arg_local_refs<'a, 'tcx>(bx: &Builder<'a, 'tcx>, + }; + + let variable_access = VariableAccess::IndirectVariable { +- alloca: env_ptr, ++ alloca: place.llval, + address_operations: &ops + }; + declare_local( +-- +2.17.1 + diff --git a/rust.spec b/rust.spec index d038e44..bada8f3 100644 --- a/rust.spec +++ b/rust.spec @@ -76,6 +76,11 @@ Patch1: rust-52760-test_loading_atoi.patch # https://github.com/rust-lang/rust/pull/52876 Patch2: rust-52876-const-endianess.patch +# https://github.com/rust-lang/rust/issues/53204 +# From https://github.com/rust-lang/rust/pull/50949 +# This second commit causes problems with LLVM 5 debuginfo -- reverting. +Patch3: 0001-rustc_codegen_llvm-remove-closure-env-alloca-hack-ar.patch + # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -377,6 +382,8 @@ test -f '%{local_rust_root}/bin/rustc' %patch1 -p1 %patch2 -p1 +%patch3 -p1 -R + %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure %endif From eb5b02ceb81c7bc5705721cd0ec2ef291297a2c5 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 10 Aug 2018 12:41:09 -0700 Subject: [PATCH 12/30] Remove backup files from %%configure munging --- rust.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rust.spec b/rust.spec index bada8f3..b963115 100644 --- a/rust.spec +++ b/rust.spec @@ -501,6 +501,9 @@ find %{buildroot}%{_libdir} -maxdepth 1 -type f -name '*.so' \ # Remove installer artifacts (manifests, uninstall scripts, etc.) find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -exec rm -v '{}' '+' +# Remove backup files from %%configure munging +find %{buildroot}%{rustlibdir} -type f -name '*.orig' -exec rm -v '{}' '+' + # FIXME: __os_install_post will strip the rlibs # -- should we find a way to preserve debuginfo? From cf28e2f093110d7b4f44349ce98f23cc48635b0e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Wed, 31 Oct 2018 15:47:45 -0700 Subject: [PATCH 13/30] Re-bootstrap ppc64le for rust#54545 --- rust.spec | 2 ++ sources | 1 + 2 files changed, 3 insertions(+) diff --git a/rust.spec b/rust.spec index e18ce3f..9ff5f8c 100644 --- a/rust.spec +++ b/rust.spec @@ -16,6 +16,7 @@ # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} +%global bootstrap_arches ppc64le # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static @@ -684,6 +685,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog * Thu Oct 25 2018 Josh Stone - 1.30.0-6 - Update to 1.30.0. +- Re-bootstrap ppc64le for rust#54545 * Fri Oct 12 2018 Josh Stone - 1.29.2-3 - Update to 1.29.2. diff --git a/sources b/sources index 53d5f2e..ec99e8b 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (rustc-1.30.0-src.tar.xz) = f5f2f8379b43f68a9c1acd476a41fab2fb3a9458146fbdb21dfb2f5d1ab86905933b9541e866f5fbb520dafe349e0ab87bc6c9466774c4616007d547e6aeaa59 +SHA512 (rust-1.29.2-powerpc64le-unknown-linux-gnu.tar.xz) = b9181da601a467f46713f2f438fc7ad69c46fc310e62a8d45f665744c8578491d832b8624ff454c19c94f1694fa406846a82289250241030a70b2cb4b88913d1 From 503e4b69c2602ab966aa3689f762e866811d290c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 1 Nov 2018 09:09:30 -0700 Subject: [PATCH 14/30] Rebuild without bootstrap binaries. --- rust.spec | 6 ++++-- sources | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/rust.spec b/rust.spec index 9ff5f8c..de3754b 100644 --- a/rust.spec +++ b/rust.spec @@ -16,7 +16,6 @@ # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} -%global bootstrap_arches ppc64le # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static @@ -64,7 +63,7 @@ Name: rust Version: %{rustc_version} -Release: 6%{?dist} +Release: 6%{?dist}.1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -683,6 +682,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Thu Nov 01 2018 Josh Stone - 1.30.0-6.1 +- Rebuild without bootstrap binaries. + * Thu Oct 25 2018 Josh Stone - 1.30.0-6 - Update to 1.30.0. - Re-bootstrap ppc64le for rust#54545 diff --git a/sources b/sources index ec99e8b..53d5f2e 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ SHA512 (rustc-1.30.0-src.tar.xz) = f5f2f8379b43f68a9c1acd476a41fab2fb3a9458146fbdb21dfb2f5d1ab86905933b9541e866f5fbb520dafe349e0ab87bc6c9466774c4616007d547e6aeaa59 -SHA512 (rust-1.29.2-powerpc64le-unknown-linux-gnu.tar.xz) = b9181da601a467f46713f2f438fc7ad69c46fc310e62a8d45f665744c8578491d832b8624ff454c19c94f1694fa406846a82289250241030a70b2cb4b88913d1 From 9d6ffbec00fb1a4bf303f9d1ad862f6eb07451a6 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 16 Aug 2019 20:23:50 -0700 Subject: [PATCH 15/30] Disable HTTP/2 support, lacking in system libcurl. --- rust.spec | 17 ++++++++ rustc-1.37.0-disable-http2.patch | 75 ++++++++++++++++++++++++++++++++ 2 files changed, 92 insertions(+) create mode 100644 rustc-1.37.0-disable-http2.patch diff --git a/rust.spec b/rust.spec index 0dedded..e5b44f0 100644 --- a/rust.spec +++ b/rust.spec @@ -40,6 +40,13 @@ %bcond_with bundled_libssh2 %endif +%if 0%{?rhel} && 0%{?rhel} <= 7 +%bcond_with curl_http2 +%else +%bcond_without curl_http2 +%endif + + # LLDB isn't available everywhere... %if !0%{?rhel} %bcond_without lldb @@ -67,6 +74,10 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # We do have the necessary fix in our LLVM 7. Patch1: rust-pr57840-llvm7-debuginfo-variants.patch +# libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys +# will try to build it statically -- instead we turn off the feature. +Patch10: rustc-1.37.0-disable-http2.patch + # Get the Rust triple for any arch. %{lua: function rust_triple(arch) local abi = "gnu" @@ -398,6 +409,11 @@ test -f '%{local_rust_root}/bin/rustc' %patch1 -p1 -R +%if %without curl_http2 +%patch10 -p1 +rm -rf vendor/libnghttp2-sys/ +%endif + %if "%{python}" == "python3" sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure %endif @@ -702,6 +718,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog * Thu Aug 15 2019 Josh Stone - 1.37.0-1 - Update to 1.37.0. +- Disable HTTP/2 support, lacking in system libcurl. * Fri Jul 26 2019 Fedora Release Engineering - 1.36.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild diff --git a/rustc-1.37.0-disable-http2.patch b/rustc-1.37.0-disable-http2.patch new file mode 100644 index 0000000..c11fa84 --- /dev/null +++ b/rustc-1.37.0-disable-http2.patch @@ -0,0 +1,75 @@ +--- rustc-1.37.0-src/Cargo.lock.orig 2019-08-12 23:27:22.000000000 -0700 ++++ rustc-1.37.0-src/Cargo.lock 2019-08-16 14:23:18.346656639 -0700 +@@ -700,7 +700,6 @@ source = "registry+https://github.com/ru + dependencies = [ + "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", + "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", +- "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", + "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", + "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", + "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", +@@ -1400,15 +1399,6 @@ dependencies = [ + ] + + [[package]] +-name = "libnghttp2-sys" +-version = "0.1.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-dependencies = [ +- "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", +- "libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)", +-] +- +-[[package]] + name = "libssh2-sys" + version = "0.2.11" + source = "registry+https://github.com/rust-lang/crates.io-index" +@@ -4341,7 +4331,6 @@ source = "registry+https://github.com/ru + "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" + "checksum libc 0.2.54 (registry+https://github.com/rust-lang/crates.io-index)" = "c6785aa7dd976f5fbf3b71cfd9cd49d7f783c1ff565a858d71031c6c313aa5c6" + "checksum libgit2-sys 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "941a41e23f77323b8c9d2ee118aec9ee39dfc176078c18b4757d3bad049d9ff7" +-"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4" + "checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d" + "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" + "checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54" +--- rustc-1.37.0-src/src/tools/cargo/Cargo.toml.orig 2019-08-12 23:27:40.000000000 -0700 ++++ rustc-1.37.0-src/src/tools/cargo/Cargo.toml 2019-08-16 14:21:20.165084813 -0700 +@@ -24,7 +24,7 @@ bytesize = "1.0" + crates-io = { path = "crates/crates-io", version = "0.26" } + crossbeam-utils = "0.6" + crypto-hash = "0.3.1" +-curl = { version = "0.4.21", features = ['http2'] } ++curl = { version = "0.4.21", features = [] } + curl-sys = "0.4.18" + env_logger = "0.6.0" + pretty_env_logger = { version = "0.3", optional = true } +--- rustc-1.37.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-08-12 23:27:40.000000000 -0700 ++++ rustc-1.37.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-08-16 18:39:56.053468497 -0700 +@@ -374,16 +374,8 @@ impl<'cfg> PackageSet<'cfg> { + // Also note that pipelining is disabled as curl authors have indicated + // that it's buggy, and we've empirically seen that it's buggy with HTTP + // proxies. +- let mut multi = Multi::new(); +- let multiplexing = config +- .get::>("http.multiplexing")? +- .unwrap_or(true); +- multi +- .pipelining(false, multiplexing) +- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?; +- +- // let's not flood crates.io with connections +- multi.set_max_host_connections(2)?; ++ let multi = Multi::new(); ++ let multiplexing = false; + + Ok(PackageSet { + packages: package_ids +@@ -460,7 +452,7 @@ impl<'cfg> PackageSet<'cfg> { + macro_rules! try_old_curl { + ($e:expr, $msg:expr) => { + let result = $e; +- if cfg!(target_os = "macos") { ++ if cfg!(any(target_os = "linux", target_os = "macos")) { + if let Err(e) = result { + warn!("ignoring libcurl {} error: {}", $msg, e); + } From b229852f1b7398b1bfc27e450b3395bcccf807e6 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 7 Nov 2019 11:55:31 -0800 Subject: [PATCH 16/30] Update patch to disable http2 --- rust.spec | 2 +- rustc-1.38.0-disable-http2.patch | 75 -------------------------------- rustc-1.39.0-disable-http2.patch | 68 +++++++++++++++++++++++++++++ 3 files changed, 69 insertions(+), 76 deletions(-) delete mode 100644 rustc-1.38.0-disable-http2.patch create mode 100644 rustc-1.39.0-disable-http2.patch diff --git a/rust.spec b/rust.spec index 48a196a..afdbeb3 100644 --- a/rust.spec +++ b/rust.spec @@ -80,7 +80,7 @@ Patch2: rust-pr65474-split-rustc-dev.patch # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.38.0-disable-http2.patch +Patch10: rustc-1.39.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.38.0-disable-http2.patch b/rustc-1.38.0-disable-http2.patch deleted file mode 100644 index eefe841..0000000 --- a/rustc-1.38.0-disable-http2.patch +++ /dev/null @@ -1,75 +0,0 @@ ---- rustc-1.37.0-src/src/tools/cargo/Cargo.toml.orig 2019-08-12 23:27:40.000000000 -0700 -+++ rustc-1.37.0-src/src/tools/cargo/Cargo.toml 2019-08-16 14:21:20.165084813 -0700 -@@ -24,7 +24,7 @@ bytesize = "1.0" - crates-io = { path = "crates/crates-io", version = "0.27" } - crossbeam-utils = "0.6" - crypto-hash = "0.3.1" --curl = { version = "0.4.21", features = ['http2'] } -+curl = { version = "0.4.21", features = [] } - curl-sys = "0.4.18" - env_logger = "0.6.0" - pretty_env_logger = { version = "0.3", optional = true } ---- rustc-1.37.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-08-12 23:27:40.000000000 -0700 -+++ rustc-1.37.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-08-16 18:39:56.053468497 -0700 -@@ -374,16 +374,8 @@ impl<'cfg> PackageSet<'cfg> { - // Also note that pipelining is disabled as curl authors have indicated - // that it's buggy, and we've empirically seen that it's buggy with HTTP - // proxies. -- let mut multi = Multi::new(); -- let multiplexing = config -- .get::>("http.multiplexing")? -- .unwrap_or(true); -- multi -- .pipelining(false, multiplexing) -- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?; -- -- // let's not flood crates.io with connections -- multi.set_max_host_connections(2)?; -+ let multi = Multi::new(); -+ let multiplexing = false; - - Ok(PackageSet { - packages: package_ids -@@ -460,7 +452,7 @@ impl<'cfg> PackageSet<'cfg> { - macro_rules! try_old_curl { - ($e:expr, $msg:expr) => { - let result = $e; -- if cfg!(target_os = "macos") { -+ if cfg!(any(target_os = "linux", target_os = "macos")) { - if let Err(e) = result { - warn!("ignoring libcurl {} error: {}", $msg, e); - } ---- rustc-1.38.0-src/Cargo.lock.orig 2019-09-23 14:15:52.000000000 -0700 -+++ rustc-1.38.0-src/Cargo.lock 2019-09-27 20:48:18.209596817 -0700 -@@ -673,7 +673,6 @@ source = "registry+https://github.com/ru - dependencies = [ - "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", - "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", -- "libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)", - "libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)", - "openssl-sys 0.9.43 (registry+https://github.com/rust-lang/crates.io-index)", - "pkg-config 0.3.14 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -1473,15 +1472,6 @@ dependencies = [ - ] - - [[package]] --name = "libnghttp2-sys" --version = "0.1.1" --source = "registry+https://github.com/rust-lang/crates.io-index" --dependencies = [ -- "cc 1.0.35 (registry+https://github.com/rust-lang/crates.io-index)", -- "libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)", --] -- --[[package]] - name = "libssh2-sys" - version = "0.2.11" - source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -4485,7 +4475,6 @@ source = "registry+https://github.com/ru - "checksum libc 0.2.60 (registry+https://github.com/rust-lang/crates.io-index)" = "d44e80633f007889c7eff624b709ab43c92d708caad982295768a7b13ca3b5eb" - "checksum libflate 0.1.25 (registry+https://github.com/rust-lang/crates.io-index)" = "90c6f86f4b0caa347206f916f8b687b51d77c6ef8ff18d52dd007491fd580529" - "checksum libgit2-sys 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "4c179ed6d19cd3a051e68c177fbbc214e79ac4724fac3a850ec9f3d3eb8a5578" --"checksum libnghttp2-sys 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4" - "checksum libssh2-sys 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "126a1f4078368b163bfdee65fbab072af08a1b374a5551b21e87ade27b1fbf9d" - "checksum libz-sys 1.0.25 (registry+https://github.com/rust-lang/crates.io-index)" = "2eb5e43362e38e2bca2fd5f5134c4d4564a23a5c28e9b95411652021a8675ebe" - "checksum lock_api 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "949826a5ccf18c1b3a7c3d57692778d21768b79e46eb9dd07bfc4c2160036c54" diff --git a/rustc-1.39.0-disable-http2.patch b/rustc-1.39.0-disable-http2.patch new file mode 100644 index 0000000..53f7f98 --- /dev/null +++ b/rustc-1.39.0-disable-http2.patch @@ -0,0 +1,68 @@ +--- rustc-1.39.0-src/Cargo.lock.orig 2019-11-04 07:45:21.000000000 -0800 ++++ rustc-1.39.0-src/Cargo.lock 2019-11-07 11:27:09.491588756 -0800 +@@ -745,7 +745,6 @@ + dependencies = [ + "cc", + "libc", +- "libnghttp2-sys", + "libz-sys", + "openssl-sys", + "pkg-config", +@@ -1704,16 +1703,6 @@ + ] + + [[package]] +-name = "libnghttp2-sys" +-version = "0.1.1" +-source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4" +-dependencies = [ +- "cc", +- "libc", +-] +- +-[[package]] + name = "libssh2-sys" + version = "0.2.11" + source = "registry+https://github.com/rust-lang/crates.io-index" +--- rustc-1.39.0-src/src/tools/cargo/Cargo.toml.orig 2019-11-04 07:45:38.000000000 -0800 ++++ rustc-1.39.0-src/src/tools/cargo/Cargo.toml 2019-11-07 11:26:07.619884857 -0800 +@@ -24,7 +24,7 @@ + crates-io = { path = "crates/crates-io", version = "0.28" } + crossbeam-utils = "0.6" + crypto-hash = "0.3.1" +-curl = { version = "0.4.21", features = ['http2'] } ++curl = { version = "0.4.21", features = [] } + curl-sys = "0.4.18" + env_logger = "0.6.0" + pretty_env_logger = { version = "0.3", optional = true } +--- rustc-1.39.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-11-04 07:45:38.000000000 -0800 ++++ rustc-1.39.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-11-07 11:30:17.701646098 -0800 +@@ -375,16 +375,8 @@ + // Also note that pipelining is disabled as curl authors have indicated + // that it's buggy, and we've empirically seen that it's buggy with HTTP + // proxies. +- let mut multi = Multi::new(); +- let multiplexing = config +- .get::>("http.multiplexing")? +- .unwrap_or(true); +- multi +- .pipelining(false, multiplexing) +- .chain_err(|| "failed to enable multiplexing/pipelining in curl")?; +- +- // let's not flood crates.io with connections +- multi.set_max_host_connections(2)?; ++ let multi = Multi::new(); ++ let multiplexing = false; + + Ok(PackageSet { + packages: package_ids +@@ -482,7 +474,7 @@ + macro_rules! try_old_curl { + ($e:expr, $msg:expr) => { + let result = $e; +- if cfg!(target_os = "macos") { ++ if cfg!(any(target_os = "linux", target_os = "macos")) { + if let Err(e) = result { + warn!("ignoring libcurl {} error: {}", $msg, e); + } From 5470eaf23fe0536c76e6a03ef742c50e6b22b4bb Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 19 Dec 2019 13:12:19 -0800 Subject: [PATCH 17/30] Update patch to disable http2 --- rust.spec | 2 +- ....patch => rustc-1.40.0-disable-http2.patch | 36 +++++++++---------- 2 files changed, 18 insertions(+), 20 deletions(-) rename rustc-1.39.0-disable-http2.patch => rustc-1.40.0-disable-http2.patch (61%) diff --git a/rust.spec b/rust.spec index 47fc5db..786b87d 100644 --- a/rust.spec +++ b/rust.spec @@ -84,7 +84,7 @@ Patch3: rust-issue-67242-ignore-arm-foreign-exceptions.patch # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.39.0-disable-http2.patch +Patch10: rustc-1.40.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.39.0-disable-http2.patch b/rustc-1.40.0-disable-http2.patch similarity index 61% rename from rustc-1.39.0-disable-http2.patch rename to rustc-1.40.0-disable-http2.patch index 53f7f98..c472a7e 100644 --- a/rustc-1.39.0-disable-http2.patch +++ b/rustc-1.40.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.39.0-src/Cargo.lock.orig 2019-11-04 07:45:21.000000000 -0800 -+++ rustc-1.39.0-src/Cargo.lock 2019-11-07 11:27:09.491588756 -0800 -@@ -745,7 +745,6 @@ +--- rustc-1.40.0-src/Cargo.lock.orig 2019-12-16 07:38:05.000000000 -0800 ++++ rustc-1.40.0-src/Cargo.lock 2019-12-19 13:10:26.972016751 -0800 +@@ -769,7 +769,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1704,16 +1703,6 @@ +@@ -1633,16 +1632,6 @@ ] [[package]] @@ -25,27 +25,25 @@ name = "libssh2-sys" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.39.0-src/src/tools/cargo/Cargo.toml.orig 2019-11-04 07:45:38.000000000 -0800 -+++ rustc-1.39.0-src/src/tools/cargo/Cargo.toml 2019-11-07 11:26:07.619884857 -0800 -@@ -24,7 +24,7 @@ - crates-io = { path = "crates/crates-io", version = "0.28" } +--- rustc-1.40.0-src/src/tools/cargo/Cargo.toml.orig 2019-12-16 07:38:26.000000000 -0800 ++++ rustc-1.40.0-src/src/tools/cargo/Cargo.toml 2019-12-19 13:06:39.412801760 -0800 +@@ -25,7 +25,7 @@ + crates-io = { path = "crates/crates-io", version = "0.29" } crossbeam-utils = "0.6" crypto-hash = "0.3.1" --curl = { version = "0.4.21", features = ['http2'] } -+curl = { version = "0.4.21", features = [] } - curl-sys = "0.4.18" - env_logger = "0.6.0" +-curl = { version = "0.4.23", features = ["http2"] } ++curl = { version = "0.4.23", features = [] } + curl-sys = "0.4.22" + env_logger = "0.7.0" pretty_env_logger = { version = "0.3", optional = true } ---- rustc-1.39.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-11-04 07:45:38.000000000 -0800 -+++ rustc-1.39.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-11-07 11:30:17.701646098 -0800 -@@ -375,16 +375,8 @@ +--- rustc-1.40.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-12-16 07:38:26.000000000 -0800 ++++ rustc-1.40.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-12-19 13:08:29.801480559 -0800 +@@ -375,14 +375,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. - let mut multi = Multi::new(); -- let multiplexing = config -- .get::>("http.multiplexing")? -- .unwrap_or(true); +- let multiplexing = config.http_config()?.multiplexing.unwrap_or(true); - multi - .pipelining(false, multiplexing) - .chain_err(|| "failed to enable multiplexing/pipelining in curl")?; @@ -57,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -482,7 +474,7 @@ +@@ -480,7 +474,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; From 6eee6d5eb71ed4cb1c751f497b496da335ce564c Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 31 Jan 2020 10:50:12 -0800 Subject: [PATCH 18/30] Update patch to disable http2 --- rust.spec | 2 +- ....patch => rustc-1.41.0-disable-http2.patch | 20 +++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) rename rustc-1.40.0-disable-http2.patch => rustc-1.41.0-disable-http2.patch (73%) diff --git a/rust.spec b/rust.spec index db472e7..91f99c1 100644 --- a/rust.spec +++ b/rust.spec @@ -86,7 +86,7 @@ Patch4: 0001-Update-the-barrier-cache-during-ARM-EHABI-unwinding.patch # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.40.0-disable-http2.patch +Patch10: rustc-1.41.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.40.0-disable-http2.patch b/rustc-1.41.0-disable-http2.patch similarity index 73% rename from rustc-1.40.0-disable-http2.patch rename to rustc-1.41.0-disable-http2.patch index c472a7e..442f062 100644 --- a/rustc-1.40.0-disable-http2.patch +++ b/rustc-1.41.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.40.0-src/Cargo.lock.orig 2019-12-16 07:38:05.000000000 -0800 -+++ rustc-1.40.0-src/Cargo.lock 2019-12-19 13:10:26.972016751 -0800 -@@ -769,7 +769,6 @@ +--- rustc-1.41.0-src/Cargo.lock.orig 2020-01-27 07:34:02.000000000 -0800 ++++ rustc-1.41.0-src/Cargo.lock 2020-01-31 10:46:54.164921589 -0800 +@@ -823,7 +823,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1633,16 +1632,6 @@ +@@ -1811,16 +1810,6 @@ ] [[package]] @@ -25,19 +25,19 @@ name = "libssh2-sys" version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.40.0-src/src/tools/cargo/Cargo.toml.orig 2019-12-16 07:38:26.000000000 -0800 -+++ rustc-1.40.0-src/src/tools/cargo/Cargo.toml 2019-12-19 13:06:39.412801760 -0800 +--- rustc-1.41.0-src/src/tools/cargo/Cargo.toml.orig 2020-01-27 07:34:20.000000000 -0800 ++++ rustc-1.41.0-src/src/tools/cargo/Cargo.toml 2020-01-31 10:46:54.165921568 -0800 @@ -25,7 +25,7 @@ - crates-io = { path = "crates/crates-io", version = "0.29" } - crossbeam-utils = "0.6" + crates-io = { path = "crates/crates-io", version = "0.30" } + crossbeam-utils = "0.7" crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } +curl = { version = "0.4.23", features = [] } curl-sys = "0.4.22" env_logger = "0.7.0" pretty_env_logger = { version = "0.3", optional = true } ---- rustc-1.40.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2019-12-16 07:38:26.000000000 -0800 -+++ rustc-1.40.0-src/src/tools/cargo/src/cargo/core/package.rs 2019-12-19 13:08:29.801480559 -0800 +--- rustc-1.41.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-01-27 07:34:20.000000000 -0800 ++++ rustc-1.41.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-01-31 10:46:54.166921547 -0800 @@ -375,14 +375,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP From 7a193130109736e67fb3aaef1ac2c7ccd851025e Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 31 Jan 2020 13:50:52 -0800 Subject: [PATCH 19/30] Reintroduce the workaround for LLVM library path This reverts commit 93ecbc5a139208a2eeff691980d8e513b6b1b406, reintroducing the workaround for rust#40717, now rust#68714. --- rust.spec | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rust.spec b/rust.spec index 91f99c1..7dfe393 100644 --- a/rust.spec +++ b/rust.spec @@ -235,6 +235,10 @@ Requires: /usr/bin/cc %if "%{llvm_root}" == "%{_prefix}" || 0%{?scl:1} %global llvm_has_filecheck 1 %endif +%if "%{llvm_root}" != "%{_prefix}" +# https://github.com/rust-lang/rust/issues/68714 +%global library_path $(%{llvm_root}/bin/llvm-config --libdir) +%endif %endif %description @@ -493,6 +497,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %endif %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # We're going to override --libdir when configuring to get rustlib into a @@ -543,6 +548,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1 %install %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} DESTDIR=%{buildroot} %{python} ./x.py install @@ -613,6 +619,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %check %{?cmake_path:export PATH=%{cmake_path}:$PATH} +%{?library_path:export LIBRARY_PATH="%{library_path}"} %{?rustflags:export RUSTFLAGS="%{rustflags}"} # The results are not stable on koji, so mask errors and just log it. From 46c165a869ec459e30c599201694ab76a7f5a512 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 27 Feb 2020 13:31:18 -0800 Subject: [PATCH 20/30] For older rpm's sake, don't use %elif --- rust.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rust.spec b/rust.spec index 44dec75..ad4a89c 100644 --- a/rust.spec +++ b/rust.spec @@ -173,7 +173,8 @@ Provides: bundled(llvm) = 9.0.0 BuildRequires: cmake >= 2.8.11 %if 0%{?epel} %global llvm llvm7.0 -%elif 0%{?fedora} >= 32 +%endif +%if 0%{?fedora} >= 32 %global llvm llvm9.0 %endif %if %defined llvm From 2625654aa0d2ee70c12e16930397dc6b7b56cd28 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 12 Mar 2020 15:47:42 -0700 Subject: [PATCH 21/30] Update patch to disable http2 --- rust.spec | 2 +- ....patch => rustc-1.42.0-disable-http2.patch | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) rename rustc-1.41.0-disable-http2.patch => rustc-1.42.0-disable-http2.patch (69%) diff --git a/rust.spec b/rust.spec index 91d3153..914a003 100644 --- a/rust.spec +++ b/rust.spec @@ -80,7 +80,7 @@ Patch2: 0001-Drop-cfg-bootstrap-code.patch # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.41.0-disable-http2.patch +Patch10: rustc-1.42.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.41.0-disable-http2.patch b/rustc-1.42.0-disable-http2.patch similarity index 69% rename from rustc-1.41.0-disable-http2.patch rename to rustc-1.42.0-disable-http2.patch index 442f062..1940f08 100644 --- a/rustc-1.41.0-disable-http2.patch +++ b/rustc-1.42.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.41.0-src/Cargo.lock.orig 2020-01-27 07:34:02.000000000 -0800 -+++ rustc-1.41.0-src/Cargo.lock 2020-01-31 10:46:54.164921589 -0800 -@@ -823,7 +823,6 @@ +--- rustc-1.42.0-src/Cargo.lock.orig 2020-03-09 15:11:17.000000000 -0700 ++++ rustc-1.42.0-src/Cargo.lock 2020-03-12 15:42:18.942468302 -0700 +@@ -818,7 +818,6 @@ dependencies = [ "cc", "libc", @@ -8,14 +8,14 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1811,16 +1810,6 @@ +@@ -1803,16 +1802,6 @@ ] [[package]] -name = "libnghttp2-sys" --version = "0.1.1" +-version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "d75d7966bda4730b722d1eab8e668df445368a24394bae9fc1e8dc0ab3dbe4f4" +-checksum = "02254d44f4435dd79e695f2c2b83cd06a47919adea30216ceaf0c57ca0a72463" -dependencies = [ - "cc", - "libc", @@ -23,12 +23,12 @@ - -[[package]] name = "libssh2-sys" - version = "0.2.11" + version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.41.0-src/src/tools/cargo/Cargo.toml.orig 2020-01-27 07:34:20.000000000 -0800 -+++ rustc-1.41.0-src/src/tools/cargo/Cargo.toml 2020-01-31 10:46:54.165921568 -0800 +--- rustc-1.42.0-src/src/tools/cargo/Cargo.toml.orig 2020-03-09 15:11:43.000000000 -0700 ++++ rustc-1.42.0-src/src/tools/cargo/Cargo.toml 2020-03-12 15:41:33.787431876 -0700 @@ -25,7 +25,7 @@ - crates-io = { path = "crates/crates-io", version = "0.30" } + crates-io = { path = "crates/crates-io", version = "0.31" } crossbeam-utils = "0.7" crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } @@ -36,8 +36,8 @@ curl-sys = "0.4.22" env_logger = "0.7.0" pretty_env_logger = { version = "0.3", optional = true } ---- rustc-1.41.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-01-27 07:34:20.000000000 -0800 -+++ rustc-1.41.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-01-31 10:46:54.166921547 -0800 +--- rustc-1.42.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-03-09 15:11:43.000000000 -0700 ++++ rustc-1.42.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-03-12 15:46:45.401782270 -0700 @@ -375,14 +375,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP From d5bc581fc895ff6a4f80890b4545a11bc48abb91 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 23 Apr 2020 13:31:34 -0700 Subject: [PATCH 22/30] Update patch to disable http2 --- rust.spec | 2 +- ....patch => rustc-1.43.0-disable-http2.patch | 26 +++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) rename rustc-1.42.0-disable-http2.patch => rustc-1.43.0-disable-http2.patch (69%) diff --git a/rust.spec b/rust.spec index 7f8b541..dac86b9 100644 --- a/rust.spec +++ b/rust.spec @@ -86,7 +86,7 @@ Patch4: rust-pr70163-prepare-for-llvm-10-upgrade.patch # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.42.0-disable-http2.patch +Patch10: rustc-1.43.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.42.0-disable-http2.patch b/rustc-1.43.0-disable-http2.patch similarity index 69% rename from rustc-1.42.0-disable-http2.patch rename to rustc-1.43.0-disable-http2.patch index 1940f08..ebc563f 100644 --- a/rustc-1.42.0-disable-http2.patch +++ b/rustc-1.43.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.42.0-src/Cargo.lock.orig 2020-03-09 15:11:17.000000000 -0700 -+++ rustc-1.42.0-src/Cargo.lock 2020-03-12 15:42:18.942468302 -0700 -@@ -818,7 +818,6 @@ +--- rustc-1.43.0-src/Cargo.lock.orig 2020-04-20 15:17:56.000000000 -0700 ++++ rustc-1.43.0-src/Cargo.lock 2020-04-23 13:27:41.781857941 -0700 +@@ -798,7 +798,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1803,16 +1802,6 @@ +@@ -1782,16 +1781,6 @@ ] [[package]] @@ -25,20 +25,20 @@ name = "libssh2-sys" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.42.0-src/src/tools/cargo/Cargo.toml.orig 2020-03-09 15:11:43.000000000 -0700 -+++ rustc-1.42.0-src/src/tools/cargo/Cargo.toml 2020-03-12 15:41:33.787431876 -0700 -@@ -25,7 +25,7 @@ - crates-io = { path = "crates/crates-io", version = "0.31" } +--- rustc-1.43.0-src/src/tools/cargo/Cargo.toml.orig 2020-04-23 13:27:41.781857941 -0700 ++++ rustc-1.43.0-src/src/tools/cargo/Cargo.toml 2020-04-23 13:29:31.355523076 -0700 +@@ -26,7 +26,7 @@ + crossbeam-channel = "0.4" crossbeam-utils = "0.7" crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } +curl = { version = "0.4.23", features = [] } curl-sys = "0.4.22" env_logger = "0.7.0" - pretty_env_logger = { version = "0.3", optional = true } ---- rustc-1.42.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-03-09 15:11:43.000000000 -0700 -+++ rustc-1.42.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-03-12 15:46:45.401782270 -0700 -@@ -375,14 +375,8 @@ + pretty_env_logger = { version = "0.4", optional = true } +--- rustc-1.43.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-04-20 15:19:12.000000000 -0700 ++++ rustc-1.43.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-04-23 13:27:41.782857920 -0700 +@@ -378,14 +378,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. @@ -55,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -480,7 +474,7 @@ +@@ -483,7 +477,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; From b659c74ccdae5c29a0235d9fca8669d8c6fb6dbe Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 19 May 2020 17:09:31 -0700 Subject: [PATCH 23/30] Rebuild with LLVM 9. --- rust.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 141c329..03958f0 100644 --- a/rust.spec +++ b/rust.spec @@ -56,7 +56,7 @@ Name: rust Version: 1.43.1 -Release: 1%{?dist} +Release: 1%{?dist}.1 Summary: The Rust Programming Language License: (ASL 2.0 or MIT) and (BSD and MIT) # ^ written as: (rust itself) and (bundled libraries) @@ -175,7 +175,7 @@ Provides: bundled(llvm) = 9.0.0 %else BuildRequires: cmake >= 2.8.11 %if 0%{?epel} -%global llvm llvm7.0 +%global llvm llvm9.0 %endif %if %defined llvm %global llvm_root %{_libdir}/%{llvm} @@ -734,6 +734,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py* %changelog +* Tue May 19 2020 Josh Stone - 1.43.1-1.1 +- Rebuild with LLVM 9. + * Thu May 07 2020 Josh Stone - 1.43.1-1 - Update to 1.43.1. From 008cd73f3027c26e0e473a96783959e5aaea5207 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Tue, 26 May 2020 12:06:31 -0700 Subject: [PATCH 24/30] in transition, need to explicitly require llvm7.0, rather than llvm-toolset-7 --- rust.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust.spec b/rust.spec index 03958f0..f95f725 100644 --- a/rust.spec +++ b/rust.spec @@ -176,6 +176,8 @@ Provides: bundled(llvm) = 9.0.0 BuildRequires: cmake >= 2.8.11 %if 0%{?epel} %global llvm llvm9.0 +# in transition, need to explicitly require llvm7.0, rather than llvm-toolset-7 +BuildRequires: llvm7.0-libs %endif %if %defined llvm %global llvm_root %{_libdir}/%{llvm} From 85183d227ed8795cfdc2427b8004deb9d2f2c67b Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 4 Jun 2020 15:55:22 -0700 Subject: [PATCH 25/30] Update patch to disable http2 --- rust.spec | 2 +- ....patch => rustc-1.44.0-disable-http2.patch | 24 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) rename rustc-1.43.0-disable-http2.patch => rustc-1.44.0-disable-http2.patch (72%) diff --git a/rust.spec b/rust.spec index c8a206f..d435691 100644 --- a/rust.spec +++ b/rust.spec @@ -75,7 +75,7 @@ Patch1: rust-pr71782-Use-a-non-existent-test-path.patch # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.43.0-disable-http2.patch +Patch10: rustc-1.44.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.43.0-disable-http2.patch b/rustc-1.44.0-disable-http2.patch similarity index 72% rename from rustc-1.43.0-disable-http2.patch rename to rustc-1.44.0-disable-http2.patch index ebc563f..d1fec13 100644 --- a/rustc-1.43.0-disable-http2.patch +++ b/rustc-1.44.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.43.0-src/Cargo.lock.orig 2020-04-20 15:17:56.000000000 -0700 -+++ rustc-1.43.0-src/Cargo.lock 2020-04-23 13:27:41.781857941 -0700 -@@ -798,7 +798,6 @@ +--- rustc-1.44.0-src/Cargo.lock.orig 2020-06-01 08:44:15.000000000 -0700 ++++ rustc-1.44.0-src/Cargo.lock 2020-06-04 15:54:08.234883383 -0700 +@@ -817,7 +817,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1782,16 +1781,6 @@ +@@ -1808,16 +1807,6 @@ ] [[package]] @@ -25,10 +25,10 @@ name = "libssh2-sys" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.43.0-src/src/tools/cargo/Cargo.toml.orig 2020-04-23 13:27:41.781857941 -0700 -+++ rustc-1.43.0-src/src/tools/cargo/Cargo.toml 2020-04-23 13:29:31.355523076 -0700 -@@ -26,7 +26,7 @@ - crossbeam-channel = "0.4" +--- rustc-1.44.0-src/src/tools/cargo/Cargo.toml.orig 2020-06-01 08:44:43.000000000 -0700 ++++ rustc-1.44.0-src/src/tools/cargo/Cargo.toml 2020-06-04 15:54:08.234883383 -0700 +@@ -25,7 +25,7 @@ + crates-io = { path = "crates/crates-io", version = "0.31" } crossbeam-utils = "0.7" crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } @@ -36,9 +36,9 @@ curl-sys = "0.4.22" env_logger = "0.7.0" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-1.43.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-04-20 15:19:12.000000000 -0700 -+++ rustc-1.43.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-04-23 13:27:41.782857920 -0700 -@@ -378,14 +378,8 @@ +--- rustc-1.44.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-06-01 08:44:43.000000000 -0700 ++++ rustc-1.44.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-06-04 15:54:08.234883383 -0700 +@@ -385,14 +385,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. @@ -55,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -483,7 +477,7 @@ +@@ -562,7 +556,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; From 321d5558f45a7153cc7ef2e24f2e3ca18a7f7a8f Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 16 Jul 2020 12:13:45 -0700 Subject: [PATCH 26/30] Update patch to disable http2 --- rust.spec | 2 +- ....patch => rustc-1.45.0-disable-http2.patch | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) rename rustc-1.44.0-disable-http2.patch => rustc-1.45.0-disable-http2.patch (72%) diff --git a/rust.spec b/rust.spec index a81dd75..fbfcb1c 100644 --- a/rust.spec +++ b/rust.spec @@ -72,7 +72,7 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz # libcurl on EL7 doesn't have http2, but since cargo requests it, curl-sys # will try to build it statically -- instead we turn off the feature. -Patch10: rustc-1.44.0-disable-http2.patch +Patch10: rustc-1.45.0-disable-http2.patch # Get the Rust triple for any arch. %{lua: function rust_triple(arch) diff --git a/rustc-1.44.0-disable-http2.patch b/rustc-1.45.0-disable-http2.patch similarity index 72% rename from rustc-1.44.0-disable-http2.patch rename to rustc-1.45.0-disable-http2.patch index d1fec13..0bb5f45 100644 --- a/rustc-1.44.0-disable-http2.patch +++ b/rustc-1.45.0-disable-http2.patch @@ -1,6 +1,6 @@ ---- rustc-1.44.0-src/Cargo.lock.orig 2020-06-01 08:44:15.000000000 -0700 -+++ rustc-1.44.0-src/Cargo.lock 2020-06-04 15:54:08.234883383 -0700 -@@ -817,7 +817,6 @@ +--- rustc-1.45.0-src/Cargo.lock.orig 2020-07-13 09:27:24.000000000 -0700 ++++ rustc-1.45.0-src/Cargo.lock 2020-07-16 12:12:32.253903599 -0700 +@@ -896,7 +896,6 @@ dependencies = [ "cc", "libc", @@ -8,7 +8,7 @@ "libz-sys", "openssl-sys", "pkg-config", -@@ -1808,16 +1807,6 @@ +@@ -1875,16 +1874,6 @@ ] [[package]] @@ -25,10 +25,10 @@ name = "libssh2-sys" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" ---- rustc-1.44.0-src/src/tools/cargo/Cargo.toml.orig 2020-06-01 08:44:43.000000000 -0700 -+++ rustc-1.44.0-src/src/tools/cargo/Cargo.toml 2020-06-04 15:54:08.234883383 -0700 +--- rustc-1.45.0-src/src/tools/cargo/Cargo.toml.orig 2020-07-13 09:27:49.000000000 -0700 ++++ rustc-1.45.0-src/src/tools/cargo/Cargo.toml 2020-07-16 12:12:32.253903599 -0700 @@ -25,7 +25,7 @@ - crates-io = { path = "crates/crates-io", version = "0.31" } + crates-io = { path = "crates/crates-io", version = "0.31.1" } crossbeam-utils = "0.7" crypto-hash = "0.3.1" -curl = { version = "0.4.23", features = ["http2"] } @@ -36,9 +36,9 @@ curl-sys = "0.4.22" env_logger = "0.7.0" pretty_env_logger = { version = "0.4", optional = true } ---- rustc-1.44.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-06-01 08:44:43.000000000 -0700 -+++ rustc-1.44.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-06-04 15:54:08.234883383 -0700 -@@ -385,14 +385,8 @@ +--- rustc-1.45.0-src/src/tools/cargo/src/cargo/core/package.rs.orig 2020-07-13 09:27:49.000000000 -0700 ++++ rustc-1.45.0-src/src/tools/cargo/src/cargo/core/package.rs 2020-07-16 12:12:32.253903599 -0700 +@@ -393,14 +393,8 @@ // Also note that pipelining is disabled as curl authors have indicated // that it's buggy, and we've empirically seen that it's buggy with HTTP // proxies. @@ -55,7 +55,7 @@ Ok(PackageSet { packages: package_ids -@@ -562,7 +556,7 @@ +@@ -563,7 +557,7 @@ macro_rules! try_old_curl { ($e:expr, $msg:expr) => { let result = $e; From 21dcb421281a7c4853d1cd825af9b9248a3a14c0 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Fri, 3 Dec 2021 15:28:58 -0800 Subject: [PATCH 27/30] hide the forged wasi stuff better in epel7 --- rust.spec | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 77900b8..ac21ea9 100644 --- a/rust.spec +++ b/rust.spec @@ -17,14 +17,13 @@ # Only the specified arches will use bootstrap binaries. #global bootstrap_arches %%{rust_arches} +%if 0%{?fedora} # Define a space-separated list of targets to ship rust-std-static-$triple for # cross-compilation. The packages are noarch, but they're not fully # reproducible between hosts, so only x86_64 actually builds it. %ifarch x86_64 -%if 0%{?fedora} %global cross_targets wasm32-unknown-unknown wasm32-wasi %endif -%endif # We need CRT files for *-wasi targets, at least as new as the commit in # src/ci/docker/host-x86_64/dist-various-2/build-wasi-toolchain.sh @@ -34,6 +33,7 @@ %undefine distprefix1 %global wasi_libc_source %{forgesource1} %global wasi_libc_dir %{_builddir}/%{extractdir1} +%endif # Using llvm-static may be helpful as an opt-in, e.g. to aid LLVM rebases. %bcond_with llvm_static @@ -84,7 +84,11 @@ ExclusiveArch: %{rust_arches} %global rustc_package rustc-%{channel}-src %endif Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz + +%if 0%{?fedora} Source1: %{wasi_libc_source} +%endif + # Sources for bootstrap_arches are inserted by lua below # Fix a bad typecast for LLVM globals, rhbz#1990657 From 1eb5552cff2aa0475456e474441ea4e08f990c50 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 20 Feb 2023 11:43:19 -0700 Subject: [PATCH 28/30] Ship rust-toolset for EPEL7 --- rust.spec | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rust.spec b/rust.spec index 4d59f83..1c5be35 100644 --- a/rust.spec +++ b/rust.spec @@ -84,7 +84,7 @@ Name: rust Version: 1.67.1 -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) @@ -548,7 +548,7 @@ feature for the Rust standard library. The RLS (Rust Language Server) uses this data to provide information about the Rust standard library. -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} %package toolset Summary: Rust Toolset @@ -846,7 +846,7 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_* # We don't want Rust copies of LLVM tools (rust-lld, rust-llvm-dwp) rm -f %{buildroot}%{rustlibdir}/%{rust_triple}/bin/rust-ll* -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} # This allows users to build packages using Rust Toolset. %{__install} -D -m 644 %{S:100} %{buildroot}%{rpmmacrodir}/macros.rust-toolset %endif @@ -1033,13 +1033,16 @@ end} %{rustlibdir}/%{rust_triple}/analysis/ -%if 0%{?rhel} && 0%{?rhel} >= 8 +%if 0%{?rhel} %files toolset %{rpmmacrodir}/macros.rust-toolset %endif %changelog +* Mon Feb 20 2023 Orion Poplawski - 1.67.1-2 +- Ship rust-toolset for EPEL7 + * Thu Feb 09 2023 Josh Stone - 1.67.1-1 - Update to 1.67.1. From 9e43cddbbc16295ceba8a36b0d0c29de011a77e0 Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Mon, 20 Feb 2023 15:30:35 -0700 Subject: [PATCH 29/30] Make rust-toolset noarch --- rust.spec | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust.spec b/rust.spec index 1c5be35..360ff10 100644 --- a/rust.spec +++ b/rust.spec @@ -552,8 +552,9 @@ data to provide information about the Rust standard library. %package toolset Summary: Rust Toolset -Requires: rust%{?_isa} = %{version}-%{release} -Requires: cargo%{?_isa} = %{version}-%{release} +BuildArch: noarch +Requires: rust = %{version}-%{release} +Requires: cargo = %{version}-%{release} %description toolset This is the metapackage for Rust Toolset, bringing in the Rust compiler, From 7ada663ebdba9013ea3e20971959116173436158 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Sun, 21 Jan 2024 14:51:38 +0100 Subject: [PATCH 30/30] Enable profiler_builtins for EPEL7 --- rust.spec | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/rust.spec b/rust.spec index 7464c25..c0e7d48 100644 --- a/rust.spec +++ b/rust.spec @@ -85,7 +85,7 @@ Name: rust Version: 1.72.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Rust Programming Language License: (Apache-2.0 OR MIT) AND (Artistic-2.0 AND BSD-3-Clause AND ISC AND MIT AND MPL-2.0 AND Unicode-DFS-2016) # ^ written as: (rust itself) and (bundled libraries) @@ -275,7 +275,7 @@ Requires: %{name}-std-static%{?_isa} = %{version}-%{release} Requires: /usr/bin/cc %if 0%{?epel} == 7 -%global devtoolset_name devtoolset-11 +%global devtoolset_name devtoolset-12 BuildRequires: %{devtoolset_name}-binutils BuildRequires: %{devtoolset_name}-gcc BuildRequires: %{devtoolset_name}-gcc-c++ @@ -340,9 +340,11 @@ find '%{buildroot}%{rustlibdir}'/wasm*/lib -type f -regex '.*\\.\\(a\\|rlib\\)' %{nil} %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 # For profiler_builtins +%if 0%{?fedora} || 0%{?rhel} >= 8 BuildRequires: compiler-rt +%else +BuildRequires: llvm-toolset-14.0-compiler-rt %endif # This component was removed as of Rust 1.69.0. @@ -759,10 +761,12 @@ end} end} %endif -%if 0%{?fedora} || 0%{?rhel} >= 8 # The exact profiler path is version dependent, and uses LLVM-specific # arch names in the filename, but this find is good enough for now... +%if 0%{?fedora} || 0%{?rhel} >= 8 PROFILER=$(find %{_libdir}/clang -type f -name 'libclang_rt.profile-*.a') +%else +PROFILER=$(find /opt/rh/llvm-toolset-14.0/root/%{_libdir}/clang -type f -name 'libclang_rt.profile-*.a') %endif %configure --disable-option-checking \ @@ -1088,6 +1092,9 @@ end} %changelog +* Sun Jan 21 2024 Than Ngo - 1.72.1-2 +- Enable profiler_builtins for EPEL7 + * Tue Sep 19 2023 Josh Stone - 1.72.1-1 - Update to 1.72.1. - Migrated to SPDX license