From 7a6bcf996e754fcf8bc3ea80acc23865476044eb Mon Sep 17 00:00:00 2001 From: Ken Moffat Date: Mon, 20 Aug 2012 23:51:22 +0000 Subject: Correct how timezones are installed - this fixes various errors in test-suites. Thanks to Markku Pesonen for noting how Debian install timezones. git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@9944 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689 --- chapter06/glibc.xml | 48 +++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) (limited to 'chapter06') diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index bcab4c5db..11dc4f44c 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -315,13 +315,55 @@ EOF Install timezone data: tar -xf ../tzdata&tzdata-version;.tar.gz +mkdir -pv /usr/share/zoneinfo/{posix,right} && for tz in etcetera southamerica northamerica europe africa antarctica \ asia australasia backward pacificnew solar87 solar88 solar89 systemv; do - zic -L leapseconds -d /usr/share/zoneinfo -y "sh yearistype.sh" ${tz} + zic -L /dev/null -d /usr/share/zoneinfo -y "sh yearistype.sh" ${tz} && + zic -L /dev/null -d /usr/share/zoneinfo/posix -y "sh yearistype.sh" ${tz} && + zic -L leapseconds -d /usr/share/zoneinfo/right -y "sh yearistype.sh" ${tz} done -cp -v *.tab /usr/share/zoneinfo +cp -v zone.tab /usr/share/zoneinfo && +zic -d /usr/share/zoneinfo -p America/New_York - One way to determine the local time zone, run the following + + The meaning of the zic commands: + + + zic -L /dev/null ... + + This creates posix timezones, without any leap seconds. It is + conventional to put these in both + zoneinfo and + zoneinfo/posix. It is + necessary to put the POSIX timezones in + zoneinfo, otherwise various + test-suites will report errors. On an embedded system, where space is + tight and you do not intend to ever update the timezones, you could save + 1.9MB by not using the posix + directory, but some applications or test-suites might give less good + results + + + + zic -L leapseconds ... + + This creates right timezones, including leap seconds. On an + embedded system, where space is tight and you do not intend to + ever update the timezones, or care about the correct time, you could + save 1.9MB by omitting the right + directory. + + + + zic ... -p ... + + This creates the posixrules file. + + + + + + One way to determine the local time zone is to run the following script: tzselect -- cgit v1.2.3-54-g00ecf