Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 1997 19:25:25 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        bde@zeta.org.au, mike@smith.net.au
Cc:        emulation@FreeBSD.ORG, erich@FreeBSD.ORG, v@godzilla.zeta.org.au
Subject:   Re: localtime under Linux-emu?
Message-ID:  <199712060825.TAA04003@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> >> The search order is (omitting /compat/linux):
>> >> 
>> >> 	/usr/lib/zoneinfo/localtime
>> >> 	/usr/share/zoneinfo/localtime
>> >
>> >Ok.  Linking localtime into usr/lib/zoneinfo will work then.
>> >
>> >> and then for a zoneinfo data file:
>> >> 
>> >> 	/usr/lib/zoneinfo/GMT
>> >> 	/usr/share/zoneinfo/GMT
>> >
>> >Er.  That's sufficiently different from our POV that it's not going to 
>> >work.  (ie. we have it in /usr/share/zoneinfo/Etc/GMT)
>> 
>> It looks like a compatibility hack or a bad old way of doing things.  In
>> an old version of RedHat Linux, GMT has 18 hard links, one in Etc.
>> zoneinfo used to be more cluttered here too.
>
>In the above, "it" is ambiguous.  Are you referring to the Linux 
>behaviour, or ours?

An old version of RedHat Linux.

>> Read what I wrote, or UTSL.  Apparently only nonstandard code searches
>> both places.
>
>I did read what you wrote, which is why I said "I can't parse that".  
>TSL isn't immediately available, nor is the context from which you are 
>operating.  Rather, I rely on your ability to communicate same in a 
>fashion from which I can draw inferences as to correct actions.

I rely on the ability of people to do their homework.

>At this point, the contents of the FreeBSD /usr/share/zoneinfo 
>directory are symlinked into /compat/linux/usr/lib/zoneinfo.  From your 
>comments above, it appears that this is redundant due to /usr/share/
>zoneinfo being part of the default search path.  It also appears that 
>/usr/share/zoneinfo is not laid out in a fashion which is likely to be 
>similar to that expected by Linux applications.  Can you confirm these 
>points?

It is redundant for /usr/share/zoneinfo (in old RH versions...) but
not for localtime.  The layout is apparently incompatible (in old RH
versions...).

>Is the layout of the zoneinfo directory important to the average 
>application, or is it more relevant to the format of the timezone value?

Don't know.

>The inference I initially drew from your earlier comments was that 
>Linux did not use subdirectories under the zoneinfo directory.  Was 

An old RH version...  Of course it uses the standard subdirectories
(Australia/ etc.).  It just has many more links for (18 instead of 5
for GMT).  This may be caused by the timezone version being older and/or
an installation bug that I fixed in zic (links weren't snapped properly).

>this a poor assumption based on your example?  A much simpler approach 
>to the above would just have been to let the Linux code eventually find 
>/usr/share/zoneinfo by itsef.

Theat would work in an old RH version ... but would might fail with
glibc.  glibc seems to follow the timzone distribution in putting
localtime in the zoneinfo directory and only having one directory
which doesn't default to /usr/share/zoneinfo.

>> I hope will follow the layout in the timezone distribution, and that
>> FreeBSD users won't be interested in running old Linux libraries so that
>> the Linux library package won't need to contain old shared libraries.
>
>You hope *what* will follow the layout in the timezone distribution?

glibc.  I'm can't remember why I hoped that :-).

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199712060825.TAA04003>