GNU bug report logs - #74450
patch-shebang does not work with '/usr/bin/env -S'

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Théo Tyburn <theo.tyburn@HIDDEN>; dated Thu, 21 Nov 2024 00:43:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Nov 2024 00:42:45 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Nov 20 19:42:45 2024
Received: from localhost ([127.0.0.1]:48397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tDvHQ-0001Rw-TA
	for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 19:42:45 -0500
Received: from lists.gnu.org ([209.51.188.17]:36258)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <theo.tyburn@HIDDEN>) id 1tDvHP-0001Rp-1T
 for submit <at> debbugs.gnu.org; Wed, 20 Nov 2024 19:42: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 <theo.tyburn@HIDDEN>)
 id 1tDvHO-0003mv-EE
 for bug-guix@HIDDEN; Wed, 20 Nov 2024 19:42:42 -0500
Received: from mout01.posteo.de ([185.67.36.65])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <theo.tyburn@HIDDEN>)
 id 1tDvHM-0005zq-HS
 for bug-guix@HIDDEN; Wed, 20 Nov 2024 19:42:42 -0500
Received: from submission (posteo.de [185.67.36.169]) 
 by mout01.posteo.de (Postfix) with ESMTPS id E1528240027
 for <bug-guix@HIDDEN>; Thu, 21 Nov 2024 01:42:25 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017;
 t=1732149745; bh=xi6TGu5Z99xt2Cq8I0D7mCIC9sYAPep/+61dMisQj84=;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:
 Content-Transfer-Encoding:From;
 b=PI3PqgMzu6/+T+jWXdpSMBHaGnIebncjIkGySF9nU5Pir7TSF+FkdsYF1WoDT5J8s
 FdbeOLg13fmiCEKGjImXTNq+Zqi2mFQyqbdyPfKoYVbkr6k7vIyRKJOhnlvITnZuy4
 zel2LKXqWqvM7nN4kO0GnKNLg33vMSa8piLyI0GuzyPXASSJ8Lc+1f35opFTCKFAR7
 nBEUp6Apr2qIQCybjrV8UsOrdZf6HI8LQ5vuOxAJy+08wSQu2nxqQGqTNi94e/kiVJ
 8lD3izw5iCSy3wlPnZRmbfe48N9mseqbakQekJgNWeAZECBzRcpUty7EVM/R/dHDG7
 Ms/b354UPicEQ==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Xtzw12LSrz9rxG
 for <bug-guix@HIDDEN>; Thu, 21 Nov 2024 01:42:25 +0100 (CET)
From: =?utf-8?Q?Th=C3=A9o_Tyburn?= <theo.tyburn@HIDDEN>
To: bug-guix@HIDDEN
Subject: patch-shebang does not work with '/usr/bin/env -S'
Date: Thu, 21 Nov 2024 00:42:20 +0000
Message-ID: <87bjy95ser.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=185.67.36.65; envelope-from=theo.tyburn@HIDDEN;
 helo=mout01.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 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_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001,
 RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001,
 SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hi guix,

I noticed that 'patch-shebang' in (guix build utils) does not work if
the shebang is something like '#!/usr/bin/env -S python3 -u'. So it is
not able to patch shebangs with multiple arguments
https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html=
#g_t_002dS_002f_002d_002dsplit_002dstring-usage-in-scripts

With the shebang above I get this error in the build phase:
"patch-shebang: main.py: warning: no binary for interpreter `-S' found
in $PATH". By looking at the function, this makes sense since in the
let* bindings 'cmd' is bind to 'arg1' which is just '-S'. So the fix
would not be too hard to implement.

Cheers,

Th=C3=A9o




Acknowledgement sent to Théo Tyburn <theo.tyburn@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#74450; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.