From patchwork Thu Feb 28 03:53:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Petkov X-Patchwork-Id: 1254 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 3C7F116CC4; Thu, 28 Feb 2019 03:55:18 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_DKIM_INVALID,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 7FA8716CC2 for ; Thu, 28 Feb 2019 03:55:17 +0000 (GMT) Received: from localhost ([127.0.0.1]:59746 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzCmy-0003ku-WF for patchwork@mira.cbaines.net; Wed, 27 Feb 2019 22:55:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46363) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzCms-0003kV-I7 for guix-patches@gnu.org; Wed, 27 Feb 2019 22:55:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzCmq-00042k-Nm for guix-patches@gnu.org; Wed, 27 Feb 2019 22:55:10 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41144) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzCmk-0003oF-Lk for guix-patches@gnu.org; Wed, 27 Feb 2019 22:55:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gzCmk-0006nF-EF for guix-patches@gnu.org; Wed, 27 Feb 2019 22:55:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#34682] [PATCH] gnu: rust: Update to 1.31.1 Resent-From: Ivan Petkov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Feb 2019 03:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 34682 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 34682@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155132604826049 (code B ref -1); Thu, 28 Feb 2019 03:55:02 +0000 Received: (at submit) by debbugs.gnu.org; 28 Feb 2019 03:54:08 +0000 Received: from localhost ([127.0.0.1]:54688 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzClk-0006lg-Ad for submit@debbugs.gnu.org; Wed, 27 Feb 2019 22:54:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:60013) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gzCle-0006lP-BR for submit@debbugs.gnu.org; Wed, 27 Feb 2019 22:53:58 -0500 Received: from lists.gnu.org ([209.51.188.17]:59962) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzClV-0001s6-JQ for submit@debbugs.gnu.org; Wed, 27 Feb 2019 22:53:48 -0500 Received: from eggs.gnu.org ([209.51.188.92]:46162) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzClT-0003aG-Lr for guix-patches@gnu.org; Wed, 27 Feb 2019 22:53:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzClL-0001cv-Or for guix-patches@gnu.org; Wed, 27 Feb 2019 22:53:39 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:39098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzClE-0001I1-BT for guix-patches@gnu.org; Wed, 27 Feb 2019 22:53:31 -0500 Received: by mail-pg1-x541.google.com with SMTP id h8so8495688pgp.6 for ; Wed, 27 Feb 2019 19:53:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:cc:to :message-id; bh=1isj9eneGBUALzWjcgDWmtsbrWs3t3awUUvahkZXeZ0=; b=oRSDk76TdLIi+LmXC9Wz42ITD4qaI72sbLMIC2B0AE95f1V71ty93/KsMcSp2zBpjP QRgdmXOxO2ior3sJbPPWinHWPtP3NrI8rtW9xjVlvItS4Rs7PPfOddebkHDNmro+xDXX r1TXcoD9jO2iW0521zmVP7i/XInbpjgq8cJyvmx/mK4aWVAdXPVioj3M0KX8UfYgNeRA 9PbhqwYzrSGoL269QUgJlI1zw9T9qC1bw/vJFCOCRdrLw39lQtYzGSrH8JUxyEDjVocP VPBlgRNHv0BtXlU12B7SLYVqYH9Kg/BZkdcZbg9IDK+x73e4fdNtI+U5JE7CBQm9Tg2R U2vQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:cc:to:message-id; bh=1isj9eneGBUALzWjcgDWmtsbrWs3t3awUUvahkZXeZ0=; b=Xbapa82fzmGM245puCKwYOsp8T0JnIJEeRIeYHNQJFmjdVby4z4MyLQF9yqFE3m4GY z+7QELEPrYvkqCDD9tYw5ZNg7CVz/wd05izYSAnheQBR9OIRdsCEQIvMHv1xy4M+hUty AQqEGSmZtBTuOWRceYUtnR9lYEOnQuWxqFOj9wGHkQW5EHj2UU72ConbYHvN1UDQTK8X HlPpmmBgx4xCU1IJ6CcUMldljOIbpc5ufW+mDihIL6cgm9wHr8IBOnYMrtHWQAPbsQvf db+GBVUvL63bSZm2C+udBTiz0PyzRjPbep1OmHTNbFRejzDENtr7sUc/DfEDpzmdaLyt UH1g== X-Gm-Message-State: AHQUAua/4ZHTwfYZjB+p95uKDsNraHN8rMLepMFBxFSNiHBlSIE21lb8 BlGzo6Ys0DmJqgt1MxpIAiLiTtBMz0s= X-Google-Smtp-Source: AHgI3Ia7ZtUry+y5q/AwF5qEYsjJmG7Ky2x2d30l4EWqRWZM2bsgCUg/Cg8ZCJIxTZPCyzoCJbJFXw== X-Received: by 2002:a63:1014:: with SMTP id f20mr6428493pgl.293.1551326003726; Wed, 27 Feb 2019 19:53:23 -0800 (PST) Received: from ?IPv6:2601:602:9a00:1784:893d:176:59af:52f4? ([2601:602:9a00:1784:893d:176:59af:52f4]) by smtp.gmail.com with ESMTPSA id k64sm53144297pfj.69.2019.02.27.19.53.22 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Feb 2019 19:53:23 -0800 (PST) From: Ivan Petkov Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Date: Wed, 27 Feb 2019 19:53:21 -0800 Message-Id: <7F8D506B-8F03-4BD0-AEC2-BA7E1835365D@gmail.com> X-Mailer: Apple Mail (2.3445.9.1) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/patches/rust-gdb-llvm.patch: new file * gnu/packages/rust.scm (rust): Rename to... (rust-1.29): ... this. (rust-1.30): new variable (rust): new variable --- gnu/local.mk | 1 + gnu/packages/patches/rust-gdb-llvm.patch | 89 ++++++++++++++++++++++++ gnu/packages/rust.scm | 83 +++++++++++++++++++++- 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/rust-gdb-llvm.patch diff --git a/gnu/local.mk b/gnu/local.mk index 73472fdc50..c17dcc2f14 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1221,6 +1221,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-1.25-accept-more-detailed-gdb-lines.patch \ %D%/packages/patches/rust-bootstrap-stage0-test.patch \ %D%/packages/patches/rust-coresimd-doctest.patch \ + %D%/packages/patches/rust-gdb-llvm.patch \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ diff --git a/gnu/packages/patches/rust-gdb-llvm.patch b/gnu/packages/patches/rust-gdb-llvm.patch new file mode 100644 index 0000000000..e8f0acc8b4 --- /dev/null +++ b/gnu/packages/patches/rust-gdb-llvm.patch @@ -0,0 +1,89 @@ +Tweak some gdb tests which were broken during LLVM upgrades. +This has been subsequently fixed upstream in later rustc versions, +but still needed to bootstrap some earlier versions of the compiler. + +diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs +--- rustc-1.30.1-src-orig/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 12:49:34.055483896 -0800 ++++ rustc-1.30.1-src/src/test/debuginfo/borrowed-c-style-enum.rs 2019-02-04 13:01:10.915950356 -0800 +@@ -18,15 +18,15 @@ + + // gdb-command:print *the_a_ref + // gdbg-check:$1 = TheA +-// gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA ++// gdbr-check:$1 = borrowed_c_style_enum::TheA + + // gdb-command:print *the_b_ref + // gdbg-check:$2 = TheB +-// gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB ++// gdbr-check:$2 = borrowed_c_style_enum::TheB + + // gdb-command:print *the_c_ref + // gdbg-check:$3 = TheC +-// gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC ++// gdbr-check:$3 = borrowed_c_style_enum::TheC + + + // === LLDB TESTS ================================================================================== +diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs +--- rustc-1.30.1-src-orig/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 12:49:34.051483727 -0800 ++++ rustc-1.30.1-src/src/test/debuginfo/c-style-enum-in-composite.rs 2019-02-04 13:02:00.981997525 -0800 +@@ -19,31 +19,31 @@ + + // gdb-command:print tuple_interior_padding + // gdbg-check:$1 = {__0 = 0, __1 = OneHundred} +-// gdbr-check:$1 = (0, c_style_enum_in_composite::AnEnum::OneHundred) ++// gdbr-check:$1 = (0, c_style_enum_in_composite::OneHundred) + + // gdb-command:print tuple_padding_at_end + // gdbg-check:$2 = {__0 = {__0 = 1, __1 = OneThousand}, __1 = 2} +-// gdbr-check:$2 = ((1, c_style_enum_in_composite::AnEnum::OneThousand), 2) ++// gdbr-check:$2 = ((1, c_style_enum_in_composite::OneThousand), 2) + + // gdb-command:print tuple_different_enums + // gdbg-check:$3 = {__0 = OneThousand, __1 = MountainView, __2 = OneMillion, __3 = Vienna} +-// gdbr-check:$3 = (c_style_enum_in_composite::AnEnum::OneThousand, c_style_enum_in_composite::AnotherEnum::MountainView, c_style_enum_in_composite::AnEnum::OneMillion, c_style_enum_in_composite::AnotherEnum::Vienna) ++// gdbr-check:$3 = (c_style_enum_in_composite::OneThousand, c_style_enum_in_composite::MountainView, c_style_enum_in_composite::OneMillion, c_style_enum_in_composite::Vienna) + + // gdb-command:print padded_struct + // gdbg-check:$4 = {a = 3, b = OneMillion, c = 4, d = Toronto, e = 5} +-// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::AnEnum::OneMillion, c: 4, d: c_style_enum_in_composite::AnotherEnum::Toronto, e: 5} ++// gdbr-check:$4 = c_style_enum_in_composite::PaddedStruct {a: 3, b: c_style_enum_in_composite::OneMillion, c: 4, d: c_style_enum_in_composite::Toronto, e: 5} + + // gdb-command:print packed_struct + // gdbg-check:$5 = {a = 6, b = OneHundred, c = 7, d = Vienna, e = 8} +-// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::AnEnum::OneHundred, c: 7, d: c_style_enum_in_composite::AnotherEnum::Vienna, e: 8} ++// gdbr-check:$5 = c_style_enum_in_composite::PackedStruct {a: 6, b: c_style_enum_in_composite::OneHundred, c: 7, d: c_style_enum_in_composite::Vienna, e: 8} + + // gdb-command:print non_padded_struct + // gdbg-check:$6 = {a = OneMillion, b = MountainView, c = OneThousand, d = Toronto} +-// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::AnEnum::OneMillion, b: c_style_enum_in_composite::AnotherEnum::MountainView, c: c_style_enum_in_composite::AnEnum::OneThousand, d: c_style_enum_in_composite::AnotherEnum::Toronto} ++// gdbr-check:$6 = c_style_enum_in_composite::NonPaddedStruct {a: c_style_enum_in_composite::OneMillion, b: c_style_enum_in_composite::MountainView, c: c_style_enum_in_composite::OneThousand, d: c_style_enum_in_composite::Toronto} + + // gdb-command:print struct_with_drop + // gdbg-check:$7 = {__0 = {a = OneHundred, b = Vienna}, __1 = 9} +-// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::AnEnum::OneHundred, b: c_style_enum_in_composite::AnotherEnum::Vienna}, 9) ++// gdbr-check:$7 = (c_style_enum_in_composite::StructWithDrop {a: c_style_enum_in_composite::OneHundred, b: c_style_enum_in_composite::Vienna}, 9) + + // === LLDB TESTS ================================================================================== + +diff -r -u rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs +--- rustc-1.30.1-src-orig/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 12:49:34.043483393 -0800 ++++ rustc-1.30.1-src/src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs 2019-02-04 13:02:17.954691634 -0800 +@@ -27,15 +27,15 @@ + + // gdb-command: print c_style_enum1 + // gdbg-check:$3 = CStyleEnumVar1 +-// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar1 ++// gdbr-check:$3 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar1 + + // gdb-command: print c_style_enum2 + // gdbg-check:$4 = CStyleEnumVar2 +-// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar2 ++// gdbr-check:$4 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar2 + + // gdb-command: print c_style_enum3 + // gdbg-check:$5 = CStyleEnumVar3 +-// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnum::CStyleEnumVar3 ++// gdbr-check:$5 = gdb_pretty_struct_and_enums_pre_gdb_7_7::CStyleEnumVar3 + + #![allow(dead_code, unused_variables)] diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 111f74e4ec..dc8600a5e4 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -783,7 +783,7 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" ;; The thinlto test should pass with llvm 6. (delete 'disable-thinlto-test)))))))) -(define-public rust +(define-public rust-1.29 (let ((base-rust (rust-bootstrapped-package rust-1.28 "1.29.2" "1jb787080z754caa2w3w1amsygs4qlzj9rs1vy64firfmabfg22h" @@ -792,3 +792,84 @@ jemalloc = \"" jemalloc "/lib/libjemalloc_pic.a" "\" "rust-reproducible-builds.patch")))) (package (inherit base-rust)))) + +(define-public rust-1.30 + (let ((base-rust + (rust-bootstrapped-package rust-1.29 "1.30.1" + "0aavdc1lqv0cjzbqwl5n59yd0bqdlhn0zas61ljf38yrvc18k8rn" + #:patches + '("rust-1.25-accept-more-detailed-gdb-lines.patch" + "rust-gdb-llvm.patch" + "rust-reproducible-builds.patch")))) + (package + (inherit base-rust) + (inputs + ;; Use LLVM 7.0 + (alist-replace "llvm" (list llvm) + (package-inputs base-rust))) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'patch-cargo-tests 'patch-cargo-env-shebang + (lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils"))) + (substitute* "src/tools/cargo/tests/testsuite/fix.rs" + ;; Cargo has a test which explicitly sets a + ;; RUSTC_WRAPPER environment variable which points + ;; to /usr/bin/env. Since it's not a shebang, it + ;; needs to be manually patched + (("\"/usr/bin/env\"") + (string-append "\"" coreutils "/bin/env\""))) + #t))) + (add-after 'patch-cargo-env-shebang 'ignore-cargo-package-tests + (lambda* _ + (substitute* "src/tools/cargo/tests/testsuite/package.rs" + ;; These tests largely check that cargo outputs warning/error + ;; messages as expected. It seems that cargo outputs an + ;; absolute path to something in the store instead of the + ;; expected relative path (e.g. `[..]`) so we'll ignore + ;; these for now + (("fn include") "#[ignore]\nfn include") + (("fn exclude") "#[ignore]\nfn exclude")) + #t)) + ;; Appears that this test isn't currently running and has been + ;; moved elsewhere, so the patch doesn't apply. + (delete 'disable-amd64-avx-test)))))))) + +(define-public rust + (let ((base-rust + (rust-bootstrapped-package rust-1.30 "1.31.1" + "0sk84ff0cklybcp0jbbxcw7lk7mrm6kb6km5nzd6m64dy0igrlli" + #:patches + '("rust-1.25-accept-more-detailed-gdb-lines.patch" + "rust-gdb-llvm.patch" + "rust-reproducible-builds.patch")))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'patch-tests 'patch-command-exec-tests + (lambda* (#:key inputs #:allow-other-keys) + (let ((coreutils (assoc-ref inputs "coreutils"))) + (substitute* "src/test/run-pass/command-exec.rs" + ;; This test suite includes some tests that the stdlib's + ;; `Command` execution properly handles situations where + ;; the environment or PATH variable are empty, but this + ;; fails since we don't have `echo` available in the usual + ;; Linux directories. + ;; NB: the leading space is so we don't fail a tidy check + ;; for trailing whitespace, and the newlines are to ensure + ;; we don't exceed the 100 chars tidy check as well + ((" Command::new\\(\"echo\"\\)") + (string-append "\nCommand::new(\"" coreutils "/bin/echo\")\n"))) + #t))) + (add-after 'patch-tests 'patch-process-docs-rev-cmd + (lambda* _ + ;; Disable some doc tests which depend on the "rev" command + ;; https://github.com/rust-lang/rust/pull/58746 + (substitute* "src/libstd/process.rs" + (("```rust") "```rust,no_run")) + #t)))))))))