Message ID | 20250619075859.10878-5-ngraves@ngraves.fr |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CAA4F27BC4B; Thu, 19 Jun 2025 09:00:50 +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=-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=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 8C4F327BC4A for <patchwork@mira.cbaines.net>; Thu, 19 Jun 2025 09:00:50 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1uSACQ-0008Tr-8a; Thu, 19 Jun 2025 04:00:46 -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 <Debian-debbugs@debbugs.gnu.org>) id 1uSABv-0008Iz-Sk for guix-patches@gnu.org; Thu, 19 Jun 2025 04:00:13 -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 <Debian-debbugs@debbugs.gnu.org>) id 1uSABu-0008Un-Mp for guix-patches@gnu.org; Thu, 19 Jun 2025 04:00:11 -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:References:In-Reply-To:Date:From:To:Subject; bh=U9BFzp6/xP+ZX0nFVWzE8CgBi0WjOrTE+GZSk+pH4ik=; b=Fq6NFQ6tJThLa/hHq+ysFDw3OXvLnDv4AdBtDIfcE0xFymlfukabC0VM+WyGi/rRwOPC89DG8xppN3an/N6eY8SbCcQhiNh0e2KXXspMYPhnGOJJnLljLO7EAvu9o4X+q5WVG8eej/8reBF8PQdzC1fXYI3bvJCfE/lBfD2/jw7HBExZzis5rE/2jWCXQAWwN5lipjSj0xd1VR+RcsR+4t7kL/mSa3HblCKkiIWu0+DlV8hOYwAwCfAODT5ztYDiiSmlWgcRoyr32LrHvi3YkhzGG7XEcKlBA9JaZfoti5XrGL0qCabCjxgPqpp5lAJmsH+g1LKrX40p/V0YcMxYjw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1uSABu-0006w1-B0 for guix-patches@gnu.org; Thu, 19 Jun 2025 04:00:10 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#78828] [PATCH 5/8] build-system/pyproject: Avoid PEP427 substitution on binary files. Resent-From: Nicolas Graves <ngraves@ngraves.fr> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 19 Jun 2025 08:00:10 +0000 Resent-Message-ID: <handler.78828.B78828.175031996826252@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 78828 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 78828@debbugs.gnu.org Cc: Nicolas Graves <ngraves@ngraves.fr> Received: via spool by 78828-submit@debbugs.gnu.org id=B78828.175031996826252 (code B ref 78828); Thu, 19 Jun 2025 08:00:10 +0000 Received: (at 78828) by debbugs.gnu.org; 19 Jun 2025 07:59:28 +0000 Received: from localhost ([127.0.0.1]:60330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1uSABC-0006p0-Ax for submit@debbugs.gnu.org; Thu, 19 Jun 2025 03:59:27 -0400 Received: from 3.mo563.mail-out.ovh.net ([46.105.40.8]:46601) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <ngraves@ngraves.fr>) id 1uSAAv-0006lm-4p for 78828@debbugs.gnu.org; Thu, 19 Jun 2025 03:59:12 -0400 Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net [79.137.60.36]) by mo563.mail-out.ovh.net (Postfix) with ESMTPS id 4bNCfy6CRBz1jys; Thu, 19 Jun 2025 07:59:06 +0000 (UTC) Received: from director2.derp.mail-out.ovh.net (director2.derp.mail-out.ovh.net. [127.0.0.1]) by director2.derp.mail-out.ovh.net (inspect_sender_mail_agent) with SMTP for <78828@debbugs.gnu.org>; Thu, 19 Jun 2025 07:59:06 +0000 (UTC) Received: from mta2.priv.ovhmail-u1.ea.mail.ovh.net (unknown [10.110.96.178]) by director2.derp.mail-out.ovh.net (Postfix) with ESMTPS id 4bNCfy54VBz1xnp; Thu, 19 Jun 2025 07:59:06 +0000 (UTC) Received: from ngraves.fr (unknown [10.1.6.2]) by mta2.priv.ovhmail-u1.ea.mail.ovh.net (Postfix) with ESMTPSA id 4597CBA41DC; Thu, 19 Jun 2025 07:59:06 +0000 (UTC) Authentication-Results: garm.ovh; auth=pass (GARM-100R0030427f881-23a3-4261-a770-3baacc51481f, 129058C0FBD5227E7F6EF83700C8F3C5E5DC00BA) smtp.auth=ngraves@ngraves.fr X-OVh-ClientIp: 80.215.169.212 Date: Thu, 19 Jun 2025 09:58:51 +0200 Message-ID: <20250619075859.10878-5-ngraves@ngraves.fr> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250619075859.10878-1-ngraves@ngraves.fr> References: <20250619075859.10878-1-ngraves@ngraves.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 14072059987057435362 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgeeffedrtddvgdegleekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepleffjeetueethfefkeffffefvddukeejkefgleduiedthfekvefhiedvhfffgeegnecukfhppeduvdejrddtrddtrddupdektddrvdduhedrudeiledrvdduvdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepnhhgrhgrvhgvshesnhhgrhgrvhgvshdrfhhrpdhnsggprhgtphhtthhopedvpdhrtghpthhtohepjeekkedvkeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthhopehnghhrrghvvghssehnghhrrghvvghsrdhfrhdpoffvtefjohhsthepmhhoheeifegmpdhmohguvgepshhmthhpohhuth DKIM-Signature: a=rsa-sha256; bh=U9BFzp6/xP+ZX0nFVWzE8CgBi0WjOrTE+GZSk+pH4ik=; c=relaxed/relaxed; d=ngraves.fr; h=From; s=ovhmo4487190-selector1; t=1750319946; v=1; b=4lIIPBIDUw1x2ApucqBjiejbbStB5ZU7//mXRVE0AN7dQ4HQrd+RCYih+InvRlMBSyhbqMx8 OYwNbNbkow8EZ7gPtI2BC65WlAdAU530ItUDRtT64aYW4luzShnVqC39//f8tiuqamd0ULmTMBv k+DluO6FZEmUbWOFxyO+tAd/7i1hL91Y7hc+a9GF4nnJfhVwtHGQYUgAFrVSHLiNbhac35Pm2E3 hgcSen34KcE6lVgWihEn6XztP79S2lSEKUtSoXmpKhmnsVfRPb9u0eUl3YA5b23K12L92aPbok/ flZZiAqwGzw8ZMcgH+2knTg8LjZs1TD3qCP3wZo+7bTJw== X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: Nicolas Graves <ngraves@ngraves.fr> X-ACL-Warn: , Nicolas Graves via Guix-patches <guix-patches@gnu.org> From: Nicolas Graves via Guix-patches via <guix-patches@gnu.org> 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 |
Series |
None
|
|
Commit Message
Nicolas Graves
June 19, 2025, 7:58 a.m. UTC
In some rare cases, the dest-path can be an elf-file, which are unreadable by substitute*, leading to an error instead of just continuing which makes more sense in this case. * guix/build-system/pyproject.scm (check): Guard substitution attempt with basic readability guarantees. --- guix/build/pyproject-build-system.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject-build-system.scm index 1fa610faa9..1ca91701c3 100644 --- a/guix/build/pyproject-build-system.scm +++ b/guix/build/pyproject-build-system.scm @@ -218,10 +218,11 @@ (define (expand-data-directory directory) (lambda (file) (chmod file #o755) ;; PEP 427 recommends that installers rewrite - ;; this odd shebang. - (substitute* file - (("#!python") - (string-append "#!" python "/bin/python")))) + ;; this odd shebang, but avoid the binary case. + (unless (elf-file? file) + (substitute* file + (("#!python") + (string-append "#!" python "/bin/python"))))) (find-files destination)))) ;; Data can be contained in arbitrary directory structures. Most ;; commonly it is used for share/.