From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id WBAiDBLDH2VDUwEAauVa8A:P1 (envelope-from ) for ; Fri, 06 Oct 2023 10:19:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id WBAiDBLDH2VDUwEAauVa8A (envelope-from ) for ; Fri, 06 Oct 2023 10:19:30 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B90D151966 for ; Fri, 6 Oct 2023 10:19:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JVDL7waX; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1696580370; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=hL1j/52nj9viEGq2zBHji8CiKFb+V+44lb59n1U5LnI=; b=cWou6B5CYJHDt8xndlL0XrnTwmBbW4m2Qe3ONsjdNf3owOxlll6eIr1THRWEvV2Sg8m7JH KfDW+IUanOVwnhTk0Ji4beMgXcXn/jPT89cslnwdGu0MqJBVmvhQfz/ppctw4ysVGoG3rQ 7aODPt+gOo8rVg02XaHp1TIWZGX5ZPXgq6MBfy65SWOB0yTxE6jwJYavGr3CRmurAZ3Vvu 2yRnRUmqPDADkCXWgv7mTaWG8DySC+mPCgqV65qlkc18dEqZeD4uqYa05b+f3VQ4d+oMxY LiPm+YGRkEOpNICJQNW0ZTckyKdaW9LdgfceiyJAEH93IGJP4Ki0RA6PKRHilw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JVDL7waX; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1696580370; a=rsa-sha256; cv=none; b=t5bG9Gx2itGr5Nbiih2mOWQZ7xuY5bfNmxY0wluEwBnKMDsODM3dcPZhiY+SXsaLQwg6Z3 lw+88DWEKvJ1nbaP5ToqYhNROmSTFqRSVrUR4npGEMAPCoVINba9d3515QEc+g1OFlK73n nZlGm9yrQELZtN6guNLA2lFh0GYlqdgyoN1IBuIW4crYJp3XiUcAtskwgv6IThrlOuDXdx wI0Wq8rGHDrcch0s9JlgS5JUxtZE6VuIVj+vCoL8Mw3yoBC7xV+cgIH+vx5MjHuHqPhtPB rvQeg5kmSk7r59Gu6uKZo+wzRkVtPkQGpFpmQd3LLkrcFBQOcmMErIcGSznhvA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qog2o-0002pk-AC; Fri, 06 Oct 2023 04:18: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 ) id 1qog2m-0002p6-4x for bug-guix@gnu.org; Fri, 06 Oct 2023 04:18:44 -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 1qog2l-0005vI-RR for bug-guix@gnu.org; Fri, 06 Oct 2023 04:18:43 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qog34-0006ky-6I for bug-guix@gnu.org; Fri, 06 Oct 2023 04:19:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#65924: git searches coreutils and util-linux commands in PATH Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 06 Oct 2023 08:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65924 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Maxim Cournoyer , Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 65924@debbugs.gnu.org Received: via spool by 65924-submit@debbugs.gnu.org id=B65924.169658033625954 (code B ref 65924); Fri, 06 Oct 2023 08:19:02 +0000 Received: (at 65924) by debbugs.gnu.org; 6 Oct 2023 08:18:56 +0000 Received: from localhost ([127.0.0.1]:49093 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qog2x-0006kX-CX for submit@debbugs.gnu.org; Fri, 06 Oct 2023 04:18:55 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:40258) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qog2q-0006js-Em for 65924@debbugs.gnu.org; Fri, 06 Oct 2023 04:18:52 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4053e6e8ca7so5178705e9.1 for <65924@debbugs.gnu.org>; Fri, 06 Oct 2023 01:18:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1696580304; x=1697185104; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=hL1j/52nj9viEGq2zBHji8CiKFb+V+44lb59n1U5LnI=; b=JVDL7waXbJeJeHSCxlB2BrD9QfuLm8hW1r5LfvPTPkomsAgZOZnYO8cMolo6dpoxHF seUY4VbrjCz1vslhWBXaBgvoY8fwaqLx/TyGeUrKo5citEWXj4kvdfj37ntMD66U24re +PVrO9s+m402D5D6+hQ9ePxptpajeyB9Jq7Aci2k7QV2su7e9MAe+/pcPZZ0HAMabud9 JiH4q1Mlhmvl1oPm82I5P4zamvCxsCtKDLoj+8654bWIOcB55infn+fyc4qf/V1uCJLH Bu9z3o06PFuprI68TGTpTMvtI/bOW4MtpfIaTfKdJnlL/P3MpxdS8Lplhy41Ot2T1i9M 8WxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696580304; x=1697185104; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hL1j/52nj9viEGq2zBHji8CiKFb+V+44lb59n1U5LnI=; b=Zl/sSXWOkrNtvwYQw74ZJB5EJAvZ7qw2oyoJI51DAfhpfmOtxwfDvLTASsmXNN7lZd n0xZeq2CICeln+E+5D5DUGGJBXjaHZ7llhmVpRYRKzWsajgqnRD4qv8KigpLTmhbUtiZ AcC2Wc6F9wgFqUTzGrZrm3NylTyBVKFtvZg10ls1sVMQ6mbH1gyubpntXODI6+PhTOH1 kxCg7VvgemIlx6moHhm7r+Eieuw2fW5QWHqkAQFmSMHgtyVTef3TudLBtL0KDb+ErzXc Hrp5cG+iWf7kZ6Jt0at4l0Te6BOd64ufpYlVYIA2N3TXlOgWZjMcR7XM+vZM0n6dAyfS yEjg== X-Gm-Message-State: AOJu0YwV0rsfQZjEY8Ct1XFstPwmVCTDeRxdz//ee583tY71XAatj/4w PIdce0N2WFbWhGXHUjgELtLzCgNUcZ4= X-Google-Smtp-Source: AGHT+IG9LJoCKCWmJI0D1eFleAs+ZKv0L+EA7bkQPPfjN3eeY4hjKseJ0saVZyc2NLg4kFGYMoVmRQ== X-Received: by 2002:a05:600c:214f:b0:406:513d:738f with SMTP id v15-20020a05600c214f00b00406513d738fmr6943106wml.2.1696580303655; Fri, 06 Oct 2023 01:18:23 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id y6-20020a1c4b06000000b00405588aa40asm3174357wma.24.2023.10.06.01.18.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Oct 2023 01:18:23 -0700 (PDT) From: Simon Tournier In-Reply-To: <87r0m920so.fsf@gmail.com> References: <87fs3iuf6e.fsf@gmail.com> <877co2bc0s.fsf@gnu.org> <87r0m920so.fsf@gmail.com> Date: Thu, 05 Oct 2023 18:21:36 +0200 Message-ID: <87pm1tujjj.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: bug-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -5.09 X-Migadu-Scanner: mx2.migadu.com X-Migadu-Queue-Id: B90D151966 X-Spam-Score: -5.09 X-TUID: R947vcxdksEx Hi, On Wed, 04 Oct 2023 at 23:41, Maxim Cournoyer w= rote: >> I think we should add coreutils-minimal and sed (or gash-utils?) to the >> =E2=80=98git-submodule=E2=80=99 wrapper that already exists. > > That should work for the use case at hand, but we should scan the source > for occurrences of the tools to see if other git commands need to be > wrapped as well. This doesn't also cover 'uname' from my report, which > should be looked into as well (when is it needed? is it a fatal error if > it's missing? etc.) Well, =E2=80=99git-submodule=E2=80=99 is just a shell script. It depends o= n: + basename + sed + git-sh-setup which depends on: + basename + sed + uname And all these other subcommands match =E2=80=99git-sh-setup=E2=80=99: Binary: + bin/git + bin/scalar + libexec/git-core/git + libexec/git-core/scalar Scripts: + libexec/git-core/git-filter-branch + libexec/git-core/git-merge-octopus + libexec/git-core/git-merge-one-file + libexec/git-core/git-merge-resolve + libexec/git-core/git-mergetool + libexec/git-core/git-quiltimport + libexec/git-core/git-submodule + libexec/git-core/git-web--browse + libexec/git-core/git-web--browse For instance, libexec/git-core/git-mergetools/emerge or libexec/git-core/git-mergetools/tortoisemerge depends on =E2=80=99basename= =E2=80=99. This =E2=80=99git-sh-setup=E2=80=99 is dragged into the picture by the file =E2=80=99command-list.h=E2=80=99 which basically provides some help. See b= elow. Last, I think =E2=80=99git-sh-setup=E2=80=99 fails if =E2=80=99uname=E2=80= =99 is missing. Cheers, simon --8<---------------cut here---------------start------------->8--- # From Git checkout $ cat git-submodule | grep -n -E '(basename|sed|uname)' 7:dashless=3D$(basename "$0" | sed -e 's/-/ /') 569:# parsed here as well, for backward compatibility. 613:"cmd_$(echo $command | sed -e s/-/_/g)" "$@" $ cat git-sh-setup | grep -n -E '(basename|sed|uname)' 77: dashless=3D$(basename -- "$0" | sed -e 's/-/ /') 181: die "$(eval_gettext "fatal: \$program_name cannot be used without a w= orking tree.")" 188: die "$(eval_gettext "fatal: \$program_name cannot be used without a w= orking tree.")" 230:# Generate a sed script to parse identities from a commit. 264:# Create a pick-script as above and feed it to sed. Stdout is suitable = for 267: LANG=3DC LC_ALL=3DC sed -ne "$(pick_ident_script "$@")" 292:case $(uname -s) in $ find $(guix build git-minimal --no-grafts) -type f -exec grep -nH git-sh-= setup {} \; | sort grep: /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/bin/gi= t: binary file matches grep: /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/bin/sc= alar: binary file matches grep: /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexe= c/git-core/git: binary file matches grep: /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexe= c/git-core/scalar: binary file matches /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-filter-branch:109:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-merge-octopus:8:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-merge-one-file:26:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-merge-resolve:8:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-mergetool:17:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-quiltimport:14:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-submodule:22:. git-sh-setup /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-web--browse:22:# the vanilla git-sh-setup should not be used. /gnu/store/y3vdq2pdkljrw63xxnc2vb6lz07ycar6-git-minimal-2.41.0/libexec/git-= core/git-web--browse:24:. git-sh-setup $ find . -type f -name "*.[ch]" -exec grep -nH git-sh-setup {} \; ./command-list.h:171: { "git-sh-setup", N_("Common Git shell script setup c= ode"), 0 | CAT_purehelpers }, $ find . -type f -name "*.o" -exec grep -nH git-sh-setup {} \; grep: ./help.o: binary file matches $ grep git-sh-setup git grep: git: binary file matches $ grep -B 5 -A 10 -n uname $(guix build git-minimal --no-grafts)/libexec/gi= t-core/git-sh-setup 287- expr $sz0 \< $sz1 \* 2 >/dev/null || : >"$1" 288-} 289- 290- 291-# Platform specific tweaks to work around some commands 292:case $(uname -s) in 293-*MINGW*) 294- # Windows has its own (incompatible) sort and find 295- sort () { 296- /usr/bin/sort "$@" 297- } 298- find () { 299- /usr/bin/find "$@" 300- } 301- # git sees Windows-style pwd 302- pwd () { --8<---------------cut here---------------end--------------->8---