From owner-freebsd-emulation Sat Nov 29 21:28:31 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id VAA17471 for emulation-outgoing; Sat, 29 Nov 1997 21:28:31 -0800 (PST) (envelope-from owner-freebsd-emulation) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id VAA17462; Sat, 29 Nov 1997 21:28:21 -0800 (PST) (envelope-from bde@zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.6.9) id QAA30424; Sun, 30 Nov 1997 16:26:54 +1100 Date: Sun, 30 Nov 1997 16:26:54 +1100 From: Bruce Evans Message-Id: <199711300526.QAA30424@godzilla.zeta.org.au> To: bde@zeta.org.au, mike@smith.net.au Subject: Re: localtime under Linux-emu? Cc: emulation@freebsd.org, erich@freebsd.org, v@godzilla.zeta.org.au Sender: owner-freebsd-emulation@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >> 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