From 1b0b92e062bbe78625d88a9f52414a60686cd2a9 Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jples...@redhat.com>
Date: Mon, 18 Jul 2016 10:02:38 +0200
Subject: 2.01 bump (2016f Olson database)

---
 ...etc-localtime-by-DateTime-TimeZone-Tzfile.patch | 78 ----------------------
 ...etc-localtime-by-DateTime-TimeZone-Tzfile.patch | 78 ++++++++++++++++++++++
 perl-DateTime-TimeZone.spec                        |  7 +-
 sources                                            |  2 +-
 4 files changed, 84 insertions(+), 81 deletions(-)
 delete mode 100644 
DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
 create mode 100644 
DateTime-TimeZone-2.01-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch

diff --git 
a/DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch 
b/DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
deleted file mode 100644
index 92559b4..0000000
--- 
a/DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From fbf080cb5ca92f35a594967bdd3764c7dbb8c7f7 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
-Date: Mon, 1 Sep 2014 17:37:12 +0200
-Subject: [PATCH] Parse /etc/localtime by DateTime::TimeZone::Tzfile
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If there is valid /etc/localtime, then the system has configured local
-time. If the file is not a symlink to /usr/share/zoneinfo or a copy
-from there, then it's still a valid configuration. The only issue is
-one cannot know the time zone name (Unfortunately, the time zone
-abbreviations are ambiguous.)
-
-This patch implements this scenario and caused returning
- a DateTime::TimeZone::Tzfile object instead of dying with
-"Cannot determine local time zone" message.
-
-Signed-off-by: Petr Písař <ppi...@redhat.com>
----
- lib/DateTime/TimeZone/Local/Unix.pm | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/lib/DateTime/TimeZone/Local/Unix.pm 
b/lib/DateTime/TimeZone/Local/Unix.pm
-index ae26fae..c5d44fe 100644
---- a/lib/DateTime/TimeZone/Local/Unix.pm
-+++ b/lib/DateTime/TimeZone/Local/Unix.pm
-@@ -16,6 +16,7 @@ sub Methods {
-         FromEtcTIMEZONE
-         FromEtcSysconfigClock
-         FromEtcDefaultInit
-+        FromEtcLocaltimeContent
-     );
- }
- 
-@@ -237,6 +238,25 @@ sub _ReadEtcDefaultInit {
-     }
- }
- 
-+sub FromEtcLocaltimeContent {
-+    my $class = shift;
-+
-+    my $lt_file = $class->_EtcFile('localtime');
-+    return unless -r $lt_file && -s $lt_file && ! -l $lt_file;
-+
-+    my $tz;
-+    {
-+        local $@;
-+        local $SIG{__DIE__};
-+        $tz = eval {
-+            require DateTime::TimeZone::Tzfile;
-+            DateTime::TimeZone::Tzfile->new($lt_file);
-+        };
-+    }
-+
-+    return $tz if $tz;
-+}
-+
- 1;
- 
- # ABSTRACT: Determine the local system's time zone on Unix
-@@ -311,6 +331,13 @@ a time zone name.
- If this file exists, it is opened and we look for a line starting like
- "TZ=...". If this is found, it should indicate a time zone name.
- 
-+=item * F</etc/localtime> content
-+
-+If this file is not a symlink, it's parsed by
-+a L<DateTime::TimeZone::Tzfile> to retrieve the time zone offset
-+definition. No time zone name will be defined. This is usefull if the
-+file does not present in the system time zone database.
-+
- =back
- 
- =head1 SUPPORT
--- 
-1.9.3
-
diff --git 
a/DateTime-TimeZone-2.01-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch 
b/DateTime-TimeZone-2.01-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
new file mode 100644
index 0000000..2cf0e21
--- /dev/null
+++ 
b/DateTime-TimeZone-2.01-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
@@ -0,0 +1,78 @@
+From fbf080cb5ca92f35a594967bdd3764c7dbb8c7f7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppi...@redhat.com>
+Date: Mon, 1 Sep 2014 17:37:12 +0200
+Subject: [PATCH] Parse /etc/localtime by DateTime::TimeZone::Tzfile
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If there is valid /etc/localtime, then the system has configured local
+time. If the file is not a symlink to /usr/share/zoneinfo or a copy
+from there, then it's still a valid configuration. The only issue is
+one cannot know the time zone name (Unfortunately, the time zone
+abbreviations are ambiguous.)
+
+This patch implements this scenario and caused returning
+ a DateTime::TimeZone::Tzfile object instead of dying with
+"Cannot determine local time zone" message.
+
+Signed-off-by: Petr Písař <ppi...@redhat.com>
+---
+ lib/DateTime/TimeZone/Local/Unix.pm | 27 +++++++++++++++++++++++++++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/lib/DateTime/TimeZone/Local/Unix.pm 
b/lib/DateTime/TimeZone/Local/Unix.pm
+index ae26fae..c5d44fe 100644
+--- a/lib/DateTime/TimeZone/Local/Unix.pm
++++ b/lib/DateTime/TimeZone/Local/Unix.pm
+@@ -16,6 +16,7 @@ sub Methods {
+         FromEtcTIMEZONE
+         FromEtcSysconfigClock
+         FromEtcDefaultInit
++        FromEtcLocaltimeContent
+     );
+ }
+ 
+@@ -255,6 +256,25 @@ sub _ReadEtcDefaultInit {
+     close $fh or die $!;
+ }
+ 
++sub FromEtcLocaltimeContent {
++    my $class = shift;
++
++    my $lt_file = $class->_EtcFile('localtime');
++    return unless -r $lt_file && -s $lt_file && ! -l $lt_file;
++
++    my $tz;
++    {
++        local $@;
++        local $SIG{__DIE__};
++        $tz = eval {
++            require DateTime::TimeZone::Tzfile;
++            DateTime::TimeZone::Tzfile->new($lt_file);
++        };
++    }
++
++    return $tz if $tz;
++}
++
+ 1;
+ 
+ # ABSTRACT: Determine the local system's time zone on Unix
+@@ -329,6 +349,13 @@ a time zone name.
+ If this file exists, it is opened and we look for a line starting like
+ "TZ=...". If this is found, it should indicate a time zone name.
+ 
++=item * F</etc/localtime> content
++
++If this file is not a symlink, it's parsed by
++a L<DateTime::TimeZone::Tzfile> to retrieve the time zone offset
++definition. No time zone name will be defined. This is usefull if the
++file does not present in the system time zone database.
++
+ =back
+ 
+ =head1 SUPPORT
+-- 
+1.9.3
+
diff --git a/perl-DateTime-TimeZone.spec b/perl-DateTime-TimeZone.spec
index ed07d12..249f141 100644
--- a/perl-DateTime-TimeZone.spec
+++ b/perl-DateTime-TimeZone.spec
@@ -1,5 +1,5 @@
 Name:           perl-DateTime-TimeZone
