PR: 281332 Reported by: scf, Herbert J. Skuhra
Details
- Reviewers
imp kevans olce - Commits
- rG030c387f5d74: tzsetup: correct timezone symlink target
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
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.
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?