Changeset 94aa6621


Ignore:
Timestamp:
12/26/2005 07:46:12 PM (18 years ago)
Author:
Archaic <archaic@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
b82f0c0
Parents:
5536f74
Message:

Reverting UTF-8 changes until everything is in place.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7236 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
2 deleted
28 edited

Legend:

Unmodified
Added
Removed
  • chapter01/changelog.xml

    r5536f74 r94aa6621  
    4545<listitem><para>Glibc &glibc-version;</para></listitem>
    4646<!-- <listitem><para>Grep &grep-version;</para></listitem> -->
    47 <!-- <listitem><para>Groff &groff-version;</para></listitem> -->
     47<listitem><para>Groff &groff-version;</para></listitem>
    4848<listitem><para>GRUB &grub-version;</para></listitem>
    4949<!-- <listitem><para>Gzip &gzip-version;</para></listitem> -->
     
    6060<listitem><para>M4 &m4-version;</para></listitem>
    6161<!-- <listitem><para>Make &make-version;</para></listitem> -->
    62 <listitem><para>Man-DB &man-db-version;</para></listitem>
     62<listitem><para>Man &man-version;</para></listitem>
    6363<listitem><para>Man-pages &man-pages-version;</para></listitem>
    6464<!-- <listitem><para>Mktemp &mktemp-version;</para></listitem> -->
     
    8484</listitem>
    8585
    86 <listitem><para>Downgraded to:</para>
    87 <itemizedlist>
    88 <listitem><para>Groff &groff-version;-&groff-patchlevel;</para></listitem>
    89 </itemizedlist>
    90 </listitem>
    91 
    9286<listitem><para>Added:</para>
    9387<itemizedlist>
     
    9690<listitem><para>&gawk-segfault-patch;</para></listitem>
    9791<listitem><para>&gcc-specs-patch;</para></listitem>
    98 <listitem><para>GDBM-&gdbm-version;</para></listitem>
    9992<listitem><para>&inetutils-gcc4_fixes-patch;</para></listitem>
    10093<listitem><para>&kbd-gcc4_fixes-patch;</para></listitem>
    101 <listitem><para>MAN-DB-&man-db-version;</para></listitem>
    10294<listitem><para>&mktemp-tempfile-patch;</para></listitem>
    10395<listitem><para>&perl-libc-patch;</para></listitem>
     
    116108<listitem><para>inetutils-1.4.2-kernel_headers-1.patch</para></listitem>
    117109<listitem><para>iproute2-2.6.11-050330-remove_db-1.patch</para></listitem>
    118 <listitem><para>Man-1.6b</para></listitem>
    119110<listitem><para>mktemp-1.5-add_tempfile-2.patch</para></listitem>
    120111<listitem><para>perl-5.8.6-libc-1.patch</para></listitem>
  • chapter03/packages.xml

    r5536f74 r94aa6621  
    138138
    139139<varlistentry>
    140 <term>GDBM (&gdbm-version;) - 228 KB:</term>
    141 <listitem>
    142 <para><ulink url="&gnu;gdbm/"/></para>
    143 </listitem>
    144 </varlistentry>
    145 
    146 <varlistentry>
    147140<term>Gettext (&gettext-version;) - 4,668 KB:</term>
    148141<listitem>
     
    166159
    167160<varlistentry>
    168 <term>Groff (&groff-version;) - 2,260 KB:</term>
     161<term>Groff (&groff-version;) - 2,096 KB:</term>
    169162<listitem>
    170163<para><ulink url="&gnu;groff/"/></para>
    171 </listitem>
    172 </varlistentry>
    173 
    174 <varlistentry>
    175 <term>Groff Debian Patch - 129 KB:</term>
    176 <listitem>
    177 <para><ulink url="http://ftp.debian.org/debian/pool/main/g/groff/&groff-debian-patch;"/></para>
    178 <note><para>Groff Debian Patch (&groff-version;-&groff-patchlevel;)
    179 may no longer be available at the
    180 listed location. The site administrators of the master download
    181 location occasionally remove older versions when new ones are
    182 released. There is no alternative download location yet.</para></note>
    183 <!-- Actually there's snapshot.debian.net, but they have hardware problems -->
    184164</listitem>
    185165</varlistentry>
     
    250230
    251231<varlistentry>
    252 <term>Replacement <command>console</command> script for LFS-Bootscripts (&lfs-bootscripts-version;) - 3 KB:</term>
    253 <listitem>
    254 <para><ulink url="&alexpatches;console"/></para>
    255 </listitem>
    256 </varlistentry>
    257 
    258 <varlistentry>
    259232<term>Libtool (&libtool-version;) - 1,642 KB:</term>
    260233<listitem>
     
    292265
    293266<varlistentry>
    294 <term>Man-DB (&man-db-version;) - 816 KB:</term>
    295 <listitem>
    296 <para><ulink url="http://savannah.nongnu.org/download/man-db/"/></para>
     267<term>Man (&man-version;) - 205 KB:</term>
     268<listitem>
     269<para><ulink url="http://primates.ximian.com/~flucifredi/man/"/></para>
    297270</listitem>
    298271</varlistentry>
     
    325298</listitem>
    326299</varlistentry>
    327 
    328 <!--
    329 <varlistentry>
    330 <term>Ncurses Rollup Patch (&ncurses-date;) - 328 KB:</term>
    331 <listitem>
    332 <para><ulink url="ftp://invisible-island.net/ncurses/&ncurses-version;/"/></para>
    333 <note><para>Ncurses Rollup Patch (&ncurses-date;) may no longer be available at the
    334 listed location. The site administrators of the master download
    335 location occasionally remove older versions when new ones are
    336 released. There is no alternative download location yet.</para></note>
    337 </listitem>
    338 </varlistentry>
    339 -->
    340300
    341301<varlistentry>
  • chapter03/patches.xml

    r5536f74 r94aa6621  
    3131
    3232<varlistentry>
    33 <term>Coreutils Internationalization Fixes Patch - 110 KB:</term>
    34 <listitem>
    35 <para><ulink url="&alexpatches;&coreutils-i18n-patch;"/></para>
    36 </listitem>
    37 </varlistentry>
    38 
    39 <varlistentry>
    4033<term>Coreutils Suppress Uptime, Kill, Su Patch - 15 KB:</term>
    4134<listitem>
     
    4841<listitem>
    4942<para><ulink url="&patches-root;&coreutils-uname-patch;"/></para>
    50 </listitem>
    51 </varlistentry>
    52 
    53 <varlistentry>
    54 <term>Diffutils Internationalization Fixes Patch - 18 KB:</term>
    55 <listitem>
    56 <para><ulink url="&alexpatches;&diffutils-i18n-patch;"/></para>
    5743</listitem>
    5844</varlistentry>
     
    8773
    8874<varlistentry>
    89 <term>Grep RedHat Fixes Patch - 56 KB:</term>
    90 <listitem>
    91 <para><ulink url="&alexpatches;&grep-fixes-patch;"/></para>
    92 </listitem>
    93 </varlistentry>
    94 
    95 <varlistentry>
    9675<term>Gzip Security Patch - 2 KB:</term><listitem>
    9776<para><ulink url="&patches-root;&gzip-security_fix-patch;"/></para>
    98 </listitem>
    99 </varlistentry>
    100 
    101 <varlistentry>
    102 <term>Kbd Backspace/Delete Fix Patch - 1 KB:</term>
    103 <listitem>
    104 <para><ulink url="&alexpatches;&kbd-backspace-patch;"/></para>
    10577</listitem>
    10678</varlistentry>
     
    128100
    129101<varlistentry>
    130 <term>Linux kernel UTF-8 Composing Patch - 3 KB:</term>
    131 <listitem>
    132 <para><ulink url="&alexpatches;&linux-utf8-patch;"/></para>
    133 </listitem>
    134 </varlistentry>
    135 
    136 <varlistentry>
    137102<term>Mktemp Tempfile Patch - 4 KB:</term>
    138103<listitem>
     
    142107
    143108<varlistentry>
    144 <term>Ncurses Fixes Patch - 9 KB:</term>
    145 <listitem>
    146 <para><ulink url="&alexpatches;&ncurses-fixes-patch;"/></para>
    147 </listitem>
    148 </varlistentry>
    149 
    150 <varlistentry>
    151109<term>Perl Libc Patch - 1 KB:</term>
    152110<listitem>
    153111<para><ulink url="&patches-root;&perl-libc-patch;"/></para>
    154 </listitem>
    155 </varlistentry>
    156 
    157 <varlistentry>
    158 <term>Sysklogd 8-Bit Cleanness Patch - 1 KB:</term>
    159 <listitem>
    160 <para><ulink url="&lfs-root;patches/downloads/sysklogd/&sysklogd-8bit-patch;"/></para>
    161112</listitem>
    162113</varlistentry>
     
    191142
    192143<varlistentry>
    193 <term>Texinfo Multibyte Fixes Patch - 1 KB:</term>
    194 <listitem>
    195 <para><ulink url="&alexpatches;&texinfo-multibyte-patch;"/></para>
    196 </listitem>
    197 </varlistentry>
    198 
    199 
    200 <varlistentry>
    201144<term>Texinfo Tempfile Fix Patch - 2 KB:</term>
    202145<listitem>
  • chapter05/gawk.xml

    r5536f74 r94aa6621  
    3232<screen><userinput>./configure --prefix=/tools</userinput></screen>
    3333
    34 <para>Due to a bug in the <command>./configure</command> script, Gawk fails
    35 to detect certain aspects of locale support in glibc. This
    36 bug leads to, e.g., Gettext testsuite failures. Work around this issue
    37 by appending the missing macro definitions to <filename>config.h</filename>:</para>
    38 <screen><userinput>cat &gt;&gt;config.h &lt;&lt;"EOF"
    39 <literal>#define HAVE_LANGINFO_CODESET 1
    40 #define HAVE_LC_MESSAGES 1</literal>
    41 EOF</userinput></screen>
     34<para>The configure script doesn't detect some functionality correctly.  The
     35following commands correct this problem:</para>
     36
     37<screen><userinput>echo "#define HAVE_LANGINFO_CODESET 1" >> config.h
     38echo "#define HAVE_LC_MESSAGES 1" >> config.h</userinput></screen>
    4239
    4340<para>Compile the package:</para>
  • chapter05/glibc.xml

    r5536f74 r94aa6621  
    2828<title>Installation of Glibc</title>
    2929
    30 <para>The glibc-libidn tarball adds support for internationalized
    31 (non-ASCII) domain names to Glibc. While this facility is not
    32 useful in this chapter, the installation commands of
    33 <xref linkend="chapter-building-system"/>
    34 glibc (wrongly) check <xref linkend="chapter-temporary-tools"/> glibc for
    35 this feature. Unpack the tarball from within the Glibc source
    36 directory in order to avoid this bogus failure:</para>
    37 
    38 <screen><userinput>tar jxf ../glibc-libidn-&glibc-version;.tar.bz2</userinput></screen>
    39 <!-- TODO: DIY Linux modifies the installation check script in Chapte 6 instead -->
    40 
    4130<para>The Glibc documentation recommends building Glibc outside of the source
    4231directory in a dedicated build directory:</para>
     
    4837
    4938<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
    50     --disable-profile --enable-add-ons=nptl,libidn \
     39    --disable-profile --enable-add-ons \
    5140    --enable-kernel=2.6.0 --with-binutils=/tools/bin \
    5241    --without-gd --with-headers=/tools/include \
     
    6453
    6554<varlistentry>
    66 <term><parameter>--enable-add-ons=nptl,libidn</parameter></term>
     55<term><parameter>--enable-add-ons</parameter></term>
    6756<listitem><para>This tells Glibc to use the NPTL add-on as its threading
    68 library, and adds support for non-ASCII domain names.</para></listitem>
     57library.</para></listitem>
    6958</varlistentry>
    7059
  • chapter06/chapter06.xml

    r5536f74 r94aa6621  
    3535<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
    3636<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="less.xml"/>
    37 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gdbm.xml"/>
    3837<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/>
    3938<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
     
    5756<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
    5857<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="hotplug.xml"/>
    59 <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-db.xml"/>
     58<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man.xml"/>
    6059<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
    6160<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="module-init-tools.xml"/>
  • chapter06/coreutils.xml

    r5536f74 r94aa6621  
    4141
    4242<screen><userinput>patch -Np1 -i ../&coreutils-suppress-patch;</userinput></screen>
    43 
    44 <para>POSIX requires that programs from Coreutils recognize character
    45 boundaries correctly even in multibyte locales. The following patch
    46 fixes this non-compliance and other internationalization-related bugs:</para>
    47 
    48 <screen><userinput>patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
    49 
    50 <para>In order for the tests added by this patch to pass, the permissions for
    51 the test file have to be changed:</para>
    52 
    53 <screen><userinput>chmod +x tests/sort/sort-mb-tests</userinput></screen>
    54 
    55 <note><para>In the past, many bugs were found in this patch. When reporting
    56 new bugs to Coreutils maintainers, please check first if they are reproducible
    57 without this patch.</para></note>
    58 
    59 <para>It has been found that translated messages sometimes overflow a buffer
    60 in the <command>who -Hu</command> command. Increase the buffer size:</para>
    61 
    62 <screen><userinput>sed -i 's,_LEN 6,_LEN 20,' src/who.c</userinput></screen>
    6343
    6444<para>Now prepare Coreutils for compilation:</para>
  • chapter06/diffutils.xml

    r5536f74 r94aa6621  
    2929<sect2 role="installation">
    3030<title>Installation of Diffutils</title>
    31 
    32 <para>POSIX requires that the <command>diff</command> command treats whitespace
    33 characters according to the current locale. The following patch fixes the
    34 non-complinace issue:</para>
    35 
    36 <screen><userinput>patch -Np1 -i ../&diffutils-i18n-patch;</userinput></screen>
    3731
    3832<para>Prepare Diffutils for compilation:</para>
  • chapter06/gawk.xml

    r5536f74 r94aa6621  
    2929<title>Installation of Gawk</title>
    3030
    31 <para>Under some circumstances, Gawk-&gawk-version;  attempts to free a chunk
    32 of memory that was not allocated. This bug is fixed by the following patch:</para>
     31<para>Patch Gawk to fix a bug which causes it to segfault when invoked on a
     32non-existent file:</para>
    3333
    3434<screen><userinput>patch -Np1 -i ../&gawk-segfault-patch;</userinput></screen>
     
    3838<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
    3939
    40 <para>Due to a bug in the <command>./configure</command> script, Gawk fails
    41 to detect certain aspects of locale support in glibc. This
    42 bug leads to, e.g., Gettext testsuite failures. Work around this issue
    43 by appending the missing macro definitions to <filename>config.h</filename>:</para>
     40<para>The configure script doesn't detect some functionality correctly.  The
     41following commands correct this problem:</para>
    4442
    45 <screen><userinput>cat &gt;&gt;config.h &lt;&lt;"EOF"
    46 <literal>#define HAVE_LANGINFO_CODESET 1
    47 #define HAVE_LC_MESSAGES 1</literal>
    48 EOF</userinput></screen>
     43<screen><userinput>echo "#define HAVE_LANGINFO_CODESET 1" >> config.h
     44echo "#define HAVE_LC_MESSAGES 1" >> config.h</userinput></screen>
    4945
    5046<para>Compile the package:</para>
  • chapter06/glibc.xml

    r5536f74 r94aa6621  
    4848of achieving a clean build.</para>
    4949
    50 <para>The glibc-libidn tarball adds support for internationalized
    51 domain names (IDN) to Glibc. Note that many programs that
    52 support IDN require the full libidn library from
    53 <ulink url="http://josefsson.org/libidn/releases/"/>, not this add-on.
    54 Unpack the tarball from within the Glibc source
    55 directory:</para>
    56 
    57 <screen><userinput>tar jxf ../glibc-libidn-&glibc-version;.tar.bz2</userinput></screen>
    58 
    59 <para>In the vi_VN.TCVN locale, bash enters infinite loop at startup. It is
    60 unknown whether this is a bash bug or a glibc problem. Disable installation
    61 of this locale in order to avoid the problem:</para>
    62 
    63 <screen><userinput>sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED</userinput></screen>
    64 
    6550<para>The Glibc documentation recommends building Glibc outside of the source
    6651directory in a dedicated build directory:</para>
     
    7257
    7358<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
    74     --disable-profile --enable-add-ons=nptl,libidn \
     59    --disable-profile --enable-add-ons \
    7560    --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc</userinput></screen>
    7661
     
    144129
    145130<screen><userinput>make localedata/install-locales</userinput></screen>
    146 
    147 <note><para>It is possible to create and install additional locales such as
    148 ru_RU.CP1251 by means of the <command>localedef</command> command, as
    149 explained in the <filename>INSTALL</filename> file in the Glibc source.</para></note>
    150 <!-- The Live CD patches the localedata/SUPPORTED file instead of running localedef -->
    151131
    152132<para>To save time, an alternative to running the
     
    163143for the tests to run successfully:</para>
    164144
    165 <!-- FIXME: recheck that "make localedata/install_locales" actually does the same -->
    166145<screen role="nodump"><userinput>mkdir -pv /usr/lib/locale
    167146localedef -i de_DE -f ISO-8859-1 de_DE
     
    174153localedef -i fr_FR -f ISO-8859-1 fr_FR
    175154localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
    176 localedef -i fr_FR.UTF-8 -f UTF-8 fr_FR
    177155localedef -i it_IT -f ISO-8859-1 it_IT
    178156localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
    179157
    180 <para>The first <command>localedef</command> above combines the
    181 <filename>/usr/share/i18n/locales/de_DE</filename> charset-independent
    182 locale definition with the
    183 <filename>/usr/share/i18n/charmaps/ISO-8859-1.gz</filename> charmap definition
    184 and appends the result to the
    185 <filename>/usr/lib/locale/locale-archive</filename> file.</para>
     158<para>Some locales installed by the <command>make
     159localedata/install-locales</command> command above are not properly
     160supported by some applications that are in the LFS and BLFS books.
     161Because of the various problems that arise due to application
     162programmers making assumptions that break in such locales, LFS should
     163not be used in locales that utilize multibyte character sets
     164(including UTF-8) or right-to-left writing order.  Numerous unofficial
     165and unstable patches are required to fix these problems, and it has
     166been decided by the LFS developers not to support such complex locales at this
     167time.  This applies to the ja_JP and fa_IR locales as well&mdash;they have been
     168installed only for GCC and Gettext tests to pass, and the
     169<command>watch</command> program (part of the Procps package) does not work
     170properly in them. Various attempts to circumvent these restrictions are
     171documented in internationalization-related hints.</para>
     172
    186173</sect2>
    187174
  • chapter06/grep.xml

    r5536f74 r94aa6621  
    2828<sect2 role="installation">
    2929<title>Installation of Grep</title>
    30 
    31 <para>The original Grep package has many bugs, especially in the support of
    32 multibyte locales. RedHat fixed some of them by the following patch:</para>
    33 
    34 <screen><userinput>patch -Np1 -i ../&grep-fixes-patch;</userinput></screen>
    35 
    36 <para>In order for the tests added by this patch to pass, the permissions for
    37 the test file have to be changed:</para>
    38 
    39 <screen><userinput>chmod +x tests/fmbtest.sh</userinput></screen>
    4030
    4131<para>Prepare Grep for compilation:</para>
  • chapter06/groff.xml

    r5536f74 r94aa6621  
    2929<title>Installation of Groff</title>
    3030
    31 <para>Apply the patch that adds the "ascii8" and "nippon" devices to Groff:</para>
    32 
    33 <screen><userinput>zcat ../&groff-debian-patch; | patch -Np1</userinput></screen>
    34 
    35 <note><para>These devices are used by Man-DB when formatting non-English manual
    36 pages that are not in the ISO-8859-1 encoding. There is no working patch for
    37 Groff-1.19.x that adds this functionality at the time of this writing.
    38 <!-- Details: http://bugs.debian.org/196762 -->
    39 </para></note>
    40 
    41 <para>Many screen fonts don't have Unicode dashes in them. Tell groff to use
    42 the ASCII hyphen instead:</para>
    43 
    44 <screen><userinput>sed -i 's,2010,002D,' font/devutf8/R.proto
    45 sed -i 's,2212,002D,' font/devutf8/R.proto</userinput></screen>
    46 
    4731<para>Groff expects the environment variable <envar>PAGE</envar>
    4832to contain the default paper size. For users in the United States,
    4933<parameter>PAGE=letter</parameter> is appropriate. Elsewhere,
    50 <parameter>PAGE=A4</parameter> may be more suitable.
    51 The default paper size can be changed after installation by writing
    52 the word "A4" or "letter" to the <filename>/etc/papersize</filename>
    53 file.</para>
     34<parameter>PAGE=A4</parameter> may be more suitable.</para>
    5435
    5536<para>Prepare Groff for compilation:</para>
  • chapter06/kbd.xml

    r5536f74 r94aa6621  
    2929<title>Installation of Kbd</title>
    3030
    31 <para>The behaviour of Backspace and Delete keys is not consistent across the
    32 keymaps in the Kbd package. The following patch fixes this issue for
    33 i386 keymaps:</para>
    34 
    35 <screen><userinput>patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
    36 
    37 <para>After patching, the Backspace key generates the character with code 127,
    38 and the Delete key generates a well-known escape sequence.</para>
    39 
    4031<para>Patch Kbd to fix a bug in <command>setfont</command> that is triggered
    4132when compiling with GCC-&gcc-version;:</para>
     
    5647
    5748<screen><userinput>make install</userinput></screen>
    58 
    59 <note>For some languages, e.g. Belarusian, the Kbd package doesn't provide
    60 a useful keymap (the stock "by" keymap assumes the ISO-8859-5 encoding,
    61 while everybody uses CP1251 instead). Users of such languages
    62 have to download working keymaps separately.</note>
    6349
    6450</sect2>
     
    289275<term><command>unicode_start</command></term>
    290276<listitem>
    291 <para>Puts the keyboard and console in UNICODE mode. Don't use this program
    292 unless your keymap file is in the ISO-8859-1 encoding. For other encodings,
    293 this utility produces incorrect results.</para>
     277<para>Puts the keyboard and console in UNICODE mode. Never use it on LFS,
     278because applications are not configured to support UNICODE.</para>
    294279<indexterm zone="ch-system-kbd unicode_start"><primary sortas="b-unicode_start">unicode_start</primary></indexterm>
    295280</listitem>
  • chapter06/man.xml

    r5536f74 r94aa6621  
     1<?xml version="1.0" encoding="ISO-8859-1"?>
     2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
     3  <!ENTITY % general-entities SYSTEM "../general.ent">
     4  %general-entities;
     5]>
     6<sect1 id="ch-system-man" role="wrap">
     7<title>Man-&man-version;</title>
     8<?dbhtml filename="man.html"?>
     9
     10<indexterm zone="ch-system-man"><primary sortas="a-Man">Man</primary></indexterm>
     11
     12<sect2 role="package"><title/>
     13<para>The Man package contains programs for finding and viewing man pages.</para>
     14
     15<segmentedlist>
     16<segtitle>&buildtime;</segtitle>
     17<segtitle>&diskspace;</segtitle>
     18<seglistitem><seg>0.1 SBU</seg><seg>1.3 MB</seg></seglistitem>
     19</segmentedlist>
     20
     21<segmentedlist>
     22<segtitle>&dependencies;</segtitle>
     23<seglistitem><seg>Bash, Binutils, Coreutils, Gawk, GCC,
     24Glibc, Grep, Make, and Sed</seg></seglistitem>
     25</segmentedlist>
     26</sect2>
     27
     28<sect2 role="installation">
     29<title>Installation of Man</title>
     30
     31<para>Two adjustments need to be made to the sources of Man.</para>
     32
     33<para>The first is a <command>sed</command> substitution to add the
     34<parameter>-R</parameter> switch to the <envar>PAGER</envar>
     35variable so that escape sequences are properly handled by Less:</para>
     36
     37<screen><userinput>sed -i 's@-is@&amp;R@g' configure</userinput></screen>
     38
     39<para>The second is also a <command>sed</command> substitution to comment out the
     40<quote>MANPATH /usr/man</quote> line in the
     41<filename>man.conf</filename> file to prevent redundant results when
     42using programs such as <command>whatis</command>:</para>
     43
     44<screen><userinput>sed -i 's@MANPATH./usr/man@#&amp;@g' src/man.conf.in</userinput></screen>
     45
     46<para>Prepare Man for compilation:</para>
     47
     48<screen><userinput>./configure -confdir=/etc</userinput></screen>
     49
     50<para>The meaning of the configure options:</para>
     51
     52<variablelist>
     53<varlistentry>
     54<term><parameter>-confdir=/etc</parameter></term>
     55<listitem><para>This tells the <command>man</command> program to look for the
     56<filename>man.conf</filename> configuration file in the <filename
     57class="directory">/etc</filename> directory.</para></listitem>
     58</varlistentry>
     59</variablelist>
     60
     61<para>Compile the package:</para>
     62
     63<screen><userinput>make</userinput></screen>
     64
     65<para>This package does not come with a test suite.</para>
     66
     67<para>Install the package:</para>
     68
     69<screen><userinput>make install</userinput></screen>
     70
     71<note><para>If you will be working on a terminal that does not support text
     72attributes such as color and bold, you can disable Select Graphic Rendition
     73(SGR) escape sequences by editing the <filename>man.conf</filename> file and
     74adding the <parameter>-c</parameter> option to the <envar>NROFF</envar>
     75variable. If you use multiple terminal types for one computer it may be better
     76to selectively add the <envar>GROFF_NO_SGR</envar> environment variable for the
     77terminals that do not support SGR.</para></note>
     78
     79<para>If the character set of the locale uses 8-bit characters, search for the
     80line beginning with <quote>NROFF</quote> in <filename>/etc/man.conf</filename>,
     81and verify that it matches the following:</para>
     82
     83<screen>NROFF  /usr/bin/nroff -Tlatin1 -mandoc</screen>
     84
     85<para>Note that <quote>latin1</quote> should be used even if it is not
     86the character set of the locale. The reason is that, according to the
     87specification, <command>groff</command> has no means of typesetting
     88characters outside International Organization for Standards
     89(ISO) 8859-1 without some strange escape codes. When formatting man
     90pages, <command>groff</command> thinks that they are in the ISO 8859-1
     91encoding and this <parameter>-Tlatin1</parameter> switch tells
     92<command>groff</command> to use the same encoding for output. Since
     93<command>groff</command> does no recoding of input characters, the
     94formatted result is really in the same encoding as input, and therefore
     95it is usable as the input for a pager.</para>
     96
     97<para>This does not solve the problem of a non-working
     98<command>man2dvi</command> program for localized man pages in
     99non-ISO 8859-1 locales. Also, it does not work with multibyte
     100character sets. The first problem does not currently have a solution.
     101The second issue is not of concern because the LFS installation does
     102not support multibyte character sets.</para>
     103
     104<para>Additional information with regards to the compression of
     105man and info pages can be found in the BLFS book at
     106<ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/>.</para>
     107
     108</sect2>
     109
     110
     111<sect2 id="contents-man" role="content"><title>Contents of Man</title>
     112
     113<segmentedlist>
     114<segtitle>Installed programs</segtitle>
     115<seglistitem><seg>apropos, makewhatis, man,
     116man2dvi, man2html, and whatis</seg></seglistitem>
     117</segmentedlist>
     118
     119<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead>
     120<?dbfo list-presentation="list"?>
     121<?dbhtml list-presentation="table"?>
     122
     123<varlistentry id="apropos">
     124<term><command>apropos</command></term>
     125<listitem>
     126<para>Searches the <command>whatis</command> database and displays the short descriptions
     127of system commands that contain a given string</para>
     128<indexterm zone="ch-system-man apropos"><primary sortas="b-apropos">apropos</primary></indexterm>
     129</listitem>
     130</varlistentry>
     131
     132<varlistentry id="makewhatis">
     133<term><command>makewhatis</command></term>
     134<listitem>
     135<para>Builds the <command>whatis</command> database; it reads all the man pages
     136in the <envar>MANPATH</envar> and writes the name and a short description in the
     137<command>whatis</command> database for each page</para>
     138<indexterm zone="ch-system-man makewhatis"><primary sortas="b-makewhatis">makewhatis</primary></indexterm>
     139</listitem>
     140</varlistentry>
     141
     142<varlistentry id="man">
     143<term><command>man</command></term>
     144<listitem>
     145<para>Formats and displays the requested on-line man page</para>
     146<indexterm zone="ch-system-man man"><primary sortas="b-man">man</primary></indexterm>
     147</listitem>
     148</varlistentry>
     149
     150<varlistentry id="man2dvi">
     151<term><command>man2dvi</command></term>
     152<listitem>
     153<para>Converts a man page into dvi format</para>
     154<indexterm zone="ch-system-man man2dvi"><primary sortas="b-man2dvi">man2dvi</primary></indexterm>
     155</listitem>
     156</varlistentry>
     157
     158<varlistentry id="man2html">
     159<term><command>man2html</command></term>
     160<listitem>
     161<para>Converts a man page into HTML</para>
     162<indexterm zone="ch-system-man man2html"><primary sortas="b-man2html">man2html</primary></indexterm>
     163</listitem>
     164</varlistentry>
     165
     166<varlistentry id="whatis">
     167<term><command>whatis</command></term>
     168<listitem>
     169<para>Searches the <command>whatis</command> database and displays the short descriptions
     170of system commands that contain the given keyword as a separate
     171word</para>
     172<indexterm zone="ch-system-man whatis"><primary sortas="b-whatis">whatis</primary></indexterm>
     173</listitem>
     174</varlistentry>
     175</variablelist>
     176
     177</sect2>
     178
     179</sect1>
     180
  • chapter06/ncurses.xml

    r5536f74 r94aa6621  
    2929<sect2 role="installation">
    3030<title>Installation of Ncurses</title>
    31 <!-- Uncomment if using a dated ncurses release instead of a numbered one.
    32 
    33 <para>Since the release of Ncurses-&ncurses-version;, some bugs have been fixed
    34 and features added. The most important news are .......
    35 To get these fixes and features, apply the rollup patch:</para>
    36 
    37 <screen><userinput>bzcat ../&ncurses-rollup-patch; | patch -Np1</userinput></screen>
    38 -->
    39 
    40 <para>Since the release of Ncurses-&ncurses-version;, a memory leak and some
    41 display bugs were found and fixed upstream. Apply those fixes:</para>
    42 
    43 <screen><userinput>patch -Np1 -i ../&ncurses-fixes-patch;</userinput></screen>
    4431
    4532<para>Prepare Ncurses for compilation:</para>
    4633
    47 <screen><userinput>./configure --prefix=/usr --with-shared --without-debug --enable-widec</userinput></screen>
    48 
    49 <para>The meaning of the configure options:</para>
    50 
    51 <variablelist>
    52 <varlistentry>
    53 <term><parameter>--enable-widec</parameter></term>
    54 <listitem><para>This switch causes wide-character libraries
    55 (e.g. <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>)
    56 to be built instead of normal ones
    57 (e.g. <filename class="libraryfile">libncurses.so.&ncurses-version;</filename>).
    58 Those wide-character libraries are usable in both multibyte and traditional 8-bit
    59 locales, while normal libraries work properly only in 8-bit locales.
    60 Wide-character and normal libraries are source-compatible, but not
    61 binary-compatible.</para>
    62 </listitem>
    63 </varlistentry>
    64 <!--
    65 <varlistentry>
    66 <term><parameter>- -without-cxx-binding</parameter></term>
    67 <listitem><para>This optional switch causes the
    68 <filename class="libraryfile">libncurses++w.a</filename> library
    69 not to be built. Nothing in LFS and BLFS uses this library.</para>
    70 </listitem>
    71 </varlistentry>
    72 -->
    73 </variablelist>
     34<screen><userinput>./configure --prefix=/usr --with-shared --without-debug</userinput></screen>
    7435
    7536<para>Compile the package:</para>
     
    8950<para>Fix a library that should not be executable:</para>
    9051
    91 <screen><userinput>chmod -v 644 /usr/lib/libncurses++w.a</userinput></screen>
     52<screen><userinput>chmod -v 644 /usr/lib/libncurses++.a</userinput></screen>
    9253
    9354<para>Move the libraries to the <filename class="directory">/lib</filename> directory,
    9455where they are expected to reside:</para>
    9556
    96 <screen><userinput>mv -v /usr/lib/libncursesw.so.5* /lib</userinput></screen>
    97 
    98 <para>Because the libraries have been moved, one symlink points to
    99 a non-existent file. Recreate it:</para>
    100 
    101 <screen><userinput>ln -sfv ../../lib/libncursesw.so.5 /usr/lib/libncursesw.so</userinput></screen>
    102 
    103 <para>Many applications still expect the linker to be able to find
    104 non-wide-character Ncurses libraries. Trick such applications into linking with
    105 wide-character libraries by means of symlinks and linker scripts:</para>
    106 
    107 <screen><userinput>for lib in curses ncurses form panel menu ; do \
    108         rm -vf /usr/lib/lib${lib}.so ; \
    109         echo "INPUT(-l${lib}w)" &gt;/usr/lib/lib${lib}.so ; \
    110         ln -sfv lib${lib}w.a /usr/lib/lib${lib}.a ; \
    111 done &amp;&amp;
    112 ln -sfv libncurses++w.a /usr/lib/libncurses++.a</userinput></screen>
    113 
    114 <para>Finally, make sure that really old applications that look for
    115 <filename class="libaryfile">-lcurses</filename> at build time are still
    116 buildable:</para>
    117 
    118 <screen><userinput>echo "INPUT(-lncursesw)" &gt;/usr/lib/libcursesw.so &amp;&amp;
    119 ln -sfv libncurses.so /usr/lib/libcurses.so &amp;&amp;
    120 ln -sfv libncursesw.a /usr/lib/libcursesw.a &amp;&amp;
    121 ln -sfv libncurses.a /usr/lib/libcurses.a</userinput></screen>
    122 
    123 <note><para>The instructions above don't create non-wide-character Ncurses
    124 libraries since nothing in LFS and BLFS would link against them at runtime.
    125 If you must have such libraries because of some binary-only application,
    126 build them with the following commands:</para>
    127 <screen role="nodump"><userinput>make distclean &amp;&amp;
    128 ./configure --prefix=/usr --with-shared --without-normal \
    129         --without-debug --without-cxx-binding &amp;&amp;
    130 make sources libs &amp;&amp;
    131 cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
    132 </note>
     57<screen><userinput>mv -v /usr/lib/libncurses.so.5* /lib</userinput></screen>
     58
     59<para>Because the libraries have been moved, a few symlinks point to
     60non-existent files. Recreate those symlinks:</para>
     61
     62<screen><userinput>ln -sfv ../../lib/libncurses.so.5 /usr/lib/libncurses.so
     63ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen>
    13364</sect2>
    13465
     
    14172<seglistitem><seg>captoinfo (link to tic), clear, infocmp, infotocap (link to tic),
    14273reset (link to tset), tack, tic, toe, tput, and tset</seg>
    143 <seg>libcursesw.[a,so] (symlink and linker script to libncursesw.[a,so]),
    144 libformw.[a,so], libmenuw.[a,so],
    145 libncurses++w.a, libncursesw.[a,so], libpanelw.[a,so] and their
    146 non-wide-character counterparts without "w" in the library names.</seg></seglistitem>
     74<seg>libcurses.[a,so] (link to libncurses.[a,so]), libform.[a,so], libmenu.[a,so],
     75libncurses++.a, libncurses.[a,so], and libpanel.[a,so]</seg></seglistitem>
    14776</segmentedlist>
    14877
     
    284213
    285214</sect1>
     215
  • chapter06/readline.xml

    r5536f74 r94aa6621  
    4444<term><parameter>SHLIB_LIBS=-lncurses</parameter></term>
    4545<listitem><para>This option forces Readline to link against the
    46 <filename class="libraryfile">libncurses</filename>
    47 (really, <filename class="libraryfile">libncursesw</filename>)
    48 library.</para></listitem>
     46<filename class="libraryfile">libncurses</filename> library.</para></listitem>
    4947</varlistentry>
    5048</variablelist>
  • chapter06/sysklogd.xml

    r5536f74 r94aa6621  
    3333
    3434<screen><userinput>patch -Np1 -i ../&sysklogd-fixes-patch;</userinput></screen>
    35 
    36 <para>The following patch makes sysklogd treat bytes in the 0x80--0x9f range
    37 literally in the messages being logged, instead of replacing them with octal
    38 codes. Such replacement caused damage to messages in UTF-8 encoding.</para>
    39 
    40 <screen><userinput>patch -Np1 -i ../&sysklogd-8bit-patch;</userinput></screen>
    4135
    4236<para>Compile the package:</para>
  • chapter06/sysvinit.xml

    r5536f74 r94aa6621  
    8585su:S016:once:/sbin/sulogin
    8686
    87 1:2345:respawn:/sbin/agetty tty1 9600
    88 2:2345:respawn:/sbin/agetty tty2 9600
    89 3:2345:respawn:/sbin/agetty tty3 9600
    90 4:2345:respawn:/sbin/agetty tty4 9600
    91 5:2345:respawn:/sbin/agetty tty5 9600
    92 6:2345:respawn:/sbin/agetty tty6 9600
     871:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
     882:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
     893:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
     904:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
     915:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
     926:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
    9393
    9494# End /etc/inittab</literal>
    9595EOF</userinput></screen>
     96
     97<para>The <parameter>-I '\033(K'</parameter> option tells
     98<command>agetty</command> to send this escape sequence to the terminal
     99before doing anything else. This escape sequence switches the console
     100character set to a user-defined one, which can be modified by running
     101the <command>setfont</command> program. The <command>console</command>
     102initscript from the LFS-Bootscripts package calls the <command>setfont</command>
     103program during system startup. Sending this escape sequence is
     104necessary for people who use non-ISO 8859-1 screen fonts, but it does
     105not affect native English speakers.</para>
     106
    96107</sect2>
    97108
  • chapter06/texinfo.xml

    r5536f74 r94aa6621  
    2929<sect2 role="installation">
    3030<title>Installation of Texinfo</title>
    31 
    32 <para>The <command>info</command> program makes assumptions such as "a string
    33 occupies the same number of character cells on the screen and bytes in memory"
    34 and "one can break the string anywhere" that are incorrect in UTF-8 locales.
    35 While the patch below is not the proper solution, it at least hides the problem
    36 by falling back to English messages when a multibyte locale is in use:</para>
    37 
    38 <screen><userinput>patch -Np1 -i ../&texinfo-multibyte-patch;</userinput></screen>
    3931
    4032<para>Texinfo allows local users to overwrite arbitrary files via a symlink
  • chapter06/udev.xml

    r5536f74 r94aa6621  
    7979<screen><userinput>install -m644 -D -v docs/writing_udev_rules/index.html /usr/share/doc/udev-&udev-version;/index.html</userinput></screen>
    8080
    81 <!-- Not for the LiveCD -->
    8281<!-- Edit Me -->
    8382<para>Run the <command>udevstart</command> program to create our full
  • chapter06/vim.xml

    r5536f74 r94aa6621  
    5454<varlistentry>
    5555<term><parameter>--enable-multibyte</parameter></term>
    56 <listitem><para>This switch enables support for
     56<listitem><para>This optional but highly recommended switch enables support for
    5757editing files in multibyte character encodings.  This is needed if using a
    5858locale with a multibyte character set. This switch is also helpful to be able to
     
    7575
    7676<screen><userinput>make install</userinput></screen>
    77 
    78 <para>In UTF-8 locales, the <command>vimtutor</command> program
    79 tries to convert the tutorials from ISO-8859-1 to UTF-8. Since
    80 some tutorials are not in ISO-8859-1, the text in them is thus made unreadable.
    81 If you unpacked the <filename>vim-&vim-version;-lang.tar.gz</filename>
    82 archive and are going to use a UTF-8 based locale, remove non-ISO-8859-1
    83 tutorials. An English tutorial will be used instead.</para>
    84 <!-- Removal is used instead of conversion in order for the user to be able to
    85 painlessly revert his UTF-8 locale choice. -->
    86 
    87 <screen><userinput>rm -f /usr/share/vim/vim64/tutor/tutor.{gr,pl,ru,sk}
    88 rm -f /usr/share/vim/vim64/tutor/tutor.??.*</userinput></screen>
    8977
    9078<para>Many users are used to using <command>vi</command> instead of
  • chapter07/bootscripts.xml

    r5536f74 r94aa6621  
    4747
    4848<screen><userinput>make install</userinput></screen>
    49 
    50     <para>The <command>console</command> script that comes with
    51     LFS-Bootscripts-&lfs-bootscripts-version; doesn't support Unicode. Install
    52     a replacement version:</para>
    53 
    54 <screen><userinput>install -m755 ../console /etc/rc.d/init.d</userinput></screen>
    5549
    5650  </sect2>
  • chapter07/console.xml

    r5536f74 r94aa6621  
    1818  <para>This section discusses how to configure the <command>console</command>
    1919  bootscript that sets up the keyboard map and the console font. If non-ASCII
    20   characters (e.g., the copyright sign, the British pound sign and Euro symbol)
    21   will not be used and the keyboard is a U.S. one, skip this section. Without
    22   the configuration file, the <command>console</command> bootscript will do
    23   nothing.</para>
     20  characters (e.g., the British pound sign and Euro character) will not be used
     21  and the keyboard is a U.S. one, skip this section. Without the configuration
     22  file, the <command>console</command> bootscript will do nothing.</para>
    2423
    2524  <para>The <command>console</command> script reads the
    2625  <filename>/etc/sysconfig/console</filename> file for configuration information.
    2726  Decide which keymap and screen font will be used. Various language-specific
    28   HOWTO's can also help with this, see <ulink
    29   url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in
    30   doubt, look in the <filename class="directory">/usr/share/kbd</filename>
    31   directory for valid keymaps and screen fonts. Read
    32   <filename>loadkeys(1)</filename> and <filename>setfont(8)</filename> manual
    33   pages to determine the correct arguments for these programs.</para>
     27  HOWTO's can also help with this (see <ulink
     28  url="http://www.tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. A pre-made
     29  <filename>/etc/sysconfig/console</filename> file with known settings for several
     30  countries was installed with the LFS-Bootscripts package, so the relevant
     31  section can be uncommented if the country is supported. If still in doubt, look
     32  in the <filename class="directory">/usr/share/kbd</filename> directory for valid
     33  keymaps and screen fonts. Read <filename>loadkeys(1)</filename> and
     34  <filename>setfont(8)</filename> to determine the correct arguments for
     35  these programs. Once decided, create the configuration file with the following
     36  command:</para>
    3437
    35   <para>The <filename>/etc/sysconfig/console</filename> file should contain lines
    36   of the form: VARIABLE="value". The following variables are recognized:</para>
     38<screen><userinput>cat &gt;/etc/sysconfig/console &lt;&lt;"EOF"
     39<literal>KEYMAP="<replaceable>[arguments for loadkeys]</replaceable>"
     40FONT="<replaceable>[arguments for setfont]</replaceable>"</literal>
     41EOF</userinput></screen>
    3742
    38   <variablelist>
     43  <para>For example, for Spanish users who also want to use the Euro
     44  character (accessible by pressing AltGr+E), the following settings are
     45  correct:</para>
    3946
    40     <varlistentry>
    41       <term>KEYMAP</term>
    42       <listitem>
    43         <para>This variable specifies the arguments for the
    44         <command>loadkeys</command> program, typically, the name of keymap
    45         to load, e.g. "es". If this variable is not set, the bootscript will
    46         not run the <command>loadkeys</command> program, and the default kernel
    47         keymap will be used.</para>
    48       </listitem>
    49     </varlistentry>
     47<screen role="nodump"><userinput>cat &gt;/etc/sysconfig/console &lt;&lt;"EOF"
     48<literal>KEYMAP="es euro2"
     49FONT="lat9-16 -u iso01"</literal>
     50EOF</userinput></screen>
    5051
    51     <varlistentry>
    52       <term>KEYMAP_CORRECTIONS</term>
    53       <listitem>
    54         <para>This (rarely used) variable
    55         specifies the arguments for the second call to the
    56         <command>loadkeys</command> program. This is useful if the stock keymap
    57         is not completely satisfactory and a small adjustment has to be made. E.g.,
    58         to include the Euro sign into a keymap that normally doesn't have it,
    59         set this variable to "euro2".</para>
    60       </listitem>
    61     </varlistentry>
     52  <note>
     53    <para>The <envar>FONT</envar> line above is correct only for the ISO 8859-15
     54    character set. If using ISO 8859-1 and, therefore, a pound sign
     55    instead of Euro, the correct <envar>FONT</envar> line would be:</para>
    6256
    63     <varlistentry>
    64       <term>FONT</term>
    65       <listitem>
    66         <para>This variable specifies the arguments for the
    67         <command>setfont</command> program. Typically, this includes the font
    68         name, "-m", and the name of the application character map to load.
    69         E.g., in order to load the "lat1-16" font together with the "8859-1"
    70         application character map, set this variable to "lat1-16 -m 8859-1".
    71         If this variable is not set, the bootscript will not run the
    72         <command>setfont</command> program, and the default VGA font will be
    73         used together with the default application character map.</para>
    74       </listitem>
    75     </varlistentry>
    76 
    77     <varlistentry>
    78       <term>UNICODE</term>
    79       <listitem>
    80         <para>Set this variable to "1", "yes" or "true" in order to put the
    81         console into UTF-8 mode. This is useful in UTF-8 based locales and
    82         harmful otherwise.</para>
    83       </listitem>
    84     </varlistentry>
    85 
    86     <varlistentry>
    87       <term>LEGACY_CHARSET</term>
    88       <listitem>
    89         <para>For many keyboard layouts, there is no stock Unicode keymap in
    90         the Kbd package. The <command>console</command> bootscript will
    91         convert an available keymap to UTF-8 on the fly if this variable is
    92         set to the encoding of the available non-UTF-8 keymap. Note, however,
    93         that dead keys and composing will not work in UTF-8 mode without the
    94         special kernel patch.</para>
    95       </listitem>
    96     </varlistentry>
    97 
    98     <varlistentry>
    99       <term>BROKEN_COMPOSE</term>
    100       <listitem>
    101         <para>Set this to "0" if you are going to apply that kernel patch in
    102         Chapter 8. Note that you also have to add the character set expected
    103         by composition rules in your keymap to the FONT variable after the
    104         "-m" switch.</para>
    105       </listitem>
    106     </varlistentry>
    107 
    108   </variablelist>
    109 
    110   <para>Support for compiling the keymap directly into the kernel has been
    111   removed because there were reports that it leads to incorrect results.</para>
    112 
    113   <para>Some examples:</para>
    114 
    115   <itemizedlist>
    116 
    117     <listitem>
    118       <para>For a non-Unicode setup, only the KEYMAP and FONT variables are
    119       generally needed. E.g., for a Polish setup, one would use:</para>
    120 
    121 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    122 <literal># Begin /etc/sysconfig/console
    123 
    124 KEYMAP="pl2"
    125 FONT="lat2a-16 -m 8859-2"
    126 
    127 # End /etc/sysconfig/console</literal>
    128 EOF</userinput></screen>
    129     </listitem>
    130 
    131     <listitem>
    132       <para>As mentioned above, it is sometimes necessary to adjust a
    133       stock keymap slightly. The following example adds the Euro symbol to the
    134       German keymap:</para>
    135 
    136 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    137 <literal># Begin /etc/sysconfig/console
    138 
    139 KEYMAP="de-latin1"
    140 KEYMAP_CORRECTIONS="euro2"
    141 FONT="lat0-16 -m 8859-15"
    142 
    143 # End /etc/sysconfig/console</literal>
    144 EOF</userinput></screen>
    145     </listitem>
    146 
    147     <listitem>
    148       <para>Here is a Unicode-enabled example for Bulgarian, where a stock
    149       UTF-8 keymap exists and defines no dead keys or composition rules:</para>
    150 
    151 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    152 <literal># Begin /etc/sysconfig/console
    153 
    154 UNICODE="1"
    155 KEYMAP="bg_bds-utf8"
    156 FONT="LatArCyrHeb-16"
    157 
    158 # End /etc/sysconfig/console</literal>
    159 EOF</userinput></screen>
    160     </listitem>
    161 
    162     <listitem>
    163       <para>Due to the use of a 512-glyph LatArCyrHeb-16 font in the previous
    164       example, bright colors are no longer available on the Linux console unless
    165       a framebuffer is used. If one wants to have bright colors without
    166       framebuffer and can live without characters not belonging to his language,
    167       it is still possible to use a language-specific 256-glyph font, as
    168       illustrated below. This would, however, also break single quotes in manual
    169       pages.</para>
    170 
    171       <!-- And even with the LatArCyrHeb-16 font, copying-and-pasting produces
    172       non-ASCII variants of opening and closing single quote instead of ` and '.
    173       Maybe another sed has to be added to groff instructions that will remove
    174       both issues. -->
    175 
    176 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    177 <literal># Begin /etc/sysconfig/console
    178 
    179 UNICODE="1"
    180 KEYMAP="bg_bds-utf8"
    181 FONT="cyr-sun16"
    182 
    183 # End /etc/sysconfig/console</literal>
    184 EOF</userinput></screen>
    185     </listitem>
    186 
    187     <listitem>
    188       <para>The following example illustrates keymap autoconversion from
    189       ISO-8859-15 to UTF-8 and enabling dead keys in Unicode mode:</para>
    190 
    191 <screen role="nodump"><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
    192 <literal># Begin /etc/sysconfig/console
    193 
    194 UNICODE="1"
    195 KEYMAP="de-latin1"
    196 KEYMAP_CORRECTIONS="euro2"
    197 LEGACY_CHARSET="iso-8859-15"
    198 BROKEN_COMPOSE="0"
    199 FONT="LatArCyrHeb-16 -m 8859-15"
    200 
    201 # End /etc/sysconfig/console</literal>
    202 EOF</userinput></screen>
    203     </listitem>
    204 
    205     <listitem>
    206       <para>For Chinese, Japanese, Korean and some other languages, the Linux
    207       console cannot be configured to display the needed characters. Users
    208       who need such languages should install the X Window System, fonts that
    209       cover the necessary character ranges, and the proper input Method (e.g.
    210       SCIM, it supports a wide variety of languages).</para>
    211     </listitem>
    212 
    213   </itemizedlist>
    214 
    215   <!-- Added because folks keep posting their console file with X questions
    216   to blfs-support list -->
    217   <note>
    218     <para>The <filename>/etc/sysconfig/console</filename> file only controls
    219     Linux text console localization. It has nothing to do with setting the proper
    220     keyboard layout and terminal fonts in X Window System.</para>
     57<screen role="nodump"><userinput>FONT="lat1-16"</userinput></screen>
    22158  </note>
    22259
     60  <para>If the <envar>KEYMAP</envar> or <envar>FONT</envar> variable is not set,
     61  the <command>console</command> initscript will not run the corresponding
     62  program.</para>
     63
     64  <para>In some keymaps, the Backspace and Delete keys send characters different
     65  from ones in the default keymap built into the kernel. This confuses some
     66  applications. For example, Emacs displays its help (instead of erasing the
     67  character before the cursor) when Backspace is pressed. To check if the keymap
     68  in use is affected (this works only for i386 keymaps):</para>
     69
     70<screen role="nodump"><userinput>zgrep '\W14\W' <replaceable>[/path/to/your/keymap]</replaceable></userinput></screen>
     71
     72  <para>If the keycode 14 is Backspace instead of Delete, create the
     73  following keymap snippet to fix this issue:</para>
     74
     75<screen role="nodump"><userinput>mkdir -pv /etc/kbd &amp;&amp; cat &gt; /etc/kbd/bs-sends-del &lt;&lt;"EOF"
     76<literal>                  keycode  14 = Delete Delete Delete Delete
     77              alt keycode  14 = Meta_Delete
     78        altgr alt keycode  14 = Meta_Delete
     79                  keycode 111 = Remove
     80    altgr control keycode 111 = Boot
     81      control alt keycode 111 = Boot
     82altgr control alt keycode 111 = Boot</literal>
     83EOF</userinput></screen>
     84
     85  <para>Tell the <command>console</command> script to load this
     86  snippet after the main keymap:</para>
     87
     88<screen role="nodump"><userinput>cat &gt;&gt;/etc/sysconfig/console &lt;&lt;"EOF"
     89<literal>KEYMAP_CORRECTIONS="/etc/kbd/bs-sends-del"</literal>
     90EOF</userinput></screen>
     91
     92  <para>To compile the keymap directly into the kernel instead of
     93  setting it every time from the <command>console</command> bootscript,
     94  follow the instructions given in <xref linkend="ch-bootable-kernel" role="."/>
     95  Doing this ensures that the keyboard will always work as expected,
     96  even when booting into maintenance mode (by passing
     97  <parameter>init=/bin/sh</parameter> to the kernel), because the
     98  <command>console</command> bootscript will not be run in that
     99  situation. Additionally, the kernel will not set the screen font
     100  automatically. This should not pose many problems because ASCII characters
     101  will be handled correctly, and it is unlikely that a user would need
     102  to rely on non-ASCII characters while in maintenance mode.</para>
     103
     104  <para>Since the kernel will set up the keymap, it is possible to omit
     105  the <envar>KEYMAP</envar> variable from the
     106  <filename>/etc/sysconfig/console</filename> configuration file. It can
     107  also be left in place, if desired, without consequence.  Keeping it
     108  could be beneficial if running several different kernels where it is
     109  difficult to ensure that the keymap is compiled into every one of
     110  them.</para>
     111
    223112</sect1>
  • chapter07/profile.xml

    r5536f74 r94aa6621  
    7070  <replaceable>[CC]</replaceable> with the two-letter code for the appropriate
    7171  country (e.g., <quote>GB</quote>). <replaceable>[charmap]</replaceable> should
    72   be replaced with the canonical charmap for your chosen locale. Optional
    73   modifiers such as <quote>@euro</quote> may also be present.</para>
     72  be replaced with the canonical charmap for your chosen locale.</para>
    7473
    7574  <para>The list of all locales supported by Glibc can be obtained by running
     
    7877<screen role="nodump"><userinput>locale -a</userinput></screen>
    7978
    80   <para>Charmaps can have a number of aliases, e.g. <quote>ISO-8859-1</quote>
     79  <para>Locales can have a number of synonyms, e.g. <quote>ISO-8859-1</quote>
    8180  is also referred to as <quote>iso8859-1</quote> and <quote>iso88591</quote>.
    82   Some applications cannot handle the various synonyms correctly (e.g. require
    83   that "UTF-8" is written as "UTF-8", not "utf8"), so it is safest in most
    84   cases to choose the canonical name for a particular locale. To determine
     81  Some applications cannot handle the various synonyms correctly, so it is
     82  safest to choose the canonical name for a particular locale. To determine
    8583  the canonical name, run the following command, where <replaceable>[locale
    8684  name]</replaceable> is the output given by <command>locale -a</command> for
     
    118116  Glibc.</para>
    119117
    120   <!-- FIXME: the xlib example will became obsolete real soon -->
    121118  <para>Some packages beyond LFS may also lack support for your chosen locale. One
    122119  example is the X library (part of the X Window System), which outputs the
     
    143140<literal># Begin /etc/profile
    144141
    145 export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable><replaceable>[@modifiers]</replaceable>
     142export LANG=<replaceable>[ll]</replaceable>_<replaceable>[CC]</replaceable>.<replaceable>[charmap]</replaceable>
    146143export INPUTRC=/etc/inputrc
    147144
     
    149146EOF</userinput></screen>
    150147
    151   <para>The <quote>C</quote> (default) and <quote>en_US</quote> (the recommended
    152   one for United States English users) locales are different. <quote>C</quote>
    153   uses the US-ASCII 7-bit character set, and treats bytes with the high bit set
    154   as invalid characters. That's why, e.g., the <command>ls</command> command
    155   substitutes them with question marks in that locale. Also, an attempt to send
    156   mail with such characters from Mutt or Pine results in non-RFC-conforming
    157   messages being set (the charset in the outgoing mail is indicatsed as "unknown
    158   8-bit"). So you can use the <quote>C</quote> locale only if you are sure that
    159   you will never need 8-bit characters.</para>
    160 
    161   <para>UTF-8 based locales are not supported well by many programs. E.g., the
    162   <command>watch</command> program displays only ASCII characters in UTF-8
    163   locales and has no such restriction in traditional 8-bit locales like en_US.
    164   Without patches and/or installing software beyond BLFS, in UTF-8 based locales
    165   you will not be able to do such basic tasks as printing plain-text files from
    166   the command line, recording Windows-readable CDs with filenames containing
    167   non-ASCII characters, viewing ID3v1 tags in MP3 files and so on. It is also
    168   impossible (without damaging non-ASCII characters) to connect using ssh from
    169   the system using a UTF-8 based locale to a host that still uses a traditional
    170   8-bit locale, and vice versa. In short, use UTF-8 only if you are going to
    171   use KDE or GNOME and never open the terminal, or if you are going to tolerate
    172   bugs.</para>
    173   <!-- All abovementioned problems except "watch" have a known fix beyond BLFS -->
    174 
    175148  <note>
    176     <para>Bug reports reproducible only in UTF-8 locales and for which there
    177     is no patch or other fix mentioned in the report, will be closed immediately,
    178     without investigation, with the "WONTFIX" resolution and a "don't use this
    179     program or revert to non-UTF-8 locale" comment. Patches that have ill
    180     effects in non-UTF-8 locales (other than replacement of translated program
    181     messages with English ones) will be rejected.</para>
     149    <para>The <quote>C</quote> (default) and <quote>en_US</quote> (the
     150    recommended one for United States English users) locales are different.</para>
    182151  </note>
    183152
     153  <para>Setting the keyboard layout, screen font, and locale-related environment
     154  variables are the only internationalization steps needed to support locales
     155  that use ordinary single-byte encodings and left-to-right writing direction.
     156  More complex cases (including UTF-8 based locales) require additional steps
     157  and additional patches because many applications tend to not work properly
     158  under such conditions. These steps and patches are not included in the LFS
     159  book and such locales are not yet supported by LFS.</para>
     160
    184161</sect1>
  • chapter08/fstab.xml

    r5536f74 r94aa6621  
    6666  <filename>/etc/sysconfig/modules</filename>.</para>
    6767
    68   <para>Filesystems with MS-DOS or Windows origin (i.e.: vfat, ntfs, smbfs, cifs,
    69   iso9660, udf) need the <quote>iocharset</quote> mount option in order for
    70   non-ASCII characters in file names to be interpreted properly. The value
    71   of this option should be the same as the character set of your locale,
    72   adjusted in such a way that the kernel understands it. This works if the
    73   relevant character set definition (found under File systems -&gt;
    74   Native Language Support) has been compiled into the kernel
    75   or built as a module. The <quote>codepage</quote> option is also needed for
    76   vfat and smbfs filesystems. It
    77   should be set to the codepage number used under MS-DOS in your country. E.g.,
    78   in order to mount USB flash drives, a ru_RU.KOI8-R user would need the
    79   following line in <filename>/etc/fstab</filename>:</para>
    80 
    81 <screen>/dev/sda1    /media/flash vfat noauto,user,quiet,showexec,iocharset=koi8r,codepage=866 0 0</screen>
    82 
    83   <para>The corresponding line for ru_RU.UTF-8 users is:</para>
    84 
    85 <screen>/dev/sda1    /media/flash vfat noauto,user,quiet,showexec,iocharset=utf8,codepage=866 0 0</screen>
    86 
    87   <note><para>In the latter case, the kernel emits the following message:</para>
    88 
    89 <screen><computeroutput>FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!</computeroutput></screen>
    90 
    91   <para>This negative recommendation should be ignored, since all other values
    92   of the <quote>iocharset</quote> option result in wrong display of filenames in
    93   UTF-8 locales.</para></note>
    94 
    95   <para>It is also possible to specify default codepage and iocharset values for
    96   some filesystems during kernel configuration, the relevant parameters
    97   are named
    98   <quote>Default NLS Option</quote> (CONFIG_NLS_DEFAULT),
    99   <quote>Default Remote NLS Option</quote> (CONFIG_SMB_NLS_DEFAULT),
    100   <quote>Default codepage for FAT</quote> (CONFIG_FAT_DEFAULT_CODEPAGE), and
    101   <quote>Default iocharset for FAT</quote> (CONFIG_FAT_DEFAULT_IOCHARSET).
    102   There is no way to specify these settings for the
    103   ntfs filesystem at kernel compilation time.</para>
    104   <!-- Personally, I find it more foolproof to always specify the iocharset and
    105   codepage in /etc/fstab for MS-based filesystems - Alexander E. Patrakov -->
    106 
    10768</sect1>
  • chapter08/kernel.xml

    r5536f74 r94aa6621  
    4949    configures the kernel.</para>
    5050
    51     <para>By default, Linux kernel generates wrong sequences of bytes when
    52     dead keys are used in UTF-8 keyboard mode. Also, one cannot copy and paste
    53     non-ASCII characters when UTF-8 mode is aciive. Fix these issues with the
    54     patch:</para>
    55 
    56 <screen><userinput>patch -Np1 -i ../&linux-utf8-patch;</userinput></screen>
    57 
    5851    <para>Prepare for compilation by running the following command:</para>
    5952
     
    6558    un-tarring.</para>
    6659
    67     <!-- Support for compiling a keymap into the kernel is deliberately removed -->
     60    <para>If, in <xref linkend="ch-scripts-console" role=","/> it was decided to
     61    compile the keymap into the kernel, issue the command below:</para>
     62
     63<screen role="nodump"><userinput>loadkeys -m /usr/share/kbd/keymaps/<replaceable>[path to  keymap]</replaceable> &gt; \
     64    drivers/char/defkeymap.c</userinput></screen>
     65
     66    <para>For example, if using a Dutch keyboard, use
     67    <filename>/usr/share/kbd/keymaps/i386/qwerty/nl.map.gz</filename>.</para>
    6868
    6969    <para>Configure the kernel via a menu-driven interface. BLFS has some
  • general.ent

    r5536f74 r94aa6621  
    2323<!ENTITY kernel "http://www.kernel.org/pub/">
    2424<!ENTITY sourceforge "http://prdownloads.sourceforge.net/">
    25 <!ENTITY alexpatches "&lfs-root;~alexander/patches/">
    2625
    2726<!ENTITY % patches-entities SYSTEM "patches.ent">
     
    4645<!ENTITY gawk-version "3.1.5">
    4746<!ENTITY gcc-version "4.0.2">
    48 <!ENTITY gdbm-version "1.8.3">
    4947<!ENTITY gettext-version "0.14.5">
    5048<!ENTITY glibc-version "2.3.6">
    5149<!ENTITY grep-version "2.5.1a">
    52 <!ENTITY groff-version "1.18.1.1">
    53 <!ENTITY groff-patchlevel "10">
     50<!ENTITY groff-version "1.19.2">
    5451<!ENTITY grub-version "0.97">
    5552<!ENTITY gzip-version "1.3.5">
     
    6764<!ENTITY m4-version "1.4.4">
    6865<!ENTITY make-version "3.80">
    69 <!ENTITY man-db-version "2.4.3">
     66<!ENTITY man-version "1.6b">
    7067<!ENTITY man-pages-version "2.17">
    7168<!ENTITY mktemp-version "1.5">
    7269<!ENTITY module-init-tools-version "3.2.2">
    7370<!ENTITY ncurses-version "5.5">
    74 <!-- <!ENTITY ncurses-date "20050319"> -->
    7571<!ENTITY patch-version "2.5.4">
    7672<!ENTITY perl-version "5.8.7">
  • patches.ent

    r5536f74 r94aa6621  
    22
    33<!-- Start of Common Patches -->
     4<!ENTITY bzip2-docs-patch "bzip2-&bzip2-version;-install_docs-1.patch">
    45<!ENTITY bzip2-bzgrep-patch "bzip2-&bzip2-version;-bzgrep_security-1.patch">
    5 <!ENTITY bzip2-docs-patch "bzip2-&bzip2-version;-install_docs-1.patch">
    66
    7 <!ENTITY coreutils-i18n-patch "coreutils-&coreutils-version;-i18n-1.patch">
    87<!ENTITY coreutils-suppress-patch "coreutils-&coreutils-version;-suppress_uptime_kill_su-1.patch">
    98<!ENTITY coreutils-uname-patch "coreutils-&coreutils-version;-uname-1.patch">
    10 
    11 <!ENTITY diffutils-i18n-patch "diffutils-&diffutils-version;-i18n-1.patch">
    129
    1310<!ENTITY expect-spawn-patch "expect-&expect-version;-spawn-1.patch">
     
    1916<!ENTITY gcc-specs-patch "gcc-&gcc-version;-specs-1.patch">
    2017
    21 <!ENTITY grep-fixes-patch "grep-&grep-version;-redhat_fixes-2.patch">
    22 
    23 <!ENTITY groff-debian-patch "groff_&groff-version;-&groff-patchlevel;.diff.gz">
    24 
    2518<!ENTITY gzip-security_fix-patch "gzip-&gzip-version;-security_fixes-1.patch">
    2619
    27 <!ENTITY kbd-backspace-patch "kbd-&kbd-version;-backspace-1.patch">
    2820<!ENTITY kbd-gcc4_fixes-patch "kbd-&kbd-version;-gcc4_fixes-1.patch">
    2921
     
    3123<!ENTITY inetutils-man_pages-patch "inetutils-&inetutils-version;-no_server_man_pages-1.patch">
    3224
    33 <!ENTITY linux-utf8-patch "linux-&linux-version;-utf8_input-2.patch">
    34 
    3525<!ENTITY mktemp-tempfile-patch "mktemp-&mktemp-version;-add_tempfile-3.patch">
    3626
    37 <!ENTITY ncurses-fixes-patch "ncurses-&ncurses-version;-fixes-1.patch">
    38 <!-- <!ENTITY ncurses-rollup-patch "ncurses-&ncurses-version;-&ncurses-date;-patch.sh.bz2"> -->
    39 
    4027<!ENTITY perl-libc-patch "perl-&perl-version;-libc-1.patch">
    41 
    42 <!ENTITY sysklogd-8bit-patch "sysklogd-&sysklogd-version;-8bit-1.patch">
    4328
    4429<!ENTITY shadow-configure-patch "shadow-&shadow-version;-configure_fix-1.patch">
     
    4631<!ENTITY sysklogd-fixes-patch "sysklogd-&sysklogd-version;-fixes-1.patch">
    4732
     33<!ENTITY tar-sparse_fix-patch "tar-&tar-version;-sparse_fix-1.patch">
    4834<!ENTITY tar-gcc4_fix-patch "tar-&tar-version;-gcc4_fix_tests-1.patch">
    49 <!ENTITY tar-sparse_fix-patch "tar-&tar-version;-sparse_fix-1.patch">
    5035
    51 <!ENTITY texinfo-multibyte-patch "texinfo-&texinfo-version;-multibyte-2.patch">
    52 <!ENTITY texinfo-tempfile_fix-patch "texinfo-&texinfo-version;-tempfile_fix-1.patch">
     36<!ENTITY texinfo-tempfile_fix-patch "texinfo-&texinfo-version;-tempfile_fix-2.patch">
    5337
    5438<!ENTITY util-linux-cramfs-patch "util-linux-&util-linux-version;-cramfs-1.patch">
Note: See TracChangeset for help on using the changeset viewer.