[tz] Wrong symlinks with BACKWARD=backward PACKRATDATA=backzone

Benjamin Drung benjamin.drung at canonical.com
Tue Apr 2 16:55:46 UTC 2024


On Tue, 2024-03-12 at 17:14 -0700, Paul Eggert wrote:
> On 3/8/24 10:13, Paul Eggert wrote:
> > it'd be helpful to propose specific changes in "git format-patch" form.
> > These should be independent of the main data, so presumably they would
> > patch the "backzone" file. It might help to try these changes out on
> > Ubuntu first, by patching there and seeing how well it works there.
>
> Another possibility that just occurred to me, is that you could use
> "make DATAFORM=vanguard" when building tzdata. The vanguard format
> treats links-to-links in a better way, and this should fix the
> particular symlink issue you mentioned. It entails several other changes
> too, though, so it'd be a good idea to review them too.

Finally I tested "make DATAFORM=vanguard". The generated tzdata.zi does
not work with zic from glibc 2.38:

```
$ /usr/sbin/zic -d tzdata/tzgen -L /dev/null tzdata.zi
"tzdata.zi", line 59: invalid ending year
"tzdata.zi", line 60: invalid ending year
"tzdata.zi", line 299: invalid ending year
[...]
```

Diffing tzdata.zi generated with DATAFORM=main and DATAFORM=vanguard
shows that these lines that zic complains were different:

```
$ diff -u /usr/share/zoneinfo/tzdata.zi tzdata.zi
[...]
@@ -55,8 +56,8 @@
 R K 2014 o - Jun 26 24 0 -
 R K 2014 o - Jul 31 24 1 S
 R K 2014 o - S lastTh 24 0 -
-R K 2023 ma - Ap lastF 0 1 S
-R K 2023 ma - O lastTh 24 0 -
+R K 2023 m - Ap lastF 0 1 S
+R K 2023 m - O lastTh 24 0 -
 R L 1951 o - O 14 2 1 S
 R L 1952 o - Ja 1 0 0 -
 R L 1953 o - O 9 2 1 S
[...]
```

Attached a patch to introduce DATAFORM=link to just apply the link
related changes from "vanguard". An alternative would be to move the
link changes into the "main" data form and the previous behaviour into
"rearguard". Let me know what you think about the patch.

--
Benjamin Drung
Debian & Ubuntu Developer

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ziguard.awk-Add-DATAFORM-link.patch
Type: text/x-patch
Size: 1831 bytes
Desc: not available
URL: <https://mm.icann.org/pipermail/tz/attachments/20240402/624735cd/0001-ziguard.awk-Add-DATAFORM-link.patch>


More information about the tz mailing list