Bug 1807445

Summary: perl-5.24.4-404.module+el8.1.0+2926+ce7246ad FTBFS: ../cpan/Time-Local/t/Local.t test fails in year 2020
Product: Red Hat Enterprise Linux 8 Reporter: Petr Pisar <ppisar>
Component: perlAssignee: perl-maint-list
Status: CLOSED WONTFIX QA Contact: Martin Kyral <mkyral>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.1CC: bnater, perl-maint-list, rhel-stacks-subsystem-qe, sjfleck
Target Milestone: rcKeywords: Patch
Target Release: 8.3   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1807120 Environment:
Last Closed: 2021-01-15 12:01:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1839274, 1839277, 1839280    
Attachments:
Description Flags
An upstream fix ported to 5.24.4 none

Description Petr Pisar 2020-02-26 11:16:12 UTC
+++ This bug was initially created as a clone of Bug #1807120 +++

Rebuilding perl-5.26.3-416.el8 from sources fails because a ../cpan/Time-Local/t/Local.t test fails like this:

../cpan/Time-Local/t/Local.t ....................................... 
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/187 subtests 
        (less 8 skipped subtests: 177 okay)
[...]
Test Summary Report
-------------------
../cpan/Time-Local/t/Local.t                                     (Wstat: 512 Tests: 187 Failed: 2)
  Failed tests:  6, 12
  Non-zero exit status: 2

That's a bug in the test that manifests since the beginning of 2020 year and fix exist in later upstream versions. I ported the fix to perl-5.28.2 in Fedora <https://src.fedoraproject.org/rpms/perl/raw/f30/f/perl-5.28.2-Only-pass-2-digit-years-to-tests-when-testing-2-digi.patch> and it should be possible port it to 5.26.3 in RHEL.

-----

perl:5.24 is also affected.

Comment 1 Petr Pisar 2020-02-26 13:16:24 UTC
Created attachment 1665928 [details]
An upstream fix ported to 5.24.4

Comment 3 Steve F 2020-03-08 17:45:03 UTC
Petr,
Thank you for posting this patch. I'm new to using patches and was hoping that you would provide instructions for how you used the patch for perl 5.28.2. Do I need to make these changes manually, or can I use the patch function so it's done automatically? In the latter case, I was hoping that you would provide an example of what you ran to get the patch to work properly. I tried earlier and it didn't work. Thank you for you time
-Steve

Comment 4 Steve F 2020-03-09 00:17:47 UTC
(In reply to Steve F from comment #3)
> Petr,
> Thank you for posting this patch. I'm new to using patches and was hoping
> that you would provide instructions for how you used the patch for perl
> 5.28.2. Do I need to make these changes manually, or can I use the patch
> function so it's done automatically? In the latter case, I was hoping that
> you would provide an example of what you ran to get the patch to work
> properly. I tried earlier and it didn't work. Thank you for you time
> -Steve

Petr,
I hand edited the file and followed these steps and I was able to get perl installed:

upload perl-5.30.1.tar.gz
tar -zxvf perl-5.30.1.tar.gz
cd perl-5.28.2
find . -exec touch {} \;
cd /gpfs/scratch/sjfleck/modulefiles/perl-5.28.2/cpan/Time-Local/t/
chmod -777 Local.t
rm Local.t
*upload edited Local.t
chmod -444 Local.t
./Configure -des -Dprefix=/user/sjfleck/localperl
make
make test
	#All tests successful.
	#Elapsed: 881 sec
	#u=6.43  s=4.49  cu=417.23  cs=78.41  scripts=2456  tests=1157715
make install

Comment 5 Petr Pisar 2020-03-09 07:25:49 UTC
(In reply to Steve F from comment #3)
> Thank you for posting this patch. I'm new to using patches and was hoping
> that you would provide instructions for how you used the patch for perl
> 5.28.2.

wget https://src.fedoraproject.org/rpms/perl/raw/f30/f/perl-5.28.2-Only-pass-2-digit-years-to-tests-when-testing-2-digi.patch
tar xzf perl-5.28.2.tar.gz
cd perl-5.28.2
patch -p1 <../perl-5.28.2-Only-pass-2-digit-years-to-tests-when-testing-2-digi.patch

Comment 8 Petr Pisar 2021-01-15 12:01:45 UTC
perl:5.24 stream ends its life in May, 2021 <https://access.redhat.com/support/policy/updates/rhel8-app-streams-life-cycle>. That coincides with the next RHEL 8 minor release. Therefore there is no point in updating perl:5.24.