Date: Thu, 8 Aug 2024 00:35:38 -0400 (EDT) From: "Sean C. Farley" <scf@FreeBSD.org> To: Ed Maste <emaste@FreeBSD.org> Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: Re: git: fc43a1b6842a - stable/14 - tzsetup: symlink /etc/localtime instead of copying Message-ID: <784ce21d-a604-bb91-c52e-29c78e2bb6e4@FreeBSD.org> In-Reply-To: <202408011538.471FcJDS026885@gitrepo.freebsd.org> References: <202408011538.471FcJDS026885@gitrepo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 1 Aug 2024, Ed Maste wrote: > The branch stable/14 has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=fc43a1b6842afa806dfd7ba48de5bece63d04456 > > commit fc43a1b6842afa806dfd7ba48de5bece63d04456 > Author: Ed Maste <emaste@FreeBSD.org> > AuthorDate: 2022-10-14 16:44:35 +0000 > Commit: Ed Maste <emaste@FreeBSD.org> > CommitDate: 2024-08-01 15:11:45 +0000 > > tzsetup: symlink /etc/localtime instead of copying > > Using a symlink means that new timezone data (installed by an errata > update, say) will be usable without having to be copied again. > > Reviewed by: bapt, kevans, philip > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D37005 > > (cherry picked from commit 5e16809c953f4cd19fadb1767469dec319de0353) I ran across an issue with this when using "etcupdate -D" to update a jail from the host. "tzsetup -r -C /tmp/chroot", as called by etcupdate, prepends the path of the chroot to the link which breaks things inside the jail. For example, if you run the following: mkdir -p /tmp/chroot/etc mkdir -p /tmp/chroot/usr/share mkdir -p /tmp/chroot/var/db ln -s /usr/share/misc /tmp/chroot/usr/share/misc ln -s /usr/share/zoneinfo /tmp/chroot/usr/share/zoneinfo cp /var/db/zoneinfo /tmp/chroot/var/db/. tzsetup -C /tmp/chroot -r The result will be the following: /tmp/chroot/etc/localtime@ -> /tmp/chroot//usr/share/zoneinfo/America/Indiana/Indianapolis Sean -- scf@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?784ce21d-a604-bb91-c52e-29c78e2bb6e4>