-Version:        2.00
+Version:        2.01
 Release:        1%{?dist}
 Summary:        Time zone object base class and factory
 License:        GPL+ or Artistic
@@ -8,7 +8,7 @@ URL:            http://search.cpan.org/dist/DateTime-TimeZone/
 Source0:        
http://www.cpan.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-%{version}.tar.gz
 # Parse local time zone definition from /etc/localtime as before giving up,
 # bug #1135981, CPAN RT#55029
-Patch0:         
DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
+Patch0:         
DateTime-TimeZone-2.01-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
 BuildArch:      noarch
 # Build
 BuildRequires:  make
@@ -94,6 +94,9 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Mon Jul 18 2016 Jitka Plesnikova <jples...@redhat.com> - 2.01-1
+- 2.01 bump (2016f Olson database)
+
 * Thu Jun 09 2016 Jitka Plesnikova <jples...@redhat.com> - 2.00-1
 - 2.00 bump
 
diff --git a/sources b/sources
index 8a0ece4..fab23e4 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-4ba295a0fe2f47cf269b7a2e8c6cce04  DateTime-TimeZone-2.00.tar.gz
+a9f8a8f3aedef2879b68b773b7e0fa5b  DateTime-TimeZone-2.01.tar.gz
-- 
cgit v0.12


        
http://pkgs.fedoraproject.org/cgit/perl-DateTime-TimeZone.git/commit/?h=master&id=1b0b92e062bbe78625d88a9f52414a60686cd2a9
--
Fedora Extras Perl SIG
http://www.fedoraproject.org/wiki/Extras/SIGs/Perl
perl-devel mailing list
perl-devel@lists.fedoraproject.org
https://lists.fedoraproject.org/admin/lists/perl-devel@lists.fedoraproject.org

Reply via email to