cvs commit: LFS/BOOK/chapter07 inputrc.xml profile.xml bootscripts.xml chapter07.xml console.xml

winkie at winkie at
Thu May 6 09:21:02 PDT 2004

winkie      04/05/06 10:21:02

  Modified:    BOOK/chapter06 Tag: b6_0 glibc.xml kbd.xml man.xml
               BOOK/chapter07 Tag: b6_0 bootscripts.xml chapter07.xml
  Added:       BOOK/chapter07 Tag: b6_0 inputrc.xml profile.xml
  Committed Alexander's i18n patch
  Revision  Changes    Path
  No                   revision
  No                   revision  +19 -0     LFS/BOOK/chapter06/glibc.xml
  Index: glibc.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/glibc.xml,v
  retrieving revision 1.31
  retrieving revision
  diff -u -r1.31 -r1.31.2.1
  --- glibc.xml	3 May 2004 21:28:57 -0000	1.31
  +++ glibc.xml	6 May 2004 16:21:01 -0000
  @@ -111,6 +111,25 @@
   localedef -i it_IT -f ISO-8859-1 it_IT
   localedef -i ja_JP -f EUC-JP ja_JP</userinput></screen>
  +<para>In fact, some locales installed by the
  +<command>make localedata/install-locales</command>
  +command above are not properly
  +supported by some applications that are in LFS and BLFS books. Because
  +of various problems that arise
  +due to application programmers making
  +assumptions that break in such locales, LFS <emphasis>should not</emphasis>
  +be used in locales that utilize
  +multibyte character sets (including UTF-8) or
  +right-to-left writing order.
  +Numerous unofficial and unstable patches are required to fix these problems,
  +and it has been decided not to support such complex locales.
  +This applies to the ja_JP and fa_IR locales as well:
  +they have been installed only
  +for gcc and gettext tests to pass, and e.g. <application>vim</application>
  +compiled according to this book doesn't work properly in them.
  +Various attempts to circumvent these
  +restrictions are documented in internationalization-related hints.</para>
   <para>Finally, build the linuxthreads man pages, which are a great reference
   on the threading API (applicable to NPTL as well):</para>
   +5 -37     LFS/BOOK/chapter06/kbd.xml
  Index: kbd.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/kbd.xml,v
  retrieving revision 1.23
  retrieving revision
  diff -u -r1.23 -r1.23.2.1
  --- kbd.xml	3 May 2004 21:28:57 -0000	1.23
  +++ kbd.xml	6 May 2004 16:21:01 -0000
  @@ -36,41 +36,8 @@
  -<sect2 id="conf-kbd"><title>Configuring your keyboard</title>
  -<indexterm zone="conf-kbd">
  -<primary sortas="a-Kbd">Kbd</primary>
  -<para>Few things are more annoying than using Linux while a wrong keymap
  -for your keyboard is loaded. If you have a standard US keyboard, however, you
  -can skip this section, as the US keymap is the default as long as you don't
  -change it.</para>
  -<para>To change the default keymap, create the
  -<filename class="symlink">/usr/share/kbd/keymaps/</filename>
  -symlink by running the following command:</para>
  -<screen><userinput>ln -s path/to/keymap /usr/share/kbd/keymaps/</userinput></screen>
  -<para>Of course, replace <filename>path/to/keymap</filename> with the path and
  -name of your keyboard's map file. For example, if you have a Dutch keyboard,
  -you would use <filename>/usr/share/kbd/keymaps/i386/qwerty/</filename>.</para>
  -<para>Another way to set your keyboard's layout is to compile the keymap
  -into the kernel. This ensures that your keyboard will always work as expected,
  -even when you boot into maintenance mode (by passing `init=/bin/sh' to the
  -kernel), as then the bootscript that normally sets up your keymap isn't run.</para>
  -<para>When in <xref linkend="chapter-bootable"/> you're ready to compile the
  -kernel, run the following command to patch the current default keymap into the
  -source (you will have to repeat this command whenever you unpack a new
  -<screen><userinput>loadkeys -m /usr/share/kbd/keymaps/ > \
  -    /usr/src/linux-&linux-version;/drivers/char/defkeymap.c</userinput></screen>
  +<!-- The "Configuring your keyboard" section has been moved to
  +Chapter 7 and renamed to "Configuring Linux console" -->
   <sect2 id="contents-kbd"><title>Contents of Kbd</title>
  @@ -163,11 +130,12 @@
   <indexterm zone="ch-system-kbd unicode_start"><primary sortas="b-unicode_start">unicode_start</primary></indexterm>
   <para id="unicode_start"><command>unicode_start</command> puts the keyboard and console in
  -unicode mode.</para>
  +UNICODE mode. Never use it on LFS, because applications are not
  +configured to support UNICODE.</para>
   <indexterm zone="ch-system-kbd unicode_stop"><primary sortas="b-unicode_stop">unicode_stop</primary></indexterm>
   <para id="unicode_stop"><command>unicode_stop</command> reverts keyboard and console from
  -unicode mode.</para>
  +UNICODE mode.</para>
   +29 -0     LFS/BOOK/chapter06/man.xml
  Index: man.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/man.xml,v
  retrieving revision
  retrieving revision
  diff -u -r1.23.4.3 -r1.23.4.4
  --- man.xml	4 May 2004 17:24:40 -0000
  +++ man.xml	6 May 2004 16:21:01 -0000
  @@ -73,6 +73,35 @@
   <filename>man.conf</filename> file and add the <emphasis>-c</emphasis> switch
   to NROFF.</para></note>
  +<para>If your character set uses 8-bit characters, search for the line
  +beginning with "NROFF" in /etc/man.conf, and verify that it coincides
  +with the following:</para>
  +<screen>NROFF  /usr/bin/nroff -Tlatin1 -mandoc</screen>
  +<para>Note that you should use "latin1" even if it is not the character set
  +of your locale. The reason is that,
  +according to the specification, <application>groff</application> has
  +no means of typesetting characters outside ISO-8859-1
  +without some strange escape codes, and localized manual
  +pages are therefore really a hack. When formatting manual pages,
  +<application>groff</application> thinks that they are in the ISO-8859-1
  +encoding and this <emphasis>-Tlatin1</emphasis> switch tells
  +<application>groff</application> to use the same encoding for output.
  +Since <application>groff</application> does no recoding of input characters,
  +the formatted result is really in the same encoding as input (although
  +<application>groff</application> doesn't know that it is not ISO-8859-1)
  +and therefore it is usable as the input for a pager.</para>
  +<para>Of course, this hack does not solve the problem of non-working
  +<command>man2dvi</command> program for localized manual
  +pages in non-ISO-8859-1 locales.
  +Also, it does not work at all with multibyte character sets.
  +The first problem does not have a solution currently. The second
  +one is not of a concern because the LFS installation does not support
  +multibyte character sets properly anyway. You may want to look at
  +internationalization related hints, though.</para>
   <para>You may want to also take a look at the BLFS page at
   <ulink url="&blfs-root;view/cvs/postlfs/compressdoc.html"/> which deals with
   formatting and compression issues for man pages.</para>
   +16 -6     LFS/BOOK/chapter06/sysvinit.xml
  Index: sysvinit.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter06/sysvinit.xml,v
  retrieving revision 1.20
  retrieving revision
  diff -u -r1.20 -r1.20.4.1
  --- sysvinit.xml	3 May 2004 10:59:41 -0000	1.20
  +++ sysvinit.xml	6 May 2004 16:21:01 -0000
  @@ -74,15 +74,25 @@
  -1:2345:respawn:/sbin/agetty tty1 9600
  -2:2345:respawn:/sbin/agetty tty2 9600
  -3:2345:respawn:/sbin/agetty tty3 9600
  -4:2345:respawn:/sbin/agetty tty4 9600
  -5:2345:respawn:/sbin/agetty tty5 9600
  -6:2345:respawn:/sbin/agetty tty6 9600
  +1:2345:respawn:/sbin/agetty -I '\033(K' tty1 9600
  +2:2345:respawn:/sbin/agetty -I '\033(K' tty2 9600
  +3:2345:respawn:/sbin/agetty -I '\033(K' tty3 9600
  +4:2345:respawn:/sbin/agetty -I '\033(K' tty4 9600
  +5:2345:respawn:/sbin/agetty -I '\033(K' tty5 9600
  +6:2345:respawn:/sbin/agetty -I '\033(K' tty6 9600
   # End /etc/inittab
  +<para> The -I '\033(K' switch tells agetty to send this escape sequence to
  +the terminal before doing anything else. This escape sequence switches the
  +console character set to a user-defined one, which can be modified by
  +running the <command>setfont</command> program.
  +Actually, the <command>console</command> initscript from the LFS-Bootscripts
  +package calls the <command>setfont</command> program during system
  +startup. Sending this escape sequence is necessary for
  +people who use non-ISO-8859-1 screen font, but does not hurt native English
  No                   revision
  No                   revision   +10 -6     LFS/BOOK/chapter07/bootscripts.xml
  Index: bootscripts.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter07/bootscripts.xml,v
  retrieving revision
  retrieving revision
  diff -u -r1.6.2.1 -r1.6.2.2
  --- bootscripts.xml	4 May 2004 23:30:41 -0000
  +++ bootscripts.xml	6 May 2004 16:21:01 -0000
  @@ -30,8 +30,10 @@
   <sect2 id="contents-bootscripts"><title>Contents of LFS-bootscripts</title>
  -<para><emphasis>Installed scripts</emphasis>: checkfs, cleanfs, functions,
  -halt, ifdown, ifup, loadkeys, localnet, mountfs, mountkernfs, network, rc,
  +<para><emphasis>Installed scripts</emphasis>: checkfs, cleanfs,
  +functions, halt, ifdown, ifup,
  +localnet, mountfs, mountkernfs, network, rc,
   reboot, sendsignals, setclock, static, swap, sysklogd and template</para>
  @@ -51,6 +53,12 @@
   and removes the possibly present <filename>/etc/nologin</filename>,
   <filename>/fastboot</filename> and <filename>/forcefsck</filename> files.</para>
  +<indexterm zone="ch-scripts-bootscripts console-bootscripts"><primary sortas="d-console">console</primary></indexterm>
  +<para id="console-bootscripts">The <command>console</command> script 
  +loads the keymap table you
  +specified as proper for your keyboard layout.
  +It also sets the screen font.</para>
   <indexterm zone="ch-scripts-bootscripts functions-bootscripts"><primary sortas="d-functions">functions</primary></indexterm>
   <para id="functions-bootscripts">The <command>functions</command> script contains functions shared among
   different scripts, such as error and status checking.</para>
  @@ -61,10 +69,6 @@
   <indexterm zone="ch-scripts-bootscripts ifdown-bootscripts"><primary sortas="d-ifdown">ifdown</primary></indexterm>
   <para id="ifdown-bootscripts">The <command>ifdown</command> and <command>ifup</command> scripts assist
   the network script with network devices.</para>
  -<indexterm zone="ch-scripts-bootscripts loadkeys-bootscripts"><primary sortas="d-loadkeys">loadkeys</primary></indexterm>
  -<para id="loadkeys-bootscripts">The <command>loadkeys</command> script loads the keymap table you
  -specified as proper for your keyboard layout.</para>
   <indexterm zone="ch-scripts-bootscripts localnet-bootscripts"><primary sortas="d-localnet">localnet</primary></indexterm>
   <para id="localnet-bootscripts">The <command>localnet</command> script sets up the system's hostname and
   +2 -0      LFS/BOOK/chapter07/chapter07.xml
  Index: chapter07.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter07/chapter07.xml,v
  retrieving revision
  retrieving revision
  diff -u -r1.18.2.1 -r1.18.2.2
  --- chapter07.xml	4 May 2004 23:30:41 -0000
  +++ chapter07.xml	6 May 2004 16:21:01 -0000
  @@ -13,6 +13,8 @@
   <xi:include xmlns:xi="" href="usage.xml"/>
   <xi:include xmlns:xi="" href="setclock.xml"/>
   <xi:include xmlns:xi="" href="console.xml"/>
  +<xi:include xmlns:xi="" href="inputrc.xml"/>
  +<xi:include xmlns:xi="" href="profile.xml"/>
   <xi:include xmlns:xi="" href="sysklogd.xml"/>
   <xi:include xmlns:xi="" href="hostname.xml"/>
   <xi:include xmlns:xi="" href="hosts.xml"/>
    +80 -10    LFS/BOOK/chapter07/console.xml
  Index: console.xml
  RCS file: /home/cvsroot/LFS/BOOK/chapter07/console.xml,v
  retrieving revision
  retrieving revision
  diff -u -r1.1.2.2 -r1.1.2.3
  --- console.xml	6 May 2004 15:48:30 -0000
  +++ console.xml	6 May 2004 16:21:01 -0000
  @@ -4,22 +4,92 @@
   <sect1 id="ch-scripts-console">
  -<title>Do I need the console script?</title>
  +<title>Configuring the Linux console</title>
   <?dbhtml filename="console.html"?>
   <indexterm zone="ch-scripts-console">
   <primary sortas="d-console">console</primary>
  -<para>If you plan to compile the keymap directly in the kernel during <xref
  -linkend="chapter-bootable"/> (see <xref linkend="ch-system-kbd"/>), then strictly
  -speaking you don't need to run this loadkeys script, since the kernel will set
  -up the keymap for you. If you wish, you can still run the script, it isn't going
  -to hurt you. Keeping it could even be beneficial, in case you run a lot of
  -different kernels and can't be sure that the keymap is compiled into every one
  -of them.</para>
  +<para>In this section we will configure the <command>console</command>
  +initscript that sets up the keyboard
  +map and the console font. If you are a native English speaker so that you
  +don't need to use any non-ASCII characters, and your keyboard is a US one,
  +skip this section. Without the configuration file,
  +the <command>console</command> initscript will do nothing.</para>
  -<para>If you decided you don't need or don't want to use the console script,
  -remove the <filename class="symlink">/etc/rc.d/rcsysinit.d/S70console</filename> symlink.</para>
  +<para>The <command>console</command> script uses the
  +as a configuration file. You need to decide which keymap and screen font you
  +will use. The language-specific HOWTO can help you.
  +In the future releases of LFS-Bootscripts, there will be a pre-made
  +<filename>/etc/sysconfig/console</filename> file with known
  +good settings for several countries, and you will just have to uncomment
  +the relevant section.
  +If still in doubt,
  +look into <filename class="directory">/usr/share/kbd</filename>
  +for valid keymaps and screen fonts. Then read the <command>loadkeys</command>
  +and <command>setfont</command> manual pages and figure out the correct
  +arguments for these programs.
  +Once you decided, create the
  +configuration file with the following command:</para>
  +<screen><userinput>cat >/etc/sysconfig/console <<"EOF"</userinput>
  +KEYMAP="<emphasis>arguments for loadkeys</emphasis>"
  +FONT="<emphasis>arguments for setfont</emphasis>"
  +<para>E.g., for Spanish users who also want to use the Euro character
  +(accessible by pressing Alt+E),
  +the following settings are correct:</para>
  +<screen><userinput>cat >/etc/sysconfig/console <<"EOF"</userinput>
  +KEYMAP="es euro"
  +FONT="lat9-16 -u iso01"
  +<para>If the KEYMAP or FONT variable is not set, the console initscript
  +will not run the corresponding program.</para>
  +<para>In some keymaps, the Backspace and Delete keys send characters
  +different form ones in the default keymap built into the kernel.
  +This confuses some applications, e.g. <application>Emacs</application>
  +displays its help (instead of erasing the character before the cursor)
  +when you press Backspace. To check if your keymap is affected (this works
  +only for i386 keymaps):</para>
  +<screen><userinput>zgrep '\W14\W' <emphasis>/path/to/your/keymap</emphasis></userinput></screen>
  +<para>If you see that keycode 14 is Backspace and not Delete,
  +create the following keymap snippet to fix this issue:</para>
  +<screen><userinput>mkdir -p /etc/kbd & & cat >/etc/kbd/bs-sends-del <<"EOF"</userinput>
  +                keycode 14 =    Delete  Delete          Delete  Delete
  +        alt     keycode 14 =    Meta_Delete
  +altgr   alt     keycode 14 =    Meta_Delete
  +                keycode 111 =   Remove
  +altgr   control keycode 111 =   Boot
  +control alt     keycode 111 =   Boot
  +altgr   control alt keycode 111 = Boot
  +<para>Then tell the <command>console</command> script to load this snippet
  +after the main keymap:</para>
  +<screen><userinput>cat >>/etc/sysconfig/console <<EOF</userinput>
  +<para>If back in <xref linkend="chapter-building-system"/> you decided to go
  +compile your keymap directly into the kernel (later on in <xref
  +linkend="chapter-bootable"/>), then strictly speaking you don't need to run the
  +loadkeys program, since the kernel will set up the keymap for you,
  +and thus you may omit the KEYMAP variable from the
  +configuration file. If you wish,
  +you can still have it, this isn't going to hurt you. Keeping it could even
  +be beneficial, in case you run a lot of different kernels and can't be sure
  +that the keymap is compiled into every one of them.</para>
  No                   revision
  No                   revision   +94 -0     LFS/BOOK/chapter07/Attic/inputrc.xml
    +78 -0     LFS/BOOK/chapter07/Attic/profile.xml

More information about the lfs-book mailing list