From 2838091cc6d121b070441af074b409840575e490 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Thu, 21 Oct 2021 15:40:56 +0200 Subject: [PATCH] 1.84 bump --- .gitignore | 1 + .rpmlint | 2 - ...S-1.84-Cast-char-and-U8-where-needed.patch | 33 ++++++---------- ...-Fix-formatting-a-pointer-difference.patch | 38 +++++++++++++++++++ ...Remove-a-forgotten-debugging-message.patch | 28 ++++++++++++++ perl-CBOR-XS.rpmlintrc | 1 + perl-CBOR-XS.spec | 20 ++++++---- sources | 2 +- 8 files changed, 93 insertions(+), 32 deletions(-) delete mode 100644 .rpmlint rename CBOR-XS-1.5-Cast-char-and-U8-where-needed.patch => CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch (62%) create mode 100644 CBOR-XS-1.84-Fix-formatting-a-pointer-difference.patch create mode 100644 CBOR-XS-1.84-Remove-a-forgotten-debugging-message.patch create mode 100644 perl-CBOR-XS.rpmlintrc diff --git a/.gitignore b/.gitignore index 5c87049..684b1e3 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ /CBOR-XS-1.8.tar.gz /CBOR-XS-1.82.tar.gz /CBOR-XS-1.83.tar.gz +/CBOR-XS-1.84.tar.gz diff --git a/.rpmlint b/.rpmlint deleted file mode 100644 index 7c16114..0000000 --- a/.rpmlint +++ /dev/null @@ -1,2 +0,0 @@ -from Config import * -addFilter("spelling-error .* (versa|superset)"); diff --git a/CBOR-XS-1.5-Cast-char-and-U8-where-needed.patch b/CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch similarity index 62% rename from CBOR-XS-1.5-Cast-char-and-U8-where-needed.patch rename to CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch index 10293b2..8e0e88b 100644 --- a/CBOR-XS-1.5-Cast-char-and-U8-where-needed.patch +++ b/CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch @@ -1,4 +1,4 @@ -From 7808571acdea1c66705d5296c57eb7e0de8ed4c2 Mon Sep 17 00:00:00 2001 +From e35ddf55d3b731452ac33fabd811b3a830f0e626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Tue, 29 Sep 2015 10:31:58 +0200 Subject: [PATCH] Cast char* and U8* where needed @@ -11,23 +11,14 @@ mismatching signess. This patch corrects it. Signed-off-by: Petr Písař --- - XS.xs | 12 ++++++------ - 1 file changed, 6 insertions(+), 6 deletions(-) + XS.xs | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/XS.xs b/XS.xs -index 25e2b9e..2aa6c57 100644 +index 91ca74b..28e298f 100644 --- a/XS.xs +++ b/XS.xs -@@ -802,7 +802,7 @@ decode_he (dec_t *dec, HV *hv) - dec->cur += len; - - if (ecb_expect_false (dec->cbor.flags & F_VALIDATE_UTF8)) -- if (!is_utf8_string (key, len)) -+ if (!is_utf8_string ((U8*)key, len)) - ERR ("corrupted CBOR data (invalid UTF-8 in map key)"); - - hv_store (hv, key, -len, decode_sv (dec), 0); -@@ -891,7 +891,7 @@ decode_str (dec_t *dec, int utf8) +@@ -1112,7 +1112,7 @@ decode_str (dec_t *dec, int utf8) STRLEN len = decode_uint (dec); WANT (len); @@ -36,7 +27,7 @@ index 25e2b9e..2aa6c57 100644 dec->cur += len; } } -@@ -900,7 +900,7 @@ decode_str (dec_t *dec, int utf8) +@@ -1121,7 +1121,7 @@ decode_str (dec_t *dec, int utf8) STRLEN len = decode_uint (dec); WANT (len); @@ -45,16 +36,16 @@ index 25e2b9e..2aa6c57 100644 dec->cur += len; if (ecb_expect_false (dec->stringref) -@@ -911,7 +911,7 @@ decode_str (dec_t *dec, int utf8) +@@ -1132,7 +1132,7 @@ decode_str (dec_t *dec, int utf8) if (utf8) { if (ecb_expect_false (dec->cbor.flags & F_VALIDATE_UTF8)) -- if (!is_utf8_string (SvPVX (sv), SvCUR (sv))) -+ if (!is_utf8_string ((U8*)SvPVX (sv), SvCUR (sv))) +- if (!cbor_is_utf8_string (SvPVX (sv), SvCUR (sv))) ++ if (!cbor_is_utf8_string ((U8*)SvPVX (sv), SvCUR (sv))) ERR ("corrupted CBOR data (invalid UTF-8 in text string)"); SvUTF8_on (sv); -@@ -1221,7 +1221,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return) +@@ -1452,7 +1452,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return) sv = decode_sv (&dec); if (offset_return) @@ -63,7 +54,7 @@ index 25e2b9e..2aa6c57 100644 if (!(offset_return || !sv)) if (dec.cur != dec.end && !dec.err) -@@ -1271,7 +1271,7 @@ incr_parse (CBOR *self, SV *cborstr) +@@ -1506,7 +1506,7 @@ incr_parse (CBOR *self, SV *cborstr) 1, 2, 4, 8,-1,-1,-1,-2 }; @@ -73,5 +64,5 @@ index 25e2b9e..2aa6c57 100644 IV count = SvIVX (AvARRAY (self->incr_count)[AvFILLp (self->incr_count)]); I8 ilen = incr_len[m]; -- -2.5.5 +2.31.1 diff --git a/CBOR-XS-1.84-Fix-formatting-a-pointer-difference.patch b/CBOR-XS-1.84-Fix-formatting-a-pointer-difference.patch new file mode 100644 index 0000000..fbc0bcf --- /dev/null +++ b/CBOR-XS-1.84-Fix-formatting-a-pointer-difference.patch @@ -0,0 +1,38 @@ +From 8f9b642f14c5de5303326a5b32f6d267ed7349b6 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 21 Oct 2021 15:32:08 +0200 +Subject: [PATCH] Fix formatting a pointer difference +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +GCC 11 warned: + +XS.xs: In function 'decode_cbor': +XS.xs:1478:14: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long int' [-Wformat=] + 1478 | croak ("%s, at offset %d (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur); + | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~ + | | + | long int + +Signed-off-by: Petr Písař +--- + XS.xs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/XS.xs b/XS.xs +index f4e2b4c..bfc7178 100644 +--- a/XS.xs ++++ b/XS.xs +@@ -1475,7 +1475,7 @@ decode_cbor (SV *string, CBOR *cbor, char **offset_return) + if (dec.err_sv) + sv_2mortal (dec.err_sv); + +- croak ("%s, at offset %d (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur); ++ croak ("%s, at offset %td (octet 0x%02x)", dec.err, dec.cur - (U8 *)data, (int)(uint8_t)*dec.cur); + } + + sv = sv_2mortal (sv); +-- +2.31.1 + diff --git a/CBOR-XS-1.84-Remove-a-forgotten-debugging-message.patch b/CBOR-XS-1.84-Remove-a-forgotten-debugging-message.patch new file mode 100644 index 0000000..fd17099 --- /dev/null +++ b/CBOR-XS-1.84-Remove-a-forgotten-debugging-message.patch @@ -0,0 +1,28 @@ +From 6ba8e32023622001aafbea20cebd0d4474266673 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Thu, 21 Oct 2021 15:21:33 +0200 +Subject: [PATCH] Remove a forgotten debugging message +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Signed-off-by: Petr Písař +--- + XS.xs | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/XS.xs b/XS.xs +index 28e298f..f4e2b4c 100644 +--- a/XS.xs ++++ b/XS.xs +@@ -987,7 +987,6 @@ decode_he (dec_t *dec, HV *hv) + { + STRLEN len = decode_uint (dec); + char *key = (char *)dec->cur; +- printf ("len %d\n", len);//D + + WANT (len); + dec->cur += len; +-- +2.31.1 + diff --git a/perl-CBOR-XS.rpmlintrc b/perl-CBOR-XS.rpmlintrc new file mode 100644 index 0000000..b277353 --- /dev/null +++ b/perl-CBOR-XS.rpmlintrc @@ -0,0 +1 @@ +addFilter('spelling-error .* (versa|superset)') diff --git a/perl-CBOR-XS.spec b/perl-CBOR-XS.spec index 283d512..bbaf582 100644 --- a/perl-CBOR-XS.spec +++ b/perl-CBOR-XS.spec @@ -1,6 +1,6 @@ Name: perl-CBOR-XS -Version: 1.83 -Release: 4%{?dist} +Version: 1.84 +Release: 1%{?dist} Summary: Concise Binary Object Representation (CBOR) # COPYING: GPLv3+ ## Replaced by system header-only package @@ -11,7 +11,11 @@ Source0: https://cpan.metacpan.org/authors/id/M/ML/MLEHMANN/CBOR-XS-%{ver # Use system libecb Patch0: CBOR-XS-1.6-Include-ecb.h-from-system.patch # Silent compiler warnings -Patch1: CBOR-XS-1.5-Cast-char-and-U8-where-needed.patch +Patch1: CBOR-XS-1.84-Cast-char-and-U8-where-needed.patch +# Removed a debugging message, mailed to the upstream +Patch2: CBOR-XS-1.84-Remove-a-forgotten-debugging-message.patch +# Fix formatting an error message, mailed to the upstream +Patch3: CBOR-XS-1.84-Fix-formatting-a-pointer-difference.patch BuildRequires: coreutils BuildRequires: findutils # gcc for standard header files @@ -23,7 +27,6 @@ BuildRequires: perl-devel BuildRequires: perl-generators BuildRequires: perl(Canary::Stability) BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76 -BuildRequires: sed # Run-time: BuildRequires: perl(common::sense) BuildRequires: perl(Exporter) @@ -52,12 +55,10 @@ when you can represent something useful in JSON, you should be able to represent it in CBOR. %prep -%setup -q -n CBOR-XS-%{version} -%patch0 -p1 -%patch1 -p1 +%autosetup -p1 -n CBOR-XS-%{version} # Remove bundled libecb rm ecb.h -sed -i -e '/^ecb\.h/d' MANIFEST +perl -i -ne 'print $_ unless m{^ecb\.h}' MANIFEST %build perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 OPTIMIZE="$RPM_OPT_FLAGS" - 1.84-1 +- 1.84 bump + * Thu Jul 22 2021 Fedora Release Engineering - 1.83-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index d4ecc04..91b243a 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (CBOR-XS-1.83.tar.gz) = 280c820d247c09c3b77722b369dd23667c846b04109e78ec9f4ce408f033082351596b3652b861f936460a5a2157019eeb3ca51f3093e10cfb7b3ef9cc4565b6 +SHA512 (CBOR-XS-1.84.tar.gz) = b33e3f149f5920fbe153a49abdfcbb2c1fd2136c583420b144d230ec4f4c8c53cb77f2e4fe6ca8e5dbc313f18b4e3bdb56b8ec6dab565f51fb50a5896d9219bc