Skip to contentSkip to conversation

pcre vs pcre2

cocci Richard W.M. Jones 3 participants 4 messages Jul 22, 2022 – Sep 20, 2022

lore
Share & tools
lore
#0 lore raw

PCRE (not PCRE2) is end of life: http://www.pcre.org/

and may be removed from Fedora:

https://lists.fedoraproject.org/archives/list/[email protected]/message/K3BUC6T5VIG7LXOV4RVFO7IUPE2LGA2J/

It seems as if coccinelle has an optional dep on PCRE enabled/disabled through ./configure --enable-pcre-syntax. It's not entirely clear to me what Fedora would lose by disabling this.

Does coccinelle plan to move to PCRE2?

I have moved a few projects over to PCRE2. It's definitely not an automatic conversion, although it also wasn't especially difficult. Here's libguestfs. This is mostly C and we maintain our own PCRE bindings for OCaml which are not based on Markus Mottl's bindings, but it should give you an idea of the changes:

https://github.com/libguestfs/libguestfs/commit/82493579f38f39769861f31403ccfb8e97b41f96
https://github.com/libguestfs/libguestfs-common/commit/0b244f2b0cfc920f2432f5df45e108583f0d2901

We decided not to support alternate PCRE or PCRE2 compiles since all distros have provided PCRE2 for a long time.

Also:

https://github.com/mmottl/pcre-ocaml/issues/25

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit
#1 lore raw
Quoted 21 lines · Richard W.M. Jones

PCRE (not PCRE2) is end of life: http://www.pcre.org/

and may be removed from Fedora:

https://lists.fedoraproject.org/archives/list/[email protected]/message/K3BUC6T5VIG7LXOV4RVFO7IUPE2LGA2J/

It seems as if coccinelle has an optional dep on PCRE enabled/disabled through ./configure --enable-pcre-syntax. It's not entirely clear to me what Fedora would lose by disabling this.

Does coccinelle plan to move to PCRE2?

I have moved a few projects over to PCRE2. It's definitely not an automatic conversion, although it also wasn't especially difficult. Here's libguestfs. This is mostly C and we maintain our own PCRE bindings for OCaml which are not based on Markus Mottl's bindings, but it should give you an idea of the changes:

https://github.com/libguestfs/libguestfs/commit/82493579f38f39769861f31403ccfb8e97b41f96
https://github.com/libguestfs/libguestfs-common/commit/0b244f2b0cfc920f2432f5df45e108583f0d2901

Quoted 6 lines

We decided not to support alternate PCRE or PCRE2 compiles since all distros have provided PCRE2 for a long time.

Also:

https://github.com/mmottl/pcre-ocaml/issues/25

Thanks for the warning. I don't think Coccinelle (the implementation) actually uses PCRE in any important way. It just makes PCRE availble to the user for writing semantic patches. I will look into how we can convert (or at least make PCRE2 available as an additional option).

julia

Quoted 10 lines

Rich.

--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
nbdkit - Flexible, fast NBD server with plugins
https://gitlab.com/nbdkit/nbdkit

#3 lore raw
In reply to Richard W.M. Jones
Quoted 1 line

Does coccinelle plan to move to PCRE2?

I suggest to take another look at previous clarification requests.

Examples:
* Building the software for PCRE2 usage
  2018-07-17
  https://github.com/ggreer/the_silver_searcher/issues/1257

* Support for PCRE2
  2016-11-09
  https://github.com/mmottl/pcre-ocaml/issues/10

* Configuration possibilities for evaluation of regular expressions in SmPL constraints 2018-11-20
  https://github.com/coccinelle/coccinelle/issues/149

How will development interests evolve further for involved software components?

Regards,
Markus

#2 lore raw
In reply to Julia Lawall
Quoted 30 lines · Julia Lawall
Quoted 26 lines · Richard W.M. Jones

PCRE (not PCRE2) is end of life: http://www.pcre.org/

and may be removed from Fedora:

https://lists.fedoraproject.org/archives/list/[email protected]/message/K3BUC6T5VIG7LXOV4RVFO7IUPE2LGA2J/

It seems as if coccinelle has an optional dep on PCRE enabled/disabled through ./configure --enable-pcre-syntax. It's not entirely clear to me what Fedora would lose by disabling this.

Does coccinelle plan to move to PCRE2?

I have moved a few projects over to PCRE2. It's definitely not an automatic conversion, although it also wasn't especially difficult. Here's libguestfs. This is mostly C and we maintain our own PCRE bindings for OCaml which are not based on Markus Mottl's bindings, but it should give you an idea of the changes:

https://github.com/libguestfs/libguestfs/commit/82493579f38f39769861f31403ccfb8e97b41f96
https://github.com/libguestfs/libguestfs-common/commit/0b244f2b0cfc920f2432f5df45e108583f0d2901

We decided not to support alternate PCRE or PCRE2 compiles since all distros have provided PCRE2 for a long time.

Also:

Quoted 8 lines
Quoted 1 line

https://github.com/mmottl/pcre-ocaml/issues/25

Thanks for the warning. I don't think Coccinelle (the implementation) actually uses PCRE in any important way. It just makes PCRE availble to the user for writing semantic patches. I will look into how we can convert (or at least make PCRE2 available as an additional option).

julia

To follow up, here's the Fedora bug:

https://bugzilla.redhat.com/show_bug.cgi?id=2128281

Rich.

Signature · 4 lines
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org