Skip to content

Commit ea37bcf

Browse files
Steve Ayrerazvancrainea
authored andcommitted
require libpcre2
(cherry picked from commit 1cb16e0)
1 parent 2367deb commit ea37bcf

10 files changed

Lines changed: 16 additions & 14 deletions

File tree

.lgtm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extraction:
2222
- libldap2-dev
2323
- libcurl4-gnutls-dev
2424
- libgeoip-dev
25-
- libpcre3-dev
25+
- libpcre2-dev
2626
- libmemcached-dev
2727
- libmicrohttpd-dev
2828
- librabbitmq-dev

Makefile.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@
1919
#db_postgres= Provides Postgres connectivity for OpenSIPS | PostgreSQL library and development library - typically libpq5 and libpq-dev
2020
#db_sqlite= Provides SQLite connectivity for OpenSIPS | SQLite library and development library - typically libsqlite3 and libsqlite3-dev
2121
#db_unixodbc= Allows to use the unixodbc package with OpenSIPS | ODBC library and ODBC development library
22-
#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, typically libpcre-dev
22+
#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, typically libpcre2-dev
2323
#emergency= Provides emergency call treatment for OpenSIPS | CURL dev library - typically libcurl4-openssl-dev
2424
#event_rabbitmq= Provides the implementation of a RabbitMQ client for the Event Interface | RabbitMQ development library, librabbitmq-dev
2525
#event_sqs= Provides the implementation of a Amazon SQS client for the Event Interface | AWS SDK C++, aws-sdk-cpp
2626
#event_kafka= Provides the implementation of an Apache Kafka producer for the Event Interface | Kafka development library, librdkafka-dev
2727
#h350= Enables access to SIP account data stored in an LDAP [RFC4510] directory containing H.350 commObjects | OpenLDAP library & development files, typically libldap and libldap-dev
28-
#regex= Offers matching operations against regular expressions using the powerful PCRE library. | Development library for PCRE, typically libpcre-dev
28+
#regex= Offers matching operations against regular expressions using the powerful PCRE library. | Development library for PCRE, typically libpcre2-dev
2929
#identity= Adds support for SIP Identity (see RFC 4474). | SSL library, typically libssl
3030
#jabber= Integrates XODE XML parser for parsing Jabber messages | Expat library.
3131
#json= Introduces a new type of variable that provides both serialization and de-serialization from JSON format. | JSON library, libjson

modules/dialplan/dialplan.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131

3232
#include "../../db/db.h"
3333
#include "../../re.h"
34-
#include <pcre.h>
34+
#define PCRE2_CODE_UNIT_WIDTH 8
35+
#include <pcre2.h>
3536

3637
#define REGEX_OP 1
3738
#define EQUAL_OP 0

modules/regex/regex_mod.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
* 2009-01-14 initial version (Iñaki Baz Castillo)
2525
* 2023-08-12 export pcres_match to MI (Fabien Aunay)
2626
* 2023-08-12 export pcres_match_group to MI (Fabien Aunay)
27+
* 2025-09-17 switch to libpcre2 (Steven Ayre)
2728
*/
2829

2930

@@ -39,7 +40,8 @@
3940
#include <stdlib.h>
4041
#include <string.h>
4142
#include <sys/stat.h>
42-
#include <pcre.h>
43+
#define PCRE2_CODE_UNIT_WIDTH 8
44+
#include <pcre2.h>
4345
#include "../../sr_module.h"
4446
#include "../../dprint.h"
4547
#include "../../pt.h"

packaging/arch/Makefile.conf.template

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#db_postgres= Provides Postgres connectivity for OpenSIPS | PostgreSQL library and development library - tipically libpq5 and libpq-dev
1818
#db_sqlite= Provides SQLite connectivity for OpenSIPS | SQLite library and development library - tipically libsqlite3 and libsqlite3-dev
1919
#db_unixodbc= Allows to use the unixodbc package with OpenSIPS | ODBC library and ODBC development library
20-
#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, tipically libpcre-dev
20+
#dialplan= Implements generic string translations based on matching and replacement rules | PCRE development library, tipically libpcre2-dev
2121
#emergency= Provides emergency call treatment for OpenSIPS | CURL dev library - tipically libcurl4-openssl-dev
2222
#event_rabbitmq= Provides the implementation of a RabbitMQ client for the Event Interface | RabbitMQ development library, librabbitmq-dev
2323
#h350= Enables access to SIP account data stored in an LDAP [RFC4510] directory containing H.350 commObjects | OpenLDAP library & development files, tipically libldap and libldap-dev
24-
#regex= Offers matching operations against regular expressions using the powerful PCRE library. | Development library for PCRE, tipically libpcre-dev
24+
#regex= Offers matching operations against regular expressions using the powerful PCRE library. | Development library for PCRE, tipically libpcre2-dev
2525
#identity= Adds support for SIP Identity (see RFC 4474). | SSL library, tipically libssl
2626
#jabber= Integrates XODE XML parser for parsing Jabber messages | Expat library.
2727
#json= Introduces a new type of variable that provides both serialization and de-serialization from JSON format. | JSON library, libjson

packaging/arch/PKGBUILD.git

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ package_opensips-git() {
128128
'mongo-c-driver: C-Interface for Mongo-DB support'
129129
'net-snmp: SNMP support'
130130
'osptoolkit: OSP Toolkit support'
131-
'pcre: Perl Regular-Expression support'
131+
'pcre2: Perl Regular-Expression support'
132132
'perl: Perl support'
133133
'postgresql-libs: PostgreSQL-DB support'
134134
'python2: Python v2 support'

packaging/debian/control

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Build-Depends: bison,
2929
libbson-dev | base-files,
3030
libmongoc-dev | base-files,
3131
libncurses5-dev,
32-
libpcre3-dev,
32+
libpcre2-dev,
3333
libperl-dev,
3434
libpq-dev,
3535
librabbitmq-dev,

packaging/redhat_fedora/opensips.spec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ BuildRequires: openldap-devel
7979
BuildRequires: curl-devel
8080
# BuildRequires: GeoIP-devel
8181
BuildRequires: libmaxminddb-devel
82-
BuildRequires: pcre-devel
82+
BuildRequires: pcre2-devel
8383
%if 0%{?_with_python3:1}
8484
BuildRequires: python3-devel
8585
%else

packaging/solaris/regex-preinstall

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# Script for checking prerequisites for OpenSIPS-xmlrpc
33

44
BASE="OpenSIPS-base"
5-
LIBPCRE="libpcre.so"
5+
LIBPCRE="libpcre2.so"
66
TMPLIST="/tmp/.opensipspcre"
77

88
pkginfo | grep -i $BASE > /dev/null

scripts/build/apt_requirements.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@ libmaxminddb-dev
1313
libmemcached-dev
1414
libmicrohttpd-dev
1515
libmnl-dev
16-
libmysqlclient-dev
1716
libncurses5-dev
18-
libpcre3-dev
17+
libpcre2-dev
1918
libperl-dev
2019
libpq-dev
2120
librabbitmq-dev
@@ -27,7 +26,7 @@ libxml2-dev
2726
make
2827
odbcinst
2928
patch
30-
python-dev
29+
python3-dev
3130
unixodbc
3231
unixodbc-dev
3332
uuid-dev

0 commit comments

Comments
 (0)