Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libc Merge tzcode2020b (except we keep tzsetwall(3) for ...



details:   https://anonhg.NetBSD.org/src/rev/ffd6d1115e8d
branches:  trunk
changeset: 944730:ffd6d1115e8d
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Oct 09 18:38:48 2020 +0000

description:
Merge tzcode2020b (except we keep tzsetwall(3) for now for compatibility,
and we were "slim" already)

Support for zic's long-obsolete '-y YEARISTYPE' option has been
removed and, with it, so has support for the TYPE field in Rule
lines, which is now reserved for compatibility with earlier zic.
These features were previously deprecated in release 2015f.
(Thanks to Tim Parenti.)

zic now defaults to '-b slim' instead of to '-b fat'.

zic's new '-l -' and '-p -' options uninstall any existing
localtime and posixrules files, respectively.

The undocumented and ineffective tzsetwall function has been
removed.

diffstat:

 lib/libc/shlib_version       |    3 +-
 lib/libc/time/Makefile       |  107 +++++++----------------
 lib/libc/time/NEWS           |   71 +++++++++++++++
 lib/libc/time/README         |    2 +
 lib/libc/time/strftime.3     |   67 ++++++++++----
 lib/libc/time/strftime.c     |   31 ++++++-
 lib/libc/time/theory.html    |   51 +++++++---
 lib/libc/time/tz-art.html    |    5 +
 lib/libc/time/tz-how-to.html |  161 +++++++++++++++++++--------------
 lib/libc/time/tz-link.html   |   59 ++++++++++--
 lib/libc/time/tzselect.8     |    4 +-
 lib/libc/time/version        |    2 +-
 lib/libc/time/zic.8          |   68 ++++++++------
 lib/libc/time/zic.c          |  198 ++++++++++++++----------------------------
 14 files changed, 473 insertions(+), 356 deletions(-)

diffs (truncated from 1838 to 300 lines):

diff -r 80ed0aa78540 -r ffd6d1115e8d lib/libc/shlib_version
--- a/lib/libc/shlib_version    Fri Oct 09 18:33:00 2020 +0000
+++ b/lib/libc/shlib_version    Fri Oct 09 18:38:48 2020 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: shlib_version,v 1.290 2020/10/03 18:34:15 christos Exp $
+#      $NetBSD: shlib_version,v 1.291 2020/10/09 18:38:48 christos Exp $
 #      Remember to update distrib/sets/lists/base/shl.* when changing
 #
 # things we wish to do on next major version bump:
@@ -52,5 +52,6 @@
 # - move environ and __ps_strings from crt0.o into libc.
 # - move statfs() to libcompat since we have statvfs()
 # - the syscall stubs for the (obsolete) lfs syscalls should be removed
+# - remove tzsetwall(3), upstream has removed it
 major=12
 minor=218
diff -r 80ed0aa78540 -r ffd6d1115e8d lib/libc/time/Makefile
--- a/lib/libc/time/Makefile    Fri Oct 09 18:33:00 2020 +0000
+++ b/lib/libc/time/Makefile    Fri Oct 09 18:38:48 2020 +0000
@@ -22,13 +22,13 @@
 #      DATAFORM=       main
 # To wait even longer for new features, use:
 #      DATAFORM=       rearguard
+# Rearguard users might also want "ZFLAGS = -b fat"; see below.
 DATAFORM=              main
 
 # Change the line below for your timezone (after finding the one you want in
 # one of the $(TDATA) source files, or adding it to a source file).
 # Alternatively, if you discover you've got the wrong timezone, you can just
-#      zic -l rightzone
-# to correct things.
+# 'zic -l -' to remove it, or 'zic -l rightzone' to change it.
 # Use the command
 #      make zonenames
 # to get a list of the values you can use for LOCALTIME.
@@ -37,33 +37,30 @@
 
 # The POSIXRULES macro controls interpretation of nonstandard and obsolete
 # POSIX-like TZ settings like TZ='EET-2EEST' that lack DST transition rules.
-# In the reference implementation, if you want something other than Eastern
-# United States time as a template for handling these settings, you can
-# change the line below (after finding the timezone you want in the
-# one of the $(TDATA) source files, or adding it to a source file).
-# A setting like TZ='EET-2EEST' is supposed to use the rules in the
-# template file to determine "spring forward" and "fall back" days and
-# times; the environment variable itself specifies UT offsets of standard and
-# daylight saving time.
-# Alternatively, if you discover you've got the wrong timezone, you can just
-#      zic -p rightzone
-# to correct things.
-# Use the command
-#      make zonenames
-# to get a list of the values you can use for POSIXRULES.
+# Such a setting uses the rules in a template file to determine
+# "spring forward" and "fall back" days and times; the environment
+# variable itself specifies UT offsets of standard and daylight saving time.
 #
-# If POSIXRULES is empty, no template is installed; this is the intended
-# future default for POSIXRULES.
+# If POSIXRULES is '-', no template is installed; this is the default.
 #
-# Nonempty POSIXRULES is obsolete and should not be relied on, because:
+# Any other value for POSIXRULES is obsolete and should not be relied on, as:
 # * It does not work correctly in popular implementations such as GNU/Linux.
 # * It does not work in the tzdb implementation for timestamps after 2037.
 # * It is incompatible with 'zic -b slim' if POSIXRULES specifies transitions
 #   at standard time or UT rather than at local time.
 # In short, software should avoid ruleless settings like TZ='EET-2EEST'
 # and so should not depend on the value of POSIXRULES.
+#
+# If, despite the above, you want a template for handling these settings,
+# you can change the line below (after finding the timezone you want in the
+# one of the $(TDATA) source files, or adding it to a source file).
+# Alternatively, if you discover you've got the wrong timezone, you can just
+# 'zic -p -' to remove it, or 'zic -p rightzone' to change it.
+# Use the command
+#      make zonenames
+# to get a list of the values you can use for POSIXRULES.
 
-POSIXRULES=    America/New_York
+POSIXRULES=    -
 
 # Also see TZDEFRULESTRING below, which takes effect only
 # if the time zone files cannot be accessed.
@@ -172,9 +169,6 @@
 
 # For backward-compatibility links for old zone names, use
 #      BACKWARD=       backward
-# If you also want the link US/Pacific-New, even though it is confusing
-# and is planned to be removed from the database eventually, use
-#      BACKWARD=       backward pacificnew
 # To omit these links, use
 #      BACKWARD=
 
@@ -192,10 +186,6 @@
 
 UTF8_LOCALE=   en_US.utf8
 
-# Since "." may not be in PATH...
-
-YEARISTYPE=    ./yearistype
-
 # Non-default libraries needed to link.
 LDLIBS=
 
@@ -253,13 +243,12 @@
 #      other than simply getting garbage data
 #  -DUSE_LTZ=0 to build zdump with the system time zone library
 #      Also set TZDOBJS=zdump.o and CHECK_TIME_T_ALTERNATIVES= below.
-#  -DZIC_BLOAT_DEFAULT=\"slim\" to default zic's -b option to "slim", and
-#      similarly for "fat".  Fat TZif files work around incompatibilities
+#  -DZIC_BLOAT_DEFAULT=\"fat\" to default zic's -b option to "fat", and
+#      similarly for "slim".  Fat TZif files work around incompatibilities
 #      and bugs in some TZif readers, notably readers that mishandle 64-bit
 #      data in TZif files.  Slim TZif files are more efficient and do not
 #      work around these incompatibilities and bugs.  If not given, the
-#      current default is "fat" but this is intended to change as readers
-#      requiring fat files often mishandle timestamps after 2037 anyway.
+#      default is "slim".
 #  -DZIC_MAX_ABBR_LEN_WO_WARN=3
 #      (or some other number) to set the maximum time zone abbreviation length
 #      that zic will accept without a warning (the default is 6)
@@ -333,9 +322,8 @@
 # add
 #      -DSTD_INSPIRED
 # to the end of the "CFLAGS=" line.  This arranges for the functions
-# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
+# "offtime", "timelocal", "timegm", "timeoff",
 # "posix2time", and "time2posix" to be added to the time conversion library.
-# "tzsetwall" is deprecated and is intended to be removed soon; see NEWS.
 # "offtime" is like "gmtime" except that it accepts a second (long) argument
 # that gives an offset to add to the time_t when converting it.
 # "timelocal" is equivalent to "mktime".
@@ -395,7 +383,7 @@
 
 # To shrink the size of installed TZif files,
 # append "-r @N" to omit data before N-seconds-after-the-Epoch.
-# You can also append "-b slim" if that is not already the default;
+# To grow the files and work around older application bugs, append "-b fat";
 # see ZIC_BLOAT_DEFAULT above.
 # See the zic man page for more about -b and -r.
 ZFLAGS=
@@ -424,26 +412,6 @@
 # Name of GNU Privacy Guard <https://gnupg.org/>, used to sign distributions.
 GPG=           gpg
 
-# The path where SGML DTDs are kept and the catalog file(s) to use when
-# validating HTML 4.01.  The default should work on both Debian and Red Hat.
-SGML_TOPDIR= /usr
-SGML_DTDDIR= $(SGML_TOPDIR)/share/xml/w3c-sgml-lib/schema/dtd
-SGML_SEARCH_PATH= $(SGML_DTDDIR)/REC-html401-19991224
-SGML_CATALOG_FILES= \
-  $(SGML_TOPDIR)/share/doc/w3-recs/html/www.w3.org/TR/1999/REC-html401-19991224/HTML4.cat:$(SGML_TOPDIR)/share/sgml/html/4.01/HTML4.cat
-
-# The name, arguments and environment of a program to validate HTML 4.01.
-# See <http://openjade.sourceforge.net/doc/> for a validator, and
-# <https://validator.w3.org/source/> for a validation library.
-# Set VALIDATE=':' if you do not have such a program.
-VALIDATE = nsgmls
-VALIDATE_FLAGS = -s -B -wall -wno-unused-param
-VALIDATE_ENV = \
-  SGML_CATALOG_FILES='$(SGML_CATALOG_FILES)' \
-  SGML_SEARCH_PATH='$(SGML_SEARCH_PATH)' \
-  SP_CHARSET_FIXED=YES \
-  SP_ENCODING=UTF-8
-
 # This expensive test requires USE_LTZ.
 # To suppress it, define this macro to be empty.
 CHECK_TIME_T_ALTERNATIVES = check_time_t_alternatives
@@ -538,8 +506,8 @@
 PRIMARY_YDATA= africa antarctica asia australasia \
                europe northamerica southamerica
 YDATA=         $(PRIMARY_YDATA) etcetera
-NDATA=         systemv factory
-TDATA_TO_CHECK=        $(YDATA) $(NDATA) backward pacificnew
+NDATA=         factory
+TDATA_TO_CHECK=        $(YDATA) $(NDATA) backward
 TDATA=         $(YDATA) $(NDATA) $(BACKWARD)
 ZONETABLES=    zone1970.tab zone.tab
 TABDATA=       iso3166.tab $(TZDATA_TEXT) $(ZONETABLES)
@@ -547,7 +515,7 @@
 TZDATA_ZI_DEPS=        ziguard.awk zishrink.awk version $(TDATA) $(PACKRATDATA)
 DSTDATA_ZI_DEPS= ziguard.awk $(TDATA) $(PACKRATDATA)
 DATA=          $(TDATA_TO_CHECK) backzone iso3166.tab leap-seconds.list \
-                       leapseconds yearistype.sh $(ZONETABLES)
+                       leapseconds $(ZONETABLES)
 AWK_SCRIPTS=   checklinks.awk checktab.awk leapseconds.awk \
                        ziguard.awk zishrink.awk
 MISC=          $(AWK_SCRIPTS) zoneinfo2tdf.pl
@@ -573,12 +541,10 @@
                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 theory.html \
+               private.h southamerica strftime.c theory.html \
                time2posix.3 tz-art.html tz-how-to.html tz-link.html \
                tzfile.5 tzfile.h tzselect.8 tzselect.ksh \
-               workman.sh yearistype.sh \
-               zdump.8 zdump.c zic.8 zic.c \
+               workman.sh zdump.8 zdump.c zic.8 zic.c \
                ziguard.awk zishrink.awk \
                zone.tab zone1970.tab zoneinfo2tdf.pl
 
@@ -587,7 +553,7 @@
 
 SHELL=         /bin/sh
 
-all:           tzselect yearistype zic zdump libtz.a $(TABDATA) \
+all:           tzselect zic zdump libtz.a $(TABDATA) \
                  vanguard.zi main.zi rearguard.zi
 
 ALL:           all date $(ENCHILADA)
@@ -657,10 +623,6 @@
 zic:           $(TZCOBJS)
                $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(TZCOBJS) $(LDLIBS)
 
-yearistype:    yearistype.sh
-               cp yearistype.sh yearistype
-               chmod +x yearistype
-
 leapseconds:   $(LEAP_DEPS)
                $(AWK) -v EXPIRES_LINE=$(EXPIRES_LINE) \
                  -f leapseconds.awk leap-seconds.list >$@.out
@@ -675,10 +637,9 @@
  PACKRATDATA='$(PACKRATDATA)' \
  TZDEFAULT='$(TZDEFAULT)' \
  TZDIR='$(TZDIR)' \
- YEARISTYPE='$(YEARISTYPE)' \
  ZIC='$(ZIC)'
 
-INSTALL_DATA_DEPS = zic leapseconds yearistype tzdata.zi
+INSTALL_DATA_DEPS = zic leapseconds tzdata.zi
 
 # 'make install_data' installs one set of TZif files.
 install_data: $(INSTALL_DATA_DEPS)
@@ -793,7 +754,7 @@
                ! grep -Env $(SAFE_LINE)'|^UNUSUAL_OK_'$(OK_CHAR)'*$$' \
                        Makefile && \
                ! grep -Env $(SAFE_SHARP_LINE) $(TDATA_TO_CHECK) backzone \
-                       leapseconds yearistype.sh zone.tab && \
+                       leapseconds zone.tab && \
                ! grep -Env $(OK_LINE) $(ENCHILADA); \
        }
        touch $@
