From owner-freebsd-emulation@FreeBSD.ORG Tue Oct 21 21:31:31 2008 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40D71106567A; Tue, 21 Oct 2008 21:31:31 +0000 (UTC) (envelope-from per@hedeland.org) Received: from pluto.hedeland.org (1-1-1-13a.mal.sth.bostream.se [82.182.84.27]) by mx1.freebsd.org (Postfix) with ESMTP id B63F88FC16; Tue, 21 Oct 2008 21:31:30 +0000 (UTC) (envelope-from per@hedeland.org) Received: from pluto.hedeland.org (localhost [127.0.0.1]) by pluto.hedeland.org (8.14.2/8.14.2) with ESMTP id m9LLGog3098677 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 21 Oct 2008 23:16:50 +0200 (CEST) (envelope-from per@pluto.hedeland.org) Received: (from per@localhost) by pluto.hedeland.org (8.14.2/8.14.2/Submit) id m9LLGoAB098676; Tue, 21 Oct 2008 23:16:50 +0200 (CEST) (envelope-from per) Date: Tue, 21 Oct 2008 23:16:50 +0200 (CEST) From: Per Hedeland Message-Id: <200810212116.m9LLGoAB098676@pluto.hedeland.org> To: freebsd-emulation@freebsd.org In-Reply-To: X-Scanned-By: MIMEDefang 2.63 on 82.182.84.27 Cc: mezz7@cox.net, edwin@freebsd.org Subject: Re: Kind of solved.. [WAS: Re: Linux compat 2.6.16 reports time incorrect?] X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Oct 2008 21:31:31 -0000 "Jeremy Messenger" 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'. >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. 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