[Bug 1377428] New: perl Datetime::Format::Pg doesn'
t handle fractions of a second.
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1377428
Bug ID: 1377428
Summary: perl Datetime::Format::Pg doesn't handle fractions of
a second.
Product: Fedora
Version: 23
Component: perl-DateTime-Format-Pg
Severity: medium
Assignee: jplesnik(a)redhat.com
Reporter: steve.bz(a)yewtc.demon.co.uk
QA Contact: extras-qa(a)fedoraproject.org
CC: iarnell(a)gmail.com, jplesnik(a)redhat.com,
perl-devel(a)lists.fedoraproject.org
Created attachment 1202544
--> https://bugzilla.redhat.com/attachment.cgi?id=1202544&action=edit
A perl test file
Description of problem:
DateTime::Format::Pg::format_duration rejects valid date with fractional
seconds
Version-Release number of selected component (if applicable):
0.16012-1.fc23
How reproducible:
Every time
Steps to Reproduce:
1. give the routine a date time duration with fractional seconds
2.
3.
Actual results:
Code dies for example with:
"Unknown timespec: 17:00:00.12"
Expected results:
It gives a valid DateTime::Duration object
Additional info:
This is also a bug in fc24.
I notified the perl maintainer and has a bug fix.
The attached perl test passes at .16011 and fails .16012
A work around is to downgrade.
--
You are receiving this mail because:
You are on the CC list for the bug.
7 years, 8 months
adelton pushed to perl-Scalar-List-Utils (f24). "1380561 - Rebase to
upstream version 1.46."
by notifications@fedoraproject.org
From 92f3254eff8d851fc90331c8aead733f3dbc1033 Mon Sep 17 00:00:00 2001
From: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri, 30 Sep 2016 12:57:35 +0200
Subject: 1380561 - Rebase to upstream version 1.46.
---
perl-Scalar-List-Utils.spec | 8 ++++++--
sources | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/perl-Scalar-List-Utils.spec b/perl-Scalar-List-Utils.spec
index b6e66f4..ead4994 100644
--- a/perl-Scalar-List-Utils.spec
+++ b/perl-Scalar-List-Utils.spec
@@ -1,7 +1,7 @@
Name: perl-Scalar-List-Utils
Epoch: 3
-Version: 1.45
-Release: 2%{?dist}
+Version: 1.46
+Release: 1%{?dist}
Summary: A selection of general-utility scalar and list subroutines
License: GPL+ or Artistic
Group: Development/Libraries
@@ -32,6 +32,7 @@ BuildRequires: perl(List::Util)
BuildRequires: perl(Math::BigInt)
BuildRequires: perl(overload)
BuildRequires: perl(Symbol)
+BuildRequires: perl(Sub::Util)
BuildRequires: perl(Test::More)
BuildRequires: perl(threads)
BuildRequires: perl(threads::shared)
@@ -74,6 +75,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Fri Sep 30 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 3:1.46-1
+- 1380561 - Rebase to upstream version 1.46.
+
* Sat May 14 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:1.45-2
- Increase epoch to favour standalone package
diff --git a/sources b/sources
index 9cfeebc..671f85e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b469e990ec92a4c9386aaf9e92857ae9 Scalar-List-Utils-1.45.tar.gz
+91b581cec3dd3de016bca7bbb106063b Scalar-List-Utils-1.46.tar.gz
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Scalar-List-Utils.git/commit/?h=f...
7 years, 8 months
adelton pushed to perl-Scalar-List-Utils (f24). "Increase epoch to
favour standalone package"
by notifications@fedoraproject.org
From b49cbade557adf2b4e8372cd160cd9a6c9e87871 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik(a)redhat.com>
Date: Sat, 14 May 2016 11:25:46 +0200
Subject: Increase epoch to favour standalone package
---
perl-Scalar-List-Utils.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/perl-Scalar-List-Utils.spec b/perl-Scalar-List-Utils.spec
index 5c034fc..b6e66f4 100644
--- a/perl-Scalar-List-Utils.spec
+++ b/perl-Scalar-List-Utils.spec
@@ -1,7 +1,7 @@
Name: perl-Scalar-List-Utils
-Epoch: 2
+Epoch: 3
Version: 1.45
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A selection of general-utility scalar and list subroutines
License: GPL+ or Artistic
Group: Development/Libraries
@@ -74,7 +74,10 @@ make test
%{_mandir}/man3/*
%changelog
-* Mon Mar 29 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.45-1
+* Sat May 14 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:1.45-2
+- Increase epoch to favour standalone package
+
+* Tue Mar 29 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.45-1
- 1.45 bump
* Fri Mar 18 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.44-1
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Scalar-List-Utils.git/commit/?h=f...
7 years, 8 months
adelton pushed to perl-Scalar-List-Utils (f24). "Merge 'master' into
f24"
by notifications@fedoraproject.org
From b49cbade557adf2b4e8372cd160cd9a6c9e87871 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jplesnik(a)redhat.com>
Date: Sat, 14 May 2016 11:25:46 +0200
Subject: Increase epoch to favour standalone package
---
perl-Scalar-List-Utils.spec | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/perl-Scalar-List-Utils.spec b/perl-Scalar-List-Utils.spec
index 5c034fc..b6e66f4 100644
--- a/perl-Scalar-List-Utils.spec
+++ b/perl-Scalar-List-Utils.spec
@@ -1,7 +1,7 @@
Name: perl-Scalar-List-Utils
-Epoch: 2
+Epoch: 3
Version: 1.45
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: A selection of general-utility scalar and list subroutines
License: GPL+ or Artistic
Group: Development/Libraries
@@ -74,7 +74,10 @@ make test
%{_mandir}/man3/*
%changelog
-* Mon Mar 29 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.45-1
+* Sat May 14 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:1.45-2
+- Increase epoch to favour standalone package
+
+* Tue Mar 29 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.45-1
- 1.45 bump
* Fri Mar 18 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.44-1
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Scalar-List-Utils.git/commit/?h=f...
7 years, 8 months
adelton pushed to perl-Scalar-List-Utils (f24). "Fixing bogus date in
%changelog."
by notifications@fedoraproject.org
From cae37dfc305836ca2b73a1b29743d1d72accee35 Mon Sep 17 00:00:00 2001
From: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri, 30 Sep 2016 12:56:51 +0200
Subject: Fixing bogus date in %changelog.
---
perl-Scalar-List-Utils.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/perl-Scalar-List-Utils.spec b/perl-Scalar-List-Utils.spec
index 5c034fc..bfa6737 100644
--- a/perl-Scalar-List-Utils.spec
+++ b/perl-Scalar-List-Utils.spec
@@ -74,7 +74,7 @@ make test
%{_mandir}/man3/*
%changelog
-* Mon Mar 29 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.45-1
+* Tue Mar 29 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.45-1
- 1.45 bump
* Fri Mar 18 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 2:1.44-1
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Scalar-List-Utils.git/commit/?h=f...
7 years, 8 months
adelton pushed to perl-Scalar-List-Utils (f25). "1380561 - Rebase to
upstream version 1.46."
by notifications@fedoraproject.org
From bde2ecb7c534556a990660196892bfb2ce46d1dc Mon Sep 17 00:00:00 2001
From: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri, 30 Sep 2016 12:57:35 +0200
Subject: 1380561 - Rebase to upstream version 1.46.
---
perl-Scalar-List-Utils.spec | 8 ++++++--
sources | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/perl-Scalar-List-Utils.spec b/perl-Scalar-List-Utils.spec
index 09af8ec..95d023a 100644
--- a/perl-Scalar-List-Utils.spec
+++ b/perl-Scalar-List-Utils.spec
@@ -1,7 +1,7 @@
Name: perl-Scalar-List-Utils
Epoch: 3
-Version: 1.45
-Release: 2%{?dist}
+Version: 1.46
+Release: 1%{?dist}
Summary: A selection of general-utility scalar and list subroutines
License: GPL+ or Artistic
Group: Development/Libraries
@@ -33,6 +33,7 @@ BuildRequires: perl(List::Util)
BuildRequires: perl(Math::BigInt)
BuildRequires: perl(overload)
BuildRequires: perl(Symbol)
+BuildRequires: perl(Sub::Util)
BuildRequires: perl(Test::More)
BuildRequires: perl(threads)
BuildRequires: perl(threads::shared)
@@ -75,6 +76,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Fri Sep 30 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 3:1.46-1
+- 1380561 - Rebase to upstream version 1.46.
+
* Sat May 14 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:1.45-2
- Increase epoch to favour standalone package
diff --git a/sources b/sources
index 9cfeebc..671f85e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b469e990ec92a4c9386aaf9e92857ae9 Scalar-List-Utils-1.45.tar.gz
+91b581cec3dd3de016bca7bbb106063b Scalar-List-Utils-1.46.tar.gz
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Scalar-List-Utils.git/commit/?h=f...
7 years, 8 months
adelton pushed to perl-Scalar-List-Utils (master). "1380561 - Rebase
to upstream version 1.46."
by notifications@fedoraproject.org
From bde2ecb7c534556a990660196892bfb2ce46d1dc Mon Sep 17 00:00:00 2001
From: Jan Pazdziora <jpazdziora(a)redhat.com>
Date: Fri, 30 Sep 2016 12:57:35 +0200
Subject: 1380561 - Rebase to upstream version 1.46.
---
perl-Scalar-List-Utils.spec | 8 ++++++--
sources | 2 +-
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/perl-Scalar-List-Utils.spec b/perl-Scalar-List-Utils.spec
index 09af8ec..95d023a 100644
--- a/perl-Scalar-List-Utils.spec
+++ b/perl-Scalar-List-Utils.spec
@@ -1,7 +1,7 @@
Name: perl-Scalar-List-Utils
Epoch: 3
-Version: 1.45
-Release: 2%{?dist}
+Version: 1.46
+Release: 1%{?dist}
Summary: A selection of general-utility scalar and list subroutines
License: GPL+ or Artistic
Group: Development/Libraries
@@ -33,6 +33,7 @@ BuildRequires: perl(List::Util)
BuildRequires: perl(Math::BigInt)
BuildRequires: perl(overload)
BuildRequires: perl(Symbol)
+BuildRequires: perl(Sub::Util)
BuildRequires: perl(Test::More)
BuildRequires: perl(threads)
BuildRequires: perl(threads::shared)
@@ -75,6 +76,9 @@ make test
%{_mandir}/man3/*
%changelog
+* Fri Sep 30 2016 Jan Pazdziora <jpazdziora(a)redhat.com> - 3:1.46-1
+- 1380561 - Rebase to upstream version 1.46.
+
* Sat May 14 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:1.45-2
- Increase epoch to favour standalone package
diff --git a/sources b/sources
index 9cfeebc..671f85e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b469e990ec92a4c9386aaf9e92857ae9 Scalar-List-Utils-1.45.tar.gz
+91b581cec3dd3de016bca7bbb106063b Scalar-List-Utils-1.46.tar.gz
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Scalar-List-Utils.git/commit/?h=m...
7 years, 8 months
ppisar pushed to perl-Encode (f23). "Fix Encode::encode_utf8(undef)
to return undef"
by notifications@fedoraproject.org
From 7b342ade06085be7206770dff3ef3014d1638205 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Fri, 30 Sep 2016 10:36:38 +0200
Subject: Fix Encode::encode_utf8(undef) to return undef
---
...-return-value-of-Encode-encode_utf8-undef.patch | 73 ++++++++++++++++++++++
perl-Encode.spec | 9 ++-
2 files changed, 81 insertions(+), 1 deletion(-)
create mode 100644 Encode-2.86-Fix-return-value-of-Encode-encode_utf8-undef.patch
diff --git a/Encode-2.86-Fix-return-value-of-Encode-encode_utf8-undef.patch b/Encode-2.86-Fix-return-value-of-Encode-encode_utf8-undef.patch
new file mode 100644
index 0000000..fb48e8e
--- /dev/null
+++ b/Encode-2.86-Fix-return-value-of-Encode-encode_utf8-undef.patch
@@ -0,0 +1,73 @@
+From 646aaae364fc8cd19786a66b88ec6aaf3f093024 Mon Sep 17 00:00:00 2001
+From: Pali <pali(a)cpan.org>
+Date: Thu, 11 Aug 2016 23:09:26 +0200
+Subject: [PATCH] Fix return value of Encode::encode_utf8(undef)
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Documentation says that '$octets = encode_utf8($string)' is equivalent to
+'$octets = encode("utf8", $string)'. And if the $string is undef, then
+undef is returned. However without this patch encode_utf8(undef) returned
+'' (empty string) and not undef. This patch fixes it and undef is returned.
+
+All other utf8 Encode calls already returns undef, just encode_utf8() acted
+differently.
+
+ Encode::encode('utf8', undef) -> undef
+ Encode::decode('utf8', undef) -> undef
+ Encode::decode_utf8(undef) -> undef
+
+Reported bug: https://rt.cpan.org/Public/Bug/Display.html?id=116904
+
+Signed-off-by: Petr Písař <ppisar(a)redhat.com>
+---
+ Encode.pm | 1 +
+ t/utf8ref.t | 15 ++++++++++++++-
+ 2 files changed, 15 insertions(+), 1 deletion(-)
+
+diff --git a/Encode.pm b/Encode.pm
+index bda8e1b..bc600be 100644
+--- a/Encode.pm
++++ b/Encode.pm
+@@ -254,6 +254,7 @@ sub from_to($$$;$) {
+
+ sub encode_utf8($) {
+ my ($str) = @_;
++ return undef unless defined $str;
+ utf8::encode($str);
+ return $str;
+ }
+diff --git a/t/utf8ref.t b/t/utf8ref.t
+index 3253e08..aff098f 100644
+--- a/t/utf8ref.t
++++ b/t/utf8ref.t
+@@ -6,7 +6,7 @@ use strict;
+ use warnings;
+ use Encode;
+ use Test::More;
+-plan tests => 4;
++plan tests => 12;
+ #plan 'no_plan';
+
+ # my $a = find_encoding('ASCII');
+@@ -18,3 +18,16 @@ is $u->encode($r), '';
+ $r = {};
+ is decode_utf8($r), ''.$r;
+ is $u->decode($r), '';
++use warnings 'uninitialized';
++
++is encode_utf8(undef), undef;
++is decode_utf8(undef), undef;
++
++is encode_utf8(''), '';
++is decode_utf8(''), '';
++
++is Encode::encode('utf8', undef), undef;
++is Encode::decode('utf8', undef), undef;
++
++is Encode::encode('utf8', ''), '';
++is Encode::decode('utf8', ''), '';
+--
+2.7.4
+
diff --git a/perl-Encode.spec b/perl-Encode.spec
index e064322..ed90ff3 100644
--- a/perl-Encode.spec
+++ b/perl-Encode.spec
@@ -8,7 +8,7 @@ Version: %{cpan_version}
# perl-encoding sub-package has independent version which does not change
# often and consecutive builds would clash on perl-encoding NEVRA. This is the
# same case as in perl.spec.
-Release: 6%{?dist}
+Release: 7%{?dist}
Summary: Character encodings in Perl
# ucm: UCD
# bin/encguess: Artistic 2.0
@@ -19,6 +19,9 @@ URL: http://search.cpan.org/dist/Encode/
Source0: http://www.cpan.org/authors/id/D/DA/DANKOGAI/Encode-%{cpan_version}.tar.gz
#Avoid loading optional modules from default . (CVE-2016-1238)
Patch0: Encode-2.84-CVE-2016-1238-avoid-loading-optional-modules-from.patch
+# Fix Encode::encode_utf8(undef) to return undef, CPAN RT#116904,
+# in upstream after 2.86
+Patch1: Encode-2.86-Fix-return-value-of-Encode-encode_utf8-undef.patch
BuildRequires: coreutils
BuildRequires: findutils
BuildRequires: make
@@ -130,6 +133,7 @@ your own encoding to perl. No knowledge of XS is necessary.
%prep
%setup -q -n Encode-%{cpan_version}
%patch0 -p1
+%patch1 -p1
%build
# Additional scripts can be installed by appending MORE_SCRIPTS, UCM files by
@@ -171,6 +175,9 @@ make test
%{perl_vendorarch}/Encode/encode.h
%changelog
+* Fri Sep 30 2016 Petr Pisar <ppisar(a)redhat.com> - 3:2.80-7
+- Fix Encode::encode_utf8(undef) to return undef (CPAN RT#116904)
+
* Fri Sep 16 2016 Petr Pisar <ppisar(a)redhat.com> - 3:2.80-6
- Add Artistic 2.0 into license tag because of encguess tool
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Encode.git/commit/?h=f23&id=7b342...
7 years, 8 months
ppisar pushed to perl-Encode (f23). "Correct changelog"
by notifications@fedoraproject.org
From d3f558fb52a6354b8d84f325503591feb528a943 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar(a)redhat.com>
Date: Fri, 30 Sep 2016 12:51:23 +0200
Subject: Correct changelog
---
perl-Encode.spec | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/perl-Encode.spec b/perl-Encode.spec
index f5471ca..e064322 100644
--- a/perl-Encode.spec
+++ b/perl-Encode.spec
@@ -171,10 +171,10 @@ make test
%{perl_vendorarch}/Encode/encode.h
%changelog
-* Fri Sep 16 2016 Petr Pisar <ppisar(a)redhat.com> - 3:2.84-6
+* Fri Sep 16 2016 Petr Pisar <ppisar(a)redhat.com> - 3:2.80-6
- Add Artistic 2.0 into license tag because of encguess tool
-* Tue Aug 02 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:2.84-5
+* Tue Aug 02 2016 Jitka Plesnikova <jplesnik(a)redhat.com> - 3:2.80-5
- Avoid loading optional modules from default . (CVE-2016-1238)
* Mon Jan 25 2016 Petr Pisar <ppisar(a)redhat.com> - 3:2.80-4
--
cgit v0.12
http://pkgs.fedoraproject.org/cgit/perl-Encode.git/commit/?h=f23&id=d3f55...
7 years, 8 months