Indenting chapter 6, part 9

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@7362 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
Manuel Canales Esparcia 2006-02-07 19:39:29 +00:00
parent 1ca11cdcf4
commit 3f3931b0a8
9 changed files with 1037 additions and 787 deletions

View File

@ -1,338 +1,420 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-perl" role="wrap"> <sect1 id="ch-system-perl" role="wrap">
<title>Perl-&perl-version;</title> <?dbhtml filename="perl.html"?>
<?dbhtml filename="perl.html"?>
<indexterm zone="ch-system-perl"><primary sortas="a-Perl">Perl</primary></indexterm> <title>Perl-&perl-version;</title>
<sect2 role="package"><title/> <indexterm zone="ch-system-perl">
<para>The Perl package contains the Practical Extraction and Report Language.</para> <primary sortas="a-Perl">Perl</primary>
</indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>2.9 SBU</seg><seg>137 MB</seg></seglistitem>
</segmentedlist>
<segmentedlist> <para>The Perl package contains the Practical Extraction and Report
<segtitle>&dependencies;</segtitle> Language.</para>
<seglistitem><seg>Bash, Berkeley DB, Binutils, Coreutils, Diffutils,
Gawk, GCC, Glibc, Grep, Make, and Sed</seg></seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation"> <segmentedlist>
<title>Installation of Perl</title> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<para>A security vulnerability exists in Perl's sprintf function. Apply the <seglistitem>
following patch to fix it.</para> <seg>2.9 SBU</seg>
<seg>137 MB</seg>
</seglistitem>
</segmentedlist>
<segmentedlist>
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Berkeley DB, Binutils, Coreutils, Diffutils, Gawk, GCC,
Glibc, Grep, Make, and Sed</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Perl</title>
<para>A security vulnerability exists in Perl's sprintf function. Apply the
following patch to fix it.</para>
<screen><userinput>patch -Np1 -i ../&perl-sprintf-patch;</userinput></screen> <screen><userinput>patch -Np1 -i ../&perl-sprintf-patch;</userinput></screen>
<para>The DB_File module that comes with Perl-&perl-version; is incompatible <para>The DB_File module that comes with Perl-&perl-version; is incompatible
with Berkeley DB-&db-version; (the testsuite fails if this module gets built). with Berkeley DB-&db-version; (the testsuite fails if this module gets built).
Apply the following patch in order to update the DB_File module:</para> Apply the following patch in order to update the DB_File module:</para>
<screen><userinput>patch -Np1 -i ../&perl-db_file-patch;</userinput></screen> <screen><userinput>patch -Np1 -i ../&perl-db_file-patch;</userinput></screen>
<para>First create a basic <filename>/etc/hosts</filename> file which will be <para>First create a basic <filename>/etc/hosts</filename> file which will be
referenced in one of Perl's configuration files as well as being used used by referenced in one of Perl's configuration files as well as being used used by
the testsuite if you run that.</para> the testsuite if you run that.</para>
<screen><userinput>echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen> <screen><userinput>echo "127.0.0.1 localhost $(hostname)" &gt; /etc/hosts</userinput></screen>
<para>To have full control over the way Perl is set up, run the <para>To have full control over the way Perl is set up, run the
interactive <command>Configure</command> script and hand-pick the way interactive <command>Configure</command> script and hand-pick the way
this package is built. If the defaults it auto-detects are suitable, this package is built. If the defaults it auto-detects are suitable,
prepare Perl for compilation with:</para> prepare Perl for compilation with:</para>
<screen><userinput>./configure.gnu --prefix=/usr -Dpager="/usr/bin/less -isR"</userinput></screen> <screen><userinput>./configure.gnu --prefix=/usr -Dpager="/usr/bin/less -isR"</userinput></screen>
<para>The meaning of the configure options:</para> <variablelist>
<title>The meaning of the configure options:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term>
<term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term> <listitem>
<listitem><para>This corrects an error in the way that <para>This corrects an error in the way that <command>perldoc</command>
<command>perldoc</command> invokes the <command>less</command> program.</para> invokes the <command>less</command> program.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist>
<para>Compile the package:</para> </variablelist>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>Now run the tests, if desired:</para> <para>Now run the tests, if desired:</para>
<screen><userinput>make test</userinput></screen> <screen><userinput>make test</userinput></screen>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-perl" role="content">
<title>Contents of Perl</title>
<sect2 id="contents-perl" role="content"><title>Contents of Perl</title> <segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed libraries</segtitle>
<segmentedlist> <seglistitem>
<segtitle>Installed programs</segtitle> <seg>a2p, c2ph, dprofpp, enc2xs, find2perl, h2ph, h2xs, libnetcfg, perl,
<segtitle>Installed libraries</segtitle> perl&perl-version; (link to perl), perlbug, perlcc, perldoc, perlivp,
<seglistitem><seg>a2p, c2ph, dprofpp, enc2xs, piconv, pl2pm, pod2html, pod2latex, pod2man, pod2text, pod2usage,
find2perl, h2ph, h2xs, libnetcfg, perl, perl&perl-version; (link to perl), podchecker, podselect, psed (link to s2p), pstruct (link to c2ph), s2p,
perlbug, perlcc, perldoc, perlivp, piconv, pl2pm, pod2html, pod2latex, pod2man, splain, and xsubpp</seg>
pod2text, pod2usage, podchecker, podselect, psed (link to s2p), pstruct (link <seg>Several hundred which cannot all be listed here</seg>
to c2ph), s2p, splain, and xsubpp</seg> </seglistitem>
<seg>Several hundred which cannot all be listed here</seg></seglistitem> </segmentedlist>
</segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> <variablelist>
<?dbfo list-presentation="list"?> <bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbhtml list-presentation="table"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="a2p"> <varlistentry id="a2p">
<term><command>a2p</command></term> <term><command>a2p</command></term>
<listitem> <listitem>
<para>Translates awk to Perl</para> <para>Translates awk to Perl</para>
<indexterm zone="ch-system-perl a2p"><primary sortas="b-a2p">a2p</primary></indexterm> <indexterm zone="ch-system-perl a2p">
</listitem> <primary sortas="b-a2p">a2p</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="c2ph"> <varlistentry id="c2ph">
<term><command>c2ph</command></term> <term><command>c2ph</command></term>
<listitem> <listitem>
<para>Dumps C structures as generated from <command>cc -g -S</command></para> <para>Dumps C structures as generated from
<indexterm zone="ch-system-perl c2ph"><primary sortas="b-c2ph">c2ph</primary></indexterm> <command>cc -g -S</command></para>
</listitem> <indexterm zone="ch-system-perl c2ph">
</varlistentry> <primary sortas="b-c2ph">c2ph</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="dprofpp"> <varlistentry id="dprofpp">
<term><command>dprofpp</command></term> <term><command>dprofpp</command></term>
<listitem> <listitem>
<para>Displays Perl profile data</para> <para>Displays Perl profile data</para>
<indexterm zone="ch-system-perl dprofpp"><primary sortas="b-dprofpp">dprofpp</primary></indexterm> <indexterm zone="ch-system-perl dprofpp">
</listitem> <primary sortas="b-dprofpp">dprofpp</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="en2cxs"> <varlistentry id="en2cxs">
<term><command>en2cxs</command></term> <term><command>en2cxs</command></term>
<listitem> <listitem>
<para>Builds a Perl extension for the Encode module from either <para>Builds a Perl extension for the Encode module from either
Unicode Character Mappings or Tcl Encoding Files</para> Unicode Character Mappings or Tcl Encoding Files</para>
<indexterm zone="ch-system-perl en2cxs"><primary sortas="b-en2cxs">en2cxs</primary></indexterm> <indexterm zone="ch-system-perl en2cxs">
</listitem> <primary sortas="b-en2cxs">en2cxs</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="find2perl"> <varlistentry id="find2perl">
<term><command>find2perl</command></term> <term><command>find2perl</command></term>
<listitem> <listitem>
<para>Translates <command>find</command> commands to Perl</para> <para>Translates <command>find</command> commands to Perl</para>
<indexterm zone="ch-system-perl find2perl"><primary sortas="b-find2perl">find2perl</primary></indexterm> <indexterm zone="ch-system-perl find2perl">
</listitem> <primary sortas="b-find2perl">find2perl</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="h2ph"> <varlistentry id="h2ph">
<term><command>h2ph</command></term> <term><command>h2ph</command></term>
<listitem> <listitem>
<para>Converts <filename class="extension">.h</filename> C header files to <para>Converts <filename class="extension">.h</filename> C header
<filename class="extension">.ph</filename> Perl header files</para> files to <filename class="extension">.ph</filename> Perl header
<indexterm zone="ch-system-perl h2ph"><primary sortas="b-h2ph">h2ph</primary></indexterm> files</para>
</listitem> <indexterm zone="ch-system-perl h2ph">
</varlistentry> <primary sortas="b-h2ph">h2ph</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="h2xs"> <varlistentry id="h2xs">
<term><command>h2xs</command></term> <term><command>h2xs</command></term>
<listitem> <listitem>
<para>Converts <filename class="extension">.h</filename> C header files to Perl extensions</para> <para>Converts <filename class="extension">.h</filename> C header
<indexterm zone="ch-system-perl h2xs"><primary sortas="b-h2xs">h2xs</primary></indexterm> files to Perl extensions</para>
</listitem> <indexterm zone="ch-system-perl h2xs">
</varlistentry> <primary sortas="b-h2xs">h2xs</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libnetcfg"> <varlistentry id="libnetcfg">
<term><command>libnetcfg</command></term> <term><command>libnetcfg</command></term>
<listitem> <listitem>
<para>Can be used to configure the <filename class="libraryfile">libnet</filename></para> <para>Can be used to configure the
<indexterm zone="ch-system-perl libnetcfg"><primary sortas="b-libnetcfg">libnetcfg</primary></indexterm> <filename class="libraryfile">libnet</filename></para>
</listitem> <indexterm zone="ch-system-perl libnetcfg">
</varlistentry> <primary sortas="b-libnetcfg">libnetcfg</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="perl"> <varlistentry id="perl">
<term><command>perl</command></term> <term><command>perl</command></term>
<listitem> <listitem>
<para>Combines some of the best features of C, <command>sed</command>, <para>Combines some of the best features of C, <command>sed</command>,
<command>awk</command> and <command>sh</command> into a single swiss-army <command>awk</command> and <command>sh</command> into a single
language</para> swiss-army language</para>
<indexterm zone="ch-system-perl perl"><primary sortas="b-perl">perl</primary></indexterm> <indexterm zone="ch-system-perl perl">
</listitem> <primary sortas="b-perl">perl</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="perl-version"> <varlistentry id="perl-version">
<term><command>perl&perl-version;</command></term> <term><command>perl&perl-version;</command></term>
<listitem> <listitem>
<para>A hard link to <command>perl</command></para> <para>A hard link to <command>perl</command></para>
<indexterm zone="ch-system-perl perl-version"><primary <indexterm zone="ch-system-perl perl-version">
sortas="b-perl&perl-version;">perl&perl-version;</primary></indexterm> <primary sortas="b-perl&perl-version;">perl&perl-version;</primary>
</listitem> </indexterm>
</varlistentry> </listitem>
</varlistentry>
<varlistentry id="perlbug">
<term><command>perlbug</command></term>
<listitem>
<para>Used to generate bug reports about Perl, or the modules that come
with it, and mail them</para>
<indexterm zone="ch-system-perl perlbug">
<primary sortas="b-perlbug">perlbug</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="perlbug"> <varlistentry id="perlcc">
<term><command>perlbug</command></term> <term><command>perlcc</command></term>
<listitem> <listitem>
<para>Used to generate bug reports about Perl, or the modules that come <para>Generates executables from Perl programs</para>
with it, and mail them</para> <indexterm zone="ch-system-perl perlcc">
<indexterm zone="ch-system-perl perlbug"><primary sortas="b-perlbug">perlbug</primary></indexterm> <primary sortas="b-perlcc">perlcc</primary>
</listitem> </indexterm>
</varlistentry> </listitem>
</varlistentry>
<varlistentry id="perlcc"> <varlistentry id="perldoc">
<term><command>perlcc</command></term> <term><command>perldoc</command></term>
<listitem> <listitem>
<para>Generates executables from Perl programs</para> <para>Displays a piece of documentation in pod format that is embedded
<indexterm zone="ch-system-perl perlcc"><primary sortas="b-perlcc">perlcc</primary></indexterm> in the Perl installation tree or in a Perl script</para>
</listitem> <indexterm zone="ch-system-perl perldoc">
</varlistentry> <primary sortas="b-perldoc">perldoc</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="perldoc"> <varlistentry id="perlivp">
<term><command>perldoc</command></term> <term><command>perlivp</command></term>
<listitem> <listitem>
<para>Displays a piece of documentation in pod format that is embedded <para>The Perl Installation Verification Procedure; it can be used to
in the Perl installation tree or in a Perl script</para> verify that Perl and its libraries have been installed
<indexterm zone="ch-system-perl perldoc"><primary sortas="b-perldoc">perldoc</primary></indexterm> correctly</para>
</listitem> <indexterm zone="ch-system-perl perlivp">
</varlistentry> <primary sortas="b-perlivp">perlivp</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="perlivp"> <varlistentry id="piconv">
<term><command>perlivp</command></term> <term><command>piconv</command></term>
<listitem> <listitem>
<para>The Perl Installation Verification Procedure; it can be used to <para>A Perl version of the character encoding converter
verify that Perl and its libraries have been installed <command>iconv</command></para>
correctly</para> <indexterm zone="ch-system-perl piconv">
<indexterm zone="ch-system-perl perlivp"><primary sortas="b-perlivp">perlivp</primary></indexterm> <primary sortas="b-piconv">piconv</primary>
</listitem> </indexterm>
</varlistentry> </listitem>
</varlistentry>
<varlistentry id="piconv"> <varlistentry id="pl2pm">
<term><command>piconv</command></term> <term><command>pl2pm</command></term>
<listitem> <listitem>
<para>A Perl version of the character encoding converter <para>A rough tool for converting Perl4
<command>iconv</command></para> <filename class="extension">.pl</filename> files to Perl5
<indexterm zone="ch-system-perl piconv"><primary sortas="b-piconv">piconv</primary></indexterm> <filename class="extension">.pm</filename> modules</para>
</listitem> <indexterm zone="ch-system-perl pl2pm">
</varlistentry> <primary sortas="b-pl2pm">pl2pm</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pl2pm"> <varlistentry id="pod2html">
<term><command>pl2pm</command></term> <term><command>pod2html</command></term>
<listitem> <listitem>
<para>A rough tool for converting Perl4 <filename class="extension">.pl</filename> <para>Converts files from pod format to HTML format</para>
files to Perl5 <filename class="extension">.pm</filename> modules</para> <indexterm zone="ch-system-perl pod2html">
<indexterm zone="ch-system-perl pl2pm"><primary sortas="b-pl2pm">pl2pm</primary></indexterm> <primary sortas="b-pod2html">pod2html</primary>
</listitem> </indexterm>
</varlistentry> </listitem>
</varlistentry>
<varlistentry id="pod2html"> <varlistentry id="pod2latex">
<term><command>pod2html</command></term> <term><command>pod2latex</command></term>
<listitem> <listitem>
<para>Converts files from pod format to HTML format</para> <para>Converts files from pod format to LaTeX format</para>
<indexterm zone="ch-system-perl pod2html"><primary sortas="b-pod2html">pod2html</primary></indexterm> <indexterm zone="ch-system-perl pod2latex">
</listitem> <primary sortas="b-pod2latex">pod2latex</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pod2latex"> <varlistentry id="pod2man">
<term><command>pod2latex</command></term> <term><command>pod2man</command></term>
<listitem> <listitem>
<para>Converts files from pod format to LaTeX format</para> <para>Converts pod data to formatted *roff input</para>
<indexterm zone="ch-system-perl pod2latex"><primary sortas="b-pod2latex">pod2latex</primary></indexterm> <indexterm zone="ch-system-perl pod2man">
</listitem> <primary sortas="b-pod2man">pod2man</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pod2man"> <varlistentry id="pod2text">
<term><command>pod2man</command></term> <term><command>pod2text</command></term>
<listitem> <listitem>
<para>Converts pod data to formatted *roff input</para> <para>Converts pod data to formatted ASCII text</para>
<indexterm zone="ch-system-perl pod2man"><primary sortas="b-pod2man">pod2man</primary></indexterm> <indexterm zone="ch-system-perl pod2text">
</listitem> <primary sortas="b-pod2text">pod2text</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pod2text"> <varlistentry id="pod2usage">
<term><command>pod2text</command></term> <term><command>pod2usage</command></term>
<listitem> <listitem>
<para>Converts pod data to formatted ASCII text</para> <para>Prints usage messages from embedded pod docs in files</para>
<indexterm zone="ch-system-perl pod2text"><primary sortas="b-pod2text">pod2text</primary></indexterm> <indexterm zone="ch-system-perl pod2usage">
</listitem> <primary sortas="b-pod2usage">pod2usage</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pod2usage"> <varlistentry id="podchecker">
<term><command>pod2usage</command></term> <term><command>podchecker</command></term>
<listitem> <listitem>
<para>Prints usage messages from embedded pod docs in files</para> <para>Checks the syntax of pod format documentation files</para>
<indexterm zone="ch-system-perl pod2usage"><primary sortas="b-pod2usage">pod2usage</primary></indexterm> <indexterm zone="ch-system-perl podchecker">
</listitem> <primary sortas="b-podchecker">podchecker</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="podchecker"> <varlistentry id="podselect">
<term><command>podchecker</command></term> <term><command>podselect</command></term>
<listitem> <listitem>
<para>Checks the syntax of pod format documentation files</para> <para>Displays selected sections of pod documentation</para>
<indexterm zone="ch-system-perl podchecker"><primary sortas="b-podchecker">podchecker</primary></indexterm> <indexterm zone="ch-system-perl podselect">
</listitem> <primary sortas="b-podselect">podselect</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="podselect"> <varlistentry id="psed">
<term><command>podselect</command></term> <term><command>psed</command></term>
<listitem> <listitem>
<para>Displays selected sections of pod documentation</para> <para>A Perl version of the stream editor <command>sed</command></para>
<indexterm zone="ch-system-perl podselect"><primary sortas="b-podselect">podselect</primary></indexterm> <indexterm zone="ch-system-perl psed">
</listitem> <primary sortas="b-psed">psed</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="psed"> <varlistentry id="pstruct">
<term><command>psed</command></term> <term><command>pstruct</command></term>
<listitem> <listitem>
<para>A Perl version of the stream editor <command>sed</command></para> <para>Dumps C structures as generated from <command>cc -g -S</command>
<indexterm zone="ch-system-perl psed"><primary sortas="b-psed">psed</primary></indexterm> stabs</para>
</listitem> <indexterm zone="ch-system-perl pstruct">
</varlistentry> <primary sortas="b-pstruct">pstruct</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pstruct"> <varlistentry id="s2p">
<term><command>pstruct</command></term> <term><command>s2p</command></term>
<listitem> <listitem>
<para>Dumps C structures as generated from <command>cc -g -S</command> stabs</para> <para>Translates <command>sed</command> scripts to Perl</para>
<indexterm zone="ch-system-perl pstruct"><primary sortas="b-pstruct">pstruct</primary></indexterm> <indexterm zone="ch-system-perl s2p">
</listitem> <primary sortas="b-s2p">s2p</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="s2p"> <varlistentry id="splain">
<term><command>s2p</command></term> <term><command>splain</command></term>
<listitem> <listitem>
<para>Translates <command>sed</command> scripts to Perl</para> <para>Is used to force verbose warning diagnostics in Perl</para>
<indexterm zone="ch-system-perl s2p"><primary sortas="b-s2p">s2p</primary></indexterm> <indexterm zone="ch-system-perl splain">
</listitem> <primary sortas="b-splain">splain</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="splain"> <varlistentry id="xsubpp">
<term><command>splain</command></term> <term><command>xsubpp</command></term>
<listitem> <listitem>
<para>Is used to force verbose warning diagnostics in Perl</para> <para>Converts Perl XS code into C code</para>
<indexterm zone="ch-system-perl splain"><primary sortas="b-splain">splain</primary></indexterm> <indexterm zone="ch-system-perl xsubpp">
</listitem> <primary sortas="b-xsubpp">xsubpp</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="xsubpp"> </variablelist>
<term><command>xsubpp</command></term>
<listitem>
<para>Converts Perl XS code into C code</para>
<indexterm zone="ch-system-perl xsubpp"><primary sortas="b-xsubpp">xsubpp</primary></indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2> </sect2>
</sect1> </sect1>

