Date: Tue, 21 Oct 2008 22:08:33 -0000 From: "Jeremy Messenger" <mezz7@cox.net> To: "Per Hedeland" <per@hedeland.org> Cc: freebsd-emulation@freebsd.org, edwin@freebsd.org Subject: Re: Kind of solved.. [WAS: Re: Linux compat 2.6.16 reports time incorrect?] Message-ID: <op.ujeagjmd9aq2h7@localhost> In-Reply-To: <200810212116.m9LLGoAB098676@pluto.hedeland.org> References: <200810212116.m9LLGoAB098676@pluto.hedeland.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Oct 2008 16:16:50 -0500, Per Hedeland <per@hedeland.org> wrote: > "Jeremy Messenger" <mezz7@cox.net> wrote: >> >> It won't work, because if you read Boris's ktrace and you will see it >> reads in /etc/localtime. > > Boris' ktrace did indeed show that (though I don't know how he deduced > that the file was "rejected", rather than read three times due simply to > sloppy programming) - but he didn't mention whether he got the time > difference between native and Linux 'date' that you reported. > >> So if I copy it to /compat/linux/etc/localtime >> and it won't makes any difference, since it's same file. :-) > > But we haven't seen a trace from *your* system - if you actually have > (or had) a /compat/linux/etc/localtime file, it will of course be read > and no fall-through to /etc/localtime will happen - and if > /compat/linux/etc/localtime has the wrong contents, you will get the > wrong output from Linux 'date'. We get same trace, but only a bit different on read "TZif\0\0\0[...]" part. I ran ktrace/linux_kdump with no /compat/linux/etc/localtime and it's complete default beside of that OVERRIDE_LINUX_BASE_PORT=f8 and compat.linux.osrelease=2.6.16. http://people.freebsd.org/~mezz/date_linux_kdump.txt >> I have downloaded tzdata-2008h-1.fc8.noarch.rpm and extracted it. Then >> copy it in /compat/linux/etc/localtime and now it works correct. Only a >> few seconds difference, but does not matter to me. > > And if you remove it, i.e. no /compat/linux/etc/localtime at all, what > is the result? Not having it would seem to be the sane solution - it's > certainly the case for linux_base-fc-4. I don't have any /compat/linux/etc/localtime with both linux_base-fc-4 and linux_base-f8. The FreeBSD's tzdata is from 2004, so with linux_base-f8's tzdata 2008[a-z] does not work with FreeBSD's /etc/localtime. It's what I think this is problem for changed format in tzdata 2008[a-z], but I might be wrong. If it is indeed this problem, then it looks like we might have to add install tzdata-2008h-1.fc8.noarch.rpm and document it to tell users to copy the file by manual to have the time/date correct. Cheers, Mezz > The /etc/localtime file on Linux as on FreeBSD is just a copy of (or > link to) the appropriate zic-compiled Olson zone file - I can't claim to > have investigated it, but changing the compiled format would seem to be > out of the question, since it would wreak havoc with all the many Unix > systems that use these files (and that periodically have to update them > to cater to the whims of politicians all over the world). > > Hm, I guess it's possible that FC modified 'zic' from what comes with > the Olson files (and their libc functions that read it to match) - but > even that would seem incredibly unlikely I think, just asking for > trouble. > > --Per Hedeland -- mezz7@cox.net - mezz@FreeBSD.org FreeBSD GNOME Team http://www.FreeBSD.org/gnome/ - gnome@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?op.ujeagjmd9aq2h7>