aboutsummaryrefslogtreecommitdiffstats
path: root/chapter06/glibc.xml
diff options
context:
space:
mode:
authorKen Moffat <ken@linuxfromscratch.org>2012-08-20 23:51:22 +0000
committerKen Moffat <ken@linuxfromscratch.org>2012-08-20 23:51:22 +0000
commit7a6bcf996e754fcf8bc3ea80acc23865476044eb (patch)
treeabfa79e3e8f8e2c0b1f89b8cdcfb9fa2b7aecac6 /chapter06/glibc.xml
parent25d78ecbd764173db754061abeb275f33f3e35ed (diff)
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
Diffstat (limited to 'chapter06/glibc.xml')
-rw-r--r--chapter06/glibc.xml48
1 files changed, 45 insertions, 3 deletions
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</userinput></screen>
<para>Install timezone data:</para>
<screen><userinput>tar -xf ../tzdata&tzdata-version;.tar.gz
+mkdir -pv /usr/share/zoneinfo/{posix,right} &amp;&amp;
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} &amp;&amp;
+ zic -L /dev/null -d /usr/share/zoneinfo/posix -y "sh yearistype.sh" ${tz} &amp;&amp;
+ zic -L leapseconds -d /usr/share/zoneinfo/right -y "sh yearistype.sh" ${tz}
done
-cp -v *.tab /usr/share/zoneinfo</userinput></screen>
+cp -v zone.tab /usr/share/zoneinfo &amp;&amp;
+zic -d /usr/share/zoneinfo -p America/New_York</userinput></screen>
- <para>One way to determine the local time zone, run the following
+ <variablelist>
+ <title>The meaning of the zic commands:</title>
+
+ <varlistentry>
+ <term><parameter>zic -L /dev/null ...</parameter></term>
+ <listitem>
+ <para>This creates posix timezones, without any leap seconds. It is
+ conventional to put these in both
+ <filename class="directory">zoneinfo</filename> and
+ <filename class="directory">zoneinfo/posix</filename>. It is
+ necessary to put the POSIX timezones in
+ <filename class="directory">zoneinfo</filename>, 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 <filename class="directory">posix</filename>
+ directory, but some applications or test-suites might give less good
+ results</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>zic -L leapseconds ...</parameter></term>
+ <listitem>
+ <para>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 <filename class="directory">right</filename>
+ directory.</para>
+ </listitem>
+ </varlistentry>
+ <varlistentry>
+ <term><parameter>zic ... -p ...</parameter></term>
+ <listitem>
+ <para>This creates the <filename>posixrules</filename> file.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+
+
+ <para>One way to determine the local time zone is to run the following
script:</para>
<screen role="nodump"><userinput>tzselect</userinput></screen>