From 15e0ac32c17bdb9c7d480a65fbda77e6c5e7d808 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 23 Dec 2020 11:11:31 -0800 Subject: [PATCH] Fix rearguard.zi corruption in 2020e Problem reported by Deborah Goldsmith in: https://mm.icann.org/pipermail/tz/2020-December/029637.html * Makefile (check_public): Also check vanguard.zi, main.zi, rearguard.zi, to prevent similar problems from recurring. * NEWS: Mention this. * ziguard.awk: Be pickier about adjusting comments in the Europe/Prague and Africa/Windhoek, partly by adding a check already present for Europe/Dublin. --- Makefile | 5 ++++- NEWS | 8 ++++++++ ziguard.awk | 9 +++++---- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 5064a19..1136af9 100644 --- a/Makefile +++ b/Makefile @@ -945,7 +945,10 @@ check_public: $(VERSION_DEPS) mkdir public.dir ln $(VERSION_DEPS) public.dir cd public.dir && $(MAKE) CFLAGS='$(GCC_DEBUG_FLAGS)' ALL - for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi; do \ + for i in $(TDATA_TO_CHECK) public.dir/tzdata.zi \ + public.dir/vanguard.zi public.dir/main.zi \ + public.dir/rearguard.zi; \ + do \ public.dir/zic -v -d public.dir/zoneinfo $$i 2>&1 || exit; \ done public.dir/zic -v -d public.dir/zoneinfo-all $(TDATA_TO_CHECK) diff --git a/NEWS b/NEWS index 6014b45..a0863fb 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,13 @@ News for the tz database +Unreleased, experimental changes + + Change to build procedure + + 'make rearguard_tarballs' no longer generates a bad rearguard.zi, + fixing a 2020e bug. (Problem reported by Deborah Goldsmith.) + + Release 2020e - 2020-12-22 15:14:34 -0800 Briefly: diff --git a/ziguard.awk b/ziguard.awk index e27e799..7d6f7c9 100644 --- a/ziguard.awk +++ b/ziguard.awk @@ -37,7 +37,7 @@ DATAFORM != "main" { # If this line should differ due to Czechoslovakia using negative SAVE values, # uncomment the desired version and comment out the undesired one. - if (zone == "Europe/Prague" && /1947 Feb 23/) { + if (zone == "Europe/Prague" && /^#?[\t ]+[01]:00[\t ]/ && /1947 Feb 23/) { if (($(in_comment + 2) != "-") == vanguard) { uncomment = in_comment } else { @@ -65,10 +65,11 @@ DATAFORM != "main" { # uncomment the desired version and comment out the undesired one. Rule_Namibia = /^#?Rule[\t ]+Namibia[\t ]/ Zone_using_Namibia_rule \ - = (zone == "Africa/Windhoek" \ + = (zone == "Africa/Windhoek" && /^#?[\t ]+[12]:00[\t ]/ \ && ($(in_comment + 2) == "Namibia" \ - || (1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ - || in_comment + 3 == NF)) + || ($(in_comment + 2) == "-" && $(in_comment + 3) == "CAT" \ + && ((1994 <= $(in_comment + 4) && $(in_comment + 4) <= 2017) \ + || in_comment + 3 == NF)))) if (Rule_Namibia || Zone_using_Namibia_rule) { if ((Rule_Namibia \ ? ($(in_comment + 9) ~ /^-/ \ -- 1.8.3.1