View File

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-pkgmgt"> <sect1 id="ch-system-pkgmgt">
<title>Package Management</title>
<?dbhtml filename="pkgmgt.html"?> <?dbhtml filename="pkgmgt.html"?>
<title>Package Management</title>
<para>Package Management is an often requested addition to the LFS Book. A <para>Package Management is an often requested addition to the LFS Book. A
Package Manager allows tracking the installation of files making it easy to Package Manager allows tracking the installation of files making it easy to
remove and upgrade packages. Before you begin to wonder, NO&mdash;this section remove and upgrade packages. Before you begin to wonder, NO&mdash;this section
@ -18,7 +19,8 @@
combination of two or more of these techniques. This section briefly mentions combination of two or more of these techniques. This section briefly mentions
issues that may arise when upgrading packages.</para> issues that may arise when upgrading packages.</para>
<para>Some reasons why no package manager is mentioned in LFS or BLFS include: </para> <para>Some reasons why no package manager is mentioned in LFS or BLFS
include:</para>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -37,11 +39,13 @@
the <ulink url="&hints-root;">Hints subproject</ulink> and see if one of them the <ulink url="&hints-root;">Hints subproject</ulink> and see if one of them
fits your need.</para> fits your need.</para>
<note><para>As no particular package management technique is mentioned in LFS, <note>
the commands in the remainder of this book must be performed while logged in <para>As no particular package management technique is mentioned in LFS,
as user <emphasis>root</emphasis> and no longer as user the commands in the remainder of this book must be performed while logged in
<emphasis>lfs</emphasis>. Also, double check that <envar>$LFS</envar> is set. as user <systemitem class="username">root</systemitem> and no longer as user
</para></note> <systemitem class="username">lfs</systemitem>. Also, double check that
<envar>$LFS</envar> is set.</para>
</note>
<sect2> <sect2>
<title>Upgrade Issues</title> <title>Upgrade Issues</title>
@ -53,16 +57,14 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
<para>If one of the toolchain packages <para>If one of the toolchain packages (Glibc, GCC or Binutils) needs
(<application>Glibc</application>, <application>GCC</application> or to be upgraded to a newer minor version, it is safer to rebuild LFS.
<application>Binutils</application>) needs to be upgraded to a newer Though you <emphasis>may</emphasis> be able to get by rebuilding all
minor version, it is safer to rebuild LFS. Though you the packages in their dependency order, we do not recommend it. For
<emphasis>may</emphasis> be able to get by rebuilding all the packages example, if glibc-2.2.x needs to be updated to glibc-2.3.x, it is safer
in their dependency order, we do not recommend it. For example, if to rebuild. For micro version updates, a simple reinstallation usually
glibc-2.2.x needs to be updated to glibc-2.3.x, it is safer to rebuild. works, but is not guaranteed. For example, upgrading from glibc-2.3.4
For micro version updates, a simple reinstallation usually works, but to glibc-2.3.5 will not usually cause any problems.</para>
is not guaranteed. For example, upgrading from glibc-2.3.4 to
glibc-2.3.5 will not usually cause any problems.</para>
</listitem> </listitem>
<listitem> <listitem>
@ -109,6 +111,7 @@
and know what files are installed by each package. Some users also do not and know what files are installed by each package. Some users also do not
need any package management because they plan on rebuilding the entire need any package management because they plan on rebuilding the entire
system when a package is changed.</para> system when a package is changed.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -129,6 +132,7 @@
<envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to <envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to
include <filename>/usr/pkg/foo</filename>. For more than a few packages, include <filename>/usr/pkg/foo</filename>. For more than a few packages,
this scheme becomes unmanageable.</para> this scheme becomes unmanageable.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -168,11 +172,11 @@ make install</userinput></screen>
make make
make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
<para>Most packages support this approach, but there are some which do <para>Most packages support this approach, but there are some which do not.
not. For the non-compliant packages, you may either need to manually For the non-compliant packages, you may either need to manually install the
install the package, or you may find that it is easier to install some package, or you may find that it is easier to install some problematic
problematic packages into <filename class='directory'>/opt</filename>. packages into <filename class='directory'>/opt</filename>.</para>
</para>
</sect3> </sect3>
<sect3> <sect3>
@ -190,6 +194,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
the package manager. Also, this scheme can only be used when one package the package manager. Also, this scheme can only be used when one package
is installed at a time. The logs are not reliable if two packages are is installed at a time. The logs are not reliable if two packages are
being installed on two different consoles.</para> being installed on two different consoles.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -205,6 +210,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
installation. Therefore, it is advised that one performs some tests to installation. Therefore, it is advised that one performs some tests to
ensure that the package manager does not break anything and logs all the ensure that the package manager does not break anything and logs all the
appropriate files.</para> appropriate files.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -214,8 +220,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
tree as described in the Symlink style package management. After the tree as described in the Symlink style package management. After the
installation, a package archive is created using the installed files. installation, a package archive is created using the installed files.
This archive is then used to install the package either on the local This archive is then used to install the package either on the local
machine or can even be used to install the package on other machines. machine or can even be used to install the package on other machines.</para>
</para>
<para>This approach is used by most of the package managers found in the <para>This approach is used by most of the package managers found in the
commercial distributions. Examples of package managers that follow this commercial distributions. Examples of package managers that follow this
@ -225,6 +230,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
Gentoo's Portage system. A hint describing how to adopt this style of Gentoo's Portage system. A hint describing how to adopt this style of
package management for LFS systems is located at <ulink package management for LFS systems is located at <ulink
url="&hints-root;/fakeroot.txt"/>.</para> url="&hints-root;/fakeroot.txt"/>.</para>
</sect3> </sect3>
<sect3> <sect3>
@ -236,8 +242,8 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
standard locations. Files belonging to a package are easily identified by standard locations. Files belonging to a package are easily identified by
checking the user ID. The features and shortcomings of this approach are checking the user ID. The features and shortcomings of this approach are
too complex to describe in this section. For the details please see the too complex to describe in this section. For the details please see the
hint at <ulink hint at <ulink url="&hints-root;/more_control_and_pkg_man.txt"/>.</para>
url="&hints-root;/more_control_and_pkg_man.txt"/>.</para>
</sect3> </sect3>
</sect2> </sect2>

