How does the time zone info get updated?

Stefan Esser se at freebsd.org
Tue Jan 5 23:39:45 UTC 2021


Am 06.01.21 um 00:19 schrieb Konstantin Belousov:
> On Wed, Jan 06, 2021 at 12:05:17AM +0100, Stefan Esser wrote:
>> I'd rather think we should have the port install files into
>> $PREFIX/share/zoneinfo and modify the file lookup to search at
>> that location first, before falling back to the base system
>> location.
>>
>> This might require changes to zic, zdump, tzsetup, etcupdate,
>> and bsdconfig, which only expect a single path in TZDIR.
>>
>> This might be considered worse than the port that overwrites
>> files in base.
> This really requires changes to libc, which implies changed behavior
> for all applications.

A library routine can easily implement the logic to lookup
the zone definitions in a specified sequence in several
places.

The biggest problem I see is that the /etc/localtime link
would point to either a definition in /usr/share/zoneinfo
or $LOCALBASE/share/zoneinfo and if a port did update the
files below $LOCALBASE when previously files from base
had been used, the link would need to be adjusted.

I do not consider such a change of a link in /etc by a
port to be acceptable behavior, though, and thus the port
that overwrites files in /usr/share/zoneinfo actually
appears to be the lesser evil ...

Regards, STefan

PS: Resent from freebsd mail address to have the message
be accepted by the list server ...


More information about the freebsd-hackers mailing list