@@ -845,15 +806,13 @@
 check_web:     $(CHECK_WEB_PAGES)
 check_theory.html: theory.html
 check_tz-art.html: tz-art.html
+check_tz-how-to.html: tz-how-to.html
 check_tz-link.html: tz-link.html
-check_theory.html check_tz-art.html check_tz-link.html:
+check_theory.html check_tz-art.html check_tz-how-to.html check_tz-link.html:
                $(CURL) -sS --url https://validator.w3.org/nu/ -F out=gnu \
                    -F file=@$$(expr $@ : 'check_\(.*\)') -o $@.out && \
                  test ! -s $@.out || { cat $@.out; exit 1; }
                mv $@.out $@
-check_tz-how-to.html: tz-how-to.html
-               $(VALIDATE_ENV) $(VALIDATE) $(VALIDATE_FLAGS) tz-how-to.html
-               touch $@
 
 # Check that zishrink.awk does not alter the data, and that ziguard.awk
 # preserves main-format data.
@@ -883,7 +842,7 @@
                rm -fr check_*.dir
                rm -f *.o *.out $(TIME_T_ALTERNATIVES) \
                  check_* core typecheck_* \
-                 date tzselect version.h zdump zic yearistype libtz.a
+                 date tzselect version.h zdump zic libtz.a
 clean:         clean_misc
                rm -fr *.dir tzdb-*/
                rm -f *.zi $(TZS_NEW)