View File

@ -1,195 +1,250 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-procps" role="wrap"> <sect1 id="ch-system-procps" role="wrap">
<title>Procps-&procps-version;</title> <?dbhtml filename="procps.html"?>
<?dbhtml filename="procps.html"?>
<indexterm zone="ch-system-procps"><primary sortas="a-Procps">Procps</primary></indexterm> <title>Procps-&procps-version;</title>
<sect2 role="package"><title/> <indexterm zone="ch-system-procps">
<para>The Procps package contains programs for monitoring processes.</para> <primary sortas="a-Procps">Procps</primary>
</indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.1 SBU</seg><seg>2.3 MB</seg></seglistitem>
</segmentedlist>
<segmentedlist> <para>The Procps package contains programs for monitoring processes.</para>
<segtitle>&dependencies;</segtitle>
<seglistitem><seg>Bash, Binutils, Coreutils, GCC, Glibc,
Make, and Ncurses</seg></seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation"> <segmentedlist>
<title>Installation of Procps</title> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<para>Compile the package:</para> <seglistitem>
<seg>0.1 SBU</seg>
<seg>2.3 MB</seg>
</seglistitem>
</segmentedlist>
<segmentedlist>
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Binutils, Coreutils, GCC, Glibc, Make, and Ncurses</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Procps</title>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>This package does not come with a test suite.</para> <para>This package does not come with a test suite.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-procps" role="content">
<title>Contents of Procps</title>
<sect2 id="contents-procps" role="content"><title>Contents of Procps</title> <segmentedlist>
<segtitle>Installed programs</segtitle>
<segtitle>Installed library</segtitle>
<segmentedlist> <seglistitem>
<segtitle>Installed programs</segtitle> <seg>free, kill, pgrep, pkill, pmap, ps, skill, snice, sysctl, tload,
<segtitle>Installed library</segtitle> top, uptime, vmstat, w, and watch</seg>
<seglistitem><seg>free, kill, pgrep, pkill, <seg>libproc.so</seg>
pmap, ps, skill, snice, sysctl, tload, top, uptime, vmstat, w, and watch</seg> </seglistitem>
<seg>libproc.so</seg></seglistitem> </segmentedlist>
</segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> <variablelist>
<?dbfo list-presentation="list"?> <bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbhtml list-presentation="table"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="free"> <varlistentry id="free">
<term><command>free</command></term> <term><command>free</command></term>
<listitem> <listitem>
<para>Reports the amount of free and used memory (both physical and <para>Reports the amount of free and used memory (both physical and
swap memory) in the system</para> swap memory) in the system</para>
<indexterm zone="ch-system-procps free"><primary sortas="b-free">free</primary></indexterm> <indexterm zone="ch-system-procps free">
</listitem> <primary sortas="b-free">free</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="kill"> <varlistentry id="kill">
<term><command>kill</command></term> <term><command>kill</command></term>
<listitem> <listitem>
<para>Sends signals to processes</para> <para>Sends signals to processes</para>
<indexterm zone="ch-system-procps kill"><primary sortas="b-kill">kill</primary></indexterm> <indexterm zone="ch-system-procps kill">
</listitem> <primary sortas="b-kill">kill</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pgrep"> <varlistentry id="pgrep">
<term><command>pgrep</command></term> <term><command>pgrep</command></term>
<listitem> <listitem>
<para>Looks up processes based on their name and other attributes</para> <para>Looks up processes based on their name and other attributes</para>
<indexterm zone="ch-system-procps pgrep"><primary sortas="b-pgrep">pgrep</primary></indexterm> <indexterm zone="ch-system-procps pgrep">
</listitem> <primary sortas="b-pgrep">pgrep</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pkill"> <varlistentry id="pkill">
<term><command>pkill</command></term> <term><command>pkill</command></term>
<listitem> <listitem>
<para>Signals processes based on their name and other attributes</para> <para>Signals processes based on their name and other attributes</para>
<indexterm zone="ch-system-procps pkill"><primary sortas="b-pkill">pkill</primary></indexterm> <indexterm zone="ch-system-procps pkill">
</listitem> <primary sortas="b-pkill">pkill</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pmap"> <varlistentry id="pmap">
<term><command>pmap</command></term> <term><command>pmap</command></term>
<listitem> <listitem>
<para>Reports the memory map of the given process</para> <para>Reports the memory map of the given process</para>
<indexterm zone="ch-system-procps pmap"><primary sortas="b-pmap">pmap</primary></indexterm> <indexterm zone="ch-system-procps pmap">
</listitem> <primary sortas="b-pmap">pmap</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="ps"> <varlistentry id="ps">
<term><command>ps</command></term> <term><command>ps</command></term>
<listitem> <listitem>
<para>Lists the current running processes</para> <para>Lists the current running processes</para>
<indexterm zone="ch-system-procps ps"><primary sortas="b-ps">ps</primary></indexterm> <indexterm zone="ch-system-procps ps">
</listitem> <primary sortas="b-ps">ps</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="skill"> <varlistentry id="skill">
<term><command>skill</command></term> <term><command>skill</command></term>
<listitem> <listitem>
<para>Sends signals to processes matching the given criteria</para> <para>Sends signals to processes matching the given criteria</para>
<indexterm zone="ch-system-procps skill"><primary sortas="b-skill">skill</primary></indexterm> <indexterm zone="ch-system-procps skill">
</listitem> <primary sortas="b-skill">skill</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="snice"> <varlistentry id="snice">
<term><command>snice</command></term> <term><command>snice</command></term>
<listitem> <listitem>
<para>Changes the scheduling priority of processes matching the given criteria</para> <para>Changes the scheduling priority of processes matching the given
<indexterm zone="ch-system-procps snice"><primary sortas="b-snice">snice</primary></indexterm> criteria</para>
</listitem> <indexterm zone="ch-system-procps snice">
</varlistentry> <primary sortas="b-snice">snice</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="sysctl"> <varlistentry id="sysctl">
<term><command>sysctl</command></term> <term><command>sysctl</command></term>
<listitem> <listitem>
<para>Modifies kernel parameters at run time</para> <para>Modifies kernel parameters at run time</para>
<indexterm zone="ch-system-procps sysctl"><primary sortas="b-sysctl">sysctl</primary></indexterm> <indexterm zone="ch-system-procps sysctl">
</listitem> <primary sortas="b-sysctl">sysctl</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="tload"> <varlistentry id="tload">
<term><command>tload</command></term> <term><command>tload</command></term>
<listitem> <listitem>
<para>Prints a graph of the current system load average</para> <para>Prints a graph of the current system load average</para>
<indexterm zone="ch-system-procps tload"><primary sortas="b-tload">tload</primary></indexterm> <indexterm zone="ch-system-procps tload">
</listitem> <primary sortas="b-tload">tload</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="top"> <varlistentry id="top">
<term><command>top</command></term> <term><command>top</command></term>
<listitem> <listitem>
<para>Displays a list of the most CPU intensive processes; it provides an <para>Displays a list of the most CPU intensive processes; it
ongoing look at processor activity in real time</para> provides an ongoing look at processor activity in real time</para>
<indexterm zone="ch-system-procps top"><primary sortas="b-top">top</primary></indexterm> <indexterm zone="ch-system-procps top">
</listitem> <primary sortas="b-top">top</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="uptime"> <varlistentry id="uptime">
<term><command>uptime</command></term> <term><command>uptime</command></term>
<listitem> <listitem>
<para>Reports how long the system has been running, how many users are <para>Reports how long the system has been running, how many users are
logged on, and the system load averages</para> logged on, and the system load averages</para>
<indexterm zone="ch-system-procps uptime"><primary sortas="b-uptime">uptime</primary></indexterm> <indexterm zone="ch-system-procps uptime">
</listitem> <primary sortas="b-uptime">uptime</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="vmstat"> <varlistentry id="vmstat">
<term><command>vmstat</command></term> <term><command>vmstat</command></term>
<listitem> <listitem>
<para>Reports virtual memory statistics, giving information about <para>Reports virtual memory statistics, giving information about
processes, memory, paging, block Input/Output (IO), traps, and CPU activity</para> processes, memory, paging, block Input/Output (IO), traps, and CPU
<indexterm zone="ch-system-procps vmstat"><primary sortas="b-vmstat">vmstat</primary></indexterm> activity</para>
</listitem> <indexterm zone="ch-system-procps vmstat">
</varlistentry> <primary sortas="b-vmstat">vmstat</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="w"> <varlistentry id="w">
<term><command>w</command></term> <term><command>w</command></term>
<listitem> <listitem>
<para>Shows which users are currently logged on, where, and since when</para> <para>Shows which users are currently logged on, where, and since
<indexterm zone="ch-system-procps w"><primary sortas="b-w">w</primary></indexterm> when</para>
</listitem> <indexterm zone="ch-system-procps w">
</varlistentry> <primary sortas="b-w">w</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="watch"> <varlistentry id="watch">
<term><command>watch</command></term> <term><command>watch</command></term>
<listitem> <listitem>
<para>Runs a given command repeatedly, displaying the first screen-full of its <para>Runs a given command repeatedly, displaying the first
output; this allows a user to watch the output change over time</para> screen-full of its output; this allows a user to watch the output
<indexterm zone="ch-system-procps watch"><primary sortas="b-watch">watch</primary></indexterm> change over time</para>
</listitem> <indexterm zone="ch-system-procps watch">
</varlistentry> <primary sortas="b-watch">watch</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="libproc"> <varlistentry id="libproc">
<term><filename class="libraryfile">libproc</filename></term> <term><filename class="libraryfile">libproc</filename></term>
<listitem> <listitem>
<para>Contains the functions used by most programs in this package</para> <para>Contains the functions used by most programs in this
<indexterm zone="ch-system-procps libproc"><primary sortas="c-libproc">libproc</primary></indexterm> package</para>
</listitem> <indexterm zone="ch-system-procps libproc">
</varlistentry> <primary sortas="c-libproc">libproc</primary>
</variablelist> </indexterm>
</listitem>
</varlistentry>
</sect2> </variablelist>
</sect2>
</sect1> </sect1>

