From 8c143a2b65fdfd43a7911be6fdb700c9c4553f58 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Tue, 30 Aug 2016 14:00:15 -0700
Subject: [PROPOSED PATCH] Go back to lz tarball; improve documentation

* .gitignore: Ignore all compressed tar files, instead of just gzipped.
* LICENSE, Makefile, antarctica, private.h, zic.c:
Don't assume the distributions are called tzcode and/or tzdata.
* Makefile (tzdb-$(VERSION).tar.lz): Rename back from
tzdb-$(VERSION).tar.xz.  Use lzip, not xz.  All uses changed.
(tzdb-$(VERSION).tar.lz.asc): Rename back from
tzdb-$(VERSION).tar.gz.asc.
* NEWS, README, tz-how-to.html, tz-link.htm:
Document the single .lz tarball.
---
 .gitignore     |  2 +-
 LICENSE        |  6 +++---
 Makefile       | 14 +++++++-------
 NEWS           | 12 ++++++------
 README         |  7 ++-----
 antarctica     |  2 +-
 private.h      |  2 +-
 tz-how-to.html |  2 +-
 tz-link.htm    | 44 ++++++++++++++++++++++----------------------
 zic.c          |  2 +-
 10 files changed, 45 insertions(+), 48 deletions(-)

diff --git a/.gitignore b/.gitignore
index 91098d5..6b42615 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,7 +3,7 @@
 *.a
 *.asc
 *.o
-*.tar.gz
+*.tar.*
 *.txt
 *~
 ChangeLog
diff --git a/LICENSE b/LICENSE
index a9b60d8..148eb23 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
 With a few exceptions, all files in the tz code and data (including
-this one) are in the public domain.  The exceptions are tzcode's
-date.c, newstrftime.3, and strftime.c, which contain material derived
-from BSD and which use the BSD 3-clause license.
+this one) are in the public domain.  The exceptions are date.c,
+newstrftime.3, and strftime.c, which contain material derived from BSD
+and which use the BSD 3-clause license.
diff --git a/Makefile b/Makefile
index f6754af..90363e9 100644
--- a/Makefile
+++ b/Makefile
@@ -240,7 +240,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
 CFLAGS=
 
 # Linker flags.  Default to $(LFLAGS) for backwards compatibility
-# to tzcode2012h and earlier.
+# to release 2012h and earlier.
 
 LDFLAGS=	$(LFLAGS)
 
@@ -256,7 +256,7 @@ ZIC=		$(zic) $(ZFLAGS)
 
 ZFLAGS=
 
-# How to use zic to install tzdata binary files.
+# How to use zic to install tz binary files.
 
 ZIC_INSTALL=	$(ZIC) -y $(YEARISTYPE) -d $(DESTDIR)$(TZDIR) $(LEAPSECONDS)
 
@@ -673,7 +673,7 @@ check_time_t_alternatives:
 		rm -fr time_t.dir
 
 tarballs:	tzcode$(VERSION).tar.gz tzdata$(VERSION).tar.gz \
-		tzdb-$(VERSION).tar.xz
+		tzdb-$(VERSION).tar.lz
 
 tzcode$(VERSION).tar.gz: set-timestamps.out
 		LC_ALL=C && export LC_ALL && \
@@ -686,16 +686,16 @@ tzdata$(VERSION).tar.gz: set-timestamps.out
 		tar $(TARFLAGS) -cf - $(COMMON) $(DATA) $(MISC) $(TZS) | \
 		  gzip $(GZIPFLAGS) > $@
 
-tzdb-$(VERSION).tar.xz: set-timestamps.out
+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
 		LC_ALL=C && export LC_ALL && \
-		tar $(TARFLAGS) -cf - tzdb | xz -9e > $@
+		tar $(TARFLAGS) -cf - tzdb | lzip -9 > $@
 
 signatures:	tzcode$(VERSION).tar.gz.asc tzdata$(VERSION).tar.gz.asc \
-		tzdb-$(VERSION).tar.xz.asc
+		tzdb-$(VERSION).tar.lz.asc
 
 tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
 		gpg --armor --detach-sign $?
@@ -703,7 +703,7 @@ tzcode$(VERSION).tar.gz.asc: tzcode$(VERSION).tar.gz
 tzdata$(VERSION).tar.gz.asc: tzdata$(VERSION).tar.gz
 		gpg --armor --detach-sign $?
 
-tzdb-$(VERSION).tar.xz.asc: tzdb-$(VERSION).tar.xz
+tzdb-$(VERSION).tar.lz.asc: tzdb-$(VERSION).tar.lz
 		gpg --armor --detach-sign $?
 
 typecheck:
diff --git a/NEWS b/NEWS
index 7882484..e61a992 100644
--- a/NEWS
+++ b/NEWS
@@ -63,20 +63,20 @@ Unreleased, experimental changes
 
   Changes to build procedure
 
-    The tzdata distribution has a new file to2050.tzs that contains
-    what should be the output of 'zdump -i -c 2050' on primary zones.
+    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.xz and the signature tzdb-VERSION.tar.xz.asc.
+    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 xz compression, which is
-    significantly smaller than gzip.  (Thanks to Oscar van Vlijmen for
-    comments on the format.)
+    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.)
 
     'make check_web' now works on Fedora-like distributions.
 
