diff --git a/.pcre.metadata b/.pcre.metadata new file mode 100644 index 0000000..d4cc31d --- /dev/null +++ b/.pcre.metadata @@ -0,0 +1 @@ +dbd44267cf4d7c6464391003908d5a4342726700 SOURCES/pcre-8.32.tar.bz2 diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/pcre-8.21-multilib.patch b/SOURCES/pcre-8.21-multilib.patch new file mode 100644 index 0000000..345e624 --- /dev/null +++ b/SOURCES/pcre-8.21-multilib.patch @@ -0,0 +1,37 @@ +From 1d5ce3e2e6341b01609aefab20786a8638fee17a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 6 Dec 2011 18:44:11 +0100 +Subject: [PATCH] Fix multilib + +Do not set RPATH nor add explicit -L path to compiler. +--- + pcre-config.in | 12 ------------ + 1 files changed, 0 insertions(+), 12 deletions(-) + +diff --git a/pcre-config.in b/pcre-config.in +index ccbf210..aeee182 100644 +--- a/pcre-config.in ++++ b/pcre-config.in +@@ -16,19 +16,7 @@ if test $# -eq 0; then + fi + + libR= +-case `uname -s` in +- *SunOS*) +- libR=" -R@libdir@" +- ;; +- *BSD*) +- libR=" -Wl,-R@libdir@" +- ;; +-esac +- + libS= +-if test @libdir@ != /usr/lib ; then +- libS=-L@libdir@ +-fi + + while test $# -gt 0; do + case "$1" in +-- +1.7.7.4 + diff --git a/SOURCES/pcre-8.32-Fix-forward-search-in-JIT-when-link-size-is-3-or-gre.patch b/SOURCES/pcre-8.32-Fix-forward-search-in-JIT-when-link-size-is-3-or-gre.patch new file mode 100644 index 0000000..5998612 --- /dev/null +++ b/SOURCES/pcre-8.32-Fix-forward-search-in-JIT-when-link-size-is-3-or-gre.patch @@ -0,0 +1,50 @@ +From 693f81d9b37934fdb3a0b1de6d06cacbecaffb63 Mon Sep 17 00:00:00 2001 +From: zherczeg +Date: Fri, 18 Jan 2013 08:20:44 +0000 +Subject: [PATCH] Fix forward search in JIT when link size is 3 or greater. + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1239 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Ported to 8.32. + +diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c +index cc9f097..3b83340 100644 +--- a/pcre_jit_compile.c ++++ b/pcre_jit_compile.c +@@ -2573,7 +2573,7 @@ DEFINE_COMPILER; + struct sljit_label *start; + struct sljit_jump *quit; + pcre_uint32 chars[MAX_N_CHARS * 2]; +-pcre_uchar *cc = common->start + 1 + IMM2_SIZE; ++pcre_uchar *cc = common->start + 1 + LINK_SIZE; + int location = 0; + pcre_int32 len, c, bit, caseless; + int must_stop; +diff --git a/testdata/testinput12 b/testdata/testinput12 +index 7deba3c..92c9603 100644 +--- a/testdata/testinput12 ++++ b/testdata/testinput12 +@@ -86,4 +86,7 @@ and a couple of things that are different with JIT. --/ + + /.?(*THEN)/S!+I + ++/^12345678abcd/mS++ ++ 12345678abcd ++ + /-- End of testinput12 --/ +diff --git a/testdata/testoutput12 b/testdata/testoutput12 +index 559f48d..f3c0230 100644 +--- a/testdata/testoutput12 ++++ b/testdata/testoutput12 +@@ -178,4 +178,8 @@ Subject length lower bound = -1 + No set of starting bytes + JIT study was not successful + ++/^12345678abcd/mS++ ++ 12345678abcd ++ 0: 12345678abcd (JIT) ++ + /-- End of testinput12 --/ +-- +1.8.1 + diff --git a/SOURCES/pcre-8.32-Fix-two-buffer-over-read-issues-in-16-and-32-bit-mod.patch b/SOURCES/pcre-8.32-Fix-two-buffer-over-read-issues-in-16-and-32-bit-mod.patch new file mode 100644 index 0000000..39f1a54 --- /dev/null +++ b/SOURCES/pcre-8.32-Fix-two-buffer-over-read-issues-in-16-and-32-bit-mod.patch @@ -0,0 +1,107 @@ +From be692806851f4883b87fc814adc80ab1bb46455e Mon Sep 17 00:00:00 2001 +From: zherczeg +Date: Sat, 26 Jan 2013 17:51:43 +0000 +Subject: [PATCH] Fix two buffer over read issues in 16 and 32 bit modes. + Affects JIT only. + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1242 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Ported to 8.32. + +diff --git a/pcre_jit_compile.c b/pcre_jit_compile.c +index 3b83340..7dfe558 100644 +--- a/pcre_jit_compile.c ++++ b/pcre_jit_compile.c +@@ -2696,10 +2696,10 @@ if (firstline) + { + SLJIT_ASSERT(common->first_line_end != 0); + OP1(SLJIT_MOV, TMP3, 0, STR_END, 0); +- OP2(SLJIT_SUB, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, SLJIT_IMM, (location >> 1) - 1); ++ OP2(SLJIT_SUB, STR_END, 0, SLJIT_MEM1(SLJIT_LOCALS_REG), common->first_line_end, SLJIT_IMM, IN_UCHARS((location >> 1) - 1)); + } + else +- OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, (location >> 1) - 1); ++ OP2(SLJIT_SUB, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS((location >> 1) - 1)); + + start = LABEL(); + quit = CMP(SLJIT_C_GREATER_EQUAL, STR_PTR, 0, STR_END, 0); +@@ -2728,7 +2728,7 @@ JUMPHERE(quit); + if (firstline) + OP1(SLJIT_MOV, STR_END, 0, TMP3, 0); + else +- OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, (location >> 1) - 1); ++ OP2(SLJIT_ADD, STR_END, 0, STR_END, 0, SLJIT_IMM, IN_UCHARS((location >> 1) - 1)); + return TRUE; + } + +@@ -3577,7 +3577,7 @@ do + #endif + + context->length -= IN_UCHARS(1); +-#if defined SLJIT_UNALIGNED && SLJIT_UNALIGNED ++#if (defined SLJIT_UNALIGNED && SLJIT_UNALIGNED) && (defined COMPILE_PCRE8 || defined COMPILE_PCRE16) + + /* Unaligned read is supported. */ + if (othercasebit != 0 && othercasechar == cc) +@@ -3594,27 +3594,18 @@ do + + #if defined COMPILE_PCRE8 + if (context->ucharptr >= 4 || context->length == 0 || (context->ucharptr == 2 && context->length == 1)) +-#elif defined COMPILE_PCRE16 ++#else + if (context->ucharptr >= 2 || context->length == 0) +-#elif defined COMPILE_PCRE32 +- if (1 /* context->ucharptr >= 1 || context->length == 0 */) + #endif + { +-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16 + if (context->length >= 4) + OP1(SLJIT_MOV_SI, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length); +-#if defined COMPILE_PCRE8 + else if (context->length >= 2) + OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length); ++#if defined COMPILE_PCRE8 + else if (context->length >= 1) + OP1(SLJIT_MOV_UB, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length); +-#elif defined COMPILE_PCRE16 +- else if (context->length >= 2) +- OP1(SLJIT_MOV_UH, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length); +-#endif /* COMPILE_PCRE[8|16] */ +-#elif defined COMPILE_PCRE32 +- OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length); +-#endif /* COMPILE_PCRE[8|16|32] */ ++#endif /* COMPILE_PCRE8 */ + context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1; + + switch(context->ucharptr) +@@ -3625,7 +3616,6 @@ do + add_jump(compiler, backtracks, CMP(SLJIT_C_NOT_EQUAL, context->sourcereg, 0, SLJIT_IMM, context->c.asint | context->oc.asint)); + break; + +-#if defined COMPILE_PCRE8 || defined COMPILE_PCRE16 + case 2 / sizeof(pcre_uchar): + if (context->oc.asushort != 0) + OP2(SLJIT_OR, context->sourcereg, 0, context->sourcereg, 0, SLJIT_IMM, context->oc.asushort); +@@ -3640,8 +3630,6 @@ do + break; + #endif + +-#endif /* COMPILE_PCRE[8|16] */ +- + default: + SLJIT_ASSERT_STOP(); + break; +@@ -3651,8 +3639,8 @@ do + + #else + +- /* Unaligned read is unsupported. */ +- if (context->length > 0) ++ /* Unaligned read is unsupported or in 32 bit mode. */ ++ if (context->length >= 1) + OP1(MOV_UCHAR, context->sourcereg, 0, SLJIT_MEM1(STR_PTR), -context->length); + + context->sourcereg = context->sourcereg == TMP1 ? TMP2 : TMP1; +-- +1.8.1 + diff --git a/SOURCES/pcre-8.32-refused_spelling_terminated.patch b/SOURCES/pcre-8.32-refused_spelling_terminated.patch new file mode 100644 index 0000000..32c9f7e --- /dev/null +++ b/SOURCES/pcre-8.32-refused_spelling_terminated.patch @@ -0,0 +1,48 @@ +From 6f8b68f2740f3100154342338ed3d26e676dae69 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 7 Feb 2011 11:37:09 +0100 +Subject: [PATCH] Fix spelling in pcretest(1) manual + +I kept some non-dictionary words to be consistent. +Credits to John Bradshaw. + +Spelling refused by upstream : + +I have applied these patches, except for "termi-nated", because my +Collins dictionary of spelling and word division shows "termin-ate" and +"termin-ating". I do know that there is a cultural difference between +British and American hyphenation conventions; I try to follow the +British ones, as exemplified in the Collins. +--- + doc/pcretest.1 | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/doc/pcretest.1 b/doc/pcretest.1 +index 41ef6ac..258a62f 100644 +--- a/doc/pcretest.1 ++++ b/doc/pcretest.1 +@@ -601,8 +601,8 @@ recognized: + after a successful match (number less than 32) + .\" JOIN + \eCname call pcre[16|32]_copy_named_substring() for substring +- "name" after a successful match (name termin- +- ated by next non alphanumeric character) ++ "name" after a successful match (name terminated ++ by next non alphanumeric character) + .\" JOIN + \eC+ show the current captured substrings at callout + time +@@ -623,8 +623,8 @@ recognized: + after a successful match (number less than 32) + .\" JOIN + \eGname call pcre[16|32]_get_named_substring() for substring +- "name" after a successful match (name termin- +- ated by next non-alphanumeric character) ++ "name" after a successful match (name terminated ++ by next non-alphanumeric character) + .\" JOIN + \eJdd set up a JIT stack of dd kilobytes maximum (any + number of digits) +-- +1.7.11.7 + diff --git a/SOURCES/pcre-8.33-RC1-Fix-pcregrep-so-that-it-can-find-empty-lines.patch b/SOURCES/pcre-8.33-RC1-Fix-pcregrep-so-that-it-can-find-empty-lines.patch new file mode 100644 index 0000000..0231790 --- /dev/null +++ b/SOURCES/pcre-8.33-RC1-Fix-pcregrep-so-that-it-can-find-empty-lines.patch @@ -0,0 +1,147 @@ +From 038a52f90a30d93c5688a882620bfd392f386076 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Fri, 10 May 2013 11:40:06 +0000 +Subject: [PATCH] Fix pcregrep so that it can find empty lines. + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1324 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Ported to 8.33-RC1. + +diff --git a/RunGrepTest b/RunGrepTest +index 94fd808..daaf8af 100755 +--- a/RunGrepTest ++++ b/RunGrepTest +@@ -486,6 +486,22 @@ echo "---------------------------- Test 101 ------------------------------" >>te + (cd $srcdir; $valgrind $pcregrep -o3 -Ho2 -o12 --only-matching=1 -o3 --colour=always --om-separator='|' '(\w+) binary (\w+)(\.)?' ./testdata/grepinput) >>testtry + echo "RC=$?" >>testtry + ++echo "---------------------------- Test 102 -----------------------------" >>testtry ++(cd $srcdir; $valgrind $pcregrep -n "^$" ./testdata/grepinput3) >>testtry 2>&1 ++echo "RC=$?" >>testtry ++ ++echo "---------------------------- Test 103 -----------------------------" >>testtry ++(cd $srcdir; $valgrind $pcregrep --only-matching "^$" ./testdata/grepinput3) >>testtry 2>&1 ++echo "RC=$?" >>testtry ++ ++echo "---------------------------- Test 104 -----------------------------" >>testtry ++(cd $srcdir; $valgrind $pcregrep -n --only-matching "^$" ./testdata/grepinput3) >>testtry 2>&1 ++echo "RC=$?" >>testtry ++ ++echo "---------------------------- Test 105 -----------------------------" >>testtry ++(cd $srcdir; $valgrind $pcregrep --colour=always "ipsum|" ./testdata/grepinput3) >>testtry 2>&1 ++echo "RC=$?" >>testtry ++ + + # Now compare the results. + +diff --git a/pcregrep.c b/pcregrep.c +index 2e0dc03..1d20733 100644 +--- a/pcregrep.c ++++ b/pcregrep.c +@@ -1378,6 +1378,7 @@ to find all possible matches. + Arguments: + matchptr the start of the subject + length the length of the subject to match ++ options options for pcre_exec + startoffset where to start matching + offsets the offets vector to fill in + mrc address of where to put the result of pcre_exec() +@@ -1388,8 +1389,8 @@ Returns: TRUE if there was a match + */ + + static BOOL +-match_patterns(char *matchptr, size_t length, int startoffset, int *offsets, +- int *mrc) ++match_patterns(char *matchptr, size_t length, unsigned int options, ++ int startoffset, int *offsets, int *mrc) + { + int i; + size_t slen = length; +@@ -1404,7 +1405,7 @@ if (slen > 200) + for (i = 1; p != NULL; p = p->next, i++) + { + *mrc = pcre_exec(p->compiled, p->hint, matchptr, (int)length, +- startoffset, PCRE_NOTEMPTY, offsets, OFFSET_SIZE); ++ startoffset, options, offsets, OFFSET_SIZE); + if (*mrc >= 0) return TRUE; + if (*mrc == PCRE_ERROR_NOMATCH) continue; + fprintf(stderr, "pcregrep: pcre_exec() gave error %d while matching ", *mrc); +@@ -1539,6 +1540,7 @@ while (ptr < endptr) + int endlinelength; + int mrc = 0; + int startoffset = 0; ++ unsigned int options = 0; + BOOL match; + char *matchptr = ptr; + char *t = ptr; +@@ -1628,9 +1630,12 @@ while (ptr < endptr) + + /* Run through all the patterns until one matches or there is an error other + than NOMATCH. This code is in a subroutine so that it can be re-used for +- finding subsequent matches when colouring matched lines. */ ++ finding subsequent matches when colouring matched lines. After finding one ++ match, set PCRE_NOTEMPTY to disable any further matches of null strings in ++ this line. */ + +- match = match_patterns(matchptr, length, startoffset, offsets, &mrc); ++ match = match_patterns(matchptr, length, options, startoffset, offsets, &mrc); ++ options = PCRE_NOTEMPTY; + + /* If it's a match or a not-match (as required), do what's wanted. */ + +@@ -1871,7 +1876,8 @@ while (ptr < endptr) + { + startoffset = offsets[1]; + if (startoffset >= (int)linelength + endlinelength || +- !match_patterns(matchptr, length, startoffset, offsets, &mrc)) ++ !match_patterns(matchptr, length, options, startoffset, offsets, ++ &mrc)) + break; + FWRITE(matchptr + startoffset, 1, offsets[0] - startoffset, stdout); + fprintf(stdout, "%c[%sm", 0x1b, colour_string); +diff --git a/testdata/grepoutput b/testdata/grepoutput +index 733b9d6..cf04091 100644 +--- a/testdata/grepoutput ++++ b/testdata/grepoutput +@@ -705,3 +705,38 @@ RC=0 + ./testdata/grepinput:zero|a + ./testdata/grepinput:.|zero|the|. + RC=0 ++---------------------------- Test 102 ----------------------------- ++2: ++5: ++7: ++9: ++12: ++14: ++RC=0 ++---------------------------- Test 103 ----------------------------- ++RC=0 ++---------------------------- Test 104 ----------------------------- ++2: ++5: ++7: ++9: ++12: ++14: ++RC=0 ++---------------------------- Test 105 ----------------------------- ++triple: t1_txt s1_tag s_txt p_tag p_txt o_tag o_txt ++ ++triple: t2_txt s1_tag s_txt p_tag p_txt o_tag ++Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. ++ ++triple: t3_txt s2_tag s_txt p_tag p_txt o_tag o_txt ++ ++triple: t4_txt s1_tag s_txt p_tag p_txt o_tag o_txt ++ ++triple: t5_txt s1_tag s_txt p_tag p_txt o_tag ++o_txt ++ ++triple: t6_txt s2_tag s_txt p_tag p_txt o_tag o_txt ++ ++triple: t7_txt s1_tag s_txt p_tag p_txt o_tag o_txt ++RC=0 +-- +1.8.1.4 + diff --git a/SOURCES/pcre-8.33-RC1-Fix-pcretest-crash-with-a-data-line-longer-than-6553.patch b/SOURCES/pcre-8.33-RC1-Fix-pcretest-crash-with-a-data-line-longer-than-6553.patch new file mode 100644 index 0000000..f2d4865 --- /dev/null +++ b/SOURCES/pcre-8.33-RC1-Fix-pcretest-crash-with-a-data-line-longer-than-6553.patch @@ -0,0 +1,54 @@ +From bf2c63fda75cca4ab3006b6ccdf0f18fafe4fca5 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Fri, 10 May 2013 16:22:40 +0000 +Subject: [PATCH] Fix pcretest crash with a data line longer than 65536 bytes. + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1327 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Port to 8.31-RC1 + +diff --git a/pcretest.c b/pcretest.c +index 6ef3252..25f3853 100644 +--- a/pcretest.c ++++ b/pcretest.c +@@ -4411,7 +4411,8 @@ while (!done) + + #ifndef NOUTF + /* Check that the data is well-formed UTF-8 if we're in UTF mode. To create +- invalid input to pcre_exec, you must use \x?? or \x{} sequences. */ ++ invalid input to pcre_exec, you must use \x?? or \x{} sequences. */ ++ + if (use_utf) + { + pcre_uint8 *q; +@@ -4429,21 +4430,23 @@ while (!done) + + #ifdef SUPPORT_VALGRIND + /* Mark the dbuffer as addressable but undefined again. */ ++ + if (dbuffer != NULL) + { + VALGRIND_MAKE_MEM_UNDEFINED(dbuffer, dbuffer_size * CHAR_SIZE); + } + #endif + +- /* Allocate a buffer to hold the data line. len+1 is an upper bound on +- the number of pcre_uchar units that will be needed. */ +- if (dbuffer == NULL || (size_t)len >= dbuffer_size) ++ /* Allocate a buffer to hold the data line; len+1 is an upper bound on ++ the number of pcre_uchar units that will be needed. */ ++ ++ while (dbuffer == NULL || (size_t)len >= dbuffer_size) + { + dbuffer_size *= 2; + dbuffer = (pcre_uint8 *)realloc(dbuffer, dbuffer_size * CHAR_SIZE); + if (dbuffer == NULL) + { +- fprintf(stderr, "pcretest: malloc(%d) failed\n", (int)dbuffer_size); ++ fprintf(stderr, "pcretest: realloc(%d) failed\n", (int)dbuffer_size); + exit(1); + } + } +-- +1.8.1.4 + diff --git a/SOURCES/pcre-8.33-RC1-Fix-segfault-when-pcre_dfa_exec-is-called-with-an-ou.patch b/SOURCES/pcre-8.33-RC1-Fix-segfault-when-pcre_dfa_exec-is-called-with-an-ou.patch new file mode 100644 index 0000000..080464f --- /dev/null +++ b/SOURCES/pcre-8.33-RC1-Fix-segfault-when-pcre_dfa_exec-is-called-with-an-ou.patch @@ -0,0 +1,267 @@ +From f4176cfb682170c5e9246949df653c82200d7259 Mon Sep 17 00:00:00 2001 +From: ph10 +Date: Wed, 15 May 2013 16:53:18 +0000 +Subject: [PATCH] Fix segfault when pcre_dfa_exec() is called with an output + vector of length less than 2. + +git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1334 2f5784b3-3f2a-0410-8824-cb99058d5e15 + +Petr Pisar: Port to 8.33-RC1. + + +diff --git a/pcre_dfa_exec.c b/pcre_dfa_exec.c +index 8211760..02bd3f0 100644 +--- a/pcre_dfa_exec.c ++++ b/pcre_dfa_exec.c +@@ -636,7 +636,7 @@ for (;;) + const pcre_uchar *code; + int state_offset = current_state->offset; + int codevalue, rrc; +- unsigned int count; ++ int count; + + #ifdef PCRE_DEBUG + printf ("%.*sProcessing state %d c=", rlevel*2-2, SP, state_offset); +@@ -1255,7 +1255,7 @@ for (;;) + (d != OP_ANY || !IS_NEWLINE(ptr)) && + ((ctypes[c] & toptable1[d]) ^ toptable2[d]) != 0)) + { +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW(state_offset + 1 + IMM2_SIZE + 1, 0); } + else + { ADD_NEW(state_offset, count); } +@@ -1289,7 +1289,7 @@ for (;;) + active_count--; /* Remove non-match possibility */ + next_active_state--; + } +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW(state_offset + 2 + IMM2_SIZE, 0); } + else + { ADD_NEW(state_offset, count); } +@@ -1903,7 +1903,7 @@ for (;;) + active_count--; /* Remove non-match possibility */ + next_active_state--; + } +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW(state_offset + 1 + IMM2_SIZE + 3, 0); } + else + { ADD_NEW(state_offset, count); } +@@ -1942,7 +1942,7 @@ for (;;) + } + if (nptr >= end_subject && (md->moptions & PCRE_PARTIAL_HARD) != 0) + reset_could_continue = TRUE; +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, ncount); } + else + { ADD_NEW_DATA(-state_offset, count, ncount); } +@@ -1984,7 +1984,7 @@ for (;;) + active_count--; /* Remove non-match possibility */ + next_active_state--; + } +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, ncount); } + else + { ADD_NEW_DATA(-state_offset, count, ncount); } +@@ -2024,7 +2024,7 @@ for (;;) + active_count--; /* Remove non-match possibility */ + next_active_state--; + } +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, 0); } + else + { ADD_NEW_DATA(-state_offset, count, 0); } +@@ -2061,7 +2061,7 @@ for (;;) + active_count--; /* Remove non-match possibility */ + next_active_state--; + } +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW_DATA(-(state_offset + 2 + IMM2_SIZE), 0, 0); } + else + { ADD_NEW_DATA(-state_offset, count, 0); } +@@ -2431,7 +2431,7 @@ for (;;) + } + if ((c == d || c == otherd) == (codevalue < OP_NOTSTAR)) + { +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW(state_offset + dlen + 1 + IMM2_SIZE, 0); } + else + { ADD_NEW(state_offset, count); } +@@ -2480,7 +2480,7 @@ for (;;) + active_count--; /* Remove non-match possibility */ + next_active_state--; + } +- if (++count >= GET2(code, 1)) ++ if (++count >= (int)GET2(code, 1)) + { ADD_NEW(state_offset + dlen + 1 + IMM2_SIZE, 0); } + else + { ADD_NEW(state_offset, count); } +@@ -2553,11 +2553,11 @@ for (;;) + case OP_CRRANGE: + case OP_CRMINRANGE: + count = current_state->count; /* Already matched */ +- if (count >= GET2(ecode, 1)) ++ if (count >= (int)GET2(ecode, 1)) + { ADD_ACTIVE(next_state_offset + 1 + 2 * IMM2_SIZE, 0); } + if (isinclass) + { +- unsigned int max = GET2(ecode, 1 + IMM2_SIZE); ++ int max = (int)GET2(ecode, 1 + IMM2_SIZE); + if (++count >= max && max != 0) /* Max 0 => no limit */ + { ADD_NEW(next_state_offset + 1 + 2 * IMM2_SIZE, 0); } + else +diff --git a/pcretest.c b/pcretest.c +index 25f3853..20dc0f1 100644 +--- a/pcretest.c ++++ b/pcretest.c +@@ -5043,7 +5043,7 @@ while (!done) + DFA_WS_DIMENSION); + if (count == 0) + { +- fprintf(outfile, "Matched, but too many subsidiary matches\n"); ++ fprintf(outfile, "Matched, but offsets vector is too small to show all matches\n"); + count = use_size_offsets/2; + } + } +diff --git a/testdata/testinput8 b/testdata/testinput8 +index e235445..d91013b 100644 +--- a/testdata/testinput8 ++++ b/testdata/testinput8 +@@ -4798,4 +4798,7 @@ + xxxxxxxxabcd + xx\xa0xxxxxabcd + ++/abcd/ ++ abcd\O0 ++ + /-- End of testinput8 --/ +diff --git a/testdata/testoutput10 b/testdata/testoutput10 +index 9ee0f76..0e04205 100644 +--- a/testdata/testoutput10 ++++ b/testdata/testoutput10 +@@ -813,7 +813,7 @@ No match + 11111111111111111111111111111111111111111111111111111111111111111111111 + No match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +@@ -841,7 +841,7 @@ Matched, but too many subsidiary matches + 11111111111111111111111111111111111111111111111111111111111111111111111 + No match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +@@ -869,7 +869,7 @@ Matched, but too many subsidiary matches + 11111111111111111111111111111111111111111111111111111111111111111111111 + No match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +@@ -897,7 +897,7 @@ Matched, but too many subsidiary matches + 11111111111111111111111111111111111111111111111111111111111111111111111 + No match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +@@ -925,7 +925,7 @@ Matched, but too many subsidiary matches + 11111111111111111111111111111111111111111111111111111111111111111111111 + No match + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +diff --git a/testdata/testoutput8 b/testdata/testoutput8 +index 527ba4d..75affbe 100644 +--- a/testdata/testoutput8 ++++ b/testdata/testoutput8 +@@ -49,7 +49,7 @@ No match + 16: a + 17: + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaa +@@ -3260,7 +3260,7 @@ No match + + /(.*)(\d*)/ + I have 2 numbers: 53147 +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: I have 2 numbers: 53147 + 1: I have 2 numbers: 5314 + 2: I have 2 numbers: 531 +@@ -3295,7 +3295,7 @@ Matched, but too many subsidiary matches + + /(.*?)(\d*)/ + I have 2 numbers: 53147 +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: I have 2 numbers: 53147 + 1: I have 2 numbers: 5314 + 2: I have 2 numbers: 531 +@@ -7848,7 +7848,7 @@ Error -26 (nested recursion at the same subject position) + + /(a+)/ + \O6aaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaa + 1: aaa + 2: aa +@@ -8016,4 +8016,8 @@ Error -30 (invalid data in workspace for DFA restart) + 0: xx\xa0xxxxxabcd + 1: xx\xa0xxxxxabc + ++/abcd/ ++ abcd\O0 ++Matched, but offsets vector is too small to show all matches ++ + /-- End of testinput8 --/ +diff --git a/testdata/testoutput9 b/testdata/testoutput9 +index 95cd618..0bb101a 100644 +--- a/testdata/testoutput9 ++++ b/testdata/testoutput9 +@@ -434,7 +434,7 @@ No match + + /\D*/8 + aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + 2: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +@@ -460,7 +460,7 @@ Matched, but too many subsidiary matches + + /\D*/8 + \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} +-Matched, but too many subsidiary matches ++Matched, but offsets vector is too small to show all matches + 0: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} + 1: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} + 2: \x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100}\x{100} +-- +1.8.1.4 + diff --git a/SPECS/pcre.spec b/SPECS/pcre.spec new file mode 100644 index 0000000..7b7b149 --- /dev/null +++ b/SPECS/pcre.spec @@ -0,0 +1,455 @@ +# This is stable release: +#%%global rcversion RC1 +Name: pcre +Version: 8.32 +Release: %{?rcversion:0.}8%{?rcversion:.%rcversion}%{?dist} +%global myversion %{version}%{?rcversion:-%rcversion} +Summary: Perl-compatible regular expression library +Group: System Environment/Libraries +License: BSD +URL: http://www.pcre.org/ +Source: ftp://ftp.csx.cam.ac.uk/pub/software/programming/%{name}/%{?rcversion:Testing/}%{name}-%{myversion}.tar.bz2 +# Upstream thinks RPATH is good idea. +Patch0: pcre-8.21-multilib.patch +# Refused by upstream, bug #675477 +Patch1: pcre-8.32-refused_spelling_terminated.patch +# In upstream after 8.32 +Patch2: pcre-8.32-Fix-forward-search-in-JIT-when-link-size-is-3-or-gre.patch +# In upstream after 8.32 +Patch3: pcre-8.32-Fix-two-buffer-over-read-issues-in-16-and-32-bit-mod.patch +# Fix pcregrep on empty line, in upstream after 8.33-RC1 +Patch4: pcre-8.33-RC1-Fix-pcregrep-so-that-it-can-find-empty-lines.patch +# Grow buffer in pcretest properly, in upstream after 8.33-RC1 +Patch5: pcre-8.33-RC1-Fix-pcretest-crash-with-a-data-line-longer-than-6553.patch +# Fix passing too small output vector to pcre_dfa_exec, in upstream after +# 8.33-RC1, bug #963284 +Patch6: pcre-8.33-RC1-Fix-segfault-when-pcre_dfa_exec-is-called-with-an-ou.patch +BuildRequires: readline-devel +# New libtool to get rid of rpath +BuildRequires: autoconf, automake, libtool + +%description +Perl-compatible regular expression library. +PCRE has its own native API, but a set of "wrapper" functions that are based on +the POSIX API are also supplied in the library libpcreposix. Note that this +just provides a POSIX calling interface to PCRE: the regular expressions +themselves still follow Perl syntax and semantics. The header file +for the POSIX-style functions is called pcreposix.h. + +%package devel +Summary: Development files for %{name} +Group: Development/Libraries +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +Development files (Headers, libraries for dynamic linking, etc) for %{name}. + +%package static +Summary: Static library for %{name} +Group: Development/Libraries +Requires: %{name}-devel%{_isa} = %{version}-%{release} + +%description static +Library for static linking for %{name}. + +%package tools +Summary: Auxiliary utilities for %{name} +Group: Development/Tools +Requires: %{name}%{_isa} = %{version}-%{release} + +%description tools +Utilities demonstrating PCRE capabilities like pcregrep or pcretest. + +%prep +%setup -q -n %{name}-%{myversion} +# Get rid of rpath +%patch0 -p1 -b .multilib +%patch1 -p1 -b .terminated_typos +%patch2 -p1 -b .forward_jit +%patch3 -p1 -b .buffer_over_read +%patch4 -p1 -b .pcregrep_empty_line +%patch5 -p1 -b .pcretest_grow_buffer +%patch6 -p1 -b .vector_size +# Because of rpath patch +libtoolize --copy --force && autoreconf -vif +# One contributor's name is non-UTF-8 +for F in ChangeLog; do + iconv -f latin1 -t utf8 "$F" >"${F}.utf8" + touch --reference "$F" "${F}.utf8" + mv "${F}.utf8" "$F" +done + +%build +# There is a strict-aliasing problem on PPC64, bug #881232 +%ifarch ppc64 +%global optflags %{optflags} -fno-strict-aliasing +%endif +%configure \ +%ifarch aarch64 s390 s390x sparc64 sparcv9 + --disable-jit \ +%else + --enable-jit \ +%endif + --enable-pcretest-libreadline --enable-utf --enable-unicode-properties \ + --enable-pcre8 --enable-pcre16 --enable-pcre32 +make %{?_smp_mflags} + +%install +make install DESTDIR=$RPM_BUILD_ROOT +# Get rid of unneeded *.la files +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la +# These are handled by %%doc in %%files +rm -rf $RPM_BUILD_ROOT%{_docdir}/pcre + +%check +%ifarch s390 ppc +# larger stack is needed on s390, ppc +ulimit -s 10240 +%endif +make check + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +%files +%{_libdir}/*.so.* +%doc AUTHORS COPYING LICENCE NEWS README ChangeLog + +%files devel +%{_libdir}/*.so +%{_libdir}/pkgconfig/* +%{_includedir}/*.h +%{_mandir}/man1/pcre-config.* +%{_mandir}/man3/* +%{_bindir}/pcre-config +%doc doc/*.txt doc/html +%doc HACKING + +%files static +%{_libdir}/*.a +%doc COPYING LICENCE + +%files tools +%{_bindir}/pcregrep +%{_bindir}/pcretest +%{_mandir}/man1/pcregrep.* +%{_mandir}/man1/pcretest.* + +%changelog +* Wed Oct 16 2013 Petr Pisar - 8.33-8 +- Disable strict-aliasing on PPC64 (bug #881232) + +* Mon Jun 03 2013 Petr Pisar - 8.32-7 +- Disable unsupported JIT on aarch64 (bug #969693) + +* Thu May 16 2013 Petr Pisar - 8.32-6 +- Fix passing too small output vector to pcre_dfa_exec (bug #963284) + +* Mon May 13 2013 Petr Pisar - 8.32-5 +- Fix bad handling of empty lines in pcregrep tool (bug #961789) +- Fix possible pcretest crash with a data line longer than 65536 bytes + +* Mon Jan 28 2013 Petr Pisar - 8.32-4 +- Fix forward search in JIT when link size is 3 or greater +- Fix buffer over-read in UTF-16 and UTF-32 modes with JIT + +* Fri Jan 25 2013 Peter Robinson 8.32-3 +- Adjust autoreconf to fix FTBFS on F-19 + +* Mon Jan 07 2013 Petr Pisar - 8.32-2 +- Make inter-subpackage dependencies architecture specific (bug #892187) + +* Fri Nov 30 2012 Petr Pisar - 8.32-1 +- 8.32 bump + +* Thu Nov 29 2012 Petr Pisar - 8.32-0.2.RC1 +- Inter-depend sub-packages to prevent from mixing different versions + +* Tue Nov 13 2012 Petr Pisar - 8.32-0.1.RC1 +- 8.32-RC1 bump + +* Mon Sep 03 2012 Petr Pisar - 8.31-2 +- Set re_nsub in regcomp() properly (bug #853990) + +* Fri Jul 20 2012 Fedora Release Engineering - 8.31-1.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Jul 13 2012 Petr Pisar - 8.31-1 +- 8.31 bump + +* Tue Jun 05 2012 Petr Pisar - 8.31-0.1.RC1 +- 8.31-RC1 bump + +* Sat May 12 2012 Tom Callaway - 8.30-7 +- disable jit for sparcv9 and sparc64 + +* Fri May 11 2012 Petr Pisar - 8.30-6 +- Fix spelling in manual pages (bug #820978) + +* Mon Apr 23 2012 Petr Pisar - 8.30-5 +- Possessify high ASCII (bug #815217) +- Fix ovector overflow (bug #815214) + +* Fri Apr 20 2012 Petr Pisar - 8.30-4 +- Possesify \s*\R (bug #813237) + +* Thu Apr 05 2012 Petr Pisar - 8.30-3 +- Fix look-behind assertion in UTF-8 JIT mode (bug #810314) + +* Tue Feb 28 2012 Petr Pisar - 8.30-2 +- Remove old libpcre.so.0 from distribution +- Move library to /usr + +* Thu Feb 09 2012 Petr Pisar - 8.30-1 +- 8.30 bump +- Add old libpcre.so.0 to preserve compatibility temporarily + +* Fri Jan 27 2012 Petr Pisar - 8.30-0.1.RC1 +- 8.30 Relase candidate 1 with UTF-16 support and *API change* +- Enable UTF-16 variant of PCRE library +- The pcre_info() function has been removed from pcre library. +- Loading compiled pattern does not fix endianity anymore. Instead an errror + is returned and the application can use pcre_pattern_to_host_byte_order() to + convert the pattern. +- Surrogates (0xD800---0xDFFF) are forbidden in UTF-8 mode now. + +* Fri Jan 13 2012 Fedora Release Engineering - 8.21-2.1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Jan 02 2012 Petr Pisar - 8.21-2 +- Fix unmatched subpattern to not become wildcard (bug #769597) +- Fix NULL pointer derefernce in pcre_free_study() (upstream bug #1186) + +* Mon Dec 12 2011 Petr Pisar - 8.21-1 +- 8.21 bump + +* Thu Dec 08 2011 Karsten Hopp 8.21-0.2.RC1 +- ppc needs a larger stack similar to s390 + +* Tue Dec 06 2011 Petr Pisar - 8.21-0.1.RC1 +- 8.21-RC1 bump + +* Fri Dec 02 2011 Petr Pisar - 8.20-7 +- Fix case-less match if cases differ in encoding length (bug #756675) + +* Fri Nov 25 2011 Petr Pisar - 8.20-6 +- Fix cache-flush in JIT on PPC + +* Tue Nov 22 2011 Petr Pisar - 8.20-5 +- Fix repeated forward reference (bug #755969) + +* Wed Nov 16 2011 Petr Pisar - 8.20-4 +- Fix other look-behind regressions + +* Tue Nov 15 2011 Petr Pisar - 8.20-3 +- Fix look-behind regression in 8.20 + +* Tue Nov 15 2011 Dan HorĂ¡k - 8.20-2 +- fix build on s390(x) - disable jit and use larger stack for tests + +* Fri Oct 21 2011 Petr Pisar - 8.20-1 +- 8.20 bump + +* Tue Oct 11 2011 Petr Pisar - 8.20-0.1.RC3 +- 8.20-RC3 bump + +* Fri Sep 23 2011 Petr Pisar - 8.20-0.1.RC2 +- 8.20-RC2 bump + +* Mon Sep 12 2011 Petr Pisar - 8.20-0.1.RC1 +- 8.20-RC1 bump with JIT + +* Tue Sep 06 2011 Petr Pisar - 8.13-4 +- Fix infinite matching PRUNE (bug #735720) + +* Mon Aug 22 2011 Petr Pisar - 8.13-3 +- Fix parsing named class in expression (bug #732368) + +* Thu Aug 18 2011 Petr Pisar - 8.13-2 +- Separate utilities from libraries +- Move pcre-config(1) manual to pcre-devel sub-package +- Remove explicit defattr from spec code +- Compile pcretest with readline support + +* Thu Aug 18 2011 Petr Pisar - 8.13-1 +- 8.13 bump: Bug-fix version, Unicode tables updated to 6.0.0, new pcregrep + option --buffer-size to adjust to long lines, new feature is passing of + *MARK information to callouts. +- Should fix crash back-tracking over unicode sequence (bug #691319) + +* Mon May 09 2011 Petr Pisar - 8.12-4 +- Fix caseless reference matching in UTF-8 mode when the upper/lower case + characters have different lengths (bug #702623) + +* Mon May 09 2011 Petr Pisar - 8.12-3 +- Fix typos in manual pages (bugs #675476, #675477) +- Clean spec file up + +* Tue Feb 08 2011 Fedora Release Engineering - 8.12-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Mon Jan 17 2011 Petr Pisar - 8.12-1 +- 8.12 bump +- Remove accepted pcre-8.11-Fix-typo-in-pcreprecompile-3.patch + +* Mon Dec 13 2010 Petr Pisar - 8.11-1 +- 8.11 bump +- See ChangeLog for changes. Namely changes have been made to the way + PCRE_PARTIAL_HARD affects the matching of $, \z, \Z, \b, and \B. +- Fix typo in pcreprecompile(3) manual +- Document why shared library is not under /usr + +* Mon Jul 12 2010 Petr Pisar - 8.10-1 +- 8.10 bump (bug #612635) +- Add LICENCE to static subpackage because COPYING refers to it +- Remove useless rpath by using new libtool (simple sed does not work anymore + because tests need to link against just-compiled library in %%check phase) + +* Thu Jul 08 2010 Petr Pisar - 7.8-4 +- Add COPYING to static subpackage +- Remove useless rpath + +* Sat Jul 25 2009 Fedora Release Engineering - 7.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Thu Feb 26 2009 Fedora Release Engineering - 7.8-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Wed Oct 1 2008 Lubomir Rintel - 7.8-1 +- Update to 7.8, drop upstreamed patches +- Fix destination of documentation (#427763) +- Use buildroot macro consistently +- Separate the static library, as per current Guidelines +- Satisfy rpmlint + +* Fri Jul 4 2008 Tomas Hoger - 7.3-4 +- Apply Tavis Ormandy's patch for CVE-2008-2371. + +* Tue Feb 12 2008 Tomas Hoger - 7.3-3 +- Backport patch from upstream pcre 7.6 to address buffer overflow + caused by "a character class containing a very large number of + characters with codepoints greater than 255 (in UTF-8 mode)" + CVE-2008-0674, #431660 +- Try re-enabling make check again. + +* Fri Nov 16 2007 Stepan Kasal - 7.3-2 +- Remove obsolete ``reqs'' +- add dist tag +- update BuildRoot + +* Mon Sep 17 2007 Than Ngo - 7.3-1 +- bz292501, update to 7.3 + +* Mon Jan 22 2007 Than Ngo - 7.0-1 +- 7.0 + +* Mon Nov 27 2006 Than Ngo - 6.7-1 +- update to 6.7 +- fix #217303, enable-unicode-properties +- sane stack limit + +* Wed Jul 12 2006 Jesse Keating - 6.6-1.1 +- rebuild + +* Tue May 09 2006 Than Ngo 6.6-1 +- update to 6.6 +- fix multilib problem + +* Fri Feb 10 2006 Jesse Keating - 6.3-1.2.1 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 6.3-1.2 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Fri Dec 09 2005 Jesse Keating +- rebuilt + +* Wed Aug 24 2005 Than Ngo 6.3-1 +- update to 6.3 + +* Fri Mar 4 2005 Joe Orton 5.0-4 +- rebuild + +* Fri Feb 11 2005 Joe Orton 5.0-3 +- don't print $libdir in 'pcre-config --libs' output + +* Thu Nov 18 2004 Joe Orton 5.0-2 +- include LICENCE, AUTHORS in docdir +- run make check +- move %%configure to %%build + +* Thu Nov 18 2004 Than Ngo 5.0-1 +- update to 5.0 +- change License: BSD +- fix header location #64248 + +* Tue Jun 15 2004 Elliot Lee +- rebuilt + +* Tue Mar 23 2004 Than Ngo 4.5-2 +- add the correct pcre license, #118781 + +* Fri Mar 12 2004 Than Ngo 4.5-1 +- update to 4.5 + +* Tue Mar 02 2004 Elliot Lee +- rebuilt + +* Fri Feb 13 2004 Elliot Lee +- rebuilt + +* Fri Sep 26 2003 Harald Hoyer 4.4-1 +- 4.4 + +* Wed Jun 04 2003 Elliot Lee +- rebuilt + +* Wed May 7 2003 Than Ngo 4.2-1 +- update to 4.2 + +* Wed Jan 22 2003 Tim Powers +- rebuilt + +* Tue Jan 21 2003 Than Ngo 3.9-9 +- build with utf8, bug #81504 + +* Fri Nov 22 2002 Elliot Lee 3.9-8 +- Really remove .la files + +* Fri Oct 11 2002 Than Ngo 3.9-7 +- remove .la + +* Thu Oct 10 2002 Than Ngo 3.9-7 +- Typo bug + +* Wed Oct 9 2002 Than Ngo 3.9-6 +- Added missing so symlink + +* Thu Sep 19 2002 Than Ngo 3.9-5.1 +- Fixed to build s390/s390x/x86_64 + +* Thu Jun 27 2002 Bernhard Rosenkraenzer 3.9-5 +- Fix #65009 + +* Fri Jun 21 2002 Tim Powers +- automated rebuild + +* Thu May 23 2002 Tim Powers +- automated rebuild + +* Mon Mar 4 2002 Bernhard Rosenkraenzer 3.9-2 +- rebuild + +* Fri Jan 11 2002 Bernhard Rosenkraenzer 3.9-1 +- Update to 3.9 + +* Wed Nov 14 2001 Bernhard Rosenkraenzer 3.7-1 +- Update to 3.7 + +* Thu May 17 2001 Bernhard Rosenkraenzer 3.4-2 +- Move libpcre to /lib, grep uses it these days (#41104) + +* Wed Apr 18 2001 Bernhard Rosenkraenzer +- Move this to a separate package, used to be in kdesupport, but it's + generally useful...