Bug 1938982 - Move libguestfs from PCRE to PCRE2
Summary: Move libguestfs from PCRE to PCRE2
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: libguestfs
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-03-15 12:03 UTC by Petr Pisar
Modified: 2021-03-16 15:26 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-03-16 14:30:52 UTC
Type: Feature Request
Embargoed:


Attachments (Terms of Use)

Description Petr Pisar 2021-03-15 12:03:52 UTC
This is a kindly hint that libguestfs-1:1.45.1-4.fc35 still uses PCRE library which has been superseded with PCRE2 project by PCRE upstream in 2015. PCRE upstream considers PCRE obsolete now and does not devote any resources to PCRE except of critical bugs. Please consider porting libguestfs from PCRE to PCRE2.

Comment 1 Richard W.M. Jones 2021-03-15 12:43:26 UTC
Interesting - I didn't know anything about this.  We use the C API, although
nothing very complicated about it.  However I cannot find any documentation
on migration or the differences between the APIs.  It seems as if most of the
symbols have gone from pcre|PCRE -> pcre2|PCRE2.

Comment 2 Petr Pisar 2021-03-15 16:47:37 UTC
There is no migration guide. The basic approach remains the same, mostly only the prefix has changed. But there are slight differences, some data structures became opaque, some functions gained a new argument for a memory allocator to improve thread safety, API for an optional just-in-time matching was reworked, data types for Unicode code points and their UTF encoding were unified. I recommend you going through your code and checking the PCRE2 manual pages to see whether the functions differ. Again, there is pcre2demo(3) manual with an example application and pcre2api(3) with an index of the functions.

Comment 3 Richard W.M. Jones 2021-03-16 14:30:52 UTC
That was a bunch of busy-work, but here you go:

https://github.com/libguestfs/libguestfs/commit/82493579f38f39769861f31403ccfb8e97b41f96

Will be fixed in libguestfs 1.45.2.

Comment 4 Petr Pisar 2021-03-16 15:26:56 UTC
Thank you very much.


Note You need to log in before you can comment on or make changes to this bug.