Page MenuHomeFreeBSD

tzsetup: correct timezone symlink target
ClosedPublic

Authored by emaste on Sat, Sep 21, 11:19 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Sep 27, 6:21 AM
Unknown Object (File)
Fri, Sep 27, 4:02 AM
Unknown Object (File)
Thu, Sep 26, 1:58 PM
Unknown Object (File)
Mon, Sep 23, 5:05 PM
Unknown Object (File)
Sat, Sep 21, 6:25 PM
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.Mon, Sep 30, 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?