[tz] installargs loses part of backward

Zefram zefram at fysh.org
Mon Oct 23 18:11:09 UTC 2017

New in the 2017c release, there's a bug in how INSTALLARGS in the
Makefile passes the BACKWARD variable down to an inferior make process.
Because the definition of INSTALLARGS doesn't put quotes around the
value part of BACKWARD, and because BACKWARD is actually (by default)
a space-separated list of two files, the inferior make only gets the
first file in its BACKWARD value, treating the second file as something
to ensure is up to date (which of course it already is).  So the inferior
make omits one of the BACKWARD files (pacificnew) from whatever it does.

The practical effect of this is that when building the binary zone files
by, for example, "make posix_only", without having previously done "make
tzdata.zi", the US/Pacific-New link is omitted.  It's missing from the
directory of binary outputs, and missing from the tzdata.zi file that
is created as a side effect of building them (thus affecting anything
that later tries to use tzdata.zi).  That's the only zone name affected,
because it's the only zone name defined in the lost source file.  If "make
tzdata.zi" is done first then that will create a correct tzdata.zi, and
subsequent building of the binary zone files will then include the link.

This was spotted by my automation, which sanity checks the directory of
generated binary zone files against a list of zone names that it extracts
from the source files.  I think this a sensible check, and that it ought
to pass.

The fix is that the definition of INSTALLARGS should quote $(BACKWARD),
the same way it quotes $(PACKRATDATA).  Or perhaps it should not set
BACKWARD at all, just like it doesn't set YDATA et al.  (But perhaps it
should *also* set YDATA et al.)


More information about the tz mailing list