Changeset fcc02767


Ignore:
Timestamp:
06/07/2020 08:16:00 PM (2 years ago)
Author:
Bruce Dubbs <bdubbs@…>
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, arm, ml-11.0, multilib, s6-init, trunk, xry111/arm64, xry111/clfs-ng, xry111/git-transition, xry111/glibc-2.34, xry111/lfs-next, xry111/queue-11.3, xry111/tester-nohack, xry111/usr-move
Children:
595ff03
Parents:
d53fefa
Message:

Initial commit of alternative cross LFS

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

Files:
89 added
1 deleted
39 edited
72 moved

Legend:

Unmodified
Added
Removed
  • Makefile

    rd53fefa rfcc02767  
    2424
    2525ifeq ($(REV), sysv)
    26   BASEDIR         ?= ~/lfs-book
     26  BASEDIR         ?= ~/cross2-lfs-book
    2727  PDF_OUTPUT      ?= LFS-BOOK.pdf
    2828  NOCHUNKS_OUTPUT ?= LFS-BOOK.html
    29   DUMPDIR         ?= ~/lfs-commands
     29  DUMPDIR         ?= ~/cross-lfs-commands
    3030else
    3131  BASEDIR         ?= ~/lfs-systemd
  • chapter05/binutils-pass1.xml

    rd53fefa rfcc02767  
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/binutils.xml"
     28    href="../chapter08/binutils.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
  • chapter05/chapter05.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <chapter id="chapter-temporary-tools" xreflabel="Chapter&nbsp;5">
     8<chapter id="chapter-cross-tools" xreflabel="Chapter&nbsp;5">
    99  <?dbhtml dir="chapter05"?>
    1010  <?dbhtml filename="chapter05.html"?>
    1111
    12   <title>Constructing a Temporary System</title>
     12  <title>Cross Compiling a Toolchain</title>
    1313
    1414  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
     
    2020  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/>
    2121  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++.xml"/>
    22   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
    23   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
    24   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
    25   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
    26   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>
    27   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>
    28   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>
    29   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>
    30   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>
    31   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>
    32   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/>
    33   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/>
    34   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>
    35   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/>
    36   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
    37   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/>
    38   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/>
    39   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/>
    40   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/>
    41   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/>
    42   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/>
    43   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/>
    44   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/>
    45   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libstdc++-pass2.xml"/>
    46   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
    47 <!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>-->
    48   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
    49   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>
    50   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
    51   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
    52   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
    53   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/>
    54   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>
    55   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/>
    5622
    5723</chapter>
  • chapter05/gcc-pass1.xml

    rd53fefa rfcc02767  
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/gcc.xml"
     28    href="../chapter08/gcc.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
  • chapter05/glibc.xml

    rd53fefa rfcc02767  
    2626
    2727    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
    28     href="../chapter06/glibc.xml"
     28    href="../chapter08/glibc.xml"
    2929    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
  • chapter06/bash.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-bash" role="wrap">
     8<sect1 id="ch-tools-bash" role="wrap">
    99  <?dbhtml filename="bash.html"?>
    1010
     
    1717  <title>Bash-&bash-version;</title>
    1818
    19   <indexterm zone="ch-system-bash">
     19  <indexterm zone="ch-tools-bash">
    2020    <primary sortas="a-Bash">Bash</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Bash package contains the Bourne-Again SHell.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/bash.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2730
    2831    <segmentedlist>
     
    3134
    3235      <seglistitem>
    33         <seg>&bash-ch6-sbu;</seg>
    34         <seg>&bash-ch6-du;</seg>
     36        <seg>&bash-ch5-sbu;</seg>
     37        <seg>&bash-ch5-du;</seg>
    3538      </seglistitem>
    3639    </segmentedlist>
     
    4144    <title>Installation of Bash</title>
    4245
    43     <para>Incorporate some upstream fixes:</para>
    44 
    45 <screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>
    46 
    4746    <para>Prepare Bash for compilation:</para>
    4847
    49 <screen><userinput remap="configure">./configure --prefix=/usr                    \
    50             --docdir=/usr/share/doc/bash-&bash-version; \
    51             --without-bash-malloc            \
    52             --with-installed-readline</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr                   \
     49            --build=$(support/config.guess) \
     50            --host=$LFS_TGT                 \
     51            --without-bash-malloc</userinput></screen>
    5352
    5453    <variablelist>
    55       <title>The meaning of the new configure option:</title>
     54      <title>The meaning of the configure options:</title>
    5655
    5756      <varlistentry>
    58         <term><parameter>--with-installed-readline</parameter></term>
     57        <term><parameter>--without-bash-malloc</parameter></term>
    5958        <listitem>
    60           <para>This option tells Bash to use the <filename
    61           class="libraryfile">readline</filename> library that is already
    62           installed on the system rather than using its own readline
    63           version.</para>
     59          <para>This option turns off the use of Bash's memory allocation
     60          (<function>malloc</function>) function which is known to cause
     61          segmentation faults. By turning this option off, Bash will use
     62          the <function>malloc</function> functions from Glibc which are
     63          more stable.</para>
    6464        </listitem>
    6565      </varlistentry>
     
    7171<screen><userinput remap="make">make</userinput></screen>
    7272
    73     <para>Skip down to <quote>Install the
    74     package</quote> if not running the test suite.</para>
     73    <para>Install the package:</para>
    7574
    76     <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
     75<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    7776
    78 <screen><userinput remap="test">chown -Rv tester .</userinput></screen>
     77    <para>Move the excutable to where it is expected to be:</para>
    7978
    80     <para>Now, run the tests as the <systemitem
    81     class="username">tester</systemitem> user:</para>
     79<screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen>
    8280
    83 <screen><userinput remap="test">su tester &lt;&lt; EOF
    84 PATH=$PATH make tests &lt; $(tty)
    85 EOF</userinput></screen>
    86 <!--
    87     <para>The <systemitem class="username">tester</systemitem>
    88     user does not have enough permissions for all the tests to pass. This shows
    89     up in some <quote>diff</quote> output in four test results. Portions of the
    90     run-execscript, run-lastpipe, run-read, and run-test programs
    91     are known to fail in the LFS chroot environment, but pass if the tests
    92     are run in a full system.</para>
    93 -->
    94     <para>Install the package and move the main executable to
    95     <filename class='directory'>/bin</filename>:</para>
     81    <para>Make a link for the programs that use <command>sh</command> for
     82    a shell:</para>
    9683
    97 <screen><userinput remap="install">make install
    98 mv -vf /usr/bin/bash /bin</userinput></screen>
    99 
    100     <para>Run the newly compiled <command>bash</command> program (replacing the one that is
    101     currently being executed):</para>
    102 
    103 <screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen>
    104 
    105     <note>
    106       <para>The parameters used make the <command>bash</command>
    107       process an interactive login shell and continue to disable hashing so
    108       that new programs are found as they become available.</para>
    109     </note>
     84<screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen>
    11085
    11186  </sect2>
    11287
    113   <sect2 id="contents-bash" role="content">
    114     <title>Contents of Bash</title>
     88  <sect2 role="content">
     89    <title/>
    11590
    116     <segmentedlist>
    117       <segtitle>Installed programs</segtitle>
    118       <segtitle>Installed directory</segtitle>
    119 
    120       <seglistitem>
    121         <seg>bash, bashbug, and sh (link to bash)</seg>
    122         <seg>/usr/include/bash, /usr/lib/bash, and
    123         /usr/share/doc/bash-&bash-version;</seg>
    124       </seglistitem>
    125     </segmentedlist>
    126 
    127     <variablelist>
    128       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    129       <?dbfo list-presentation="list"?>
    130       <?dbhtml list-presentation="table"?>
    131 
    132       <varlistentry id="bash">
    133         <term><command>bash</command></term>
    134         <listitem>
    135           <para>A widely-used command interpreter; it performs many types of
    136           expansions and substitutions on a given command line before executing
    137           it, thus making this interpreter a powerful tool</para>
    138           <indexterm zone="ch-system-bash bash">
    139             <primary sortas="b-bash">bash</primary>
    140           </indexterm>
    141         </listitem>
    142       </varlistentry>
    143 
    144       <varlistentry id="bashbug">
    145         <term><command>bashbug</command></term>
    146         <listitem>
    147           <para>A shell script to help the user compose and mail standard
    148           formatted bug reports concerning <command>bash</command></para>
    149           <indexterm zone="ch-system-bash bashbug">
    150             <primary sortas="b-bashbug">bashbug</primary>
    151           </indexterm>
    152         </listitem>
    153       </varlistentry>
    154 
    155       <varlistentry id="sh">
    156         <term><command>sh</command></term>
    157         <listitem>
    158           <para>A symlink to the <command>bash</command> program; when invoked
    159           as <command>sh</command>, <command>bash</command> tries to mimic the
    160           startup behavior of historical versions of <command>sh</command> as
    161           closely as possible, while conforming to the POSIX standard as
    162           well</para>
    163           <indexterm zone="ch-system-bash sh">
    164             <primary sortas="b-sh">sh</primary>
    165           </indexterm>
    166         </listitem>
    167       </varlistentry>
    168 
    169     </variablelist>
     91    <para>Details on this package are located in
     92    <xref linkend="contents-bash" role="."/></para>
    17093
    17194  </sect2>
  • chapter06/bison.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-bison" role="wrap">
     8<sect1 id="ch-tools-bison" role="wrap">
    99  <?dbhtml filename="bison.html"?>
    1010
     
    1717  <title>Bison-&bison-version;</title>
    1818
    19   <indexterm zone="ch-system-bison">
     19  <indexterm zone="ch-tools-bison">
    2020    <primary sortas="a-Bison">Bison</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Bison package contains a parser generator.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/bison.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2730
    2831    <segmentedlist>
     
    3134
    3235      <seglistitem>
    33         <seg>&bison-ch6-sbu;</seg>
    34         <seg>&bison-ch6-du;</seg>
     36        <seg>&bison-ch5-sbu;</seg>
     37        <seg>&bison-ch5-du;</seg>
    3538      </seglistitem>
    3639    </segmentedlist>
     
    4043  <sect2 role="installation">
    4144    <title>Installation of Bison</title>
    42 <!--
    43     <para>First, fix a build problem with the current version:</para>
    4445
    45 <screen><userinput remap="pre">sed -i '9327 s/mv/cp/' Makefile.in</userinput></screen>
    46 -->
    4746    <para>Prepare Bison for compilation:</para>
    4847
    49 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr                     \
     49            --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
    5050
    51 <!--  I could not find a race condidtion in the current version.
    52     <para>Compile the package, but work around a race condition in the
    53     current version:</para>
     51    <variablelist>
     52      <title>The meaning of the new configure option:</title>
    5453
    55 <screen><userinput remap="make">make -j1</userinput></screen>-->
     54      <varlistentry>
     55        <term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term>
     56        <listitem>
     57          <para>This tells the build system to install bison documentation
     58          into a versioned directory.</para>
     59        </listitem>
     60      </varlistentry>
     61
     62    </variablelist>
    5663
    5764    <para>Compile the package:</para>
    5865
    5966<screen><userinput remap="make">make</userinput></screen>
    60 
    61     <para>To test the results (about 5.5 SBU), issue:</para>
    62 
    63 <screen><userinput remap="test">make check</userinput></screen>
    64 
    65     <para>Fourteen tests fail in the "Diagnostics" section, probably because of
    66     missing locales.</para>
    67 
    68 <!--
    69     <para>There is a circular dependency between bison and flex with regard to
    70     the checks.  If desired, after installing flex in the next section, the
    71     bison package can be rebuilt and the bison checks can be run with
    72     <command>make check</command>.</para>
    73 -->
    7467
    7568    <para>Install the package:</para>
     
    7972  </sect2>
    8073
    81   <sect2 id="contents-bison" role="content">
    82     <title>Contents of Bison</title>
     74  <sect2 role="content">
     75    <title/>
    8376
    84     <segmentedlist>
    85       <segtitle>Installed programs</segtitle>
    86       <segtitle>Installed library</segtitle>
    87       <segtitle>Installed directory</segtitle>
    88 
    89       <seglistitem>
    90         <seg>bison and yacc</seg>
    91         <seg>liby.a</seg>
    92         <seg>/usr/share/bison</seg>
    93       </seglistitem>
    94     </segmentedlist>
    95 
    96     <variablelist>
    97       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    98       <?dbfo list-presentation="list"?>
    99       <?dbhtml list-presentation="table"?>
    100 
    101       <varlistentry id="bison">
    102         <term><command>bison</command></term>
    103         <listitem>
    104           <para>Generates, from a series of rules, a program for analyzing the
    105           structure of text files; Bison is a replacement for Yacc (Yet Another
    106           Compiler Compiler)</para>
    107           <indexterm zone="ch-system-bison bison">
    108             <primary sortas="b-bison">bison</primary>
    109           </indexterm>
    110         </listitem>
    111       </varlistentry>
    112 
    113       <varlistentry id="yacc">
    114         <term><command>yacc</command></term>
    115         <listitem>
    116           <para>A wrapper for <command>bison</command>, meant for programs that
    117           still call <command>yacc</command> instead of <command>bison</command>;
    118           it calls <command>bison</command> with the <parameter>-y</parameter>
    119           option</para>
    120           <indexterm zone="ch-system-bison yacc">
    121             <primary sortas="b-yacc">yacc</primary>
    122           </indexterm>
    123         </listitem>
    124       </varlistentry>
    125 
    126       <varlistentry id="liby">
    127         <term><filename class="libraryfile">liby</filename></term>
    128         <listitem>
    129           <para>The Yacc library containing implementations of Yacc-compatible
    130           <function>yyerror</function> and <function>main</function> functions;
    131           this library is normally not very useful, but POSIX requires it</para>
    132           <indexterm zone="ch-system-bison liby">
    133             <primary sortas="c-liby">liby</primary>
    134           </indexterm>
    135         </listitem>
    136       </varlistentry>
    137 
    138     </variablelist>
     77    <para>Details on this package are located in
     78    <xref linkend="contents-bison" role="."/></para>
    13979
    14080  </sect2>
  • chapter06/bzip2.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-bzip2" role="wrap">
     8<sect1 id="ch-tools-bzip2" role="wrap">
    99  <?dbhtml filename="bzip2.html"?>
    1010
     
    1717  <title>Bzip2-&bzip2-version;</title>
    1818
    19   <indexterm zone="ch-system-bzip2">
     19  <indexterm zone="ch-tools-bzip2">
    2020    <primary sortas="a-Bzip2">Bzip2</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Bzip2 package contains programs for compressing and decompressing
    27     files. Compressing text files with <command>bzip2</command> yields a much
    28     better compression percentage than with the traditional
    29     <command>gzip</command>.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter06/bzip2.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
    3131    <segmentedlist>
     
    3434
    3535      <seglistitem>
    36         <seg>&bzip2-ch6-sbu;</seg>
    37         <seg>&bzip2-ch6-du;</seg>
     36        <seg>&bzip2-ch5-sbu;</seg>
     37        <seg>&bzip2-ch5-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4444    <title>Installation of Bzip2</title>
    4545
    46     <para>Apply a patch that will install the documentation for this package:</para>
     46    <para>Apply a patch that will install the documentation for this
     47    package:</para>
    4748
    4849<screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
    4950
    50    <para>The following command ensures installation of symbolic links are relative:</para>
     51    <para>The following command ensures installation of symbolic links are
     52    relative:</para>
    5153
    5254<screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
     
    5658<screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
    5759
    58     <para>Prepare Bzip2 for compilation with:</para>
     60    <para>The Bzip2 package does not contain a <command>configure</command>
     61    script. There are two <filename>Makefile</filename>, one for the shared
     62    library, and the other for the static library. Since we need both, We
     63    do the compilation in two stages. First the shared library:</para>
    5964
    60 <screen><userinput remap="make">make -f Makefile-libbz2_so
     65<screen><userinput remap="make">make CC=$LFS_TGT-gcc -f Makefile-libbz2_so
    6166make clean</userinput></screen>
    6267
     
    7782    </variablelist>
    7883
    79     <para>Compile and test the package:</para>
     84    <para>Compile and test the package with:</para>
    8085
    81 <screen><userinput remap="make">make</userinput></screen>
     86<screen><userinput remap="make">make CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</userinput></screen>
    8287
    83     <para>Install the programs:</para>
     88    <para>Install the package:</para>
    8489
    85 <screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
     90<screen><userinput remap="install">make PREFIX=$LFS/usr install</userinput></screen>
    8691
    8792    <para>Install the shared <command>bzip2</command> binary into the
    88     <filename class="directory">/bin</filename> directory, make
    89     some necessary symbolic links, and clean up:</para>
     93    <filename class="directory">/bin</filename> directory, make some necessary
     94    symbolic links, and clean up:</para>
    9095
    91 <screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2
    92 cp -av libbz2.so* /lib
     96<screen><userinput remap="install">cp -v bzip2-shared $LFS/bin/bzip2
     97cp -av libbz2.so* $LFS/lib
    9398ln -sv ../../lib/libbz2.so.1.0 $LFS/usr/lib/libbz2.so
    94 rm -v /usr/bin/{bunzip2,bzcat,bzip2}
    95 ln -sv bzip2 /bin/bunzip2
    96 ln -sv bzip2 /bin/bzcat</userinput></screen>
     99rm -v $LFS/usr/bin/{bunzip2,bzcat,bzip2}
     100ln -sv bzip2 $LFS/bin/bunzip2
     101ln -sv bzip2 $LFS/bin/bzcat</userinput></screen>
    97102
    98103  </sect2>
    99104
    100   <sect2 id="contents-bzip2" role="content">
    101     <title>Contents of Bzip2</title>
    102 
    103     <segmentedlist>
    104       <segtitle>Installed programs</segtitle>
    105       <segtitle>Installed libraries</segtitle>
    106       <segtitle>Installed directory</segtitle>
    107 
    108       <seglistitem>
    109         <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to
    110         bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep),
    111         bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg>
    112         <seg>libbz2.{a,so}</seg>
    113         <seg>/usr/share/doc/bzip2-&bzip2-version;</seg>
    114       </seglistitem>
    115     </segmentedlist>
    116 
    117     <variablelist>
    118       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    119       <?dbfo list-presentation="list"?>
    120       <?dbhtml list-presentation="table"?>
    121 
    122       <varlistentry id="bunzip2">
    123         <term><command>bunzip2</command></term>
    124         <listitem>
    125           <para>Decompresses bzipped files</para>
    126           <indexterm zone="ch-system-bzip2 bunzip2">
    127             <primary sortas="b-bunzip2">bunzip2</primary>
    128           </indexterm>
    129         </listitem>
    130       </varlistentry>
    131 
    132       <varlistentry id="bzcat">
    133         <term><command>bzcat</command></term>
    134         <listitem>
    135           <para>Decompresses to standard output</para>
    136           <indexterm zone="ch-system-bzip2 bzcat">
    137             <primary sortas="b-bzcat">bzcat</primary>
    138           </indexterm>
    139         </listitem>
    140       </varlistentry>
    141 
    142       <varlistentry id="bzcmp">
    143         <term><command>bzcmp</command></term>
    144         <listitem>
    145           <para>Runs <command>cmp</command> on bzipped files</para>
    146           <indexterm zone="ch-system-bzip2 bzcmp">
    147             <primary sortas="b-bzcmp">bzcmp</primary>
    148           </indexterm>
    149         </listitem>
    150       </varlistentry>
    151 
    152       <varlistentry id="bzdiff">
    153         <term><command>bzdiff</command></term>
    154         <listitem>
    155           <para>Runs <command>diff</command> on bzipped files</para>
    156           <indexterm zone="ch-system-bzip2 bzdiff">
    157             <primary sortas="b-bzdiff">bzdiff</primary>
    158           </indexterm>
    159         </listitem>
    160       </varlistentry>
    161 
    162       <varlistentry id="bzegrep">
    163         <term><command>bzegrep</command></term>
    164         <listitem>
    165           <para>Runs <command>egrep</command> on bzipped files</para>
    166           <indexterm zone="ch-system-bzip2 bzegrep">
    167             <primary sortas="b-bzegrep">bzegrep</primary>
    168           </indexterm>
    169         </listitem>
    170       </varlistentry>
    171 
    172       <varlistentry id="bzfgrep">
    173         <term><command>bzfgrep</command></term>
    174         <listitem>
    175           <para>Runs <command>fgrep</command> on bzipped files</para>
    176           <indexterm zone="ch-system-bzip2 bzfgrep">
    177             <primary sortas="b-bzfgrep">bzfgrep</primary>
    178           </indexterm>
    179         </listitem>
    180       </varlistentry>
    181 
    182       <varlistentry id="bzgrep">
    183         <term><command>bzgrep</command></term>
    184         <listitem>
    185           <para>Runs <command>grep</command> on bzipped files</para>
    186           <indexterm zone="ch-system-bzip2 bzgrep">
    187             <primary sortas="b-bzgrep">bzgrep</primary>
    188           </indexterm>
    189         </listitem>
    190       </varlistentry>
    191 
    192       <varlistentry id="bzip2">
    193         <term><command>bzip2</command></term>
    194         <listitem>
    195           <para>Compresses files using the Burrows-Wheeler block sorting text
    196           compression algorithm with Huffman coding; the compression rate is
    197           better than that achieved by more conventional compressors using
    198           <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para>
    199           <indexterm zone="ch-system-bzip2 bzip2">
    200             <primary sortas="b-bzip2">bzip2</primary>
    201           </indexterm>
    202         </listitem>
    203       </varlistentry>
    204 
    205       <varlistentry id="bzip2recover">
    206         <term><command>bzip2recover</command></term>
    207         <listitem>
    208           <para>Tries to recover data from damaged bzipped files</para>
    209           <indexterm zone="ch-system-bzip2 bzip2recover">
    210             <primary sortas="b-bzip2recover">bzip2recover</primary>
    211           </indexterm>
    212         </listitem>
    213       </varlistentry>
    214 
    215       <varlistentry id="bzless">
    216         <term><command>bzless</command></term>
    217         <listitem>
    218           <para>Runs <command>less</command> on bzipped files</para>
    219           <indexterm zone="ch-system-bzip2 bzless">
    220             <primary sortas="b-bzless">bzless</primary>
    221           </indexterm>
    222         </listitem>
    223       </varlistentry>
    224 
    225       <varlistentry id="bzmore">
    226         <term><command>bzmore</command></term>
    227         <listitem>
    228           <para>Runs <command>more</command> on bzipped files</para>
    229           <indexterm zone="ch-system-bzip2 bzmore">
    230             <primary sortas="b-bzmore">bzmore</primary>
    231           </indexterm>
    232         </listitem>
    233       </varlistentry>
    234 
    235       <varlistentry id="libbz2">
    236         <term><filename class="libraryfile">libbz2</filename></term>
    237         <listitem>
    238           <para>The library implementing lossless, block-sorting data
    239           compression, using the Burrows-Wheeler algorithm</para>
    240           <indexterm zone="ch-system-bzip2 libbz2">
    241             <primary sortas="c-libbz2">libbz2</primary>
    242           </indexterm>
    243         </listitem>
    244       </varlistentry>
    245 
    246     </variablelist>
     105  <sect2 role="content">
     106    <title/>
     107    <para>Details on this package are located in
     108    <xref linkend="contents-bzip2" role="."/></para>
    247109
    248110  </sect2>
  • chapter06/chapter06.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <chapter id="chapter-building-system" xreflabel="Chapter&nbsp;6">
     8<chapter id="chapter-temporary-tools" xreflabel="Chapter&nbsp;6">
    99  <?dbhtml dir="chapter06"?>
    1010  <?dbhtml filename="chapter06.html"?>
    1111
    12   <title>Installing Basic System Software</title>
     12  <title>Cross Compiling Temporary Tools</title>
    1313
    14   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
    15   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/>
    16 <!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/>-->
    17   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/>
    18 <!--  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/>-->
    19   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/>
    20   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/>
    21   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
    22   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
    23   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/>
     14  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
     15  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
     16  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
     17  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
     18  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>
    2419  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>
    25   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/>
    26   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
    27   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/>
    28   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>
    29   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/>
    30   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/>
    31   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/>
    32   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/>
    33   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>
    34   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>
    35   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
    36   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>
    37   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>
    38   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/>
    39   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
    40   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>
    41   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/>
    42   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/>
    43   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
    44   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
     20  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>
     21  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>
    4522  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>
    46   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
    47   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/>
    48   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/>
    49   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/>
    50   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/>
    51   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/>
    52   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>
    53   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/>
    54   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/>
    55   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>
    56   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/>
    57   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>
    58   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>
    59   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
    60   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/>
    61   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
    62   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>
    63   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>
    64   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
    65   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/>
    66   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>
    67   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>
    68   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>
    69   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/>
    70   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>
    71   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/>
    7223  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>
    73   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/>
    74   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/>
    75   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/>
    7624  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/>
    7725  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/>
    78   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/>
     26  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>
    7927  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/>
    80   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
    81   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/>
    82 
    83   <!-- systemd only -->
    84   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>
    85   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/>
    86 
    87   <!-- sysv only -->
    88   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/>
    89 
    90   <!-- Both sysv on systemd builds -->
    91   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/>
    92   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
    93 
    94   <!-- Both sysv and systemd builds -->
    95   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/>
    96 
    97   <!-- sysv only -->
    98   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
    99   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/>
    100 
    101   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/>
    102   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/>
    103   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/>
     28  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
     29  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/>
     30  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/>
     31  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/>
     32  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/>
    10433
    10534</chapter>
  • chapter06/coreutils.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-coreutils" role="wrap">
     8<sect1 id="ch-tools-coreutils" role="wrap">
    99  <?dbhtml filename="coreutils.html"?>
    1010
     
    1717  <title>Coreutils-&coreutils-version;</title>
    1818
    19   <indexterm zone="ch-system-coreutils">
     19  <indexterm zone="ch-tools-coreutils">
    2020    <primary sortas="a-Coreutils">Coreutils</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Coreutils package contains utilities for showing and setting the
    27     basic system characteristics.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/coreutils.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2830
    2931    <segmentedlist>
     
    3234
    3335      <seglistitem>
    34         <seg>&coreutils-ch6-sbu;</seg>
    35         <seg>&coreutils-ch6-du;</seg>
     36        <seg>&coreutils-ch5-sbu;</seg>
     37        <seg>&coreutils-ch5-du;</seg>
    3638      </seglistitem>
    3739    </segmentedlist>
     
    4244    <title>Installation of Coreutils</title>
    4345
    44     <para>POSIX requires that programs from Coreutils recognize character
    45     boundaries correctly even in multibyte locales. The following patch fixes
    46     this non-compliance and other internationalization-related bugs.</para>
     46    <para>Prepare Coreutils for compilation:</para>
    4747
    48 <screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
    49 
    50     <note>
    51       <para>In the past, many bugs were found in this patch. When reporting new
    52       bugs to Coreutils maintainers, please check first if they are reproducible
    53       without this patch.</para>
    54     </note>
    55 
    56    <!-- this has been fixed in upstream gnulib, when a new version of
    57    coreutils is released, please check #4055 to see if the change has been
    58    picked up in this package -->
    59    <para>Suppress a test which on some machines can loop forever:</para>
    60 
    61 <screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen>
    62 
    63     <para>Now prepare Coreutils for compilation:</para>
    64 
    65 <screen><userinput remap="configure">autoreconf -fiv
    66 FORCE_UNSAFE_CONFIGURE=1 ./configure \
    67             --prefix=/usr            \
     48<screen><userinput remap="configure">./configure --prefix=/usr                     \
     49            --host=$LFS_TGT                   \
     50            --build=$(build-aux/config.guess) \
     51            --enable-install-program=hostname \
    6852            --enable-no-install-program=kill,uptime</userinput></screen>
    6953
     
    7256
    7357      <varlistentry>
    74         <term><command>autoreconf</command></term>
     58        <term><envar>--enable-install-program=hostname</envar></term>
    7559        <listitem>
    76           <para>This command updates generated configuration files
    77           consistent with the latest version of automake.
    78           </para>
    79         </listitem>
    80       </varlistentry>
    81 
    82       <varlistentry>
    83         <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>
    84         <listitem>
    85           <para>This environment variable allows the package to be
    86           built as the root user.
    87           </para>
    88         </listitem>
    89       </varlistentry>
    90 
    91       <varlistentry>
    92         <term><parameter>--enable-no-install-program=kill,uptime</parameter></term>
    93         <listitem>
    94           <para>The purpose of this switch is to prevent Coreutils from
    95           installing binaries that will be installed by other packages later.
    96           </para>
     60          <para>This enables the <command>hostname</command> binary to be built
     61          and installed &ndash; it is disabled by default but is required by the
     62          Perl test suite.</para>
    9763        </listitem>
    9864      </varlistentry>
     
    10369<screen><userinput remap="make">make</userinput></screen>
    10470
    105     <para>Skip down to <quote>Install the
    106     package</quote> if not running the test suite.</para>
    107 
    108     <para>Now the test suite is ready to be run. First, run the tests that are
    109     meant to be run as user <systemitem class="username">root</systemitem>:</para>
    110 
    111 <screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen>
    112 
    113     <para>We're going to run the remainder of the tests as the
    114     <systemitem class="username">tester</systemitem> user. Certain tests,
    115     however, require that the user be a member of more than one group. So that
    116     these tests are not skipped we'll add a temporary group and make the
    117     user <systemitem class="username">tester</systemitem> a part of it:</para>
    118 
    119 <screen><userinput remap="test">echo "dummy:x:102:tester" &gt;&gt; /etc/group</userinput></screen>
    120 
    121     <para>Fix some of the permissions so that the non-root user can compile and
    122     run the tests:</para>
    123 
    124 <screen><userinput remap="test">chown -Rv tester . </userinput></screen>
    125 
    126     <para>Now run the tests:</para>
    127 
    128 <screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
    129 <!--
    130     <para>The test program test-getlogin is known to fail in a
    131     partially built system environment like the chroot environment here, but
    132     passes if run at the end of this chapter.  The test program tty.sh is
    133     also known to fail.</para>
    134 -->
    135 
    136     <para>Remove the temporary group:</para>
    137 
    138 <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
    13971    <para>Install the package:</para>
    14072
    141 <screen><userinput remap="install">make install</userinput></screen>
     73<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
     74<!--
     75    <para>The above command refuses to install <filename>su</filename>
     76    because the program cannot be installed setuid root as a non-privileged
     77    user. By manually installing it, we can use it for running tests in the
     78    final system as a non-privileged user. Install it with:</para>
    14279
    143     <para>Move programs to the locations specified by the FHS:</para>
     80<screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen>
     81-->
     82    <para>Move programs to their final expected locations. Although this is
     83    not necessary in this temporary environment, we must do so because some
     84    programs harcode executable locations:</para>
    14485
    145 <screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
    146 mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
    147 mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
    148 mv -v /usr/bin/chroot /usr/sbin
    149 mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
    150 sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen>
    151 
    152     <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
    153     depend on <command>head</command>, <command>nice</command>,
    154     <command>sleep</command>, and <command>touch</command>.  As <filename
    155     class="directory">/usr</filename> may not be available during the early and
    156     late stages of booting, those binaries need to be on the root partition to
    157     maintain FHS compliance:</para>
    158 
    159 <screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen>
     86<screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin
     87mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin
     88mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin
     89mv -v $LFS/usr/bin/chroot $LFS/usr/sbin
     90mkdir -pv $LFS/usr/share/man/man8
     91mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8
     92sed -i s/\"1\"/\"8\"/1 $LFS/usr/share/man/man8/chroot.8
     93mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin</userinput></screen>
    16094
    16195  </sect2>
    16296
    163   <sect2 id="contents-coreutils" role="content">
    164     <title>Contents of Coreutils</title>
     97  <sect2 role="content">
     98    <title/>
    16599
    166     <segmentedlist>
    167       <segtitle>Installed programs</segtitle>
    168       <segtitle>Installed library</segtitle>
    169       <segtitle>Installed directory</segtitle>
    170 
    171       <seglistitem>
    172         <seg>[, b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown,
    173         chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors,
    174         dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups,
    175         head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir,
    176         mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste,
    177         pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm,
    178         rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum,
    179         sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum,
    180         sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort,
    181         tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and
    182         yes</seg>
    183         <seg>libstdbuf.so (in /usr/libexec/coreutils)</seg>
    184         <seg>/usr/libexec/coreutils</seg>
    185       </seglistitem>
    186     </segmentedlist>
    187 
    188     <variablelist>
    189       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    190       <?dbfo list-presentation="list"?>
    191       <?dbhtml list-presentation="table"?>
    192 
    193       <varlistentry id="base32">
    194         <term><command>base32</command></term>
    195         <listitem>
    196           <para>Encodes and decodes data according to the base32 specification
    197           (RFC 4648)</para>
    198           <indexterm zone="ch-system-coreutils base64">
    199             <primary sortas="b-base64">base64</primary>
    200           </indexterm>
    201         </listitem>
    202       </varlistentry>
    203 
    204       <varlistentry id="base64">
    205         <term><command>base64</command></term>
    206         <listitem>
    207           <para>Encodes and decodes data according to the base64 specification
    208           (RFC 4648)</para>
    209           <indexterm zone="ch-system-coreutils base64">
    210             <primary sortas="b-base64">base64</primary>
    211           </indexterm>
    212         </listitem>
    213       </varlistentry>
    214 
    215       <varlistentry id="b2sum">
    216         <term><command>b2sum</command></term>
    217         <listitem>
    218           <para>Prints or checks BLAKE2 (512-bit) checksums</para>
    219           <indexterm zone="ch-system-coreutils b2sum">
    220             <primary sortas="b-b2sum">b2sum</primary>
    221           </indexterm>
    222         </listitem>
    223       </varlistentry>
    224 
    225       <varlistentry id="basename">
    226         <term><command>basename</command></term>
    227         <listitem>
    228           <para>Strips any path and a given suffix from a file name</para>
    229           <indexterm zone="ch-system-coreutils basename">
    230             <primary sortas="b-basename">basename</primary>
    231           </indexterm>
    232         </listitem>
    233       </varlistentry>
    234 
    235       <varlistentry id="basenc">
    236         <term><command>basenc</command></term>
    237         <listitem>
    238           <para>Encodes or decodes data using various algorithms</para>
    239           <indexterm zone="ch-system-coreutils basenc">
    240             <primary sortas="b-basenc">basenc</primary>
    241           </indexterm>
    242         </listitem>
    243       </varlistentry>
    244 
    245       <varlistentry id="cat">
    246         <term><command>cat</command></term>
    247         <listitem>
    248           <para>Concatenates files to standard output</para>
    249           <indexterm zone="ch-system-coreutils cat">
    250             <primary sortas="b-cat">cat</primary>
    251           </indexterm>
    252         </listitem>
    253       </varlistentry>
    254 
    255       <varlistentry id="chcon">
    256         <term><command>chcon</command></term>
    257         <listitem>
    258           <para>Changes security context for files and directories</para>
    259           <indexterm zone="ch-system-coreutils chcon">
    260             <primary sortas="b-chcon">chcon</primary>
    261           </indexterm>
    262         </listitem>
    263       </varlistentry>
    264 
    265       <varlistentry id="chgrp">
    266         <term><command>chgrp</command></term>
    267         <listitem>
    268           <para>Changes the group ownership of files and directories</para>
    269           <indexterm zone="ch-system-coreutils chgrp">
    270             <primary sortas="b-chgrp">chgrp</primary>
    271           </indexterm>
    272         </listitem>
    273       </varlistentry>
    274 
    275       <varlistentry id="chmod">
    276         <term><command>chmod</command></term>
    277         <listitem>
    278           <para>Changes the permissions of each file to the given mode; the mode
    279           can be either a symbolic representation of the changes to make or an
    280           octal number representing the new permissions</para>
    281           <indexterm zone="ch-system-coreutils chmod">
    282             <primary sortas="b-chmod">chmod</primary>
    283           </indexterm>
    284         </listitem>
    285       </varlistentry>
    286 
    287       <varlistentry id="chown">
    288         <term><command>chown</command></term>
    289         <listitem>
    290           <para>Changes the user and/or group ownership of files and
    291           directories</para>
    292           <indexterm zone="ch-system-coreutils chown">
    293             <primary sortas="b-chown">chown</primary>
    294           </indexterm>
    295         </listitem>
    296       </varlistentry>
    297 
    298       <varlistentry id="chroot">
    299         <term><command>chroot</command></term>
    300         <listitem>
    301           <para>Runs a command with the specified directory as the
    302           <filename class="directory">/</filename> directory</para>
    303           <indexterm zone="ch-system-coreutils chroot">
    304             <primary sortas="b-chroot">chroot</primary>
    305           </indexterm>
    306         </listitem>
    307       </varlistentry>
    308 
    309       <varlistentry id="cksum">
    310         <term><command>cksum</command></term>
    311         <listitem>
    312           <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte
    313           counts of each specified file</para>
    314           <indexterm zone="ch-system-coreutils cksum">
    315             <primary sortas="b-cksum">cksum</primary>
    316           </indexterm>
    317         </listitem>
    318       </varlistentry>
    319 
    320       <varlistentry id="comm">
    321         <term><command>comm</command></term>
    322         <listitem>
    323           <para>Compares two sorted files, outputting in three columns the lines
    324           that are unique and the lines that are common</para>
    325           <indexterm zone="ch-system-coreutils comm">
    326             <primary sortas="b-comm">comm</primary>
    327           </indexterm>
    328         </listitem>
    329       </varlistentry>
    330 
    331       <varlistentry id="cp">
    332         <term><command>cp</command></term>
    333         <listitem>
    334           <para>Copies files</para>
    335           <indexterm zone="ch-system-coreutils cp">
    336             <primary sortas="b-cp">cp</primary>
    337           </indexterm>
    338         </listitem>
    339       </varlistentry>
    340 
    341       <varlistentry id="csplit">
    342         <term><command>csplit</command></term>
    343         <listitem>
    344           <para>Splits a given file into several new files, separating them
    345           according to given patterns or line numbers and outputting the byte
    346           count of each new file</para>
    347           <indexterm zone="ch-system-coreutils csplit">
    348             <primary sortas="b-csplit">csplit</primary>
    349           </indexterm>
    350         </listitem>
    351       </varlistentry>
    352 
    353       <varlistentry id="cut">
    354         <term><command>cut</command></term>
    355         <listitem>
    356           <para>Prints sections of lines, selecting the parts according to given
    357           fields or positions</para>
    358           <indexterm zone="ch-system-coreutils cut">
    359             <primary sortas="b-cut">cut</primary>
    360           </indexterm>
    361         </listitem>
    362       </varlistentry>
    363 
    364       <varlistentry id="date">
    365         <term><command>date</command></term>
    366         <listitem>
    367           <para>Displays the current time in the given format, or sets the
    368           system date</para>
    369           <indexterm zone="ch-system-coreutils date">
    370             <primary sortas="b-date">date</primary>
    371           </indexterm>
    372         </listitem>
    373       </varlistentry>
    374 
    375       <varlistentry id="dd">
    376         <term><command>dd</command> </term>
    377         <listitem>
    378           <para>Copies a file using the given block size and count, while
    379           optionally performing conversions on it</para>
    380           <indexterm zone="ch-system-coreutils dd">
    381             <primary sortas="b-dd">dd</primary>
    382           </indexterm>
    383         </listitem>
    384       </varlistentry>
    385 
    386       <varlistentry id="df">
    387         <term><command>df</command></term>
    388         <listitem>
    389           <para>Reports the amount of disk space available (and used) on all
    390           mounted file systems, or only on the file systems holding the selected
    391           files</para>
    392           <indexterm zone="ch-system-coreutils df">
    393             <primary sortas="b-df">df</primary>
    394           </indexterm>
    395         </listitem>
    396       </varlistentry>
    397 
    398       <varlistentry id="dir">
    399         <term><command>dir</command></term>
    400         <listitem>
    401           <para>Lists the contents of each given directory (the same as
    402           the <command>ls</command> command)</para>
    403           <indexterm zone="ch-system-coreutils dir">
    404             <primary sortas="b-dir">dir</primary>
    405           </indexterm>
    406         </listitem>
    407       </varlistentry>
    408 
    409       <varlistentry id="dircolors">
    410         <term><command>dircolors</command></term>
    411         <listitem>
    412           <para>Outputs commands to set the <envar>LS_COLOR</envar>
    413           environment variable to change the color scheme used by
    414           <command>ls</command></para>
    415           <indexterm zone="ch-system-coreutils dircolors">
    416             <primary sortas="b-dircolors">dircolors</primary>
    417           </indexterm>
    418         </listitem>
    419       </varlistentry>
    420 
    421       <varlistentry id="dirname">
    422         <term><command>dirname</command></term>
    423         <listitem>
    424           <para>Strips the non-directory suffix from a file name</para>
    425           <indexterm zone="ch-system-coreutils dirname">
    426             <primary sortas="b-dirname">dirname</primary>
    427           </indexterm>
    428         </listitem>
    429       </varlistentry>
    430 
    431       <varlistentry id="du">
    432         <term><command>du</command></term>
    433         <listitem>
    434           <para>Reports the amount of disk space used by the current directory,
    435           by each of the given directories (including all subdirectories) or by
    436           each of the given files</para>
    437           <indexterm zone="ch-system-coreutils du">
    438             <primary sortas="b-du">du</primary>
    439           </indexterm>
    440         </listitem>
    441       </varlistentry>
    442 
    443       <varlistentry id="echo">
    444         <term><command>echo</command></term>
    445         <listitem>
    446           <para>Displays the given strings</para>
    447           <indexterm zone="ch-system-coreutils echo">
    448             <primary sortas="b-echo">echo</primary>
    449           </indexterm>
    450         </listitem>
    451       </varlistentry>
    452 
    453       <varlistentry id="env">
    454         <term><command>env</command></term>
    455         <listitem>
    456           <para>Runs a command in a modified environment</para>
    457           <indexterm zone="ch-system-coreutils env">
    458             <primary sortas="b-env">env</primary>
    459           </indexterm>
    460         </listitem>
    461       </varlistentry>
    462 
    463       <varlistentry id="expand">
    464         <term><command>expand</command></term>
    465         <listitem>
    466           <para>Converts tabs to spaces</para>
    467           <indexterm zone="ch-system-coreutils expand">
    468             <primary sortas="b-expand">expand</primary>
    469           </indexterm>
    470         </listitem>
    471       </varlistentry>
    472 
    473       <varlistentry id="expr">
    474         <term><command>expr</command></term>
    475         <listitem>
    476           <para>Evaluates expressions</para>
    477           <indexterm zone="ch-system-coreutils expr">
    478             <primary sortas="b-expr">expr</primary>
    479           </indexterm>
    480         </listitem>
    481       </varlistentry>
    482 
    483       <varlistentry id="factor">
    484         <term><command>factor</command></term>
    485         <listitem>
    486           <para>Prints the prime factors of all specified integer numbers</para>
    487           <indexterm zone="ch-system-coreutils factor">
    488             <primary sortas="b-factor">factor</primary>
    489           </indexterm>
    490         </listitem>
    491       </varlistentry>
    492 
    493       <varlistentry id="false">
    494         <term><command>false</command></term>
    495         <listitem>
    496           <para>Does nothing, unsuccessfully; it always exits with a status code
    497           indicating failure</para>
    498           <indexterm zone="ch-system-coreutils false">
    499             <primary sortas="b-false">false</primary>
    500           </indexterm>
    501         </listitem>
    502       </varlistentry>
    503 
    504       <varlistentry id="fmt">
    505         <term><command>fmt</command></term>
    506         <listitem>
    507           <para>Reformats the paragraphs in the given files</para>
    508           <indexterm zone="ch-system-coreutils fmt">
    509             <primary sortas="b-fmt">fmt</primary>
    510           </indexterm>
    511         </listitem>
    512       </varlistentry>
    513 
    514       <varlistentry id="fold">
    515         <term><command>fold</command></term>
    516         <listitem>
    517           <para>Wraps the lines in the given files</para>
    518           <indexterm zone="ch-system-coreutils fold">
    519             <primary sortas="b-fold">fold</primary>
    520           </indexterm>
    521         </listitem>
    522       </varlistentry>
    523 
    524       <varlistentry id="groups">
    525         <term><command>groups</command></term>
    526         <listitem>
    527           <para>Reports a user's group memberships</para>
    528           <indexterm zone="ch-system-coreutils groups">
    529             <primary sortas="b-groups">groups</primary>
    530           </indexterm>
    531         </listitem>
    532       </varlistentry>
    533 
    534       <varlistentry id="head">
    535         <term><command>head</command></term>
    536         <listitem>
    537           <para>Prints the first ten lines (or the given number of lines)
    538           of each given file</para>
    539           <indexterm zone="ch-system-coreutils head">
    540             <primary sortas="b-head">head</primary>
    541           </indexterm>
    542         </listitem>
    543       </varlistentry>
    544 
    545       <varlistentry id="hostid">
    546         <term><command>hostid</command></term>
    547         <listitem>
    548           <para>Reports the numeric identifier (in hexadecimal) of the host</para>
    549           <indexterm zone="ch-system-coreutils hostid">
    550             <primary sortas="b-hostid">hostid</primary>
    551           </indexterm>
    552         </listitem>
    553       </varlistentry>
    554 
    555       <varlistentry id="id">
    556         <term><command>id</command></term>
    557         <listitem>
    558           <para>Reports the effective user ID, group ID, and group memberships
    559           of the current user or specified user</para>
    560           <indexterm zone="ch-system-coreutils id">
    561             <primary sortas="b-id">id</primary>
    562           </indexterm>
    563         </listitem>
    564       </varlistentry>
    565 
    566       <varlistentry id="install">
    567         <term><command>install</command> </term>
    568         <listitem>
    569           <para>Copies files while setting their permission modes and, if
    570           possible, their owner and group</para>
    571           <indexterm zone="ch-system-coreutils install">
    572             <primary sortas="b-install">install</primary>
    573           </indexterm>
    574         </listitem>
    575       </varlistentry>
    576 
    577       <varlistentry id="join">
    578         <term><command>join</command></term>
    579         <listitem>
    580           <para>Joins the lines that have identical join fields from two
    581           separate files</para>
    582           <indexterm zone="ch-system-coreutils join">
    583             <primary sortas="b-join">join</primary>
    584           </indexterm>
    585         </listitem>
    586       </varlistentry>
    587 
    588       <varlistentry id="link">
    589         <term><command>link</command></term>
    590         <listitem>
    591           <para>Creates a hard link with the given name to a file</para>
    592           <indexterm zone="ch-system-coreutils link">
    593             <primary sortas="b-link">link</primary>
    594           </indexterm>
    595         </listitem>
    596       </varlistentry>
    597 
    598       <varlistentry id="ln">
    599         <term><command>ln</command></term>
    600         <listitem>
    601           <para>Makes hard links or soft (symbolic) links between files</para>
    602           <indexterm zone="ch-system-coreutils ln">
    603             <primary sortas="b-ln">ln</primary>
    604           </indexterm>
    605         </listitem>
    606       </varlistentry>
    607 
    608       <varlistentry id="logname">
    609         <term><command>logname</command></term>
    610         <listitem>
    611           <para>Reports the current user's login name</para>
    612           <indexterm zone="ch-system-coreutils logname">
    613             <primary sortas="b-logname">logname</primary>
    614           </indexterm>
    615         </listitem>
    616       </varlistentry>
    617 
    618       <varlistentry id="ls">
    619         <term><command>ls</command></term>
    620         <listitem>
    621           <para>Lists the contents of each given directory</para>
    622           <indexterm zone="ch-system-coreutils ls">
    623             <primary sortas="b-ls">ls</primary>
    624           </indexterm>
    625         </listitem>
    626       </varlistentry>
    627 
    628       <varlistentry id="md5sum">
    629         <term><command>md5sum</command></term>
    630         <listitem>
    631           <para>Reports or checks Message Digest 5 (MD5) checksums</para>
    632           <indexterm zone="ch-system-coreutils md5sum">
    633             <primary sortas="b-md5sum">md5sum</primary>
    634           </indexterm>
    635         </listitem>
    636       </varlistentry>
    637 
    638       <varlistentry id="mkdir">
    639         <term><command>mkdir</command></term>
    640         <listitem>
    641           <para>Creates directories with the given names</para>
    642           <indexterm zone="ch-system-coreutils mkdir">
    643             <primary sortas="b-mkdir">mkdir</primary>
    644           </indexterm>
    645         </listitem>
    646       </varlistentry>
    647 
    648       <varlistentry id="mkfifo">
    649         <term><command>mkfifo</command></term>
    650         <listitem>
    651           <para>Creates First-In, First-Outs (FIFOs), a "named
    652           pipe" in UNIX parlance, with the given names</para>
    653           <indexterm zone="ch-system-coreutils mkfifo">
    654             <primary sortas="b-mkfifo">mkfifo</primary>
    655           </indexterm>
    656         </listitem>
    657       </varlistentry>
    658 
    659       <varlistentry id="mknod">
    660         <term><command>mknod</command></term>
    661         <listitem>
    662           <para>Creates device nodes with the given names; a device node is a
    663           character special file, a block special file, or a FIFO</para>
    664           <indexterm zone="ch-system-coreutils mknod">
    665             <primary sortas="b-mknod">mknod</primary>
    666           </indexterm>
    667         </listitem>
    668       </varlistentry>
    669 
    670       <varlistentry id="mktemp">
    671         <term><command>mktemp</command></term>
    672         <listitem>
    673           <para>Creates temporary files in a secure manner; it is used in scripts</para>
    674         <indexterm zone="ch-system-coreutils mktemp">
    675           <primary sortas="b-mktemp">mktemp</primary>
    676         </indexterm>
    677        </listitem>
    678      </varlistentry>
    679 
    680       <varlistentry id="mv">
    681         <term><command>mv</command></term>
    682         <listitem>
    683           <para>Moves or renames files or directories</para>
    684           <indexterm zone="ch-system-coreutils mv">
    685             <primary sortas="b-mv">mv</primary>
    686           </indexterm>
    687         </listitem>
    688       </varlistentry>
    689 
    690       <varlistentry id="nice">
    691         <term><command>nice</command></term>
    692         <listitem>
    693           <para>Runs a program with modified scheduling priority</para>
    694           <indexterm zone="ch-system-coreutils nice">
    695             <primary sortas="b-nice">nice</primary>
    696           </indexterm>
    697         </listitem>
    698       </varlistentry>
    699 
    700       <varlistentry id="nl">
    701         <term><command>nl</command></term>
    702         <listitem>
    703           <para>Numbers the lines from the given files</para>
    704           <indexterm zone="ch-system-coreutils nl">
    705             <primary sortas="b-nl">nl</primary>
    706           </indexterm>
    707         </listitem>
    708       </varlistentry>
    709 
    710       <varlistentry id="nohup">
    711         <term><command>nohup</command></term>
    712         <listitem>
    713           <para>Runs a command immune to hangups, with its output redirected to
    714           a log file</para>
    715           <indexterm zone="ch-system-coreutils nohup">
    716             <primary sortas="b-nohup">nohup</primary>
    717           </indexterm>
    718         </listitem>
    719       </varlistentry>
    720 
    721       <varlistentry id="nproc">
    722         <term><command>nproc</command></term>
    723         <listitem>
    724           <para>Prints the number of processing units available to a
    725           process</para>
    726           <indexterm zone="ch-system-coreutils nproc">
    727             <primary sortas="b-nproc">nproc</primary>
    728           </indexterm>
    729         </listitem>
    730       </varlistentry>
    731 
    732       <varlistentry id="numfmt">
    733         <term><command>numfmt</command></term>
    734         <listitem>
    735           <para>Converts numbers to or from human-readable strings</para>
    736           <indexterm zone="ch-system-coreutils numfmt">
    737             <primary sortas="b-numfmt">numfmt</primary>
    738           </indexterm>
    739         </listitem>
    740       </varlistentry>
    741 
    742       <varlistentry id="od">
    743         <term><command>od</command></term>
    744         <listitem>
    745           <para>Dumps files in octal and other formats</para>
    746           <indexterm zone="ch-system-coreutils od">
    747             <primary sortas="b-od">od</primary>
    748           </indexterm>
    749         </listitem>
    750       </varlistentry>
    751 
    752       <varlistentry id="paste">
    753         <term><command>paste</command></term>
    754         <listitem>
    755           <para>Merges the given files, joining sequentially corresponding lines
    756           side by side, separated by tab characters</para>
    757           <indexterm zone="ch-system-coreutils paste">
    758             <primary sortas="b-paste">paste</primary>
    759           </indexterm>
    760         </listitem>
    761       </varlistentry>
    762 
    763       <varlistentry id="pathchk">
    764         <term><command>pathchk</command></term>
    765         <listitem>
    766           <para>Checks if file names are valid or portable</para>
    767           <indexterm zone="ch-system-coreutils pathchk">
    768             <primary sortas="b-pathchk">pathchk</primary>
    769           </indexterm>
    770         </listitem>
    771       </varlistentry>
    772 
    773       <varlistentry id="pinky">
    774         <term><command>pinky</command></term>
    775         <listitem>
    776           <para>Is a lightweight finger client; it reports some information
    777           about the given users</para>
    778           <indexterm zone="ch-system-coreutils pinky">
    779             <primary sortas="b-pinky">pinky</primary>
    780           </indexterm>
    781         </listitem>
    782       </varlistentry>
    783 
    784       <varlistentry id="pr">
    785         <term><command>pr</command></term>
    786         <listitem>
    787           <para>Paginates and columnates files for printing</para>
    788           <indexterm zone="ch-system-coreutils pr">
    789             <primary sortas="b-pr">pr</primary>
    790           </indexterm>
    791         </listitem>
    792       </varlistentry>
    793 
    794       <varlistentry id="printenv">
    795         <term><command>printenv</command></term>
    796         <listitem>
    797           <para>Prints the environment</para>
    798           <indexterm zone="ch-system-coreutils printenv">
    799             <primary sortas="b-printenv">printenv</primary>
    800           </indexterm>
    801         </listitem>
    802       </varlistentry>
    803 
    804       <varlistentry id="printf">
    805         <term><command>printf</command></term>
    806         <listitem>
    807           <para>Prints the given arguments according to the given format, much
    808           like the C printf function</para>
    809           <indexterm zone="ch-system-coreutils printf">
    810             <primary sortas="b-printf">printf</primary>
    811           </indexterm>
    812         </listitem>
    813       </varlistentry>
    814 
    815       <varlistentry id="ptx">
    816         <term><command>ptx</command></term>
    817         <listitem>
    818           <para>Produces a permuted index from the contents of the given files,
    819           with each keyword in its context</para>
    820           <indexterm zone="ch-system-coreutils ptx">
    821             <primary sortas="b-ptx">ptx</primary>
    822           </indexterm>
    823         </listitem>
    824       </varlistentry>
    825 
    826       <varlistentry id="pwd">
    827         <term><command>pwd</command></term>
    828         <listitem>
    829           <para>Reports the name of the current working directory</para>
    830           <indexterm zone="ch-system-coreutils pwd">
    831             <primary sortas="b-pwd">pwd</primary>
    832           </indexterm>
    833         </listitem>
    834       </varlistentry>
    835 
    836       <varlistentry id="readlink">
    837         <term><command>readlink</command></term>
    838         <listitem>
    839           <para>Reports the value of the given symbolic link</para>
    840           <indexterm zone="ch-system-coreutils readlink">
    841             <primary sortas="b-readlink">readlink</primary>
    842           </indexterm>
    843         </listitem>
    844       </varlistentry>
    845 
    846       <varlistentry id="realpath">
    847         <term><command>realpath</command></term>
    848         <listitem>
    849           <para>Prints the resolved path</para>
    850           <indexterm zone="ch-system-coreutils realpath">
    851             <primary sortas="b-realpath">realpath</primary>
    852           </indexterm>
    853         </listitem>
    854       </varlistentry>
    855 
    856       <varlistentry id="rm">
    857         <term><command>rm</command></term>
    858         <listitem>
    859           <para>Removes files or directories</para>
    860           <indexterm zone="ch-system-coreutils rm">
    861             <primary sortas="b-rm">rm</primary>
    862           </indexterm>
    863         </listitem>
    864       </varlistentry>
    865 
    866       <varlistentry id="rmdir">
    867         <term><command>rmdir</command></term>
    868         <listitem>
    869           <para>Removes directories if they are empty</para>
    870           <indexterm zone="ch-system-coreutils rmdir">
    871             <primary sortas="b-rmdir">rmdir</primary>
    872           </indexterm>
    873         </listitem>
    874       </varlistentry>
    875 
    876       <varlistentry id="runcon">
    877         <term><command>runcon</command></term>
    878         <listitem>
    879           <para>Runs a command with specified security context</para>
    880           <indexterm zone="ch-system-coreutils runcon">
    881             <primary sortas="b-runcon">runcon</primary>
    882           </indexterm>
    883         </listitem>
    884       </varlistentry>
    885 
    886       <varlistentry id="seq">
    887         <term><command>seq</command></term>
    888         <listitem>
    889           <para>Prints a sequence of numbers within a given range and with a
    890           given increment</para>
    891           <indexterm zone="ch-system-coreutils seq">
    892             <primary sortas="b-seq">seq</primary>
    893           </indexterm>
    894         </listitem>
    895       </varlistentry>
    896 
    897       <varlistentry id="sha1sum">
    898         <term><command>sha1sum</command></term>
    899         <listitem>
    900           <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1)
    901           checksums</para>
    902           <indexterm zone="ch-system-coreutils sha1sum">
    903             <primary sortas="b-sha1sum">sha1sum</primary>
    904           </indexterm>
    905         </listitem>
    906       </varlistentry>
    907 
    908       <varlistentry id="sha224sum">
    909         <term><command>sha224sum</command></term>
    910         <listitem>
    911           <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para>
    912           <indexterm zone="ch-system-coreutils sha224sum">
    913             <primary sortas="b-sha224sum">sha224sum</primary>
    914           </indexterm>
    915         </listitem>
    916       </varlistentry>
    917 
    918       <varlistentry id="sha256sum">
    919         <term><command>sha256sum</command></term>
    920         <listitem>
    921           <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para>
    922           <indexterm zone="ch-system-coreutils sha256sum">
    923             <primary sortas="b-sha256sum">sha256sum</primary>
    924           </indexterm>
    925         </listitem>
    926       </varlistentry>
    927 
    928       <varlistentry id="sha384sum">
    929         <term><command>sha384sum</command></term>
    930         <listitem>
    931           <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para>
    932           <indexterm zone="ch-system-coreutils sha384sum">
    933             <primary sortas="b-sha384sum">sha384sum</primary>
    934           </indexterm>
    935         </listitem>
    936       </varlistentry>
    937 
    938       <varlistentry id="sha512sum">
    939         <term><command>sha512sum</command></term>
    940         <listitem>
    941           <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para>
    942           <indexterm zone="ch-system-coreutils sha512sum">
    943             <primary sortas="b-sha512sum">sha512sum</primary>
    944           </indexterm>
    945         </listitem>
    946       </varlistentry>
    947 
    948       <varlistentry id="shred">
    949         <term><command>shred</command></term>
    950         <listitem>
    951           <para>Overwrites the given files repeatedly with complex patterns,
    952           making it difficult to recover the data</para>
    953           <indexterm zone="ch-system-coreutils shred">
    954             <primary sortas="b-shred">shred</primary>
    955           </indexterm>
    956         </listitem>
    957       </varlistentry>
    958 
    959       <varlistentry id="shuf">
    960         <term><command>shuf</command></term>
    961         <listitem>
    962           <para>Shuffles lines of text</para>
    963           <indexterm zone="ch-system-coreutils shuf">
    964             <primary sortas="b-shuf">shuf</primary>
    965           </indexterm>
    966         </listitem>
    967       </varlistentry>
    968 
    969       <varlistentry id="sleep">
    970         <term><command>sleep</command></term>
    971         <listitem>
    972           <para>Pauses for the given amount of time</para>
    973           <indexterm zone="ch-system-coreutils sleep">
    974             <primary sortas="b-sleep">sleep</primary>
    975           </indexterm>
    976         </listitem>
    977       </varlistentry>
    978 
    979       <varlistentry id="sort">
    980         <term><command>sort</command></term>
    981         <listitem>
    982           <para>Sorts the lines from the given files</para>
    983           <indexterm zone="ch-system-coreutils sort">
    984             <primary sortas="b-sort">sort</primary>
    985           </indexterm>
    986         </listitem>
    987       </varlistentry>
    988 
    989       <varlistentry id="split">
    990         <term><command>split</command></term>
    991         <listitem>
    992           <para>Splits the given file into pieces, by size or by number of
    993           lines</para>
    994           <indexterm zone="ch-system-coreutils split">
    995             <primary sortas="b-split">split</primary>
    996           </indexterm>
    997         </listitem>
    998       </varlistentry>
    999 
    1000       <varlistentry id="stat">
    1001         <term><command>stat</command></term>
    1002         <listitem>
    1003           <para>Displays file or filesystem status</para>
    1004           <indexterm zone="ch-system-coreutils stat">
    1005             <primary sortas="b-stat">stat</primary>
    1006           </indexterm>
    1007         </listitem>
    1008       </varlistentry>
    1009 
    1010       <varlistentry id="stdbuf">
    1011         <term><command>stdbuf</command></term>
    1012         <listitem>
    1013           <para>Runs commands with altered buffering operations for its standard
    1014           streams</para>
    1015           <indexterm zone="ch-system-coreutils stdbuf">
    1016             <primary sortas="b-stdbuf">stdbuf</primary>
    1017           </indexterm>
    1018         </listitem>
    1019       </varlistentry>
    1020 
    1021       <varlistentry id="stty">
    1022         <term><command>stty</command></term>
    1023         <listitem>
    1024           <para>Sets or reports terminal line settings</para>
    1025           <indexterm zone="ch-system-coreutils stty">
    1026             <primary sortas="b-stty">stty</primary>
    1027           </indexterm>
    1028         </listitem>
    1029       </varlistentry>
    1030 
    1031       <varlistentry id="sum">
    1032         <term><command>sum</command></term>
    1033         <listitem>
    1034           <para>Prints checksum and block counts for each given file</para>
    1035           <indexterm zone="ch-system-coreutils sum">
    1036             <primary sortas="b-sum">sum</primary>
    1037           </indexterm>
    1038         </listitem>
    1039       </varlistentry>
    1040 
    1041       <varlistentry id="sync">
    1042         <term><command>sync</command></term>
    1043         <listitem>
    1044           <para>Flushes file system buffers; it forces changed blocks to disk
    1045           and updates the super block</para>
    1046           <indexterm zone="ch-system-coreutils sync">
    1047             <primary sortas="b-sync">sync</primary>
    1048           </indexterm>
    1049         </listitem>
    1050       </varlistentry>
    1051 
    1052       <varlistentry id="tac">
    1053         <term><command>tac</command></term>
    1054         <listitem>
    1055           <para>Concatenates the given files in reverse</para>
    1056           <indexterm zone="ch-system-coreutils tac">
    1057             <primary sortas="b-tac">tac</primary>
    1058           </indexterm>
    1059         </listitem>
    1060       </varlistentry>
    1061 
    1062       <varlistentry id="tail">
    1063         <term><command>tail</command></term>
    1064         <listitem>
    1065           <para>Prints the last ten lines (or the given number of lines) of each
    1066           given file</para>
    1067           <indexterm zone="ch-system-coreutils tail">
    1068             <primary sortas="b-tail">tail</primary>
    1069           </indexterm>
    1070         </listitem>
    1071       </varlistentry>
    1072 
    1073       <varlistentry id="tee">
    1074         <term><command>tee</command></term>
    1075         <listitem>
    1076           <para>Reads from standard input while writing both to standard output
    1077           and to the given files</para>
    1078           <indexterm zone="ch-system-coreutils tee">
    1079             <primary sortas="b-tee">tee</primary>
    1080           </indexterm>
    1081         </listitem>
    1082       </varlistentry>
    1083 
    1084       <varlistentry id="test">
    1085         <term><command>test</command></term>
    1086         <listitem>
    1087           <para>Compares values and checks file types</para>
    1088           <indexterm zone="ch-system-coreutils test">
    1089             <primary sortas="b-test">test</primary>
    1090           </indexterm>
    1091         </listitem>
    1092       </varlistentry>
    1093 
    1094       <varlistentry id="timeout">
    1095         <term><command>timeout</command></term>
    1096         <listitem>
    1097           <para>Runs a command with a time limit</para>
    1098           <indexterm zone="ch-system-coreutils timeout">
    1099             <primary sortas="b-timeout">timeout</primary>
    1100           </indexterm>
    1101         </listitem>
    1102       </varlistentry>
    1103 
    1104       <varlistentry id="touch">
    1105         <term><command>touch</command></term>
    1106         <listitem>
    1107           <para>Changes file timestamps, setting the access and modification
    1108           times of the given files to the current time; files that do not exist
    1109           are created with zero length</para>
    1110           <indexterm zone="ch-system-coreutils touch">
    1111             <primary sortas="b-touch">touch</primary>
    1112           </indexterm>
    1113         </listitem>
    1114       </varlistentry>
    1115 
    1116       <varlistentry id="tr">
    1117         <term><command>tr</command></term>
    1118         <listitem>
    1119           <para>Translates, squeezes, and deletes the given characters from
    1120           standard input</para>
    1121           <indexterm zone="ch-system-coreutils tr">
    1122             <primary sortas="b-tr">tr</primary>
    1123           </indexterm>
    1124         </listitem>
    1125       </varlistentry>
    1126 
    1127       <varlistentry id="true">
    1128         <term><command>true</command></term>
    1129         <listitem>
    1130           <para>Does nothing, successfully; it always exits with a status code
    1131           indicating success</para>
    1132           <indexterm zone="ch-system-coreutils true">
    1133             <primary sortas="b-true">true</primary>
    1134           </indexterm>
    1135         </listitem>
    1136       </varlistentry>
    1137 
    1138       <varlistentry id="truncate">
    1139         <term><command>truncate</command></term>
    1140         <listitem>
    1141           <para>Shrinks or expands a file to the specified size</para>
    1142           <indexterm zone="ch-system-coreutils truncate">
    1143             <primary sortas="b-truncate">truncate</primary>
    1144           </indexterm>
    1145         </listitem>
    1146       </varlistentry>
    1147 
    1148       <varlistentry id="tsort">
    1149         <term><command>tsort</command></term>
    1150         <listitem>
    1151           <para>Performs a topological sort; it writes a completely ordered list
    1152           according to the partial ordering in a given file</para>
    1153           <indexterm zone="ch-system-coreutils tsort">
    1154             <primary sortas="b-tsort">tsort</primary>
    1155           </indexterm>
    1156         </listitem>
    1157       </varlistentry>
    1158 
    1159       <varlistentry id="tty">
    1160         <term><command>tty</command></term>
    1161         <listitem>
    1162           <para>Reports the file name of the terminal connected to standard
    1163           input</para>
    1164           <indexterm zone="ch-system-coreutils tty">
    1165             <primary sortas="b-tty">tty</primary>
    1166           </indexterm>
    1167         </listitem>
    1168       </varlistentry>
    1169 
    1170       <varlistentry id="uname">
    1171         <term><command>uname</command></term>
    1172         <listitem>
    1173           <para>Reports system information</para>
    1174           <indexterm zone="ch-system-coreutils uname">
    1175             <primary sortas="b-uname">uname</primary>
    1176           </indexterm>
    1177         </listitem>
    1178       </varlistentry>
    1179 
    1180       <varlistentry id="unexpand">
    1181         <term><command>unexpand</command></term>
    1182         <listitem>
    1183           <para>Converts spaces to tabs</para>
    1184           <indexterm zone="ch-system-coreutils unexpand">
    1185             <primary sortas="b-unexpand">unexpand</primary>
    1186           </indexterm>
    1187         </listitem>
    1188       </varlistentry>
    1189 
    1190       <varlistentry id="uniq">
    1191         <term><command>uniq</command></term>
    1192         <listitem>
    1193           <para>Discards all but one of successive identical lines</para>
    1194           <indexterm zone="ch-system-coreutils uniq">
    1195             <primary sortas="b-uniq">uniq</primary>
    1196           </indexterm>
    1197         </listitem>
    1198       </varlistentry>
    1199 
    1200       <varlistentry id="unlink">
    1201         <term><command>unlink</command></term>
    1202         <listitem>
    1203           <para>Removes the given file</para>
    1204           <indexterm zone="ch-system-coreutils unlink">
    1205             <primary sortas="b-unlink">unlink</primary>
    1206           </indexterm>
    1207         </listitem>
    1208       </varlistentry>
    1209 
    1210       <varlistentry id="users">
    1211         <term><command>users</command></term>
    1212         <listitem>
    1213           <para>Reports the names of the users currently logged on</para>
    1214           <indexterm zone="ch-system-coreutils users">
    1215             <primary sortas="b-users">users</primary>
    1216           </indexterm>
    1217         </listitem>
    1218       </varlistentry>
    1219 
    1220       <varlistentry id="vdir">
    1221         <term><command>vdir</command></term>
    1222         <listitem>
    1223           <para>Is the same as <command>ls -l</command></para>
    1224           <indexterm zone="ch-system-coreutils vdir">
    1225             <primary sortas="b-vdir">vdir</primary>
    1226           </indexterm>
    1227         </listitem>
    1228       </varlistentry>
    1229 
    1230       <varlistentry id="wc">
    1231         <term><command>wc</command></term>
    1232         <listitem>
    1233           <para>Reports the number of lines, words, and bytes for each given
    1234           file, as well as a total line when more than one file is given</para>
    1235           <indexterm zone="ch-system-coreutils wc">
    1236             <primary sortas="b-wc">wc</primary>
    1237           </indexterm>
    1238         </listitem>
    1239       </varlistentry>
    1240 
    1241       <varlistentry id="who">
    1242         <term><command>who</command></term>
    1243         <listitem>
    1244           <para>Reports who is logged on</para>
    1245           <indexterm zone="ch-system-coreutils who">
    1246             <primary sortas="b-who">who</primary>
    1247           </indexterm>
    1248         </listitem>
    1249       </varlistentry>
    1250 
    1251       <varlistentry id="whoami">
    1252         <term><command>whoami</command></term>
    1253         <listitem>
    1254           <para>Reports the user name associated with the current effective
    1255           user ID</para>
    1256           <indexterm zone="ch-system-coreutils whoami">
    1257             <primary sortas="b-whoami">whoami</primary>
    1258           </indexterm>
    1259         </listitem>
    1260       </varlistentry>
    1261 
    1262       <varlistentry id="yes">
    1263         <term><command>yes</command></term>
    1264         <listitem>
    1265           <para>Repeatedly outputs <quote>y</quote> or a given string until
    1266           killed</para>
    1267           <indexterm zone="ch-system-coreutils yes">
    1268             <primary sortas="b-yes">yes</primary>
    1269           </indexterm>
    1270         </listitem>
    1271       </varlistentry>
    1272 
    1273       <varlistentry id="libstdbuf">
    1274         <term><filename class="libraryfile">libstdbuf</filename></term>
    1275         <listitem>
    1276           <para>Library used by <command>stdbuf</command></para>
    1277           <indexterm zone="ch-system-coreutils libstdbuf">
    1278             <primary sortas="c-libstdbuf">libstdbuf</primary>
    1279           </indexterm>
    1280         </listitem>
    1281       </varlistentry>
    1282 
    1283     </variablelist>
     100    <para>Details on this package are located in
     101    <xref linkend="contents-coreutils" role="."/></para>
    1284102
    1285103  </sect2>
  • chapter06/diffutils.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-diffutils" role="wrap">
     8<sect1 id="ch-tools-diffutils" role="wrap">
    99  <?dbhtml filename="diffutils.html"?>
    1010
     
    1717  <title>Diffutils-&diffutils-version;</title>
    1818
    19   <indexterm zone="ch-system-diffutils">
     19  <indexterm zone="ch-tools-diffutils">
    2020    <primary sortas="a-Diffutils">Diffutils</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Diffutils package contains programs that show the differences
    27     between files or directories.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/diffutils.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2830
    2931    <segmentedlist>
     
    3234
    3335      <seglistitem>
    34         <seg>&diffutils-ch6-sbu;</seg>
    35         <seg>&diffutils-ch6-du;</seg>
     36        <seg>&diffutils-ch5-sbu;</seg>
     37        <seg>&diffutils-ch5-du;</seg>
    3638      </seglistitem>
    3739    </segmentedlist>
     
    4446    <para>Prepare Diffutils for compilation:</para>
    4547
    46 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen>
    4749
    4850    <para>Compile the package:</para>
     
    5052<screen><userinput remap="make">make</userinput></screen>
    5153
    52     <para>To test the results, issue:</para>
    53 
    54 <screen><userinput remap="test">make check</userinput></screen>
    55 
    5654    <para>Install the package:</para>
    5755
    58 <screen><userinput remap="install">make install</userinput></screen>
     56<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    5957
    6058  </sect2>
    6159
     60  <sect2 role="content">
     61    <title/>
    6262
    63   <sect2 id="contents-diffutils" role="content">
    64     <title>Contents of Diffutils</title>
    65 
    66     <segmentedlist>
    67       <segtitle>Installed programs</segtitle>
    68 
    69       <seglistitem>
    70         <seg>cmp, diff, diff3, and sdiff</seg>
    71       </seglistitem>
    72     </segmentedlist>
    73 
    74     <variablelist>
    75       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    76       <?dbfo list-presentation="list"?>
    77       <?dbhtml list-presentation="table"?>
    78 
    79       <varlistentry id="cmp">
    80         <term><command>cmp</command></term>
    81         <listitem>
    82           <para>Compares two files and reports whether or in which bytes they
    83           differ</para>
    84           <indexterm zone="ch-system-diffutils cmp">
    85             <primary sortas="b-cmp">cmp</primary>
    86           </indexterm>
    87         </listitem>
    88       </varlistentry>
    89 
    90       <varlistentry id="diff">
    91         <term><command>diff</command></term>
    92         <listitem>
    93           <para>Compares two files or directories and reports which lines in
    94           the files differ</para>
    95           <indexterm zone="ch-system-diffutils diff">
    96             <primary sortas="b-diff">diff</primary>
    97           </indexterm>
    98         </listitem>
    99       </varlistentry>
    100 
    101       <varlistentry id="diff3">
    102         <term><command>diff3</command></term>
    103         <listitem>
    104             <para>Compares three files line by line</para>
    105             <indexterm zone="ch-system-diffutils diff3">
    106               <primary sortas="b-diff3">diff3</primary>
    107             </indexterm>
    108         </listitem>
    109       </varlistentry>
    110 
    111       <varlistentry id="sdiff">
    112         <term><command>sdiff</command></term>
    113         <listitem>
    114           <para>Merges two files and interactively outputs the results</para>
    115           <indexterm zone="ch-system-diffutils sdiff">
    116             <primary sortas="b-sdiff">sdiff</primary>
    117           </indexterm>
    118         </listitem>
    119       </varlistentry>
    120 
    121     </variablelist>
     63    <para>Details on this package are located in
     64    <xref linkend="contents-diffutils" role="."/></para>
    12265
    12366  </sect2>
  • chapter06/file.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-file" role="wrap">
     8<sect1 id="ch-tools-file" role="wrap">
    99  <?dbhtml filename="file.html"?>
    1010
     
    1717  <title>File-&file-version;</title>
    1818
    19   <indexterm zone="ch-system-file">
     19  <indexterm zone="ch-tools-file">
    2020    <primary sortas="a-File">File</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The File package contains a utility for determining the type of a given
    27     file or files.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/file.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2830
    2931    <segmentedlist>
     
    3234
    3335      <seglistitem>
    34         <seg>&file-ch6-sbu;</seg>
    35         <seg>&file-ch6-du;</seg>
     36        <seg>&file-ch5-sbu;</seg>
     37        <seg>&file-ch5-du;</seg>
    3638      </seglistitem>
    3739    </segmentedlist>
     
    4446    <para>Prepare File for compilation:</para>
    4547
    46 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr   \
     49            --host=$LFS_TGT</userinput></screen>
    4750
     51<!-- devs: if using - -build here, the build system wants to compile
     52     the signature file with "file" on the build system, but stops if it is not
     53     the same version. One possibility would be to build "file" on the build
     54     system first, but it is simpler to have the system think it is not
     55     cross-compiling, and use the just built "file". -->
    4856    <para>Compile the package:</para>
    4957
    5058<screen><userinput remap="make">make</userinput></screen>
    5159
    52     <para>To test the results, issue:</para>
    53 
    54 <screen><userinput remap="test">make check</userinput></screen>
    55 
    5660    <para>Install the package:</para>
    5761
    58 <screen><userinput remap="install">make install</userinput></screen>
     62<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    5963
    6064  </sect2>
    6165
    62 
    63   <sect2 id="contents-file" role="content">
    64     <title>Contents of File</title>
    65 
    66     <segmentedlist>
    67       <segtitle>Installed programs</segtitle>
    68       <segtitle>Installed library</segtitle>
    69 
    70       <seglistitem>
    71         <seg>file</seg>
    72         <seg>libmagic.so</seg>
    73       </seglistitem>
    74     </segmentedlist>
    75 
    76     <variablelist>
    77       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    78       <?dbfo list-presentation="list"?>
    79       <?dbhtml list-presentation="table"?>
    80 
    81       <varlistentry id="file">
    82         <term><command>file</command></term>
    83         <listitem>
    84           <para>Tries to classify each given file; it does this by performing
    85           several tests&mdash;file system tests, magic number tests, and language
    86           tests</para>
    87           <indexterm zone="ch-system-file file">
    88             <primary sortas="b-file">file</primary>
    89           </indexterm>
    90         </listitem>
    91       </varlistentry>
    92 
    93       <varlistentry id="libmagic">
    94         <term><filename class="libraryfile">libmagic</filename></term>
    95         <listitem>
    96           <para>Contains routines for magic number recognition, used by the
    97           <command>file</command> program</para>
    98           <indexterm zone="ch-system-file libmagic">
    99             <primary sortas="c-libmagic">libmagic</primary>
    100           </indexterm>
    101         </listitem>
    102       </varlistentry>
    103 
    104     </variablelist>
     66  <sect2 role="content">
     67    <title/>
     68    <para>Details on this package are located in<!-- TODO
     69    <xref linkend="contents-file" role="."/>      --></para>
    10570
    10671  </sect2>
  • chapter06/findutils.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-findutils" role="wrap">
     8<sect1 id="ch-tools-findutils" role="wrap">
    99  <?dbhtml filename="findutils.html"?>
    1010
     
    1717  <title>Findutils-&findutils-version;</title>
    1818
    19   <indexterm zone="ch-system-findutils">
     19  <indexterm zone="ch-tools-findutils">
    2020    <primary sortas="a-Findutils">Findutils</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Findutils package contains programs to find files. These programs
    27     are provided to recursively search through a directory tree and to
    28     create, maintain, and search a database (often faster than the recursive
    29     find, but unreliable if the database has not been recently updated).</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/findutils.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
    3131    <segmentedlist>
     
    3434
    3535      <seglistitem>
    36         <seg>&findutils-ch6-sbu;</seg>
    37         <seg>&findutils-ch6-du;</seg>
     36        <seg>&findutils-ch5-sbu;</seg>
     37        <seg>&findutils-ch5-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4646    <para>Prepare Findutils for compilation:</para>
    4747
    48 <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen>
    49 
    50     <variablelist>
    51       <title>The meaning of the configure options:</title>
    52 
    53       <varlistentry>
    54         <term><parameter>--localstatedir</parameter></term>
    55         <listitem>
    56           <para>This option changes the location of the <command>locate</command>
    57           database to be in <filename class="directory">/var/lib/locate</filename>,
    58           which is FHS-compliant.</para>
    59         </listitem>
    60       </varlistentry>
    61 
    62     </variablelist>
     48<screen><userinput remap="configure">./configure --prefix=/usr   \
     49            --host=$LFS_TGT \
     50            --build=$(build-aux/config.guess)</userinput></screen>
    6351
    6452    <para>Compile the package:</para>
     
    6654<screen><userinput remap="make">make</userinput></screen>
    6755
    68     <para>To test the results, issue:</para>
    69 
    70 <screen><userinput remap="test">chown -Rv tester .
    71 su tester -c "PATH=$PATH make check"</userinput></screen>
    72 
    7356    <para>Install the package:</para>
    7457
    75 <screen><userinput remap="install">make install</userinput></screen>
     58<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    7659
    77     <para revision="sysv">Some of the scripts in the LFS-Bootscripts package
    78     depend on <command>find</command>.  As <filename
    79     class="directory">/usr</filename> may not be available during the early
    80     stages of booting, this program needs to be on the root partition.  The
    81     <command>updatedb</command> script also needs to be modified to correct an
    82     explicit path:</para>
     60    <para>Move the excutable to its final expected location:</para>
    8361
    84     <para revision="systemd"> Some packages in BLFS and beyond expect the
    85     <command>find</command> program in <filename
    86     class="directory">/bin</filename>, so make sure it's placed there:</para>
    87 
    88 <screen><userinput remap="install">mv -v /usr/bin/find /bin
    89 sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen>
     62<screen><userinput remap="install">mv -v $LFS/usr/bin/find $LFS/bin
     63sed -i 's|find:=${BINDIR}|find:=/bin|' $LFS/usr/bin/updatedb</userinput></screen>
    9064
    9165  </sect2>
    9266
    93   <sect2 id="contents-findutils" role="content">
    94     <title>Contents of Findutils</title>
     67  <sect2 role="content">
     68    <title/>
    9569
    96     <segmentedlist>
    97       <segtitle>Installed programs</segtitle>
    98       <segtitle>Installed directory</segtitle>
    99 
    100       <seglistitem>
    101         <seg>find, locate, updatedb, and xargs</seg>
    102         <seg>/var/lib/locate</seg>
    103       </seglistitem>
    104 
    105     </segmentedlist>
    106 
    107     <variablelist>
    108       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    109       <?dbfo list-presentation="list"?>
    110       <?dbhtml list-presentation="table"?>
    111 
    112       <varlistentry id="find">
    113         <term><command>find</command></term>
    114         <listitem>
    115           <para>Searches given directory trees for files matching the specified
    116           criteria</para>
    117           <indexterm zone="ch-system-findutils find">
    118             <primary sortas="b-find">find</primary>
    119           </indexterm>
    120         </listitem>
    121       </varlistentry>
    122 
    123       <varlistentry id="locate">
    124         <term><command>locate</command></term>
    125         <listitem>
    126           <para>Searches through a database of file names and reports the names
    127           that contain a given string or match a given pattern</para>
    128           <indexterm zone="ch-system-findutils locate">
    129             <primary sortas="b-locate">locate</primary>
    130           </indexterm>
    131         </listitem>
    132       </varlistentry>
    133 
    134       <varlistentry id="updatedb">
    135       <term><command>updatedb</command></term>
    136         <listitem>
    137           <para>Updates the <command>locate</command> database; it scans the
    138           entire file system (including other file systems that are currently
    139           mounted, unless told not to) and puts every file name it finds into
    140           the database</para>
    141           <indexterm zone="ch-system-findutils updatedb">
    142             <primary sortas="b-updatedb">updatedb</primary>
    143           </indexterm>
    144         </listitem>
    145       </varlistentry>
    146 
    147       <varlistentry id="xargs">
    148         <term><command>xargs</command></term>
    149         <listitem>
    150           <para>Can be used to apply a given command to a list of files</para>
    151           <indexterm zone="ch-system-findutils xargs">
    152             <primary sortas="b-xargs">xargs</primary>
    153           </indexterm>
    154         </listitem>
    155       </varlistentry>
    156 
    157     </variablelist>
     70    <para>Details on this package are located in
     71    <xref linkend="contents-findutils" role="."/></para>
    15872
    15973  </sect2>
  • chapter06/flex.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-flex" role="wrap">
     8<sect1 id="ch-tools-flex" role="wrap">
    99  <?dbhtml filename="flex.html"?>
    1010
     
    1717  <title>Flex-&flex-version;</title>
    1818
    19   <indexterm zone="ch-system-flex">
     19  <indexterm zone="ch-tools-flex">
    2020    <primary sortas="a-Flex">Flex</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Flex package contains a utility for generating programs that
    27     recognize patterns in text.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter06/flex.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2830
    2931    <segmentedlist>
     
    3234
    3335      <seglistitem>
    34         <seg>&flex-ch6-sbu;</seg>
    35         <seg>&flex-ch6-du;</seg>
     36        <seg>&flex-ch5-sbu;</seg>
     37        <seg>&flex-ch5-du;</seg>
    3638      </seglistitem>
    3739    </segmentedlist>
     
    4244    <title>Installation of Flex</title>
    4345
    44 <!--
    45     <para>First, fix a problem introduced with glibc-2.26:</para>
    46 
    47 <screen><userinput remap="pre">sed -i "/math.h/a #include &lt;malloc.h&gt;" src/flexdef.h</userinput></screen>
    48 
    49     <para>The build procedure assumes the <application>help2man</application>
    50     program is available to create a man page from the executable - -help option.
    51     This is not present, so we use an environment variable to skip this process.
    52     Now, prepare Flex for compilation:</para> -->
    53 
    5446    <para>Prepare Flex for compilation:</para>
    5547
    56 <!-- <screen><userinput remap="configure">HELP2MAN=/tools/bin/true \ -->
    57 <screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr                     \
     49            --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen>
    5850
     51    <!--
     52    <variablelist>
     53      <title>The meaning of the new configure option:</title>
     54
     55      <varlistentry>
     56        <term><parameter>- -disable-bootstrap</parameter></term>
     57        <listitem>
     58          <para>Normally, building flex is done in two stages. A first
     59          programs, which is used to generate the source of a second one,
     60          which is then compiled. When using cross-compilation, the first
     61          program is generated on the build system. However, due to a bug
     62          in configure, the presence of some function is tested only on the
     63          host system. If this function is not found on the build system, the
     64          build fails. This can be prevented by disabling the two stage
     65          build.</para>
     66        </listitem>
     67      </varlistentry>
     68    </variablelist>
     69    -->
    5970    <para>Compile the package:</para>
    6071
    6172<screen><userinput remap="make">make</userinput></screen>
    62 
    63     <para>To test the results (about 0.5 SBU), issue:</para>
    64 
    65 <screen><userinput remap="test">make check</userinput></screen>
    6673
    6774    <para>Install the package:</para>
     
    6976<screen><userinput remap="install">make install</userinput></screen>
    7077
    71     <para>A few programs do not know about <command>flex</command> yet and
    72     try to run its predecessor, <command>lex</command>. To support those
    73     programs, create a symbolic link named <filename>lex</filename> that
    74     runs <filename>flex</filename> in <command>lex</command> emulation
    75     mode:</para>
    76 
    77 <screen><userinput remap="install">ln -sv flex /usr/bin/lex</userinput></screen>
    78 
    7978  </sect2>
    8079
    81   <sect2 id="contents-flex" role="content">
    82     <title>Contents of Flex</title>
     80  <sect2 role="content">
     81    <title/>
    8382
    84     <segmentedlist>
    85       <segtitle>Installed programs</segtitle>
    86       <segtitle>Installed libraries</segtitle>
    87       <segtitle>Installed directory</segtitle>
    88 
    89       <seglistitem>
    90         <seg>flex, flex++ (link to flex), and lex (link to flex)</seg>
    91         <seg>libfl.so</seg>
    92         <seg>/usr/share/doc/flex-&flex-version;</seg>
    93       </seglistitem>
    94     </segmentedlist>
    95 
    96     <variablelist>
    97       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    98       <?dbfo list-presentation="list"?>
    99       <?dbhtml list-presentation="table"?>
    100 
    101       <varlistentry id="flex">
    102         <term><command>flex</command></term>
    103         <listitem>
    104           <para>A tool for generating programs that recognize patterns in text;
    105           it allows for the versatility to specify the rules for pattern-finding,
    106           eradicating the need to develop a specialized program</para>
    107           <indexterm zone="ch-system-flex flex">
    108             <primary sortas="b-flex">flex</primary>
    109           </indexterm>
    110         </listitem>
    111       </varlistentry>
    112 
    113       <varlistentry id="flexpp">
    114         <term><command>flex++</command></term>
    115         <listitem>
    116           <para>An extension of flex, is used for generating C++ code
    117           and classes. It is a symbolic link to <command>flex</command></para>
    118           <indexterm zone="ch-system-flex flexpp">
    119             <primary sortas="b-flex++">flex++</primary>
    120           </indexterm>
    121         </listitem>
    122       </varlistentry>
    123 
    124       <varlistentry id="lex">
    125         <term><command>lex</command></term>
    126         <listitem>
    127           <para>A symbolic link that runs <command>flex</command> in
    128           <command>lex</command> emulation mode</para>
    129           <indexterm zone="ch-system-flex lex">
    130             <primary sortas="b-lex">lex</primary>
    131           </indexterm>
    132         </listitem>
    133       </varlistentry>
    134 
    135       <varlistentry id="libfl">
    136         <term><filename class="libraryfile">libfl</filename></term>
    137         <listitem>
    138           <para>The <filename class="libraryfile">flex</filename> library</para>
    139           <indexterm zone="ch-system-flex libfl">
    140             <primary sortas="c-libfl">libfl</primary>
    141           </indexterm>
    142         </listitem>
    143       </varlistentry>
    144 
    145     </variablelist>
     83    <para>Details on this package are located in
     84    <xref linkend="contents-flex" role="."/></para>
    14685
    14786  </sect2>
  • chapter06/gawk.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-gawk" role="wrap">
     8<sect1 id="ch-tools-gawk" role="wrap">
    99  <?dbhtml filename="gawk.html"?>
    1010
     
    1717  <title>Gawk-&gawk-version;</title>
    1818
    19   <indexterm zone="ch-system-gawk">
     19  <indexterm zone="ch-tools-gawk">
    2020    <primary sortas="a-Gawk">Gawk</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Gawk package contains programs for manipulating text files.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/gawk.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2730
    2831    <segmentedlist>
     
    3134
    3235      <seglistitem>
    33         <seg>&gawk-ch6-sbu;</seg>
    34         <seg>&gawk-ch6-du;</seg>
     36        <seg>&gawk-ch5-sbu;</seg>
     37        <seg>&gawk-ch5-du;</seg>
    3538      </seglistitem>
    3639    </segmentedlist>
     
    4750    <para>Prepare Gawk for compilation:</para>
    4851
    49 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     52<screen><userinput remap="configure">./configure --prefix=/usr   \
     53            --host=$LFS_TGT \
     54            --build=$(./config.guess)</userinput></screen>
    5055
    5156    <para>Compile the package:</para>
     
    5358<screen><userinput remap="make">make</userinput></screen>
    5459
    55     <para>To test the results, issue:</para>
    56 
    57 <screen><userinput remap="test">make check</userinput></screen>
    58 
    5960    <para>Install the package:</para>
    6061
    61 <screen><userinput remap="install">make install</userinput></screen>
    62 
    63     <para>If desired, install the documentation:</para>
    64 
    65 <screen><userinput remap="install">mkdir -v /usr/share/doc/gawk-&gawk-version;
    66 cp    -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen>
     62<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    6763
    6864  </sect2>
    6965
    70   <sect2 id="contents-gawk" role="content">
    71     <title>Contents of Gawk</title>
     66  <sect2 role="content">
     67    <title/>
    7268
    73     <segmentedlist>
    74       <segtitle>Installed programs</segtitle>
    75       <segtitle>Installed libraries</segtitle>
    76       <segtitle>Installed directories</segtitle>
    77 
    78       <seglistitem>
    79         <seg>awk (link to gawk), gawk, and awk-&gawk-version;</seg>
    80         <seg>filefuncs.so, fnmatch.so, fork.so, inplace.so, intdiv.so, ordchr.so,
    81         readdir.so, readfile.so, revoutput.so, revtwoway.so, rwarray.so,
    82         and time.so (all in /usr/lib/gawk)</seg>
    83         <seg>/usr/lib/gawk, /usr/libexec/awk, /usr/share/awk, and
    84         /usr/share/doc/gawk-&gawk-version;</seg>
    85       </seglistitem>
    86     </segmentedlist>
    87 
    88     <variablelist>
    89       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    90       <?dbfo list-presentation="list"?>
    91       <?dbhtml list-presentation="table"?>
    92 
    93       <varlistentry id="awk">
    94         <term><command>awk</command></term>
    95         <listitem>
    96           <para>A link to <command>gawk</command></para>
    97           <indexterm zone="ch-system-gawk awk">
    98             <primary sortas="b-awk">awk</primary>
    99           </indexterm>
    100         </listitem>
    101       </varlistentry>
    102 
    103       <varlistentry id="gawk">
    104         <term><command>gawk</command></term>
    105         <listitem>
    106           <para>A program for manipulating text files; it is the GNU
    107           implementation of <command>awk</command></para>
    108           <indexterm zone="ch-system-gawk gawk">
    109             <primary sortas="b-gawk">gawk</primary>
    110           </indexterm>
    111         </listitem>
    112       </varlistentry>
    113 
    114       <varlistentry id="gawk-version">
    115         <term><command>gawk-&gawk-version;</command></term>
    116         <listitem>
    117           <para>A hard link to <command>gawk</command></para>
    118           <indexterm zone="ch-system-gawk gawk-version">
    119             <primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary>
    120           </indexterm>
    121         </listitem>
    122       </varlistentry>
    123 
    124     </variablelist>
     69    <para>Details on this package are located in
     70    <xref linkend="contents-gawk" role="."/></para>
    12571
    12672  </sect2>
  • chapter06/gettext.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-gettext" role="wrap">
     8<sect1 id="ch-tools-gettext" role="wrap">
    99  <?dbhtml filename="gettext.html"?>
    1010
     
    1717  <title>Gettext-&gettext-version;</title>
    1818
    19   <indexterm zone="ch-system-gettext">
     19  <indexterm zone="ch-tools-gettext">
    2020    <primary sortas="a-Gettext">Gettext</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Gettext package contains utilities for internationalization and
    27     localization. These allow programs to be compiled with NLS (Native Language
    28     Support), enabling them to output messages in the user's native
    29     language.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/gettext.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
    3131    <segmentedlist>
     
    3434
    3535      <seglistitem>
    36         <seg>&gettext-ch6-sbu;</seg>
    37         <seg>&gettext-ch6-du;</seg>
     36        <seg>&gettext-ch5-sbu;</seg>
     37        <seg>&gettext-ch5-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4444    <title>Installation of Gettext</title>
    4545
    46    <!-- This has been fixed in upstream gnulib, when a new version of
    47    gettext is released, please check #4055 to see if the change has been
    48    picked up in this package
    49    
    50    As of April 11, 2018, 'TESTS = test-lock' is in gettext-runtime/tests/Makefile.am
    51    Perhaps the test is fixed.
     46    <para>For our temporary set of tools, we only need to install
     47    three programs from Gettext.</para>
    5248
    53    There is no reference to 'test' or TEST in  gettext-tools/gnulib-tests/Makefile.am
    54    -->
    55    <!--
    56    <para>First, suppress two invocations of test-lock which on some machines
    57    can loop forever:</para>
    58 
    59 <screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in &amp;&amp;
    60 sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>-->
    61 
    62    <!-- As of April 11, 2018 appdata.* is NOT in git master, but appears
    63    to be in metainfo.{its,loc},  When updating, check BLFS gnome-screenshot. -->
    64 
    65 <!--
    66    <para>Now fix a configuration file:</para>
    67 
    68 <screen><userinput remap="pre">sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' \
    69     -i gettext-tools/its/appdata.loc</userinput></screen>
    70 -->
    7149    <para>Prepare Gettext for compilation:</para>
    7250
    73 <screen><userinput remap="configure">./configure --prefix=/usr    \
    74             --disable-static \
    75             --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
     51<screen><userinput remap="configure">./configure --disable-shared</userinput></screen>
    7652
    77     <para>Compile the package:</para>
    78 
    79 <screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>
    80 
    81    <variablelist>
    82       <title>The meaning of the make parameter:</title>
     53    <variablelist>
     54      <title>The meaning of the configure option:</title>
    8355
    8456      <varlistentry>
    85         <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term>
     57        <term><parameter>--disable-shared</parameter></term>
    8658        <listitem>
    87           <para>Since bison is not yet installed in /usr, configure hardcodes
    88           the directory containing translations for the bison program (the
    89           "locale" directory) as /tools/share/locale. Passing this variable
    90            to make allows overriding the choice made by configure.</para>
     59          <para>We do not need to install any of the shared Gettext libraries at
     60          this time, therefore there is no need to build them.</para>
    9161        </listitem>
    9262      </varlistentry>
     
    9464    </variablelist>
    9565
    96     <para>To test the results (this takes a long time, around 3 SBUs),
    97     issue:</para>
     66    <para>Compile the package:</para>
    9867
    99 <screen><userinput remap="test">make check</userinput></screen>
     68<screen><userinput remap="make">make</userinput></screen>
    10069
    101     <para>Install the package:</para>
     70    <para>Install the <command>msgfmt</command>, <command>msgmerge</command> and
     71    <command>xgettext</command> programs:</para>
    10272
    103 <screen><userinput remap="install">make install
    104 chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
     73<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen>
    10574
    10675  </sect2>
    10776
    108   <sect2 id="contents-gettext" role="content">
    109     <title>Contents of Gettext</title>
     77  <sect2 role="content">
     78    <title/>
    11079
    111     <segmentedlist>
    112       <segtitle>Installed programs</segtitle>
    113       <segtitle>Installed libraries</segtitle>
    114       <segtitle>Installed directories</segtitle>
    115 
    116       <seglistitem>
    117         <seg>autopoint, envsubst, gettext, gettext.sh,
    118         gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
    119         msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
    120         ngettext, recode-sr-latin, and xgettext</seg>
    121         <seg>libasprintf.so, libgettextlib.so, libgettextpo.so,
    122         libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg>
    123         <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;,
    124         /usr/share/gettext, and /usr/share/gettext-0.19.8</seg>
    125       </seglistitem>
    126     </segmentedlist>
    127 
    128     <variablelist>
    129       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    130       <?dbfo list-presentation="list"?>
    131       <?dbhtml list-presentation="table"?>
    132 
    133       <varlistentry id="autopoint">
    134         <term><command>autopoint</command></term>
    135         <listitem>
    136           <para>Copies standard Gettext infrastructure files into a source
    137           package</para>
    138           <indexterm zone="ch-system-gettext autopoint">
    139             <primary sortas="b-autopoint">autopoint</primary>
    140           </indexterm>
    141         </listitem>
    142       </varlistentry>
    143 
    144       <varlistentry id="envsubst">
    145         <term><command>envsubst</command></term>
    146         <listitem>
    147           <para>Substitutes environment variables in shell format strings</para>
    148           <indexterm zone="ch-system-gettext envsubst">
    149             <primary sortas="b-envsubst">envsubst</primary>
    150           </indexterm>
    151         </listitem>
    152       </varlistentry>
    153 
    154       <varlistentry id="gettext">
    155         <term><command>gettext</command></term>
    156         <listitem>
    157           <para>Translates a natural language message into the user's language
    158           by looking up the translation in a message catalog</para>
    159           <indexterm zone="ch-system-gettext gettext">
    160             <primary sortas="b-gettext">gettext</primary>
    161           </indexterm>
    162         </listitem>
    163       </varlistentry>
    164 
    165       <varlistentry id="gettext.sh">
    166         <term><command>gettext.sh</command></term>
    167         <listitem>
    168           <para>Primarily serves as a shell function library for gettext</para>
    169           <indexterm zone="ch-system-gettext gettext.sh">
    170             <primary sortas="b-gettext.sh">gettext.sh</primary>
    171           </indexterm>
    172         </listitem>
    173       </varlistentry>
    174 
    175       <varlistentry id="gettextize">
    176         <term><command>gettextize</command></term>
    177         <listitem>
    178           <para>Copies all standard Gettext files into the given top-level
    179           directory of a package to begin internationalizing it</para>
    180           <indexterm zone="ch-system-gettext gettextize">
    181             <primary sortas="b-gettextize">gettextize</primary>
    182           </indexterm>
    183         </listitem>
    184       </varlistentry>
    185 
    186       <varlistentry id="msgattrib">
    187         <term><command>msgattrib</command></term>
    188         <listitem>
    189           <para>Filters the messages of a translation catalog according to their
    190           attributes and manipulates the attributes</para>
    191           <indexterm zone="ch-system-gettext msgattrib">
    192             <primary sortas="b-msgattrib">msgattrib</primary>
    193           </indexterm>
    194         </listitem>
    195       </varlistentry>
    196 
    197       <varlistentry id="msgcat">
    198         <term><command>msgcat</command></term>
    199         <listitem>
    200           <para>Concatenates and merges the given
    201           <filename class="extension">.po</filename> files</para>
    202           <indexterm zone="ch-system-gettext msgcat">
    203             <primary sortas="b-msgcat">msgcat</primary>
    204           </indexterm>
    205         </listitem>
    206       </varlistentry>
    207 
    208       <varlistentry id="msgcmp">
    209         <term><command>msgcmp</command></term>
    210         <listitem>
    211           <para>Compares two <filename class="extension">.po</filename>
    212           files to check that both contain the same set of msgid strings</para>
    213           <indexterm zone="ch-system-gettext msgcmp">
    214             <primary sortas="b-msgcmp">msgcmp</primary>
    215           </indexterm>
    216         </listitem>
    217       </varlistentry>
    218 
    219       <varlistentry id="msgcomm">
    220         <term><command>msgcomm</command></term>
    221         <listitem>
    222           <para>Finds the messages that are common to the given
    223           <filename class="extension">.po</filename> files</para>
    224           <indexterm zone="ch-system-gettext msgcomm">
    225             <primary sortas="b-msgcomm">msgcomm</primary>
    226           </indexterm>
    227         </listitem>
    228       </varlistentry>
    229 
    230       <varlistentry id="msgconv">
    231         <term><command>msgconv</command></term>
    232         <listitem>
    233           <para>Converts a translation catalog to a different character
    234           encoding</para>
    235           <indexterm zone="ch-system-gettext msgconv">
    236             <primary sortas="b-msgconv">msgconv</primary>
    237           </indexterm>
    238         </listitem>
    239       </varlistentry>
    240 
    241       <varlistentry id="msgen">
    242         <term><command>msgen</command></term>
    243         <listitem>
    244           <para>Creates an English translation catalog</para>
    245           <indexterm zone="ch-system-gettext msgen">
    246             <primary sortas="b-msgen">msgen</primary>
    247           </indexterm>
    248         </listitem>
    249       </varlistentry>
    250 
    251       <varlistentry id="msgexec">
    252         <term><command>msgexec</command></term>
    253         <listitem>
    254           <para>Applies a command to all translations of a translation
    255           catalog</para>
    256           <indexterm zone="ch-system-gettext msgexec">
    257             <primary sortas="b-msgexec">msgexec</primary>
    258           </indexterm>
    259         </listitem>
    260       </varlistentry>
    261 
    262       <varlistentry id="msgfilter">
    263         <term><command>msgfilter</command></term>
    264         <listitem>
    265           <para>Applies a filter to all translations of a translation
    266           catalog</para>
    267           <indexterm zone="ch-system-gettext msgfilter">
    268             <primary sortas="b-msgfilter">msgfilter</primary>
    269           </indexterm>
    270         </listitem>
    271       </varlistentry>
    272 
    273       <varlistentry id="msgfmt">
    274         <term><command>msgfmt</command></term>
    275         <listitem>
    276           <para>Generates a binary message catalog from a translation
    277           catalog</para>
    278           <indexterm zone="ch-system-gettext msgfmt">
    279             <primary sortas="b-msgfmt">msgfmt</primary>
    280           </indexterm>
    281         </listitem>
    282       </varlistentry>
    283 
    284       <varlistentry id="msggrep">
    285         <term><command>msggrep</command></term>
    286         <listitem>
    287           <para>Extracts all messages of a translation catalog that match a
    288           given pattern or belong to some given source files</para>
    289           <indexterm zone="ch-system-gettext msggrep">
    290             <primary sortas="b-msggrep">msggrep</primary>
    291           </indexterm>
    292         </listitem>
    293       </varlistentry>
    294 
    295       <varlistentry id="msginit">
    296         <term><command>msginit</command></term>
    297         <listitem>
    298           <para>Creates a new <filename class="extension">.po</filename> file,
    299           initializing the meta information with values from the user's
    300           environment</para>
    301           <indexterm zone="ch-system-gettext msginit">
    302             <primary sortas="b-msginit">msginit</primary>
    303           </indexterm>
    304         </listitem>
    305       </varlistentry>
    306 
    307       <varlistentry id="msgmerge">
    308         <term><command>msgmerge</command></term>
    309         <listitem>
    310           <para>Combines two raw translations into a single file</para>
    311           <indexterm zone="ch-system-gettext msgmerge">
    312             <primary sortas="b-msgmerge">msgmerge</primary>
    313           </indexterm>
    314         </listitem>
    315       </varlistentry>
    316 
    317       <varlistentry id="msgunfmt">
    318         <term><command>msgunfmt</command></term>
    319         <listitem>
    320           <para>Decompiles a binary message catalog into raw translation
    321           text</para>
    322           <indexterm zone="ch-system-gettext msgunfmt">
    323             <primary sortas="b-msgunfmt">msgunfmt</primary>
    324           </indexterm>
    325         </listitem>
    326       </varlistentry>
    327 
    328       <varlistentry id="msguniq">
    329         <term><command>msguniq</command></term>
    330         <listitem>
    331           <para>Unifies duplicate translations in a translation catalog</para>
    332           <indexterm zone="ch-system-gettext msguniq">
    333             <primary sortas="b-msguniq">msguniq</primary>
    334           </indexterm>
    335         </listitem>
    336       </varlistentry>
    337 
    338       <varlistentry id="ngettext">
    339         <term><command>ngettext</command></term>
    340         <listitem>
    341           <para>Displays native language translations of a textual message whose
    342           grammatical form depends on a number</para>
    343           <indexterm zone="ch-system-gettext ngettext">
    344             <primary sortas="b-ngettext">ngettext</primary>
    345           </indexterm>
    346         </listitem>
    347       </varlistentry>
    348 
    349       <varlistentry id="recode-sr-latin">
    350         <term><command>recode-sr-latin</command></term>
    351         <listitem>
    352           <para>Recodes Serbian text from Cyrillic to Latin script</para>
    353           <indexterm zone="ch-system-gettext recode-sr-latin">
    354             <primary sortas="b-recode-sr-latin">recode-sr-latin</primary>
    355           </indexterm>
    356         </listitem>
    357       </varlistentry>
    358 
    359       <varlistentry id="xgettext">
    360         <term><command>xgettext</command></term>
    361         <listitem>
    362           <para>Extracts the translatable message lines from the given source
    363           files to make the first translation template</para>
    364           <indexterm zone="ch-system-gettext xgettext">
    365             <primary sortas="b-xgettext">xgettext</primary>
    366           </indexterm>
    367         </listitem>
    368       </varlistentry>
    369 
    370       <varlistentry id="libasprintf">
    371         <term><filename class="libraryfile">libasprintf</filename></term>
    372         <listitem>
    373           <para>defines the <emphasis>autosprintf</emphasis> class, which makes
    374           C formatted output routines usable in C++ programs, for use with the
    375           <emphasis>&lt;string&gt;</emphasis> strings and the
    376           <emphasis>&lt;iostream&gt;</emphasis> streams</para>
    377           <indexterm zone="ch-system-gettext libasprintf">
    378             <primary sortas="c-libasprintf">libasprintf</primary>
    379           </indexterm>
    380         </listitem>
    381       </varlistentry>
    382 
    383       <varlistentry id="libgettextlib">
    384         <term><filename class="libraryfile">libgettextlib</filename></term>
    385         <listitem>
    386           <para>a private library containing common routines used by the
    387           various Gettext programs; these are not intended for general use</para>
    388           <indexterm zone="ch-system-gettext libgettextlib">
    389             <primary sortas="c-libgettextlib">libgettextlib</primary>
    390           </indexterm>
    391         </listitem>
    392       </varlistentry>
    393 
    394       <varlistentry id="libgettextpo">
    395         <term><filename class="libraryfile">libgettextpo</filename></term>
    396         <listitem>
    397           <para>Used to write specialized programs that process
    398           <filename class="extension">.po</filename> files; this library is
    399           used when the standard applications shipped with Gettext (such as
    400           <command>msgcomm</command>, <command>msgcmp</command>,
    401           <command>msgattrib</command>, and <command>msgen</command>) will
    402           not suffice</para>
    403           <indexterm zone="ch-system-gettext libgettextpo">
    404             <primary sortas="c-libgettextpo">libgettextpo</primary>
    405           </indexterm>
    406         </listitem>
    407       </varlistentry>
    408 
    409       <varlistentry id="libgettextsrc">
    410         <term><filename class="libraryfile">libgettextsrc</filename></term>
    411         <listitem>
    412           <para>A private library containing common routines used by the
    413           various Gettext programs; these are not intended for general use</para>
    414           <indexterm zone="ch-system-gettext libgettextsrc">
    415             <primary sortas="c-libgettextsrc">libgettextsrc</primary>
    416           </indexterm>
    417         </listitem>
    418       </varlistentry>
    419 
    420       <varlistentry id="libtextstyle">
    421         <term><filename class="libraryfile">libtextstyle</filename></term>
    422         <listitem>
    423           <para>Text styling library</para>
    424           <indexterm zone="ch-system-gettext libtextstyle">
    425             <primary sortas="c-libtextstyle">libtextstyle</primary>
    426           </indexterm>
    427         </listitem>
    428       </varlistentry>
    429 
    430       <varlistentry id="preloadable_libintl">
    431         <term><filename class="libraryfile">preloadable_libintl</filename></term>
    432         <listitem>
    433           <para>A library, intended to be used by LD_PRELOAD that assists
    434           <filename class="libraryfile">libintl</filename> in logging
    435           untranslated messages</para>
    436           <indexterm zone="ch-system-gettext preloadable_libintl">
    437             <primary sortas="c-preloadable_libintl">preloadable_libintl</primary>
    438           </indexterm>
    439         </listitem>
    440       </varlistentry>
    441     </variablelist>
     80    <para>Details on this package are located in
     81    <xref linkend="contents-gettext" role="."/></para>
    44282
    44383  </sect2>
  • chapter06/glibc.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-glibc" role="wrap">
     8<sect1 id="ch-tools-glibc" role="wrap">
    99  <?dbhtml filename="glibc.html"?>
    1010
     
    1717  <title>Glibc-&glibc-version;</title>
    1818
    19   <indexterm zone="ch-system-glibc">
     19  <indexterm zone="ch-tools-glibc">
    2020    <primary sortas="a-Glibc">Glibc</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Glibc package contains the main C library. This library provides
    27     the basic routines for allocating memory, searching directories, opening and
    28     closing files, reading and writing files, string handling, pattern matching,
    29     arithmetic, and so on.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter06/glibc.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    3030
    3131    <segmentedlist>
     
    3434
    3535      <seglistitem>
    36         <seg>&glibc-ch6-sbu;</seg>
    37         <seg>&glibc-ch6-du;</seg>
     36        <seg>&glibc-ch5-sbu;</seg>
     37        <seg>&glibc-ch5-du;</seg>
    3838      </seglistitem>
    3939    </segmentedlist>
     
    4444    <title>Installation of Glibc</title>
    4545
     46    <para>First, create two symbolic links, which are needed for proper
     47    operation of the dynamic library loader:</para>
     48
     49<screen><userinput remap="pre">ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64
     50ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3</userinput></screen>
     51
    4652    <para>Some of the Glibc programs use the non-FHS compliant
    47     <filename class="directory">/var/db</filename> directory to store
    48     their runtime data. Apply the following patch to make such programs
    49     store their runtime data in the FHS-compliant locations:</para>
    50 
    51 <screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
    52 <!--
    53     <para>Fix a minor security issue with glob functions:</para>
    54 
    55 <screen><userinput remap="pre">patch -Np1 -i ../&glibc-glob-patch;</userinput></screen>
    56 -->
    57 <!-- No longer needed
    58     <para>Fix a problem introduced with the linux-5.2 kernel:</para>
    59 
    60 <screen><userinput remap="pre">sed -i '/asm.socket.h/a# include &lt;linux/sockios.h&gt;' \
    61    sysdeps/unix/sysv/linux/bits/socket.h</userinput></screen>
    62 === already done ===
    63     <para>Create a symlink for LSB
    64     compliance. Additionally, for x86_64, create a compatibility symlink
    65     required for the dynamic loader to function correctly:</para>
    66 
    67 <screen><userinput remap="pre">case $(uname -m) in
    68     i?86)   ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3
    69     ;;
    70     x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64
    71             ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
    72     ;;
    73 esac</userinput></screen>
    74 
    75     <para>Remove a file that may be left over from a previous build attempt:
    76     </para>
    77 
    78 <screen><userinput remap="pre">rm -f /usr/include/limits.h</userinput></screen>
    79 -->
     53    <filename class="directory">/var/db</filename> directory to store their
     54    runtime data. Apply the following patch to make such programs store their
     55    runtime data in the FHS-compliant locations:</para>
     56
     57<screen><userinput remap="pre">patch -Np1 -i ../glibc-&glibc-version;-fhs-1.patch</userinput></screen>
     58
    8059    <para>The Glibc documentation recommends building Glibc
    8160    in a dedicated build directory:</para>
     
    8463cd       build</userinput></screen>
    8564
    86     <para>Prepare Glibc for compilation:</para>
    87 
    88 <screen><userinput remap="configure">../configure --prefix=/usr                            \
    89              --disable-werror                         \
    90              --enable-kernel=&min-kernel;                      \
    91              --enable-stack-protector=strong          \
    92              --with-headers=/usr/include              \
    93              libc_cv_slibdir=/lib</userinput></screen>
    94   <!-- WIP -->
     65    <para>Next, prepare Glibc for compilation:</para>
     66
     67<screen><userinput remap="configure">../configure                             \
     68      --prefix=/usr                      \
     69      --host=$LFS_TGT                    \
     70      --build=$(../scripts/config.guess) \
     71      --enable-kernel=&min-kernel;                \
     72      --with-headers=$LFS/usr/include    \
     73      libc_cv_slibdir=/lib</userinput></screen>
     74<!--
     75      libc_cv_forced_unwind=yes          \
     76      libc_cv_c_cleanup=yes</userinput></screen> -->
     77
    9578    <variablelist>
    96       <title>The meaning of the options and new configure parameters:</title>
    97 
    98       <varlistentry>
    99         <term><parameter>CC="gcc -ffile-prefix-map=$LFS_DIR=$DIR"</parameter></term>
    100         <listitem>
    101           <para>Make GCC record any references to files in <filename
    102           class="directory">/usr/lib/gcc/x86_64-lfs-linux-gnu</filename>
    103           in result of the compilation as if the files resided in <filename
    104           class="directory">/usr/lib/gcc/x86_64-pc-linux-gnu</filename>.
    105           This avoids introduction of invalid paths in debugging
    106           symbols.</para>
    107         </listitem>
    108       </varlistentry>
    109 
    110       <varlistentry>
    111         <term><parameter>--disable-werror</parameter></term>
    112         <listitem>
    113           <para>This option disables the -Werror option passed to
    114           GCC.  This is necessary for running the test suite.</para>
    115         </listitem>
    116       </varlistentry>
    117 
    118       <varlistentry>
    119         <term><parameter>--enable-stack-protector=strong</parameter></term>
    120         <listitem>
    121           <para>This option increases system security by adding
    122           extra code to check for buffer overflows, such as stack
    123           smashing attacks.</para>
    124         </listitem>
    125       </varlistentry>
    126 <!-- do we need this one? -->
    127       <varlistentry>
    128         <term><parameter>--with-headers=/usr/include</parameter></term>
    129         <listitem>
    130           <para>This option tells the build system where to find the
    131           kernel API headers.</para>
     79      <title>The meaning of the configure options:</title>
     80
     81      <varlistentry>
     82        <term><parameter>--host=$LFS_TGT, --build=$(../scripts/config.guess)</parameter></term>
     83        <listitem>
     84          <para>The combined effect of these switches is that Glibc's build system
     85          configures itself to be cross-compiled, using the cross-linker and
     86          cross-compiler in <filename class="directory">/tools</filename>.</para>
     87        </listitem>
     88      </varlistentry>
     89
     90      <varlistentry>
     91        <term><parameter>--enable-kernel=&min-kernel;</parameter></term>
     92        <listitem>
     93          <para>This tells Glibc to compile the library with support
     94          for &min-kernel; and later Linux kernels.  Workarounds for older
     95          kernels are not enabled.</para>
     96        </listitem>
     97      </varlistentry>
     98
     99      <varlistentry>
     100        <term><parameter>--with-headers=$LFS/usr/include</parameter></term>
     101        <listitem>
     102          <para>This tells Glibc to compile itself against the headers recently
     103          installed to the usr/include directory, so that it knows exactly what
     104          features the kernel has and can optimize itself accordingly.</para>
    132105        </listitem>
    133106      </varlistentry>
     
    136109        <term><parameter>libc_cv_slibdir=/lib</parameter></term>
    137110        <listitem>
    138           <para>This variable sets the correct library for all
    139           systems.  We do not want lib64 to be used.</para>
    140         </listitem>
    141       </varlistentry>
     111          <para>This ensures that the library is installed in /lib instead
     112          of the default /lib64 on 64 bit machines.</para>
     113        </listitem>
     114      </varlistentry>
     115<!--
     116      <varlistentry>
     117        <term><parameter>libc_cv_c_cleanup=yes</parameter></term>
     118        <listitem>
     119          <para>Similarly, we pass libc_cv_c_cleanup=yes through to the
     120          <command>configure</command> script so that the test is skipped and C
     121          cleanup handling support is configured.</para>
     122        </listitem>
     123      </varlistentry>
     124
     125      <varlistentry>
     126        <term><parameter>libc_cv_ctors_header=yes</parameter></term>
     127        <listitem>
     128          <para>Similarly, we pass libc_cv_ctors_header=yes through to the
     129          <command>configure</command> script so that the test is skipped and
     130          gcc constructor support is configured.</para>
     131        </listitem>
     132      </varlistentry>-->
    142133
    143134    </variablelist>
    144135
     136    <para>During this stage the following warning might appear:</para>
     137
     138    <blockquote>
     139<screen><computeroutput>configure: WARNING:
     140*** These auxiliary programs are missing or
     141*** incompatible versions: msgfmt
     142*** some features will be disabled.
     143*** Check the INSTALL file for required versions.</computeroutput></screen>
     144    </blockquote>
     145
     146    <para>The missing or incompatible <command>msgfmt</command> program is
     147    generally harmless. This <command>msgfmt</command> program is part of the
     148    Gettext package which the host distribution should provide.</para>
     149
     150    <note><para>There have been reports that this package may fail when
     151    building as a "parallel make".  If this occurs, rerun the make command
     152    with a "-j1" option.</para></note>
     153
    145154    <para>Compile the package:</para>
    146155
    147156<screen><userinput remap="make">make</userinput></screen>
    148157
    149     <important>
    150       <para>In this section, the test suite for Glibc is considered critical.
    151       Do not skip it under any circumstance.</para>
    152     </important>
    153 
    154     <para>Generally a few tests do not pass. The test failures listed below
    155     are usually safe to ignore.</para>
    156 
    157 <!-- Use remap="make" here to work around a jhalfs issue. -->
    158 <screen><userinput remap="make">case $(uname -m) in
    159   i?86)   ln -sfnv $PWD/elf/ld-linux.so.2        /lib ;;
    160   x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;;
    161 esac</userinput></screen>
    162 
    163     <note><para>The symbolic link above is needed to run the tests at this
    164     stage of building in the chroot environment.  It will be overwritten
    165     in the install phase below.</para></note>
    166 
    167 <screen><userinput remap="test">make check</userinput></screen>
    168 
    169     <para>You may see some test failures.  The Glibc test suite is
    170     somewhat dependent on the host system.  This is a list of the most common
    171     issues seen for some versions of LFS:</para>
    172 
    173     <itemizedlist>
    174 
    175       <listitem>
    176         <para><emphasis>misc/tst-ttyname</emphasis>
    177         is known to fail in the LFS chroot environment.</para>
    178       </listitem>
    179 
    180       <listitem>
    181         <para><emphasis>inet/tst-idna_name_classify</emphasis>
    182         is known to fail in the LFS chroot environment.</para>
    183       </listitem>
    184 
    185       <listitem>
    186         <para><emphasis>posix/tst-getaddrinfo4</emphasis> and
    187         <emphasis>posix/tst-getaddrinfo5</emphasis>
    188         may fail on some architectures.</para>
    189       </listitem>
    190 
    191       <listitem>
    192         <para>The <emphasis>nss/tst-nss-files-hosts-multi</emphasis>
    193         test may fail for reasons that have not been determined.</para>
    194       </listitem>
    195 
    196       <listitem>
    197         <para>The <emphasis>rt/tst-cputimer{1,2,3}</emphasis> tests depend on
    198         the host system kernel. Kernels 4.14.91&ndash;4.14.96,
    199         4.19.13&ndash;4.19.18, and 4.20.0&ndash;4.20.5 are known to
    200         cause these tests to fail.
    201         </para>
    202       </listitem>
    203 
    204       <listitem>
    205         <para>The math tests sometimes fail when running on
    206         systems where the CPU is not a relatively new Intel or
    207         AMD processor.</para>
    208       </listitem>
    209 <!--
    210       <listitem>
    211         <para>The
    212         <emphasis>nptl/tst-thread-affinity-{pthread,pthread2,sched}</emphasis>
    213         tests may fail for reasons that have not been determined.  </para>
    214       </listitem>
    215 
    216       <listitem>
    217         <para>Other tests known to fail on some architectures are
    218         malloc/tst-malloc-usable and nptl/tst-cleanupx4. </para>
    219       </listitem>
    220 -->
    221     </itemizedlist>
    222 
    223     <para>Though it is a harmless message, the install stage of Glibc will
    224     complain about the absence of <filename>/etc/ld.so.conf</filename>.
    225     Prevent this warning with:</para>
    226 
    227 <screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
    228 
    229     <para>Fix the generated Makefile to skip an unneeded sanity check
    230     that fails in the LFS partial environment:
    231     </para>
    232 
    233 <screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
    234 
    235158    <para>Install the package:</para>
    236159
    237 <screen><userinput remap="install">make install</userinput></screen>
    238 
    239     <para>Install the configuration file and runtime directory for
    240     <command>nscd</command>:</para>
    241 
    242 <screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
    243 mkdir -pv /var/cache/nscd</userinput></screen>
    244 
    245     <para revision="systemd">Install the systemd support files for
    246     <command>nscd</command>:</para>
    247 
    248     <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
    249 install -v -Dm644 ../nscd/nscd.service /lib/systemd/system/nscd.service</userinput></screen>
    250 
    251     <para>Next, install the locales that can make the system respond in a
    252     different language.  None of the locales are required, but if some of them
    253     are missing, the test suites of future packages would skip important
    254     testcases.</para>
    255 
    256     <para>Individual locales can be installed using the
    257     <command>localedef</command> program. E.g., the first
    258     <command>localedef</command> command below combines the
    259     <filename>/usr/share/i18n/locales/cs_CZ</filename>
    260     charset-independent locale definition with the
    261     <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
    262     charmap definition and appends the result to the
    263     <filename>/usr/lib/locale/locale-archive</filename> file.
    264     The following instructions will install the minimum set of
    265     locales necessary for the optimal coverage of tests:</para>
    266 
    267 <screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale
    268 localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
    269 localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
    270 localedef -i de_DE -f ISO-8859-1 de_DE
    271 localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
    272 localedef -i de_DE -f UTF-8 de_DE.UTF-8
    273 localedef -i el_GR -f ISO-8859-7 el_GR
    274 localedef -i en_GB -f UTF-8 en_GB.UTF-8
    275 localedef -i en_HK -f ISO-8859-1 en_HK
    276 localedef -i en_PH -f ISO-8859-1 en_PH
    277 localedef -i en_US -f ISO-8859-1 en_US
    278 localedef -i en_US -f UTF-8 en_US.UTF-8
    279 localedef -i es_MX -f ISO-8859-1 es_MX
    280 localedef -i fa_IR -f UTF-8 fa_IR
    281 localedef -i fr_FR -f ISO-8859-1 fr_FR
    282 localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
    283 localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
    284 localedef -i it_IT -f ISO-8859-1 it_IT
    285 localedef -i it_IT -f UTF-8 it_IT.UTF-8
    286 localedef -i ja_JP -f EUC-JP ja_JP
    287 localedef -i ja_JP -f SHIFT_JIS ja_JP.SIJS 2> /dev/null || true
    288 localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
    289 localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
    290 localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
    291 localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
    292 localedef -i zh_CN -f GB18030 zh_CN.GB18030
    293 localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS</userinput></screen>
    294 
    295     <para>In addition, install the locale for your own country, language and
    296     character set.</para>
    297 
    298     <para>Alternatively, install all locales listed in the
    299     <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
    300     (it includes every locale listed above and many more) at once with the
    301     following time-consuming command:</para>
    302 
    303 <screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen>
    304 
    305     <para>Then use the <command>localedef</command> command to create and
    306     install locales not listed in the
    307     <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
    308     in the unlikely case you need them.</para>
    309 
    310     <note><para>Glibc now uses libidn2 when resolving internationalized
    311     domain names.  This is a run time dependency.  If this capability
    312     is needed, the instructions for installing libidn2 are in the
    313     <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
    314     </para></note>
     160<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
     161
     162    <variablelist>
     163      <title>The meaning of the <command>make install</command> option:</title>
     164
     165      <varlistentry>
     166        <term><parameter>DESTDIR=$LFS</parameter></term>
     167        <listitem>
     168          <para>The <envar>DESTDIR</envar> make variable is used by almost all
     169          packages to define the location where the package should be
     170          installed. If it is not set, it defaults to the root (<filename
     171          class="directory">/</filename>) directory. Here we specify that
     172          the package be installed in <filename class="directory">$LFS
     173          </filename>, which will become the root after <xref linkend=
     174          "ch-tools-chroot"/>.</para>
     175        </listitem>
     176      </varlistentry>
     177
     178    </variablelist>
     179
     180    <caution>
     181      <para>At this point, it is imperative to stop and ensure that the basic
     182      functions (compiling and linking) of the new toolchain are working as
     183      expected. To perform a sanity check, run the following commands:</para>
     184
     185<screen><userinput>echo 'int main(){}' &gt; dummy.c
     186$LFS_TGT-gcc dummy.c
     187readelf -l a.out | grep '/ld-linux'</userinput></screen>
     188
     189      <para>If everything is working correctly, there should be no errors,
     190      and the output of the last command will be of the form:</para>
     191
     192<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
     193
     194      <para>Note that for 32-bit machines, the interpreter name will be
     195      <filename>/lib/ld-linux.so.2</filename>.</para>
     196
     197      <para>If the output is not shown as above or there was no output at all,
     198      then something is wrong. Investigate and retrace the steps to find out
     199      where the problem is and correct it. This issue must be resolved before
     200      continuing on.</para>
     201
     202      <para>Once all is well, clean up the test files:</para>
     203
     204<screen><userinput>rm -v dummy.c a.out</userinput></screen>
     205
     206    </caution>
     207
     208    <note><para>Building packages in the next sections will serve as an
     209    additional check that the toolchain has been built properly. If some
     210    package, especially binutils-pass2 or gcc-pass2, fails to build, it is
     211    an indication that something has gone wrong with the
     212    previous Binutils, GCC, or Glibc installations.</para></note>
     213
     214    <para>Now that our cross-toolchain is complete, finalize the installation
     215    of the limits.h header. For doing so, run an utility provided by the GCC
     216    developers:</para>
     217
     218<screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen>
    315219
    316220  </sect2>
    317221
    318   <sect2 id="conf-glibc" role="configuration">
    319     <title>Configuring Glibc</title>
    320 
    321     <indexterm zone="conf-glibc">
    322       <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
    323     </indexterm>
    324 
    325     <indexterm zone="conf-glibc">
    326       <primary sortas="e-/etc/localtime">/etc/localtime</primary>
    327     </indexterm>
    328 
    329   <sect3>
    330   <title>Adding nsswitch.conf</title>
    331 
    332     <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
    333     because the Glibc defaults do not work well in a networked environment.
    334     </para>
    335 
    336     <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
    337     following:</para>
    338 
    339 <screen><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
    340 <literal># Begin /etc/nsswitch.conf
    341 
    342 passwd: files
    343 group: files
    344 shadow: files
    345 
    346 hosts: files dns
    347 networks: files
    348 
    349 protocols: files
    350 services: files
    351 ethers: files
    352 rpc: files
    353 
    354 # End /etc/nsswitch.conf</literal>
    355 EOF</userinput></screen>
    356 
    357     </sect3>
    358 
    359     <sect3>
    360     <title>Adding time zone data</title>
    361 
    362     <para>Install and set up the time zone data with the following:</para>
    363 <screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
    364 
    365 ZONEINFO=/usr/share/zoneinfo
    366 mkdir -pv $ZONEINFO/{posix,right}
    367 
    368 for tz in etcetera southamerica northamerica europe africa antarctica  \
    369           asia australasia backward pacificnew systemv; do
    370     zic -L /dev/null   -d $ZONEINFO       ${tz}
    371     zic -L /dev/null   -d $ZONEINFO/posix ${tz}
    372     zic -L leapseconds -d $ZONEINFO/right ${tz}
    373 done
    374 
    375 cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
    376 zic -d $ZONEINFO -p America/New_York
    377 unset ZONEINFO</userinput></screen>
    378 
    379     <variablelist>
    380       <title>The meaning of the zic commands:</title>
    381 
    382       <varlistentry>
    383         <term><parameter>zic -L /dev/null ...</parameter></term>
    384         <listitem>
    385           <para>This creates posix time zones, without any leap seconds.  It is
    386           conventional to put these in both
    387           <filename class="directory">zoneinfo</filename> and
    388           <filename class="directory">zoneinfo/posix</filename>. It is
    389           necessary to put the POSIX time zones in
    390           <filename class="directory">zoneinfo</filename>, otherwise various
    391           test-suites will report errors. On an embedded system, where space is
    392           tight and you do not intend to ever update the time zones, you could save
    393           1.9MB by not using the <filename class="directory">posix</filename>
    394           directory, but some applications or test-suites might produce some
    395           failures.</para>
    396         </listitem>
    397       </varlistentry>
    398       <varlistentry>
    399         <term><parameter>zic -L leapseconds ...</parameter></term>
    400         <listitem>
    401           <para>This creates right time zones, including leap seconds. On an
    402           embedded system, where space is tight and you do not intend to
    403           ever update the time zones, or care about the correct time, you could
    404           save 1.9MB by omitting the <filename class="directory">right</filename>
    405           directory.</para>
    406         </listitem>
    407       </varlistentry>
    408       <varlistentry>
    409         <term><parameter>zic ... -p ...</parameter></term>
    410         <listitem>
    411           <para>This creates the <filename>posixrules</filename> file. We use
    412           New York because POSIX requires the daylight savings time rules
    413           to be in accordance with US rules.</para>
    414         </listitem>
    415       </varlistentry>
    416     </variablelist>
    417 
    418 
    419     <para>One way to determine the local time zone is to run the following
    420     script:</para>
    421 
    422 <screen role="nodump"><userinput>tzselect</userinput></screen>
    423 
    424     <para>After answering a few questions about the location, the script will
    425     output the name of the time zone (e.g.,
    426     <emphasis>America/Edmonton</emphasis>). There are also some other possible
    427     time zones listed in <filename
    428     class='directory'>/usr/share/zoneinfo</filename> such as
    429     <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
    430     are not identified by the script but can be used.</para>
    431 
    432     <para>Then create the <filename>/etc/localtime</filename> file by
    433     running:</para>
    434 
    435 <screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
    436 
    437     <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the
    438     time zone selected (e.g., Canada/Eastern).</para>
    439 
    440   </sect3>
    441 
    442   <sect3 id="conf-ld" role="configuration">
    443     <title>Configuring the Dynamic Loader</title>
    444 
    445     <indexterm zone="conf-ld">
    446       <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
    447     </indexterm>
    448 
    449     <para>By default, the dynamic loader (<filename
    450     class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
    451     <filename class="directory">/lib</filename> and <filename
    452     class="directory">/usr/lib</filename> for dynamic libraries that are
    453     needed by programs as they are run. However, if there are libraries in
    454     directories other than <filename class="directory">/lib</filename> and
    455     <filename class="directory">/usr/lib</filename>, these need to be added
    456     to the <filename>/etc/ld.so.conf</filename> file in order for the
    457     dynamic loader to find them. Two directories that are commonly known
    458     to contain additional libraries are <filename
    459     class="directory">/usr/local/lib</filename> and <filename
    460     class="directory">/opt/lib</filename>, so add those directories to the
    461     dynamic loader's search path.</para>
    462 
    463     <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
    464     following:</para>
    465 
    466 <screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"
    467 <literal># Begin /etc/ld.so.conf
    468 /usr/local/lib
    469 /opt/lib
    470 </literal>
    471 EOF</userinput></screen>
    472 
    473   <para>If desired, the dynamic loader can also search a directory and
    474   include the contents of files found there.  Generally the files in
    475   this include directory are one line specifying the desired library path.
    476   To add this capability run the following commands:</para>
    477 
    478 <screen role="nodump"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
    479 <literal># Add an include directory
    480 include /etc/ld.so.conf.d/*.conf
    481 </literal>
    482 EOF
    483 mkdir -pv /etc/ld.so.conf.d</userinput></screen>
    484 
    485   </sect3>
     222  <sect2 role="content">
     223    <title/>
     224
     225    <para>Details on this package are located in
     226    <xref linkend="contents-glibc" role="."/></para>
     227
    486228  </sect2>
    487229
    488   <sect2 id="contents-glibc" role="content">
    489     <title>Contents of Glibc</title>
    490 
    491     <segmentedlist>
    492       <segtitle>Installed programs</segtitle>
    493       <segtitle>Installed libraries</segtitle>
    494       <segtitle>Installed directories</segtitle>
    495 
    496       <seglistitem>
    497         <seg>catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig,
    498         ldd, lddlibc4, locale, localedef, makedb, mtrace, nscd,
    499         pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace,
    500         zdump, and zic</seg>
    501         <seg>ld-&glibc-version;.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so},
    502         libc.{a,so}, libc_nonshared.a,
    503         libcrypt.{a,so}, libdl.{a,so}, libg.a, libm.{a,so},
    504         libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.{a,so},
    505         libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
    506         libpcprofile.so, libpthread.{a,so},
    507         libpthread_nonshared.a, libresolv.{a,so}, librt.{a,so},
    508         libthread_db.so, and libutil.{a,so}</seg>
    509         <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu,
    510         /usr/include/net, /usr/include/netash, /usr/include/netatalk,
    511         /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet,
    512         /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket,
    513         /usr/include/netrom, /usr/include/netrose, /usr/include/nfs,
    514         /usr/include/protocols, /usr/include/rpc,
    515         /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale,
    516         /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo,
    517         /var/cache/nscd, and /var/lib/nss_db</seg>
    518       </seglistitem>
    519     </segmentedlist>
    520 
    521     <variablelist>
    522       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    523       <?dbfo list-presentation="list"?>
    524       <?dbhtml list-presentation="table"?>
    525 
    526       <varlistentry id="catchsegv">
    527         <term><command>catchsegv</command></term>
    528         <listitem>
    529           <para>Can be used to create a stack trace when a program
    530           terminates with a segmentation fault</para>
    531           <indexterm zone="ch-system-glibc catchsegv">
    532             <primary sortas="b-catchsegv">catchsegv</primary>
    533           </indexterm>
    534         </listitem>
    535       </varlistentry>
    536 
    537       <varlistentry id="gencat">
    538         <term><command>gencat</command></term>
    539         <listitem>
    540           <para>Generates message catalogues</para>
    541           <indexterm zone="ch-system-glibc gencat">
    542             <primary sortas="b-gencat">gencat</primary>
    543           </indexterm>
    544         </listitem>
    545       </varlistentry>
    546 
    547       <varlistentry id="getconf">
    548         <term><command>getconf</command></term>
    549         <listitem>
    550           <para>Displays the system configuration values for file system
    551           specific variables</para>
    552           <indexterm zone="ch-system-glibc getconf">
    553             <primary sortas="b-getconf">getconf</primary>
    554           </indexterm>
    555         </listitem>
    556       </varlistentry>
    557 
    558       <varlistentry id="getent">
    559         <term><command>getent</command></term>
    560         <listitem>
    561           <para>Gets entries from an administrative database</para>
    562           <indexterm zone="ch-system-glibc getent">
    563             <primary sortas="b-getent">getent</primary>
    564           </indexterm>
    565         </listitem>
    566       </varlistentry>
    567 
    568       <varlistentry id="iconv">
    569         <term><command>iconv</command></term>
    570         <listitem>
    571           <para>Performs character set conversion</para>
    572           <indexterm zone="ch-system-glibc iconv">
    573             <primary sortas="b-iconv">iconv</primary>
    574           </indexterm>
    575         </listitem>
    576       </varlistentry>
    577 
    578       <varlistentry id="iconvconfig">
    579         <term><command>iconvconfig</command></term>
    580         <listitem>
    581           <para>Creates fastloading <command>iconv</command> module configuration
    582           files</para>
    583           <indexterm zone="ch-system-glibc iconvconfig">
    584             <primary sortas="b-iconvconfig">iconvconfig</primary>
    585           </indexterm>
    586         </listitem>
    587       </varlistentry>
    588 
    589       <varlistentry id="ldconfig">
    590         <term><command>ldconfig</command></term>
    591         <listitem>
    592           <para>Configures the dynamic linker runtime bindings</para>
    593           <indexterm zone="ch-system-glibc ldconfig">
    594             <primary sortas="b-ldconfig">ldconfig</primary>
    595           </indexterm>
    596         </listitem>
    597       </varlistentry>
    598 
    599       <varlistentry id="ldd">
    600         <term><command>ldd</command></term>
    601         <listitem>
    602           <para>Reports which shared libraries are required
    603           by each given program or shared library</para>
    604           <indexterm zone="ch-system-glibc ldd">
    605             <primary sortas="b-ldd">ldd</primary>
    606           </indexterm>
    607         </listitem>
    608       </varlistentry>
    609 
    610       <varlistentry id="lddlibc4">
    611         <term><command>lddlibc4</command></term>
    612         <listitem>
    613           <para>Assists <command>ldd</command> with object files</para>
    614           <indexterm zone="ch-system-glibc lddlibc4">
    615             <primary sortas="b-lddlibc4">lddlibc4</primary>
    616           </indexterm>
    617         </listitem>
    618       </varlistentry>
    619 
    620       <varlistentry id="locale">
    621         <term><command>locale</command></term>
    622         <listitem>
    623           <para>Prints various information about the current locale</para>
    624           <indexterm zone="ch-system-glibc locale">
    625             <primary sortas="b-locale">locale</primary>
    626           </indexterm>
    627         </listitem>
    628       </varlistentry>
    629 
    630       <varlistentry id="localedef">
    631         <term><command>localedef</command></term>
    632         <listitem>
    633           <para>Compiles locale specifications</para>
    634           <indexterm zone="ch-system-glibc localedef">
    635             <primary sortas="b-localedef">localedef</primary>
    636           </indexterm>
    637         </listitem>
    638       </varlistentry>
    639 
    640       <varlistentry id="makedb">
    641         <term><command>makedb</command></term>
    642         <listitem>
    643           <para>Creates a simple database from textual input</para>
    644           <indexterm zone="ch-system-glibc makedb">
    645             <primary sortas="b-makedb">makedb</primary>
    646           </indexterm>
    647         </listitem>
    648       </varlistentry>
    649 
    650       <varlistentry id="mtrace">
    651         <term><command>mtrace</command></term>
    652         <listitem>
    653           <para>Reads and interprets a memory trace file and displays a summary
    654           in human-readable format</para>
    655           <indexterm zone="ch-system-glibc mtrace">
    656             <primary sortas="b-mtrace">mtrace</primary>
    657           </indexterm>
    658         </listitem>
    659       </varlistentry>
    660 
    661       <varlistentry id="nscd">
    662         <term><command>nscd</command></term>
    663         <listitem>
    664           <para>A daemon that provides a cache for the most common name
    665           service requests</para>
    666           <indexterm zone="ch-system-glibc nscd">
    667             <primary sortas="b-nscd">nscd</primary>
    668           </indexterm>
    669         </listitem>
    670       </varlistentry>
    671 
    672       <varlistentry id="pcprofiledump">
    673         <term><command>pcprofiledump</command></term>
    674         <listitem>
    675           <para>Dump information generated by PC profiling</para>
    676           <indexterm zone="ch-system-glibc pcprofiledump">
    677             <primary sortas="b-pcprofiledump">pcprofiledump</primary>
    678           </indexterm>
    679         </listitem>
    680       </varlistentry>
    681 
    682       <varlistentry id="pldd">
    683         <term><command>pldd</command></term>
    684         <listitem>
    685           <para>Lists dynamic shared objects used by running processes</para>
    686           <indexterm zone="ch-system-glibc pldd">
    687             <primary sortas="b-pldd">pldd</primary>
    688           </indexterm>
    689         </listitem>
    690       </varlistentry>
    691 
    692       <varlistentry id="sln">
    693         <term><command>sln</command></term>
    694         <listitem>
    695           <para>A statically linked <command>ln</command> program</para>
    696           <indexterm zone="ch-system-glibc sln">
    697             <primary sortas="b-sln">sln</primary>
    698           </indexterm>
    699         </listitem>
    700       </varlistentry>
    701 
    702       <varlistentry id="sotruss">
    703         <term><command>sotruss</command></term>
    704         <listitem>
    705           <para>Traces shared library procedure calls of a specified command</para>
    706           <indexterm zone="ch-system-glibc sotruss">
    707             <primary sortas="b-sotruss">sotruss</primary>
    708           </indexterm>
    709         </listitem>
    710       </varlistentry>
    711 
    712       <varlistentry id="sprof">
    713         <term><command>sprof</command></term>
    714         <listitem>
    715           <para>Reads and displays shared object profiling data</para>
    716           <indexterm zone="ch-system-glibc sprof">
    717             <primary sortas="b-sprof">sprof</primary>
    718           </indexterm>
    719         </listitem>
    720       </varlistentry>
    721 
    722       <varlistentry id="tzselect">
    723         <term><command>tzselect</command></term>
    724         <listitem>
    725           <para>Asks the user about the location of the system and reports
    726           the corresponding time zone description</para>
    727           <indexterm zone="ch-system-glibc tzselect">
    728             <primary sortas="b-tzselect">tzselect</primary>
    729           </indexterm>
    730         </listitem>
    731       </varlistentry>
    732 
    733       <varlistentry id="xtrace">
    734         <term><command>xtrace</command></term>
    735         <listitem>
    736           <para>Traces the execution of a program by printing the currently
    737           executed function</para>
    738           <indexterm zone="ch-system-glibc xtrace">
    739             <primary sortas="b-xtrace">xtrace</primary>
    740           </indexterm>
    741         </listitem>
    742       </varlistentry>
    743 
    744       <varlistentry id="zdump">
    745         <term><command>zdump</command></term>
    746         <listitem>
    747           <para>The time zone dumper</para>
    748           <indexterm zone="ch-system-glibc zdump">
    749             <primary sortas="b-zdump">zdump</primary>
    750           </indexterm>
    751         </listitem>
    752       </varlistentry>
    753 
    754       <varlistentry id="zic">
    755         <term><command>zic</command></term>
    756         <listitem>
    757           <para>The time zone compiler</para>
    758           <indexterm zone="ch-system-glibc zic">
    759             <primary sortas="b-zic">zic</primary>
    760           </indexterm>
    761         </listitem>
    762       </varlistentry>
    763 
    764       <varlistentry id="ld.so">
    765         <term><filename class="libraryfile">ld-&glibc-version;.so</filename></term>
    766         <listitem>
    767           <para>The helper program for shared library executables</para>
    768           <indexterm zone="ch-system-glibc ld.so">
    769             <primary sortas="c-ld.so">ld-&glibc-version;.so</primary>
    770           </indexterm>
    771         </listitem>
    772       </varlistentry>
    773 
    774       <varlistentry id="libBrokenLocale">
    775         <term><filename class="libraryfile">libBrokenLocale</filename></term>
    776         <listitem>
    777           <para>Used internally by Glibc as a gross hack to get broken programs
    778           (e.g., some Motif applications) running. See comments in
    779           <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename>
    780           for more information</para>
    781           <indexterm zone="ch-system-glibc libBrokenLocale">
    782             <primary sortas="c-libBrokenLocale">libBrokenLocale</primary>
    783           </indexterm>
    784         </listitem>
    785       </varlistentry>
    786 
    787       <varlistentry id="libSegFault">
    788         <term><filename class="libraryfile">libSegFault</filename></term>
    789         <listitem>
    790           <para>The segmentation fault signal handler, used by
    791           <command>catchsegv</command></para>
    792           <indexterm zone="ch-system-glibc libSegFault">
    793             <primary sortas="c-libSegFault">libSegFault</primary>
    794           </indexterm>
    795         </listitem>
    796       </varlistentry>
    797 
    798       <varlistentry id="libanl">
    799         <term><filename class="libraryfile">libanl</filename></term>
    800         <listitem>
    801           <para>An asynchronous name lookup library</para>
    802           <indexterm zone="ch-system-glibc libanl">
    803             <primary sortas="c-libanl">libanl</primary>
    804           </indexterm>
    805         </listitem>
    806       </varlistentry>
    807 
    808       <varlistentry id="libc">
    809         <term><filename class="libraryfile">libc</filename></term>
    810         <listitem>
    811           <para>The main C library</para>
    812           <indexterm zone="ch-system-glibc libc">
    813             <primary sortas="c-libc">libc</primary>
    814           </indexterm>
    815         </listitem>
    816       </varlistentry>
    817 
    818       <varlistentry id="libcrypt">
    819         <term><filename class="libraryfile">libcrypt</filename></term>
    820         <listitem>
    821           <para>The cryptography library</para>
    822           <indexterm zone="ch-system-glibc libcrypt">
    823             <primary sortas="c-libcrypt">libcrypt</primary>
    824           </indexterm>
    825         </listitem>
    826       </varlistentry>
    827 
    828       <varlistentry id="libdl">
    829         <term><filename class="libraryfile">libdl</filename></term>
    830         <listitem>
    831           <para>The dynamic linking interface library</para>
    832           <indexterm zone="ch-system-glibc libdl">
    833             <primary sortas="c-libdl">libdl</primary>
    834           </indexterm>
    835         </listitem>
    836       </varlistentry>
    837 
    838       <varlistentry id="libg">
    839         <term><filename class="libraryfile">libg</filename></term>
    840         <listitem>
    841           <para>Dummy library containing no functions. Previously was a runtime
    842           library for <command>g++</command></para>
    843           <indexterm zone="ch-system-glibc libg">
    844             <primary sortas="c-libg">libg</primary>
    845           </indexterm>
    846         </listitem>
    847       </varlistentry>
    848 
    849       <varlistentry id="libm">
    850         <term><filename class="libraryfile">libm</filename></term>
    851         <listitem>
    852           <para>The mathematical library</para>
    853           <indexterm zone="ch-system-glibc libm">
    854             <primary sortas="c-libm">libm</primary>
    855           </indexterm>
    856         </listitem>
    857       </varlistentry>
    858 
    859       <varlistentry id="libmcheck">
    860         <term><filename class="libraryfile">libmcheck</filename></term>
    861         <listitem>
    862           <para>Turns on memory allocation checking when linked to</para>
    863           <indexterm zone="ch-system-glibc libmcheck">
    864             <primary sortas="c-libmcheck">libmcheck</primary>
    865           </indexterm>
    866         </listitem>
    867       </varlistentry>
    868 
    869       <varlistentry id="libmemusage">
    870         <term><filename class="libraryfile">libmemusage</filename></term>
    871         <listitem>
    872           <para>Used by <command>memusage</command> to help collect
    873           information about the memory usage of a program</para>
    874           <indexterm zone="ch-system-glibc libmemusage">
    875             <primary sortas="c-libmemusage">libmemusage</primary>
    876           </indexterm>
    877         </listitem>
    878       </varlistentry>
    879 
    880       <varlistentry id="libnsl">
    881         <term><filename class="libraryfile">libnsl</filename></term>
    882         <listitem>
    883           <para>The network services library</para>
    884           <indexterm zone="ch-system-glibc libnsl">
    885             <primary sortas="c-libnsl">libnsl</primary>
    886           </indexterm>
    887         </listitem>
    888       </varlistentry>
    889 
    890       <varlistentry id="libnss">
    891         <term><filename class="libraryfile">libnss</filename></term>
    892         <listitem>
    893           <para>The Name Service Switch libraries, containing functions for
    894           resolving host names, user names, group names, aliases, services,
    895           protocols, etc.</para>
    896           <indexterm zone="ch-system-glibc libnss">
    897             <primary sortas="c-libnss">libnss</primary>
    898           </indexterm>
    899         </listitem>
    900       </varlistentry>
    901 
    902       <varlistentry id="libpcprofile">
    903         <term><filename class="libraryfile">libpcprofile</filename></term>
    904         <listitem>
    905           <para>Can be preloaded to PC profile an executable</para>
    906           <indexterm zone="ch-system-glibc libpcprofile">
    907             <primary sortas="c-libpcprofile">libpcprofile</primary>
    908           </indexterm>
    909         </listitem>
    910       </varlistentry>
    911 
    912       <varlistentry id="libpthread">
    913         <term><filename class="libraryfile">libpthread</filename></term>
    914         <listitem>
    915           <para>The POSIX threads library</para>
    916           <indexterm zone="ch-system-glibc libpthread">
    917             <primary sortas="c-libpthread">libpthread</primary>
    918           </indexterm>
    919         </listitem>
    920       </varlistentry>
    921 
    922       <varlistentry id="libresolv">
    923         <term><filename class="libraryfile">libresolv</filename></term>
    924         <listitem>
    925           <para>Contains functions for creating, sending, and interpreting
    926           packets to the Internet domain name servers</para>
    927           <indexterm zone="ch-system-glibc libresolv">
    928             <primary sortas="c-libresolv">libresolv</primary>
    929           </indexterm>
    930         </listitem>
    931       </varlistentry>
    932 
    933       <varlistentry id="librt">
    934         <term><filename class="libraryfile">librt</filename></term>
    935         <listitem>
    936           <para>Contains functions providing most of the interfaces specified
    937           by the POSIX.1b Realtime Extension</para>
    938           <indexterm zone="ch-system-glibc librt">
    939             <primary sortas="c-librt">librt</primary>
    940           </indexterm>
    941         </listitem>
    942       </varlistentry>
    943 
    944       <varlistentry id="libthread_db">
    945         <term><filename class="libraryfile">libthread_db</filename></term>
    946         <listitem>
    947           <para>Contains functions useful for building debuggers for
    948           multi-threaded programs</para>
    949           <indexterm zone="ch-system-glibc libthread_db">
    950             <primary sortas="c-libthread_db">libthread_db</primary>
    951           </indexterm>
    952         </listitem>
    953       </varlistentry>
    954 
    955       <varlistentry id="libutil">
    956         <term><filename class="libraryfile">libutil</filename></term>
    957         <listitem>
    958           <para>Contains code for <quote>standard</quote> functions used in
    959           many different Unix utilities</para>
    960           <indexterm zone="ch-system-glibc libutil">
    961             <primary sortas="c-libutil">libutil</primary>
    962           </indexterm>
    963         </listitem>
    964       </varlistentry>
    965 
    966     </variablelist>
    967 
    968   </sect2>
    969 
    970230</sect1>
  • chapter06/grep.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-grep" role="wrap">
     8<sect1 id="ch-tools-grep" role="wrap">
    99  <?dbhtml filename="grep.html"?>
    1010
     
    1717  <title>Grep-&grep-version;</title>
    1818
    19   <indexterm zone="ch-system-grep">
     19  <indexterm zone="ch-tools-grep">
    2020    <primary sortas="a-Grep">Grep</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Grep package contains programs for searching through files.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/grep.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2730
    2831    <segmentedlist>
     
    3134
    3235      <seglistitem>
    33         <seg>&grep-ch6-sbu;</seg>
    34         <seg>&grep-ch6-du;</seg>
     36        <seg>&grep-ch5-sbu;</seg>
     37        <seg>&grep-ch5-du;</seg>
    3538      </seglistitem>
    3639    </segmentedlist>
     
    4346    <para>Prepare Grep for compilation:</para>
    4447
    45 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr   \
     49            --host=$LFS_TGT \
     50            --bindir=/bin</userinput></screen>
    4651
    4752    <para>Compile the package:</para>
     
    4954<screen><userinput remap="make">make</userinput></screen>
    5055
    51     <para>To test the results, issue:</para>
    52 
    53 <screen><userinput remap="test">make check</userinput></screen>
    54 
    5556    <para>Install the package:</para>
    5657
    57 <screen><userinput remap="install">make install</userinput></screen>
     58<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    5859
    5960  </sect2>
    6061
    61   <sect2 id="contents-grep" role="content">
    62     <title>Contents of Grep</title>
     62  <sect2 role="content">
     63    <title/>
    6364
    64     <segmentedlist>
    65       <segtitle>Installed programs</segtitle>
    66 
    67       <seglistitem>
    68         <seg>egrep, fgrep, and grep</seg>
    69       </seglistitem>
    70     </segmentedlist>
    71 
    72     <variablelist>
    73       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    74       <?dbfo list-presentation="list"?>
    75       <?dbhtml list-presentation="table"?>
    76 
    77       <varlistentry id="egrep">
    78         <term><command>egrep</command></term>
    79         <listitem>
    80           <para>Prints lines matching an extended regular expression</para>
    81           <indexterm zone="ch-system-grep egrep">
    82             <primary sortas="b-egrep">egrep</primary>
    83           </indexterm>
    84         </listitem>
    85       </varlistentry>
    86 
    87       <varlistentry id="fgrep">
    88         <term><command>fgrep</command></term>
    89         <listitem>
    90           <para>Prints lines matching a list of fixed strings</para>
    91           <indexterm zone="ch-system-grep fgrep">
    92             <primary sortas="b-fgrep">fgrep</primary>
    93           </indexterm>
    94         </listitem>
    95       </varlistentry>
    96 
    97       <varlistentry id="grep">
    98         <term><command>grep</command></term>
    99         <listitem>
    100           <para>Prints lines matching a basic regular expression</para>
    101           <indexterm zone="ch-system-grep grep">
    102             <primary sortas="b-grep">grep</primary>
    103           </indexterm>
    104         </listitem>
    105       </varlistentry>
    106 
    107     </variablelist>
     65    <para>Details on this package are located in
     66    <xref linkend="contents-grep" role="."/></para>
    10867
    10968  </sect2>
  • chapter06/gzip.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-gzip" role="wrap">
     8<sect1 id="ch-tools-gzip" role="wrap">
    99  <?dbhtml filename="gzip.html"?>
    1010
     
    1717  <title>Gzip-&gzip-version;</title>
    1818
    19   <indexterm zone="ch-system-gzip">
     19  <indexterm zone="ch-tools-gzip">
    2020    <primary sortas="a-Gzip">Gzip</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Gzip package contains programs for compressing and decompressing
    27     files.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/gzip.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2830
    2931    <segmentedlist>
     
    3234
    3335      <seglistitem>
    34         <seg>&gzip-ch6-sbu;</seg>
    35         <seg>&gzip-ch6-du;</seg>
     36        <seg>&gzip-ch5-sbu;</seg>
     37        <seg>&gzip-ch5-du;</seg>
    3638      </seglistitem>
    3739    </segmentedlist>
     
    4446    <para>Prepare Gzip for compilation:</para>
    4547
    46 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen>
    4749
    4850    <para>Compile the package:</para>
     
    5052<screen><userinput remap="make">make</userinput></screen>
    5153
    52     <para>To test the results, issue:</para>
    53 
    54 <screen><userinput remap="test">make check</userinput></screen>
    55 
    56     <para>Two tests are known to fail in the LFS environment:
    57     help-version and zmore.</para>
    58 
    5954    <para>Install the package:</para>
    6055
    61 <screen><userinput remap="install">make install</userinput></screen>
     56<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    6257
    63     <para>Move a program that needs to be on the root filesystem:</para>
     58    <para>Move the excutable to its final expected location:</para>
    6459
    65 <screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen>
     60<screen><userinput remap="install">mv -v $LFS/usr/bin/gzip $LFS/bin</userinput></screen>
    6661
    6762  </sect2>
    6863
    69   <sect2 id="contents-gzip" role="content">
    70     <title>Contents of Gzip</title>
     64  <sect2 role="content">
     65    <title/>
    7166
    72     <segmentedlist>
    73       <segtitle>Installed programs</segtitle>
    74 
    75       <seglistitem>
    76         <seg>gunzip, gzexe, gzip, uncompress (hard link with gunzip), zcat, zcmp,
    77         zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg>
    78       </seglistitem>
    79     </segmentedlist>
    80 
    81     <variablelist>
    82       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    83       <?dbfo list-presentation="list"?>
    84       <?dbhtml list-presentation="table"?>
    85 
    86       <varlistentry id="gunzip">
    87         <term><command>gunzip</command></term>
    88         <listitem>
    89           <para>Decompresses gzipped files</para>
    90           <indexterm zone="ch-system-gzip gunzip">
    91             <primary sortas="b-gunzip">gunzip</primary>
    92           </indexterm>
    93         </listitem>
    94       </varlistentry>
    95 
    96       <varlistentry id="gzexe">
    97         <term><command>gzexe</command></term>
    98         <listitem>
    99           <para>Creates self-decompressing executable files</para>
    100           <indexterm zone="ch-system-gzip gzexe">
    101             <primary sortas="b-gzexe">gzexe</primary>
    102           </indexterm>
    103         </listitem>
    104       </varlistentry>
    105 
    106       <varlistentry id="gzip">
    107         <term><command>gzip</command></term>
    108         <listitem>
    109           <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para>
    110           <indexterm zone="ch-system-gzip gzip">
    111             <primary sortas="b-gzip">gzip</primary>
    112           </indexterm>
    113         </listitem>
    114       </varlistentry>
    115 
    116       <varlistentry id="uncompress">
    117         <term><command>uncompress</command></term>
    118         <listitem>
    119           <para>Decompresses compressed files</para>
    120           <indexterm zone="ch-system-gzip uncompress">
    121             <primary sortas="b-uncompress">uncompress</primary>
    122           </indexterm>
    123         </listitem>
    124       </varlistentry>
    125 
    126       <varlistentry id="zcat">
    127         <term><command>zcat</command></term>
    128         <listitem>
    129           <para>Decompresses the given gzipped files to standard output</para>
    130           <indexterm zone="ch-system-gzip zcat">
    131             <primary sortas="b-zcat">zcat</primary>
    132           </indexterm>
    133         </listitem>
    134       </varlistentry>
    135 
    136       <varlistentry id="zcmp">
    137         <term><command>zcmp</command></term>
    138         <listitem>
    139           <para>Runs <command>cmp</command> on gzipped files</para>
    140           <indexterm zone="ch-system-gzip zcmp">
    141             <primary sortas="b-zcmp">zcmp</primary>
    142           </indexterm>
    143         </listitem>
    144       </varlistentry>
    145 
    146       <varlistentry id="zdiff">
    147         <term><command>zdiff</command></term>
    148         <listitem>
    149           <para>Runs <command>diff</command> on gzipped files</para>
    150           <indexterm zone="ch-system-gzip zdiff">
    151             <primary sortas="b-zdiff">zdiff</primary>
    152           </indexterm>
    153         </listitem>
    154       </varlistentry>
    155 
    156       <varlistentry id="zegrep">
    157         <term><command>zegrep</command></term>
    158         <listitem>
    159           <para>Runs <command>egrep</command> on gzipped files</para>
    160           <indexterm zone="ch-system-gzip zegrep">
    161             <primary sortas="b-zegrep">zegrep</primary>
    162           </indexterm>
    163         </listitem>
    164       </varlistentry>
    165 
    166       <varlistentry id="zfgrep">
    167         <term><command>zfgrep</command></term>
    168         <listitem>
    169           <para>Runs <command>fgrep</command> on gzipped files</para>
    170           <indexterm zone="ch-system-gzip zfgrep">
    171             <primary sortas="b-zfgrep">zfgrep</primary>
    172           </indexterm>
    173         </listitem>
    174       </varlistentry>
    175 
    176       <varlistentry id="zforce">
    177         <term><command>zforce</command></term>
    178         <listitem>
    179           <para>Forces a <filename class="extension">.gz</filename> extension on
    180           all given files that are gzipped files, so that <command>gzip</command>
    181           will not compress them again; this can be useful when file names were
    182           truncated during a file transfer</para>
    183           <indexterm zone="ch-system-gzip zforce">
    184             <primary sortas="b-zforce">zforce</primary>
    185           </indexterm>
    186         </listitem>
    187       </varlistentry>
    188 
    189       <varlistentry id="zgrep">
    190         <term><command>zgrep</command></term>
    191         <listitem>
    192           <para>Runs <command>grep</command> on gzipped files</para>
    193           <indexterm zone="ch-system-gzip zgrep">
    194             <primary sortas="b-zgrep">zgrep</primary>
    195           </indexterm>
    196         </listitem>
    197       </varlistentry>
    198 
    199       <varlistentry id="zless">
    200         <term><command>zless</command></term>
    201         <listitem>
    202           <para>Runs <command>less</command> on gzipped files</para>
    203           <indexterm zone="ch-system-gzip zless">
    204             <primary sortas="b-zless">zless</primary>
    205           </indexterm>
    206         </listitem>
    207       </varlistentry>
    208 
    209       <varlistentry id="zmore">
    210         <term><command>zmore</command></term>
    211         <listitem>
    212           <para>Runs <command>more</command> on gzipped files</para>
    213           <indexterm zone="ch-system-gzip zmore">
    214             <primary sortas="b-zmore">zmore</primary>
    215           </indexterm>
    216         </listitem>
    217       </varlistentry>
    218 
    219       <varlistentry id="znew">
    220         <term><command>znew</command></term>
    221         <listitem>
    222           <para>Re-compresses files from <command>compress</command> format to
    223           <command>gzip</command> format&mdash;<filename
    224           class="extension">.Z</filename> to <filename
    225           class="extension">.gz</filename></para>
    226           <indexterm zone="ch-system-gzip znew">
    227             <primary sortas="b-znew">znew</primary>
    228           </indexterm>
    229         </listitem>
    230       </varlistentry>
    231 
    232     </variablelist>
     67    <para>Details on this package are located in
     68    <xref linkend="contents-gzip" role="."/></para>
    23369
    23470  </sect2>
  • chapter06/introduction.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-introduction">
     8<sect1 id="ch-tools-introduction">
    99  <?dbhtml filename="introduction.html"?>
    1010
    1111  <title>Introduction</title>
    1212
    13   <para>In this chapter, we enter the building site and start constructing the
    14   LFS system in earnest. That is, we chroot into the temporary mini Linux system,
    15   make a few final preparations, and then begin installing the packages.</para>
     13  <para>This chapter shows how to build a minimal Linux system.
     14  This system will contain just enough tools to start constructing the final
     15  LFS system in <xref linkend="chapter-building-system"/> and allow a working
     16  environment with more user convenience than a minimum environment would.</para>
    1617
    17   <para>The installation of this software is straightforward. Although in many
    18   cases the installation instructions could be made shorter and more generic,
    19   we have opted to provide the full instructions for every package to minimize
    20   the possibilities for mistakes.  The key to learning what makes a Linux system
    21   work is to know what each package is used for and why you (or the system)
    22   may need it.</para>
    23 
    24   <para>We do not recommend using optimizations.  They can make
    25   a program run slightly faster, but they may also cause compilation
    26   difficulties and problems when running the program.  If a package refuses to
    27   compile when using optimization, try to compile it without optimization and
    28   see if that fixes the problem. Even if the package does compile when using
    29   optimization, there is the risk it may have been compiled incorrectly because
    30   of the complex interactions between the code and build tools.  Also note that
    31   the <option>-march</option> and <option>-mtune</option> options using values
    32   not specified in the book have not been tested. This may cause problems with
    33   the toolchain packages (Binutils, GCC and Glibc).  The small potential gains
    34   achieved in using compiler optimizations are often outweighed by the risks.
    35   First-time builders of LFS are encouraged to build without custom
    36   optimizations. The subsequent system will still run very fast and be stable
    37   at the same time.</para>
    38 
    39   <para>Before the installation instructions, each installation page provides
    40   information about the package, including a concise description of what it
    41   contains, approximately how long it will take to build, and how much disk
    42   space is required during this building process. Following the installation
    43   instructions, there is a list of programs and libraries (along with brief
    44   descriptions of these) that the package installs.</para>
    45 
    46   <note><para>The SBU values and required disk space includes
    47   test suite data for all applicable packages in Chapter&nbsp;6.</para></note>
    48 
    49   <sect2>
    50     <title>About libraries</title>
    51 
    52     <para>In general, the LFS editors discourage building and installing static
    53     libraries.  The original purpose for most static libraries has been made
    54     obsolete in a modern Linux system.  In addition linking a static library
    55     into a program can be detrimental.  If an update to the library is needed
    56     to remove a security problem, all programs that use the static library will
    57     need to be relinked to the new library.  Since the use of static libraries
    58     is not always obvious, the relevant programs (and the procedures needed to
    59     do the linking) may not even be known.</para>
    60 
    61     <para>In the procedures in Chapter&nbsp;6, we remove or disable installation of
    62     most static libraries. Usually this is done by passing a
    63     <option>--disable-static</option> option to <command>configure</command>.
    64     In other cases, alternate means are needed. In a few cases, especially
    65     glibc and gcc, the use of static libraries remains essential to the general
    66     package building process. </para>
    67 
    68     <para>For a more complete discussion of libraries, see the discussion
    69     <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html">
    70     Libraries: Static or shared?</ulink> in the BLFS book.</para>
    71 
    72   </sect2>
    73 
     18  <para>There are two steps in building this minimal system. The first step
     19  is to build a new and host-independent toolchain (compiler, assembler,
     20  linker, libraries, and a few useful utilities).  The second step uses this
     21  toolchain to build the other essential tools.</para>
     22<!--
     23  <para>The files compiled in this chapter will be installed under the
     24  <filename class="directory">$LFS</filename> directory to keep them
     25  separate from the files installed in the next chapter and the host
     26  production directories. Since the packages compiled here are temporary,
     27  we do not want them to pollute the soon-to-be LFS system.</para>
     28-->
    7429</sect1>
  • chapter06/m4.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-m4" role="wrap">
     8<sect1 id="ch-tools-m4" role="wrap">
    99  <?dbhtml filename="m4.html"?>
    1010
     
    1717  <title>M4-&m4-version;</title>
    1818
    19   <indexterm zone="ch-system-m4">
     19  <indexterm zone="ch-tools-m4">
    2020    <primary sortas="a-M4">M4</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The M4 package contains a macro processor.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/m4.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2730
    2831    <segmentedlist>
     
    3134
    3235      <seglistitem>
    33         <seg>&m4-ch6-sbu;</seg>
    34         <seg>&m4-ch6-du;</seg>
     36        <seg>&m4-ch5-sbu;</seg>
     37        <seg>&m4-ch5-du;</seg>
    3538      </seglistitem>
    3639    </segmentedlist>
     
    4144    <title>Installation of M4</title>
    4245
    43     <para>First, make some fixes required by glibc-2.28:</para>
     46    <para>First, make some fixes introduced by glibc-2.28:</para>
    4447
    4548<screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
     
    4851    <para>Prepare M4 for compilation:</para>
    4952
    50 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     53<screen><userinput remap="configure">./configure --prefix=/usr   \
     54            --host=$LFS_TGT \
     55            --build=$(build-aux/config.guess)</userinput></screen>
    5156
    5257    <para>Compile the package:</para>
     
    5459<screen><userinput remap="make">make</userinput></screen>
    5560
    56     <para>To test the results, issue:</para>
    57 
    58 <screen><userinput remap="test">make check</userinput></screen>
    59 
    6061    <para>Install the package:</para>
    6162
    62 <screen><userinput remap="install">make install</userinput></screen>
     63<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    6364
    6465  </sect2>
    6566
    66   <sect2 id="contents-m4" role="content">
    67     <title>Contents of M4</title>
    68 
    69     <segmentedlist>
    70       <segtitle>Installed program</segtitle>
    71 
    72       <seglistitem>
    73         <seg>m4</seg>
    74       </seglistitem>
    75     </segmentedlist>
    76 
    77     <variablelist>
    78       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    79       <?dbfo list-presentation="list"?>
    80       <?dbhtml list-presentation="table"?>
    81 
    82       <varlistentry id="m4">
    83          <!-- Don't remove the extra space, it prevet a FOP warning. -->
    84         <term><command>m4 </command></term>
    85         <listitem>
    86           <para>Copies the given files while expanding the macros that they
    87           contain [These macros are either built-in or user-defined and can
    88           take any number of arguments. Besides performing macro expansion,
    89           <command>m4</command> has built-in functions for including named
    90           files, running Unix commands, performing integer arithmetic,
    91           manipulating text, recursion, etc. The <command>m4</command> program
    92           can be used either as a front-end to a compiler or as a macro processor
    93           in its own right.]</para>
    94           <indexterm zone="ch-system-m4 m4">
    95             <primary sortas="b-m4">m4</primary>
    96           </indexterm>
    97         </listitem>
    98       </varlistentry>
    99 
    100     </variablelist>
     67  <sect2 role="content">
     68    <title/>
     69    <para>Details on this package are located in
     70    <xref linkend="contents-m4" role="."/></para>
    10171
    10272  </sect2>
  • chapter06/make.xml

    rd53fefa rfcc02767  
    55  %general-entities;
    66]>
    7 
    8 <sect1 id="ch-system-make" role="wrap">
     7<sect1 id="ch-tools-make" role="wrap">
    98  <?dbhtml filename="make.html"?>
    109
     
    1716  <title>Make-&make-version;</title>
    1817
    19   <indexterm zone="ch-system-make">
     18  <indexterm zone="ch-tools-make">
    2019    <primary sortas="a-Make">Make</primary>
     20    <secondary>tools</secondary>
    2121  </indexterm>
    2222
     
    2424    <title/>
    2525
    26     <para>The Make package contains a program for compiling packages.</para>
     26    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     27    href="../chapter08/make.xml"
     28    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2729
    2830    <segmentedlist>
     
    3133
    3234      <seglistitem>
    33         <seg>&make-ch6-sbu;</seg>
    34         <seg>&make-ch6-du;</seg>
     35        <seg>&make-ch5-sbu;</seg>
     36        <seg>&make-ch5-du;</seg>
    3537      </seglistitem>
    3638    </segmentedlist>
     
    4042  <sect2 role="installation">
    4143    <title>Installation of Make</title>
    42 <!--
    43     <para>Again, work around an error caused by glibc-2.27 and later:</para>
    4444
    45 <screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen>
    46 -->
    4745    <para>Prepare Make for compilation:</para>
    4846
    49 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     47<screen><userinput remap="configure">./configure --prefix=/usr   \
     48            --without-guile \
     49            --host=$LFS_TGT \
     50            --build=$(build-aux/config.guess)</userinput></screen>
     51
     52    <variablelist>
     53      <title>The meaning of the new configure option:</title>
     54
     55      <varlistentry>
     56        <term><parameter>--without-guile</parameter></term>
     57        <listitem>
     58          <para>Although we are cross-compiling, configure tries to use
     59          guile from the build host if it finds it. This makes compilation
     60          fail, so this switch prevents using it.</para>
     61        </listitem>
     62      </varlistentry>
     63    </variablelist>
    5064
    5165    <para>Compile the package:</para>
     
    5367<screen><userinput remap="make">make</userinput></screen>
    5468
    55     <para>The test suite needs to know where supporting perl files are located.
    56     We use an environment variable to accomplish this.  To test the
    57     results, issue:</para>
    58 
    59 <screen><userinput remap="test">make check</userinput></screen>
    60 
    6169    <para>Install the package:</para>
    6270
    63 <screen><userinput remap="install">make install</userinput></screen>
     71<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    6472
    6573  </sect2>
    6674
     75  <sect2 role="content">
     76    <title/>
    6777
    68   <sect2 id="contents-make" role="content">
    69     <title>Contents of Make</title>
    70 
    71     <segmentedlist>
    72       <segtitle>Installed program</segtitle>
    73 
    74       <seglistitem>
    75         <seg>make</seg>
    76       </seglistitem>
    77     </segmentedlist>
    78 
    79     <variablelist>
    80       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    81       <?dbfo list-presentation="list"?>
    82       <?dbhtml list-presentation="table"?>
    83 
    84       <varlistentry id="make">
    85         <term><command>make</command></term>
    86         <listitem>
    87           <para>Automatically determines which pieces of a package need to
    88           be (re)compiled and then issues the relevant commands</para>
    89           <indexterm zone="ch-system-make make">
    90             <primary sortas="b-make">make</primary>
    91           </indexterm>
    92         </listitem>
    93       </varlistentry>
    94 
    95     </variablelist>
     78    <para>Details on this package are located in
     79    <xref linkend="contents-make" role="."/></para>
    9680
    9781  </sect2>
  • chapter06/ncurses.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-ncurses" role="wrap">
     8<sect1 id="ch-tools-ncurses" role="wrap">
    99  <?dbhtml filename="ncurses.html"?>
    1010
     
    1717  <title>Ncurses-&ncurses-version;</title>
    1818
    19   <indexterm zone="ch-system-ncurses">
     19  <indexterm zone="ch-tools-ncurses">
    2020    <primary sortas="a-Ncurses">Ncurses</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Ncurses package contains libraries for terminal-independent
    27     handling of character screens.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/ncurses.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2830
    2931    <segmentedlist>
     
    3234
    3335      <seglistitem>
    34         <seg>&ncurses-ch6-sbu;</seg>
    35         <seg>&ncurses-ch6-du;</seg>
     36        <seg>&ncurses-ch5-sbu;</seg>
     37        <seg>&ncurses-ch5-du;</seg>
    3638      </seglistitem>
    3739    </segmentedlist>
     
    4244    <title>Installation of Ncurses</title>
    4345
    44     <para>Don't install a static library that is not handled by configure:</para>
     46    <para>First, ensure that <command>gawk</command> is found first during configuration:</para>
    4547
    46 <screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen>
     48<screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen>
     49
     50    <para>Then, run the following commands to build the <quote>tic</quote>
     51    program on the build host:</para>
     52
     53<screen><userinput remap="pre">mkdir build
     54cd build
     55../configure
     56make -C include
     57make -C progs tic
     58cd ..</userinput></screen>
    4759
    4860    <para>Prepare Ncurses for compilation:</para>
    4961
    50 <screen><userinput remap="configure">./configure --prefix=/usr           \
    51             --mandir=/usr/share/man \
    52             --with-shared           \
    53             --without-debug         \
    54             --without-normal        \
    55             --enable-pc-files       \
    56             --enable-widec</userinput></screen>
     62<screen><userinput remap="configure">./configure --prefix=/usr             \
     63            --host=$LFS_TGT           \
     64            --build=$(./config.guess) \
     65            --mandir=/usr/share/man   \
     66            --with-shared             \
     67            --without-debug           \
     68            --without-ada             \
     69            --without-normal          \
     70            --enable-widec            \
     71            --enable-pc-files</userinput></screen>
    5772
    5873    <variablelist>
    5974      <title>The meaning of the new configure options:</title>
     75
     76      <varlistentry>
     77        <term><parameter>--without-ada</parameter></term>
     78        <listitem>
     79          <para>This ensures that Ncurses does not build support for the Ada
     80          compiler which may be present on the host but will not be available
     81          once we enter the <command>chroot</command> environment.</para>
     82        </listitem>
     83      </varlistentry>
    6084
    6185      <varlistentry>
     
    88112        </listitem>
    89113      </varlistentry>
    90 
     114      <!--
     115      <varlistentry>
     116        <term><parameter>- -disable-db-install</parameter></term>
     117        <listitem>
     118          <para>This switch disables building the terminfo database: it is not
     119          needed at this stage, and if <command>tic</command> is too old,
     120          it cannot compile recent databases.</para>
     121        </listitem>
     122      </varlistentry>
     123      -->
    91124    </variablelist>
    92125
     
    95128<screen><userinput remap="make">make</userinput></screen>
    96129
    97     <para>This package has a test suite, but it can only be run after the
    98     package has been installed.  The tests reside in the
    99     <filename class="directory">test/</filename> directory.  See the
    100     <filename>README</filename> file in that directory for further details.
    101     </para>
    102 
    103130    <para>Install the package:</para>
    104 
    105 <screen><userinput remap="install">make install</userinput></screen>
     131<!-- TODO: check and document -->
     132<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install
     133ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen>
    106134
    107135    <para>Move the shared libraries to the
     
    109137    expected to reside:</para>
    110138
    111 <screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen>
     139<screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen>
    112140
    113141    <para>Because the libraries have been moved, one symlink points to
    114142    a non-existent file. Recreate it:</para>
    115143
    116 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen>
     144<screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen>
    117145
    118     <para>Many applications still expect the linker to be able to find
    119     non-wide-character Ncurses libraries. Trick such applications into linking with
    120     wide-character libraries by means of symlinks and linker scripts:</para>
    121 
    122 <screen><userinput remap="install">for lib in ncurses form panel menu ; do
    123     rm -vf                    /usr/lib/lib${lib}.so
    124     echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
    125     ln -sfv ${lib}w.pc        /usr/lib/pkgconfig/${lib}.pc
    126 done</userinput></screen>
    127 
    128     <para>Finally, make sure that old applications that look for
    129     <filename class="libraryfile">-lcurses</filename> at build time are still
    130     buildable:</para>
    131 
    132 <screen><userinput remap="install">rm -vf                     /usr/lib/libcursesw.so
    133 echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
    134 ln -sfv libncurses.so      /usr/lib/libcurses.so</userinput></screen>
    135 
    136     <para>If desired, install the Ncurses documentation:</para>
    137 
    138 <screen><userinput remap="install">mkdir -v       /usr/share/doc/ncurses-&ncurses-version;
    139 cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
    140 
    141     <note>
    142 
    143       <para>The instructions above don't create non-wide-character Ncurses
    144       libraries since no package installed by compiling from sources would link
    145       against them at runtime. However, the only known binary-only
    146       applications that link against non-wide-character Ncurses libraries
    147       require version 5.  If you must have such libraries because of some binary-only
    148       application or to be compliant with LSB, build the package again with the
    149       following commands:</para>
    150 
    151 <screen role="nodump"><userinput>make distclean
    152 ./configure --prefix=/usr    \
    153             --with-shared    \
    154             --without-normal \
    155             --without-debug  \
    156             --without-cxx-binding \
    157             --with-abi-version=5
    158 make sources libs
    159 cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
    160     </note>
    161146
    162147  </sect2>
    163148
    164   <sect2 id="contents-ncurses" role="content">
    165     <title>Contents of Ncurses</title>
     149  <sect2 role="content">
     150    <title/>
    166151
    167     <segmentedlist>
    168       <segtitle>Installed programs</segtitle>
    169       <segtitle>Installed libraries</segtitle>
    170       <segtitle>Installed directories</segtitle>
    171 
    172       <seglistitem>
    173         <seg>
    174            captoinfo (link to tic),
    175            clear,
    176            infocmp,
    177            infotocap (link to tic),
    178            ncursesw6-config,
    179            reset (link to tset),
    180            tabs,
    181            tic,
    182            toe,
    183            tput, and
    184            tset
    185         </seg>
    186         <seg>
    187            libcursesw.so (symlink and linker script to libncursesw.so),
    188            libformw.so,
    189            libmenuw.so,
    190            libncursesw.so,
    191            libncurses++w.a,
    192            libpanelw.so, and their non-wide-character counterparts without "w"
    193               in the library names.</seg>
    194         <seg>
    195            /usr/share/tabset,
    196            /usr/share/terminfo, and
    197            /usr/share/doc/ncurses-&ncurses-version;
    198         </seg>
    199       </seglistitem>
    200     </segmentedlist>
    201 
    202     <variablelist>
    203       <bridgehead renderas="sect3">Short Descriptions</bridgehead>
    204       <?dbfo list-presentation="list"?>
    205       <?dbhtml list-presentation="table"?>
    206 
    207       <varlistentry id="captoinfo">
    208         <term><command>captoinfo</command></term>
    209         <listitem>
    210           <para>Converts a termcap description into a terminfo description</para>
    211           <indexterm zone="ch-system-ncurses captoinfo">
    212             <primary sortas="b-captoinfo">captoinfo</primary>
    213           </indexterm>
    214         </listitem>
    215       </varlistentry>
    216 
    217       <varlistentry id="clear">
    218         <term><command>clear</command></term>
    219         <listitem>
    220           <para>Clears the screen, if possible</para>
    221           <indexterm zone="ch-system-ncurses clear">
    222             <primary sortas="b-clear">clear</primary>
    223           </indexterm>
    224         </listitem>
    225       </varlistentry>
    226 
    227       <varlistentry id="infocmp">
    228         <term><command>infocmp</command></term>
    229         <listitem>
    230           <para>Compares or prints out terminfo descriptions</para>
    231           <indexterm zone="ch-system-ncurses infocmp">
    232             <primary sortas="b-infocmp">infocmp</primary>
    233           </indexterm>
    234         </listitem>
    235       </varlistentry>
    236 
    237       <varlistentry id="infotocap">
    238         <term><command>infotocap</command></term>
    239         <listitem>
    240           <para>Converts a terminfo description into a termcap description</para>
    241           <indexterm zone="ch-system-ncurses infotocap">
    242             <primary sortas="b-infotocap">infotocap</primary>
    243           </indexterm>
    244         </listitem>
    245       </varlistentry>
    246 
    247       <varlistentry id="ncursesw6-config">
    248         <term><command>ncursesw6-config</command></term>
    249         <listitem>
    250           <para>Provides configuration information for ncurses</para>
    251           <indexterm zone="ch-system-ncurses ncursesw6-config">
    252             <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>
    253           </indexterm>
    254         </listitem>
    255       </varlistentry>
    256 
    257       <varlistentry id="reset">
    258         <term><command>reset</command></term>
    259         <listitem>
    260           <para>Reinitializes a terminal to its default values</para>
    261           <indexterm zone="ch-system-ncurses reset">
    262             <primary sortas="b-reset">reset</primary>
    263           </indexterm>
    264         </listitem>
    265       </varlistentry>
    266 
    267       <varlistentry id="tabs">
    268         <term><command>tabs</command></term>
    269         <listitem>
    270           <para>Clears and sets tab stops on a terminal</para>
    271           <indexterm zone="ch-system-ncurses tabs">
    272             <primary sortas="b-tabs">tabs</primary>
    273           </indexterm>
    274         </listitem>
    275       </varlistentry>
    276 
    277       <varlistentry id="tic">
    278         <term><command>tic</command></term>
    279         <listitem>
    280           <para>The terminfo entry-description compiler that translates a
    281           terminfo file from source format into the binary format needed for the
    282           ncurses library routines [A terminfo file contains information on the
    283           capabilities of a certain terminal.]</para>
    284           <indexterm zone="ch-system-ncurses tic">
    285             <primary sortas="b-tic">tic</primary>
    286           </indexterm>
    287         </listitem>
    288       </varlistentry>
    289 
    290       <varlistentry id="toe">
    291         <term><command>toe</command></term>
    292         <listitem>
    293           <para>Lists all available terminal types, giving the primary name and
    294           description for each</para>
    295           <indexterm zone="ch-system-ncurses toe">
    296             <primary sortas="b-toe">toe</primary>
    297           </indexterm>
    298         </listitem>
    299       </varlistentry>
    300 
    301       <varlistentry id="tput">
    302         <term><command>tput</command></term>
    303         <listitem>
    304           <para>Makes the values of terminal-dependent capabilities available to
    305           the shell; it can also be used to reset or initialize a terminal or
    306           report its long name</para>
    307           <indexterm zone="ch-system-ncurses tput">
    308             <primary sortas="b-tput">tput</primary>
    309           </indexterm>
    310         </listitem>
    311       </varlistentry>
    312 
    313       <varlistentry id="tset">
    314         <term><command>tset</command></term>
    315         <listitem>
    316           <para>Can be used to initialize terminals</para>
    317           <indexterm zone="ch-system-ncurses tset">
    318             <primary sortas="b-tset">tset</primary>
    319           </indexterm>
    320         </listitem>
    321       </varlistentry>
    322 
    323       <varlistentry id="libcursesw">
    324         <term><filename class="libraryfile">libcursesw</filename></term>
    325         <listitem>
    326           <para>A link to <filename>libncursesw</filename></para>
    327           <indexterm zone="ch-system-ncurses libcursesw">
    328             <primary sortas="c-libcursesw">libcursesw</primary>
    329           </indexterm>
    330         </listitem>
    331       </varlistentry>
    332 
    333       <varlistentry id="libncursesw">
    334         <term><filename class="libraryfile">libncursesw</filename></term>
    335         <listitem>
    336           <para>Contains functions to display text in many complex ways on a
    337           terminal screen; a good example of the use of these functions is the
    338           menu displayed during the kernel's <command>make
    339           menuconfig</command></para>
    340           <indexterm zone="ch-system-ncurses libncursesw">
    341             <primary sortas="c-libncursesw">libncursesw</primary>
    342           </indexterm>
    343         </listitem>
    344       </varlistentry>
    345 
    346       <varlistentry id="libformw">
    347         <term><filename class="libraryfile">libformw</filename></term>
    348         <listitem>
    349           <para>Contains functions to implement forms</para>
    350           <indexterm zone="ch-system-ncurses libformw">
    351             <primary sortas="c-libformw">libformw</primary>
    352           </indexterm>
    353         </listitem>
    354       </varlistentry>
    355 
    356       <varlistentry id="libmenuw">
    357         <term><filename class="libraryfile">libmenuw</filename></term>
    358         <listitem>
    359           <para>Contains functions to implement menus</para>
    360           <indexterm zone="ch-system-ncurses libmenuw">
    361             <primary sortas="c-libmenuw">libmenuw</primary>
    362           </indexterm>
    363         </listitem>
    364       </varlistentry>
    365 
    366       <varlistentry id="libpanelw">
    367         <term><filename class="libraryfile">libpanelw</filename></term>
    368         <listitem>
    369           <para>Contains functions to implement panels</para>
    370           <indexterm zone="ch-system-ncurses libpanelw">
    371             <primary sortas="c-libpanelw">libpanelw</primary>
    372           </indexterm>
    373         </listitem>
    374       </varlistentry>
    375 
    376     </variablelist>
     152    <para>Details on this package are located in
     153    <xref linkend="contents-ncurses" role="."/></para>
    377154
    378155  </sect2>
  • chapter06/patch.xml

    rd53fefa rfcc02767  
    66]>
    77
    8 <sect1 id="ch-system-patch" role="wrap">
     8<sect1 id="ch-tools-patch" role="wrap">
    99  <?dbhtml filename="patch.html"?>
    1010
     
    1717  <title>Patch-&patch-version;</title>
    1818
    19   <indexterm zone="ch-system-patch">
     19  <indexterm zone="ch-tools-patch">
    2020    <primary sortas="a-Patch">Patch</primary>
     21    <secondary>tools</secondary>
    2122  </indexterm>
    2223
     
    2425    <title/>
    2526
    26     <para>The Patch package contains a program for modifying or creating files
    27     by applying a <quote>patch</quote> file typically created by the
    28     <command>diff</command> program.</para>
     27    <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     28    href="../chapter08/patch.xml"
     29    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
    2930
    3031    <segmentedlist>
     
    3334
    3435      <seglistitem>
    35         <seg>&patch-ch6-sbu;</seg>
    36         <seg>&patch-ch6-du;</seg>
     36        <seg>&patch-ch5-sbu;</seg>
     37        <seg>&patch-ch5-du;</seg>
    3738      </seglistitem>
    3839    </segmentedlist>
     
    4546    <para>Prepare Patch for compilation:</para>
    4647
    47 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
     48<screen><userinput remap="configure">./configure --prefix=/usr   \
     49            --host=$LFS_TGT \
     50            --build=$(build-aux/config.guess)</userinput></screen>
    4851
    4952    <para>Compile the package:</para>
     
    5154<screen><userinput remap="make">make</userinput></screen>
    5255
    53     <para>To test the results, issue:</para>
    54 
    55 <screen><userinput remap="test">make check</userinput></screen>
    56 
    5756    <para>Install the package:</para>
    5857
    59 <screen><userinput remap="install">make install</userinput></screen>
     58<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
    6059
    6160  </sect2>
    6261
    63   <sect2 id="contents-patch" role="content">
    64     <title>Contents of Patch</title>
     62  <sect2 role="content">
     63    <title/>
    6564
    66     <segmentedlist>
    67       <segtitle>Installed program</segtitle>
    68 
    69       <seglistitem>
    70         <seg>patch</seg>
    71       </seglistitem>
    72     </segmentedlist>