[PROPOSED PATCH 1/3] Call the new tarball experimental
* Makefile (tzdata$(VERSION).tar.gz): Omit $(TZS). * NEWS: Call the new format experimental, and say it has to2050.tzs. Do not imply a time limit for the old format. * README, tz-link.htm: Bring back traditional two-tarball recipe. * tz-how-to.html: Defer to tz-link.htm for tarball link. * tz-link.htm: Update some URLs. --- Makefile | 2 +- NEWS | 33 ++++++++++++++++----------------- README | 11 +++++++++++ tz-how-to.html | 3 +-- tz-link.htm | 52 ++++++++++++++++++++++++++++------------------------ 5 files changed, 57 insertions(+), 44 deletions(-) diff --git a/Makefile b/Makefile index 90363e9..31a2ec5 100644 --- a/Makefile +++ b/Makefile @@ -683,7 +683,7 @@ tzcode$(VERSION).tar.gz: set-timestamps.out tzdata$(VERSION).tar.gz: set-timestamps.out LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) $(TZS) | \ + tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) | \ gzip $(GZIPFLAGS) > $@ tzdb-$(VERSION).tar.lz: set-timestamps.out diff --git a/NEWS b/NEWS index e61a992..6cbdbd7 100644 --- a/NEWS +++ b/NEWS @@ -63,20 +63,18 @@ Unreleased, experimental changes Changes to build procedure - The tz distribution has a new file to2050.tzs that contains what - should be the output of 'zdump -i -c 2050' on primary zones. - 'make check' now checks that zdump generates this output. - - A new distribution format is available in the tarball - tzdb-VERSION.tar.lz and the signature tzdb-VERSION.tar.lz.asc. - The new tarball has the contents of tzcodeVERSION.tar.gz and - tzdataVERSION.tar.gz, in a single top-level directory 'tzdb' with - all other files under this directory, as is typical for software - distributions. The new format is intended to replace the old - tarball pair. The old format will continue to be distributed for - a while. The new format uses lzip compression, which is smaller - than gzip; see <http://www.nongnu.org/lzip/lzip.html>. - (Thanks to Antonio Diaz Diaz and Oscar van Vlijmen for comments.) + An experimental distribution format is available in the tarball + tzdb-VERSION.tar.lz with signature file tzdb-VERSION.tar.lz.asc. + It unpacks to a top-level directory containing the code and data + of the traditional two-tarball format, along with extra data that + may be useful. The traditional format will continue to be + distributed. (Thanks to Antonio Diaz Diaz, Oscar van Vlijmen, and + many others for comments about the experimental format.) + + The experimental distribution contains a file to2050.tzs that + contains what should be the output of 'zdump -i -c 2050' on + primary zones. If this file is available, 'make check' now checks + that zdump generates this output. 'make check_web' now works on Fedora-like distributions. @@ -3613,14 +3611,15 @@ This file contains copies of the part of each release announcement that talks about the changes in that release. The text has been adapted and reformatted for the purposes of this file. -Typically a release R consists of a pair of tarball files, +Traditionally a release R consists of a pair of tarball files, tzcodeR.tar.gz and tzdataR.tar.gz. However, some releases (e.g., code2010a, data2012c) consist of just one or the other tarball, and a few (e.g., code2012c-data2012d) have tarballs with mixed version -numbers. +numbers. Recent releases also come in an experimental format +consisting of a single tarball tzdb-R.tar.lz with extra data. Release time stamps are taken from the release's commit (for newer, -git releases), from the newest file in the tarball (for older +Git-based releases), from the newest file in the tarball (for older releases, where this info is available) or from the email announcing the release (if all else fails; these are marked with a time zone of -0000 and an "is missing!" comment). diff --git a/README b/README index ba0b790..8a09aa2 100644 --- a/README +++ b/README @@ -13,6 +13,17 @@ and daylight-saving rules. Here is a recipe for acquiring, building, installing, and testing the tz distribution on a GNU/Linux or similar host. +To acquire the distribution, run the following shell commands: + + mkdir tz + cd tz + wget --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-latest.tar.gz' + gzip -dc tzcode-latest.tar.gz | tar -xf - + gzip -dc tzdata-latest.tar.gz | tar -xf - + +Alternatively, the following shell commands acquire the same +distribution, with extra data useful for regression testing: + wget --retr-symlinks 'ftp://ftp.iana.org/tz/tzdb-latest.tar.lz' lzip -dc tzdb-latest.tar.lz | tar -xf - diff --git a/tz-how-to.html b/tz-how-to.html index 7d9d521..a94759e 100644 --- a/tz-how-to.html +++ b/tz-how-to.html @@ -12,8 +12,7 @@ Database</a> Source Files</h2> times of day from the <a href="tz-link.htm">tz database</a> source files. It might be helpful, but not absolutely necessary, for the reader to have already downloaded the -<a href="http://www.iana.org/time-zones/repository/tzdb-latest.tar.lz">latest -release of the database</a> and become familiar with the basic layout +latest release of the database and become familiar with the basic layout of the data files. The format is explained in the “man page” for the zic compiler, <code>zic.8.txt</code>, in the <code>code</code> subdirectory.</p> diff --git a/tz-link.htm b/tz-link.htm index 8b05470..52bb492 100644 --- a/tz-link.htm +++ b/tz-link.htm @@ -10,7 +10,7 @@ content="Sources for time zone and daylight saving time data"> <meta name="DC.Creator" content="Eggert, Paul"> <meta name="DC.Contributor" content="Olson, Arthur David"> -<meta name="DC.Date" content="2016-08-30"> +<meta name="DC.Date" content="2016-09-05"> <meta name="DC.Description" content="Sources of information about time zones and daylight saving time"> <meta name="DC.Identifier" @@ -42,7 +42,7 @@ This database (often called <code>zoneinfo</code> or <code><abbr>tz</abbr></code>) is used by several implementations, including -<a href="http://www.gnu.org/software/libc/">the +<a href="https://www.gnu.org/software/libc/">the <abbr title="GNU's Not Unix">GNU</abbr> C Library</a> (used in <a href="https://en.wikipedia.org/wiki/Linux"><abbr>GNU</abbr>/Linux</a>), @@ -108,33 +108,35 @@ for Eastern Standard Time in the <abbr>US</abbr>.</p> <p> The following <a href="https://en.wikipedia.org/wiki/Unix_shell">shell</a> commands download -the latest release to a <abbr>GNU</abbr>/Linux or similar host; -see the downloaded -<code>README</code> file for what to do next.</p> -<pre style="margin-left: 2em"><code><a href="http://www.gnu.org/software/wget/">wget</a> --retr-symlinks 'ftp://ftp.iana.org/tz/tzdb-latest.tar.lz' -<a href="http://www.nongnu.org/lzip/">lzip</a> -dc tzdb-latest.tar.lz | <a href="http://www.gnu.org/software/tar/">tar</a> -xf - +the latest release's two +<a href="https://en.wikipedia.org/wiki/Tar_(computing)">tarballs</a> +to a <abbr>GNU</abbr>/Linux or similar host.</p> +<pre style="margin-left: 2em"><code>mkdir tzdb +cd tzdb +<a href="https://www.gnu.org/software/wget/">wget</a> --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-latest.tar.gz' +<a href="https://www.gnu.org/software/gzip/">gzip</a> -dc tzcode-latest.tar.gz | <a href="https://www.gnu.org/software/tar/">tar</a> -xf - +gzip -dc tzdata-latest.tar.gz | tar -xf - </code></pre> -<p>This uses a convenience link to the -<a href="ftp://ftp.iana.org/tz/tzdb-latest.tar.lz">latest version</a> -archived in the +<p>Alternatively, the following shell commands download the same +release in a single-tarball format containing extra data +useful for regression testing:</p> +<pre style="margin-left: 2em"><code>wget --retr-symlinks 'ftp://ftp.iana.org/tz/tzdb-latest.tar.lz' +<a href="http://www.nongnu.org/lzip/">lzip</a> -dc tzdb-latest.tar.lz | tar -xf - +</code></pre> +<p>These commands use convenience links to the latest of the <a href="ftp://ftp.iana.org/tz/releases/"><abbr title="File Transfer Protocol">FTP</abbr> releases</a> of the <code><abbr>tz</abbr></code> database. -Archived versions are in files named <code>tzdb-<var>V</var>.tar.lz</code>, +Older releases are in files named +<code>tzcode<var>V</var>.tar.gz</code>, +<code>tzdata<var>V</var>.tar.gz</code>, and +<code>tzdb-<var>V</var>.tar.lz</code>, where <code><var>V</var></code> is the version. -For compatibility with releases before 2016g, a -<a href="https://www.gnu.org/software/gzip/">gzip</a>-compressed two-tarball -distribution is also available, where the code is in the -file <code>tzcode<var>C</var>.tar.gz</code>, -where <code><var>C</var></code> is the code's version; -similarly, the data entries are in <code>tzdata<var>D</var>.tar.gz</code>, -where <code><var>D</var></code> is the data's version. Since 1996, each version has been a four-digit year followed by lower-case letter (<samp>a</samp> through <samp>z</samp>, then <samp>za</samp> through <samp>zz</samp>, then <samp>zza</samp> -through <samp>zzz</samp>, and so on).</p> -<p> -The code and data files can also be obtained from the +through <samp>zzz</samp>, and so on). +The releases can also be obtained from the <a href="http://www.iana.org/time-zones">Time Zone Database website</a> of the <a href="http://www.iana.org">Internet Assigned Numbers Authority (IANA)</a>. @@ -144,6 +146,8 @@ in <a href="http://git-scm.com">Git</a> form from <a href="https://github.com">GitHub</a>; be careful, as this repository is less well tested and probably contains more errors. <p> +After extracting a distribution's files, see its +<code>README</code> file for what to do next. The code lets you compile the <code><abbr>tz</abbr></code> source files into machine-readable binary files, one for each location. It also lets you read a <code><abbr>tz</abbr></code> binary file and interpret time stamps for that @@ -295,7 +299,7 @@ program that compiles <code><abbr>tz</abbr></code> source into iCalendar-compatible VTIMEZONE files. Vzic is freely available under the <a -href="http://www.gnu.org/copyleft/gpl.html"><abbr>GNU</abbr> +href="https://www.gnu.org/copyleft/gpl.html"><abbr>GNU</abbr> General Public License (<abbr title="General Public License">GPL</abbr>)</a>.</li> <li><a href="https://sourceforge.net/projects/tzical/">tziCal – tz @@ -357,7 +361,7 @@ Advanced date, time and interval library for Java</a> contains a class <code>net.time4j.tool.TimezoneRepositoryCompiler</code> that compiles <code><abbr>tz</abbr></code> source into a binary format. Time4J is available under the <a -href="http://www.gnu.org/copyleft/lesser.html"><abbr>GNU</abbr> Lesser +href="https://www.gnu.org/copyleft/lesser.html"><abbr>GNU</abbr> Lesser General Public License (<abbr title="Lesser General Public License">LGPL</abbr>)</a>.</li> <li><abbr>ICU</abbr> (mentioned above) contains compilers and @@ -413,7 +417,7 @@ license.</li> <h2>Other <code><abbr>tz</abbr></code> binary file readers</h2> <ul> <li>The <a -href="http://www.gnu.org/software/libc/"><abbr>GNU</abbr> C +href="https://www.gnu.org/software/libc/"><abbr>GNU</abbr> C Library</a> has an independent, thread-safe implementation of a <code><abbr>tz</abbr></code> binary file reader. -- 2.7.4
* Makefile (clean): Clean tzdb-*, not tzdb. (tzdb-$(VERSION).tar.lz): The top level directory of the tzdb-VERSION.tar.lz tarball is now tzdb-VERSION, not just tzdb. This is the common practice elsewhere. --- Makefile | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 31a2ec5..9692a1d 100644 --- a/Makefile +++ b/Makefile @@ -568,7 +568,7 @@ clean_misc: rm -f core *.o *.out \ date tzselect version.h zdump zic yearistype libtz.a clean: clean_misc - rm -fr *.dir tzdb $(TZS_NEW) + rm -fr *.dir tzdb-*/ $(TZS_NEW) maintainer-clean: clean @echo 'This command is intended for maintainers to use; it' @@ -687,12 +687,13 @@ tzdata$(VERSION).tar.gz: set-timestamps.out gzip $(GZIPFLAGS) > $@ tzdb-$(VERSION).tar.lz: set-timestamps.out - rm -fr tzdb - mkdir tzdb - ln $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) tzdb - touch -cmr $$(ls -t tzdb/* | sed 1q) tzdb + rm -fr tzdb-$(VERSION) + mkdir tzdb-$(VERSION) + ln $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) \ + tzdb-$(VERSION) + touch -cmr $$(ls -t tzdb-$(VERSION)/* | sed 1q) tzdb-$(VERSION) LC_ALL=C && export LC_ALL && \ - tar $(TARFLAGS) -cf - tzdb | lzip -9 > $@ + tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 > $@ signatures: tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \ tzdb-$(VERSION).tar.lz.asc -- 2.7.4
This largely affects just the release process, not the generated tarballs. * NEWS: Document this. * Makefile (VERSION): Now 'unknown', since it is overrridden. (SOURCES): Add 'version'. (VERSION_DEPS): New macro. (version): New rule. (version.h, tzselect): Use 'version' file, instead of $(VERSION). (maintainer-clean): Remove 'version'. (set-timestamps.out): Set the timestamp of 'version'. (tarballs, signatures): Set VERSION to it before doing the real work. (tarballs_version, signatures_version): New rules, with the old definiens of 'tarballs' and 'signatures'. (tzdb-$(VERSION).tar.lz): Simplify by using ENCHILADA. --- Makefile | 59 +++++++++++++++++++++++++++++++++++++++++++++-------------- NEWS | 25 ++++++++++++++++++------- 2 files changed, 63 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 9692a1d..79b4cdb 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ # Package name for the code distribution. PACKAGE= tzcode -# Version numbers of the code and data distributions. -VERSION= 2016f +# Version number for the distribution, overridden in the 'tarballs' rule below. +VERSION= unknown # Email address for bug reports. BUGEMAIL= tz@iana.org @@ -356,7 +356,7 @@ HEADERS= tzfile.h private.h NONLIBSRCS= zic.c zdump.c NEWUCBSRCS= date.c strftime.c SOURCES= $(HEADERS) $(LIBSRCS) $(NONLIBSRCS) $(NEWUCBSRCS) \ - tzselect.ksh workman.sh + tzselect.ksh version workman.sh MANS= newctime.3 newstrftime.3 newtzset.3 time2posix.3 \ tzfile.5 tzselect.8 zic.8 zdump.8 MANTXTS= newctime.3.txt newstrftime.3.txt newtzset.3.txt \ @@ -385,6 +385,26 @@ TZS_DEPS= $(PRIMARY_YDATA) asctime.c localtime.c \ private.h tzfile.h zdump.c zic.c ENCHILADA= $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) +# Consult these files when deciding whether to rebuild the 'version' file. +# This list is not the same as the output of 'git ls-files', since +# .gitignore is not distributed. +VERSION_DEPS= \ + CONTRIBUTING LICENSE Makefile NEWS README Theory \ + africa antarctica asctime.c asia australasia \ + backward backzone \ + checklinks.awk checktab.awk \ + date.1 date.c difftime.c \ + etcetera europe factory iso3166.tab \ + leap-seconds.list leapseconds.awk localtime.c \ + newctime.3 newstrftime.3 newtzset.3 northamerica \ + pacificnew private.h \ + southamerica strftime.c systemv \ + time2posix.3 tz-art.htm tz-how-to.html tz-link.htm \ + tzfile.5 tzfile.h tzselect.8 tzselect.ksh \ + workman.sh yearistype.sh \ + zdump.8 zdump.c zic.8 zic.c \ + zone.tab zone1970.tab zoneinfo2tdf.pl + # And for the benefit of csh users on systems that assume the user # shell should be used to handle commands in Makefiles. . . @@ -413,9 +433,16 @@ INSTALL: ALL install date.1 cp date $(DESTDIR)$(BINDIR)/. cp -f date.1 $(DESTDIR)$(MANDIR)/man1/. -version.h: +version: $(VERSION_DEPS) + { V=$$(git describe --match '[0-9][0-9][0-9][0-9][a-z]*' \ + --abbrev=7 --dirty) || \ + V=$(VERSION); } && \ + printf '%s\n' "$$V" >$@ + +version.h: version (echo 'static char const PKGVERSION[]="($(PACKAGE)) ";' && \ - echo 'static char const TZVERSION[]="$(VERSION)";' && \ + printf 'static char const TZVERSION[]="%s";\n' \ + "$$(cat version)" && \ echo 'static char const REPORT_BUGS_TO[]="$(BUGEMAIL)";') >$@ zdump: $(TZDOBJS) @@ -510,15 +537,15 @@ libtz.a: $(LIBOBJS) date: $(DATEOBJS) $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(DATEOBJS) $(LDLIBS) -tzselect: tzselect.ksh +tzselect: tzselect.ksh version sed \ -e 's|#!/bin/bash|#!$(KSHELL)|g' \ -e 's|AWK=[^}]*|AWK=$(AWK)|g' \ -e 's|\(PKGVERSION\)=.*|\1='\''($(PACKAGE)) '\''|' \ -e 's|\(REPORT_BUGS_TO\)=.*|\1=$(BUGEMAIL)|' \ -e 's|TZDIR=[^}]*|TZDIR=$(TZDIR)|' \ - -e 's|\(TZVERSION\)=.*|\1=$(VERSION)|' \ - <$? >$@ + -e 's|\(TZVERSION\)=.*|\1='"$$(cat version)"'|' \ + <$@.ksh >$@ chmod +x $@ check: check_character_set check_white_space check_links check_sorted \ @@ -573,7 +600,7 @@ clean: clean_misc maintainer-clean: clean @echo 'This command is intended for maintainers to use; it' @echo 'deletes files that may need special tools to rebuild.' - rm -f leapseconds $(MANTXTS) $(TZS) *.asc *.tar.* + rm -f leapseconds version $(MANTXTS) $(TZS) *.asc *.tar.* names: @echo $(ENCHILADA) @@ -621,6 +648,7 @@ set-timestamps.out: $(ENCHILADA) exit; \ done touch -cmr $$(ls -t $(TZS_DEPS) | sed 1q) $(TZS) + touch -cmr $$(ls -t $(VERSION_DEPS) | sed 1q) version touch $@ # The zics below ensure that each data file can stand on its own. @@ -672,7 +700,10 @@ check_time_t_alternatives: done rm -fr time_t.dir -tarballs: tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz \ +tarballs signatures: version + $(MAKE) VERSION="$$(cat version)" $@_version + +tarballs_version: tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz \ tzdb-$(VERSION).tar.lz tzcode$(VERSION).tar.gz: set-timestamps.out @@ -689,13 +720,12 @@ tzdata$(VERSION).tar.gz: set-timestamps.out tzdb-$(VERSION).tar.lz: set-timestamps.out rm -fr tzdb-$(VERSION) mkdir tzdb-$(VERSION) - ln $(COMMON) $(DOCS) $(SOURCES) $(DATA) $(MISC) $(TZS) \ - tzdb-$(VERSION) + ln $(ENCHILADA) tzdb-$(VERSION) touch -cmr $$(ls -t tzdb-$(VERSION)/* | sed 1q) tzdb-$(VERSION) LC_ALL=C && export LC_ALL && \ tar $(TARFLAGS) -cf - tzdb-$(VERSION) | lzip -9 > $@ -signatures: tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \ +signatures_version: tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \ tzdb-$(VERSION).tar.lz.asc tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz @@ -736,5 +766,6 @@ zic.o: private.h tzfile.h version.h .PHONY: clean clean_misc force_tzs .PHONY: install install_data maintainer-clean names .PHONY: posix_only posix_packrat posix_right -.PHONY: public right_only right_posix signatures tarballs typecheck +.PHONY: public right_only right_posix signatures signatures_version +.PHONY: tarballs tarballs_version typecheck .PHONY: zonenames zones diff --git a/NEWS b/NEWS index 6cbdbd7..f5a0b13 100644 --- a/NEWS +++ b/NEWS @@ -63,13 +63,24 @@ Unreleased, experimental changes Changes to build procedure - An experimental distribution format is available in the tarball - tzdb-VERSION.tar.lz with signature file tzdb-VERSION.tar.lz.asc. - It unpacks to a top-level directory containing the code and data - of the traditional two-tarball format, along with extra data that - may be useful. The traditional format will continue to be - distributed. (Thanks to Antonio Diaz Diaz, Oscar van Vlijmen, and - many others for comments about the experimental format.) + An experimental distribution format is available, in addition + to the traditional format which will continue to be distributed. + The new format is a tarball tzdb-VERSION.tar.lz with signature + file tzdb-VERSION.tar.lz.asc. It unpacks to a top-level directory + tzdb-VERSION containing the code and data of the traditional + two-tarball format, along with extra data that may be useful. + (Thanks to Antonio Diaz Diaz, Oscar van Vlijmen, and many others + for comments about the experimental format.) + + The release version number is now more accurate in the usual case + where releases are built from a Git repository. For example, if + 23 commits and some working-file changes have been made since + release 2016g, the version number is now something like + '2016g-23-g50556e3-dirty' instead of the misleading '2016g'. + Official releases uses the same version number format as before, + e.g., '2016g'. To support the more-accurate version number, its + specification has moved from a line in the Makefile to a new + source file 'version'. The experimental distribution contains a file to2050.tzs that contains what should be the output of 'zdump -i -c 2050' on -- 2.7.4
participants (1)
-
Paul Eggert