From 06591ffb275f5601b4319d3c57ee210d404606a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= Date: Wed, 14 Oct 2020 15:31:49 +0200 Subject: [PATCH] Fix sv_collxfrm macro to respect locale --- ...v.h-sv_collxfrm-didn-t-work-properly.patch | 36 +++++++++++++++++++ perl.spec | 10 +++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 perl-5.33.2-sv.h-sv_collxfrm-didn-t-work-properly.patch diff --git a/perl-5.33.2-sv.h-sv_collxfrm-didn-t-work-properly.patch b/perl-5.33.2-sv.h-sv_collxfrm-didn-t-work-properly.patch new file mode 100644 index 0000000..efa0632 --- /dev/null +++ b/perl-5.33.2-sv.h-sv_collxfrm-didn-t-work-properly.patch @@ -0,0 +1,36 @@ +From e17dadf36f7b4348e59076240c880d0c78b33fa9 Mon Sep 17 00:00:00 2001 +From: Karl Williamson +Date: Tue, 22 Sep 2020 08:47:52 -0600 +Subject: [PATCH] sv.h: sv_collxfrm didn't work properly +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +It is supposed to be a wrapper for sv_collxfrm_flags, but it was just +calling sv_cmp_flags instead. The consequences are none except under +'use locale' in which case you always got the C locale. I did not add +tests, because it is really a pain to write portable locale tests, and +this doesn't seem to be much used. In core the '_flags' form was always +used. + +Signed-off-by: Petr Písař +--- + sv.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/sv.h b/sv.h +index 19ce718ac3..44414b35a9 100644 +--- a/sv.h ++++ b/sv.h +@@ -2045,7 +2045,7 @@ Like C but doesn't process magic. + #define sv_eq(sv1, sv2) sv_eq_flags(sv1, sv2, SV_GMAGIC) + #define sv_cmp(sv1, sv2) sv_cmp_flags(sv1, sv2, SV_GMAGIC) + #define sv_cmp_locale(sv1, sv2) sv_cmp_locale_flags(sv1, sv2, SV_GMAGIC) +-#define sv_collxfrm(sv, nxp) sv_cmp_flags(sv, nxp, SV_GMAGIC) ++#define sv_collxfrm(sv, nxp) sv_collxfrm_flags(sv, nxp, SV_GMAGIC) + #define sv_2bool(sv) sv_2bool_flags(sv, SV_GMAGIC) + #define sv_2bool_nomg(sv) sv_2bool_flags(sv, 0) + #define sv_insert(bigstr, offset, len, little, littlelen) \ +-- +2.25.4 + diff --git a/perl.spec b/perl.spec index 3ee5deb..6632db7 100644 --- a/perl.spec +++ b/perl.spec @@ -100,7 +100,7 @@ License: GPL+ or Artistic Epoch: %{perl_epoch} Version: %{perl_version} # release number must be even higher, because dual-lived modules will be broken otherwise -Release: 464%{?dist} +Release: 465%{?dist} Summary: Practical Extraction and Report Language Url: https://www.perl.org/ Source0: https://www.cpan.org/src/5.0/perl-%{perl_version}.tar.xz @@ -245,6 +245,9 @@ Patch36: perl-5.33.1-Heap-buffer-overflow-in-regex-bracket-group-whitespa # in upstream after 5.33.2 Patch37: perl-5.33.2-gh18096-assume-worst-case-for-GOSUBs-we-don-t-analys.patch +# Fix sv_collxfrm macro to respect locale, in upstream after 5.33.2 +Patch38: perl-5.33.2-sv.h-sv_collxfrm-didn-t-work-properly.patch + # Link XS modules to libperl.so with EU::CBuilder on Linux, bug #960048 Patch200: perl-5.16.3-Link-XS-modules-to-libperl.so-with-EU-CBuilder-on-Li.patch @@ -4282,6 +4285,7 @@ you're not running VMS, this module does nothing. %patch35 -p1 %patch36 -p1 %patch37 -p1 +%patch38 -p1 %patch200 -p1 %patch201 -p1 @@ -4326,6 +4330,7 @@ perl -x patchlevel.h \ 'Fedora Patch35: Fix sorting with a block that calls return (GH#18081)' \ 'Fedora Patch36: Fix a buffer overflow when compiling a regular expression with a bracketed character class with a white space' \ 'Fedora Patch37: Fix a mismatch with the recursive subpatterns (GH#18096)' \ + 'Fedora Patch38: Fix sv_collxfrm macro to respect locale' \ 'Fedora Patch200: Link XS modules to libperl.so with EU::CBuilder on Linux' \ 'Fedora Patch201: Link XS modules to libperl.so with EU::MM on Linux' \ %{nil} @@ -7039,6 +7044,9 @@ popd # Old changelog entries are preserved in CVS. %changelog +* Wed Oct 14 2020 Petr Pisar - 4:5.32.0-465 +- Fix sv_collxfrm macro to respect locale + * Fri Sep 25 2020 Petr Pisar - 4:5.32.0-464 - Update perl-IO-Zlib metadata - Disable dual-lived perl-IO-Zlib (bug #1882415)