View File

@ -1,134 +1,169 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-psmisc" role="wrap"> <sect1 id="ch-system-psmisc" role="wrap">
<title>Psmisc-&psmisc-version;</title> <?dbhtml filename="psmisc.html"?>
<?dbhtml filename="psmisc.html"?>
<indexterm zone="ch-system-psmisc"><primary sortas="a-Psmisc">Psmisc</primary></indexterm> <title>Psmisc-&psmisc-version;</title>
<sect2 role="package"><title/> <indexterm zone="ch-system-psmisc">
<para>The Psmisc package contains programs for displaying information about <primary sortas="a-Psmisc">Psmisc</primary>
running processes.</para> </indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.1 SBU</seg><seg>1.7 MB</seg></seglistitem>
</segmentedlist>
<segmentedlist> <para>The Psmisc package contains programs for displaying information about
<segtitle>&dependencies;</segtitle> running processes.</para>
<seglistitem><seg>Bash, Binutils, Coreutils, Diffutils,
GCC, Gettext, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation"> <segmentedlist>
<title>Installation of Psmisc</title> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<para>Prepare Psmisc for compilation:</para> <seglistitem>
<seg>0.1 SBU</seg>
<seg>1.7 MB</seg>
</seglistitem>
</segmentedlist>
<segmentedlist>
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
Make, Ncurses, and Sed</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Psmisc</title>
<para>Prepare Psmisc for compilation:</para>
<screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen> <screen><userinput>./configure --prefix=/usr --exec-prefix=""</userinput></screen>
<para>The meaning of the configure options:</para> <variablelist>
<title>The meaning of the configure options:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>--exec-prefix=""</parameter></term>
<term><parameter>--exec-prefix=""</parameter></term> <listitem>
<listitem><para>This ensures that the Psmisc binaries will install into <para>This ensures that the Psmisc binaries will install into
<filename class="directory">/bin</filename> instead of <filename <filename class="directory">/bin</filename> instead of <filename
class="directory">/usr/bin</filename>. This is the correct location according to class="directory">/usr/bin</filename>. This is the correct location
the FHS, because some of the Psmisc binaries are used by the LFS-Bootscripts according to the FHS, because some of the Psmisc binaries are used
package.</para></listitem> by the LFS-Bootscripts package.</para>
</varlistentry> </listitem>
</variablelist> </varlistentry>
<para>Compile the package:</para> </variablelist>
<para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>This package does not come with a test suite.</para> <para>This package does not come with a test suite.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
<para>There is no reason for the <command>pstree</command> and <para>There is no reason for the <command>pstree</command> and
<command>pstree.x11</command> programs to reside in <filename <command>pstree.x11</command> programs to reside in <filename
class="directory">/bin</filename>. Therefore, move them to <filename class="directory">/bin</filename>. Therefore, move them to <filename
class="directory">/usr/bin</filename>:</para> class="directory">/usr/bin</filename>:</para>
<screen><userinput>mv -v /bin/pstree* /usr/bin</userinput></screen> <screen><userinput>mv -v /bin/pstree* /usr/bin</userinput></screen>
<para>By default, Psmisc's <command>pidof</command> program is not <para>By default, Psmisc's <command>pidof</command> program is not
installed. This usually is not a problem because it is installed later installed. This usually is not a problem because it is installed later
in the Sysvinit package, which provides a better in the Sysvinit package, which provides a better
<command>pidof</command> program. If Sysvinit will not be used for a <command>pidof</command> program. If Sysvinit will not be used for a
particular system, complete the installation of Psmisc by creating the particular system, complete the installation of Psmisc by creating the
following symlink:</para> following symlink:</para>
<screen><userinput>ln -sv killall /bin/pidof</userinput></screen> <screen><userinput>ln -sv killall /bin/pidof</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-psmisc" role="content">
<title>Contents of Psmisc</title>
<sect2 id="contents-psmisc" role="content"><title>Contents of Psmisc</title> <segmentedlist>
<segtitle>Installed programs</segtitle>
<segmentedlist> <seglistitem>
<segtitle>Installed programs</segtitle> <seg>fuser, killall, pstree, and pstree.x11 (link to pstree)</seg>
<seglistitem><seg>fuser, killall, pstree, and pstree.x11 (link to pstree)</seg></seglistitem> </seglistitem>
</segmentedlist> </segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> <variablelist>
<?dbfo list-presentation="list"?> <bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbhtml list-presentation="table"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="fuser"> <varlistentry id="fuser">
<term><command>fuser</command></term> <term><command>fuser</command></term>
<listitem> <listitem>
<para>Reports the Process IDs (PIDs) of processes that use the given files or file systems</para> <para>Reports the Process IDs (PIDs) of processes that use the given
<indexterm zone="ch-system-psmisc fuser"><primary sortas="b-fuser">fuser</primary></indexterm> files or file systems</para>
</listitem> <indexterm zone="ch-system-psmisc fuser">
</varlistentry> <primary sortas="b-fuser">fuser</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="killall"> <varlistentry id="killall">
<term><command>killall</command></term> <term><command>killall</command></term>
<listitem> <listitem>
<para>Kills processes by name; it sends a signal to all processes <para>Kills processes by name; it sends a signal to all processes
running any of the given commands</para> running any of the given commands</para>
<indexterm zone="ch-system-psmisc killall"><primary sortas="b-killall">killall</primary></indexterm> <indexterm zone="ch-system-psmisc killall">
</listitem> <primary sortas="b-killall">killall</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="oldfuser"> <varlistentry id="oldfuser">
<term><command>oldfuser</command></term> <term><command>oldfuser</command></term>
<listitem> <listitem>
<para>Reports the Process IDs (PIDs) of processes that use the given files or file systems</para> <para>Reports the Process IDs (PIDs) of processes that use the given
<indexterm zone="ch-system-psmisc oldfuser"><primary sortas="b-oldfuser">oldfuser</primary></indexterm> files or file systems</para>
</listitem> <indexterm zone="ch-system-psmisc oldfuser">
</varlistentry> <primary sortas="b-oldfuser">oldfuser</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="pstree"> <varlistentry id="pstree">
<term><command>pstree</command></term> <term><command>pstree</command></term>
<listitem> <listitem>
<para>Displays running processes as a tree</para> <para>Displays running processes as a tree</para>
<indexterm zone="ch-system-psmisc pstree"><primary sortas="b-pstree">pstree</primary></indexterm> <indexterm zone="ch-system-psmisc pstree">
</listitem> <primary sortas="b-pstree">pstree</primary>
</varlistentry> </indexterm>
</listitem>
</varlistentry>
<varlistentry id="pstree.x11"> <varlistentry id="pstree.x11">
<term><command>pstree.x11</command></term> <term><command>pstree.x11</command></term>
<listitem> <listitem>
<para>Same as <command>pstree</command>, except that it waits for confirmation before exiting</para> <para>Same as <command>pstree</command>, except that it waits for
<indexterm zone="ch-system-psmisc pstree.x11"><primary sortas="b-pstree.x11">pstree.x11</primary></indexterm> confirmation before exiting</para>
</listitem> <indexterm zone="ch-system-psmisc pstree.x11">
</varlistentry> <primary sortas="b-pstree.x11">pstree.x11</primary>
</variablelist> </indexterm>
</listitem>
</varlistentry>
</sect2> </variablelist>
</sect2>
</sect1> </sect1>

