[PATCH] gnu: grep: Fix pcre matching in grep.

  • Done
  • quality assurance status badge
Details
2 participants
  • Tobias Geerinckx-Rice
  • spacecadet
Owner
unassigned
Submitted by
spacecadet
Severity
normal
S
S
spacecadet wrote on 26 Nov 2023 04:12
(name . Guix Patches)(address . guix-patches@gnu.org)
f7a9ab63-9e03-3793-f301-7f45a78d7186@purge.sh
Fix grep not building with -P (perl regexp) support.

* gnu/packages/base.scm: Replace grep's pcre input with pcre2.
* gnu/packages/base.scm: Add "--enable-perl-regexp" configure flag to grep.
---
gnu/packages/base.scm | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 41aff0ca97..feb5ca5746 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -120,9 +120,11 @@ (define-public grep
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
(native-inputs (list perl)) ;some of the tests require it
- (inputs (list pcre))
+ (inputs (list pcre2))
(arguments
- `(#:phases
+ `(#:configure-flags
+ (list "--enable-perl-regexp")
+ #:phases
(modify-phases %standard-phases
(add-after 'install 'fix-egrep-and-fgrep
;; Patch 'egrep' and 'fgrep' to execute 'grep' via its

base-commit: 13bc0633e77c73389e530a4c45e2de5a823f106b
--
2.41.0
T
T
Tobias Geerinckx-Rice wrote on 26 Nov 2023 14:59
(name . spacecadet)(address . spacecadet@purge.sh)(address . 67450-done@debbugs.gnu.org)
87zfz0lid0.fsf@nckx
Hi!

(Please don't hesitate to submit bug fixes upstream, especially
when the breakage is so clearly unintentional :-)

I changed the changelog to better follow our standards

gnu: grep: Fix PCRE matches (grep -P).

{{{No blurb here if it only rephrases the title.}}}

* gnu/packages/base.scm (grep)[inputs]: Replace pcre with
pcre2.
[arguments]: Add "--enable-perl-regexp" to #:configure-flags
to
detect broken PCRE in future.

and pushed this to core-updates as
5b0cea02358044f0cc695bacc3f44db1e220239b.

Thanks,

T G-R
-----BEGIN PGP SIGNATURE-----

iIMEARYKACsWIQT12iAyS4c9C3o4dnINsP+IT1VteQUCZWNQyw0cbWVAdG9iaWFz
LmdyAAoJEA2w/4hPVW15mmwA/2zWeuSNeE7wX35qem6Vp4/dE1bKZ8NaaRH3uaPY
tJugAQDpoN9R8t+oNQPfvfbqcX1zZr0Oas/eeAn5DwLDPMFPDA==
=1EU7
-----END PGP SIGNATURE-----

Closed
?