diff --git a/fix-test-case-failure-caused-by-zlib.patch b/fix-test-case-failure-caused-by-zlib.patch new file mode 100644 index 0000000000000000000000000000000000000000..715d3062700cc645166896665e2d7a07b2a7d3fa --- /dev/null +++ b/fix-test-case-failure-caused-by-zlib.patch @@ -0,0 +1,53 @@ +From 2425a39797fcc694082a4f6f0be27a2ec736c6b3 Mon Sep 17 00:00:00 2001 +From: hongjinghao +Date: Tue, 4 Jun 2024 17:26:43 +0800 +Subject: [PATCH] fix test case failure caused by zlib + +The patching of zlib in openEuler with upstream bug fixes aligns its functionality with newer versions of zlib. However, the version number of zlib within openEuler remains unchanged, indicating the older version. Consequently, the test cases for perl-IO-Compress, which rely on the zlib version number to determine expected outcomes, will fail. To address this, perl-IO-Compress must be updated to accommodate the changes in zlib and remove the versioning-based checks from its test suite. + +This bugfix commit for zlib in openEuler resulted in a change in its function behavior: +https://gitee.com/src-openeuler/zlib/pulls/46 + +--- + cpan/Compress-Raw-Zlib/t/02zlib.t | 4 ++-- + cpan/IO-Compress/t/cz-03zlib-v1.t | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/cpan/Compress-Raw-Zlib/t/02zlib.t b/cpan/Compress-Raw-Zlib/t/02zlib.t +index 64c8944..4c445c9 100644 +--- a/cpan/Compress-Raw-Zlib/t/02zlib.t ++++ b/cpan/Compress-Raw-Zlib/t/02zlib.t +@@ -490,7 +490,7 @@ SKIP: + last if $status == Z_STREAM_END or $status != Z_OK ; + } + +- cmp_ok $status, '==', Z_DATA_ERROR ; ++ cmp_ok $status, '==', Z_STREAM_END ; + is $GOT, $goodbye ; + + +@@ -514,7 +514,7 @@ SKIP: + is length($rest), $len2, "expected compressed output"; + + $GOT = ''; +- cmp_ok $k->inflate($rest, $GOT), '==', Z_DATA_ERROR, "inflate returns Z_DATA_ERROR"; ++ cmp_ok $k->inflate($rest, $GOT), '==', Z_STREAM_END, "inflate returns Z_DATA_ERROR"; + is $GOT, $goodbye ; + } + +diff --git a/cpan/IO-Compress/t/cz-03zlib-v1.t b/cpan/IO-Compress/t/cz-03zlib-v1.t +index 9b75f9b..f2757c0 100644 +--- a/cpan/IO-Compress/t/cz-03zlib-v1.t ++++ b/cpan/IO-Compress/t/cz-03zlib-v1.t +@@ -700,7 +700,7 @@ EOM + + ($GOT, $status) = $k->inflate($rest) ; + +- ok $status == Z_DATA_ERROR ; ++ ok $status == Z_STREAM_END ; + ok $Z . $GOT eq $goodbye ; + } + +-- +2.33.0 + diff --git a/perl.spec b/perl.spec index 3884284ce14ce24a59213e3b2379bb32ba620695..c559b07d7ec4b8ca583139dd4d3e1a968cfcab5f 100644 --- a/perl.spec +++ b/perl.spec @@ -22,7 +22,7 @@ Name: perl License: (GPL+ or Artistic) and (GPLv2+ or Artistic) and MIT and UCD and Public Domain and BSD Epoch: 4 Version: %{perl_version} -Release: 12 +Release: 13 Summary: A highly capable, feature-rich programming language Url: https://www.perl.org/ Source0: https://www.cpan.org/src/5.0/%{name}-%{version}.tar.xz @@ -42,6 +42,7 @@ Patch6002: backport-CVE-2023-31486.patch Patch6003: backport-CVE-2022-48522.patch Patch6004: backport-CVE-2023-47100-CVE-2023-47038.patch Patch6005: backport-CVE-2023-47039.patch +Patch6006: fix-test-case-failure-caused-by-zlib.patch BuildRequires: gcc bash findutils coreutils make tar procps bzip2-devel gdbm-devel perl-File-Compare perl-File-Find BuildRequires: zlib-devel systemtap-sdt-devel perl-interpreter perl-generators @@ -492,6 +493,9 @@ make test_harness %{_mandir}/man3/* %changelog +* Tue Jun 4 2024 hongjinghao - 4:5.34.0-13 +- fix test case failure caused by zlib + * Mon Dec 11 2023 huyubiao - 4:5.34.0-12 - Fix CVE-2023-47100