From patchwork Fri Jan 3 16:07:23 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Herman Rimm X-Patchwork-Id: 36411 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 DC8A527BBE9; Fri, 3 Jan 2025 16:09:19 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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=unavailable 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 E9F9227BBE2 for ; Fri, 3 Jan 2025 16:09:17 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTkEU-000499-DV; Fri, 03 Jan 2025 11:09:06 -0500 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 1tTkES-00048f-6H for guix-patches@gnu.org; Fri, 03 Jan 2025 11:09:04 -0500 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 1tTkER-0006xm-CI for guix-patches@gnu.org; Fri, 03 Jan 2025 11:09:03 -0500 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=Kie89hWwwvbmhj07VGgyHcrsXEyoeOn54TKjHMOrIic=; b=f+EsR0QKnbj3eaLM+CY9PLBBRr4MatSMLPg+o2ZnXZlm0LWVCcrljjv+ScQXvHko+M4Tkb+qY2d7B4ZhM84Th8BMiExHlyArHfossi5B31q2L0SxSu45i5vsD2s0GzQ5It44DYptgFfWuWDtmHIAbE2DlPb4CwWY+bQqEsyaGR0GkPdDyeXEzjLcUIACYc737yT9XToF/7c1jPWLAY6eKQl00ba4czyhQYWKk/jvnRmAak1844XdYr9pDqDJv/U53y9g4JoPZyZ47eudDagVnWUl4K6p8gjay/le9gUx8FxPF3bwWXQ5Wm56vUlOR117jHWbpHPA9U5ycAZcfV2ZNw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tTkEQ-0008CP-MZ; Fri, 03 Jan 2025 11:09:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#75321] [PATCH rust-team] build: cargo-build-system: Use Cargo checksum stubs. Resent-From: Herman Rimm Original-Sender: "Debbugs-submit" Resent-CC: efraim@flashner.co.il, guix-patches@gnu.org Resent-Date: Fri, 03 Jan 2025 16:09:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75321 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75321@debbugs.gnu.org Cc: Efraim Flashner X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Efraim Flashner Received: via spool by submit@debbugs.gnu.org id=B.173592052431486 (code B ref -1); Fri, 03 Jan 2025 16:09:02 +0000 Received: (at submit) by debbugs.gnu.org; 3 Jan 2025 16:08:44 +0000 Received: from localhost ([127.0.0.1]:51804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tTkE8-0008Bj-B3 for submit@debbugs.gnu.org; Fri, 03 Jan 2025 11:08:44 -0500 Received: from lists.gnu.org ([2001:470:142::17]:50536) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1tTkE5-0008BR-Ry for submit@debbugs.gnu.org; Fri, 03 Jan 2025 11:08:43 -0500 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 1tTkDt-00047O-7h for guix-patches@gnu.org; Fri, 03 Jan 2025 11:08:30 -0500 Received: from 81-205-150-117.fixed.kpn.net ([81.205.150.117] helo=email.rimm.ee) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tTkDq-0006oL-Lf for guix-patches@gnu.org; Fri, 03 Jan 2025 11:08:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rimm.ee; s=herman; t=1735920487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kie89hWwwvbmhj07VGgyHcrsXEyoeOn54TKjHMOrIic=; b=eBWmL+aAhTrOJyhArr4ypqyLda5C/K4SeZnF8sO80AMjbhJbtLAvzNLsHpUupubwPPfe0B neGghh4fkHE7iEnI0jELoNfhTVuTTBLPdYjxxvQHEU8hzlE21nrOUf5PYuN3KCuokht0WO DEIceN6K8b3b+PZlIdMTGGGb27lPVZ1u2RYpn5gfERi+hP8iYXIVVGV9CcX0uCK5JDLQIS ZM96U0VTx0RvrC97v55+jhkx0K05L2m3etgfT8R1W8A2w7wcdJagYOgUJqH7nBb7fxSNnN T4Fz+jAoZLukDqEtHb8VAIZWC2fbvYr482oXuU2Ht5+qVpvjtpLi70458OPR3A== Received: by 81-205-150-117.fixed.kpn.net (OpenSMTPD) with ESMTPSA id 7588b8b2 (TLSv1.3:TLS_CHACHA20_POLY1305_SHA256:256:NO) for ; Fri, 3 Jan 2025 16:08:07 +0000 (UTC) Date: Fri, 3 Jan 2025 17:07:23 +0100 Message-ID: <20e1578fa994018d6c63f01312f3d99852e656e2.1735920229.git.herman@rimm.ee> X-Mailer: git-send-email 2.45.2 MIME-Version: 1.0 Received-SPF: pass client-ip=81.205.150.117; envelope-from=herman@rimm.ee; helo=email.rimm.ee X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, TVD_RCVD_IP=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: , Reply-to: Herman Rimm X-ACL-Warn: , Herman Rimm via Guix-patches X-Patchwork-Original-From: Herman Rimm via Guix-patches via From: Herman Rimm 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 Commit 5b08b8fe1019147fe489db17a9a8ae7ebe97f9e9 of Cargo makes the package field optional. This is the case since Rust 1.22.0. * guix/build/cargo-build-system.scm (patch-cargo-checksums): Create .cargo-checksum.json stubs. Change-Id: I474e8f73b6048e53f22a8d899a8e3e50b5332f60 --- guix/build/cargo-build-system.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) base-commit: 5f92f009a19c1a5a8b7df5a7bcb1e1f283a953f8 diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 480134402f2..bbb79a7331b 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Marius Bakke ;;; Copyright © 2024 Maxim Cournoyer +;;; Copyright © 2025 Herman Rimm ;;; ;;; This file is part of GNU Guix. ;;; @@ -26,7 +27,6 @@ (define-module (guix build cargo-build-system) #:use-module ((guix build gnu-build-system) #:prefix gnu:) #:use-module (guix build json) #:use-module ((guix build utils) #:hide (delete)) - #:use-module (guix build cargo-utils) #:use-module (ice-9 popen) #:use-module (ice-9 rdelim) #:use-module (ice-9 ftw) @@ -222,13 +222,19 @@ (define* (configure #:key inputs (when (file-exists? "Cargo.lock") (delete-file "Cargo.lock"))) -;; After the 'patch-generated-file-shebangs phase any vendored crates who have -;; their shebangs patched will have a mismatch on their checksum. +;; See: https://github.com/rust-lang/cargo/issues/11063. (define* (patch-cargo-checksums #:key (vendor-dir "guix-vendor") #:allow-other-keys) - "Patch the checksums of the vendored crates after patching their shebangs." - (generate-all-checksums vendor-dir)) + "Add a stub checksum to each crate in VENDOR-DIR." + (with-directory-excursion vendor-dir + (call-with-output-file ".cargo-checksum.json" + (cut display "{\"files\":{}}" <>)) + (for-each (lambda (dir) + (copy-file ".cargo-checksum.json" + (string-append dir "/.cargo-checksum.json"))) + (drop (scandir ".") 3)) + (delete-file ".cargo-checksum.json"))) (define* (build #:key parallel-build?