Source: tzdata Severity: wishlist Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
Hi Aurelien, following up on our short discussion at FOSDEM, I've now looked into the possibility to build the libdatetime-timezone-perl binary package from the tzdata source package. The idea (I hope that matches your memories :)) was to create a new binary package (I've named it libdatetime-timezone-perl-tools) that contains the script to build the perl modules from the Olson DB data, and use this package/script in tzdata to build the libdatetime-timezone-perl package from there. Unfortunately this doesn't work this way because libdatetime-timezone-perl doesn't contain just the generated-from-Olson-DB perl modules but also some generic ones (esp. DateTime/TimeZone.pm itself). So my next idea was to split the generated modules out into a new libdatetime-timezone-perl-data package, and to build this one from tzdata with the help of libdatetime-timezone-perl-tools. That means, from a procedural POV: 1) add new libdatetime-timezone-perl-tools and libdatetime-timezone-perl-data binary packages to the libdatetime-timezone-perl source package, wait for them to pass the NEW queue 2) update tzdata to create libdatetime-timezone-perl-data with the help of libdatetime-timezone-perl-tools 3) drop the libdatetime-timezone-perl-data binary package from the libdatetime-timezone-perl source package again I'm attaching two debdiffs that show a preliminary implementation for this idea; any comments from tzdata and perl people highly welcome! I'm not sure if this all makes sense or is just ... a mess. Some remarks/obversations: - - libdatetime-timezone-perl has an epoch (current version 1:42-1+2011n), so tzdata will probably need to add an epoch too to get a higher version for libdatetime-timezone-perl-data. Ugly. Other options? - - We have a circular dependency when building libdatetime-timezone-perl-data: libdatetime-timezone-perl-tools (i.e. the parse_olson script there) needs libdatetime-timezone-perl which now depends on libdatetime-timezone-perl-data. Shouldn't hurt in pratice but still ... Other options? - - Building the timezone perl modules takes ages, at least on my old machine. - - Maybe we need some more versioned dependencies? Cheers, gregor -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAEBCAAGBQJPQA/KAAoJELs6aAGGSaoG+PwP/3cgH2eN/57hK6wR4E5UdyUt 85qlMF4LwSd8f1bnr9FuT6jsRQlZ4JylVMr9Ddut8LdoP51aOIU0q39CAkht2sUa T0wcSWgADQTpEg+KJfNvrnbtPcsnqfBQvLGUKNduJKkJqM0uBZz+JRxEOMmGOA30 8HlKYPqaq41FU6bfSu2woI1Tmc8pIgaZ7Pxrusnmy5fWevn1HAP7zeZX+q+DA174 mWE0W0Wso8QKbFM+ZFhNpfp8d4Uu0gTdijFyFWJxJGKTdg4b3ApCO4uvBvn9H1lH Km0rc926cVXv81d45y4CvB3MUt1nbh/G0XLNxz6BCzoMUNv2llrjJ7EMvQH1UWeX mB/zj3Z4VlwC2sOg35/DvU3WXcWRc3xQQnNOO0DrtcMr3GpNxUYVw224ChfHS8ls HuaLzFilXWsNH37Rbdw2ETiPL3AzjKCUwiLZ+UBboQnjyI89wYBpsQKNy8TAh5De IL0A6VjTw1n6HpbRFlEIcd/2IXNatJe72WguFdX99jcRvxCd3kyph2f3agbvwUls gGNEgP6fYIheJXb66FrXnnbOtOQ8QWh1g0JUBZciM8tfJ65gZxMU7YMdv3UeMMrq qieuXFoRPDQQAZbPv0GdBk+nFiHrKd6isJLthitPQH9h4WjIZwwjq11EtXvA8P/I VZULv/H+I5CBwDqOAiGt =I8wm -----END PGP SIGNATURE-----
diff -Nru tzdata-2011n/debian/changelog tzdata-2011n/debian/changelog --- tzdata-2011n/debian/changelog 2011-12-29 13:01:04.000000000 +0100 +++ tzdata-2011n/debian/changelog 2012-02-18 17:25:12.000000000 +0100 @@ -1,3 +1,9 @@ +tzdata (2011n-3) UNRELEASED; urgency=low + + * Build libdatetime-timezone-perl binary package. + + -- gregor herrmann <gre...@debian.org> Sat, 18 Feb 2012 17:24:49 +0100 + tzdata (2011n-2) unstable; urgency=low [ Debconf translations ] diff -Nru tzdata-2011n/debian/control tzdata-2011n/debian/control --- tzdata-2011n/debian/control 2011-08-22 22:23:22.000000000 +0200 +++ tzdata-2011n/debian/control 2012-02-18 21:15:40.000000000 +0100 @@ -2,7 +2,7 @@ Section: libs Priority: required Build-Depends: debhelper (>= 5.0.0) -Build-Depends-Indep: po-debconf, openjdk-6-jre-headless, fdupes +Build-Depends-Indep: po-debconf, openjdk-6-jre-headless, fdupes, libdatetime-timezone-perl-tools, perl Maintainer: GNU Libc Maintainers <debian-glibc@lists.debian.org> Uploaders: Clint Adams <cl...@debian.org>, Aurelien Jarno <aure...@debian.org> Standards-Version: 3.9.2 @@ -34,3 +34,23 @@ daylight-saving rules. . This package contains the data for use by Java runtimes. + +Package: libdatetime-timezone-perl-data +Architecture: all +Section: perl +Priority: optional +Multi-Arch: foreign +Depends: ${misc:Depends}, ${perl:Depends}, + libclass-load-perl, + libclass-singleton-perl, + libparams-validate-perl, + perl (>= 5.10.1) | libparent-perl +Description: framework exposing the Olson time zone database to Perl + DateTime::TimeZone is a Perl module framework providing an interface to the + Olson time zone database. It exposes the database as a set of modules, one + for each time zone defined, allowing for various optimizations in doing time + zone calculations. + . + The Olson time zone database is the best available source for worldwide time + zone information and is available from <URL:ftp://ftp.iana.org/tz/releases/>. + diff -Nru tzdata-2011n/debian/libdatetime-timezone-perl-data.install tzdata-2011n/debian/libdatetime-timezone-perl-data.install --- tzdata-2011n/debian/libdatetime-timezone-perl-data.install 1970-01-01 01:00:00.000000000 +0100 +++ tzdata-2011n/debian/libdatetime-timezone-perl-data.install 2012-02-18 18:30:58.000000000 +0100 @@ -0,0 +1 @@ +debian/tmp/usr diff -Nru tzdata-2011n/debian/libdatetime-timezone-perl-data.lintian-overrides tzdata-2011n/debian/libdatetime-timezone-perl-data.lintian-overrides --- tzdata-2011n/debian/libdatetime-timezone-perl-data.lintian-overrides 1970-01-01 01:00:00.000000000 +0100 +++ tzdata-2011n/debian/libdatetime-timezone-perl-data.lintian-overrides 2012-02-18 21:30:02.000000000 +0100 @@ -0,0 +1,2 @@ +# "Viet Nam" shouldn't be "Viet Name" +libdatetime-timezone-perl-data: spelling-error-in-manpage usr/share/man/man3/DateTime::TimeZone::Catalog.3pm.gz Nam Name diff -Nru tzdata-2011n/debian/rules tzdata-2011n/debian/rules --- tzdata-2011n/debian/rules 2011-09-04 17:01:53.000000000 +0200 +++ tzdata-2011n/debian/rules 2012-02-18 21:31:00.000000000 +0100 @@ -8,6 +8,7 @@ TZGEN := $(CURDIR)/tzgen TZGEN_JAVA := $(CURDIR)/tzgen-java +TZGEN_PERL := $(CURDIR)/tzgen-perl VERSION := $(shell dpkg-parsechangelog | sed -e '/^Version/!d;s/^Version: //g;s/.*://g;s/-.*//g') EMDEBIAN := $(shell dpkg-parsechangelog | egrep '^Version: .*em[0-9]+') @@ -51,11 +52,21 @@ US \ Etc +configure: configure-stamp +configure-stamp: + dh_testdir + mkdir -p $(TZGEN_PERL) + ( cd $(TZGEN_PERL) ; \ + perl /usr/share/libdatetime-timezone-perl-tools/parse_olson --dir ../ --version $(VERSION) ; \ + cp /usr/share/libdatetime-timezone-perl-tools/Makefile.PL . ; \ + PERL_MM_USE_DEFAULT=1 PERL_AUTOINSTALL="--skipdeps" perl Makefile.PL INSTALLDIRS=vendor ) + touch $@ + build: build-arch build-indep build-arch: build-indep: build-indep-stamp -build-indep-stamp: +build-indep-stamp: configure-stamp dh_testdir # Build the "default" version @@ -91,6 +102,9 @@ # Generate a java version $(JHOME)/bin/java -jar $(JHOME)/jre/lib/javazic.jar -V $(VERSION) -d $(TZGEN_JAVA) $(TIMEZONES) $(TIMEZONES_JAVA) + # Generate the perl version + ( cd $(TZGEN_PERL) ; $(MAKE) ) + # Generate the templates file ( echo "Template: tzdata/Areas" ; \ echo "Type: select" ; \ @@ -130,7 +144,7 @@ clean: dh_testdir dh_testroot - -rm -rf $(TZGEN) $(TZGEN_JAVA) + -rm -rf $(TZGEN) $(TZGEN_JAVA) $(TZGEN_PERL) rm -f build-indep-stamp rm -f patch-log dh_clean @@ -139,7 +153,14 @@ dh_testdir dh_testroot dh_clean -k - # Do nothing + + # Install perl package + ( cd $(TZGEN_PERL) ; $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp PREFIX=/usr ) + install -m 755 -d $(CURDIR)/debian/libdatetime-timezone-perl-data/usr/share/lintian/overrides + install -m 644 $(CURDIR)/debian/libdatetime-timezone-perl-data.lintian-overrides \ + $(CURDIR)/debian/libdatetime-timezone-perl-data/usr/share/lintian/overrides/libdatetime-timezone-perl-data + + # Do nothing for other packages # Build architecture-dependent files here. binary-arch: build install @@ -153,6 +174,7 @@ dh_installdirs dh_install dh_installchangelogs + dh_perl dh_link dh_installdocs dh_compress
diff -Nru libdatetime-timezone-perl-1.42/debian/changelog libdatetime-timezone-perl-1.42/debian/changelog --- libdatetime-timezone-perl-1.42/debian/changelog 2011-11-10 20:27:19.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/changelog 2012-02-18 21:15:03.000000000 +0100 @@ -1,3 +1,10 @@ +libdatetime-timezone-perl (1:1.42-2+2011n) UNRELEASED; urgency=low + + * Create libdatetime-timezone-perl-tools and + libdatetime-timezone-perl-tools-data packages. + + -- gregor herrmann <gre...@debian.org> Sat, 18 Feb 2012 18:34:05 +0100 + libdatetime-timezone-perl (1:1.42-1+2011n) unstable; urgency=low * New upstream release, based on version 2011n of the Olson database. diff -Nru libdatetime-timezone-perl-1.42/debian/control libdatetime-timezone-perl-1.42/debian/control --- libdatetime-timezone-perl-1.42/debian/control 2011-11-10 20:27:19.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/control 2012-02-18 21:03:26.000000000 +0100 @@ -21,11 +21,13 @@ Package: libdatetime-timezone-perl Architecture: all +Pre-Depends: dpkg (>= 1.15.6) Depends: ${misc:Depends}, ${perl:Depends}, + libclass-load-perl, libclass-singleton-perl, + libdatetime-timezone-perl-data, libparams-validate-perl, perl (>= 5.10.1) | libparent-perl, - libclass-load-perl Description: framework exposing the Olson time zone database to Perl DateTime::TimeZone is a Perl module framework providing an interface to the Olson time zone database. It exposes the database as a set of modules, one @@ -34,3 +36,41 @@ . The Olson time zone database is the best available source for worldwide time zone information and is available from <URL:ftp://ftp.iana.org/tz/releases/>. + . + This package contains the main modules. + +Package: libdatetime-timezone-perl-tools +Architecture: all +Pre-Depends: dpkg (>= 1.15.6) +Depends: ${misc:Depends}, ${perl:Depends}, + libdatetime-perl, + libdatetime-timezone-perl, + libfile-find-rule-perl, +# Locale::Country 3.11 --> + perl (>= 5.13.1) +Description: tools for building the Perl module to the Olson time zone database + DateTime::TimeZone is a Perl module framework providing an interface to the + Olson time zone database. It exposes the database as a set of modules, one + for each time zone defined, allowing for various optimizations in doing time + zone calculations. + . + The Olson time zone database is the best available source for worldwide time + zone information and is available from <URL:ftp://ftp.iana.org/tz/releases/>. + +Package: libdatetime-timezone-perl-data +Architecture: all +Pre-Depends: dpkg (>= 1.15.6) +Depends: ${misc:Depends}, ${perl:Depends} +Breaks: libdatetime-timezone-perl (<< 1:1.42-2+2011n) +Replaces: libdatetime-timezone-perl (<< 1:1.42-2+2011n) +Description: Olson time zone database to Perl (data) + DateTime::TimeZone is a Perl module framework providing an interface to the + Olson time zone database. It exposes the database as a set of modules, one + for each time zone defined, allowing for various optimizations in doing time + zone calculations. + . + The Olson time zone database is the best available source for worldwide time + zone information and is available from <URL:ftp://ftp.iana.org/tz/releases/>. + . + This package contains the generated timezone modules. + diff -Nru libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.install libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.install --- libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.install 1970-01-01 01:00:00.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.install 2012-02-18 21:21:31.000000000 +0100 @@ -0,0 +1,23 @@ +debian/tmp/usr/share/man/man3/DateTime::TimeZone::Catalog.3pm + +debian/tmp/usr/share/perl5/DateTime/TimeZone/Africa/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/America/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/Antarctica/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/Asia/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/Atlantic/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/Australia/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/Europe/* +debian/tmp/usr/share/perl5/DateTime/TimeZone/Pacific/* + +debian/tmp/usr/share/perl5/DateTime/TimeZone/CET.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/CST6CDT.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/Catalog.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/EET.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/EST.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/EST5EDT.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/HST.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/MET.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/MST.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/MST7MDT.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/PST8PDT.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/WET.pm diff -Nru libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.lintian-overrides libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.lintian-overrides --- libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.lintian-overrides 1970-01-01 01:00:00.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-data.lintian-overrides 2012-02-18 21:30:17.000000000 +0100 @@ -0,0 +1,2 @@ +# "Viet Nam" shouldn't be "Viet Name" +libdatetime-timezone-perl-data: spelling-error-in-manpage usr/share/man/man3/DateTime::TimeZone::Catalog.3pm.gz Nam Name diff -Nru libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-tools.install libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-tools.install --- libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-tools.install 1970-01-01 01:00:00.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl-tools.install 2012-02-18 18:35:29.000000000 +0100 @@ -0,0 +1,2 @@ +tools/* usr/share/libdatetime-timezone-perl-tools/ +Makefile.PL usr/share/libdatetime-timezone-perl-tools/ diff -Nru libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.install libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.install --- libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.install 1970-01-01 01:00:00.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.install 2012-02-18 21:17:23.000000000 +0100 @@ -0,0 +1,22 @@ +debian/tmp/usr/share/man/man3/DateTime::TimeZone.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::Floating.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::Local.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::Local::Unix.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::Local::VMS.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::OffsetOnly.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::OlsonDB.3pm +debian/tmp/usr/share/man/man3/DateTime::TimeZone::UTC.3pm +debian/tmp/usr/share/perl5/DateTime/TimeZone.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/Floating.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/Local.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/Local/ +debian/tmp/usr/share/perl5/DateTime/TimeZone/Local/Unix.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/Local/VMS.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/OffsetOnly.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/OlsonDB.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/OlsonDB/ +debian/tmp/usr/share/perl5/DateTime/TimeZone/OlsonDB/Change.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/OlsonDB/Observance.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/OlsonDB/Rule.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/OlsonDB/Zone.pm +debian/tmp/usr/share/perl5/DateTime/TimeZone/UTC.pm diff -Nru libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.lintian-overrides libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.lintian-overrides --- libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.lintian-overrides 2011-11-10 20:27:19.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/libdatetime-timezone-perl.lintian-overrides 1970-01-01 01:00:00.000000000 +0100 @@ -1,2 +0,0 @@ -# "Viet Nam" shouldn't be "Viet Name" -libdatetime-timezone-perl: spelling-error-in-manpage usr/share/man/man3/DateTime::TimeZone::Catalog.3pm.gz Nam Name diff -Nru libdatetime-timezone-perl-1.42/debian/rules libdatetime-timezone-perl-1.42/debian/rules --- libdatetime-timezone-perl-1.42/debian/rules 2011-11-10 20:27:19.000000000 +0100 +++ libdatetime-timezone-perl-1.42/debian/rules 2012-02-18 18:35:29.000000000 +0100 @@ -1,7 +1,6 @@ #!/usr/bin/make -f -PKG := $(shell dh_listpackages) -TMP := $(CURDIR)/debian/$(PKG) +TMP := $(CURDIR)/debian/tmp %: dh $@