Page MenuHomeFreeBSD

tzsetup: add baseline file to control parsed zonetab contents
ClosedPublic

Authored by yuripv on Apr 18 2023, 12:58 AM.
Tags
None
Referenced Files
Unknown Object (File)
May 15 2024, 12:14 AM
Unknown Object (File)
May 9 2024, 5:11 AM
Unknown Object (File)
May 9 2024, 12:07 AM
Unknown Object (File)
Apr 14 2024, 6:26 AM
Unknown Object (File)
Mar 11 2024, 1:04 PM
Unknown Object (File)
Mar 11 2024, 1:04 PM
Unknown Object (File)
Mar 11 2024, 1:04 PM
Unknown Object (File)
Mar 8 2024, 1:21 AM
Subscribers

Details

Summary

Introduce undocumented option -d to dump parsed zonetab file contents
and add a "baseline" target along with instructions.

Baseline file is not installed in the system, and serves only as a check for when zoneinfo or tzsetup is updated.

Do this before changes in D39606 land to make sure it doesn't break anything it's not supposed to.
Intended to catch unexpected changes (like Iceland being listed under Africa that D39606 should fix).

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I like this idea, but I don't think this should live under /usr/share/zoneinfo. I believe that zoneinfo should *only* contain files generated by tzdata.

Maybe this should live in /usr/share/misc instead?

Also: please take a look at what upstream has done to their tzselect since the Great Merging (groan) of historical time zone data a couple of years ago. Perhaps our tzsetup can pick up some of those changes?

I like this idea, but I don't think this should live under /usr/share/zoneinfo. I believe that zoneinfo should *only* contain files generated by tzdata.

Maybe this should live in /usr/share/misc instead?

I don't intend to install the file, it should only exist in src tree and serve as a check when updating zoneinfo (check that tzsetup is still able to parse it) or tzsetup (check that it didn't introduce unwanted changes).

Also: please take a look at what upstream has done to their tzselect since the Great Merging (groan) of historical time zone data a couple of years ago. Perhaps our tzsetup can pick up some of those changes?

D39606 is a result of running tzselect and being confused about how does it know to list Iceland properly under Atlantic while zone1970.tab says it's in Africa :)

yuripv edited the summary of this revision. (Show Details)
  • make -d take path to zonetab file, so that baseline target uses the zone1970.tab in src and not from installed system
  • update summary to explain why ${SRCTOP}/share/zoneinfo location
yuripv edited the summary of this revision. (Show Details)

move baseline file to usr.sbin/tzsetup to not clobber seemingly unrelated share/zoneinfo

fix uninitialized variable

I think this looks good now. Thanks you!

This revision is now accepted and ready to land.Apr 22 2023, 9:17 AM
otis added inline comments.
usr.sbin/tzsetup/baseline
542

Shouldn't this read Europe/Bratislava ?

yuripv added inline comments.
usr.sbin/tzsetup/baseline
542

That is what in zone1970.tab, this file only contains the parsed information and is NOT the source for anything (i.e. it was that way always once we started using zone1970.tab).