View File

@ -1,36 +1,56 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-pwdgroup"> <sect1 id="ch-system-pwdgroup">
<title>Creating the passwd, group, and log Files</title> <?dbhtml filename="pwdgroup.html"?>
<?dbhtml filename="pwdgroup.html"?>
<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/passwd">/etc/passwd</primary></indexterm> <title>Creating the passwd, group, and log Files</title>
<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/etc/group">/etc/group</primary></indexterm>
<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/run/utmp">/var/run/utmp</primary></indexterm>
<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/btmp">/var/log/btmp</primary></indexterm>
<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary></indexterm>
<indexterm zone="ch-system-pwdgroup"><primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary></indexterm>
<para>In order for user <emphasis>root</emphasis> to be able to login <indexterm zone="ch-system-pwdgroup">
and for the name <quote>root</quote> to be recognized, there must be relevant <primary sortas="e-/etc/passwd">/etc/passwd</primary>
entries in the <filename>/etc/passwd</filename> and </indexterm>
<filename>/etc/group</filename> files.</para>
<para>Create the <filename>/etc/passwd</filename> file by running the following <indexterm zone="ch-system-pwdgroup">
command:</para> <primary sortas="e-/etc/group">/etc/group</primary>
</indexterm>
<indexterm zone="ch-system-pwdgroup">
<primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
</indexterm>
<indexterm zone="ch-system-pwdgroup">
<primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
</indexterm>
<indexterm zone="ch-system-pwdgroup">
<primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
</indexterm>
<indexterm zone="ch-system-pwdgroup">
<primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
</indexterm>
<para>In order for user <systemitem class="username">root</systemitem> to be
able to login and for the name <quote>root</quote> to be recognized, there
must be relevant entries in the <filename>/etc/passwd</filename> and
<filename>/etc/group</filename> files.</para>
<para>Create the <filename>/etc/passwd</filename> file by running the following
command:</para>
<screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF" <screen><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
<literal>root:x:0:0:root:/root:/bin/bash</literal> <literal>root:x:0:0:root:/root:/bin/bash</literal>
EOF</userinput></screen> EOF</userinput></screen>
<para>The actual password for <emphasis>root</emphasis> (the <quote>x</quote> <para>The actual password for <systemitem class="username">root</systemitem>
used here is just a placeholder) will be set later.</para> (the <quote>x</quote> used here is just a placeholder) will be set later.</para>
<para>Create the <filename>/etc/group</filename> file by running the following <para>Create the <filename>/etc/group</filename> file by running the following
command:</para> command:</para>
<screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF" <screen><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
<literal>root:x:0: <literal>root:x:0:
@ -51,49 +71,49 @@ usb:x:14:
cdrom:x:15:</literal> cdrom:x:15:</literal>
EOF</userinput></screen> EOF</userinput></screen>
<para>The created groups are not part of any standard&mdash;they are groups <para>The created groups are not part of any standard&mdash;they are groups
decided on in part by the requirements of the Udev configuration in this decided on in part by the requirements of the Udev configuration in this
chapter, and in part by common convention employed by a number of existing Linux chapter, and in part by common convention employed by a number of existing
distributions. The Linux Standard Base (LSB, available at <ulink Linux distributions. The Linux Standard Base (LSB, available at <ulink
url="http://www.linuxbase.org"/>) recommends only that, besides the group url="http://www.linuxbase.org"/>) recommends only that, besides the group
<quote>root</quote> with a Group ID (GID) of 0, a group <quote>bin</quote> with <systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0,
a GID of 1 be present. All other group names and GIDs can be chosen freely by a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be
the system administrator since well-written programs do not depend on GID present. All other group names and GIDs can be chosen freely by the system
numbers, but rather use the group's name.</para> administrator since well-written programs do not depend on GID numbers, but
rather use the group's name.</para>
<para>To remove the <quote>I have no name!</quote> prompt, start a new <para>To remove the <quote>I have no name!</quote> prompt, start a new
shell. Since a full Glibc was installed in <xref shell. Since a full Glibc was installed in <xref
linkend="chapter-temporary-tools"/> and the linkend="chapter-temporary-tools"/> and the
<filename>/etc/passwd</filename> and <filename>/etc/group</filename> <filename>/etc/passwd</filename> and <filename>/etc/group</filename>
files have been created, user name and group name resolution will now files have been created, user name and group name resolution will now
work.</para> work.</para>
<screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen> <screen role="nodump"><userinput>exec /tools/bin/bash --login +h</userinput></screen>
<para>Note the use of the <parameter>+h</parameter> directive. This tells <para>Note the use of the <parameter>+h</parameter> directive. This tells
<command>bash</command> not to use its internal path hashing. Without this <command>bash</command> not to use its internal path hashing. Without this
directive, <command>bash</command> would remember the paths to binaries it has directive, <command>bash</command> would remember the paths to binaries it has
executed. To ensure the use of the newly compiled binaries as soon as they are executed. To ensure the use of the newly compiled binaries as soon as they are
installed, the <parameter>+h</parameter> directive will be used for the duration installed, the <parameter>+h</parameter> directive will be used for the duration
of this chapter.</para> of this chapter.</para>
<para>The <command>login</command>, <command>agetty</command>, and <para>The <command>login</command>, <command>agetty</command>, and
<command>init</command> programs (and others) use a number of log <command>init</command> programs (and others) use a number of log
files to record information such as who was logged into the system and files to record information such as who was logged into the system and
when. However, these programs will not write to the log files if they when. However, these programs will not write to the log files if they
do not already exist. Initialize the log files and give them do not already exist. Initialize the log files and give them
proper permissions:</para> proper permissions:</para>
<screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp} <screen><userinput>touch /var/run/utmp /var/log/{btmp,lastlog,wtmp}
chgrp -v utmp /var/run/utmp /var/log/lastlog chgrp -v utmp /var/run/utmp /var/log/lastlog
chmod -v 664 /var/run/utmp /var/log/lastlog</userinput></screen> chmod -v 664 /var/run/utmp /var/log/lastlog</userinput></screen>
<para>The <filename>/var/run/utmp</filename> file records the users <para>The <filename>/var/run/utmp</filename> file records the users
that are currently logged in. The <filename>/var/log/wtmp</filename> that are currently logged in. The <filename>/var/log/wtmp</filename>
file records all logins and logouts. The file records all logins and logouts. The
<filename>/var/log/lastlog</filename> file records when <filename>/var/log/lastlog</filename> file records when
each user last logged in. The <filename>/var/log/btmp</filename> file each user last logged in. The <filename>/var/log/btmp</filename> file
records the bad login attempts.</para> records the bad login attempts.</para>
</sect1> </sect1>

