1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
#
# This file and its contents are supplied under the terms of the
# Common Development and Distribution License ("CDDL"), version 1.0.
# You may only use this file in accordance with the terms of version
# 1.0 of the CDDL.
#
# A full copy of the text of the CDDL should have accompanied this
# source. A copy of the CDDL is also available via the Internet at
# http://www.illumos.org/license/CDDL.
#
#
# Copyright (c) 2014 Joyent, Inc. All rights reserved.
# Copyright 2020 OmniOS Community Edition (OmniOSce) Association.
#
How to update the TZ database information.
Welcome! You've probably heard that some aspect of time has changed and
you're wondering what to do. The first thing to do is to grab the latest
version of the time database which can currently be found at:
http://www.iana.org/time-zones
You'll need the data tarball. Most data files are used in the gate
directly; however, a few have slightly different names. The following
commands assume that you're inside of the directory you extracted the
time zone files.
$ cp africa antarctica asia australasia backward etcetera europe \
northamerica southamerica $CODEMGR_WS/usr/src/data/zoneinfo
Next you need to copy the country tab and the zone tab files. These have
different names in our source tree.
$ cp iso3166.tab $CODEMGR_WS/usr/src/data/zoneinfo/country.tab
$ cp zone.tab $CODEMGR_WS/usr/src/data/zoneinfo/zone.tab.txt
Now, you need to manually fix up the zone_sun.tab. zone_sun.tab has
additional different zone names that the original does not. As things
are changed and removed, or coordinates updated, the same should be done
in zone_sun.tab. The simplest way known to deal with it today is
something like the following:
$ cd $CODEMGR_WS/usr/src/data/zoneinfo
$ vimdiff zone.tab.txt zone_sun.tab
And as you see things that show up as egregiously different, do a 'git
diff zone.tab.txt' and see what changed and fix zone_sun.tab
appropriately. Usually this means deleting removed entries and adding
new ones.
********** IMPORTANT **********
*** zone_sun.tab must remain sorted.
*** The upstream zone.tab.txt is not always completely in alphabetical order.
To check the final zone_sun.tab file, the `zonelint` script in the current
directory can be used within a bldenv environment. First run `dmake install`
to stage the zone files to proto, then run `./zonelint`. If it produces no
output then you're okay.
After that's done, you'll need to go through the more agonizing process of
packaging. To do this, you'll want to look through the differences that have
occurred in zone.tab.txt and backward. The contents of backward describe
hardlinks that need to exist in packaging. Specifically, if you have a line in
the form of:
LINK Arda/Beleriand Arda/Gondolin
That instructs that Gondolin should be hardlinked to Beleriand. In IPS parlance
that'd be:
hardlink path=usr/share/lib/zoneinfo/Arda/Gondolin target=../Arda/Beleriand
The differences in zone.tab.txt describe the additions and removals of various
file entries. If you're not friends with protocmp yet, this should help you out.
Once both of those are done, you'll need to update the version of the package
itself in the manifest. IANA releases these as <year><letter>, eg. 2013i.
Instead, you need to encode that letter to its spot in the alphabet. So 2013i
would become 2013.9.
Once packaging is all done, then you should be all set.
|