public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
To: git-commits@fedoraproject.org
Subject: [rpms/perl-DateTime-Format-Duration] f43: 1.05 bump
Date: Mon, 01 Jun 2026 16:10:03 GMT [thread overview]
Message-ID: <178033020321.1.2550716653445380094.rpms-perl-DateTime-Format-Duration-c3597282af71@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/perl-DateTime-Format-Duration
Branch : f43
Commit : c3597282af718e2c682368096c4bdd2ff416d32f
Author : Petr Písař <ppisar@redhat.com>
Date : 2026-06-01T18:09:34+02:00
Stats : +86/-18 in 4 file(s)
URL : https://src.fedoraproject.org/rpms/perl-DateTime-Format-Duration/c/c3597282af718e2c682368096c4bdd2ff416d32f?branch=f43
Log:
1.05 bump
---
diff --git a/.gitignore b/.gitignore
index dcb148e..23dc6d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/DateTime-Format-Duration-1.03a.tgz
/DateTime-Format-Duration-1.04.tar.gz
+/DateTime-Format-Duration-1.05.tar.gz
diff --git a/DateTime-Format-Duration-1.05-Fix-Use-of-uninitialized-value-W-in-scalar-assignmen.patch b/DateTime-Format-Duration-1.05-Fix-Use-of-uninitialized-value-W-in-scalar-assignmen.patch
new file mode 100644
index 0000000..289270f
--- /dev/null
+++ b/DateTime-Format-Duration-1.05-Fix-Use-of-uninitialized-value-W-in-scalar-assignmen.patch
@@ -0,0 +1,57 @@
+From a8234e53cf9f39446ac948b15690982a27b7118b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com>
+Date: Mon, 1 Jun 2026 17:35:49 +0200
+Subject: [PATCH] Fix "Use of uninitialized value $^W in scalar assignment"
+ warning
+
+On Perl 5.42.2 some tests printed warnings like this:
+
+ $ perl -Ilib t/2_fmt_normalise.t
+ Use of uninitialized value $^W in scalar assignment at lib/DateTime/Format/Duration.pm line 207.
+ ok 1 - Test 1: 0000-00-00 00:00:01 should stay 0000-00-00 00:00:01
+ [...]
+
+The cause was an attempt to locally disable warnings with
+"local $^W = undef;" in parse_duration_as_deltas(). perlvar POD
+only documents true and false values. So probably undef is not
+supported.
+
+Surprisingly, the warning does not manifest on 5.43.10. The reason is
+this Perl's commit:
+
+ commit 00f271f523a94b9cf19f94e0efd2c1a0d390af93
+ Author: David Mitchell <davem@iabyn.nospamdeletethisbit.com>
+ Date: Wed Nov 12 17:02:16 2025 +0000
+
+ don't warn on 'undef $^W'
+
+ Ironically, this warns:
+
+ $ perl -e'use warnings; undef $^W'
+ Use of uninitialized value in undef operator at -e line 1.
+ $
+
+ The magic-setting code was treating the new value of $^W as an integer.
+ This commit makes it treat the value as a boolean.
+
+This patch fixes the warning on "old" Perls by setting the variable to defined 0.
+---
+ lib/DateTime/Format/Duration.pm | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/DateTime/Format/Duration.pm b/lib/DateTime/Format/Duration.pm
+index 02dbabf..110cebe 100755
+--- a/lib/DateTime/Format/Duration.pm
++++ b/lib/DateTime/Format/Duration.pm
+@@ -204,7 +204,7 @@ sub parse_duration {
+ sub parse_duration_as_deltas {
+ my ( $self, $time_string ) = @_;
+
+- local $^W = undef;
++ local $^W = 0;
+
+ # Variables from the parser
+ my ( $centuries,$years, $months,
+--
+2.54.0
+
diff --git a/perl-DateTime-Format-Duration.spec b/perl-DateTime-Format-Duration.spec
index f92560c..5947a0e 100644
--- a/perl-DateTime-Format-Duration.spec
+++ b/perl-DateTime-Format-Duration.spec
@@ -1,23 +1,25 @@
%global cpan_name DateTime-Format-Duration
Name: perl-%{cpan_name}
-Version: 1.04
-Release: 29%{?dist}
+Version: 1.05
+Release: 1%{?dist}
Summary: Format and parse DateTime::Durations
-# Old FSF address reported to upstream as CPAN RT #82055
-# Automatically converted from old format: GPL+ or Artistic - review is highly recommended.
License: GPL-1.0-or-later OR Artistic-1.0-Perl
URL: https://metacpan.org/release/%{cpan_name}
Source0: https://cpan.metacpan.org/authors/id/E/ET/ETHER/%{cpan_name}-%{version}.tar.gz
# Upstream links images to the Internet, we package them into %%{_docdir}
Patch0: DateTime-Format-Duration-1.04-Link-images-to-local-documentation.patch
+# Fix warnings on Perl 5.42.2, proposed upstream,
+# <https://github.com/karenetheridge/DateTime-Format-Duration/pull/3>
+Patch1: DateTime-Format-Duration-1.05-Fix-Use-of-uninitialized-value-W-in-scalar-assignmen.patch
BuildArch: noarch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
-BuildRequires: perl-interpreter
BuildRequires: perl-generators
-BuildRequires: perl(ExtUtils::MakeMaker)
+BuildRequires: perl-interpreter
+BuildRequires: perl(:VERSION) >= 5.6
+BuildRequires: perl(ExtUtils::MakeMaker) >= 6.76
BuildRequires: perl(strict)
BuildRequires: perl(warnings)
# Run-time:
@@ -27,41 +29,49 @@ BuildRequires: perl(Data::Dumper)
BuildRequires: perl(DateTime::Duration)
BuildRequires: perl(Exporter)
BuildRequires: perl(Params::Validate)
+BuildRequires: perl(Scalar::Util)
# Tests:
BuildRequires: perl(DateTime)
BuildRequires: perl(File::Spec)
-BuildRequires: perl(Test::More)
+BuildRequires: perl(parent)
+BuildRequires: perl(Test::Fatal)
+BuildRequires: perl(Test::More) >= 0.88
+# Optional tests:
+# CPAN::Meta not helpful
Requires: perl(Data::Dumper)
%description
This module formats and parses DateTime::Duration objects as well as other
-durations representations.
-
+duration representations.
%prep
-%setup -q -n %{cpan_name}-%{version}
-%patch -P0 -p1
+%autosetup -p1 -n %{cpan_name}-%{version}
find -type f -exec chmod -x {} +
%build
-perl Makefile.PL INSTALLDIRS=vendor
-make %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1
+%{make_build}
%install
-make pure_install DESTDIR=$RPM_BUILD_ROOT
-find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
+%{make_install}
%{_fixperms} $RPM_BUILD_ROOT/*
%check
+export HARNESS_OPTIONS=j$(perl -e 'if ($ARGV[0] =~ /.*-j([0-9][0-9]*).*/) {print $1} else {print 1}' -- '%{?_smp_mflags}')
make test
%files
%license LICENCE
%doc Changes CONTRIBUTING docs README
-%{perl_vendorlib}/*
-%{_mandir}/man3/*
+%dir %{perl_vendorlib}/DateTime
+%dir %{perl_vendorlib}/DateTime/Format
+%{perl_vendorlib}/DateTime/Format/Duration.pm
+%{_mandir}/man3/DateTime::Format::Duration.*
%changelog
+* Mon Jun 01 2026 Petr Pisar <ppisar@redhat.com> - 1.05-1
+- 1.05 bump
+
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 1.04-29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
diff --git a/sources b/sources
index 0872523..6f15389 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (DateTime-Format-Duration-1.04.tar.gz) = 4c5d849975c271f17a258ea05a2d63b1ce32aab2217f6947cb324c4cee417137744fddb423584a5d2bf4b2b77751c8809dacfac9a625310cecbe5edc0b85b109
+SHA512 (DateTime-Format-Duration-1.05.tar.gz) = 1079ee1f0366e098b4d5fa526a1656801e4b012ff58816bb1316f4cdc7643cea3390fd5cae0c6113f8bb2594f98d90315c6d621d202fb208560151db92972ef1
reply other threads:[~2026-06-01 16:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178033020321.1.2550716653445380094.rpms-perl-DateTime-Format-Duration-c3597282af71@fedoraproject.org \
--to=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox