* [bug#29880] [PATCH] gnu: grep: Add PCRE support.
@ 2017-12-28 19:18 Oleg Pykhalov
2018-01-08 9:08 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Oleg Pykhalov @ 2017-12-28 19:18 UTC (permalink / raw)
To: 29880
[-- Attachment #1.1: Type: text/plain, Size: 70 bytes --]
Hello Guix,
This patch allows to grep with perl regular expression.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: [PATCH] gnu: grep: Add PCRE support. --]
[-- Type: text/x-patch, Size: 1180 bytes --]
From db4fe96c7c6c0fcaa82e1131aba157c5d5e5f537 Mon Sep 17 00:00:00 2001
From: Oleg Pykhalov <go.wigust@gmail.com>
Date: Thu, 28 Dec 2017 22:12:13 +0300
Subject: [PATCH] gnu: grep: Add PCRE support.
* gnu/packages/base.scm (grep)[inputs]: New field.
---
gnu/packages/base.scm | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 9cb628d8d..2b439e958 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -40,6 +40,7 @@
#:use-module (gnu packages linux)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages hurd)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages gettext)
#:use-module (guix utils)
@@ -92,6 +93,7 @@ command-line arguments, multiple languages, and so on.")
(patches (search-patches "grep-timing-sensitive-test.patch"
"grep-gnulib-lock.patch"))))
(build-system gnu-build-system)
+ (inputs `(("pcre" ,pcre)))
(native-inputs `(("perl" ,perl))) ;some of the tests require it
(arguments
`(#:phases
--
2.15.1
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [bug#29880] [PATCH] gnu: grep: Add PCRE support.
2017-12-28 19:18 [bug#29880] [PATCH] gnu: grep: Add PCRE support Oleg Pykhalov
@ 2018-01-08 9:08 ` Ludovic Courtès
2018-01-08 16:28 ` Roel Janssen
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-01-08 9:08 UTC (permalink / raw)
To: Oleg Pykhalov; +Cc: 29880
Hi Oleg,
Oleg Pykhalov <go.wigust@gmail.com> skribis:
> This patch allows to grep with perl regular expression.
>
> From db4fe96c7c6c0fcaa82e1131aba157c5d5e5f537 Mon Sep 17 00:00:00 2001
> From: Oleg Pykhalov <go.wigust@gmail.com>
> Date: Thu, 28 Dec 2017 22:12:13 +0300
> Subject: [PATCH] gnu: grep: Add PCRE support.
>
> * gnu/packages/base.scm (grep)[inputs]: New field.
This would be for the next ‘core-updates’. Did you try a full rebuild?
I’m mildly wary of this change because PCRE is a non-trivial piece of
software that increases the attack surface, and we’d end up grafting
things potentially often. For instance, right now I get:
$ guix lint pcre
gnu/packages/pcre.scm:77:2: pcre@8.41: probably vulnerable to CVE-2017-11164
Would it make sense to instead have a separate “grep-pcre”?
What do people think?
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#29880] [PATCH] gnu: grep: Add PCRE support.
2018-01-08 9:08 ` Ludovic Courtès
@ 2018-01-08 16:28 ` Roel Janssen
2018-01-09 8:54 ` Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Roel Janssen @ 2018-01-08 16:28 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29880
Ludovic Courtès writes:
> Hi Oleg,
>
> Oleg Pykhalov <go.wigust@gmail.com> skribis:
>
>> This patch allows to grep with perl regular expression.
>>
>> From db4fe96c7c6c0fcaa82e1131aba157c5d5e5f537 Mon Sep 17 00:00:00 2001
>> From: Oleg Pykhalov <go.wigust@gmail.com>
>> Date: Thu, 28 Dec 2017 22:12:13 +0300
>> Subject: [PATCH] gnu: grep: Add PCRE support.
>>
>> * gnu/packages/base.scm (grep)[inputs]: New field.
>
> This would be for the next ‘core-updates’. Did you try a full rebuild?
>
> I’m mildly wary of this change because PCRE is a non-trivial piece of
> software that increases the attack surface, and we’d end up grafting
> things potentially often. For instance, right now I get:
>
> $ guix lint pcre
> gnu/packages/pcre.scm:77:2: pcre@8.41: probably vulnerable to CVE-2017-11164
>
> Would it make sense to instead have a separate “grep-pcre”?
>
> What do people think?
I have been maintaining a separate package for grep with PCRE support
for the users on our cluster. What I would like to add is that at least
Debian and RedHat enable PCRE in their grep versions. So using Guix's
grep broke some scripts.
If compatibility with other GNU/Linux distributions counts for anything,
I'd say we should enable it. I am in favor of enabling PCRE.
We could provide a separate version of grep without PCRE as a
grep-minimal.
Thanks for your time!
Kind regards,
Roel Janssen
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#29880] [PATCH] gnu: grep: Add PCRE support.
2018-01-08 16:28 ` Roel Janssen
@ 2018-01-09 8:54 ` Ludovic Courtès
2018-01-09 11:23 ` Roel Janssen
0 siblings, 1 reply; 6+ messages in thread
From: Ludovic Courtès @ 2018-01-09 8:54 UTC (permalink / raw)
To: Roel Janssen; +Cc: 29880
Hello,
Roel Janssen <roel@gnu.org> skribis:
> I have been maintaining a separate package for grep with PCRE support
> for the users on our cluster. What I would like to add is that at least
> Debian and RedHat enable PCRE in their grep versions. So using Guix's
> grep broke some scripts.
>
> If compatibility with other GNU/Linux distributions counts for anything,
> I'd say we should enable it. I am in favor of enabling PCRE.
OK, that makes sense.
> We could provide a separate version of grep without PCRE as a
> grep-minimal.
Alternately, what we could do is:
1. Keep ‘grep-final’ as it is right now (without PCRE support; this
has never been a problem so far.)
2. Add PCRE to ‘grep’ itself (like Oleg did).
Thoughts?
Ludo’.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [bug#29880] [PATCH] gnu: grep: Add PCRE support.
2018-01-09 8:54 ` Ludovic Courtès
@ 2018-01-09 11:23 ` Roel Janssen
2018-01-11 21:50 ` bug#29880: " Ludovic Courtès
0 siblings, 1 reply; 6+ messages in thread
From: Roel Janssen @ 2018-01-09 11:23 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: 29880
Ludovic Courtès writes:
> Hello,
>
> Roel Janssen <roel@gnu.org> skribis:
>
>> I have been maintaining a separate package for grep with PCRE support
>> for the users on our cluster. What I would like to add is that at least
>> Debian and RedHat enable PCRE in their grep versions. So using Guix's
>> grep broke some scripts.
>>
>> If compatibility with other GNU/Linux distributions counts for anything,
>> I'd say we should enable it. I am in favor of enabling PCRE.
>
> OK, that makes sense.
>
>> We could provide a separate version of grep without PCRE as a
>> grep-minimal.
>
> Alternately, what we could do is:
>
> 1. Keep ‘grep-final’ as it is right now (without PCRE support; this
> has never been a problem so far.)
>
> 2. Add PCRE to ‘grep’ itself (like Oleg did).
>
> Thoughts?
Yes that seems fine to me.
Kind regards,
Roel Janssen
^ permalink raw reply [flat|nested] 6+ messages in thread
* bug#29880: [PATCH] gnu: grep: Add PCRE support.
2018-01-09 11:23 ` Roel Janssen
@ 2018-01-11 21:50 ` Ludovic Courtès
0 siblings, 0 replies; 6+ messages in thread
From: Ludovic Courtès @ 2018-01-11 21:50 UTC (permalink / raw)
To: Roel Janssen; +Cc: 29880-done
Hi,
Roel Janssen <roel@gnu.org> skribis:
> Ludovic Courtès writes:
[...]
>> Alternately, what we could do is:
>>
>> 1. Keep ‘grep-final’ as it is right now (without PCRE support; this
>> has never been a problem so far.)
>>
>> 2. Add PCRE to ‘grep’ itself (like Oleg did).
>>
>> Thoughts?
>
> Yes that seems fine to me.
Done in 20bf5fce7dbdc754a6c430abbeb50fb0662bda38.
Thanks!
Ludo'.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-01-11 21:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-28 19:18 [bug#29880] [PATCH] gnu: grep: Add PCRE support Oleg Pykhalov
2018-01-08 9:08 ` Ludovic Courtès
2018-01-08 16:28 ` Roel Janssen
2018-01-09 8:54 ` Ludovic Courtès
2018-01-09 11:23 ` Roel Janssen
2018-01-11 21:50 ` bug#29880: " Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).