Page MenuHomeFreeBSD

tzsetup: correct timezone symlink target
ClosedPublic

Authored by emaste on Sep 21 2024, 11:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 1, 3:53 AM
Unknown Object (File)
Tue, Oct 29, 8:00 PM
Unknown Object (File)
Wed, Oct 23, 4:30 AM
Unknown Object (File)
Mon, Oct 21, 8:06 AM
Unknown Object (File)
Fri, Oct 18, 3:00 AM
Unknown Object (File)
Oct 4 2024, 4:49 PM
Unknown Object (File)
Oct 2 2024, 11:25 AM
Unknown Object (File)
Oct 2 2024, 3:43 AM
Subscribers

Details

Summary
PR:             281332
Reported by:    scf, Herbert J. Skuhra

Diff Detail

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

Event Timeline

emaste created this revision.
olce added a subscriber: olce.

Read recent mails and the commits changing copying to symlinking (yours and Joerg Wunsch's). Bottom line: I don't see any real reason not to switch to symlinking (at least, the partial revert of 1996 has no explanations).

With respect to the latest attempt, looks like the proper fix.

Incidentally, this fixes commit b5f58d7778a3 that introduced chroot install, which did not handle the symlink case properly for chroots.

This revision is now accepted and ready to land.Sep 30 2024, 2:19 PM
This revision was automatically updated to reflect the committed changes.

Ah, forgot something: -r now is probably obsolete for its intended use-case (it could still be useful when people want to temporary fiddle with the timezone, and re-install the one indicated by /var/db/zoneinfo, but that seems far-fetched). Doing nothing to it seems fine to me, but you might want to delete it (making it a no-op; and possibly obsolete /var/db/zoneinfo as well, although it seems a bit of work documenting the upcoming breaking change and handling the fallout for not much gain; YMMV).

We should encode the zone name needed for the copy into this file and always copy to that. The whole reason we moved to links was for mergemaster to update. If they aren't working out the next step is to add that as extra data and get those changes upstreamed.

@imp Not sure what you mean exactly, except for the "always copy" part. For (~10) years now, etcupdate has been running tzsetup -r but only if /etc/localtime exists and is not a symlink, and /var/db/zoneinfo exists, so is agnostic to copying or linking. It seems to me that having links is important rather for freebsd-update, which AFAICT doesn't handle /etc/localtime (not sure though, don't know it enough).

About copying or linking, we are mostly going to rehash D37005. Is the /usr-not-yet-mounted case compelling enough?