Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Nov 1997 16:26:54 +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:  <199711300526.QAA30424@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.

>> Putting `localtime' in lib/zoneinfo is OK, especially if you don't
>> put the shareable zoneinfo files there.  At least in glibc-2.0.3,
>> and in the timezone distribution, searching for `localtime' in the
>> same directory as the shareable zoneinfo files is caused by forming
>> the path from TZDIR and TZDEFAULT (unless TZDEFAULT is an absolute
>> pathname, as it is in FreeBSD).  These distributions don't seem to
>> support multiple paths in TZDIR, but glibc supports overrinding it
>> using the TZDIR environment variable.
>
>I can't parse that.  You've just said that the code searches the same 
>places for both localtime and the shared data files, but now you are 
>saying that putting them in the same directory would actually be bad, 
>without explaining why.

Read what I wrote, or UTSL.  Apparently only nonstandard code searches
both places.

>> >How about a more correct solution:
>> >
>> >	mkdir /compat/linux/usr/lib/zoneinfo
>> >	ln -s /usr/share/zoneinfo/* /compat/linux/usr/lib/zoneinfo
>> >	ln -sf /etc/localtime /compat/linux/usr/lib/localtime
>> 
>> This probably fails with glibc.
>
>Because it uses a diferent path layout for the shared datafiles?  Would
>
>	for i in find /usr/share/zoneinfo/ -type file;
>		ln -s $i /compat/linux/usr/lib/zoneinfo/
>
>get closer, or do they have their own, variant directory layout?

Something like that.  It needs to actually work for subdirectories.
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.

Bruce



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