diff --git a/pcre-8.39-Document-assertion-capture-limitation.patch b/pcre-8.39-Document-assertion-capture-limitation.patch new file mode 100644 index 0000000..578ed7b --- /dev/null +++ b/pcre-8.39-Document-assertion-capture-limitation.patch @@ -0,0 +1,49 @@ +From ee124b6b235a560fc5bfc18cc27e280af7e021d2 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Sun, 23 Oct 2016 15:44:15 +0000 +Subject: [PATCH] Document assertion capture limitation. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1671 2f5784b3-3f2a-0410-8824-cb99058d5e15 +Signed-off-by: Petr Písař +--- + doc/pcrepattern.3 | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/doc/pcrepattern.3 b/doc/pcrepattern.3 +index 1e25371..c221682 100644 +--- a/doc/pcrepattern.3 ++++ b/doc/pcrepattern.3 +@@ -1,4 +1,4 @@ +-.TH PCREPATTERN 3 "14 October 2016" "PCRE 8.40" ++.TH PCREPATTERN 3 "23 October 2016" "PCRE 8.40" + .SH NAME + PCRE - Perl-compatible regular expressions + .SH "PCRE REGULAR EXPRESSION DETAILS" +@@ -2167,6 +2167,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, and as PCRE1 is now in ++maintenance-only status, it is unlikely ever to change. ++.P + For compatibility with Perl, 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. In practice, there only three +@@ -3292,6 +3299,6 @@ Cambridge CB2 3QH, England. + .rs + .sp + .nf +-Last updated: 14 October 2016 ++Last updated: 23 October 2016 + Copyright (c) 1997-2016 University of Cambridge. + .fi +-- +2.7.4 + diff --git a/pcre.spec b/pcre.spec index d48ede3..be6e02d 100644 --- a/pcre.spec +++ b/pcre.spec @@ -2,7 +2,7 @@ #%%global rcversion RC1 Name: pcre Version: 8.39 -Release: %{?rcversion:0.}5%{?rcversion:.%rcversion}%{?dist} +Release: %{?rcversion:0.}6%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library Group: System Environment/Libraries @@ -59,6 +59,9 @@ Patch8: pcre-8.39-Fix-documentation-error.patch # Fix optimization bugs for patterns starting with lookaheads, # in upstream after 8.39, upstream bug #1882 Patch9: pcre-8.39-Fix-optimization-bugs-for-patterns-starting-with-loo.patch +# Document assert capture limitation, in upstream after 8.39, +# upstream bug #1887 +Patch10: pcre-8.39-Document-assertion-capture-limitation.patch BuildRequires: readline-devel BuildRequires: autoconf BuildRequires: automake @@ -156,6 +159,7 @@ Utilities demonstrating PCRE capabilities like pcregrep or pcretest. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 # Because of rpath patch libtoolize --copy --force autoreconf -vif @@ -252,6 +256,9 @@ make %{?_smp_mflags} check VERBOSE=yes %{_mandir}/man1/pcretest.* %changelog +* Mon Oct 24 2016 Petr Pisar - 8.39-6 +- Document assert capture limitation (upstream bug #1887) + * Wed Oct 19 2016 Petr Pisar - 8.39-5 - Fix internal option documentation in pcrepattern(3) (upstream bug #1875) - Fix optimization bugs for patterns starting with lookaheads