diff --git a/README b/README
index 8deaf16..ba0b790 100644
--- a/README
+++ b/README
@@ -13,11 +13,8 @@ and daylight-saving rules.
 Here is a recipe for acquiring, building, installing, and testing the
 tz distribution on a GNU/Linux or similar host.
 
-	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 -
+	wget --retr-symlinks 'ftp://ftp.iana.org/tz/tzdb-latest.tar.lz'
+	lzip -dc tzdb-latest.tar.lz | tar -xf -
 
 Be sure to read the comments in "Makefile" and make any changes needed
 to make things right for your system, especially if you are using some
diff --git a/antarctica b/antarctica
index e461fcf..0995835 100644
--- a/antarctica
+++ b/antarctica
@@ -211,7 +211,7 @@ Zone Antarctica/Syowa	0	-	-00	1957 Jan 29
 # correct, but they should be quite close to the actual dates.
 #
 # From Paul Eggert (2014-03-21):
-# The CET-switching Troll rules require zic from tzcode 2014b or later, so as
+# The CET-switching Troll rules require zic from tz 2014b or later, so as
 # suggested by Bengt-Inge Larsson comment them out for now, and approximate
 # with only UTC and CEST.  Uncomment them when 2014b is more prevalent.
 #
diff --git a/private.h b/private.h
index 3583079..daad297 100644
--- a/private.h
+++ b/private.h
@@ -15,7 +15,7 @@
 ** Thank you!
 */
 
-/* This string was in the tzdata Factory zone through version 2016f.  */
+/* This string was in the Factory zone through version 2016f.  */
 #define GRANDPARENTED	"Local time zone must be set--see zic manual page"
 
 /*
diff --git a/tz-how-to.html b/tz-how-to.html
index feb47dd..7d9d521 100644
--- a/tz-how-to.html
+++ b/tz-how-to.html
@@ -12,7 +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/tzdata-latest.tar.gz">latest
+<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
 of the data files. The format is explained in the &ldquo;man
 page&rdquo; for the zic compiler, <code>zic.8.txt</code>, in
diff --git a/tz-link.htm b/tz-link.htm
index 40b66b4..8b05470 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-21">
+<meta name="DC.Date" content="2016-08-30">
 <meta name="DC.Description"
  content="Sources of information about time zones and daylight saving time">
 <meta name="DC.Identifier"
@@ -106,33 +106,33 @@ The database also records when daylight saving time was in use,
 along with alphabetic time zone abbreviations such as <abbr>EST</abbr>
 for Eastern Standard Time in the <abbr>US</abbr>.</p>
 <p>
-In the <code><abbr>tz</abbr></code> database's
+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 -
+</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
 <a href="ftp://ftp.iana.org/tz/releases/"><abbr
 title="File Transfer Protocol">FTP</abbr> releases</a>
-the code is in the file <code>tzcode<var>C</var>.tar.gz</code>,
+of the <code><abbr>tz</abbr></code> database.
+Archived versions are in files named <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).
-Convenience links to
-the <a href="ftp://ftp.iana.org/tz/tzcode-latest.tar.gz">latest
-code</a> and
-<a href="ftp://ftp.iana.org/tz/tzdata-latest.tar.gz">latest data</a> revisions
-are also available.
-The following <a
-href="https://en.wikipedia.org/wiki/Unix_shell">shell</a> commands download
-these files 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>mkdir tz
-cd tz
-<a href="http://www.gnu.org/software/wget/">wget</a> --retr-symlinks 'ftp://ftp.iana.org/tz/tz*-latest.tar.gz'
-<a href="http://www.gnu.org/software/gzip/">gzip</a> -dc tzcode-latest.tar.gz | <a href="http://www.gnu.org/software/tar/">tar</a> -xf -
-gzip -dc tzdata-latest.tar.gz | tar -xf -
-</code></pre>
+through <samp>zzz</samp>, and so on).</p>
 <p>
 The code and data files can also be obtained from the
 <a href="http://www.iana.org/time-zones">Time Zone Database website</a>
@@ -507,8 +507,8 @@ a <a href="https://wordpress.org">WordPress</a> plugin. It is freely
 available under a <abbr>BSD</abbr>-style license.</li>
 <li><a href="http://www.relativedata.com/time-zone-master">Time Zone
 Master</a> is a Microsoft Windows clock program that can automatically
-download, compile and use the <code>tzdata<var>D</var>.tar.gz</code>
-files as they are released. The Basic version is free.</li>
+download, compile and use <code>tz</code> releases. The Basic version
+is free.</li>
 <li><a
 href="http://veladg.com/velaterra.html">VelaTerra</a> is
 an <abbr>OS X</abbr> program. Its developers
diff --git a/zic.c b/zic.c
index 2b0193b..1c91d5a 100644
--- a/zic.c
+++ b/zic.c
@@ -144,7 +144,7 @@ static bool	yearistype(int year, const char * type);
 enum { PERCENT_Z_LEN_BOUND = sizeof "+995959" - 1 };
 
 /* If true, work around a bug in Qt 5.6.1 and earlier, which mishandles
-   tzdata binary files whose POSIX-TZ-style strings contain '<'; see
+   tz binary files whose POSIX-TZ-style strings contain '<'; see
    QTBUG-53071 <https://bugreports.qt.io/browse/QTBUG-53071>.  This
    workaround will no longer be needed when Qt 5.6.1 and earlier are
    obsolete, say in the year 2021.  */
-- 
2.7.4

