From 249ffc0f7226398a4ecba28c8d566e4d58c721bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Mon, 24 Oct 2016 10:22:56 +0200 Subject: [PATCH] Document assert capture limitation --- ...nt-current-assert-capture-limitation.patch | 38 +++++++++++++++++++ pcre2.spec | 9 ++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 pcre2-10.22-Document-current-assert-capture-limitation.patch diff --git a/pcre2-10.22-Document-current-assert-capture-limitation.patch b/pcre2-10.22-Document-current-assert-capture-limitation.patch new file mode 100644 index 0000000..4426e0c --- /dev/null +++ b/pcre2-10.22-Document-current-assert-capture-limitation.patch @@ -0,0 +1,38 @@ +From 3e67484ef38a7c13619ea44f18047644d8f49dca Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Sun, 23 Oct 2016 15:43:42 +0000 +Subject: [PATCH] Document current assert capture limitation. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://vcs.exim.org/pcre2/code/trunk@575 6239d852-aaf2-0410-a92c-79f79f948069 + +Petr Písař: Ported to 10.22. + +Signed-off-by: Petr Písař +--- + doc/pcre2pattern.3 | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/doc/pcre2pattern.3 b/doc/pcre2pattern.3 +index 57b0014..3ca1088 100644 +--- a/doc/pcre2pattern.3 ++++ b/doc/pcre2pattern.3 +@@ -2219,6 +2219,13 @@ numbering the capturing subpatterns in the whole pattern. However, substring + capturing is carried out only for positive assertions. (Perl sometimes, but not + always, does do capturing in negative assertions.) + .P ++WARNING: If a positive assertion containing one or more capturing subpatterns ++succeeds, but failure to match later in the pattern causes backtracking over ++this assertion, the captures within the assertion are reset only if no higher ++numbered captures are already set. This is, unfortunately, a fundamental ++limitation of the current implementation; it may get removed in a future ++reworking. ++.P + For compatibility with Perl, most assertion subpatterns may be repeated; though + it makes no sense to assert the same thing several times, the side effect of + capturing parentheses may occasionally be useful. However, an assertion that +-- +2.7.4 + diff --git a/pcre2.spec b/pcre2.spec index 06acff6..8c62b8f 100644 --- a/pcre2.spec +++ b/pcre2.spec @@ -2,7 +2,7 @@ #%%global rcversion RC1 Name: pcre2 Version: 10.22 -Release: %{?rcversion:0.}4%{?rcversion:.%rcversion}%{?dist} +Release: %{?rcversion:0.}5%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library Group: System Environment/Libraries @@ -46,6 +46,9 @@ Patch7: pcre2-10.22-Fix-documentation-error.patch # Fix optimization bugs for patterns starting with lookaheads, # in upstream after 10.22, upstream bug #1882 Patch8: pcre2-10.22-Fix-optimization-bugs-when-pattern-starts-with-looka.patch +# Document assert capture limitation, in upstream after 10.22, +# upstream bug #1887 +Patch9: pcre2-10.22-Document-current-assert-capture-limitation.patch # New libtool to get rid of RPATH and to use distribution autotools BuildRequires: autoconf BuildRequires: automake @@ -131,6 +134,7 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 # Because of multilib patch libtoolize --copy --force autoreconf -vif @@ -227,6 +231,9 @@ make %{?_smp_mflags} check VERBOSE=yes %{_mandir}/man1/pcre2test.* %changelog +* Mon Oct 24 2016 Petr Pisar - 10.22-5 +- Document assert capture limitation (upstream bug #1887) + * Wed Oct 19 2016 Richard W.M. Jones <@redhat.com> - 10.22-4 - Disable the JIT on riscv64.