From 25f1650bba6d8300c7a1fb076aff2779441a9ee9 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 10 2018 05:08:36 +0000 Subject: import perl-DateTime-TimeZone-1.70-1.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bceceda --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +SOURCES/DateTime-TimeZone-1.70.tar.gz +SOURCES/tzdata2017b.tar.gz diff --git a/.perl-DateTime-TimeZone.metadata b/.perl-DateTime-TimeZone.metadata new file mode 100644 index 0000000..f4dc566 --- /dev/null +++ b/.perl-DateTime-TimeZone.metadata @@ -0,0 +1,2 @@ +0f9b98d777f21e50cd123397a505539e7788342e SOURCES/DateTime-TimeZone-1.70.tar.gz +0f13bbb641f5742796609d3484006fe01fa654f1 SOURCES/tzdata2017b.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/DateTime-TimeZone-1.70-Adjust-tests-to-time-zone-data-2017b.patch b/SOURCES/DateTime-TimeZone-1.70-Adjust-tests-to-time-zone-data-2017b.patch new file mode 100644 index 0000000..dd76cd7 --- /dev/null +++ b/SOURCES/DateTime-TimeZone-1.70-Adjust-tests-to-time-zone-data-2017b.patch @@ -0,0 +1,54 @@ +From 4100d95d3af754ac17c8d04c5fb76c726c78c3ee Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 10 Jul 2017 17:47:47 +0200 +Subject: [PATCH] Adjust tests to time zone data 2017b + +Africa/Kinshasa renamed to Africa/Lagos in upstream 1.74. +Third Chille time zone America/Punta_Arenas added in upstream 2.10. +--- + t/04local.t | 6 +++--- + t/15catalog.t | 6 +++--- + 2 files changed, 6 insertions(+), 6 deletions(-) + +diff --git a/t/04local.t b/t/04local.t +index 4969f86..53ffabc 100644 +--- a/t/04local.t ++++ b/t/04local.t +@@ -73,12 +73,12 @@ local $ENV{TZ} = undef; + } + + { +- local $ENV{TZ} = 'Africa/Kinshasa'; ++ local $ENV{TZ} = 'Africa/Lagos'; + + my $tz = DateTime::TimeZone::Local::Unix->FromEnv(); + is( +- $tz->name(), 'Africa/Kinshasa', +- 'tz object name() is Africa::Kinshasa' ++ $tz->name(), 'Africa/Lagos', ++ 'tz object name() is Africa::Lagos' + ); + + local $ENV{TZ} = 0; +diff --git a/t/15catalog.t b/t/15catalog.t +index 2246253..0102898 100644 +--- a/t/15catalog.t ++++ b/t/15catalog.t +@@ -97,11 +97,11 @@ use DateTime::TimeZone; + + { + my @zones = DateTime::TimeZone->names_in_country('cl'); +- is( @zones, 2, 'two zones for Chile' ); ++ is( @zones, 3, 'two zones for Chile' ); + is_deeply( + [ sort @zones ], +- [ 'America/Santiago', 'Pacific/Easter' ], +- 'zones for Chile are America/Santiago and Pacific/Easter' ++ [ 'America/Punta_Arenas', 'America/Santiago', 'Pacific/Easter' ], ++ 'zones for Chile are America/Punta_Arenas, America/Santiago, and Pacific/Easter' + ); + } + +-- +1.8.3.1 + diff --git a/SOURCES/DateTime-TimeZone-1.70-Inject-DT-TZ-version-when-generating-modules.patch b/SOURCES/DateTime-TimeZone-1.70-Inject-DT-TZ-version-when-generating-modules.patch new file mode 100644 index 0000000..22becf7 --- /dev/null +++ b/SOURCES/DateTime-TimeZone-1.70-Inject-DT-TZ-version-when-generating-modules.patch @@ -0,0 +1,54 @@ +From 5650e9d07940825507e65ae71d30c4579ffea353 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 10 Jul 2017 15:12:17 +0200 +Subject: [PATCH] Inject DT::TZ version when generating modules + +This is implemented with new parse_olson --dtdzversion option. +--- + tools/parse_olson | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/tools/parse_olson b/tools/parse_olson +index c948de8..ff9c1f6 100755 +--- a/tools/parse_olson ++++ b/tools/parse_olson +@@ -32,6 +32,7 @@ GetOptions( + 'dir:s' => \$opts{dir}, + 'clean' => \$opts{clean}, + 'version:s' => \$opts{version}, ++ 'dttzversion:s' => \$opts{dttzversion}, + 'old' => \$opts{old}, + 'file:s' => \$opts{file}, + 'name:s' => \$opts{name}, +@@ -47,6 +48,8 @@ $opts{help} = 1 + + $opts{version} ||= 'test'; + ++$opts{dttversion} ||= '0'; ++ + if ( $opts{help} ) { + print <<'EOF'; + +@@ -65,6 +68,10 @@ It takes the following arguments: + --version The version of the Olson data files being used. + Required unless one of the debugging options is given. + ++ --dttzversion ++ The version of the DateTime-TimeZone distribution to inject into ++ each generated module as its version. Default is 0. ++ + --clean Remove old generated modules (which may not be valid with + the latest Olson database) + +@@ -208,7 +215,7 @@ $autogen_warning + # Do not edit this file directly. + # + $pkg_keyword DateTime::TimeZone::$mod_name; +- ++\$DateTime::TimeZone::${mod_name}::VERSION = '$opts{dttzversion}'; + use strict; + + use Class::Singleton 1.03; +-- +1.8.3.1 + diff --git a/SOURCES/DateTime-TimeZone-1.70-Recognize-short-zone-names-starting-with-a-sign.patch b/SOURCES/DateTime-TimeZone-1.70-Recognize-short-zone-names-starting-with-a-sign.patch new file mode 100644 index 0000000..f61b004 --- /dev/null +++ b/SOURCES/DateTime-TimeZone-1.70-Recognize-short-zone-names-starting-with-a-sign.patch @@ -0,0 +1,41 @@ +From cbca7770b9ead257b43f073b09abea3bd400ac0e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Tue, 11 Jul 2017 14:09:46 +0200 +Subject: [PATCH] Recognize short zone names starting with a sign + +Since tzdata 2017a, Africa/Accra uses GMT/+0020 short names and the conversion +script from DateTime-TimeZones-1.96 adds support for this syntax. +--- + lib/DateTime/TimeZone/OlsonDB/Change.pm | 2 +- + tools/tests_from_zdump | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/DateTime/TimeZone/OlsonDB/Change.pm b/lib/DateTime/TimeZone/OlsonDB/Change.pm +index 5bebbfa..b312f97 100644 +--- a/lib/DateTime/TimeZone/OlsonDB/Change.pm ++++ b/lib/DateTime/TimeZone/OlsonDB/Change.pm +@@ -43,7 +43,7 @@ sub new { + $p{is_dst} = 1 if $p{rule} && $p{rule}->offset_from_std; + $p{is_dst} = 1 if $p{observance}->offset_from_std; + +- if ( $p{short_name} =~ m{(\w+)/(\w+)} ) { ++ if ( $p{short_name} =~ m{([\-\+\w]+)/([\-\+\w]+)} ) { + $p{short_name} = $p{is_dst} ? $2 : $1; + } + +diff --git a/tools/tests_from_zdump b/tools/tests_from_zdump +index b013b7c..03465ee 100755 +--- a/tools/tests_from_zdump ++++ b/tools/tests_from_zdump +@@ -147,7 +147,7 @@ sub make_test_file { + \s+ + (\d\d\d\d) # local year + \s+ +- (\w+) # local short name ++ ([\-\+\w]+) # local short name + \s+ + isdst=(1|0) + \s+ +-- +1.8.3.1 + diff --git a/SOURCES/DateTime-TimeZone-1.70-Use-List-Util-max-directly-instead-of-List-AllUtils-.patch b/SOURCES/DateTime-TimeZone-1.70-Use-List-Util-max-directly-instead-of-List-AllUtils-.patch new file mode 100644 index 0000000..ded59ea --- /dev/null +++ b/SOURCES/DateTime-TimeZone-1.70-Use-List-Util-max-directly-instead-of-List-AllUtils-.patch @@ -0,0 +1,25 @@ +From 539066aad4edeb1cacc0ec9e0cc52caa8311a84c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= +Date: Mon, 10 Jul 2017 14:32:38 +0200 +Subject: [PATCH] Use List::Util::max directly instead of List::AllUtils::max + +--- + tools/parse_olson | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/parse_olson b/tools/parse_olson +index f9597ed..c948de8 100755 +--- a/tools/parse_olson ++++ b/tools/parse_olson +@@ -16,7 +16,7 @@ use File::Find::Rule; + use File::Path; + use File::Spec; + use Getopt::Long; +-use List::AllUtils qw( max ); ++use List::Util qw( max ); + use Locale::Country 3.11 qw( code2country ); + + $Data::Dumper::Indent = 1; +-- +1.8.3.1 + diff --git a/SPECS/perl-DateTime-TimeZone.spec b/SPECS/perl-DateTime-TimeZone.spec new file mode 100644 index 0000000..e9475f7 --- /dev/null +++ b/SPECS/perl-DateTime-TimeZone.spec @@ -0,0 +1,239 @@ +# Regenerate Perl library code from upstream Olson database of this date +%global tzversion 2017b + +Name: perl-DateTime-TimeZone +Version: 1.70 +Release: 1%{?dist} +Summary: Time zone object base class and factory +# tzdata%%{tzversion}.tar.gz archive: Public Domain +# other files: GPL+ or Artistic +License: (GPL+ or Artistic) and Public Domain +Group: Development/Libraries +URL: http://search.cpan.org/dist/DateTime-TimeZone/ +Source0: http://backpan.perl.org/authors/id/D/DR/DROLSKY/DateTime-TimeZone-%{version}.tar.gz +%if %{defined tzversion} +Source1: ftp://ftp.iana.org/tz/releases/tzdata%{tzversion}.tar.gz +%endif +# Do not use List::AllUtils in parse_olson tool, bug #1101251 +Patch0: DateTime-TimeZone-1.70-Use-List-Util-max-directly-instead-of-List-AllUtils-.patch +# Preserve DateTime-TimeZone version in regenerated modules, bug #1101251 +Patch1: DateTime-TimeZone-1.70-Inject-DT-TZ-version-when-generating-modules.patch +# Adjust tests to 2017b, bug #1101251, in upstream 2.10 +Patch2: DateTime-TimeZone-1.70-Adjust-tests-to-time-zone-data-2017b.patch +# Adjust conversion script to 2017b, bug #1101251, in upstream 1.96 +Patch3: DateTime-TimeZone-1.70-Recognize-short-zone-names-starting-with-a-sign.patch +BuildArch: noarch +BuildRequires: findutils +BuildRequires: make +BuildRequires: perl +BuildRequires: perl(ExtUtils::MakeMaker) >= 6.30 +BuildRequires: perl(strict) +BuildRequires: perl(warnings) +%if !%{defined perl_bootstrap} && %{defined tzversion} +# avoid circular dependencies - DateTime strictly requires DateTime::TimeZone +BuildRequires: perl(Data::Dumper) +BuildRequires: perl(DateTime) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Find::Rule) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec) +BuildRequires: perl(Getopt::Long) +BuildRequires: perl(integer) +BuildRequires: perl(lib) +BuildRequires: perl(List::Util) +BuildRequires: perl(Locale::Country) >= 3.11 +%endif +# Run-time: +BuildRequires: perl(Class::Load) +BuildRequires: perl(Class::Singleton) >= 1.03 +BuildRequires: perl(constant) +BuildRequires: perl(Cwd) >= 3 +%if 0%{?perl_bootstrap} +# avoid circular dependencies - DateTime strictly requires DateTime::TimeZone +%global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\((DateTime|DateTime::Duration)\\) +# perl-DateTime-TimeZone used to be bundled with perl-DateTime +# when bootstrapping, we can't require the unbundled version, so +# need to conflict with the old package +Conflicts: perl-DateTime <= 1:0.7000-3.fc16 +%else +# explicitly require the unbundled perl-DateTime to avoid implicit conflicts +Requires: perl-DateTime >= 2:0.70-1 +# and BR perl(DateTime) to enable testing +BuildRequires: perl(DateTime) +BuildRequires: perl(DateTime::Duration) +%endif +BuildRequires: perl(File::Basename) +BuildRequires: perl(File::Compare) +BuildRequires: perl(File::Find) +BuildRequires: perl(File::Spec) +BuildRequires: perl(List::Util) +BuildRequires: perl(Params::Validate) >= 0.72 +BuildRequires: perl(parent) +BuildRequires: perl(vars) +# Win32::TieRegistry not used +# Tests: +BuildRequires: perl(base) +BuildRequires: perl(File::Copy) +BuildRequires: perl(File::Path) +BuildRequires: perl(File::Spec::Functions) +BuildRequires: perl(File::Temp) +BuildRequires: perl(lib) +BuildRequires: perl(overload) +BuildRequires: perl(Storable) +BuildRequires: perl(Sys::Hostname) +BuildRequires: perl(Test::Fatal) +BuildRequires: perl(Test::More) >= 0.88 +BuildRequires: perl(Test::Output) +BuildRequires: perl(Test::Requires) +BuildRequires: perl(Test::Taint) +# not automatically detected +Requires: perl(File::Compare) +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) + +# Remove non-Linux unused dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\(Win32 + +# Remove under-specified dependencies +%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^perl\\((Params::Validate|Class::Singleton)\\)$ + +%description +This class is the base class for all time zone objects. A time zone is +represented internally as a set of observances, each of which describes the +offset from GMT for a given time period. + +%prep +%if !%{defined perl_bootstrap} && %{defined tzversion} +%setup -q -T -a 1 -c -n tzdata-%{tzversion} +%endif +%setup -q -T -b 0 -n DateTime-TimeZone-%{version} +%patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 + +%build +%if !%{defined perl_bootstrap} && %{defined tzversion} +perl tools/parse_olson --dir ../tzdata-%{tzversion} --version %{tzversion} \ + --dttzversion %{version} --clean +%endif +%{__perl} Makefile.PL INSTALLDIRS=vendor +make %{?_smp_mflags} + +%install +make pure_install DESTDIR=%{buildroot} +find %{buildroot} -type f -name .packlist -delete +%{_fixperms} %{buildroot}/* + +%check +make test + +%files +%doc Changes LICENSE README +%{perl_vendorlib}/* +%{_mandir}/man3/* + +%changelog +* Mon Jul 10 2017 Petr Pisar - 1.70-1 +- 1.70 bump (bug #1101251) +- Regenerate Perl code from timezone sources (bug #1101251) +- Update time zone data to Olson 2017b (bug #1101251) + +* Thu Oct 06 2016 Petr Pisar - 1.64-1 +- 1.64 bump (bug #1241818) + +* Fri Dec 27 2013 Daniel Mach - 1.63-2 +- Mass rebuild 2013-12-27 + +* Tue Oct 29 2013 Petr Pisar - 1.63-1 +- update to latest upstream version - Olson 2013h (bug #1024234) + +* Sat Aug 10 2013 Iain Arnell 1.60-1 +- update to latest upstream version - Olson 2013d + +* Wed Jun 26 2013 Jitka Plesnikova - 1.59-2 +- Specify all dependencies + +* Mon Apr 22 2013 Iain Arnell 1.59-1 +- update to latest upstream version - Olson 2013c + +* Wed Mar 20 2013 Iain Arnell 1.58-1 +- update to latest upstream version - Olson 2013b + +* Sun Mar 03 2013 Iain Arnell 1.57-1 +- update to latest upstream version - Olson 2013a + +* Thu Feb 14 2013 Fedora Release Engineering - 1.56-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Dec 03 2012 Iain Arnell 1.56-1 +- update to latest upstream version - still Olson 2012j + +* Thu Nov 15 2012 Marcela Mašláňová - 1.54-2 +- add BR, filter duplicated requires + +* Tue Nov 13 2012 Petr Pisar - 1.54-1 +- update to latest upstream version - Olson 2012j + +* Fri Nov 02 2012 Iain Arnell 1.52-1 +- update to latest upstream version - Olson 2012h + +* Thu Oct 18 2012 Petr Pisar - 1.51-1 +- update to latest upstream version - Olson 2012g + +* Sat Sep 15 2012 Iain Arnell 1.49-1 +- update to latest upstream version - Olson 2012f + +* Fri Aug 03 2012 Iain Arnell 1.48-1 +- update to latest upstream version - Olson 2012e + +* Sat Jul 21 2012 Iain Arnell 1.47-1 +- update to latest upstream version - Olson 2012d + +* Fri Jul 20 2012 Fedora Release Engineering - 1.46-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jul 10 2012 Petr Pisar - 1.46-3 +- Perl 5.16 re-rebuild of bootstrapped packages + +* Wed Jun 20 2012 Petr Pisar - 1.46-2 +- Perl 5.16 rebuild + +* Tue Apr 03 2012 Iain Arnell 1.46-1 +- update to latest upstream - Olson 2012c + +* Sun Mar 04 2012 Iain Arnell 1.45-1 +- update to latest upstream version + +* Fri Mar 02 2012 Iain Arnell 1.44-1 +- update to latest upstream version - Olson 2012b + +* Fri Jan 13 2012 Fedora Release Engineering - 1.42-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Nov 09 2011 Iain Arnell 1.42-1 +- update to latest upstream - Olson 2011n + +* Tue Oct 25 2011 Iain Arnell 1.41-1 +- update to latest upstream - Olson 2011m + +* Tue Oct 11 2011 Iain Arnell 1.40-1 +- update to latest upstream - Olson 2011l + +* Tue Sep 27 2011 Iain Arnell 1.39-1 +- update to latest upstream - Olson 2011k + +* Wed Sep 14 2011 Iain Arnell 1.37-1 +- update to latest upstream - Olson 2011j + +* Tue Aug 30 2011 Iain Arnell 1.36-1 +- update to latest upstream - Olson 2011i + +* Thu Aug 18 2011 Iain Arnell 1.35-3 +- rebuild against unbunled perl-DateTime + +* Mon Aug 15 2011 Iain Arnell 1.35-2 +- additional explicit (build)requires for core modules + +* Mon Aug 15 2011 Iain Arnell 1.35-1 +- Specfile autogenerated by cpanspec 1.78. +- Add bootstrapping logic