Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 30 Aug 2024 09:04:04 +0200
From:      "Herbert J. Skuhra" <herbert@gojira.at>
To:        "Sean C. Farley" <scf@FreeBSD.org>
Cc:        Ed Maste <emaste@FreeBSD.org>, 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:  <87zfoujxuj.wl-herbert@gojira.at>
In-Reply-To: <87cylubd5v.wl-herbert@gojira.at>
References:  <202408011538.471FcJDS026885@gitrepo.freebsd.org> <784ce21d-a604-bb91-c52e-29c78e2bb6e4@FreeBSD.org> <87cylubd5v.wl-herbert@gojira.at>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 27 Aug 2024 10:09:00 +0200, "Herbert J. Skuhra" wrote:
> 
> On Thu, 08 Aug 2024 06:35:38 +0200, "Sean C. Farley" wrote:
> > 
> > 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.
> 
> I have this issue whenerver I update jails with 'make installworld
> DESTDIR=$X'. Will this be fixed or reverted (at least) in stable/14?
> Or works as expected? 

Maybe:

diff --git a/usr.sbin/tzsetup/tzsetup.c b/usr.sbin/tzsetup/tzsetup.c
index 617de4efb765..38d7ccf5e00c 100644
--- a/usr.sbin/tzsetup/tzsetup.c
+++ b/usr.sbin/tzsetup/tzsetup.c
@@ -884,7 +884,7 @@ main(int argc, char **argv)
        } else {
                sprintf(path_zonetab, "%s/%s", chrootenv, _PATH_ZONETAB);
                sprintf(path_iso3166, "%s/%s", chrootenv, _PATH_ISO3166);
-               sprintf(path_zoneinfo, "%s/%s", chrootenv, _PATH_ZONEINFO);
+               sprintf(path_zoneinfo, "%s", _PATH_ZONEINFO);
                sprintf(path_localtime, "%s/%s", chrootenv, _PATH_LOCALTIME);
                sprintf(path_db, "%s/%s", chrootenv, _PATH_DB);
                sprintf(path_wall_cmos_clock, "%s/%s", chrootenv,


--
Herbert



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87zfoujxuj.wl-herbert>