From 8b926dd634fe967069282ec5fc8b633353a6a12f Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sun, 7 Jul 2019 22:34:53 +0200 Subject: [PATCH] community/rust: upgrade to 1.37.0, enable on aarch64&x86 again Use upstream triplets for now, rust doesn't seem to want to work with our triplets... See https://github.com/rust-lang/rust/issues/62447 --- community/rust/APKBUILD | 36 +-- community/rust/alpine-target.patch | 278 +++++------------- community/rust/cargo-skip-broken-tests.patch | 60 ---- ...go-tests-fix-package-include-exclude.patch | 92 ------ ...minimum_version_with_transitive_deps.patch | 32 -- community/rust/minimize-rpath.patch | 61 ++-- 6 files changed, 124 insertions(+), 435 deletions(-) delete mode 100644 community/rust/cargo-skip-broken-tests.patch delete mode 100644 community/rust/cargo-tests-fix-package-include-exclude.patch delete mode 100644 community/rust/cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch diff --git a/community/rust/APKBUILD b/community/rust/APKBUILD index 849754de5e80..f668d3964bb9 100644 --- a/community/rust/APKBUILD +++ b/community/rust/APKBUILD @@ -4,13 +4,13 @@ # Contributor: Jeizsm # Maintainer: Rasmus Thomsen pkgname=rust -pkgver=1.36.0 +pkgver=1.37.0 _llvmver=8 -_bootver=1.35.0 +_bootver=1.36.0 pkgrel=0 pkgdesc="The Rust Programming Language" url="https://www.rust-lang.org" -arch="x86_64 armv7 armhf" +arch="x86_64 armv7 armhf aarch64 x86" license="Apache-2.0 AND MIT" # gcc is needed at runtime just for linking. Someday rustc might invoke @@ -58,7 +58,7 @@ subpackages=" cargo-doc:_cargo_doc:noarch " source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz - https://exp.exqa.de/alpine-rust/rust-aarch64-$_bootver.tar.xz + https://dist.cogitri.dev/rust-aarch64-1.36.0.tar.xz musl-fix-static-linking.patch musl-fix-linux_musl_base.patch static-pie.patch @@ -68,19 +68,22 @@ source="https://static.rust-lang.org/dist/rustc-$pkgver-src.tar.gz alpine-change-rpath-to-rustlib.patch alpine-target.patch install-template-shebang.patch - cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch check-rustc - cargo-skip-broken-tests.patch link-musl-dynamically.patch musl-dont-use-crt-static.patch " builddir="$srcdir/rustc-$pkgver-src" + # We have to add new arches in multiple steps: # 1. Compile with the upstream triplets, compiling alpine's triplets in # 2. Compile again, now with our triplets selected as build/target, now that # rustc knows about them case "$CARCH" in + x86) + _build="i586-unknown-linux-musl" + _target="$_build" + ;; armv7) _build="armv7-unknown-linux-musleabihf" _target="$_build" @@ -139,15 +142,14 @@ build() { esac ./configure \ - --build=${_build} \ - --host=${_target} \ - --target=${_target} \ + --build="$_build" \ + --host="$_target" \ + --target="$_target" \ --prefix="/usr" \ --release-channel="stable" \ --enable-local-rust \ --local-rust-root="/usr" \ --llvm-root="/usr/lib/llvm$_llvmver" \ - --musl-root="/usr" \ --disable-docs \ --enable-extended \ --tools="analysis,cargo,src" \ @@ -155,7 +157,9 @@ build() { --enable-option-checking \ --enable-locked-deps \ --enable-vendor \ - --disable-full-bootstrap + --disable-full-bootstrap \ + --set="target.$_build.musl-root=/usr" \ + --set="target.$_build.crt-static=false" ./x.py build --jobs ${JOBS:-2} } @@ -300,19 +304,17 @@ _mv() { mv "$@" } -sha512sums="f0bd470a98d2b044c2af40d0c19838c3f7410c4acea5b2f8b5bcf0ca8294917986e7e5aed7d00ea5520e8b03d7130f993e75125576c693ba571feae0d0b961e9 rustc-1.36.0-src.tar.gz -e22bccc770715aaf2a42ea2a09ef24df4f7939f2bdd529538a570db817dcd43e8f7e2ac45412970f1e2aed754d84043a950357e5045172ac64f3aca1c1e86f98 rust-aarch64-1.35.0.tar.xz +sha512sums="d75dd3b664f4467750b93786126051f8a1d33e24823951bbe2a56b2c1f6c829c35dcfb7dbce2f98c5de212d882ab8bccdd99bb57facdb4bc1870eb81de824d74 rustc-1.37.0-src.tar.gz +53971f91e81bbce17480fec199f11ce64a1a600efaf6c81dcef6b9341bad3bafcbb657bc16daa5c846a7750d0c5982acca8e62af449a2a5e5b256391b07f0f23 rust-aarch64-1.36.0.tar.xz f5aa0124618acc0176dc30b2fab6d15327c1978db55ccf2074d1db88e0a1bbdaebc0bcdcfd5a8554964edb51be9830c6db64bc99f237463488a45c9804170a4e musl-fix-static-linking.patch a2871fa75fb63570031eda80390461a137fe31ba82bf253caeabf3fb6673b4c80b535917dde139a300fb6d5f8c14fe09c8f7aaf4a506ef5e837540cf00aaa977 musl-fix-linux_musl_base.patch 97e81c57af93df550577f41d795185a9eb0c37528776c250076cc57f06c87e81139eb71cd6b6a4730528511821ae50c304d7deb534d6422cd08bb44193ae605d static-pie.patch d4659b56dbf1218da98b995a0a89a8cfd069dd94b3e9aef4aee987484d96fc8b92f6d695ea4123eff26711961f2db2f7324bf5b4043f41722cd89581aac97f1c need-rpath.patch -7c190c0d47934d91605f89ec2caef597477b154f59e66e032b986cfc2e1db4e5b3fc5cdc1f0178f064b4ac314f692569533a45640b1578aadead9fa6ab999f73 minimize-rpath.patch +e90e544d2413ae79c553bb1d82eac9b41eb2a7c7ffb7cb28dc3573418bd453c27dcc48f38ce4b8e33bb994b5481db70303c707231b7d4f7fde561bebf0838f21 minimize-rpath.patch 35e0619672843d9dd41df4a086404a59b57c12fa014e42d06102bc3856a96ed021e716f9d581ec5c89444acbaedd3edcd2b8a85576df3bb4451c0edde3afbba5 alpine-move-py-scripts-to-share.patch 4f5746acb08c18f749691a8455cc81ea2e9a361621790b006b884c9c895ab9e51a001b6638bed071a9af5c232ed8d1b43c58260839a3f6dce4eec3f495ce4348 alpine-change-rpath-to-rustlib.patch -4d4262efd3b679722070268e2d054c433d395200797bb0b45dbf73580d6fe0784b56a3462154a6ada28cd2bb1396dea15516b1e7262e6901feaa8a8ae7ebbb18 alpine-target.patch +080c3c1af15936c3795724d3cf0f60798ef470bce898e43b6757843bf56f6d46de3dd5b9ea3b116b2011b40373cf8daf17abc94cfff4bdb6221bd431aa0844fd alpine-target.patch 7d59258d4462eba0207739a5c0c8baf1f19d9a396e5547bb4d59d700eb94d50ba6add2e523f3e94e29e993821018594625ea4ac86304fb58f7f8c82622a26ab0 install-template-shebang.patch -3d6f027088e1ec189ce864bf5ed150ccad8be5d9fc0973f1b4d202eec6eab865834403335a9f0765bbfa54638aed7f5d5f2183ba9dfeab9f5bc4ef48111a8427 cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch c31fdfe8a9b3411576c75da46645cf0465b9053000a2ab49cf9b2f2733f679d6d33acbf236d67a20e14935d094a685453b7f1840180249f39d610fd0902c3125 check-rustc -afca9b5524e270b6ddad4b2c99bba9a5f156a2411b04a9ca5802b185b50420de70555bb2526dcb4d5b12b29ff30afa2fe461d1de83b5345dd8e4ccf52e875c3f cargo-skip-broken-tests.patch 78484210917af128a0fa1cfd762b937e2ff047764829e4ba5a10c1f4589bfb2420bf183b039ef88d8d9a2a60e5e150b7e1cd7e7aa1b1154baa2034d485a8a3bf link-musl-dynamically.patch 795194976763326c5e4a9eefc8b651b6d5fb533d2d000631ed48a92bafac90e9ca33b8d662e6c53ef109ea1a90c69def715d7d7154e3f9fb9035a58a313a7db3 musl-dont-use-crt-static.patch" diff --git a/community/rust/alpine-target.patch b/community/rust/alpine-target.patch index 6b8f9da678e6..ea1113247f08 100644 --- a/community/rust/alpine-target.patch +++ b/community/rust/alpine-target.patch @@ -1,4 +1,4 @@ -From: Shiz , updated by Rasmus Thomsen on 6th of July 2019 +From: Shiz , updated by Rasmus Thomsen on 28th of July 2019 Date: Thu, 20 Aug 2017 01:52:36 +0200 Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200 Subject: [PATCH] Add Alpine targets @@ -23,229 +23,99 @@ and distribution-specific quirks instead of polluting the main musl target of ("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32), ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), --- /dev/null -+++ b/src/librustc_target/spec/i586_alpine_linux_musl.rs -@@ -0,0 +1,35 @@ -+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -+// file at the top-level directory of this distribution and at -+// http://rust-lang.org/COPYRIGHT. -+// -+// Licensed under the Apache License, Version 2.0 or the MIT license -+// , at your -+// option. This file may not be copied, modified, or distributed -+// except according to those terms. -+ -+use crate::spec::{LinkerFlavor, Target, TargetResult}; ++++ b/src/librustc_target/spec/aarch64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::TargetResult; + +pub fn target() -> TargetResult { -+ let mut base = super::linux_musl_base::opts(); -+ base.cpu = "pentium4".to_string(); -+ base.max_atomic_width = Some(64); -+ base.stack_probes = true; -+ base.crt_static_default = false; -+ base.static_position_independent_executables = true; -+ base.need_rpath = true; -+ -+ Ok(Target { -+ llvm_target: "i586-alpine-linux-musl".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "32".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(), -+ arch: "x86".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "alpine".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ options: base, -+ }) ++ let mut base = super::aarch64_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "aarch64-alpine-linux-musl".to_string(); ++ base.target_vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ Ok(base) +} --- /dev/null -+++ b/src/librustc_target/spec/x86_64_alpine_linux_musl.rs -@@ -0,0 +1,35 @@ -+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -+// file at the top-level directory of this distribution and at -+// http://rust-lang.org/COPYRIGHT. -+// -+// Licensed under the Apache License, Version 2.0 or the MIT license -+// , at your -+// option. This file may not be copied, modified, or distributed -+// except according to those terms. -+ -+use crate::spec::{LinkerFlavor, Target, TargetResult}; ++++ b/src/librustc_target/spec/armv6_alpine_linux_musleabihf.rs +@@ -0,0 +1,13 @@ ++use crate::spec::TargetResult; + +pub fn target() -> TargetResult { -+ let mut base = super::linux_musl_base::opts(); -+ base.cpu = "x86-64".to_string(); -+ base.max_atomic_width = Some(64); -+ base.stack_probes = true; -+ base.crt_static_default = false; -+ base.static_position_independent_executables = true; -+ base.need_rpath = true; -+ -+ Ok(Target { -+ llvm_target: "x86_64-alpine-linux-musl".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "64".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(), -+ arch: "x86_64".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "alpine".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ options: base, -+ }) ++ let mut base = super::arm_unknown_linux_musleabihf::target()?; ++ ++ base.llvm_target = "armv6-alpine-linux-musleabihf".to_string(); ++ base.target_vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ Ok(base) +} --- /dev/null -+++ b/src/librustc_target/spec/aarch64_alpine_linux_musl.rs -@@ -0,0 +1,36 @@ -+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -+// file at the top-level directory of this distribution and at -+// http://rust-lang.org/COPYRIGHT. -+// -+// Licensed under the Apache License, Version 2.0 or the MIT license -+// , at your -+// option. This file may not be copied, modified, or distributed -+// except according to those terms. -+ -+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; ++++ b/src/librustc_target/spec/armv7_alpine_linux_musleabihf.rs +@@ -0,0 +1,13 @@ ++use crate::spec::TargetResult; + +pub fn target() -> TargetResult { -+ let mut base = super::linux_musl_base::opts(); -+ base.max_atomic_width = Some(128); -+ base.crt_static_default = false; -+ base.static_position_independent_executables = true; -+ base.need_rpath = true; -+ -+ Ok(Target { -+ llvm_target: "aarch64-alpine-linux-musl".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "64".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), -+ arch: "aarch64".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "alpine".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ options: TargetOptions { -+ abi_blacklist: super::arm_base::abi_blacklist(), -+ .. base -+ }, -+ }) ++ let mut base = super::armv7_unknown_linux_musleabihf::target()?; ++ ++ base.llvm_target = "armv7-alpine-linux-musleabihf".to_string(); ++ base.target_vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ Ok(base) +} --- /dev/null -+++ b/src/librustc_target/spec/armv6_alpine_linux_musleabihf.rs -@@ -0,0 +1,41 @@ -+// Copyright 2017 The Rust Project Developers. See the COPYRIGHT -+// file at the top-level directory of this distribution and at -+// http://rust-lang.org/COPYRIGHT. -+// -+// Licensed under the Apache License, Version 2.0 or the MIT license -+// , at your -+// option. This file may not be copied, modified, or distributed -+// except according to those terms. -+ -+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; ++++ b/src/librustc_target/spec/i586_alpine_linux_musl.rs +@@ -0,0 +1,14 @@ ++use crate::spec::TargetResult; + +pub fn target() -> TargetResult { -+ let mut base = super::linux_musl_base::opts(); -+ -+ // Most of these settings are copied from the arm_unknown_linux_gnueabihf -+ // target. -+ base.features = "+v6,+vfp2".to_string(); -+ base.max_atomic_width = Some(64); -+ base.crt_static_default = false; -+ base.static_position_independent_executables = true; -+ base.need_rpath = true; -+ -+ Ok(Target { -+ llvm_target: "arm-alpine-linux-musleabihf".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "32".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), -+ arch: "arm".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "alpine".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ options: TargetOptions { -+ abi_blacklist: super::arm_base::abi_blacklist(), -+ target_mcount: "\u{1}mcount".to_string(), -+ .. base -+ }, -+ }) ++ let mut base = super::i686_unknown_linux_musl::target()?; ++ ++ base.options.cpu = "pentium4".to_string(); ++ base.llvm_target = "i586-alpine-linux-musl".to_string(); ++ base.target_vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ Ok(base) +} --- /dev/null -+++ b/src/librustc_target/spec/armv7_alpine_linux_musleabihf.rs -@@ -0,0 +1,34 @@ -+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; -+ -+// This target is for musl Linux on ARMv7 without thumb-mode or NEON. ++++ b/src/librustc_target/spec/powerpc64le_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::TargetResult; + +pub fn target() -> TargetResult { -+ let mut base = super::linux_musl_base::opts(); -+ base.crt_static_default = false; -+ base.static_position_independent_executables = true; -+ base.need_rpath = true; -+ -+ Ok(Target { -+ llvm_target: "armv7-unknown-linux-muslabihf".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "32".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), -+ arch: "arm".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "alpine".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ -+ // Most of these settings are copied from the armv7_unknown_linux_gnueabihf -+ // target. -+ options: TargetOptions { -+ features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(), -+ cpu: "generic".to_string(), -+ max_atomic_width: Some(64), -+ abi_blacklist: super::arm_base::abi_blacklist(), -+ target_mcount: "\u{1}mcount".to_string(), -+ .. base -+ } -+ }) ++ let mut base = super::powerpc64le_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "powerpc64le-alpine-linux-musl".to_string(); ++ base.target_vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ Ok(base) +} --- /dev/null -+++ b/src/librustc_target/spec/powerpc64le_alpine_linux_musl.rs -@@ -0,0 +1,28 @@ -+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult}; ++++ b/src/librustc_target/spec/x86_64_alpine_linux_musl.rs +@@ -0,0 +1,13 @@ ++use crate::spec::TargetResult; + +pub fn target() -> TargetResult { -+ let mut base = super::linux_musl_base::opts(); -+ base.cpu = "ppc64le".to_string(); -+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); -+ base.max_atomic_width = Some(64); -+ base.crt_static_default = false; -+ base.static_position_independent_executables = true; -+ base.need_rpath = true; -+ -+ Ok(Target { -+ llvm_target: "powerpc64le-alpine-linux-musl".to_string(), -+ target_endian: "little".to_string(), -+ target_pointer_width: "64".to_string(), -+ target_c_int_width: "32".to_string(), -+ data_layout: "e-m:e-i64:64-n32:64".to_string(), -+ arch: "powerpc64".to_string(), -+ target_os: "linux".to_string(), -+ target_env: "musl".to_string(), -+ target_vendor: "alpine".to_string(), -+ linker_flavor: LinkerFlavor::Gcc, -+ options: TargetOptions { -+ target_mcount: "_mcount".to_string(), -+ .. base -+ }, -+ }) ++ let mut base = super::x86_64_unknown_linux_musl::target()?; ++ ++ base.llvm_target = "x86_64-alpine-linux-musl".to_string(); ++ base.target_vendor = "alpine".to_string(); ++ base.options.crt_static_default = false; ++ base.options.static_position_independent_executables = true; ++ base.options.need_rpath = true; ++ ++ Ok(base) +} diff --git a/community/rust/cargo-skip-broken-tests.patch b/community/rust/cargo-skip-broken-tests.patch deleted file mode 100644 index 425d69d84660..000000000000 --- a/community/rust/cargo-skip-broken-tests.patch +++ /dev/null @@ -1,60 +0,0 @@ -diff --git a/src/tools/cargo/tests/testsuite/new.rs b/src/tools/cargo/tests/testsuite/new.rs.new -index 52e327e36c..416ff58671 100644 ---- a/src/tools/cargo/tests/testsuite/new.rs -+++ b/src/tools/cargo/tests/testsuite/new.rs.new -@@ -154,6 +154,7 @@ fn keyword_name() { - ).run(); - } - -+#[ignore] - #[test] - fn finds_author_user() { - create_empty_gitconfig(); -@@ -168,6 +169,7 @@ fn finds_author_user() { - assert!(contents.contains(r#"authors = ["foo"]"#)); - } - -+#[ignore] - #[test] - fn finds_author_user_escaped() { - create_empty_gitconfig(); -@@ -182,6 +184,7 @@ fn finds_author_user_escaped() { - assert!(contents.contains(r#"authors = ["foo \"bar\""]"#)); - } - -+#[ignore] - #[test] - fn finds_author_username() { - create_empty_gitconfig(); -@@ -217,6 +220,7 @@ fn finds_author_priority() { - assert!(contents.contains(r#"authors = ["bar "]"#)); - } - -+#[ignore] - #[test] - fn finds_author_email() { - create_empty_gitconfig(); -@@ -234,6 +238,7 @@ fn finds_author_email() { - assert!(contents.contains(r#"authors = ["bar "]"#)); - } - -+#[ignore] - #[test] - fn finds_author_git() { - git_process("config --global user.name bar").exec().unwrap(); -@@ -289,6 +294,7 @@ fn finds_git_email() { - assert!(contents.contains(r#"authors = ["foo "]"#), contents); - } - -+#[ignore] - #[test] - fn finds_git_author() { - create_empty_gitconfig(); -@@ -337,6 +343,7 @@ fn author_prefers_cargo() { - assert!(!root.join("foo/.gitignore").exists()); - } - -+#[ignore] - #[test] - fn strip_angle_bracket_author_email() { - create_empty_gitconfig(); diff --git a/community/rust/cargo-tests-fix-package-include-exclude.patch b/community/rust/cargo-tests-fix-package-include-exclude.patch deleted file mode 100644 index 4cdf21314b89..000000000000 --- a/community/rust/cargo-tests-fix-package-include-exclude.patch +++ /dev/null @@ -1,92 +0,0 @@ -From dd998a096b0e04bea7d84a8e975d84d820b725f0 Mon Sep 17 00:00:00 2001 -From: Ximin Luo -Date: Sun, 4 Nov 2018 08:59:20 -0800 -Subject: [PATCH] Fix package::include/exclude tests so they work even if - running them not in cargo.git - ---- - src/tools/cargo/tests/testsuite/package.rs | 22 ++++++++++++++-------- - 1 file changed, 14 insertions(+), 8 deletions(-) - -diff --git a/src/tools/cargo/tests/testsuite/package.rs b/src/tools/cargo/tests/testsuite/package.rs -index b9c1cae045..d34951f89b 100644 ---- a/src/tools/cargo/tests/testsuite/package.rs -+++ b/src/tools/cargo/tests/testsuite/package.rs -@@ -285,7 +285,8 @@ dependency `bar` does not specify a version. - - #[test] - fn exclude() { -- let p = project() -+ let root = paths::root().join("exclude"); -+ let repo = git::repo(&root) - .file("Cargo.toml", r#" - [project] - name = "foo" -@@ -348,7 +349,8 @@ fn exclude() { - .file("some_dir/dir_deep_5/some_dir/file", "") - .build(); - -- p.cargo("package --no-verify -v") -+ cargo_process("package --no-verify -v") -+ .cwd(repo.root()) - .with_stdout("") - .with_stderr( - "\ -@@ -366,7 +368,6 @@ See [..] - See [..] - [WARNING] [..] file `some_dir/file_deep_1` WILL be excluded [..] - See [..] --[WARNING] No (git) Cargo.toml found at `[..]` in workdir `[..]` - [PACKAGING] foo v0.0.1 ([..]) - [ARCHIVING] [..] - [ARCHIVING] [..] -@@ -386,14 +387,17 @@ See [..] - [ARCHIVING] [..] - [ARCHIVING] [..] - [ARCHIVING] [..] -+[ARCHIVING] .cargo_vcs_info.json - ", - ).run(); - -- assert!(p.root().join("target/package/foo-0.0.1.crate").is_file()); -+ assert!(repo.root().join("target/package/foo-0.0.1.crate").is_file()); - -- p.cargo("package -l") -+ cargo_process("package -l") -+ .cwd(repo.root()) - .with_stdout( - "\ -+.cargo_vcs_info.json - Cargo.toml - dir_root_1/some_dir/file - dir_root_2/some_dir/file -@@ -418,7 +422,8 @@ src/main.rs - - #[test] - fn include() { -- let p = project() -+ let root = paths::root().join("include"); -+ let repo = git::repo(&root) - .file("Cargo.toml", r#" - [project] - name = "foo" -@@ -432,16 +437,17 @@ fn include() { - .file("src/bar.txt", "") // should be ignored when packaging - .build(); - -- p.cargo("package --no-verify -v") -+ cargo_process("package --no-verify -v") -+ .cwd(repo.root()) - .with_stderr( - "\ - [WARNING] manifest has no description[..] - See http://doc.crates.io/manifest.html#package-metadata for more info. --[WARNING] No (git) Cargo.toml found at `[..]` in workdir `[..]` - [PACKAGING] foo v0.0.1 ([..]) - [ARCHIVING] [..] - [ARCHIVING] [..] - [ARCHIVING] [..] -+[ARCHIVING] .cargo_vcs_info.json - ", - ).run(); - } diff --git a/community/rust/cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch b/community/rust/cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch deleted file mode 100644 index d8d6a10b22bb..000000000000 --- a/community/rust/cargo-tests-ignore-resolving_minimum_version_with_transitive_deps.patch +++ /dev/null @@ -1,32 +0,0 @@ -This test is probably broken, ignore it for now. - - thread 'resolve::test_resolving_minimum_version_with_transitive_deps' - panicked at 'called `Result::unwrap()` on an `Err` value: - ErrorMessage { msg: "the `-Z` flag is only accepted on the nightly channel of Cargo" } - - stack backtrace: - 0: 0x562c29c6f9ec - backtrace::backtrace::trace::h6219b4e271e2bbe6 - 1: 0x562c29c6e302 - backtrace::capture::Backtrace::new_unresolved::h8d9c4862e2ea3928 - 2: 0x562c29c6df25 - failure::backtrace::internal::InternalBacktrace::new::h749290dead787373 - 3: 0x562c29c6d9e1 - failure::backtrace::Backtrace::new::hc2e5a373190e1710 - 4: 0x562c29ba26eb - cargo::core::features::CliUnstable::parse::h30f39ff567c7869c - 5: 0x562c29be560b - cargo::util::config::Config::configure::hae0b13d11622f31e - 6: 0x562c299a0461 - testsuite::resolve::test_resolving_minimum_version_with_transitive_deps::hec5b2ebc1f7900a2 - 7: 0x562c29a653d8 - core::ops::function::FnOnce::call_once::hbe08dbf200c0490c - 8: 0x562c29b63be1 - test::run_test::{{closure}}::h3bfbae1658ea152d - at libtest/lib.rs:1453 - - core::ops::function::FnOnce::call_once::h3e2023796b061538 - at src/libcore/ops/function.rs:223 - - >::call_box::h746d3bbd114f184c - at src/liballoc/boxed.rs:784 - ---- a/src/tools/cargo/tests/testsuite/resolve.rs -+++ b/src/tools/cargo/tests/testsuite/resolve.rs -@@ -341,6 +341,7 @@ - } - - #[test] -+#[ignore] - fn test_resolving_minimum_version_with_transitive_deps() { - // When the minimal-versions config option is specified then the lowest - // possible version of a package should be selected. "util 1.0.0" can't be diff --git a/community/rust/minimize-rpath.patch b/community/rust/minimize-rpath.patch index 442e6698e7d7..ccc9ccae59b9 100644 --- a/community/rust/minimize-rpath.patch +++ b/community/rust/minimize-rpath.patch @@ -66,34 +66,35 @@ and skip it there. } // This routine is adapted from the *old* Path's `path_relative_from` -@@ -227,6 +236,7 @@ - #[test] - fn test_rpath_relative() { - if cfg!(target_os = "macos") { -+ let omit = Vec::new(); - let config = &mut RPathConfig { - used_crates: Vec::new(), - has_rpath: true, -@@ -236,9 +246,11 @@ - get_install_prefix_lib_path: &mut || panic!(), - }; - let res = get_rpath_relative_to_output(config, -- Path::new("lib/libstd.so")); -+ Path::new("lib/libstd.so"), -+ &omit); - assert_eq!(res, "@loader_path/../lib"); - } else { -+ let omit = Vec::new(); - let config = &mut RPathConfig { - used_crates: Vec::new(), - out_filename: PathBuf::from("bin/rustc"), -@@ -248,7 +260,8 @@ - linker_is_gnu: true, - }; - let res = get_rpath_relative_to_output(config, -- Path::new("lib/libstd.so")); -+ Path::new("lib/libstd.so"), -+ &omit); - assert_eq!(res, "$ORIGIN/../lib"); - } +--- a/src/librustc_codegen_ssa/back/rpath/tests.rs ++++ b/src/librustc_codegen_ssa/back/rpath/tests.rs +@@ -50,6 +50,8 @@ + + #[test] + fn test_rpath_relative() { ++ let omit = Vec::new(); ++ + if cfg!(target_os = "macos") { + let config = &mut RPathConfig { + used_crates: Vec::new(), +@@ -60,7 +62,8 @@ + get_install_prefix_lib_path: &mut || panic!(), + }; + let res = get_rpath_relative_to_output(config, +- Path::new("lib/libstd.so")); ++ Path::new("lib/libstd.so"), ++ &omit); + assert_eq!(res, "@loader_path/../lib"); + } else { + let config = &mut RPathConfig { +@@ -72,7 +75,8 @@ + linker_is_gnu: true, + }; + let res = get_rpath_relative_to_output(config, +- Path::new("lib/libstd.so")); ++ Path::new("lib/libstd.so"), ++ &omit); + assert_eq!(res, "$ORIGIN/../lib"); } + } +