diff options
author | Ken Moffat <ken@linuxfromscratch.org> | 2006-03-29 21:02:45 +0000 |
---|---|---|
committer | Ken Moffat <ken@linuxfromscratch.org> | 2006-03-29 21:02:45 +0000 |
commit | 8cc086603a0658aeb2fcac57a08a808556313b59 (patch) | |
tree | 0f24b326ad271042411317b6e3b782c41c30df86 /chapter06 | |
parent | b6d990e214462505929335ac3f2b7c7cfe5b46b4 (diff) |
Apply r7469,r7471 from udev_update branch to trunk.
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7472 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
-rw-r--r-- | chapter06/man-db.xml | 56 | ||||
-rw-r--r-- | chapter06/shadow.xml | 20 |
2 files changed, 62 insertions, 14 deletions
diff --git a/chapter06/man-db.xml b/chapter06/man-db.xml index 9e70db05f..cbbe861d2 100644 --- a/chapter06/man-db.xml +++ b/chapter06/man-db.xml @@ -25,8 +25,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>0.1 SBU</seg> - <seg>1.1 MB</seg> + <seg>0.2 SBU</seg> + <seg>9.0 MB</seg> </seglistitem> </segmentedlist> @@ -116,6 +116,30 @@ EOF</userinput></screen> <screen><userinput>make install</userinput></screen> + <para>Some packages provide UTF-8 man pages which this version of + <command>man</command> is unable to display. The following script will + allow some of these to be converted into the expected encodings shown in + the table below. It will not help if you are using a UTF-8 locale. + Because this script is intended for limited use during the system build, + for public data, we will not bother with error checking, nor use a + non-predictable temporary file name.</para> + +<screen><userinput>cat >>convert-mans <<"EOF" +<literal>#!/bin/sh -e +FROM="$1" +TO="$2" +shift ; shift +while [ $# -gt 0 ] +do + FILE="$1" + shift + iconv -f "$FROM" -t "$TO" "$FILE" >.tmp.iconv + mv .tmp.iconv "$FILE" +done +</literal> +EOF +install -m755 convert-mans /usr/bin</userinput></screen> + <para>Additional information regarding the compression of man and info pages can be found in the BLFS book at <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para> @@ -274,16 +298,14 @@ cp -rv man? /usr/share/man/fr</userinput></screen> <para>If upstream distributes manual pages in UTF-8 (i.e., <quote>for RedHat</quote>) instead of the encoding listed in the table above, they have to be converted from UTF-8 to the encoding listed in the table before - installation. E.g., Spanish manual pages (<ulink - url="http://ditec.um.es/~piernas/manpages-es/man-pages-es-1.55.tar.bz2"/>) + installation. This can be achieved with convert-mans, e.g., Spanish manual + pages (<ulink url="http://ditec.um.es/~piernas/manpages-es/man-pages-es-1.55.tar.bz2"/>) can be installed with the following commands:</para> -<screen role="nodump"><userinput>mkdir -p /usr/share/man/es && -find man? -type f | grep -v 'man7/iso_8859-7.7' | \ -while read F ; do - iconv -f UTF-8 -t ISO-8859-1 $F >tmp ; mv tmp $F -done && -cp -rv man? /usr/share/man/es</userinput></screen> +<screen role="nodump"><userinput>mv man7/iso_8859-7.7{,X} +convert-mans UTF-8 ISO-8859-1 man?/*.? +mv man7/iso_8859-7.7{X,} +make install</userinput></screen> <note> <para>The need to exclude the <filename>man7/iso_8859-7.7</filename> file @@ -301,8 +323,8 @@ cp -rv man? /usr/share/man/es</userinput></screen> <segtitle>Installed programs</segtitle> <seglistitem> - <seg>accessdb, apropos, catman, lexgrog, man, mandb, manpath, - and whatis</seg> + <seg>accessdb, apropos, catman, convert-mans,lexgrog, man, mandb, + manpath, and whatis</seg> </seglistitem> </segmentedlist> @@ -344,6 +366,16 @@ cp -rv man? /usr/share/man/es</userinput></screen> </listitem> </varlistentry> + <varlistentry id="convert-mans"> + <term><command>convert-mans</command></term> + <listitem> + <para>Reformat man pages so that Man-DB can display them</para> + <indexterm zone="ch-system-man-db convert-mans"> + <primary sortas="b-convert-mans">convert-mans</primary> + </indexterm> + </listitem> + </varlistentry> + <varlistentry id="lexgrog"> <term><command>lexgrog</command></term> <listitem> diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml index c5a5ebc9c..2fc671da9 100644 --- a/chapter06/shadow.xml +++ b/chapter06/shadow.xml @@ -25,8 +25,8 @@ <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>0.4 SBU</seg> - <seg>14.7 MB</seg> + <seg>0.3 SBU</seg> + <seg>18.6 MB</seg> </seglistitem> </segmentedlist> @@ -81,6 +81,22 @@ find man -name Makefile -exec sed -i '/groups/d' {} \;</userinput></screen> <screen><userinput>sed -i -e 's/ ko//' -e 's/ zh_CN zh_TW//' man/Makefile</userinput></screen> + <para>Shadow supplies other manual pages in a UTF-8 encoding. Man-DB + can display these in the recommended encodings by using the convert-mans + script which we installed.</para> + +<screen><userinput> for i in de es fi fr id it pt_BR; do + convert-mans UTF-8 ISO-8859-1 man/${i}/*.? +done + +for i in cs hu pl; do + convert-mans UTF-8 ISO-8859-2 man/${i}/*.? +done + +convert-mans UTF-8 EUC-JP man/ja/*.? +convert-mans UTF-8 KOI8-R man/ru/*.? +convert-mans UTF-8 ISO-8859-9 man/tr/*.?</userinput></screen> + <para>Compile the package:</para> <screen><userinput>make</userinput></screen> |