View File

@ -1,113 +1,116 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-readjusting"> <sect1 id="ch-system-readjusting">
<title>Re-adjusting the Toolchain</title> <?dbhtml filename="readjusting.html"?>
<?dbhtml filename="readjusting.html"?>
<para>Now that the final C libraries have been installed, it is time to adjust <title>Re-adjusting the Toolchain</title>
the toolchain again. The toolchain will be adjusted so that it will link any
newly compiled program against these new libraries. This is a similar process
used in the <quote>Adjusting</quote> phase in the beginning of <xref
linkend="chapter-temporary-tools"/>, but with the adjustments reversed. In <xref
linkend="chapter-temporary-tools"/>, the chain was guided from the host's
<filename class="directory">/{,usr/}lib</filename> directories to the new
<filename class="directory">/tools/lib</filename> directory. Now, the chain will
be guided from that same <filename class="directory">/tools/lib</filename>
directory to the LFS <filename class="directory">/{,usr/}lib</filename>
directories.</para>
<para>First, backup the <filename class="directory">/tools</filename> linker, and <para>Now that the final C libraries have been installed, it is time to adjust
replace it with the adjusted linker we made in chapter 5. We'll also create a the toolchain again. The toolchain will be adjusted so that it will link any
link to its counterpart in <filename class="directory">/tools/$(gcc -dumpmachine)/bin</filename>.</para> newly compiled program against these new libraries. This is a similar process
used in the <quote>Adjusting</quote> phase in the beginning of <xref
linkend="chapter-temporary-tools"/>, but with the adjustments reversed. In <xref
linkend="chapter-temporary-tools"/>, the chain was guided from the host's
<filename class="directory">/{,usr/}lib</filename> directories to the new
<filename class="directory">/tools/lib</filename> directory. Now, the chain will
be guided from that same <filename class="directory">/tools/lib</filename>
directory to the LFS <filename class="directory">/{,usr/}lib</filename>
directories.</para>
<para>First, backup the <filename class="directory">/tools</filename> linker,
and replace it with the adjusted linker we made in chapter 5. We'll also create
a link to its counterpart in <filename class="directory">/tools/$(gcc
-dumpmachine)/bin</filename>.</para>
<screen><userinput>mv -v /tools/bin/{ld,ld-old} <screen><userinput>mv -v /tools/bin/{ld,ld-old}
mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old} mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
mv -v /tools/bin/{ld-new,ld} mv -v /tools/bin/{ld-new,ld}
ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen> ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen>
<para>Next, amend the GCC specs file so that it points to the new <para>Next, amend the GCC specs file so that it points to the new
dynamic linker, and so that GCC knows where to find its start files. dynamic linker, and so that GCC knows where to find its start files.
A <command>perl</command> command accomplishes this:</para> A <command>perl</command> command accomplishes this:</para>
<screen><userinput>gcc -dumpspecs | \ <screen><userinput>gcc -dumpspecs | \
perl -p -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;' \ perl -p -e 's@/tools/lib/ld-linux.so.2@/lib/ld-linux.so.2@g;' \
-e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' &gt; \ -e 's@\*startfile_prefix_spec:\n@$_/usr/lib/ @g;' &gt; \
`dirname $(gcc --print-libgcc-file-name)`/specs `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen>
</userinput></screen>
<para>It is a good idea to visually inspect the specs file to verify the intended <para>It is a good idea to visually inspect the specs file to verify the
change was actually made.</para> intended change was actually made.</para>
<important><para>If working on a platform where the name of the <important>
dynamic linker is something other than <para>If working on a platform where the name of the dynamic linker is
<filename class="libraryfile">ld-linux.so.2</filename>, substitute something other than <filename class="libraryfile">ld-linux.so.2</filename>,
<quote>ld-linux.so.2</quote> with the name of the platform's substitute <quote>ld-linux.so.2</quote> with the name of the platform's
dynamic linker in the above commands. Refer back to <xref dynamic linker in the above commands. Refer back to <xref
linkend="ch-tools-toolchaintechnotes" role=","/> if linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para>
necessary.</para></important> </important>
<caution><para>It is imperative at this point to stop and ensure that <caution>
the basic functions (compiling and linking) of the adjusted toolchain <para>It is imperative at this point to stop and ensure that the basic
are working as expected. To do this, perform a sanity functions (compiling and linking) of the adjusted toolchain are working
check:</para> as expected. To do this, perform a sanity check:</para>
<screen><userinput>echo 'main(){}' &gt; dummy.c <screen><userinput>echo 'main(){}' &gt; dummy.c
cc dummy.c -Wl,--verbose &amp;&gt; dummy.log cc dummy.c -Wl,--verbose &amp;&gt; dummy.log
readelf -l a.out | grep ': /lib'</userinput></screen> readelf -l a.out | grep ': /lib'</userinput></screen>
<para>If everything is working correctly, there should be no errors, <para>If everything is working correctly, there should be no errors,
and the output of the last command will be (allowing for and the output of the last command will be (allowing for
platform-specific differences in dynamic linker name):</para> platform-specific differences in dynamic linker name):</para>
<screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen> <screen><computeroutput>[Requesting program interpreter: /lib/ld-linux.so.2]</computeroutput></screen>
<para>Note that <filename class="directory">/lib</filename> is now <para>Note that <filename class="directory">/lib</filename> is now
the prefix of our dynamic linker.</para> the prefix of our dynamic linker.</para>
<para>Now make sure that we're setup to use the correct start files:</para> <para>Now make sure that we're setup to use the correct start files:</para>
<screen><userinput>grep "/usr/lib/crt.* " dummy.log</userinput></screen> <screen><userinput>grep "/usr/lib/crt.* " dummy.log</userinput></screen>
<para>If everything is working correctly, there should be no errors, <para>If everything is working correctly, there should be no errors,
and the output of the last command will be:</para> and the output of the last command will be:</para>
<screen><computeroutput>attempt to open /usr/lib/crt1.o succeeded <screen><computeroutput>attempt to open /usr/lib/crt1.o succeeded
attempt to open /usr/lib/crti.o succeeded attempt to open /usr/lib/crti.o succeeded
attempt to open /usr/lib/crtn.o succeeded</computeroutput></screen> attempt to open /usr/lib/crtn.o succeeded</computeroutput></screen>
<para>Next make sure that we're using the correct libc:</para> <para>Next make sure that we're using the correct libc:</para>
<screen><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen> <screen><userinput>grep "/lib/libc.so.6 " dummy.log</userinput></screen>
<para>If everything is working correctly, there should be no errors, <para>If everything is working correctly, there should be no errors,
and the output of the last command will be:</para> and the output of the last command will be:</para>
<screen><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen> <screen><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen>
<para>Lastly, make sure GCC is using the correct dynamic linker:</para> <para>Lastly, make sure GCC is using the correct dynamic linker:</para>
<screen><userinput>grep found dummy.log</userinput></screen> <screen><userinput>grep found dummy.log</userinput></screen>
<para>If everything is working correctly, there should be no errors, <para>If everything is working correctly, there should be no errors,
and the output of the last command will be (allowing for and the output of the last command will be (allowing for
platform-specific differences in dynamic linker name):</para> platform-specific differences in dynamic linker name):</para>
<screen><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen> <screen><computeroutput>found ld-linux.so.2 at /lib/ld-linux.so.2</computeroutput></screen>
<para>If the output does not appear as shown above or is not received <para>If the output does not appear as shown above or is not received
at all, then something is seriously wrong. Investigate and retrace the at all, then something is seriously wrong. Investigate and retrace the
steps to find out where the problem is and correct it. The most likely steps to find out where the problem is and correct it. The most likely
reason is that something went wrong with the specs file amendment reason is that something went wrong with the specs file amendment
above. Any issues will need to be resolved before continuing on with above. Any issues will need to be resolved before continuing on with
the process.</para> the process.</para>
<para>Once everything is working correctly, clean up the test <para>Once everything is working correctly, clean up the test
files:</para> files:</para>
<screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen></caution> <screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
</caution>
</sect1> </sect1>

View File

@ -1,111 +1,135 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-readline" role="wrap"> <sect1 id="ch-system-readline" role="wrap">
<title>Readline-&readline-version;</title> <?dbhtml filename="readline.html"?>
<?dbhtml filename="readline.html"?>
<indexterm zone="ch-system-readline"><primary sortas="a-Readline">Readline</primary></indexterm> <title>Readline-&readline-version;</title>
<sect2 role="package"><title/> <indexterm zone="ch-system-readline">
<para>The Readline package is a set of libraries that offers command-line <primary sortas="a-Readline">Readline</primary>
editing and history capabilities.</para> </indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.11 SBU</seg><seg>9.1 MB</seg></seglistitem>
</segmentedlist>
<segmentedlist> <para>The Readline package is a set of libraries that offers command-line
<segtitle>&dependencies;</segtitle> editing and history capabilities.</para>
<seglistitem><seg>Binutils, Coreutils, Diffutils, Gawk,
GCC, Glibc, Grep, Make, Ncurses, and Sed</seg></seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation"> <segmentedlist>
<title>Installation of Readline</title> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<para>Prepare Readline for compilation:</para> <seglistitem>
<seg>0.11 SBU</seg>
<seg>9.1 MB</seg>
</seglistitem>
</segmentedlist>
<segmentedlist>
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep, Make,
Ncurses, and Sed</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Readline</title>
<para>Prepare Readline for compilation:</para>
<screen><userinput>./configure --prefix=/usr --libdir=/lib</userinput></screen> <screen><userinput>./configure --prefix=/usr --libdir=/lib</userinput></screen>
<para>Compile the package:</para> <para>Compile the package:</para>
<screen><userinput>make SHLIB_LIBS=-lncurses</userinput></screen> <screen><userinput>make SHLIB_LIBS=-lncurses</userinput></screen>
<para>The meaning of the make option:</para> <variablelist>
<title>The meaning of the make option:</title>
<variablelist> <varlistentry>
<varlistentry> <term><parameter>SHLIB_LIBS=-lncurses</parameter></term>
<term><parameter>SHLIB_LIBS=-lncurses</parameter></term> <listitem>
<listitem><para>This option forces Readline to link against the <para>This option forces Readline to link against the
<filename class="libraryfile">libncurses</filename> <filename class="libraryfile">libncurses</filename> (really,
(really, <filename class="libraryfile">libncursesw</filename>) <filename class="libraryfile">libncursesw</filename>) library.</para>
library.</para></listitem> </listitem>
</varlistentry> </varlistentry>
</variablelist>
<para>This package does not come with a test suite.</para> </variablelist>
<para>Install the package:</para> <para>This package does not come with a test suite.</para>
<para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
<para>Give Readline's dynamic libraries more appropriate permissions:</para> <para>Give Readline's dynamic libraries more appropriate permissions:</para>
<screen><userinput>chmod -v 755 /lib/lib{readline,history}.so*</userinput></screen> <screen><userinput>chmod -v 755 /lib/lib{readline,history}.so*</userinput></screen>
<para>Now move the static libraries to a more appropriate location:</para> <para>Now move the static libraries to a more appropriate location:</para>
<screen><userinput>mv -v /lib/lib{readline,history}.a /usr/lib</userinput></screen> <screen><userinput>mv -v /lib/lib{readline,history}.a /usr/lib</userinput></screen>
<para>Next, remove the <filename class="extension">.so</filename> files in <para>Next, remove the <filename class="extension">.so</filename> files in
<filename class="directory">/lib</filename> and relink them into <filename <filename class="directory">/lib</filename> and relink them into <filename
class="directory">/usr/lib</filename>.</para> class="directory">/usr/lib</filename>.</para>
<screen><userinput>rm -v /lib/lib{readline,history}.so <screen><userinput>rm -v /lib/lib{readline,history}.so
ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so ln -sfv ../../lib/libreadline.so.5 /usr/lib/libreadline.so
ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen> ln -sfv ../../lib/libhistory.so.5 /usr/lib/libhistory.so</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-readline" role="content">
<title>Contents of Readline</title>
<sect2 id="contents-readline" role="content"><title>Contents of Readline</title> <segmentedlist>
<segmentedlist> <segtitle>Installed libraries</segtitle>
<segtitle>Installed libraries</segtitle>
<seglistitem><seg>libhistory.[a,so], and libreadline.[a,so]</seg></seglistitem>
</segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> <seglistitem>
<?dbfo list-presentation="list"?> <seg>libhistory.[a,so], and libreadline.[a,so]</seg>
<?dbhtml list-presentation="table"?> </seglistitem>
</segmentedlist>
<varlistentry id="libhistory"> <variablelist>
<term><filename class="libraryfile">libhistory</filename></term> <bridgehead renderas="sect3">Short Descriptions</bridgehead>
<listitem> <?dbfo list-presentation="list"?>
<para>Provides a consistent user interface <?dbhtml list-presentation="table"?>
for recalling lines of history</para>
<indexterm zone="ch-system-readline libhistory"><primary sortas="c-libhistory">libhistory</primary></indexterm>
</listitem>
</varlistentry>
<varlistentry id="libreadline"> <varlistentry id="libhistory">
<term><filename class="libraryfile">libreadline</filename></term> <term><filename class="libraryfile">libhistory</filename></term>
<listitem> <listitem>
<para>Aids in the consistency of user interface <para>Provides a consistent user interface for recalling lines
across discrete programs that need to provide a command line of history</para>
interface</para> <indexterm zone="ch-system-readline libhistory">
<indexterm zone="ch-system-readline libreadline"><primary sortas="c-libreadline">libreadline</primary></indexterm> <primary sortas="c-libhistory">libhistory</primary>
</listitem> </indexterm>
</varlistentry> </listitem>
</varlistentry>
</variablelist> <varlistentry id="libreadline">
<term><filename class="libraryfile">libreadline</filename></term>
<listitem>
<para>Aids in the consistency of user interface across discrete
programs that need to provide a command line interface</para>
<indexterm zone="ch-system-readline libreadline">
<primary sortas="c-libreadline">libreadline</primary>
</indexterm>
</listitem>
</varlistentry>
</sect2> </variablelist>
</sect2>
</sect1> </sect1>

View File

@ -1,30 +1,34 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-revisedchroot">
<title>Cleaning Up</title>
<?dbhtml filename="revisedchroot.html"?>
<para>From now on, when reentering the chroot environment after <sect1 id="ch-system-revisedchroot">
exiting, use the following modified chroot command:</para> <?dbhtml filename="revisedchroot.html"?>
<title>Cleaning Up</title>
<para>From now on, when reentering the chroot environment after
exiting, use the following modified chroot command:</para>
<screen><userinput>chroot "$LFS" /usr/bin/env -i \ <screen><userinput>chroot "$LFS" /usr/bin/env -i \
HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \ HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
PATH=/bin:/usr/bin:/sbin:/usr/sbin \ PATH=/bin:/usr/bin:/sbin:/usr/sbin \
/bin/bash --login</userinput></screen> /bin/bash --login</userinput></screen>
<para>The reason for this is that the programs in <filename <para>The reason for this is that the programs in <filename
class="directory">/tools</filename> are no longer needed. Since they are no class="directory">/tools</filename> are no longer needed. Since they are no
longer needed you can delete the <filename class="directory">/tools</filename> longer needed you can delete the <filename class="directory">/tools</filename>
directory if so desired.</para> directory if so desired.</para>
<note><para>Removing <filename class="directory">/tools</filename> will also <note>
remove the temporary copies of Tcl, Expect, and DejaGNU which were used for <para>Removing <filename class="directory">/tools</filename> will also
running the toolchain tests. If you need these programs later on, they will need remove the temporary copies of Tcl, Expect, and DejaGNU which were used
to be recompiled and re-installed. The BLFS book has instructions for this (see for running the toolchain tests. If you need these programs later on,
<ulink url="&blfs-root;"/>).</para></note> they will need to be recompiled and re-installed. The BLFS book has
instructions for this (see <ulink url="&blfs-root;"/>).</para>
</note>
</sect1> </sect1>

View File

@ -1,79 +1,100 @@
<?xml version="1.0" encoding="ISO-8859-1"?> <?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN" "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [ <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../general.ent"> <!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities; %general-entities;
]> ]>
<sect1 id="ch-system-sed" role="wrap"> <sect1 id="ch-system-sed" role="wrap">
<title>Sed-&sed-version;</title> <?dbhtml filename="sed.html"?>
<?dbhtml filename="sed.html"?>
<indexterm zone="ch-system-sed"><primary sortas="a-Sed">Sed</primary></indexterm> <title>Sed-&sed-version;</title>
<sect2 role="package"><title/> <indexterm zone="ch-system-sed">
<para>The Sed package contains a stream editor.</para> <primary sortas="a-Sed">Sed</primary>
</indexterm>
<segmentedlist> <sect2 role="package">
<segtitle>&buildtime;</segtitle> <title/>
<segtitle>&diskspace;</segtitle>
<seglistitem><seg>0.2 SBU</seg><seg>8.4 MB</seg></seglistitem>
</segmentedlist>
<segmentedlist> <para>The Sed package contains a stream editor.</para>
<segtitle>&dependencies;</segtitle>
<seglistitem><seg>Bash, Binutils, Coreutils,
Diffutils, GCC, Gettext, Glibc, Grep, Make, and Texinfo</seg></seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation"> <segmentedlist>
<title>Installation of Sed</title> <segtitle>&buildtime;</segtitle>
<segtitle>&diskspace;</segtitle>
<para>By default, Sed installs its HTML documentation in <seglistitem>
<filename class="directory">/usr/share/doc</filename>. Alter this to <seg>0.2 SBU</seg>
<filename class="directory">/usr/share/doc/sed-&sed-version;</filename> by <seg>8.4 MB</seg>
applying the following <command>sed</command>:</para> </seglistitem>
</segmentedlist>
<segmentedlist>
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc,
Grep, Make, and Texinfo</seg>
</seglistitem>
</segmentedlist>
</sect2>
<sect2 role="installation">
<title>Installation of Sed</title>
<para>By default, Sed installs its HTML documentation in
<filename class="directory">/usr/share/doc</filename>. Alter this to
<filename class="directory">/usr/share/doc/sed-&sed-version;</filename> by
applying the following <command>sed</command>:</para>
<screen><userinput>sed -i 's@/doc@&amp;/sed-&sed-version;@' doc/Makefile.in</userinput></screen> <screen><userinput>sed -i 's@/doc@&amp;/sed-&sed-version;@' doc/Makefile.in</userinput></screen>
<para>Prepare Sed for compilation:</para> <para>Prepare Sed for compilation:</para>
<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen> <screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
<para>Compile the package:</para> <para>Compile the package:</para>
<screen><userinput>make</userinput></screen> <screen><userinput>make</userinput></screen>
<para>To test the results, issue: <para>To test the results, issue:
<userinput>make check</userinput>.</para> <userinput>make check</userinput>.</para>
<para>Install the package:</para> <para>Install the package:</para>
<screen><userinput>make install</userinput></screen> <screen><userinput>make install</userinput></screen>
</sect2> </sect2>
<sect2 id="contents-sed" role="content">
<title>Contents of Sed</title>
<sect2 id="contents-sed" role="content"><title>Contents of Sed</title> <segmentedlist>
<segtitle>Installed program</segtitle>
<segmentedlist> <seglistitem>
<segtitle>Installed program</segtitle> <seg>sed</seg>
<seglistitem><seg>sed</seg></seglistitem> </seglistitem>
</segmentedlist> </segmentedlist>
<variablelist><bridgehead renderas="sect3">Short Descriptions</bridgehead> <variablelist>
<?dbfo list-presentation="list"?> <bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbhtml list-presentation="table"?> <?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="sed"> <varlistentry id="sed">
<term><command>sed</command></term> <term><command>sed</command></term>
<listitem> <listitem>
<para>Filters and transforms text files in a single pass</para> <para>Filters and transforms text files in a single pass</para>
<indexterm zone="ch-system-sed sed"><primary sortas="b-sed">sed</primary></indexterm> <indexterm zone="ch-system-sed sed">
</listitem> <primary sortas="b-sed">sed</primary>
</varlistentry> </indexterm>
</variablelist> </listitem>
</varlistentry>
</sect2> </variablelist>
</sect2>
</sect1> </sect1>