diff mbox series

[18/47] libpcre2: upgrade 10.42 -> 10.43

Message ID 20240306154151.3741709-18-alex@linutronix.de
State Accepted, archived
Commit 6a0cb6e129d5602808f34fd2a9460fc05d9520d6
Headers show
Series [01/47] python3-sphinxcontrib-jquery: add a recipe and make python3-sphinx-rtd-theme depend on it | expand

Commit Message

Alexander Kanavin March 6, 2024, 3:41 p.m. UTC
License-Update: copyright years

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 .../glib-2.0/glib-2.0/fix-regex.patch         | 54 +++++++++++++++++++
 meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb |  1 +
 .../{libpcre2_10.42.bb => libpcre2_10.43.bb}  |  4 +-
 3 files changed, 57 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
 rename meta/recipes-support/libpcre/{libpcre2_10.42.bb => libpcre2_10.43.bb} (92%)
diff mbox series

Patch

diff --git a/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
new file mode 100644
index 00000000000..bdfbd558999
--- /dev/null
+++ b/meta/recipes-core/glib-2.0/glib-2.0/fix-regex.patch
@@ -0,0 +1,54 @@ 
+From cce3ae98a2c1966719daabff5a4ec6cf94a846f6 Mon Sep 17 00:00:00 2001
+From: Philip Withnall <pwithnall@gnome.org>
+Date: Mon, 26 Feb 2024 16:55:44 +0000
+Subject: [PATCH] tests: Remove variable-length lookbehind tests for GRegex
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+PCRE2 10.43 has now introduced support for variable-length lookbehind,
+so these tests now fail if GLib is built against PCRE2 10.43 or higher.
+
+See
+https://github.com/PCRE2Project/pcre2/blob/e8db6fa7137f4c6f66cb87e0a3c9467252ec1ef7/ChangeLog#L94.
+
+Rather than making the tests conditional on the version of PCRE2 in use,
+just remove them. They are mostly testing the PCRE2 code rather than
+any code in GLib, so don’t have much value.
+
+This should fix CI runs on msys2-mingw32, which updated to PCRE2 10.43 2
+days ago.
+
+Signed-off-by: Philip Withnall <pwithnall@gnome.org>
+
+Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/glib/-/commit/cce3ae98a2c1966719daabff5a4ec6cf94a846f6]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ glib/tests/regex.c | 10 ----------
+ 1 file changed, 10 deletions(-)
+
+diff --git a/glib/tests/regex.c b/glib/tests/regex.c
+index 1082526292..d7a698ec67 100644
+--- a/glib/tests/regex.c
++++ b/glib/tests/regex.c
+@@ -1885,16 +1885,6 @@ test_lookbehind (void)
+   g_match_info_free (match);
+   g_regex_unref (regex);
+ 
+-  regex = g_regex_new ("(?<!dogs?|cats?) x", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+-  g_assert (regex == NULL);
+-  g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
+-  g_clear_error (&error);
+-
+-  regex = g_regex_new ("(?<=ab(c|de)) foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+-  g_assert (regex == NULL);
+-  g_assert_error (error, G_REGEX_ERROR, G_REGEX_ERROR_VARIABLE_LENGTH_LOOKBEHIND);
+-  g_clear_error (&error);
+-
+   regex = g_regex_new ("(?<=abc|abde)foo", G_REGEX_OPTIMIZE, G_REGEX_MATCH_DEFAULT, &error);
+   g_assert (regex);
+   g_assert_no_error (error);
+-- 
+GitLab
+
+
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
index 58df7bef8fb..f0fd057be70 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.78.4.bb
@@ -16,6 +16,7 @@  SRC_URI = "${GNOME_MIRROR}/glib/${SHRT_VER}/glib-${PV}.tar.xz \
            file://0001-gio-tests-resources.c-comment-out-a-build-host-only-.patch \
            file://0001-Switch-from-the-deprecated-distutils-module-to-the-p.patch \
            file://memory-monitor.patch \
+           file://fix-regex.patch \
            "
 SRC_URI:append:class-native = " file://relocate-modules.patch \ 
                                 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
diff --git a/meta/recipes-support/libpcre/libpcre2_10.42.bb b/meta/recipes-support/libpcre/libpcre2_10.43.bb
similarity index 92%
rename from meta/recipes-support/libpcre/libpcre2_10.42.bb
rename to meta/recipes-support/libpcre/libpcre2_10.43.bb
index f471b3f90a3..fd0bd79212c 100644
--- a/meta/recipes-support/libpcre/libpcre2_10.42.bb
+++ b/meta/recipes-support/libpcre/libpcre2_10.43.bb
@@ -8,14 +8,14 @@  SUMMARY = "Perl Compatible Regular Expressions version 2"
 HOMEPAGE = "http://www.pcre.org"
 SECTION = "devel"
 LICENSE = "BSD-3-Clause"
-LIC_FILES_CHKSUM = "file://LICENCE;md5=41bfb977e4933c506588724ce69bf5d2"
+LIC_FILES_CHKSUM = "file://LICENCE;md5=321a5eb46acae6b6c1ff2c7a866d836a"
 
 SRC_URI = "${GITHUB_BASE_URI}/download/pcre2-${PV}/pcre2-${PV}.tar.bz2"
 
 GITHUB_BASE_URI = "https://github.com/PhilipHazel/pcre2/releases"
 UPSTREAM_CHECK_REGEX = "releases/tag/pcre2-(?P<pver>\d+(\.\d+)+)$"
 
-SRC_URI[sha256sum] = "8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840"
+SRC_URI[sha256sum] = "e2a53984ff0b07dfdb5ae4486bbb9b21cca8e7df2434096cc9bf1b728c350bcb"
 
 CVE_PRODUCT = "pcre2"