From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 2/6] gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH. Date: Tue, 14 Feb 2017 09:35:58 +0100 Message-ID: <87wpctxj81.fsf@gnu.org> References: <20170209184510.24200-1-efraim@flashner.co.il> <20170209184510.24200-3-efraim@flashner.co.il> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34342) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cdYak-0005uc-PU for guix-devel@gnu.org; Tue, 14 Feb 2017 03:36:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cdYaf-0006Zc-R6 for guix-devel@gnu.org; Tue, 14 Feb 2017 03:36:06 -0500 In-Reply-To: <20170209184510.24200-3-efraim@flashner.co.il> (Efraim Flashner's message of "Thu, 9 Feb 2017 20:45:06 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Efraim Flashner Cc: guix-devel@gnu.org Efraim Flashner skribis: > This is the bootstrap version of 1063d325ea76aa2b00dfcd3d436b16e412103df1 > > * gnu/packages/bootstrap.scm (%bootstrap-coreutils&co)[source]: Patch > the absolute location of 'grep' when called from 'egrep' or 'fgrep'. > --- > gnu/packages/bootstrap.scm | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm > index 3be6e1246..1dd853260 100644 > --- a/gnu/packages/bootstrap.scm > +++ b/gnu/packages/bootstrap.scm > @@ -325,6 +325,10 @@ $out/bin/guile --version~%" > (chmod "bin" #o755) > (patch-shebang "bin/egrep" path) > (patch-shebang "bin/fgrep" path) > + ;; Patch 'egrep' and 'fgrep' to execute 'grep= ' via its > + ;; absolute file name instead of searching fo= r it in $PATH. > + (substitute* '("bin/egrep" "bin/fgrep") > + (("grep") (string-append (getcwd) "/bin/gre= p"))) Am I right that this is not needed if we produce bootstrap binaries with patch #1 applied? (That is, where =E2=80=98egrep=E2=80=99 and =E2=80=98fgr= ep=E2=80=99 look for =E2=80=98grep=E2=80=99 in $PATH.) OTOH it cannot hurt, so it=E2=80=99s best to apply it. Have you check whether it works on the other arches, which use an old grep where =E2=80=98egrep=E2=80=99 and =E2=80=98fgrep=E2=80=99 are not scri= pts? (=E2=80=98substitute*=E2=80=99 might throw an exception if it=E2=80=99s passed a binary file, though I think tha= t=E2=80=99s not the case here.) If it doesn=E2=80=99t break the other arches, OK for =E2=80=98core-updates= =E2=80=99, thanks! Ludo=E2=80=99.