Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-Time-Moment for openSUSE:Factory checked in at 2022-08-31 18:09:00
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Time-Moment (Old)
and /work/SRC/openSUSE:Factory/.perl-Time-Moment.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Time-Moment"
Wed Aug 31 18:09:00 2022 rev:2 rq:1000392 version:0.44
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Time-Moment/perl-Time-Moment.changes 2018-12-12 17:28:47.434853626 +0100
+++ /work/SRC/openSUSE:Factory/.perl-Time-Moment.new.2083/perl-Time-Moment.changes 2022-08-31 18:09:04.579389475 +0200
@@ -1,0 +2,5 @@
+Wed Aug 31 03:36:13 UTC 2022 - Bernhard Wiedemann
+
+- Add fix2038.patch to fix a year 2038 problem
+
+-------------------------------------------------------------------
New:
----
fix2038.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-Time-Moment.spec ++++++
--- /var/tmp/diff_new_pack.z5GtpM/_old 2022-08-31 18:09:05.051390723 +0200
+++ /var/tmp/diff_new_pack.z5GtpM/_new 2022-08-31 18:09:05.055390734 +0200
@@ -26,6 +26,7 @@
Url: http://search.cpan.org/dist/Time-Moment/
Source0: https://cpan.metacpan.org/authors/id/C/CH/CHANSEN/%{cpan_name}-%{version}.tar.gz
Source1: cpanspec.yml
+Patch0: fix2038.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
@@ -49,6 +50,7 @@
%prep
%setup -q -n %{cpan_name}-%{version}
+%patch0 -p1
find . -type f ! -name \*.pl -print0 | xargs -0 chmod 644
%build
++++++ fix2038.patch ++++++
https://github.com/chansen/p5-time-moment/pull/48
commit c702dce560ed255e98384861e29297134fb60c65
Author: Bernhard M. Wiedemann
Date: Wed Aug 31 05:29:27 2022 +0200
Fix year 2038 bug
Calculate seconds with 64-bit integers
Fixes #47
This PR was done while working on reproducible builds for openSUSE.
diff --git a/Moment.xs b/Moment.xs
index f8f5593..5ca561e 100644
--- a/Moment.xs
+++ b/Moment.xs
@@ -356,7 +356,7 @@ THX_moment_now(pTHX_ bool utc) {
if (tm == NULL)
croak("localtime() failed: %s", Strerror(errno));
- sec = ((1461 * (tm->tm_year - 1) >> 2) + tm->tm_yday - 25202) * 86400
+ sec = ((1461 * (tm->tm_year - 1) >> 2) + tm->tm_yday - 25202) * 86400LL
+ tm->tm_hour * 3600 + tm->tm_min * 60 + tm->tm_sec;
off = (sec - tv.tv_sec) / 60;
}