diff -r 80ed0aa78540 -r ffd6d1115e8d lib/libc/time/NEWS
--- a/lib/libc/time/NEWS        Fri Oct 09 18:33:00 2020 +0000
+++ b/lib/libc/time/NEWS        Fri Oct 09 18:38:48 2020 +0000
@@ -1,5 +1,76 @@
 News for the tz database
 
+Release 2020b - 2020-10-06 18:35:04 -0700
+
+  Briefly:
+    Revised predictions for Morocco's changes starting in 2023.
+    Canada's Yukon changes to -07 on 2020-11-01, not 2020-03-08.
+    Macquarie Island has stayed in sync with Tasmania since 2011.
+    Casey, Antarctica is at +08 in winter and +11 in summer.
+    zic no longer supports -y, nor the TYPE field of Rules.
+
+  Changes to future timestamps
+
+    Morocco's spring-forward after Ramadan is now predicted to occur
+    no sooner than two days after Ramadan, instead of one day.
+    (Thanks to Milamber.)  The first altered prediction is for 2023,
+    now predicted to spring-forward on April 30 instead of April 23.
+
+  Changes to past and future timestamps
+
+   Casey Station, Antarctica has been using +08 in winter and +11 in
+   summer since 2018.  The most recent transition from +08 to +11 was
+   2020-10-04 00:01.  Also, Macquarie Island has been staying in
+   sync with Tasmania since 2011.  (Thanks to Steffen Thorsen.)



Home | Main Index | Thread Index | Old Index