diff --git a/.gitignore b/.gitignore index 0a8f272..a2613d5 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,5 @@ /pcre2-10.34.tar.bz2.sig /pcre2-10.35-RC1.tar.bz2 /pcre2-10.35-RC1.tar.bz2.sig +/pcre2-10.35.tar.bz2 +/pcre2-10.35.tar.bz2.sig diff --git a/pcre2-10.35-RC1-Avoid-using-1-as-a-suffix-in-pcre2test-as-it-can-pro.patch b/pcre2-10.35-RC1-Avoid-using-1-as-a-suffix-in-pcre2test-as-it-can-pro.patch deleted file mode 100644 index 11903ea..0000000 --- a/pcre2-10.35-RC1-Avoid-using-1-as-a-suffix-in-pcre2test-as-it-can-pro.patch +++ /dev/null @@ -1,95 +0,0 @@ -From b941dacb37e5b7e18cf1e99ec10f5117a135a05e Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Thu, 23 Apr 2020 15:41:23 +0000 -Subject: [PATCH] Avoid using [-1] as a suffix in pcre2test as it can provoke a - compiler warning. -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@1245 6239d852-aaf2-0410-a92c-79f79f948069 -Signed-off-by: Petr Písař ---- - src/pcre2test.c | 39 ++++++++++++++++++++++++++++----------- - -diff --git a/src/pcre2test.c b/src/pcre2test.c -index ed75e06..c4b6059 100644 ---- a/src/pcre2test.c -+++ b/src/pcre2test.c -@@ -2980,15 +2980,21 @@ return (int)(pp - p); - *************************************************/ - - /* Must handle UTF-8 strings in utf8 mode. Yields number of characters printed. --For printing *MARK strings, a negative length is given. If handed a NULL file, --just counts chars without printing (because pchar() does that). */ -+For printing *MARK strings, a negative length is given, indicating that the -+length is in the previous code unit. We can't use strlen() because the string -+may contain binary zeros. Avoid using [-1] as a suffix because this can provoke -+a compiler warning. If handed a NULL file, this function just counts chars -+without printing (because pchar() does that). */ - - static int pchars8(PCRE2_SPTR8 p, int length, BOOL utf, FILE *f) - { - uint32_t c = 0; - int yield = 0; -- --if (length < 0) length = p[-1]; -+if (length < 0) -+ { -+ PCRE2_SPTR8 pp = p - 1; -+ length = *pp; -+ } - while (length-- > 0) - { - if (utf) -@@ -3017,13 +3023,19 @@ return yield; - *************************************************/ - - /* Must handle UTF-16 strings in utf mode. Yields number of characters printed. --For printing *MARK strings, a negative length is given. If handed a NULL file, --just counts chars without printing. */ -+For printing *MARK strings, a negative length is given, indicating that the -+length is in the previous code unit. Avoid using [-1] as a suffix because this -+can provoke a compiler warning. If handed a NULL file, just counts chars -+without printing. */ - - static int pchars16(PCRE2_SPTR16 p, int length, BOOL utf, FILE *f) - { - int yield = 0; --if (length < 0) length = p[-1]; -+if (length < 0) -+ { -+ PCRE2_SPTR16 pp = p - 1; -+ length = *pp; -+ } - while (length-- > 0) - { - uint32_t c = *p++ & 0xffff; -@@ -3051,15 +3063,20 @@ return yield; - *************************************************/ - - /* Must handle UTF-32 strings in utf mode. Yields number of characters printed. --For printing *MARK strings, a negative length is given. If handed a NULL file, --just counts chars without printing. */ -+For printing *MARK strings, a negative length is given, indicating that the -+length is in the previous code unit. Avoid using [-1] as a suffix because this -+can provoke a compiler warning. If handed a NULL file, just counts chars -+without printing. */ - - static int pchars32(PCRE2_SPTR32 p, int length, BOOL utf, FILE *f) - { - int yield = 0; - (void)(utf); /* Avoid compiler warning */ -- --if (length < 0) length = p[-1]; -+if (length < 0) -+ { -+ PCRE2_SPTR32 pp = p - 1; -+ length = *pp; -+ } - while (length-- > 0) - { - uint32_t c = *p++; --- -2.21.3 - diff --git a/pcre2-10.35-RC1-Second-attempt-at-getting-rid-of-gcc-10-warning.patch b/pcre2-10.35-RC1-Second-attempt-at-getting-rid-of-gcc-10-warning.patch deleted file mode 100644 index 952b16d..0000000 --- a/pcre2-10.35-RC1-Second-attempt-at-getting-rid-of-gcc-10-warning.patch +++ /dev/null @@ -1,173 +0,0 @@ -From 4d848be74dd036959c94a717dfa7dab23035b6df Mon Sep 17 00:00:00 2001 -From: ph10 -Date: Fri, 24 Apr 2020 15:36:53 +0000 -Subject: [PATCH] Second attempt at getting rid of gcc 10 warning. -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@1247 6239d852-aaf2-0410-a92c-79f79f948069 -Signed-off-by: Petr Písař ---- - src/pcre2test.c | 38 +++++++++++--------------------------- - testdata/testinput2 | 9 +++++++++ - testdata/testoutput2 | 18 ++++++++++++++++++ - 3 files changed, 38 insertions(+), 27 deletions(-) - -diff --git a/src/pcre2test.c b/src/pcre2test.c -index c4b6059..3f4fef4 100644 ---- a/src/pcre2test.c -+++ b/src/pcre2test.c -@@ -2981,20 +2981,14 @@ return (int)(pp - p); - - /* Must handle UTF-8 strings in utf8 mode. Yields number of characters printed. - For printing *MARK strings, a negative length is given, indicating that the --length is in the previous code unit. We can't use strlen() because the string --may contain binary zeros. Avoid using [-1] as a suffix because this can provoke --a compiler warning. If handed a NULL file, this function just counts chars --without printing (because pchar() does that). */ -+length is in the first code unit. If handed a NULL file, this function just -+counts chars without printing (because pchar() does that). */ - - static int pchars8(PCRE2_SPTR8 p, int length, BOOL utf, FILE *f) - { - uint32_t c = 0; - int yield = 0; --if (length < 0) -- { -- PCRE2_SPTR8 pp = p - 1; -- length = *pp; -- } -+if (length < 0) length = *p++; - while (length-- > 0) - { - if (utf) -@@ -3024,18 +3018,13 @@ return yield; - - /* Must handle UTF-16 strings in utf mode. Yields number of characters printed. - For printing *MARK strings, a negative length is given, indicating that the --length is in the previous code unit. Avoid using [-1] as a suffix because this --can provoke a compiler warning. If handed a NULL file, just counts chars -+length is in the first code unit. If handed a NULL file, just counts chars - without printing. */ - - static int pchars16(PCRE2_SPTR16 p, int length, BOOL utf, FILE *f) - { - int yield = 0; --if (length < 0) -- { -- PCRE2_SPTR16 pp = p - 1; -- length = *pp; -- } -+if (length < 0) length = *p++; - while (length-- > 0) - { - uint32_t c = *p++ & 0xffff; -@@ -3064,19 +3053,14 @@ return yield; - - /* Must handle UTF-32 strings in utf mode. Yields number of characters printed. - For printing *MARK strings, a negative length is given, indicating that the --length is in the previous code unit. Avoid using [-1] as a suffix because this --can provoke a compiler warning. If handed a NULL file, just counts chars -+length is in the first code unit. If handed a NULL file, just counts chars - without printing. */ - - static int pchars32(PCRE2_SPTR32 p, int length, BOOL utf, FILE *f) - { - int yield = 0; - (void)(utf); /* Avoid compiler warning */ --if (length < 0) -- { -- PCRE2_SPTR32 pp = p - 1; -- length = *pp; -- } -+if (length < 0) length = *p++; - while (length-- > 0) - { - uint32_t c = *p++; -@@ -6327,7 +6311,7 @@ if (cb->mark != last_callout_mark) - else - { - fprintf(outfile, "Latest Mark: "); -- PCHARSV(cb->mark, 0, -1, utf, outfile); -+ PCHARSV(cb->mark, -1, -1, utf, outfile); - putc('\n', outfile); - } - last_callout_mark = cb->mark; -@@ -7848,7 +7832,7 @@ for (gmatched = 0;; gmatched++) - TESTFLD(match_data, mark, !=, NULL)) - { - fprintf(outfile, "MK: "); -- PCHARSV(CASTFLD(void *, match_data, mark), 0, -1, utf, outfile); -+ PCHARSV(CASTFLD(void *, match_data, mark), -1, -1, utf, outfile); - fprintf(outfile, "\n"); - } - -@@ -7880,7 +7864,7 @@ for (gmatched = 0;; gmatched++) - TESTFLD(match_data, mark, !=, NULL)) - { - fprintf(outfile, ", mark="); -- PCHARS(rubriclength, CASTFLD(void *, match_data, mark), 0, -1, utf, -+ PCHARS(rubriclength, CASTFLD(void *, match_data, mark), -1, -1, utf, - outfile); - rubriclength += 7; - } -@@ -7979,7 +7963,7 @@ for (gmatched = 0;; gmatched++) - TESTFLD(match_data, mark, !=, NULL)) - { - fprintf(outfile, ", mark = "); -- PCHARSV(CASTFLD(void *, match_data, mark), 0, -1, utf, outfile); -+ PCHARSV(CASTFLD(void *, match_data, mark), -1, -1, utf, outfile); - } - if ((pat_patctl.control & CTL_JITVERIFY) != 0 && jit_was_used) - fprintf(outfile, " (JIT)"); -diff --git a/testdata/testinput2 b/testdata/testinput2 -index 3de72f1..c816c5f 100644 ---- a/testdata/testinput2 -+++ b/testdata/testinput2 -@@ -5855,4 +5855,13 @@ a)"xI - /^\w+/tables=3 - École - -+/"(*MARK:>" 00 "<).."/hex,mark,no_start_optimize -+ AB -+ A\=ph -+\= Expect no match -+ A -+ -+/"(*MARK:>" 00 "<).(?C1)."/hex,mark,no_start_optimize -+ AB -+ - # End of testinput2 -diff --git a/testdata/testoutput2 b/testdata/testoutput2 -index 886a24d..c90efef 100644 ---- a/testdata/testoutput2 -+++ b/testdata/testoutput2 -@@ -17603,6 +17603,24 @@ No match - École - 0: \xc3 - -+/"(*MARK:>" 00 "<).."/hex,mark,no_start_optimize -+ AB -+ 0: AB -+MK: >\x00< -+ A\=ph -+Partial match, mark=>\x00<: A -+\= Expect no match -+ A -+No match, mark = >\x00< -+ -+/"(*MARK:>" 00 "<).(?C1)."/hex,mark,no_start_optimize -+ AB -+--->AB -+ 1 ^^ . -+Latest Mark: >\x00< -+ 0: AB -+MK: >\x00< -+ - # End of testinput2 - Error -70: PCRE2_ERROR_BADDATA (unknown error number) - Error -62: bad serialized data --- -2.21.3 - diff --git a/pcre2.spec b/pcre2.spec index d967f12..b3540b4 100644 --- a/pcre2.spec +++ b/pcre2.spec @@ -6,10 +6,10 @@ %bcond_with pcre2_enables_sealloc # This is stable release: -%global rcversion RC1 +#%%global rcversion RC1 Name: pcre2 Version: 10.35 -Release: %{?rcversion:0.}2%{?rcversion:.%rcversion}%{?dist} +Release: %{?rcversion:0.}1%{?rcversion:.%rcversion}%{?dist} %global myversion %{version}%{?rcversion:-%rcversion} Summary: Perl-compatible regular expression library # the library: BSD with exceptions @@ -51,10 +51,6 @@ Source1: https://ftp.pcre.org/pub/pcre/%{?rcversion:Testing/}%{name}-%{myvers Source2: https://ftp.pcre.org/pub/pcre/Public-Key # Do no set RPATH if libdir is not /usr/lib Patch0: pcre2-10.10-Fix-multilib.patch -# 1/2 Fix a compiler warning about -1 index, in upstream after pcre2-10.35-RC1 -Patch1: pcre2-10.35-RC1-Avoid-using-1-as-a-suffix-in-pcre2test-as-it-can-pro.patch -# 2/2 Fix a compiler warning about -1 index, in upstream after pcre2-10.35-RC1 -Patch2: pcre2-10.35-RC1-Second-attempt-at-getting-rid-of-gcc-10-warning.patch BuildRequires: autoconf BuildRequires: automake BuildRequires: coreutils @@ -146,8 +142,6 @@ Utilities demonstrating PCRE2 capabilities like pcre2grep or pcre2test. %{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' %setup -q -n %{name}-%{myversion} %patch0 -p1 -%patch1 -p1 -%patch2 -p1 # Because of multilib patch libtoolize --copy --force autoreconf -vif @@ -265,6 +259,9 @@ make %{?_smp_mflags} check VERBOSE=yes %{_mandir}/man1/pcre2test.* %changelog +* Mon May 11 2020 Petr Pisar - 10.35-1 +- 10.35 bump + * Mon Apr 27 2020 Petr Pisar - 10.35-0.2.RC1 - Fix a compiler warning about -1 index diff --git a/sources b/sources index c763517..3a587b8 100644 --- a/sources +++ b/sources @@ -1,2 +1,2 @@ -SHA512 (pcre2-10.35-RC1.tar.bz2) = f634d9d68b86672c37e2d66e54507e0cfd5bbfb875c2b5e70fdf0841d41e6aa01091b399d9d0a8318d44eee9894e1dc7ea855ad20db2047f803da017aecf8f02 -SHA512 (pcre2-10.35-RC1.tar.bz2.sig) = 827a6d3127c13427ca2f7ca35a60fdca5bcfc43b5b2c588b8abb8338ec1307b49170a5b91daddf4f9069a584dbb8ebb321d66be959ec8990ff531c20d678ec55 +SHA512 (pcre2-10.35.tar.bz2) = ecfb8d48e219daff02874783b7b436fe7d70d8471e44eb66e1e29abb7b0aa67547e6b5fba7058b074ac90eef265ece7d12728f80afdda45b6b8124435f4561fd +SHA512 (pcre2-10.35.tar.bz2.sig) = b46d69877d3eaefca3756ec485e6f2df07afe88db228ca25751215c4077adecde16e7ccef0499067f2bdc943c88eba82f6b3d68762c479fc04491d88ed58ea39