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
This commit is contained in:
Ken Moffat 2012-08-20 23:51:22 +00:00
parent 25d78ecbd7
commit 7a6bcf996e
5 changed files with 75 additions and 5 deletions

View File

@ -44,6 +44,9 @@
<para>[bdubbs] - Add patch to fix Flex regression test
failures.</para>
</listitem>
<listitem>
<para>[ken] - Fix how the timezones are installed.</para>
</listitem>
</itemizedlist>
</listitem>

View File

@ -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>

View File

@ -1,5 +1,5 @@
<!ENTITY version "SVN-20120816">
<!ENTITY releasedate "August 16, 2012">
<!ENTITY version "SVN-20120820">
<!ENTITY releasedate "August 20, 2012">
<!ENTITY copyrightdate "1999-2012"><!-- jhalfs needs a literal dash, not &ndash; -->
<!ENTITY milestone "7.2">
<!ENTITY generic-version "development"> <!-- Use "development", "testing", or "x.y[-pre{x}]" -->

View File

@ -1,3 +1,8 @@
2012-06-13 Ken Moffat <ken@linuxfromscratch.org>
* add rule_generator/: with persistent net and cd alias rules
and functions which were removed from udev-182 after it was merged
into systemd.
2010-01-26 Matt Burgess <matthew@linuxfromscratch.org>
* 55-lfs.rules: Remove lots of rules that have been merged upstream.
* 61-cdrom.rules: Remove as upstream has a replacement.

View File

@ -4,6 +4,7 @@ PREFIX = /usr
RULES_DIR = /etc/udev/rules.d
INSTALL = install
INSTALL_DATA = $(INSTALL) -m644
INSTALL_EXEC = $(INSTALL) -m755
RULES_FILES = \
55-lfs.rules
DOC_FILES = $(RULES_FILES:.rules=.txt)
@ -11,6 +12,14 @@ DOC_FILES = $(RULES_FILES:.rules=.txt)
# Location to install the docs
DOC_DIR = $(PREFIX)/share/doc/udev-config
# for files shipped with udev up to version 182
SYS_LIB = /lib/udev
SYS_RULES_DIR = $(SYS_LIB)/rules.d
SYS_RULES = 75-cd-aliases-generator.rules \
75-persistent-net-generator.rules
SYS_FUNCTIONS = rule_generator.functions
SYS_SCRIPTS = write_cd_rules write_net_rules
all:
install: install-rules
@ -20,6 +29,17 @@ install-rules:
for rule in $(RULES_FILES); do \
$(INSTALL_DATA) $$rule $(DESTDIR)$(RULES_DIR) || exit 1; \
done;
$(INSTALL) -d $(DESTDIR)$(SYS_LIB)
for function in $(SYS_FUNCTIONS); do \
$(INSTALL_DATA) rule_generator/$$function $(DESTDIR)$(SYS_LIB) || exit 1; \
done;
for script in $(SYS_SCRIPTS); do \
$(INSTALL_EXEC) rule_generator/$$script $(DESTDIR)$(SYS_LIB) || exit 1; \
done;
$(INSTALL) -d $(DESTDIR)$(SYS_RULES_DIR)
for rule in $(SYS_RULES); do \
$(INSTALL_DATA) rule_generator/$$rule $(DESTDIR)$(SYS_RULES_DIR) || exit 1; \
done;
install-doc:
$(INSTALL) -d $(DESTDIR)$(DOC_DIR)