From patchwork Fri Oct 18 15:10:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brennan Vincent X-Patchwork-Id: 32137 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 055F527BBEA; Fri, 18 Oct 2024 16:11:55 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E4FD027BBE2 for ; Fri, 18 Oct 2024 16:11:53 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1odh-0002a3-Sd; Fri, 18 Oct 2024 11:11:41 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1odf-0002Zu-La for guix-patches@gnu.org; Fri, 18 Oct 2024 11:11:39 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1odf-00060y-DJ for guix-patches@gnu.org; Fri, 18 Oct 2024 11:11:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:From:To:Subject; bh=/DiZa1jci5b8RnVZtjrHieLO14/UpRqc7/EkB2B9iaQ=; b=CRfdfkRGH/x0Z6WUjzVcWzU73aPTzV0L1szDzBogRNiUBJ/2oLzk3LkoSWW5/l4V2Ryeb527fpv8SRuuDkHyn6yVDA52+bAstpaPoV9ZME63L1T9LwajPlal1ZM/cWrc6enzXCusqdBFJ1/LHuiKUVc4jUgisHKQDdZHMwdSKKEMabNo0Gxs55IS3WgXuGL4ob8mb0gYKhE4ljVL8TsCEoAiJj4z00TjDHNNfghVsK7KEeQ1A0+r3t+rwpSc0vJxsVpsoVphDV9LUHrNZd1qum9a0mgh+Kz9/X8rGbFBbV5/4fJQSwJJER/vJxxc8lajVGcjWEmjKgP5MRYmwAcNhg==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t1oe1-0004mY-QH for guix-patches@gnu.org; Fri, 18 Oct 2024 11:12:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#73864] [PATCH] gnu: rust: update to 1.82 Resent-From: Brennan Vincent Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Oct 2024 15:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 73864 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 73864@debbugs.gnu.org Cc: efraim@flashner.co.il X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.172926426718316 (code B ref -1); Fri, 18 Oct 2024 15:12:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Oct 2024 15:11:07 +0000 Received: from localhost ([127.0.0.1]:39743 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1od6-0004lJ-Dv for submit@debbugs.gnu.org; Fri, 18 Oct 2024 11:11:07 -0400 Received: from lists.gnu.org ([209.51.188.17]:46504) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t1od1-0004kU-G5 for submit@debbugs.gnu.org; Fri, 18 Oct 2024 11:11:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t1oce-0002R4-52 for guix-patches@gnu.org; Fri, 18 Oct 2024 11:10:36 -0400 Received: from smtp.umanwizard.com ([54.203.248.109]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1ocW-0005wW-7Z for guix-patches@gnu.org; Fri, 18 Oct 2024 11:10:35 -0400 Received: from localhost ([174.229.77.246]) by smtp.umanwizard.com ; 18 Oct 2024 15:10:23 +0000 X-Fes-Received-For: guix-patches@gnu.org X-Fes-Received-From: From: Brennan Vincent X-Envelope-From: ecad045f748c3c6d4db157e7487b703999d86333 Mon Sep 17 00:00:00 2001 Date: Fri, 18 Oct 2024 11:10:20 -0400 Message-ID: <871q0da1lv.fsf@denver.mail-host-address-is-not-set> MIME-Version: 1.0 X-Fes-Encrypted: true X-Fes-Ehlo-Domain: localhost Received-SPF: pass client-ip=54.203.248.109; envelope-from=brennan@umanwizard.com; helo=smtp.umanwizard.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches gnu/packages/rust.scm (new variable): rust-1.82. gnu/packages/rust.scm (rust): update to 1.82. Change-Id: If6ff59011edca7a230946a3ba77b51f26cd47789 --- gnu/packages/rust.scm | 79 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 65 insertions(+), 14 deletions(-) base-commit: 878b5a9f890ec1317b54e577159ebbfa6a7ccbce diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 7f85402242..97afb81cbc 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -1054,6 +1054,33 @@ (define-public rust-1.81 (rust-bootstrapped-package rust-1.80 "1.81.0" "19yggj1qivdhf68gx2652cfi7nxjkdgy39wh7h6facpzppz4h947")) +(define-public rust-1.82 + (let ((base-rust (rust-bootstrapped-package rust-1.81 "1.82.0" + "0ajiryki2aqsg3ydx3nfhrb5i1mmxvasfszs9qblw66skr8g8lvw"))) + (package + (inherit base-rust) + (arguments + (substitute-keyword-arguments (package-arguments base-rust) + ((#:phases phases) + `(modify-phases ,phases + (replace 'patch-cargo-checksums + (lambda _ + (substitute* (cons* "Cargo.lock" + "src/bootstrap/Cargo.lock" + "library/Cargo.lock" + (filter + ;; don't mess with the + ;; lock files in the Cargo testsuite; it + ;; messes up the tests. + (lambda (path) + (not + (string-contains path "cargo/tests/testsuite"))) + (find-files "src/tools" "Cargo.lock"))) + (("(checksum = )\".*\"" all name) + (string-append name "\"" ,%cargo-reference-hash "\""))) + (generate-all-checksums "vendor")))))))))) + + (define (make-ignore-test-list strs) "Function to make creating a list to ignore tests a bit easier." (map (lambda (str) @@ -1068,7 +1095,7 @@ (define (make-ignore-test-list strs) ;;; Here we take the latest included Rust, make it public, and re-enable tests ;;; and extra components such as rustfmt. (define-public rust - (let ((base-rust rust-1.81)) + (let ((base-rust rust-1.82)) (package (inherit base-rust) (properties (append @@ -1082,32 +1109,50 @@ (define-public rust '(begin (for-each delete-file-recursively '("src/llvm-project" + "vendor/jemalloc-sys-0.5.3+5.3.0-patched/jemalloc" "vendor/jemalloc-sys-0.5.4+5.3.0-patched/jemalloc" + "vendor/openssl-src-111.17.0+1.1.1m/openssl" "vendor/openssl-src-111.28.2+1.1.1w/openssl" "vendor/tikv-jemalloc-sys-0.5.4+5.3.0-patched/jemalloc" ;; These are referenced by the cargo output ;; so we unbundle them. - "vendor/curl-sys-0.4.72+curl-8.6.0/curl" + "vendor/curl-sys-0.4.52+curl-7.81.0/curl" + "vendor/curl-sys-0.4.74+curl-8.9.0/curl" "vendor/libffi-sys-2.3.0/libffi" - "vendor/libnghttp2-sys-0.1.9+1.58.0/nghttp2" - "vendor/libz-sys-1.1.16/src/zlib")) + "vendor/libz-sys-1.1.3/src/zlib" + "vendor/libz-sys-1.1.18/src/zlib" + "vendor/libz-sys-1.1.19/src/zlib")) ;; Use the packaged nghttp2 - (delete-file "vendor/libnghttp2-sys-0.1.9+1.58.0/build.rs") - (with-output-to-file "vendor/libnghttp2-sys-0.1.9+1.58.0/build.rs" - (lambda _ - (format #t "fn main() {~@ + (for-each + (lambda (ver) + (let ((vendored-dir (format #f "vendor/libnghttp2-sys-~a/nghttp2" ver)) + (build-rs (format #f "vendor/libnghttp2-sys-~a/build.rs" ver))) + (delete-file-recursively vendored-dir) + (delete-file build-rs) + (with-output-to-file build-rs + (lambda _ + (format #t "fn main() {~@ println!(\"cargo:rustc-link-lib=nghttp2\");~@ - }~%"))) + }~%"))))) + '("0.1.10+1.61.0" + "0.1.7+1.45.0")) ;; Remove vendored dynamically linked libraries. ;; find . -not -type d -executable -exec file {} \+ | grep ELF ;; Also remove the bundled (mostly Windows) libraries. (for-each delete-file (find-files "vendor" "\\.(a|dll|exe|lib)$")) ;; Adjust vendored dependency to explicitly use rustix with libc backend. - (substitute* '("vendor/tempfile-3.7.1/Cargo.toml" - "vendor/tempfile-3.10.1/Cargo.toml") - (("features = \\[\"fs\"" all) - (string-append all ", \"use-libc\""))))))) + (for-each + (lambda (ver) + (let ((f (format #f "vendor/tempfile-~a/Cargo.toml" ver))) + (substitute* f + (("features = \\[\"fs\"" all) + (string-append all ", \"use-libc\""))))) + '("3.3.0" + "3.4.0" + "3.7.1" + "3.10.1" + "3.12.0")))))) (arguments (substitute-keyword-arguments (strip-keyword-arguments '(#:tests?) @@ -1217,7 +1262,13 @@ (define-public rust (lambda _ (substitute* "src/tools/cargo/tests/testsuite/install.rs" ,@(make-ignore-test-list - '("fn install_global_cargo_config"))))) + '("fn install_global_cargo_config"))) + (substitute* "src/tools/cargo/tests/testsuite/cargo_info/within_ws_with_alternative_registry/mod.rs" + ,@(make-ignore-test-list + '("fn case"))) + (substitute* "src/tools/cargo/tests/testsuite/package.rs" + ,@(make-ignore-test-list + '("fn workspace_with_local_deps_index_mismatch"))))) (add-after 'unpack 'disable-miscellaneous-broken-tests (lambda _ (substitute* "src/tools/cargo/tests/testsuite/check_cfg.rs"