From e4534ac25ddec9a1cfed12dd77d8aadd8bb65cc60f14dffbd978d30dcd3f995d Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Mon, 24 Jun 2019 15:40:06 +0000 Subject: [PATCH] Accepting request 711588 from home:bmwiedemann:branches:devel:languages:perl Add fix-time-local.patch to make tests pass after 2019 OBS-URL: https://build.opensuse.org/request/show/711588 OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-OLE-Storage_Lite?expand=0&rev=15 --- fix-time-local.patch | 23 +++++++++++++++++++++++ perl-OLE-Storage_Lite.changes | 5 +++++ perl-OLE-Storage_Lite.spec | 4 +++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 fix-time-local.patch diff --git a/fix-time-local.patch b/fix-time-local.patch new file mode 100644 index 0000000..42298c8 --- /dev/null +++ b/fix-time-local.patch @@ -0,0 +1,23 @@ +Date: 2018-02-21 +Author: Bernhard M. Wiedemann + +https://rt.cpan.org/Public/Bug/Display.html?id=124513 + +fix how code uses Time::Local to ensure no relative 2-digit dates are used +to make tests pass in 2020 and beyond + +Index: OLE-Storage_Lite-0.19/lib/OLE/Storage_Lite.pm +=================================================================== +--- OLE-Storage_Lite-0.19.orig/lib/OLE/Storage_Lite.pm ++++ OLE-Storage_Lite-0.19/lib/OLE/Storage_Lite.pm +@@ -1364,7 +1364,9 @@ sub LocalDate2OLE { + return "\x00" x 8 unless $localtime; + + # Convert from localtime (actually gmtime) to seconds. +- my $time = timegm( @{$localtime} ); ++ my @localtimecopy = @{$localtime}; ++ $localtimecopy[5] += 1900 unless $localtimecopy[5] > 99; ++ my $time = timegm( @localtimecopy ); + + # Add the number of seconds between the 1601 and 1970 epochs. + $time += 11644473600; diff --git a/perl-OLE-Storage_Lite.changes b/perl-OLE-Storage_Lite.changes index 4827ad2..c59db98 100644 --- a/perl-OLE-Storage_Lite.changes +++ b/perl-OLE-Storage_Lite.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jun 24 04:10:45 UTC 2019 - Bernhard Wiedemann + +- Add fix-time-local.patch to make tests pass after 2019 + ------------------------------------------------------------------- Thu Jun 9 08:57:11 UTC 2011 - coolo@novell.com diff --git a/perl-OLE-Storage_Lite.spec b/perl-OLE-Storage_Lite.spec index 9f623b5..8f11b20 100644 --- a/perl-OLE-Storage_Lite.spec +++ b/perl-OLE-Storage_Lite.spec @@ -20,12 +20,13 @@ Name: perl-OLE-Storage_Lite Version: 0.19 Release: 1 -License: GPL+ or Artistic +License: GPL-1.0+ or Artistic-1.0 %define cpan_name OLE-Storage_Lite Summary: Simple Class for OLE document interface. Url: http://search.cpan.org/dist/OLE-Storage_Lite/ Group: Development/Libraries/Perl Source: http://www.cpan.org/authors/id/J/JM/JMCNAMARA/%{cpan_name}-%{version}.tar.gz +Patch0: fix-time-local.patch BuildArch: noarch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: perl @@ -41,6 +42,7 @@ OLE::Storage_Lite::PPS::Dir are subclasses of OLE::Storage_Lite::PPS. %prep %setup -q -n %{cpan_name}-%{version} +%patch0 -p1 %build %{__perl} Makefile.PL INSTALLDIRS=vendor