petere / pgpcre

PCRE functions for PostgreSQL
Other
22 stars 4 forks source link

Migrate to PCRE 2 #6

Open df7cb opened 2 years ago

df7cb commented 2 years ago

From Debian bug https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1000001:

From: Matthew Vernon <matthew@debian.org>
To: maintonly@bugs.debian.org
Subject: pgpcre: depends on obsolete pcre3 library
Date: Thu, 18 Nov 2021 11:49:06 +0000

Source: pgpcre
Severity: important
User: matthew-pcredep@debian.org
Usertags: obsolete-pcre3

Dear maintainer,

Your package still depends on the old, obsolete PCRE3[0] libraries
(i.e. libpcre3-dev). This has been end of life for a while now, and
upstream do not intend to fix any further bugs in it. Accordingly, I
would like to remove the pcre3 libraries from Debian, preferably in
time for the release of Bookworm.

The newer PCRE2 library was first released in 2015, and has been in
Debian since stretch. Upstream's documentation for PCRE2 is available
here: https://pcre.org/current/doc/html/

Many large projects that use PCRE have made the switch now (e.g. git,
php); it does involve some work, but we are now at the stage where
PCRE3 should not be used, particularly if it might ever be exposed to
untrusted input.

This mass bug filing was discussed on debian-devel@ in
https://lists.debian.org/debian-devel/2021/11/msg00176.html

Regards,

Matthew [0] Historical reasons mean that old PCRE is packaged as
pcre3 in Debian 
df7cb commented 1 year ago

From a discussion in Debian IRC:

25 20:53 <smcv> Myon: in the absence of a migration guide, the next best thing might be 
                looking at the changes that were made to GLib's GRegex
25 20:54 <smcv> which is a relatively complete wrapper around pcre
25 20:54 <Myon> smcv: ah, good pointer
25 20:55 <smcv> it also has a fairly comprehensive test-suite (comprehensive enough that 
                some of the changes made for pcre2 were "stop being quite so specific 
                about what we expect")
25 20:56 <smcv> which seems like it might be helpful to you
martin-schlossarek commented 1 year ago

Is there any chance this will be implemented? I would love to see a version based on pcre2. pgpcre is much faster on complex patterns than the buildin regex engine (up to 12 times faster).