guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/6] gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work


From: Efraim Flashner
Subject: Re: [PATCH 2/6] gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH.
Date: Tue, 14 Feb 2017 21:46:17 +0200
User-agent: Mutt/1.7.2 (2016-11-26)

On Tue, Feb 14, 2017 at 09:35:58AM +0100, Ludovic Courtès wrote:
> Efraim Flashner <address@hidden> 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 for 
> > it in $PATH.
> > +                           (substitute* '("bin/egrep" "bin/fgrep")
> > +                             (("grep") (string-append (getcwd) 
> > "/bin/grep")))
> 
> Am I right that this is not needed if we produce bootstrap binaries with
> patch #1 applied?  (That is, where ‘egrep’ and ‘fgrep’ look for ‘grep’
> in $PATH.)
> 
> OTOH it cannot hurt, so it’s best to apply it.
> 
> Have you check whether it works on the other arches, which use an old
> grep where ‘egrep’ and ‘fgrep’ are not scripts?  (‘substitute*’ might
> throw an exception if it’s passed a binary file, though I think that’s
> not the case here.)
> 
> If it doesn’t break the other arches, OK for ‘core-updates’, thanks!
> 
> Ludo’.

before grep-2.25 egrep and fgrep are binary files. The one time I tried
it on x86_64 it failed spectacularly. In the end it definately needs
some sort of test to make sure its aarch64 (or another newly added
target)

-- 
Efraim Flashner   <address@hidden>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]