Hello community, here is the log from the commit of package perl for openSUSE:Leap:15.2 checked in at 2020-03-06 12:36:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/perl (Old) and /work/SRC/openSUSE:Leap:15.2/.perl.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl" Fri Mar 6 12:36:00 2020 rev:39 rq:779810 version:5.26.1 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/perl/perl.changes 2020-01-15 15:39:43.127123834 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.perl.new.26092/perl.changes 2020-03-06 12:36:08.706570017 +0100 @@ -1,0 +2,7 @@ +Wed Feb 5 15:46:22 CET 2020 - [email protected] + +- Backport perl-fix2020.patch to make timelocal calls work in + the year 2020 [bnc#1102840] [bnc#1160039] + new patch: perl-fix2020.patch + +------------------------------------------------------------------- New: ---- perl-fix2020.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl.spec ++++++ --- /var/tmp/diff_new_pack.UOZN8G/_old 2020-03-06 12:36:09.626570577 +0100 +++ /var/tmp/diff_new_pack.UOZN8G/_new 2020-03-06 12:36:09.626570577 +0100 @@ -55,6 +55,7 @@ Patch17: perl-regcomp-strchr-memchr.diff Patch18: perl-reg-node-overrun.diff Patch19: perl-setenv-integer-wrap.diff +Patch20: perl-fix2020.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build PreReq: perl-base = %version #PreReq: %fillup_prereq @@ -204,6 +205,7 @@ %patch17 %patch18 %patch19 +%patch20 %build cp -a lib savelib ++++++ perl-fix2020.patch ++++++ submitted upstream Author: Bernhard M. Wiedemann <bwiedemann suse de> Date: 2018-03-18 Subject: fix calls of timelocal to work after 2019 because year 70 then starts to mean 2070 https://bugzilla.opensuse.org/show_bug.cgi?id=1102840 trackerbug: build fails at some time https://rt.perl.org/Ticket/Display.html?id=132896 perl Net::NNTP https://rt.perl.org/Ticket/Display.html?id=132898 perl Net::FTP => https://rt.cp an.org/Public/Bug/Display.html?id=124534 https://rt.perl.org/Ticket/Display.html?id=132897 perl doc --- ./cpan/Time-Local/t/Local.t.orig 2020-02-05 14:40:00.406521792 +0000 +++ ./cpan/Time-Local/t/Local.t 2020-02-05 15:20:34.648804873 +0000 @@ -96,8 +96,7 @@ SKIP: { # Test timelocal() { - my $year_in = $year < 70 ? $year + 1900 : $year; - my $time = timelocal( $sec, $min, $hour, $mday, $mon, $year_in ); + my $time = timelocal( $sec, $min, $hour, $mday, $mon, $year + 1900 ); my ( $s, $m, $h, $D, $M, $Y ) = localtime($time); @@ -111,8 +110,7 @@ SKIP: { # Test timegm() { - my $year_in = $year < 70 ? $year + 1900 : $year; - my $time = timegm( $sec, $min, $hour, $mday, $mon, $year_in ); + my $time = timegm( $sec, $min, $hour, $mday, $mon, $year + 1900 ); my ( $s, $m, $h, $D, $M, $Y ) = gmtime($time); @@ -138,19 +136,19 @@ for (@bad_time) { { is( - timelocal( 0, 0, 1, 1, 0, 90 ) - timelocal( 0, 0, 0, 1, 0, 90 ), 3600, + timelocal( 0, 0, 1, 1, 0, 1990 ) - timelocal( 0, 0, 0, 1, 0, 1990 ), 3600, 'one hour difference between two calls to timelocal' ); is( - timelocal( 1, 2, 3, 1, 0, 100 ) - timelocal( 1, 2, 3, 31, 11, 99 ), + timelocal( 1, 2, 3, 1, 0, 2000 ) - timelocal( 1, 2, 3, 31, 11, 1999 ), 24 * 3600, 'one day difference between two calls to timelocal' ); # Diff beween Jan 1, 1980 and Mar 1, 1980 = (31 + 29 = 60 days) is( - timegm( 0, 0, 0, 1, 2, 80 ) - timegm( 0, 0, 0, 1, 0, 80 ), + timegm( 0, 0, 0, 1, 2, 1980 ) - timegm( 0, 0, 0, 1, 0, 1980 ), 60 * 24 * 3600, '60 day difference between two calls to timegm' ); @@ -162,7 +160,7 @@ for (@bad_time) { # treated like 03:00:00 rather than 01:00:00 - negative zone offsets used # to do the latter { - my $hour = ( localtime( timelocal( 0, 0, 2, 7, 3, 102 ) ) )[2]; + my $hour = ( localtime( timelocal( 0, 0, 2, 7, 3, 2002 ) ) )[2]; # testers in US/Pacific should get 3, # other testers should get 2 --- ./cpan/libnet/lib/Net/FTP.pm.orig 2017-07-18 22:49:51.000000000 +0000 +++ ./cpan/libnet/lib/Net/FTP.pm 2020-02-05 14:40:00.406521792 +0000 @@ -264,7 +264,7 @@ sub mdtm { $ftp->_MDTM($file) && $ftp->message =~ /((\d\d)(\d\d\d?))(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/ - ? timegm($8, $7, $6, $5, $4 - 1, $2 eq '19' ? $3 : ($1 - 1900)) + ? timegm($8, $7, $6, $5, $4 - 1, $2 eq '19' ? ($3 + 1900) : $1) : undef; } --- ./cpan/libnet/lib/Net/NNTP.pm.orig 2017-07-18 22:49:51.000000000 +0000 +++ ./cpan/libnet/lib/Net/NNTP.pm 2020-02-05 14:40:00.406521792 +0000 @@ -598,7 +598,7 @@ sub date { $nntp->_DATE && $nntp->message =~ /(\d{4})(\d\d)(\d\d)(\d\d)(\d\d)(\d\d)/ - ? timegm($6, $5, $4, $3, $2 - 1, $1 - 1900) + ? timegm($6, $5, $4, $3, $2 - 1, $1) : undef; } --- ./pod/perlport.pod.orig 2020-02-05 14:45:01.949813224 +0000 +++ ./pod/perlport.pod 2020-02-05 14:40:00.406521792 +0000 @@ -670,7 +670,7 @@ When calculating specific times, such as it may be appropriate to calculate an offset for the epoch. use Time::Local qw(timegm); - my $offset = timegm(0, 0, 0, 1, 0, 70); + my $offset = timegm(0, 0, 0, 1, 0, 1970); The value for C<$offset> in Unix will be C<0>, but in Mac OS Classic will be some large number. C<$offset> can then be added to a Unix time
