From ab15bed9d77e90cb2f8adcfc8b55871ca44fbf6d Mon Sep 17 00:00:00 2001
From: Jitka Plesnikova <jples...@redhat.com>
Date: Thu, 24 Mar 2016 15:05:13 +0100
Subject: 1.97 bump

---
 ...etc-localtime-by-DateTime-TimeZone-Tzfile.patch | 78 ----------------------
 ...etc-localtime-by-DateTime-TimeZone-Tzfile.patch | 78 ++++++++++++++++++++++
 perl-DateTime-TimeZone.spec                        |  9 ++-
 sources                                            |  2 +-
 4 files changed, 85 insertions(+), 82 deletions(-)
 delete mode 100644 
DateTime-TimeZone-1.83-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
 create mode 100644 
DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch

diff --git 
a/DateTime-TimeZone-1.83-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch 
b/DateTime-TimeZone-1.83-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
deleted file mode 100644
index 56cd6b0..0000000
--- 
a/DateTime-TimeZone-1.83-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
-@@ -309,6 +329,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 AUTHOR
--- 
-1.9.3
-
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
new file mode 100644
index 0000000..92559b4
--- /dev/null
+++ 
b/DateTime-TimeZone-1.97-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
+     );
+ }
+ 
+@@ -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/perl-DateTime-TimeZone.spec b/perl-DateTime-TimeZone.spec
index 5fad3f6..4ac5ceb 100644
--- a/perl-DateTime-TimeZone.spec
+++ b/perl-DateTime-TimeZone.spec
@@ -1,5 +1,5 @@
 Name:           perl-DateTime-TimeZone
-Version:        1.96
+Version:        1.97
 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.83-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
+Patch0:         
DateTime-TimeZone-1.97-Parse-etc-localtime-by-DateTime-TimeZone-Tzfile.patch
 BuildArch:      noarch
 # Build
 BuildRequires:  make
@@ -92,8 +92,11 @@ make test
 %{_mandir}/man3/*
 
 %changelog
+* Thu Mar 24 2016 Jitka Plesnikova <jples...@redhat.com> - 1.97-1
+- 1.97 bump (2016c Olson database)
+
 * Wed Mar 16 2016 Jitka Plesnikova <jples...@redhat.com> - 1.96-1
-- 1.96 bump
+- 1.96 bump (2016b Olson database)
 
 * Thu Jan 28 2016 Petr Šabata <con...@redhat.com> - 1.95-1
 - 1.95 bump (2016a Olson database)
diff --git a/sources b/sources
index f199de8..ffa05de 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-033984289cd38f373b1ad8b0c3fadb3d  DateTime-TimeZone-1.96.tar.gz
+51dacb4bcc21d4d603ab08e50a5aeb7a  DateTime-TimeZone-1.97.tar.gz
-- 
cgit v0.12


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

Reply via email to