diff options
author | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2020-06-07 20:16:00 +0000 |
---|---|---|
committer | Bruce Dubbs <bdubbs@linuxfromscratch.org> | 2020-06-07 20:16:00 +0000 |
commit | fcc027677da55c41dcaea045f5b9ff8b088e6495 (patch) | |
tree | 42500a7858959695b971e7f28f1d0bf33185db2e /chapter06 | |
parent | d53fefab5a6772fef606392a61608fc290e6a7ae (diff) |
Initial commit of alternative cross LFS
git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/cross2@11897 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Diffstat (limited to 'chapter06')
97 files changed, 3205 insertions, 18048 deletions
diff --git a/chapter06/aboutdebug.xml b/chapter06/aboutdebug.xml deleted file mode 100644 index f49618c83..000000000 --- a/chapter06/aboutdebug.xml +++ /dev/null @@ -1,52 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-aboutdebug"> - <?dbhtml filename="aboutdebug.html"?> - - <title>About Debugging Symbols</title> - - <para>Most programs and libraries are, by default, compiled with - debugging symbols included (with <command>gcc</command>'s - <parameter>-g</parameter> option). This means that when debugging a - program or library that was compiled with debugging information - included, the debugger can provide not only memory addresses, but also - the names of the routines and variables.</para> - - <para>However, the inclusion of these debugging symbols enlarges a - program or library significantly. The following is an example of the - amount of space these symbols occupy:</para> - - <itemizedlist> - <listitem> - <para>A <command>bash</command> binary with debugging symbols: - 1200 KB</para> - </listitem> - <listitem> - <para>A <command>bash</command> binary without debugging symbols: - 480 KB</para> - </listitem> - <listitem> - <para>Glibc and GCC files (<filename class="directory">/lib</filename> - and <filename class="directory">/usr/lib</filename>) with debugging - symbols: 87 MB</para> - </listitem> - <listitem> - <para>Glibc and GCC files without debugging symbols: 16 MB</para> - </listitem> - </itemizedlist> - - <para>Sizes may vary depending on which compiler and C library were used, - but when comparing programs with and without debugging symbols, the - difference will usually be a factor between two and five.</para> - - <para>Because most users will never use a debugger on their system software, - a lot of disk space can be regained by removing these symbols. The next - section shows how to strip all debugging symbols from the programs and - libraries.</para> - -</sect1> diff --git a/chapter06/acl.xml b/chapter06/acl.xml deleted file mode 100644 index f9f2eddbe..000000000 --- a/chapter06/acl.xml +++ /dev/null @@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-acl" role="wrap"> - <?dbhtml filename="acl.html"?> - - <sect1info condition="script"> - <productname>acl</productname> - <productnumber>&acl-version;</productnumber> - <address>&acl-url;</address> - </sect1info> - - <title>Acl-&acl-version;</title> - - <indexterm zone="ch-system-acl"> - <primary sortas="a-Acl">Acl</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Acl package contains utilities to administer Access Control Lists, - which are used to define more fine-grained discretionary access rights for - files and directories.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&acl-ch6-sbu;</seg> - <seg>&acl-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Acl</title> - - <para>Prepare Acl for compilation:</para> - -<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \ - --bindir=/bin \ - --disable-static \ - --libexecdir=/usr/lib \ - --docdir=/usr/share/doc/acl-&acl-version;</userinput></screen> - -<screen revision="systemd"><userinput remap="configure"> -./configure --prefix=/usr \ - --disable-static \ - --libexecdir=/usr/lib \ - --docdir=/usr/share/doc/acl-&acl-version;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>The Acl tests need to be run on a filesystem that supports access - controls after <application>Coreutils</application> has been built with the - Acl libraries. If desired, return to this package and run <command>make - check</command> after <application>Coreutils</application> has been built - later in this chapter.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>The shared library needs to be moved to - <filename class="directory">/lib</filename>, and as a result the - <filename class="extension">.so</filename> file in - <filename class="directory">/usr/lib</filename> will need to be recreated:</para> - -<screen><userinput remap="install">mv -v /usr/lib/libacl.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libacl.so) /usr/lib/libacl.so</userinput></screen> - - </sect2> - - <sect2 id="contents-acl" role="content"> - <title>Contents of Acl</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>chacl, getfacl, and setfacl</seg> - <seg>libacl.so</seg> - <seg>/usr/include/acl and /usr/share/doc/acl-&acl-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="chacl"> - <term><command>chacl</command></term> - <listitem> - <para>Changes the access control list of a file - or directory</para> - <indexterm zone="ch-system-acl chacl"> - <primary sortas="b-chacl">chacl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getfacl"> - <term><command>getfacl</command></term> - <listitem> - <para>Gets file access control lists</para> - <indexterm zone="ch-system-acl getfacl"> - <primary sortas="b-getfacl">getfacl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setfacl"> - <term><command>setfacl</command></term> - <listitem> - <para>Sets file access control lists</para> - <indexterm zone="ch-system-acl setfacl"> - <primary sortas="b-setfacl">setfacl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libacl"> - <term><filename class="libraryfile">libacl</filename></term> - <listitem> - <para>Contains the library functions for manipulating Access Control Lists</para> - <indexterm zone="ch-system-acl libacl"> - <primary sortas="c-libacl">libacl</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/adjusting.xml b/chapter06/adjusting.xml deleted file mode 100644 index 3e6b49e19..000000000 --- a/chapter06/adjusting.xml +++ /dev/null @@ -1,126 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-adjusting"> - <?dbhtml filename="adjusting.html"?> - - <title>Adjusting the Toolchain</title> - - <para>Now that the final C libraries have been installed, it is time to adjust - the toolchain so that it will link any - newly compiled program against these new libraries.</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/$(uname -m)-pc-linux-gnu/bin</filename>:</para> - -<screen><userinput>mv -v /tools/bin/{ld,ld-old} -mv -v /tools/$(uname -m)-pc-linux-gnu/bin/{ld,ld-old} -mv -v /tools/bin/{ld-new,ld} -ln -sv /tools/bin/ld /tools/$(uname -m)-pc-linux-gnu/bin/ld</userinput></screen> - - <para>the next command amends the GCC specs file to achieve three goals: - first point GCC to the new dynamic linker. Simply deleting all instances of - <quote>/tools</quote> should leave us with the correct path to the dynamic - linker. Second, let GCC know where to find the Glibc start files. Third, - add the /usr/include directory at the end of the default search path, so - that header files added in chapter 6 are found. - A <command>sed</command> command accomplishes this:</para> - -<screen><userinput>gcc -dumpspecs | sed -e 's@/tools@@g' \ - -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ - -e '/\*cpp:/{n;s@$@ -idirafter /usr/include@}' > \ - `dirname $(gcc --print-libgcc-file-name)`/specs</userinput></screen> - - <para>It is a good idea to visually inspect the specs file to verify the - intended change was actually made.</para> - - <para>It is imperative at this point to ensure that the basic - functions (compiling and linking) of the adjusted toolchain are working - as expected. To do this, perform the following sanity checks:</para> - -<screen os="a"><userinput>echo 'int main(){}' > dummy.c -cc dummy.c -v -Wl,--verbose &> dummy.log -readelf -l a.out | grep ': /lib'</userinput></screen> - - <para os="b">There should be no errors, - and the output of the last command will be (allowing for - platform-specific differences in dynamic linker name):</para> - -<screen os="c"><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> - - <para>Note that on 64-bit systems <filename class="directory">/lib</filename> is - the location of our dynamic linker, but is accessed via a symbolic link - in /lib64.</para> - - <note><para>On 32-bit systems the interpreter should be - /lib/ld-linux.so.2.</para></note> - - <para os="d">Now make sure that we're setup to use the correct start files:</para> - -<screen os="e"><userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput></screen> - - <para os="f">The output of the last command should be:</para> - -<screen><computeroutput>/usr/lib/../lib/crt1.o succeeded -/usr/lib/../lib/crti.o succeeded -/usr/lib/../lib/crtn.o succeeded</computeroutput></screen> - - <para os="g">Verify that the compiler is searching for the correct header - files:</para> - -<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen> - - <para os="h">This command should return the following output:</para> - -<screen><computeroutput>#include <...> search starts here: - /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include - /tools/include - /tools/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed - /usr/include</computeroutput></screen> - - <note><para>On a 32 bit system, x86_64 is replaced with i686.</para></note> - - <para os="i">Next, verify that the new linker is being used with the correct search paths:</para> - -<screen os="j"><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen> - - <para os="k">References to paths that have components with '-linux-gnu' should - be ignored, but otherwise the output of the last command should be:</para> - -<screen><computeroutput>SEARCH_DIR("/usr/lib") -SEARCH_DIR("/lib")</computeroutput></screen> - - <para os="l">Next make sure that we're using the correct libc:</para> - -<screen os="m"><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen> - - <para os="n">The output of the last command should be:</para> - -<screen os="o"><computeroutput>attempt to open /lib/libc.so.6 succeeded</computeroutput></screen> - - <para os="p">Lastly, make sure GCC is using the correct dynamic linker:</para> - -<screen os="q"><userinput>grep found dummy.log</userinput></screen> - - <para os="r">The output of the last command should be (allowing for - platform-specific differences in dynamic linker name):</para> - -<screen os="s"><computeroutput>found ld-linux-x86-64.so.2 at /lib/ld-linux-x86-64.so.2</computeroutput></screen> - - <para os="t">If the output does not appear as shown above or is not received - 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 - reason is that something went wrong with the specs file adjustment. Any - issues will need to be resolved before continuing with the process.</para> - - <para os="u">Once everything is working correctly, clean up the test files:</para> - -<screen os="v"><userinput>rm -v dummy.c a.out dummy.log</userinput></screen> - -</sect1> diff --git a/chapter06/attr.xml b/chapter06/attr.xml deleted file mode 100644 index 10c6eec53..000000000 --- a/chapter06/attr.xml +++ /dev/null @@ -1,147 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-attr" role="wrap"> - <?dbhtml filename="attr.html"?> - - <sect1info condition="script"> - <productname>attr</productname> - <productnumber>&attr-version;</productnumber> - <address>&attr-url;</address> - </sect1info> - - <title>Attr-&attr-version;</title> - - <indexterm zone="ch-system-attr"> - <primary sortas="a-Attr">Attr</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The attr package contains utilities to administer the extended - attributes on filesystem objects.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&attr-ch6-sbu;</seg> - <seg>&attr-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Attr</title> - - <para>Prepare Attr for compilation:</para> - -<screen revision="sysv"><userinput remap="configure"> -./configure --prefix=/usr \ - --bindir=/bin \ - --disable-static \ - --sysconfdir=/etc \ - --docdir=/usr/share/doc/attr-&attr-version;</userinput></screen> - -<screen revision="systemd"><userinput remap="configure"> -./configure --prefix=/usr \ - --disable-static \ - --sysconfdir=/etc \ - --docdir=/usr/share/doc/attr-&attr-version;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>The tests need to be run on a filesystem that supports extended - attributes such as the ext2, ext3, or ext4 filesystems. - To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>The shared library needs to be moved to - <filename class="directory">/lib</filename>, and as a result the - <filename class="extension">.so</filename> file in - <filename class="directory">/usr/lib</filename> will need to be recreated:</para> - -<screen><userinput remap="install">mv -v /usr/lib/libattr.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libattr.so) /usr/lib/libattr.so</userinput></screen> - - </sect2> - - <sect2 id="contents-attr" role="content"> - <title>Contents of Attr</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>attr, getfattr, and setfattr</seg> - <seg>libattr.so</seg> - <seg>/usr/include/attr and /usr/share/doc/attr-&attr-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="attr"> - <term><command>attr</command></term> - <listitem> - <para>Extends attributes on filesystem objects</para> - <indexterm zone="ch-system-attr attr"> - <primary sortas="b-attr">attr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getfattr"> - <term><command>getfattr</command></term> - <listitem> - <para>Gets the extended attributes of filesystem objects</para> - <indexterm zone="ch-system-attr getfattr"> - <primary sortas="b-getfattr">getfattr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setfattr"> - <term><command>setfattr</command></term> - <listitem> - <para>Sets the extended attributes of filesystem objects</para> - <indexterm zone="ch-system-attr setfattr"> - <primary sortas="b-setfattr">setfattr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libattr"> - <term><filename class="libraryfile">libattr</filename></term> - <listitem> - <para>Contains the library functions for manipulating extended attributes</para> - <indexterm zone="ch-system-attr libattr"> - <primary sortas="c-libattr">libattr</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/autoconf.xml b/chapter06/autoconf.xml deleted file mode 100644 index 6652747fd..000000000 --- a/chapter06/autoconf.xml +++ /dev/null @@ -1,194 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-autoconf" role="wrap"> - <?dbhtml filename="autoconf.html"?> - - <sect1info condition="script"> - <productname>autoconf</productname> - <productnumber>&autoconf-version;</productnumber> - <address>&autoconf-url;</address> - </sect1info> - - <title>Autoconf-&autoconf-version;</title> - - <indexterm zone="ch-system-autoconf"> - <primary sortas="a-Autoconf">Autoconf</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Autoconf package contains programs for producing shell scripts that - can automatically configure source code.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&autoconf-ch6-sbu;</seg> - <seg>&autoconf-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Autoconf</title> - - <para>First, fix a bug generated by Perl 5.28.</para> - -<screen><userinput remap="pre">sed '361 s/{/\\{/' -i bin/autoscan.in</userinput></screen> - - <para>Prepare Autoconf for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> -<!-- - <para>To test the results, issue:</para>--> - <para>The test suite is currently broken by bash-5 and libtool-2.4.3. - To run the tests anyway, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> -<!-- - <para>This takes a long time, about &autoconf-ch6-sbu-tests; SBUs. In addition, - several tests are skipped that use Automake. For full test coverage, - Autoconf can be re-tested after Automake has been installed. In addition, - two tests fail due to changes in libtool-2.4.3 and later.</para> - - <note><para>The test time for autoconf can be reduced significantly on a - system with multiple cores. To do this, append - <command>TESTSUITEFLAGS=-j<N></command> to the line above. For - instance, using -j4 can reduce the test time by over 60 - percent.</para></note> ---> - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-autoconf" role="content"> - <title>Contents of Autoconf</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, - and ifnames</seg> - <seg>/usr/share/autoconf</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="autoconf"> - <term><command>autoconf</command></term> - <listitem> - <para>Produces shell scripts that automatically configure software - source code packages to adapt to many kinds of Unix-like systems; - the configuration scripts it produces are independent—running - them does not require the <command>autoconf</command> program</para> - <indexterm zone="ch-system-autoconf autoconf"> - <primary sortas="b-autoconf">autoconf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="autoheader"> - <term><command>autoheader</command> </term> - <listitem> - <para>A tool for creating template files of C - <emphasis>#define</emphasis> statements for configure to use</para> - <indexterm zone="ch-system-autoconf autoheader"> - <primary sortas="b-autoheader">autoheader</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="autom4te"> - <term><command>autom4te</command></term> - <listitem> - <para>A wrapper for the M4 macro processor</para> - <indexterm zone="ch-system-autoconf autom4te"> - <primary sortas="b-autom4te">autom4te</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="autoreconf"> - <term><command>autoreconf</command></term> - <listitem> - <para>Automatically runs <command>autoconf</command>, - <command>autoheader</command>, <command>aclocal</command>, - <command>automake</command>, <command>gettextize</command>, and - <command>libtoolize</command> in the correct order to save time - when changes are made to <command>autoconf</command> and - <command>automake</command> template files</para> - <indexterm zone="ch-system-autoconf autoreconf"> - <primary sortas="b-autoreconf">autoreconf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="autoscan"> - <term><command>autoscan</command> </term> - <listitem> - <para>Helps to create a <filename>configure.in</filename> file for a - software package; it examines the source files in a directory tree, - searching them for common portability issues, and creates a - <filename>configure.scan</filename> file that serves as as a - preliminary <filename>configure.in</filename> file for the - package</para> - <indexterm zone="ch-system-autoconf autoscan"> - <primary sortas="b-autoscan">autoscan</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="autoupdate"> - <term><command>autoupdate</command></term> - <listitem> - <para>Modifies a <filename>configure.in</filename> file that still - calls <command>autoconf</command> macros by their old names to use the - current macro names</para> - <indexterm zone="ch-system-autoconf autoupdate"> - <primary sortas="b-autoupdate">autoupdate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ifnames"> - <term><command>ifnames</command> </term> - <listitem> - <para>Helps when writing <filename>configure.in</filename> files - for a software package; it prints the identifiers that the package - uses in C preprocessor conditionals [If a package has already been set - up to have some portability, this program can help determine what - <command>configure</command> needs to check for. It can also fill in - gaps in a <filename>configure.in</filename> file generated by - <command>autoscan</command>.]</para> - <indexterm zone="ch-system-autoconf ifnames"> - <primary sortas="b-ifnames">ifnames</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/automake.xml b/chapter06/automake.xml deleted file mode 100644 index 11dccfad3..000000000 --- a/chapter06/automake.xml +++ /dev/null @@ -1,155 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-automake" role="wrap"> - <?dbhtml filename="automake.html"?> - - <sect1info condition="script"> - <productname>automake</productname> - <productnumber>&automake-version;</productnumber> - <address>&automake-url;</address> - </sect1info> - - <title>Automake-&automake-version;</title> - - <indexterm zone="ch-system-automake"> - <primary sortas="a-Automake">Automake</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Automake package contains programs for generating Makefiles for use - with Autoconf.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&automake-ch6-sbu;</seg> - <seg>&automake-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Automake</title> - - <para>Fix a failing test:</para> - -<screen><userinput remap="pre">sed -i "s/''/etags/" t/tags-lisp-space.sh</userinput></screen> - - <para>Prepare Automake for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/automake-&automake-version;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - -<!--<para>There are a couple of tests that incorrectly link to the - wrong version of the flex library, so we temporarily work around - the problem. Also, using the -j4 make option speeds up the tests, even on - systems with only one processor, due to internal delays in individual - tests. To test the results, issue:</para> - --> - - <para> Using the -j4 make option speeds up the tests, even on systems with - only one processor, due to internal delays in individual tests. To test - the results, issue:</para> - - <!--<screen><userinput remap="test">sed -i "s:./configure:LEXLIB=/usr/lib/libfl.a &:" t/lex-{clean,depend}-cxx.sh - make -j4 check</userinput></screen>--> - -<screen><userinput remap="test">make -j4 check</userinput></screen> - - - <para>One test is known to fail in the LFS environment: - tags-lisp-space.sh.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - - <sect2 id="contents-automake" role="content"> - <title>Contents of Automake</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>aclocal, aclocal-&am-minor-version; (hard linked with aclocal), automake, and - automake-&am-minor-version; (hard linked with automake) </seg> - <seg>/usr/share/aclocal-&am-minor-version;, /usr/share/automake-&am-minor-version;, and - /usr/share/doc/automake-&automake-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="aclocal"> - <term><command>aclocal</command></term> - <listitem> - <para>Generates <filename>aclocal.m4</filename> files based on the - contents of <filename>configure.in</filename> files</para> - <indexterm zone="ch-system-automake aclocal"> - <primary sortas="b-aclocal">aclocal</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="aclocalversion"> - <term><command>aclocal-&am-minor-version;</command></term> - <listitem> - <para>A hard link to <command>aclocal</command></para> - <indexterm zone="ch-system-automake aclocalversion"> - <primary sortas="b-aclocal-&am-minor-version;">aclocal-&am-minor-version;</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="automake"> - <term><command>automake</command></term> - <listitem> - <para>A tool for automatically generating - <filename>Makefile.in</filename> files from - <filename>Makefile.am</filename> files [To create all the - <filename>Makefile.in</filename> files for a package, run this program - in the top-level directory. By scanning the - <filename>configure.in</filename> file, it automatically finds each - appropriate <filename>Makefile.am</filename> file and generates the - corresponding <filename>Makefile.in</filename> file.]</para> - <indexterm zone="ch-system-automake automake"> - <primary sortas="b-automake">automake</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="automake-version"> - <term><command>automake-&am-minor-version;</command></term> - <listitem> - <para>A hard link to <command>automake</command></para> - <indexterm zone="ch-system-automake automake-version"> - <primary sortas="b-automake-&am-minor-version;">automake-&am-minor-version;</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/bash.xml b/chapter06/bash.xml index 650c33ade..92627e92c 100644 --- a/chapter06/bash.xml +++ b/chapter06/bash.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-bash" role="wrap"> +<sect1 id="ch-tools-bash" role="wrap"> <?dbhtml filename="bash.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Bash-&bash-version;</title> - <indexterm zone="ch-system-bash"> + <indexterm zone="ch-tools-bash"> <primary sortas="a-Bash">Bash</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Bash package contains the Bourne-Again SHell.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/bash.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bash-ch6-sbu;</seg> - <seg>&bash-ch6-du;</seg> + <seg>&bash-ch5-sbu;</seg> + <seg>&bash-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -40,27 +43,24 @@ <sect2 role="installation"> <title>Installation of Bash</title> - <para>Incorporate some upstream fixes:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen> - <para>Prepare Bash for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr \ - --docdir=/usr/share/doc/bash-&bash-version; \ - --without-bash-malloc \ - --with-installed-readline</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --build=$(support/config.guess) \ + --host=$LFS_TGT \ + --without-bash-malloc</userinput></screen> <variablelist> - <title>The meaning of the new configure option:</title> + <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>--with-installed-readline</parameter></term> + <term><parameter>--without-bash-malloc</parameter></term> <listitem> - <para>This option tells Bash to use the <filename - class="libraryfile">readline</filename> library that is already - installed on the system rather than using its own readline - version.</para> + <para>This option turns off the use of Bash's memory allocation + (<function>malloc</function>) function which is known to cause + segmentation faults. By turning this option off, Bash will use + the <function>malloc</function> functions from Glibc which are + more stable.</para> </listitem> </varlistentry> @@ -70,103 +70,26 @@ <screen><userinput remap="make">make</userinput></screen> - <para>Skip down to <quote>Install the - package</quote> if not running the test suite.</para> - - <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para> - -<screen><userinput remap="test">chown -Rv tester .</userinput></screen> + <para>Install the package:</para> - <para>Now, run the tests as the <systemitem - class="username">tester</systemitem> user:</para> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> -<screen><userinput remap="test">su tester << EOF -PATH=$PATH make tests < $(tty) -EOF</userinput></screen> -<!-- - <para>The <systemitem class="username">tester</systemitem> - user does not have enough permissions for all the tests to pass. This shows - up in some <quote>diff</quote> output in four test results. Portions of the - run-execscript, run-lastpipe, run-read, and run-test programs - are known to fail in the LFS chroot environment, but pass if the tests - are run in a full system.</para> ---> - <para>Install the package and move the main executable to - <filename class='directory'>/bin</filename>:</para> + <para>Move the excutable to where it is expected to be:</para> -<screen><userinput remap="install">make install -mv -vf /usr/bin/bash /bin</userinput></screen> +<screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen> - <para>Run the newly compiled <command>bash</command> program (replacing the one that is - currently being executed):</para> + <para>Make a link for the programs that use <command>sh</command> for + a shell:</para> -<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> - - <note> - <para>The parameters used make the <command>bash</command> - process an interactive login shell and continue to disable hashing so - that new programs are found as they become available.</para> - </note> +<screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen> </sect2> - <sect2 id="contents-bash" role="content"> - <title>Contents of Bash</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>bash, bashbug, and sh (link to bash)</seg> - <seg>/usr/include/bash, /usr/lib/bash, and - /usr/share/doc/bash-&bash-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bash"> - <term><command>bash</command></term> - <listitem> - <para>A widely-used command interpreter; it performs many types of - expansions and substitutions on a given command line before executing - it, thus making this interpreter a powerful tool</para> - <indexterm zone="ch-system-bash bash"> - <primary sortas="b-bash">bash</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bashbug"> - <term><command>bashbug</command></term> - <listitem> - <para>A shell script to help the user compose and mail standard - formatted bug reports concerning <command>bash</command></para> - <indexterm zone="ch-system-bash bashbug"> - <primary sortas="b-bashbug">bashbug</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sh"> - <term><command>sh</command></term> - <listitem> - <para>A symlink to the <command>bash</command> program; when invoked - as <command>sh</command>, <command>bash</command> tries to mimic the - startup behavior of historical versions of <command>sh</command> as - closely as possible, while conforming to the POSIX standard as - well</para> - <indexterm zone="ch-system-bash sh"> - <primary sortas="b-sh">sh</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-bash" role="."/></para> </sect2> diff --git a/chapter06/bc.xml b/chapter06/bc.xml deleted file mode 100644 index d848ad365..000000000 --- a/chapter06/bc.xml +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-bc" role="wrap"> - <?dbhtml filename="bc.html"?> - - <sect1info condition="script"> - <productname>bc</productname> - <productnumber>&bc-version;</productnumber> - <address>&bc-url;</address> - </sect1info> - - <title>Bc-&bc-version;</title> - - <indexterm zone="ch-system-bc"> - <primary sortas="a-Bc">Bc</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Bc package contains an arbitrary precision numeric processing - language.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&bc-ch6-sbu;</seg> - <seg>&bc-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Bc</title> - - <para>Prepare Bc for compilation:</para> - -<screen><userinput remap="configure">PREFIX=/usr CC=gcc CFLAGS="-std=c99" ./configure.sh -G -O3</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>CC=gcc CFLAGS="-std=c99"</parameter></term> - <listitem> - <para>These parameters specify the compiler and the C standard to use.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-O3</parameter></term> - <listitem> - <para>Specify the optimization to use.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-G</parameter></term> - <listitem> - <para>Omit parts of the test suite that won't work - without a GNU bc present.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test bc, run:</para> - -<screen><userinput remap="test">make test</userinput></screen> - - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-bc" role="content"> - <title>Contents of Bc</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>bc and dc</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bc"> - <term><command>bc</command></term> - <listitem> - <para>A command line calculator</para> - <indexterm zone="ch-system-bc bc"> - <primary sortas="b-bc">bc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dc"> - <term><command>dc</command></term> - <listitem> - <para>A reverse-polish command line calculator</para> - <indexterm zone="ch-system-bc dc"> - <primary sortas="b-dc">dc</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/binutils-pass1.xml b/chapter06/binutils-pass1.xml new file mode 100644 index 000000000..8658cfcfe --- /dev/null +++ b/chapter06/binutils-pass1.xml @@ -0,0 +1,156 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-binutils-pass1" role="wrap"> + <?dbhtml filename="binutils-pass1.html"?> + + <sect1info condition="script"> + <productname>binutils-pass1</productname> + <productnumber>&binutils-version;</productnumber> + <address>&binutils-url;</address> + </sect1info> + + <title>Binutils-&binutils-version; - Pass 1</title> + + <indexterm zone="ch-tools-binutils-pass1"> + <primary sortas="a-Binutils">Binutils</primary> + <secondary>tools, pass 1</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter06/binutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&binutils-ch5p1-sbu;</seg> + <seg>&binutils-ch5p1-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Cross Binutils</title> + + <note><para>Go back and re-read the notes in the previous section. + Understanding the notes labeled important will save you a lot + of problems later.</para></note> + + <para>It is important that Binutils be the first package compiled + because both Glibc and GCC perform various tests on the available + linker and assembler to determine which of their own features to + enable.</para> + + <para>The Binutils documentation recommends building Binutils + in a dedicated build directory:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <note> + <para>In order for the SBU values listed in the rest of the book + to be of any use, measure the time it takes to build this package from + the configuration, up to and including the first install. To achieve + this easily, wrap the commands in a <command>time</command> + command like this: <userinput>time { ./configure ... && ... + && make install; }</userinput>.</para> + </note> +<!-- + <note><para>The approximate build SBU values and required disk space + in Chapter 5 does not include test suite data.</para></note> +--> + <para>Now prepare Binutils for compilation:</para> + +<screen><userinput remap="configure">../configure --prefix=$LFS/tools \ + --with-sysroot=$LFS \ + --target=$LFS_TGT \ + --disable-nls \ + --disable-werror</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--prefix=$LFS/tools</parameter></term> + <listitem> + <para>This tells the configure script to prepare to install the + Binutils programs in the <filename + class="directory">$LFS/tools</filename> directory.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-sysroot=$LFS</parameter></term> + <listitem> + <para>For cross compilation, this tells the build system to look in + $LFS for the target system libraries as needed.</para> + </listitem> + </varlistentry> + <!-- + <varlistentry> + <term><parameter>- -with-lib-path=/tools/lib</parameter></term> + <listitem> + <para>This specifies which library path the linker should be + configured to use.</para> + </listitem> + </varlistentry> + --> + <varlistentry> + <term><envar>--target=$LFS_TGT</envar></term> + <listitem> + <para>Because the machine description in the <envar>LFS_TGT</envar> + variable is slightly different than the value returned by the + <command>config.guess</command> script, this switch will tell the + <command>configure</command> script to adjust Binutil's build system + for building a cross linker. </para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-nls</parameter></term> + <listitem> + <para>This disables internationalization as i18n is not needed for the + temporary tools.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-werror</parameter></term> + <listitem> + <para>This prevents the build from stopping in the event that there + are warnings from the host's compiler.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Continue with compiling the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-binutils" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/binutils-pass2.xml b/chapter06/binutils-pass2.xml new file mode 100644 index 000000000..d88bb84e2 --- /dev/null +++ b/chapter06/binutils-pass2.xml @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-binutils-pass2" role="wrap"> + <?dbhtml filename="binutils-pass2.html"?> + + <sect1info condition="script"> + <productname>binutils-pass2</productname> + <productnumber>&binutils-version;</productnumber> + <address>&binutils-url;</address> + </sect1info> + + <title>Binutils-&binutils-version; - Pass 2</title> + + <indexterm zone="ch-tools-binutils-pass2"> + <primary sortas="a-Binutils">Binutils</primary> + <secondary>tools, pass 2</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/binutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&binutils-ch5p2-sbu;</seg> + <seg>&binutils-ch5p2-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Binutils</title> + + <para>Create a separate build directory again:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Prepare Binutils for compilation:</para> + +<screen><userinput remap="configure">../configure \ + --prefix=/usr \ + --build=$(../config.guess) \ + --host=$LFS_TGT \ + --disable-nls \ + --enable-shared \ + --disable-werror</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title> + + <varlistentry> + <term><parameter>--host=$LFS_TGT</parameter></term> + <listitem> + <para>This tells the configure script that we want to build + this pass of binutils for the $LFS_TGT machine, using our just + built cross-compiler. This prevents the linker from searching + through library directories on the host.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-binutils" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/binutils.xml b/chapter06/binutils.xml deleted file mode 100644 index 04dbd199c..000000000 --- a/chapter06/binutils.xml +++ /dev/null @@ -1,436 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-binutils" role="wrap"> - <?dbhtml filename="binutils.html"?> - - <sect1info condition="script"> - <productname>binutils</productname> - <productnumber>&binutils-version;</productnumber> - <address>&binutils-url;</address> - </sect1info> - - <title>Binutils-&binutils-version;</title> - - <indexterm zone="ch-system-binutils"> - <primary sortas="a-Binutils">Binutils</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Binutils package contains a linker, an assembler, and other - tools for handling object files.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&binutils-ch6-sbu;</seg> - <seg>&binutils-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Binutils</title> - - <para>Verify that the PTYs are working properly inside the chroot - environment by performing a simple test:</para> - -<screen><userinput remap="test">expect -c "spawn ls"</userinput></screen> - - <para>This command should output the following:</para> - -<screen><computeroutput>spawn ls</computeroutput></screen> - - <para>If, instead, the output includes the message below, then the environment - is not set up for proper PTY operation. This issue needs to be resolved before - running the test suites for Binutils and GCC:</para> - -<screen><computeroutput>The system has no more ptys. -Ask your system administrator to create more.</computeroutput></screen> - - <para>Now remove one test that prevents the tests from running - to completion, and fix other tests in the gold test suite, which - need to be adjusted for GCC 10:</para> - -<screen><userinput remap="pre">sed -i '/@\tincremental_copy/d' gold/testsuite/Makefile.in -patch -Np1 -i ../binutils-&binutils-version;-gcc10_gold_test_fix-1.patch</userinput></screen> - - <para>The Binutils documentation recommends building Binutils - in a dedicated build directory:</para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Prepare Binutils for compilation:</para> - -<screen><userinput remap="configure">../configure --prefix=/usr \ - --enable-gold \ - --enable-ld=default \ - --enable-plugins \ - --enable-shared \ - --disable-werror \ - --enable-64-bit-bfd \ - --with-system-zlib</userinput></screen> - <variablelist> - <title>The meaning of the configure parameters:</title> - - <varlistentry> - <term><parameter>--enable-gold</parameter></term> - <listitem> - <para>Build the gold linker and install it as ld.gold (along side the - default linker).</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-ld=default</parameter></term> - <listitem> - <para>Build the original bfd linker and install it as both ld (the - default linker) and ld.bfd.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-plugins</parameter></term> - <listitem> - <para>Enables plugin support for the linker.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-64-bit-bfd</parameter></term> - <listitem> - <para>Enables 64-bit support (on hosts with narrower word sizes). - May not be needed on 64-bit systems, but does no harm.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--with-system-zlib</parameter></term> - <listitem> - <para>Use the installed zlib library rather than building the - included version.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make tooldir=/usr</userinput></screen> - - <variablelist> - <title>The meaning of the make parameter:</title> - - <varlistentry> - <term><parameter>tooldir=/usr</parameter></term> - <listitem> - <para>Normally, the tooldir (the directory where the executables will - ultimately be located) is set to <filename - class="directory">$(exec_prefix)/$(target_alias)</filename>. For - example, x86_64 machines would expand that to <filename - class="directory">/usr/x86_64-unknown-linux-gnu</filename>. Because this is - a custom system, this target-specific directory in <filename - class="directory">/usr</filename> is not required. <filename - class="directory">$(exec_prefix)/$(target_alias)</filename> would be - used if the system was used to cross-compile (for example, compiling a - package on an Intel machine that generates code that can be executed - on PowerPC machines).</para> - </listitem> - </varlistentry> - - </variablelist> - - <important> - <para>The test suite for Binutils in this section is considered critical. - Do not skip it under any circumstances.</para> - </important> - - <para>Test the results:</para> - -<screen><userinput remap="test">make -k check</userinput></screen> - -<!-- <para>The ver_test_pr16504.sh test is known to fail.</para>--> - - <para>Install the package:</para> - -<screen><userinput remap="install">make tooldir=/usr install</userinput></screen> - - </sect2> - - <sect2 id="contents-binutils" role="content"> - <title>Contents of Binutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>addr2line, ar, as, c++filt, dwp, elfedit, gprof, ld, ld.bfd, ld.gold, nm, - objcopy, objdump, ranlib, readelf, size, strings, and strip</seg> - <seg>libbfd.{a,so} and libopcodes.{a,so}</seg> - <seg>/usr/lib/ldscripts</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="addr2line"> - <term><command>addr2line</command></term> - <listitem> - <para>Translates program addresses to file names and line numbers; - given an address and the name of an executable, it uses the debugging - information in the executable to determine which source file and line - number are associated with the address</para> - <indexterm zone="ch-system-binutils addr2line"> - <primary sortas="b-addr2line">addr2line</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ar"> - <term><command>ar</command></term> - <listitem> - <para>Creates, modifies, and extracts from archives</para> - <indexterm zone="ch-system-binutils ar"> - <primary sortas="b-ar">ar</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="as"> - <term><command>as</command></term> - <listitem> - <para>An assembler that assembles the output of <command>gcc</command> - into object files</para> - <indexterm zone="ch-system-binutils as"> - <primary sortas="b-as">as</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="c-filt"> - <term><command>c++filt</command></term> - <listitem> - <para>Used by the linker to de-mangle C++ and Java symbols and to keep - overloaded functions from clashing</para> - <indexterm zone="ch-system-binutils c-filt"> - <primary sortas="b-c++filt">c++filt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dwp"> - <term><command>dwp</command></term> - <listitem> - <para>The DWARF packaging utility</para> - <indexterm zone="ch-system-binutils dwp"> - <primary sortas="dwp">dwp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="elfedit"> - <term><command>elfedit</command></term> - <listitem> - <para>Updates the ELF header of ELF files</para> - <indexterm zone="ch-system-binutils elfedit"> - <primary sortas="b-elfedit">elfedit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gprof"> - <term><command>gprof</command></term> - <listitem> - <para>Displays call graph profile data</para> - <indexterm zone="ch-system-binutils gprof"> - <primary sortas="b-gprof">gprof</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ld"> - <term><command>ld</command></term> - <listitem> - <para>A linker that combines a number of object and archive files - into a single file, relocating their data and tying up symbol - references</para> - <indexterm zone="ch-system-binutils ld"> - <primary sortas="b-ld">ld</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ld.gold"> - <term><command>ld.gold</command></term> - <listitem> - <para>A cut down version of ld that only supports the - elf object file format</para> - <indexterm zone="ch-system-binutils ld.gold"> - <primary sortas="b-ld.gold">ld.gold</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ld.bfd"> - <term><command>ld.bfd</command></term> - <listitem> - <para>Hard link to <command>ld</command></para> - <indexterm zone="ch-system-binutils ld.bfd"> - <primary sortas="b-ld.bfd">ld.bfd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nm"> - <term><command>nm</command></term> - <listitem> - <para>Lists the symbols occurring in a given object file</para> - <indexterm zone="ch-system-binutils nm"> - <primary sortas="b-nm">nm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="objcopy"> - <term><command>objcopy</command></term> - <listitem> - <para>Translates one type of object file into another</para> - <indexterm zone="ch-system-binutils objcopy"> - <primary sortas="b-objcopy">objcopy</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="objdump"> - <term><command>objdump</command></term> - <listitem> - <para>Displays information about the given object file, with options - controlling the particular information to display; the information - shown is useful to programmers who are working on the compilation - tools</para> - <indexterm zone="ch-system-binutils objdump"> - <primary sortas="b-objdump">objdump</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ranlib"> - <term><command>ranlib</command></term> - <listitem> - <para>Generates an index of the contents of an archive and stores it - in the archive; the index lists all of the symbols defined by archive - members that are relocatable object files</para> - <indexterm zone="ch-system-binutils ranlib"> - <primary sortas="b-ranlib">ranlib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="readelf"> - <term><command>readelf</command></term> - <listitem> - <para>Displays information about ELF type binaries</para> - <indexterm zone="ch-system-binutils readelf"> - <primary sortas="b-readelf">readelf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="size"> - <term><command>size</command></term> - <listitem> - <para>Lists the section sizes and the total size for the given - object files</para> - <indexterm zone="ch-system-binutils size"> - <primary sortas="b-size">size</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="strings"> - <term><command>strings</command></term> - <listitem> - <para>Outputs, for each given file, the sequences of printable - characters that are of at least the specified length (defaulting to - four); for object files, it prints, by default, only the strings from - the initializing and loading sections while for other types of files, it - scans the entire file</para> - <indexterm zone="ch-system-binutils strings"> - <primary sortas="b-strings">strings</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="strip"> - <term><command>strip</command></term> - <listitem> - <para>Discards symbols from object files</para> - <indexterm zone="ch-system-binutils strip"> - <primary sortas="b-strip">strip</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libbfd"> - <term><filename class="libraryfile">libbfd</filename></term> - <listitem> - <para>The Binary File Descriptor library</para> - <indexterm zone="ch-system-binutils libbfd"> - <primary sortas="c-libbfd">libbfd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libctf"> - <term><filename class="libraryfile">libctf</filename></term> - <listitem> - <para>The Compat ANSI-C Type Format debugging support library</para> - <indexterm zone="ch-system-binutils libctf"> - <primary sortas="c-libctf">libctf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libctf-nobfd"> - <term><filename class="libraryfile">libctf-nobfd</filename></term> - <listitem> - <para>A libctf variant which does not use libbfd functionality</para> - <indexterm zone="ch-system-binutils libctf-nobfd"> - <primary sortas="c-libctf-nobfd">libctf-nobfd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libopcodes"> - <term><filename class="libraryfile">libopcodes</filename></term> - <listitem> - <para>A library for dealing with opcodes—the <quote>readable - text</quote> versions of instructions for the processor; - it is used for building utilities like - <command>objdump</command></para> - <indexterm zone="ch-system-binutils libopcodes"> - <primary sortas="c-libopcodes">libopcodes</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/bison.xml b/chapter06/bison.xml index 23b6f0a95..afe84a403 100644 --- a/chapter06/bison.xml +++ b/chapter06/bison.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-bison" role="wrap"> +<sect1 id="ch-tools-bison" role="wrap"> <?dbhtml filename="bison.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Bison-&bison-version;</title> - <indexterm zone="ch-system-bison"> + <indexterm zone="ch-tools-bison"> <primary sortas="a-Bison">Bison</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Bison package contains a parser generator.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/bison.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bison-ch6-sbu;</seg> - <seg>&bison-ch6-du;</seg> + <seg>&bison-ch5-sbu;</seg> + <seg>&bison-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -39,103 +42,40 @@ <sect2 role="installation"> <title>Installation of Bison</title> -<!-- - <para>First, fix a build problem with the current version:</para> -<screen><userinput remap="pre">sed -i '9327 s/mv/cp/' Makefile.in</userinput></screen> ---> <para>Prepare Bison for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen> -<!-- I could not find a race condidtion in the current version. - <para>Compile the package, but work around a race condition in the - current version:</para> + <variablelist> + <title>The meaning of the new configure option:</title> + + <varlistentry> + <term><parameter>--docdir=/usr/share/doc/bison-&bison-version;</parameter></term> + <listitem> + <para>This tells the build system to install bison documentation + into a versioned directory.</para> + </listitem> + </varlistentry> -<screen><userinput remap="make">make -j1</userinput></screen>--> + </variablelist> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results (about 5.5 SBU), issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Fourteen tests fail in the "Diagnostics" section, probably because of - missing locales.</para> - -<!-- - <para>There is a circular dependency between bison and flex with regard to - the checks. If desired, after installing flex in the next section, the - bison package can be rebuilt and the bison checks can be run with - <command>make check</command>.</para> ---> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> </sect2> - <sect2 id="contents-bison" role="content"> - <title>Contents of Bison</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>bison and yacc</seg> - <seg>liby.a</seg> - <seg>/usr/share/bison</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bison"> - <term><command>bison</command></term> - <listitem> - <para>Generates, from a series of rules, a program for analyzing the - structure of text files; Bison is a replacement for Yacc (Yet Another - Compiler Compiler)</para> - <indexterm zone="ch-system-bison bison"> - <primary sortas="b-bison">bison</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="yacc"> - <term><command>yacc</command></term> - <listitem> - <para>A wrapper for <command>bison</command>, meant for programs that - still call <command>yacc</command> instead of <command>bison</command>; - it calls <command>bison</command> with the <parameter>-y</parameter> - option</para> - <indexterm zone="ch-system-bison yacc"> - <primary sortas="b-yacc">yacc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="liby"> - <term><filename class="libraryfile">liby</filename></term> - <listitem> - <para>The Yacc library containing implementations of Yacc-compatible - <function>yyerror</function> and <function>main</function> functions; - this library is normally not very useful, but POSIX requires it</para> - <indexterm zone="ch-system-bison liby"> - <primary sortas="c-liby">liby</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-bison" role="."/></para> </sect2> diff --git a/chapter06/bzip2.xml b/chapter06/bzip2.xml index edf2f5bd4..828b7fc0f 100644 --- a/chapter06/bzip2.xml +++ b/chapter06/bzip2.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-bzip2" role="wrap"> +<sect1 id="ch-tools-bzip2" role="wrap"> <?dbhtml filename="bzip2.html"?> <sect1info condition="script"> @@ -16,25 +16,25 @@ <title>Bzip2-&bzip2-version;</title> - <indexterm zone="ch-system-bzip2"> + <indexterm zone="ch-tools-bzip2"> <primary sortas="a-Bzip2">Bzip2</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Bzip2 package contains programs for compressing and decompressing - files. Compressing text files with <command>bzip2</command> yields a much - better compression percentage than with the traditional - <command>gzip</command>.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter06/bzip2.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&bzip2-ch6-sbu;</seg> - <seg>&bzip2-ch6-du;</seg> + <seg>&bzip2-ch5-sbu;</seg> + <seg>&bzip2-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,11 +43,13 @@ <sect2 role="installation"> <title>Installation of Bzip2</title> - <para>Apply a patch that will install the documentation for this package:</para> + <para>Apply a patch that will install the documentation for this + package:</para> <screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen> - <para>The following command ensures installation of symbolic links are relative:</para> + <para>The following command ensures installation of symbolic links are + relative:</para> <screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen> @@ -55,9 +57,12 @@ <screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen> - <para>Prepare Bzip2 for compilation with:</para> + <para>The Bzip2 package does not contain a <command>configure</command> + script. There are two <filename>Makefile</filename>, one for the shared + library, and the other for the static library. Since we need both, We + do the compilation in two stages. First the shared library:</para> -<screen><userinput remap="make">make -f Makefile-libbz2_so +<screen><userinput remap="make">make CC=$LFS_TGT-gcc -f Makefile-libbz2_so make clean</userinput></screen> <variablelist> @@ -76,174 +81,31 @@ make clean</userinput></screen> </variablelist> - <para>Compile and test the package:</para> + <para>Compile and test the package with:</para> -<screen><userinput remap="make">make</userinput></screen> +<screen><userinput remap="make">make CC=$LFS_TGT-gcc AR=$LFS_TGT-ar RANLIB=$LFS_TGT-ranlib</userinput></screen> - <para>Install the programs:</para> + <para>Install the package:</para> -<screen><userinput remap="install">make PREFIX=/usr install</userinput></screen> +<screen><userinput remap="install">make PREFIX=$LFS/usr install</userinput></screen> <para>Install the shared <command>bzip2</command> binary into the - <filename class="directory">/bin</filename> directory, make - some necessary symbolic links, and clean up:</para> + <filename class="directory">/bin</filename> directory, make some necessary + symbolic links, and clean up:</para> -<screen><userinput remap="install">cp -v bzip2-shared /bin/bzip2 -cp -av libbz2.so* /lib +<screen><userinput remap="install">cp -v bzip2-shared $LFS/bin/bzip2 +cp -av libbz2.so* $LFS/lib ln -sv ../../lib/libbz2.so.1.0 $LFS/usr/lib/libbz2.so -rm -v /usr/bin/{bunzip2,bzcat,bzip2} -ln -sv bzip2 /bin/bunzip2 -ln -sv bzip2 /bin/bzcat</userinput></screen> +rm -v $LFS/usr/bin/{bunzip2,bzcat,bzip2} +ln -sv bzip2 $LFS/bin/bunzip2 +ln -sv bzip2 $LFS/bin/bzcat</userinput></screen> </sect2> - <sect2 id="contents-bzip2" role="content"> - <title>Contents of Bzip2</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp (link to - bzdiff), bzdiff, bzegrep (link to bzgrep), bzfgrep (link to bzgrep), - bzgrep, bzip2, bzip2recover, bzless (link to bzmore), and bzmore</seg> - <seg>libbz2.{a,so}</seg> - <seg>/usr/share/doc/bzip2-&bzip2-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bunzip2"> - <term><command>bunzip2</command></term> - <listitem> - <para>Decompresses bzipped files</para> - <indexterm zone="ch-system-bzip2 bunzip2"> - <primary sortas="b-bunzip2">bunzip2</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzcat"> - <term><command>bzcat</command></term> - <listitem> - <para>Decompresses to standard output</para> - <indexterm zone="ch-system-bzip2 bzcat"> - <primary sortas="b-bzcat">bzcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzcmp"> - <term><command>bzcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzcmp"> - <primary sortas="b-bzcmp">bzcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzdiff"> - <term><command>bzdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzdiff"> - <primary sortas="b-bzdiff">bzdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzegrep"> - <term><command>bzegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzegrep"> - <primary sortas="b-bzegrep">bzegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzfgrep"> - <term><command>bzfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzfgrep"> - <primary sortas="b-bzfgrep">bzfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzgrep"> - <term><command>bzgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzgrep"> - <primary sortas="b-bzgrep">bzgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzip2"> - <term><command>bzip2</command></term> - <listitem> - <para>Compresses files using the Burrows-Wheeler block sorting text - compression algorithm with Huffman coding; the compression rate is - better than that achieved by more conventional compressors using - <quote>Lempel-Ziv</quote> algorithms, like <command>gzip</command></para> - <indexterm zone="ch-system-bzip2 bzip2"> - <primary sortas="b-bzip2">bzip2</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzip2recover"> - <term><command>bzip2recover</command></term> - <listitem> - <para>Tries to recover data from damaged bzipped files</para> - <indexterm zone="ch-system-bzip2 bzip2recover"> - <primary sortas="b-bzip2recover">bzip2recover</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzless"> - <term><command>bzless</command></term> - <listitem> - <para>Runs <command>less</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzless"> - <primary sortas="b-bzless">bzless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="bzmore"> - <term><command>bzmore</command></term> - <listitem> - <para>Runs <command>more</command> on bzipped files</para> - <indexterm zone="ch-system-bzip2 bzmore"> - <primary sortas="b-bzmore">bzmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libbz2"> - <term><filename class="libraryfile">libbz2</filename></term> - <listitem> - <para>The library implementing lossless, block-sorting data - compression, using the Burrows-Wheeler algorithm</para> - <indexterm zone="ch-system-bzip2 libbz2"> - <primary sortas="c-libbz2">libbz2</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in + <xref linkend="contents-bzip2" role="."/></para> </sect2> diff --git a/chapter06/changingowner.xml b/chapter06/changingowner.xml new file mode 100644 index 000000000..43a902821 --- /dev/null +++ b/chapter06/changingowner.xml @@ -0,0 +1,41 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-changingowner"> + <?dbhtml filename="changingowner.html"?> + + <title>Changing Ownership</title> + + <note> + <para>The commands in the remainder of this book must be performed while + logged in as user <systemitem class="username">root</systemitem> and no + longer as user <systemitem class="username">lfs</systemitem>. Also, double + check that <envar>$LFS</envar> is set in <systemitem + class="username">root</systemitem>'s environment.</para> + </note> + + <para>Currently, the whole directory hierarchy in <filename + class="directory">$LFS</filename> + is owned by the user <systemitem class="username">lfs</systemitem>, a user + that exists only on the host system. If the directories under <filename + class="directory">$LFS</filename> are kept as they are, the files are + owned by a user ID without a corresponding account. This is dangerous because + a user account created later could get this same user ID and would own all + the files under <filename class="directory">$LFS</filename>, thus exposing + these files to possible malicious manipulation.</para> + + <para>To avoid this issue, you could add the <systemitem + class="username">lfs</systemitem> user to the new LFS system later when + creating the <filename>/etc/passwd</filename> file, taking care to assign it + the same user and group IDs as on the host system. Better yet, change the + ownership of the <filename class="directory">$LFS/*</filename> directories to + user <systemitem class="username">root</systemitem> by running the following + command:</para> + +<screen><userinput>chown -R root:root $LFS/{usr,lib,var,etc,bin,sbin,lib64,tools}</userinput></screen> + +</sect1> diff --git a/chapter06/chapter06.xml b/chapter06/chapter06.xml index 7fc83b374..eadff3cf7 100644 --- a/chapter06/chapter06.xml +++ b/chapter06/chapter06.xml @@ -5,101 +5,30 @@ %general-entities; ]> -<chapter id="chapter-building-system" xreflabel="Chapter 6"> +<chapter id="chapter-temporary-tools" xreflabel="Chapter 6"> <?dbhtml dir="chapter06"?> <?dbhtml filename="chapter06.html"?> - <title>Installing Basic System Software</title> + <title>Cross Compiling Temporary Tools</title> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/> -<!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/>--> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/> -<!-- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/>--> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> - - <!-- systemd only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> - - <!-- sysv only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> - - <!-- Both sysv on systemd builds --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> - - <!-- Both sysv and systemd builds --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/> - - <!-- sysv only --> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="changingowner.xml"/> </chapter> diff --git a/chapter06/check.xml b/chapter06/check.xml deleted file mode 100644 index bd4306b28..000000000 --- a/chapter06/check.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-check" role="wrap"> - <?dbhtml filename="check.html"?> - - <sect1info condition="script"> - <productname>check</productname> - <productnumber>&check-version;</productnumber> - <address>&check-url;</address> - </sect1info> - - <title>Check-&check-version;</title> - - <indexterm zone="ch-system-check"> - <primary sortas="a-Check">Check</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>Check is a unit testing framework for C.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&check-ch5-sbu;</seg> - <seg>&check-ch5-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Check</title> - - <para>Prepare Check for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Build the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Compilation is now complete. To run the Check test suite, issue the - following command:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Note that the Check test suite may take a relatively long - (up to 4 SBU) time.</para> - - <para>Install the package:</para> - - <screen><userinput remap="install">make docdir=/usr/share/doc/check-&check-version; install</userinput></screen> - - </sect2> - - <sect2 id="contents-check" role="content"> - <title>Contents of Check</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>checkmk</seg> - <seg>libcheck.{a,so}</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="checkmk"> - <term><command>checkmk</command></term> - <listitem> - <para>Awk script for generating C unit tests for use with the Check - unit testing framework</para> - <indexterm zone="ch-system-check checkmk"> - <primary sortas="b-checmk">checkmk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcheck"> - <term><filename class="libraryfile">libcheck.{a,so}</filename></term> - <listitem> - <para>Contains functions that allow Check to be called from a test - program</para> - <indexterm zone="ch-system-check libcheck"> - <primary sortas="c-libcheck">libcheck</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/chroot.xml b/chapter06/chroot.xml new file mode 100644 index 000000000..5b6310af7 --- /dev/null +++ b/chapter06/chroot.xml @@ -0,0 +1,65 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-chroot"> + <?dbhtml filename="chroot.html"?> + + <title>Entering the Chroot Environment</title> + + <para>Now that all the packages which depend on themselves for being built + are on the system, it is time to enter the chroot environment to finish + installing the remaining temporary tools. This environment will be in use + also for installing the final system. As user <systemitem + class="username">root</systemitem>, run the following command to enter the + realm that is, at the moment, populated with only the temporary tools:</para> + +<screen role="nodump"><userinput>chroot "$LFS" /usr/bin/env -i \ + HOME=/root \ + TERM="$TERM" \ + PS1='(lfs chroot) \u:\w\$ ' \ + PATH=/bin:/usr/bin:/sbin:/usr/sbin \ + /bin/bash --login +h</userinput></screen> + + <para>The <parameter>-i</parameter> option given to the <command>env</command> + command will clear all variables of the chroot environment. After that, only + the <envar>HOME</envar>, <envar>TERM</envar>, <envar>PS1</envar>, and + <envar>PATH</envar> variables are set again. The + <parameter>TERM=$TERM</parameter> construct will set the <envar>TERM</envar> + variable inside chroot to the same value as outside chroot. This variable is + needed for programs like <command>vim</command> and <command>less</command> + to operate properly. If other variables are needed, such as + <envar>CFLAGS</envar> or <envar>CXXFLAGS</envar>, this is a good place to set + them again.</para> + + <para>From this point on, there is no need to use the + <envar>LFS</envar> variable anymore, because all work will be restricted + to the LFS file system. This is because the Bash shell is told that + <filename class="directory">$LFS</filename> is now the root + (<filename class="directory">/</filename>) directory.</para> + + <para>Notice that <filename class="directory">/tools/bin</filename> is not + anymore in the <envar>PATH</envar>. This means that a temporary tool will no longer be + used once its final version is installed. This occurs when the shell does not + <quote>remember</quote> the locations of executed binaries—for this + reason, hashing is switched off by passing the <parameter>+h</parameter> option + to <command>bash</command>.</para> + + <para>Note that the <command>bash</command> prompt will say + <computeroutput>I have no name!</computeroutput> This is normal because the + <filename>/etc/passwd</filename> file has not been created yet.</para> + + <note> + <para>It is important that all the commands throughout the remainder of this + chapter and the following chapters are run from within the chroot + environment. If you leave this environment for any reason (rebooting for + example), ensure that the virtual kernel filesystems are mounted as + explained in <xref linkend="ch-system-bindmount"/> and <xref + linkend="ch-system-kernfsmount"/> and enter chroot again before continuing + with the installation.</para> + </note> + +</sect1> diff --git a/chapter06/coreutils.xml b/chapter06/coreutils.xml index 5a4079d78..378abebff 100644 --- a/chapter06/coreutils.xml +++ b/chapter06/coreutils.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-coreutils" role="wrap"> +<sect1 id="ch-tools-coreutils" role="wrap"> <?dbhtml filename="coreutils.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Coreutils-&coreutils-version;</title> - <indexterm zone="ch-system-coreutils"> + <indexterm zone="ch-tools-coreutils"> <primary sortas="a-Coreutils">Coreutils</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Coreutils package contains utilities for showing and setting the - basic system characteristics.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/coreutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&coreutils-ch6-sbu;</seg> - <seg>&coreutils-ch6-du;</seg> + <seg>&coreutils-ch5-sbu;</seg> + <seg>&coreutils-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -41,59 +43,23 @@ <sect2 role="installation"> <title>Installation of Coreutils</title> - <para>POSIX requires that programs from Coreutils recognize character - boundaries correctly even in multibyte locales. The following patch fixes - this non-compliance and other internationalization-related bugs.</para> + <para>Prepare Coreutils for compilation:</para> -<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen> - - <note> - <para>In the past, many bugs were found in this patch. When reporting new - bugs to Coreutils maintainers, please check first if they are reproducible - without this patch.</para> - </note> - - <!-- this has been fixed in upstream gnulib, when a new version of - coreutils is released, please check #4055 to see if the change has been - picked up in this package --> - <para>Suppress a test which on some machines can loop forever:</para> - -<screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen> - - <para>Now prepare Coreutils for compilation:</para> - -<screen><userinput remap="configure">autoreconf -fiv -FORCE_UNSAFE_CONFIGURE=1 ./configure \ - --prefix=/usr \ +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ + --enable-install-program=hostname \ --enable-no-install-program=kill,uptime</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> <varlistentry> - <term><command>autoreconf</command></term> - <listitem> - <para>This command updates generated configuration files - consistent with the latest version of automake. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> - <listitem> - <para>This environment variable allows the package to be - built as the root user. - </para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-no-install-program=kill,uptime</parameter></term> + <term><envar>--enable-install-program=hostname</envar></term> <listitem> - <para>The purpose of this switch is to prevent Coreutils from - installing binaries that will be installed by other packages later. - </para> + <para>This enables the <command>hostname</command> binary to be built + and installed – it is disabled by default but is required by the + Perl test suite.</para> </listitem> </varlistentry> </variablelist> @@ -102,1185 +68,37 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \ <screen><userinput remap="make">make</userinput></screen> - <para>Skip down to <quote>Install the - package</quote> if not running the test suite.</para> - - <para>Now the test suite is ready to be run. First, run the tests that are - meant to be run as user <systemitem class="username">root</systemitem>:</para> - -<screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen> - - <para>We're going to run the remainder of the tests as the - <systemitem class="username">tester</systemitem> user. Certain tests, - however, require that the user be a member of more than one group. So that - these tests are not skipped we'll add a temporary group and make the - user <systemitem class="username">tester</systemitem> a part of it:</para> - -<screen><userinput remap="test">echo "dummy:x:102:tester" >> /etc/group</userinput></screen> - - <para>Fix some of the permissions so that the non-root user can compile and - run the tests:</para> - -<screen><userinput remap="test">chown -Rv tester . </userinput></screen> - - <para>Now run the tests:</para> - -<screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen> -<!-- - <para>The test program test-getlogin is known to fail in a - partially built system environment like the chroot environment here, but - passes if run at the end of this chapter. The test program tty.sh is - also known to fail.</para> ---> - - <para>Remove the temporary group:</para> - -<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> - - <para>Move programs to the locations specified by the FHS:</para> - -<screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin -mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin -mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin -mv -v /usr/bin/chroot /usr/sbin -mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 -sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen> - - <para revision="sysv">Some of the scripts in the LFS-Bootscripts package - depend on <command>head</command>, <command>nice</command>, - <command>sleep</command>, and <command>touch</command>. As <filename - class="directory">/usr</filename> may not be available during the early and - late stages of booting, those binaries need to be on the root partition to - maintain FHS compliance:</para> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> +<!-- + <para>The above command refuses to install <filename>su</filename> + because the program cannot be installed setuid root as a non-privileged + user. By manually installing it, we can use it for running tests in the + final system as a non-privileged user. Install it with:</para> -<screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen> +<screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen> +--> + <para>Move programs to their final expected locations. Although this is + not necessary in this temporary environment, we must do so because some + programs harcode executable locations:</para> + +<screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin +mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin +mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin +mv -v $LFS/usr/bin/chroot $LFS/usr/sbin +mkdir -pv $LFS/usr/share/man/man8 +mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8 +sed -i s/\"1\"/\"8\"/1 $LFS/usr/share/man/man8/chroot.8 +mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin</userinput></screen> </sect2> - <sect2 id="contents-coreutils" role="content"> - <title>Contents of Coreutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>[, b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown, - chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, - dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, - head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir, - mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, - pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, - rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, - sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, - sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, - tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and - yes</seg> - <seg>libstdbuf.so (in /usr/libexec/coreutils)</seg> - <seg>/usr/libexec/coreutils</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="base32"> - <term><command>base32</command></term> - <listitem> - <para>Encodes and decodes data according to the base32 specification - (RFC 4648)</para> - <indexterm zone="ch-system-coreutils base64"> - <primary sortas="b-base64">base64</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="base64"> - <term><command>base64</command></term> - <listitem> - <para>Encodes and decodes data according to the base64 specification - (RFC 4648)</para> - <indexterm zone="ch-system-coreutils base64"> - <primary sortas="b-base64">base64</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="b2sum"> - <term><command>b2sum</command></term> - <listitem> - <para>Prints or checks BLAKE2 (512-bit) checksums</para> - <indexterm zone="ch-system-coreutils b2sum"> - <primary sortas="b-b2sum">b2sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="basename"> - <term><command>basename</command></term> - <listitem> - <para>Strips any path and a given suffix from a file name</para> - <indexterm zone="ch-system-coreutils basename"> - <primary sortas="b-basename">basename</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="basenc"> - <term><command>basenc</command></term> - <listitem> - <para>Encodes or decodes data using various algorithms</para> - <indexterm zone="ch-system-coreutils basenc"> - <primary sortas="b-basenc">basenc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cat"> - <term><command>cat</command></term> - <listitem> - <para>Concatenates files to standard output</para> - <indexterm zone="ch-system-coreutils cat"> - <primary sortas="b-cat">cat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chcon"> - <term><command>chcon</command></term> - <listitem> - <para>Changes security context for files and directories</para> - <indexterm zone="ch-system-coreutils chcon"> - <primary sortas="b-chcon">chcon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chgrp"> - <term><command>chgrp</command></term> - <listitem> - <para>Changes the group ownership of files and directories</para> - <indexterm zone="ch-system-coreutils chgrp"> - <primary sortas="b-chgrp">chgrp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chmod"> - <term><command>chmod</command></term> - <listitem> - <para>Changes the permissions of each file to the given mode; the mode - can be either a symbolic representation of the changes to make or an - octal number representing the new permissions</para> - <indexterm zone="ch-system-coreutils chmod"> - <primary sortas="b-chmod">chmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chown"> - <term><command>chown</command></term> - <listitem> - <para>Changes the user and/or group ownership of files and - directories</para> - <indexterm zone="ch-system-coreutils chown"> - <primary sortas="b-chown">chown</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chroot"> - <term><command>chroot</command></term> - <listitem> - <para>Runs a command with the specified directory as the - <filename class="directory">/</filename> directory</para> - <indexterm zone="ch-system-coreutils chroot"> - <primary sortas="b-chroot">chroot</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cksum"> - <term><command>cksum</command></term> - <listitem> - <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte - counts of each specified file</para> - <indexterm zone="ch-system-coreutils cksum"> - <primary sortas="b-cksum">cksum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="comm"> - <term><command>comm</command></term> - <listitem> - <para>Compares two sorted files, outputting in three columns the lines - that are unique and the lines that are common</para> - <indexterm zone="ch-system-coreutils comm"> - <primary sortas="b-comm">comm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cp"> - <term><command>cp</command></term> - <listitem> - <para>Copies files</para> - <indexterm zone="ch-system-coreutils cp"> - <primary sortas="b-cp">cp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="csplit"> - <term><command>csplit</command></term> - <listitem> - <para>Splits a given file into several new files, separating them - according to given patterns or line numbers and outputting the byte - count of each new file</para> - <indexterm zone="ch-system-coreutils csplit"> - <primary sortas="b-csplit">csplit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cut"> - <term><command>cut</command></term> - <listitem> - <para>Prints sections of lines, selecting the parts according to given - fields or positions</para> - <indexterm zone="ch-system-coreutils cut"> - <primary sortas="b-cut">cut</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="date"> - <term><command>date</command></term> - <listitem> - <para>Displays the current time in the given format, or sets the - system date</para> - <indexterm zone="ch-system-coreutils date"> - <primary sortas="b-date">date</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dd"> - <term><command>dd</command> </term> - <listitem> - <para>Copies a file using the given block size and count, while - optionally performing conversions on it</para> - <indexterm zone="ch-system-coreutils dd"> - <primary sortas="b-dd">dd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="df"> - <term><command>df</command></term> - <listitem> - <para>Reports the amount of disk space available (and used) on all - mounted file systems, or only on the file systems holding the selected - files</para> - <indexterm zone="ch-system-coreutils df"> - <primary sortas="b-df">df</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dir"> - <term><command>dir</command></term> - <listitem> - <para>Lists the contents of each given directory (the same as - the <command>ls</command> command)</para> - <indexterm zone="ch-system-coreutils dir"> - <primary sortas="b-dir">dir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dircolors"> - <term><command>dircolors</command></term> - <listitem> - <para>Outputs commands to set the <envar>LS_COLOR</envar> - environment variable to change the color scheme used by - <command>ls</command></para> - <indexterm zone="ch-system-coreutils dircolors"> - <primary sortas="b-dircolors">dircolors</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dirname"> - <term><command>dirname</command></term> - <listitem> - <para>Strips the non-directory suffix from a file name</para> - <indexterm zone="ch-system-coreutils dirname"> - <primary sortas="b-dirname">dirname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="du"> - <term><command>du</command></term> - <listitem> - <para>Reports the amount of disk space used by the current directory, - by each of the given directories (including all subdirectories) or by - each of the given files</para> - <indexterm zone="ch-system-coreutils du"> - <primary sortas="b-du">du</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="echo"> - <term><command>echo</command></term> - <listitem> - <para>Displays the given strings</para> - <indexterm zone="ch-system-coreutils echo"> - <primary sortas="b-echo">echo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="env"> - <term><command>env</command></term> - <listitem> - <para>Runs a command in a modified environment</para> - <indexterm zone="ch-system-coreutils env"> - <primary sortas="b-env">env</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="expand"> - <term><command>expand</command></term> - <listitem> - <para>Converts tabs to spaces</para> - <indexterm zone="ch-system-coreutils expand"> - <primary sortas="b-expand">expand</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="expr"> - <term><command>expr</command></term> - <listitem> - <para>Evaluates expressions</para> - <indexterm zone="ch-system-coreutils expr"> - <primary sortas="b-expr">expr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="factor"> - <term><command>factor</command></term> - <listitem> - <para>Prints the prime factors of all specified integer numbers</para> - <indexterm zone="ch-system-coreutils factor"> - <primary sortas="b-factor">factor</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="false"> - <term><command>false</command></term> - <listitem> - <para>Does nothing, unsuccessfully; it always exits with a status code - indicating failure</para> - <indexterm zone="ch-system-coreutils false"> - <primary sortas="b-false">false</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fmt"> - <term><command>fmt</command></term> - <listitem> - <para>Reformats the paragraphs in the given files</para> - <indexterm zone="ch-system-coreutils fmt"> - <primary sortas="b-fmt">fmt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fold"> - <term><command>fold</command></term> - <listitem> - <para>Wraps the lines in the given files</para> - <indexterm zone="ch-system-coreutils fold"> - <primary sortas="b-fold">fold</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groups"> - <term><command>groups</command></term> - <listitem> - <para>Reports a user's group memberships</para> - <indexterm zone="ch-system-coreutils groups"> - <primary sortas="b-groups">groups</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="head"> - <term><command>head</command></term> - <listitem> - <para>Prints the first ten lines (or the given number of lines) - of each given file</para> - <indexterm zone="ch-system-coreutils head"> - <primary sortas="b-head">head</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hostid"> - <term><command>hostid</command></term> - <listitem> - <para>Reports the numeric identifier (in hexadecimal) of the host</para> - <indexterm zone="ch-system-coreutils hostid"> - <primary sortas="b-hostid">hostid</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="id"> - <term><command>id</command></term> - <listitem> - <para>Reports the effective user ID, group ID, and group memberships - of the current user or specified user</para> - <indexterm zone="ch-system-coreutils id"> - <primary sortas="b-id">id</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="install"> - <term><command>install</command> </term> - <listitem> - <para>Copies files while setting their permission modes and, if - possible, their owner and group</para> - <indexterm zone="ch-system-coreutils install"> - <primary sortas="b-install">install</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="join"> - <term><command>join</command></term> - <listitem> - <para>Joins the lines that have identical join fields from two - separate files</para> - <indexterm zone="ch-system-coreutils join"> - <primary sortas="b-join">join</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="link"> - <term><command>link</command></term> - <listitem> - <para>Creates a hard link with the given name to a file</para> - <indexterm zone="ch-system-coreutils link"> - <primary sortas="b-link">link</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ln"> - <term><command>ln</command></term> - <listitem> - <para>Makes hard links or soft (symbolic) links between files</para> - <indexterm zone="ch-system-coreutils ln"> - <primary sortas="b-ln">ln</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="logname"> - <term><command>logname</command></term> - <listitem> - <para>Reports the current user's login name</para> - <indexterm zone="ch-system-coreutils logname"> - <primary sortas="b-logname">logname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ls"> - <term><command>ls</command></term> - <listitem> - <para>Lists the contents of each given directory</para> - <indexterm zone="ch-system-coreutils ls"> - <primary sortas="b-ls">ls</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="md5sum"> - <term><command>md5sum</command></term> - <listitem> - <para>Reports or checks Message Digest 5 (MD5) checksums</para> - <indexterm zone="ch-system-coreutils md5sum"> - <primary sortas="b-md5sum">md5sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkdir"> - <term><command>mkdir</command></term> - <listitem> - <para>Creates directories with the given names</para> - <indexterm zone="ch-system-coreutils mkdir"> - <primary sortas="b-mkdir">mkdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfifo"> - <term><command>mkfifo</command></term> - <listitem> - <para>Creates First-In, First-Outs (FIFOs), a "named - pipe" in UNIX parlance, with the given names</para> - <indexterm zone="ch-system-coreutils mkfifo"> - <primary sortas="b-mkfifo">mkfifo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mknod"> - <term><command>mknod</command></term> - <listitem> - <para>Creates device nodes with the given names; a device node is a - character special file, a block special file, or a FIFO</para> - <indexterm zone="ch-system-coreutils mknod"> - <primary sortas="b-mknod">mknod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mktemp"> - <term><command>mktemp</command></term> - <listitem> - <para>Creates temporary files in a secure manner; it is used in scripts</para> - <indexterm zone="ch-system-coreutils mktemp"> - <primary sortas="b-mktemp">mktemp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mv"> - <term><command>mv</command></term> - <listitem> - <para>Moves or renames files or directories</para> - <indexterm zone="ch-system-coreutils mv"> - <primary sortas="b-mv">mv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nice"> - <term><command>nice</command></term> - <listitem> - <para>Runs a program with modified scheduling priority</para> - <indexterm zone="ch-system-coreutils nice"> - <primary sortas="b-nice">nice</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nl"> - <term><command>nl</command></term> - <listitem> - <para>Numbers the lines from the given files</para> - <indexterm zone="ch-system-coreutils nl"> - <primary sortas="b-nl">nl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nohup"> - <term><command>nohup</command></term> - <listitem> - <para>Runs a command immune to hangups, with its output redirected to - a log file</para> - <indexterm zone="ch-system-coreutils nohup"> - <primary sortas="b-nohup">nohup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nproc"> - <term><command>nproc</command></term> - <listitem> - <para>Prints the number of processing units available to a - process</para> - <indexterm zone="ch-system-coreutils nproc"> - <primary sortas="b-nproc">nproc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="numfmt"> - <term><command>numfmt</command></term> - <listitem> - <para>Converts numbers to or from human-readable strings</para> - <indexterm zone="ch-system-coreutils numfmt"> - <primary sortas="b-numfmt">numfmt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="od"> - <term><command>od</command></term> - <listitem> - <para>Dumps files in octal and other formats</para> - <indexterm zone="ch-system-coreutils od"> - <primary sortas="b-od">od</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="paste"> - <term><command>paste</command></term> - <listitem> - <para>Merges the given files, joining sequentially corresponding lines - side by side, separated by tab characters</para> - <indexterm zone="ch-system-coreutils paste"> - <primary sortas="b-paste">paste</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pathchk"> - <term><command>pathchk</command></term> - <listitem> - <para>Checks if file names are valid or portable</para> - <indexterm zone="ch-system-coreutils pathchk"> - <primary sortas="b-pathchk">pathchk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pinky"> - <term><command>pinky</command></term> - <listitem> - <para>Is a lightweight finger client; it reports some information - about the given users</para> - <indexterm zone="ch-system-coreutils pinky"> - <primary sortas="b-pinky">pinky</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pr"> - <term><command>pr</command></term> - <listitem> - <para>Paginates and columnates files for printing</para> - <indexterm zone="ch-system-coreutils pr"> - <primary sortas="b-pr">pr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="printenv"> - <term><command>printenv</command></term> - <listitem> - <para>Prints the environment</para> - <indexterm zone="ch-system-coreutils printenv"> - <primary sortas="b-printenv">printenv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="printf"> - <term><command>printf</command></term> - <listitem> - <para>Prints the given arguments according to the given format, much - like the C printf function</para> - <indexterm zone="ch-system-coreutils printf"> - <primary sortas="b-printf">printf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ptx"> - <term><command>ptx</command></term> - <listitem> - <para>Produces a permuted index from the contents of the given files, - with each keyword in its context</para> - <indexterm zone="ch-system-coreutils ptx"> - <primary sortas="b-ptx">ptx</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pwd"> - <term><command>pwd</command></term> - <listitem> - <para>Reports the name of the current working directory</para> - <indexterm zone="ch-system-coreutils pwd"> - <primary sortas="b-pwd">pwd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="readlink"> - <term><command>readlink</command></term> - <listitem> - <para>Reports the value of the given symbolic link</para> - <indexterm zone="ch-system-coreutils readlink"> - <primary sortas="b-readlink">readlink</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="realpath"> - <term><command>realpath</command></term> - <listitem> - <para>Prints the resolved path</para> - <indexterm zone="ch-system-coreutils realpath"> - <primary sortas="b-realpath">realpath</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rm"> - <term><command>rm</command></term> - <listitem> - <para>Removes files or directories</para> - <indexterm zone="ch-system-coreutils rm"> - <primary sortas="b-rm">rm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rmdir"> - <term><command>rmdir</command></term> - <listitem> - <para>Removes directories if they are empty</para> - <indexterm zone="ch-system-coreutils rmdir"> - <primary sortas="b-rmdir">rmdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="runcon"> - <term><command>runcon</command></term> - <listitem> - <para>Runs a command with specified security context</para> - <indexterm zone="ch-system-coreutils runcon"> - <primary sortas="b-runcon">runcon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="seq"> - <term><command>seq</command></term> - <listitem> - <para>Prints a sequence of numbers within a given range and with a - given increment</para> - <indexterm zone="ch-system-coreutils seq"> - <primary sortas="b-seq">seq</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha1sum"> - <term><command>sha1sum</command></term> - <listitem> - <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) - checksums</para> - <indexterm zone="ch-system-coreutils sha1sum"> - <primary sortas="b-sha1sum">sha1sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha224sum"> - <term><command>sha224sum</command></term> - <listitem> - <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha224sum"> - <primary sortas="b-sha224sum">sha224sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha256sum"> - <term><command>sha256sum</command></term> - <listitem> - <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha256sum"> - <primary sortas="b-sha256sum">sha256sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha384sum"> - <term><command>sha384sum</command></term> - <listitem> - <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha384sum"> - <primary sortas="b-sha384sum">sha384sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sha512sum"> - <term><command>sha512sum</command></term> - <listitem> - <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para> - <indexterm zone="ch-system-coreutils sha512sum"> - <primary sortas="b-sha512sum">sha512sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shred"> - <term><command>shred</command></term> - <listitem> - <para>Overwrites the given files repeatedly with complex patterns, - making it difficult to recover the data</para> - <indexterm zone="ch-system-coreutils shred"> - <primary sortas="b-shred">shred</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shuf"> - <term><command>shuf</command></term> - <listitem> - <para>Shuffles lines of text</para> - <indexterm zone="ch-system-coreutils shuf"> - <primary sortas="b-shuf">shuf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sleep"> - <term><command>sleep</command></term> - <listitem> - <para>Pauses for the given amount of time</para> - <indexterm zone="ch-system-coreutils sleep"> - <primary sortas="b-sleep">sleep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sort"> - <term><command>sort</command></term> - <listitem> - <para>Sorts the lines from the given files</para> - <indexterm zone="ch-system-coreutils sort"> - <primary sortas="b-sort">sort</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="split"> - <term><command>split</command></term> - <listitem> - <para>Splits the given file into pieces, by size or by number of - lines</para> - <indexterm zone="ch-system-coreutils split"> - <primary sortas="b-split">split</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="stat"> - <term><command>stat</command></term> - <listitem> - <para>Displays file or filesystem status</para> - <indexterm zone="ch-system-coreutils stat"> - <primary sortas="b-stat">stat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="stdbuf"> - <term><command>stdbuf</command></term> - <listitem> - <para>Runs commands with altered buffering operations for its standard - streams</para> - <indexterm zone="ch-system-coreutils stdbuf"> - <primary sortas="b-stdbuf">stdbuf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="stty"> - <term><command>stty</command></term> - <listitem> - <para>Sets or reports terminal line settings</para> - <indexterm zone="ch-system-coreutils stty"> - <primary sortas="b-stty">stty</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sum"> - <term><command>sum</command></term> - <listitem> - <para>Prints checksum and block counts for each given file</para> - <indexterm zone="ch-system-coreutils sum"> - <primary sortas="b-sum">sum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sync"> - <term><command>sync</command></term> - <listitem> - <para>Flushes file system buffers; it forces changed blocks to disk - and updates the super block</para> - <indexterm zone="ch-system-coreutils sync"> - <primary sortas="b-sync">sync</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tac"> - <term><command>tac</command></term> - <listitem> - <para>Concatenates the given files in reverse</para> - <indexterm zone="ch-system-coreutils tac"> - <primary sortas="b-tac">tac</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tail"> - <term><command>tail</command></term> - <listitem> - <para>Prints the last ten lines (or the given number of lines) of each - given file</para> - <indexterm zone="ch-system-coreutils tail"> - <primary sortas="b-tail">tail</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tee"> - <term><command>tee</command></term> - <listitem> - <para>Reads from standard input while writing both to standard output - and to the given files</para> - <indexterm zone="ch-system-coreutils tee"> - <primary sortas="b-tee">tee</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="test"> - <term><command>test</command></term> - <listitem> - <para>Compares values and checks file types</para> - <indexterm zone="ch-system-coreutils test"> - <primary sortas="b-test">test</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="timeout"> - <term><command>timeout</command></term> - <listitem> - <para>Runs a command with a time limit</para> - <indexterm zone="ch-system-coreutils timeout"> - <primary sortas="b-timeout">timeout</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="touch"> - <term><command>touch</command></term> - <listitem> - <para>Changes file timestamps, setting the access and modification - times of the given files to the current time; files that do not exist - are created with zero length</para> - <indexterm zone="ch-system-coreutils touch"> - <primary sortas="b-touch">touch</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tr"> - <term><command>tr</command></term> - <listitem> - <para>Translates, squeezes, and deletes the given characters from - standard input</para> - <indexterm zone="ch-system-coreutils tr"> - <primary sortas="b-tr">tr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="true"> - <term><command>true</command></term> - <listitem> - <para>Does nothing, successfully; it always exits with a status code - indicating success</para> - <indexterm zone="ch-system-coreutils true"> - <primary sortas="b-true">true</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="truncate"> - <term><command>truncate</command></term> - <listitem> - <para>Shrinks or expands a file to the specified size</para> - <indexterm zone="ch-system-coreutils truncate"> - <primary sortas="b-truncate">truncate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tsort"> - <term><command>tsort</command></term> - <listitem> - <para>Performs a topological sort; it writes a completely ordered list - according to the partial ordering in a given file</para> - <indexterm zone="ch-system-coreutils tsort"> - <primary sortas="b-tsort">tsort</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tty"> - <term><command>tty</command></term> - <listitem> - <para>Reports the file name of the terminal connected to standard - input</para> - <indexterm zone="ch-system-coreutils tty"> - <primary sortas="b-tty">tty</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uname"> - <term><command>uname</command></term> - <listitem> - <para>Reports system information</para> - <indexterm zone="ch-system-coreutils uname"> - <primary sortas="b-uname">uname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unexpand"> - <term><command>unexpand</command></term> - <listitem> - <para>Converts spaces to tabs</para> - <indexterm zone="ch-system-coreutils unexpand"> - <primary sortas="b-unexpand">unexpand</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uniq"> - <term><command>uniq</command></term> - <listitem> - <para>Discards all but one of successive identical lines</para> - <indexterm zone="ch-system-coreutils uniq"> - <primary sortas="b-uniq">uniq</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unlink"> - <term><command>unlink</command></term> - <listitem> - <para>Removes the given file</para> - <indexterm zone="ch-system-coreutils unlink"> - <primary sortas="b-unlink">unlink</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="users"> - <term><command>users</command></term> - <listitem> - <para>Reports the names of the users currently logged on</para> - <indexterm zone="ch-system-coreutils users"> - <primary sortas="b-users">users</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vdir"> - <term><command>vdir</command></term> - <listitem> - <para>Is the same as <command>ls -l</command></para> - <indexterm zone="ch-system-coreutils vdir"> - <primary sortas="b-vdir">vdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="wc"> - <term><command>wc</command></term> - <listitem> - <para>Reports the number of lines, words, and bytes for each given - file, as well as a total line when more than one file is given</para> - <indexterm zone="ch-system-coreutils wc"> - <primary sortas="b-wc">wc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="who"> - <term><command>who</command></term> - <listitem> - <para>Reports who is logged on</para> - <indexterm zone="ch-system-coreutils who"> - <primary sortas="b-who">who</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="whoami"> - <term><command>whoami</command></term> - <listitem> - <para>Reports the user name associated with the current effective - user ID</para> - <indexterm zone="ch-system-coreutils whoami"> - <primary sortas="b-whoami">whoami</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="yes"> - <term><command>yes</command></term> - <listitem> - <para>Repeatedly outputs <quote>y</quote> or a given string until - killed</para> - <indexterm zone="ch-system-coreutils yes"> - <primary sortas="b-yes">yes</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libstdbuf"> - <term><filename class="libraryfile">libstdbuf</filename></term> - <listitem> - <para>Library used by <command>stdbuf</command></para> - <indexterm zone="ch-system-coreutils libstdbuf"> - <primary sortas="c-libstdbuf">libstdbuf</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-coreutils" role="."/></para> </sect2> diff --git a/chapter06/createfiles.xml b/chapter06/createfiles.xml new file mode 100644 index 000000000..aed8d79da --- /dev/null +++ b/chapter06/createfiles.xml @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-createfiles"> + <?dbhtml filename="createfiles.html"?> + + <title>Creating Essential Files and Symlinks</title> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/etc/passwd">/etc/passwd</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/etc/group">/etc/group</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/log/btmp">/var/log/btmp</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary> + </indexterm> + + <indexterm zone="ch-tools-createfiles"> + <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary> + </indexterm> + + <para>Historically, Linux maintains a list of the mounted file systems in the + file <filename>/etc/mtab</filename>. Modern kernels maintain this list + internally and exposes it to the user via the <filename + class="directory">/proc</filename> filesystem. To satisfy utilities that + expect the presence of <filename>/etc/mtab</filename>, create the following + symbolic link:</para> + +<screen><userinput>ln -sv /proc/self/mounts /etc/mtab</userinput></screen> + + <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 revision="sysv"><userinput>cat > /etc/passwd << "EOF" +<literal>root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/bin/false +daemon:x:6:6:Daemon User:/dev/null:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> +EOF</userinput></screen> + +<screen revision="systemd"><userinput>cat > /etc/passwd << "EOF" +<literal>root:x:0:0:root:/root:/bin/bash +bin:x:1:1:bin:/dev/null:/bin/false +daemon:x:6:6:Daemon User:/dev/null:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false +systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false +systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false +systemd-journal-upload:x:75:75:systemd Journal Upload:/:/bin/false +systemd-network:x:76:76:systemd Network Management:/:/bin/false +systemd-resolve:x:77:77:systemd Resolver:/:/bin/false +systemd-timesync:x:78:78:systemd Time Synchronization:/:/bin/false +systemd-coredump:x:79:79:systemd Core Dumper:/:/bin/false +nobody:x:99:99:Unprivileged User:/dev/null:/bin/false</literal> +EOF</userinput></screen> + + <para>The actual password for <systemitem class="username">root</systemitem> + (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 + command:</para> + +<screen revision="sysv"><userinput>cat > /etc/group << "EOF" +<literal>root:x:0: +bin:x:1:daemon +sys:x:2: +kmem:x:3: +tape:x:4: +tty:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +usb:x:14: +cdrom:x:15: +adm:x:16: +messagebus:x:18: +input:x:24: +mail:x:34: +kvm:x:61: +wheel:x:97: +nogroup:x:99: +users:x:999:</literal> +EOF</userinput></screen> + +<screen revision="systemd"><userinput>cat > /etc/group << "EOF" +<literal>root:x:0: +bin:x:1:daemon +sys:x:2: +kmem:x:3: +tape:x:4: +tty:x:5: +daemon:x:6: +floppy:x:7: +disk:x:8: +lp:x:9: +dialout:x:10: +audio:x:11: +video:x:12: +utmp:x:13: +usb:x:14: +cdrom:x:15: +adm:x:16: +messagebus:x:18: +systemd-journal:x:23: +input:x:24: +mail:x:34: +kvm:x:61: +systemd-bus-proxy:x:72: +systemd-journal-gateway:x:73: +systemd-journal-remote:x:74: +systemd-journal-upload:x:75: +systemd-network:x:76: +systemd-resolve:x:77: +systemd-timesync:x:78: +systemd-coredump:x:79: +wheel:x:97: +nogroup:x:99: +users:x:999:</literal> +EOF</userinput></screen> + + <para>The created groups are not part of any standard—they are groups + decided on in part by the requirements of the Udev configuration in the next + chapter, and in part by common convention employed by a number of existing + Linux distributions. In addition, some test suites rely on specific users + or groups. The Linux Standard Base (LSB, available at <ulink + url="http://www.linuxbase.org"/>) recommends only that, besides the group + <systemitem class="groupname">root</systemitem> with a Group ID (GID) of 0, + a group <systemitem class="groupname">bin</systemitem> with a GID of 1 be + present. All other group names and GIDs can be chosen freely by the system + administrator since well-written programs do not depend on GID numbers, but + rather use the group's name.</para> + + <para>Some tests in <xref linkend="chapter-building-system"/> need a regular + user. We add this user here and delete this account at the end of that + chapter.</para> + +<screen><userinput>echo "tester:x:$(ls -n $(tty) | cut -d" " -f3):101::/home/tester:/bin/bash" >> /etc/passwd +echo "tester:x:101:" >> /etc/group +install -o tester -d /home/tester</userinput></screen> + + <para>To remove the <quote>I have no name!</quote> prompt, start a new + shell. Since the + <filename>/etc/passwd</filename> and <filename>/etc/group</filename> + files have been created, user name and group name resolution will now + work:</para> + +<screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> + + <para>Note the use of the <parameter>+h</parameter> directive. This tells + <command>bash</command> not to use its internal path hashing. Without this + 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 + installed, the <parameter>+h</parameter> directive will be used for the duration + of this chapter.</para> + + <para>The <command>login</command>, <command>agetty</command>, and + <command>init</command> programs (and others) use a number of log + 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 + do not already exist. Initialize the log files and give them + proper permissions:</para> + +<screen><userinput>touch /var/log/{btmp,lastlog,faillog,wtmp} +chgrp -v utmp /var/log/lastlog +chmod -v 664 /var/log/lastlog +chmod -v 600 /var/log/btmp</userinput></screen> + + <para>The <filename>/var/log/wtmp</filename> file records all logins and + logouts. The <filename>/var/log/lastlog</filename> file records when each + user last logged in. The <filename>/var/log/faillog</filename> file records + failed login attempts. The <filename>/var/log/btmp</filename> file records + the bad login attempts.</para> + + <note><para>The <filename>/run/utmp</filename> file records the users that + are currently logged in. This file is created dynamically in the boot + scripts.</para></note> + +</sect1> diff --git a/chapter06/creatingdirs.xml b/chapter06/creatingdirs.xml new file mode 100644 index 000000000..359717ff7 --- /dev/null +++ b/chapter06/creatingdirs.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-creatingdirs"> + <?dbhtml filename="creatingdirs.html"?> + + <title>Creating Directories</title> + + <para>It is time to create the full structure in the LFS file system. Create + a standard directory tree by issuing the following commands:</para> + +<screen><userinput>mkdir -pv /{bin,boot,etc/{opt,sysconfig},home,lib/firmware,mnt,opt} +mkdir -pv /{media/{floppy,cdrom},srv,var} +install -dv -m 0750 /root +install -dv -m 1777 /tmp /var/tmp +mkdir -pv /usr/{,local/}{bin,include,lib,sbin,src} +mkdir -pv /usr/{,local/}share/{color,dict,doc,info,locale,man} +mkdir -pv /usr/{,local/}share/{misc,terminfo,zoneinfo} +mkdir -pv /usr/{,local/}share/man/man{1..8} + +mkdir -v /var/{log,mail,spool} +ln -sv /run /var/run +ln -sv /run/lock /var/lock +mkdir -pv /var/{opt,cache,lib/{color,misc,locate},local}</userinput></screen> + + <para>Directories are, by default, created with permission mode 755, but + this is not desirable for all directories. In the commands above, two + changes are made—one to the home directory of user <systemitem + class="username">root</systemitem>, and another to the directories for + temporary files.</para> + + <para>The first mode change ensures that not just anybody can enter + the <filename class="directory">/root</filename> directory—the + same as a normal user would do with his or her home directory. The + second mode change makes sure that any user can write to the + <filename class="directory">/tmp</filename> and <filename + class="directory">/var/tmp</filename> directories, but cannot remove + another user's files from them. The latter is prohibited by the so-called + <quote>sticky bit,</quote> the highest bit (1) in the 1777 bit mask.</para> + + <sect2> + <title>FHS Compliance Note</title> + + <para>The directory tree is based on the Filesystem Hierarchy Standard + (FHS) (available at <ulink + url="https://refspecs.linuxfoundation.org/fhs.shtml"/>). The FHS also specifies + the optional existence of some directories such as <filename + class="directory">/usr/local/games</filename> and <filename + class="directory">/usr/share/games</filename>. We create only the + directories that are needed. However, feel free to create these + directories. </para> + + </sect2> + +</sect1> diff --git a/chapter06/dbus.xml b/chapter06/dbus.xml deleted file mode 100644 index bb4bffc76..000000000 --- a/chapter06/dbus.xml +++ /dev/null @@ -1,241 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-dbus" role="wrap" revision="systemd"> - <?dbhtml filename="dbus.html"?> - - <sect1info condition="script"> - <productname>dbus</productname> - <productnumber>&dbus-version;</productnumber> - <address>&dbus-url;</address> - </sect1info> - - <title>D-Bus-&dbus-version;</title> - - <indexterm zone="ch-system-dbus"> - <primary sortas="a-dbus">D-Bus</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>D-Bus is a message bus system, a simple way for applications to talk - to one another. D-Bus supplies both a system daemon (for events such as - "new hardware device added" or "printer queue changed") and a - per-user-login-session daemon (for general IPC needs among user - applications). Also, the message bus is built on top of a general one-to-one - message passing framework, which can be used by any two applications to - communicate directly (without going through the message bus daemon).</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&dbus-ch6-sbu;</seg> - <seg>&dbus-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of D-Bus</title> - - <para>Prepare D-Bus for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - --disable-static \ - --disable-doxygen-docs \ - --disable-xml-docs \ - --docdir=/usr/share/doc/dbus-&dbus-version; \ - --with-console-auth-dir=/run/console</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--with-console-auth-dir=/run/console</parameter></term> - <listitem> - <para>This specifies the location of the ConsoleKit auth - directory.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does come with a test suite, but it requires several - packages that are not included in LFS. Instructions for running the - test suite can be found in the BLFS book at - <ulink url="&blfs-book;general/dbus.html"/>.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>The shared library needs to be moved to - <filename class="directory">/lib</filename>, and as a result the - <filename class="extension">.so</filename> file in - <filename class="directory">/usr/lib</filename> will need to be recreated:</para> - -<screen><userinput remap="install">mv -v /usr/lib/libdbus-1.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libdbus-1.so) /usr/lib/libdbus-1.so</userinput></screen> - - <para>Create a symlink, so that D-Bus and systemd can use the same - <filename>machine-id</filename> file:</para> - -<screen><userinput remap="install">ln -sfv /etc/machine-id /var/lib/dbus</userinput></screen> - - <para>Move the socket file to /run instead of the deprecated - /var/run:</para> - - <screen><userinput remap="install">sed -i 's:/var/run:/run:' /lib/systemd/system/dbus.socket</userinput></screen> - - </sect2> - - <sect2 id="contents-dbus" role="content"> - <title>Contents of D-Bus</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>dbus-cleanup-sockets, dbus-daemon, dbus-launch, dbus-monitor, - dbus-run-session, dbus-send, dbus-test-tool, - dbus-update-activation-environment, and dbus-uuidgen</seg> - <seg>libdbus-1.{a,so}</seg> - <seg>/etc/dbus-1, /usr/include/dbus-1.0, /usr/lib/dbus-1.0, - /usr/share/dbus-1, /usr/share/doc/dbus-&dbus-version;, - and /var/lib/dbus</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="dbus-cleanup-sockets"> - <term><command>dbus-cleanup-sockets</command></term> - <listitem> - <para>Used to clean up leftover sockets in a directory</para> - <indexterm zone="ch-system-dbus dbus-cleanup-sockets"> - <primary sortas="b-dbus-cleanup-sockets">dbus-cleanup-sockets</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-daemon"> - <term><command>dbus-daemon</command></term> - <listitem> - <para>The D-Bus message bus daemon</para> - <indexterm zone="ch-system-dbus dbus-daemon"> - <primary sortas="b-dbus-daemon">dbus-daemon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-launch"> - <term><command>dbus-launch</command></term> - <listitem> - <para>Starts <command>dbus-daemon</command> from a shell - script</para> - <indexterm zone="ch-system-dbus dbus-launch"> - <primary sortas="b-dbus-launch">dbus-launch</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-monitor"> - <term><command>dbus-monitor</command></term> - <listitem> - <para>Monitors messages passing through a D-Bus message bus</para> - <indexterm zone="ch-system-dbus dbus-monitor"> - <primary sortas="b-dbus-monitor">dbus-monitor</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-run-session"> - <term><command>dbus-run-session</command></term> - <listitem> - <para>Starts a session bus instance of <command>dbus-daemon</command> - from a shell script and starts a specified program in that - session</para> - <indexterm zone="ch-system-dbus dbus-run-session"> - <primary sortas="b-dbus-run-session">dbus-run-session</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-send"> - <term><command>dbus-send</command></term> - <listitem> - <para>Sends a message to a D-Bus message bus</para> - <indexterm zone="ch-system-dbus dbus-send"> - <primary sortas="b-dbus-send">dbus-send</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-test-tool"> - <term><command>dbus-test-tool</command></term> - <listitem> - <para>A tool to help packages test - <application>D-Bus</application></para> - <indexterm zone="ch-system-dbus dbus-test-tool"> - <primary sortas="b-dbus-test-tool">dbus-test-tool</primary> - </indexterm> - </listitem> - </varlistentry> - - <!-- This is a very long command name. Excuse the long <primary> statement below. --> - <varlistentry id="dbus-update-activation-environment"> - <term><command>dbus-update-activation-environment</command></term> - <listitem> - <para>Updates environment variables that will be set for - <application>D-Bus</application> session services</para> - <indexterm zone="ch-system-dbus dbus-update-activation-environment"> - <primary sortas="b-dbus-update-activation-environment">dbus-update-activation-environment</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dbus-uuidgen"> - <term><command>dbus-uuidgen</command></term> - <listitem> - <para>Generates a universally unique ID</para> - <indexterm zone="ch-system-dbus dbus-uuidgen"> - <primary sortas="b-dbus-uuidgen">dbus-uuidgen</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libdbus-1"> - <term><filename class="libraryfile">libdbus-1</filename></term> - <listitem> - <para>Contains API functions used to communicate with the D-Bus - message bus</para> - <indexterm zone="ch-system-dbus libdbus-1"> - <primary sortas="c-libdbus-1">libdbus-1</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/dejagnu.xml b/chapter06/dejagnu.xml new file mode 100644 index 000000000..8f1ab7648 --- /dev/null +++ b/chapter06/dejagnu.xml @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-dejagnu" role="wrap"> + <?dbhtml filename="dejagnu.html"?> + + <sect1info condition="script"> + <productname>dejagnu</productname> + <productnumber>&dejagnu-version;</productnumber> + <address>&dejagnu-url;</address> + </sect1info> + + <title>DejaGNU-&dejagnu-version;</title> + + <indexterm zone="ch-tools-dejagnu"> + <primary sortas="a-DejaGNU">DejaGNU</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The <application>DejaGnu</application> package contains a framework for running test + suites on GNU tools. It is written in <command>expect</command>, which itself + uses <application>Tcl</application> (Tool Command Language).</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&dejagnu-ch5-sbu;</seg> + <seg>&dejagnu-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of DejaGNU</title> + + <para>Prepare DejaGNU for compilation:</para> + +<screen><userinput remap="configure">./configure --prefix=/usr +makeinfo --html --no-split -o doc/dejagnu.html doc/dejagnu.texi +makeinfo --plaintext -o doc/dejagnu.txt doc/dejagnu.texi</userinput></screen> + + <para>Build and install the package:</para> + +<screen><userinput remap="install">make install +install -v -dm755 /usr/share/doc/dejagnu-&dejagnu-version; +install -v -m644 doc/dejagnu.{html,txt} \ + /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen> + + <para>To test the results, issue:</para> + +<screen><userinput remap="test">make check</userinput></screen> + + </sect2> + + + <sect2 id="contents-dejagnu" role="content"> + <title>Contents of DejaGNU</title> + + <segmentedlist> + <segtitle>Installed program</segtitle> + + <seglistitem> + <seg>runtest</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="runtest"> + <term><command>runtest</command></term> + <listitem> + <para>A wrapper script that locates the proper + <command>expect</command> shell and then runs DejaGNU</para> + <indexterm zone="ch-tools-dejagnu runtest"> + <primary sortas="b-runtest">runtest</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/diffutils.xml b/chapter06/diffutils.xml index 0d8bd5c77..6594058be 100644 --- a/chapter06/diffutils.xml +++ b/chapter06/diffutils.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-diffutils" role="wrap"> +<sect1 id="ch-tools-diffutils" role="wrap"> <?dbhtml filename="diffutils.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Diffutils-&diffutils-version;</title> - <indexterm zone="ch-system-diffutils"> + <indexterm zone="ch-tools-diffutils"> <primary sortas="a-Diffutils">Diffutils</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Diffutils package contains programs that show the differences - between files or directories.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/diffutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&diffutils-ch6-sbu;</seg> - <seg>&diffutils-ch6-du;</seg> + <seg>&diffutils-ch5-sbu;</seg> + <seg>&diffutils-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,82 +45,23 @@ <para>Prepare Diffutils for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> + <sect2 role="content"> + <title/> - <sect2 id="contents-diffutils" role="content"> - <title>Contents of Diffutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>cmp, diff, diff3, and sdiff</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="cmp"> - <term><command>cmp</command></term> - <listitem> - <para>Compares two files and reports whether or in which bytes they - differ</para> - <indexterm zone="ch-system-diffutils cmp"> - <primary sortas="b-cmp">cmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="diff"> - <term><command>diff</command></term> - <listitem> - <para>Compares two files or directories and reports which lines in - the files differ</para> - <indexterm zone="ch-system-diffutils diff"> - <primary sortas="b-diff">diff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="diff3"> - <term><command>diff3</command></term> - <listitem> - <para>Compares three files line by line</para> - <indexterm zone="ch-system-diffutils diff3"> - <primary sortas="b-diff3">diff3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sdiff"> - <term><command>sdiff</command></term> - <listitem> - <para>Merges two files and interactively outputs the results</para> - <indexterm zone="ch-system-diffutils sdiff"> - <primary sortas="b-sdiff">sdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-diffutils" role="."/></para> </sect2> diff --git a/chapter06/e2fsprogs.xml b/chapter06/e2fsprogs.xml deleted file mode 100644 index 984ba6db9..000000000 --- a/chapter06/e2fsprogs.xml +++ /dev/null @@ -1,541 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-e2fsprogs" role="wrap"> - <?dbhtml filename="e2fsprogs.html"?> - - <sect1info condition="script"> - <productname>e2fsprogs</productname> - <productnumber>&e2fsprogs-version;</productnumber> - <address>&e2fsprogs-url;</address> - </sect1info> - - <title>E2fsprogs-&e2fsprogs-version;</title> - - <indexterm zone="ch-system-e2fsprogs"> - <primary sortas="a-E2fsprogs">E2fsprogs</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The E2fsprogs package contains the utilities for handling the - <systemitem class="filesystem">ext2</systemitem> file system. It also - supports the <systemitem class="filesystem">ext3</systemitem> and - <systemitem class="filesystem">ext4</systemitem> journaling - file systems.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&e2fsprogs-ch6-sbu;</seg> - <seg>&e2fsprogs-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of E2fsprogs</title> - - <para>The E2fsprogs documentation recommends that the package be built in - a subdirectory of the source tree: </para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Prepare E2fsprogs for compilation:</para> - -<screen><userinput remap="configure">../configure --prefix=/usr \ - --bindir=/bin \ - --with-root-prefix="" \ - --enable-elf-shlibs \ - --disable-libblkid \ - --disable-libuuid \ - --disable-uuidd \ - --disable-fsck</userinput></screen> - - <variablelist> - <title>The meaning of the environment variable and configure options:</title> - - <varlistentry> - <term><parameter>--with-root-prefix=""</parameter> and - <parameter>--bindir=/bin</parameter></term> - <listitem> - <para>Certain programs (such as the <command>e2fsck</command> - program) are considered essential programs. When, for example, - <filename class="directory">/usr</filename> is not mounted, these - programs still need to be available. They belong in directories - like <filename class="directory">/lib</filename> and <filename - class="directory">/sbin</filename>. If this option is not passed - to E2fsprogs' configure, the programs are installed into the - <filename class="directory">/usr</filename> directory.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-elf-shlibs</parameter></term> - <listitem> - <para>This creates the shared libraries which some programs - in this package use.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-*</parameter></term> - <listitem> - <para>This prevents E2fsprogs from building and installing the - <systemitem class="library">libuuid</systemitem> and - <systemitem class="library">libblkid</systemitem> libraries, the - <systemitem class="daemon">uuidd</systemitem> daemon, and the - <command>fsck</command> wrapper, as Util-Linux installs more - recent versions.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To run the tests, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>One of the E2fsprogs tests will attempt to allocate 256 MB of memory. - If you do not have significantly more RAM than this, be sure to enable - sufficient swap space for the test. See <xref - linkend="ch-partitioning-creatingfilesystem"/> and <xref - linkend="ch-partitioning-mounting"/> - for details on creating and enabling swap space.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Make the installed static libraries writable so debugging symbols can - be removed later:</para> - -<screen><userinput remap="install">chmod -v u+w /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a</userinput></screen> - - <para>This package installs a gzipped - <filename class="extension">.info</filename> file but doesn't update the - system-wide <filename>dir</filename> file. Unzip this file and then update - the system <filename>dir</filename> file using the following - commands:</para> - -<screen><userinput remap="install">gunzip -v /usr/share/info/libext2fs.info.gz -install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info</userinput></screen> - - <para>If desired, create and install some additional documentation by - issuing the following commands:</para> - -<screen><userinput remap="install">makeinfo -o doc/com_err.info ../lib/et/com_err.texinfo -install -v -m644 doc/com_err.info /usr/share/info -install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info</userinput></screen> - </sect2> - - <sect2 id="contents-e2fsprogs" role="content"> - <title>Contents of E2fsprogs</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>badblocks, chattr, compile_et, debugfs, dumpe2fs, e2freefrag, - e2fsck, e2image, e2label, e2mmpstatus, e2scrub, e2scrub_all, e2undo, - e4crypt, e4defrag, filefrag, fsck.ext2, - fsck.ext3, fsck.ext4, logsave, lsattr, mk_cmds, mke2fs, - mkfs.ext2, mkfs.ext3, mkfs.ext4, mklost+found, - resize2fs, and tune2fs</seg> - <seg>libcom_err.so, libe2p.so, libext2fs.so, and libss.so</seg> - <seg>/usr/include/e2p, /usr/include/et, /usr/include/ext2fs, - /usr/include/ss, /usr/lib/e2fsprogs, /usr/share/et, and - /usr/share/ss</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="badblocks"> - <term><command>badblocks</command></term> - <listitem> - <para>Searches a device (usually a disk partition) for bad - blocks</para> - <indexterm zone="ch-system-e2fsprogs badblocks"> - <primary sortas="b-badblocks">badblocks</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chattr"> - <term><command>chattr</command></term> - <listitem> - <para>Changes the attributes of files on an <systemitem - class="filesystem">ext2</systemitem> file system; it also - changes <systemitem class="filesystem">ext3</systemitem> - file systems, the journaling version of <systemitem - class="filesystem">ext2</systemitem> file systems</para> - <indexterm zone="ch-system-e2fsprogs chattr"> - <primary sortas="b-chattr">chattr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="compile_et"> - <term><command>compile_et</command></term> - <listitem> - <para>An error table compiler; it converts a table of error-code - names and messages into a C source file suitable for use with the - <filename class="libraryfile">com_err</filename> library</para> - <indexterm zone="ch-system-e2fsprogs compile_et"> - <primary sortas="b-compile_et">compile_et</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="debugfs"> - <term><command>debugfs</command></term> - <listitem> - <para>A file system debugger; it can be used to examine and change - the state of an <systemitem class="filesystem">ext2</systemitem> - file system</para> - <indexterm zone="ch-system-e2fsprogs debugfs"> - <primary sortas="b-debugfs">debugfs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dumpe2fs"> - <term><command>dumpe2fs</command></term> - <listitem> - <para>Prints the super block and blocks group information for the - file system present on a given device</para> - <indexterm zone="ch-system-e2fsprogs dumpe2fs"> - <primary sortas="b-dumpe2fs">dumpe2fs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2freefrag"> - <term><command>e2freefrag</command></term> - <listitem> - <para>Reports free space fragmentation information</para> - <indexterm zone="ch-system-e2fsprogs e2freefrag"> - <primary sortas="b-e2freefrag">e2freefrag</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2fsck"> - <term><command>e2fsck</command></term> - <listitem> - <para>Is used to check, and optionally repair <systemitem - class="filesystem">ext2</systemitem> file systems and <systemitem - class="filesystem">ext3</systemitem> file systems</para> - <indexterm zone="ch-system-e2fsprogs e2fsck"> - <primary sortas="b-e2fsck">e2fsck</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2image"> - <term><command>e2image</command></term> - <listitem> - <para>Is used to save critical <systemitem - class="filesystem">ext2</systemitem> file system data to a file</para> - <indexterm zone="ch-system-e2fsprogs e2image"> - <primary sortas="b-e2image">e2image</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2label"> - <term><command>e2label</command></term> - <listitem> - <para>Displays or changes the file system label on the <systemitem - class="filesystem">ext2</systemitem> file system present on a given - device</para> - <indexterm zone="ch-system-e2fsprogs e2label"> - <primary sortas="b-e2label">e2label</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2mmpstatus"> - <term><command>e2mmpstatus</command></term> - <listitem> - <para>Checks MMP status of an ext4 filesystem</para> - <indexterm zone="ch-system-e2fsprogs e2mmpstatus"> - <primary sortas="b-e2mmpstatus">e2mmpstatus</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2scrub"> - <term><command>e2scrub</command></term> - <listitem> - <para>Checks the contents of a mounted ext[234] filesystem</para> - <indexterm zone="ch-system-e2fsprogs e2scrub"> - <primary sortas="b-e2scrub">e2scrub</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2scrub_all"> - <term><command>e2scrub_all</command></term> - <listitem> - <para>Checks all mounted ext[234] filesystems for errors</para> - <indexterm zone="ch-system-e2fsprogs e2scrub_all"> - <primary sortas="b-e2scrub_all">e2scrub_all</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e2undo"> - <term><command>e2undo</command></term> - <listitem> - <para>Replays the undo log undo_log for an ext2/ext3/ext4 filesystem - found on a device [This can be used to undo a failed operation by an - e2fsprogs program.]</para> - <indexterm zone="ch-system-e2fsprogs e2undo"> - <primary sortas="b-e2undo">e2undo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e4crypt"> - <term><command>e4crypt</command></term> - <listitem> - <para>Ext4 filesystem encryption utility</para> - <indexterm zone="ch-system-e2fsprogs e4crypt"> - <primary sortas="b-e4crypt">e4crypt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="e4defrag"> - <term><command>e4defrag</command></term> - <listitem> - <para>Online defragmenter for ext4 filesystems</para> - <indexterm zone="ch-system-e2fsprogs e4defrag"> - <primary sortas="b-e4defrag">e4defrag</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="filefrag"> - <term><command>filefrag</command></term> - <listitem> - <para>Reports on how badly fragmented a particular file might be</para> - <indexterm zone="ch-system-e2fsprogs filefrag"> - <primary sortas="b-filefrag">filefrag</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsck.ext2"> - <term><command>fsck.ext2</command></term> - <listitem> - <para>By default checks <systemitem class="filesystem">ext2</systemitem> - file systems and is a hard link to <command>e2fsck</command></para> - <indexterm zone="ch-system-e2fsprogs fsck.ext2"> - <primary sortas="b-fsck.ext2">fsck.ext2</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsck.ext3"> - <term><command>fsck.ext3</command></term> - <listitem> - <para>By default checks <systemitem class="filesystem">ext3</systemitem> - file systems and is a hard link to <command>e2fsck</command></para> - <indexterm zone="ch-system-e2fsprogs fsck.ext3"> - <primary sortas="b-fsck.ext3">fsck.ext3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsck.ext4"> - <term><command>fsck.ext4</command></term> - <listitem> - <para>By default checks <systemitem class="filesystem">ext4</systemitem> - file systems and is a hard link to <command>e2fsck</command></para> - <indexterm zone="ch-system-e2fsprogs fsck.ext4"> - <primary sortas="b-fsck.ext4">fsck.ext4</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="logsave"> - <term><command>logsave</command></term> - <listitem> - <para>Saves the output of a command in a log file</para> - <indexterm zone="ch-system-e2fsprogs logsave"> - <primary sortas="b-logsave">logsave</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lsattr"> - <term><command>lsattr</command></term> - <listitem> - <para>Lists the attributes of files on a second extended file - system</para> - <indexterm zone="ch-system-e2fsprogs lsattr"> - <primary sortas="b-lsattr">lsattr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mk_cmds"> - <term><command>mk_cmds</command></term> - <listitem> - <para>Converts a table of command names and help messages into a C - source file suitable for use with the <filename - class="libraryfile">libss</filename> subsystem library</para> - <indexterm zone="ch-system-e2fsprogs mk_cmds"> - <primary sortas="b-mk_cmds">mk_cmds</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mke2fs"> - <term><command>mke2fs</command></term> - <listitem> - <para>Creates an <systemitem class="filesystem">ext2</systemitem> - or <systemitem class="filesystem">ext3</systemitem> file system on - the given device</para> - <indexterm zone="ch-system-e2fsprogs mke2fs"> - <primary sortas="b-mke2fs">mke2fs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs.ext2"> - <term><command>mkfs.ext2</command></term> - <listitem> - <para>By default creates <systemitem class="filesystem">ext2</systemitem> - file systems and is a hard link to <command>mke2fs</command></para> - <indexterm zone="ch-system-e2fsprogs mkfs.ext2"> - <primary sortas="b-mkfs.ext2">mkfs.ext2</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs.ext3"> - <term><command>mkfs.ext3</command></term> - <listitem> - <para>By default creates <systemitem class="filesystem">ext3</systemitem> - file systems and is a hard link to <command>mke2fs</command></para> - <indexterm zone="ch-system-e2fsprogs mkfs.ext3"> - <primary sortas="b-mkfs.ext3">mkfs.ext3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs.ext4"> - <term><command>mkfs.ext4</command></term> - <listitem> - <para>By default creates <systemitem class="filesystem">ext4</systemitem> - file systems and is a hard link to <command>mke2fs</command></para> - <indexterm zone="ch-system-e2fsprogs mkfs.ext4"> - <primary sortas="b-mkfs.ext4">mkfs.ext4</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mklost-found"> - <term><command>mklost+found</command></term> - <listitem> - <para>Used to create a <filename class="directory">lost+found</filename> - directory on an <systemitem class="filesystem">ext2</systemitem> file - system; it pre-allocates disk blocks to this directory to lighten the - task of <command>e2fsck</command></para> - <indexterm zone="ch-system-e2fsprogs mklost-found"> - <primary sortas="b-mklost+found">mklost+found</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="resize2fs"> - <term><command>resize2fs</command></term> - <listitem> - <para>Can be used to enlarge or shrink an <systemitem - class="filesystem">ext2</systemitem> file system</para> - <indexterm zone="ch-system-e2fsprogs resize2fs"> - <primary sortas="b-resize2fs">resize2fs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tune2fs"> - <term><command>tune2fs</command></term> - <listitem> - <para>Adjusts tunable file system parameters on an <systemitem - class="filesystem">ext2</systemitem> file system</para> - <indexterm zone="ch-system-e2fsprogs tune2fs"> - <primary sortas="b-tune2fs">tune2fs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcom_err"> - <term><filename class="libraryfile">libcom_err</filename></term> - <listitem> - <para>The common error display routine</para> - <indexterm zone="ch-system-e2fsprogs libcom_err"> - <primary sortas="c-libcom_err">libcom_err</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libe2p"> - <term><filename class="libraryfile">libe2p</filename></term> - <listitem> - <para>Used by <command>dumpe2fs</command>, <command>chattr</command>, - and <command>lsattr</command></para> - <indexterm zone="ch-system-e2fsprogs libe2p"> - <primary sortas="c-libe2p">libe2p</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libext2fs"> - <term><filename class="libraryfile">libext2fs</filename></term> - <listitem> - <para>Contains routines to enable user-level programs to manipulate an - <systemitem class="filesystem">ext2</systemitem> file system</para> - <indexterm zone="ch-system-e2fsprogs libext2fs"> - <primary sortas="c-libext2fs">libext2fs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libss"> - <term><filename class="libraryfile">libss</filename></term> - <listitem> - <para>Used by <command>debugfs</command></para> - <indexterm zone="ch-system-e2fsprogs libss"> - <primary sortas="c-libss">libss</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/eudev.xml b/chapter06/eudev.xml deleted file mode 100644 index 71511c3e7..000000000 --- a/chapter06/eudev.xml +++ /dev/null @@ -1,191 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-eudev" role="wrap" revision="sysv"> - <?dbhtml filename="eudev.html"?> - - <sect1info condition="script"> - <productname>eudev</productname> - <productnumber>&eudev-version;</productnumber> - <address>&eudev-url;</address> - </sect1info> - - <title>Eudev-&eudev-version;</title> - - <indexterm zone="ch-system-eudev"> - <primary sortas="a-Eudev">Eudev</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Eudev package contains programs for dynamic creation of device - nodes.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&eudev-ch6-sbu;</seg> - <seg>&eudev-ch6-du;</seg> - </seglistitem> - </segmentedlist> - </sect2> - - <sect2 role="installation"> - <title>Installation of Eudev</title> -<!-- - <para>First, fix a test script:</para> - -<screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen> ---> -<!-- - <para>Next, remove an unneeded line that causes a build failure:</para> - -<screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen> ---> - - <para>Prepare Eudev for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --bindir=/sbin \ - --sbindir=/sbin \ - --libdir=/usr/lib \ - --sysconfdir=/etc \ - --libexecdir=/lib \ - --with-rootprefix= \ - --with-rootlibdir=/lib \ - --enable-manpages \ - --disable-static</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>Create some directories now that are needed for tests, but - will also be used as a part of installation:</para> - -<screen><userinput remap="test">mkdir -pv /lib/udev/rules.d -mkdir -pv /etc/udev/rules.d</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Install some custom rules and support files useful in an LFS - environment:</para> - -<screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.xz -make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen> - - </sect2> - - <sect2 id="conf-eudev" role="configuration"> - <title>Configuring Eudev</title> - - <indexterm zone="conf-eudev"> - <primary sortas="a-Eudev">Eudev</primary> - <secondary>configuring</secondary> - </indexterm> - - <indexterm zone="conf-eudev"> - <primary sortas="e-/etc/udev/hwdb.bin">/etc/udev/hwdb.bin</primary> - </indexterm> - - <para>Information about hardware devices is maintained in the - <filename class="directory">/etc/udev/hwdb.d</filename> and - <filename class="directory">/lib/udev/hwdb.d</filename> directories. - <application>Eudev</application> needs that information to be compiled - into a binary database <filename>/etc/udev/hwdb.bin</filename>. Create the - initial database:</para> - -<screen><userinput>udevadm hwdb --update</userinput></screen> - - <para>This command needs to be run each time the hardware information is - updated.</para> - - </sect2> - - <sect2 id="contents-eudev" role="content"> - <title>Contents of Eudev</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg><!-- These are in /lib/udev and not to be called by the user: - accelerometer, ata_id, cdrom_id, collect, mtd_probe, - scsi_id, v4l_id,--> udevadm and udevd</seg> - - <seg>libudev.so</seg> - - <seg>/etc/udev, /lib/udev, and /usr/share/doc/udev-&udev-lfs-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - <varlistentry id="udevadm" revision="sysv"> - <term><command>udevadm</command></term> - <listitem> - <para>Generic udev administration tool: controls the udevd daemon, - provides info from the Udev database, monitors uevents, waits for - uevents to finish, tests Udev configuration, and triggers uevents - for a given device</para> - <indexterm zone="ch-system-eudev udevadm"> - <primary sortas="b-udevadm">udevadm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="udevd"> - <term><command>udevd</command></term> - <listitem> - <para>A daemon that listens for uevents on the netlink socket, - creates devices and runs the configured external programs in - response to these uevents</para> - <indexterm zone="ch-system-eudev udevd"> - <primary sortas="b-udevd">udevd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libudev"> - <term><filename class="libraryfile">libudev</filename></term> - <listitem> - <para>A library interface to udev device information</para> - <indexterm zone="ch-system-eudev libudev"> - <primary sortas="c-libudev">libudev</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="etc-udev"> - <term><filename class="directory">/etc/udev</filename></term> - <listitem> - <para>Contains Udev configuration files, - device permissions, and rules for device naming</para> - <indexterm zone="ch-system-eudev etc-udev"> - <primary sortas="e-/etc/udev">/etc/udev</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/expat.xml b/chapter06/expat.xml deleted file mode 100644 index df9f709c9..000000000 --- a/chapter06/expat.xml +++ /dev/null @@ -1,117 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-expat" role="wrap"> - <?dbhtml filename="expat.html"?> - - <sect1info condition="script"> - <productname>expat</productname> - <productnumber>&expat-version;</productnumber> - <address>&expat-url;</address> - </sect1info> - - <title>Expat-&expat-version;</title> - - <indexterm zone="ch-system-expat"> - <primary sortas="a-Expat">Expat</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Expat package contains a stream oriented C library for - parsing XML.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&expat-ch6-sbu;</seg> - <seg>&expat-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Expat</title> - - <para>First fix a problem with the regression tests in the LFS environment:</para> - -<screen><userinput remap="pre">sed -i 's|usr/bin/env |bin/|' run.sh.in</userinput></screen> - - <para>Prepare Expat for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --docdir=/usr/share/doc/expat-&expat-version;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>If desired, install the documentation:</para> - -<screen><userinput remap="install">install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-&expat-version;</userinput></screen> - - </sect2> - - <sect2 id="contents-expat" role="content"> - <title>Contents of Expat</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>xmlwf</seg> - <seg>libexpat.so</seg> - <seg>/usr/share/doc/expat-&expat-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="xmlwf"> - <term><command>xmlwf </command></term> - <listitem> - <para>Is a non-validating utility to check whether or not - XML documents are well formed</para> - <indexterm zone="ch-system-expat xmlwf"> - <primary sortas="b-xmlwf">xmlwf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libexpat"> - <term><filename class="libraryfile">libexpat</filename></term> - <listitem> - <para>Contains API functions for parsing XML</para> - <indexterm zone="ch-system-expat libexpat"> - <primary sortas="c-libexpat">libexpat</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/expect.xml b/chapter06/expect.xml new file mode 100644 index 000000000..20b227ea5 --- /dev/null +++ b/chapter06/expect.xml @@ -0,0 +1,139 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-expect" role="wrap"> + <?dbhtml filename="expect.html"?> + + <sect1info condition="script"> + <productname>expect</productname> + <productnumber>&expect-version;</productnumber> + <address>&expect-url;</address> + </sect1info> + + <title>Expect-&expect-version;</title> + + <indexterm zone="ch-tools-expect"> + <primary sortas="a-Expect">Expect</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The <application>Expect</application> package contains tools for + automating, via scripted dialogues, interactive applications such as + <command>telnet</command>, <command>ftp</command>, + <command>passwd</command>, <command>fsck</command>, + <command>rlogin</command>, and <command>tip</command>. + <application>Expect</application> is also useful for testing these same + applications as well as easing all sorts of tasks that are prohibitively + difficult with anything else. The <application>DejaGnu</application> + framework is written in <application>Expect</application>.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&expect-ch5-sbu;</seg> + <seg>&expect-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Expect</title> + + <para>Prepare Expect for compilation:</para> + +<screen><userinput remap="configure"> +./configure --prefix=/usr \ + --with-tcl=/usr/lib \ + --enable-shared \ + --mandir=/usr/share/man \ + --with-tclinclude=/usr/include</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--with-tcl=/usr/lib</parameter></term> + <listitem> + <para>This parameter is needed to tell the + <command>configure</command> where the + <command>tclConfig.sh</command> is located.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-tclinclude=/usr/include</parameter></term> + <listitem> + <para>This explicitly tells Expect where to find Tcl's internal + headers. Using this option avoids conditions where + <command>configure</command> fails because it cannot automatically + discover the location of Tcl's headers.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Build the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install +ln -svf expect&expect-version;/libexpect&expect-version;.so /usr/lib</userinput></screen> + + </sect2> + + <sect2 id="contents-expect" role="content"> + <title>Contents of Expect</title> + + <segmentedlist> + <segtitle>Installed program</segtitle> + <segtitle>Installed library</segtitle> + + <seglistitem> + <seg>expect</seg> + <seg>libexpect-&expect-lib-version;.so</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="expect"> + <term><command>expect</command></term> + <listitem> + <para>Communicates with other interactive programs according + to a script</para> + <indexterm zone="ch-tools-expect expect"> + <primary sortas="b-expect">expect</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libexpect"> + <term><filename class="libraryfile">libexpect-&expect-lib-version;.so</filename></term> + <listitem> + <para>Contains functions that allow Expect to be used as a Tcl + extension or to be used directly from C or C++ (without Tcl)</para> + <indexterm zone="ch-tools-expect libexpect"> + <primary sortas="c-libexpect-&expect-lib-version;">libexpect-&expect-lib-version;</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/file.xml b/chapter06/file.xml index b5e28f244..83a473b70 100644 --- a/chapter06/file.xml +++ b/chapter06/file.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-file" role="wrap"> +<sect1 id="ch-tools-file" role="wrap"> <?dbhtml filename="file.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>File-&file-version;</title> - <indexterm zone="ch-system-file"> + <indexterm zone="ch-tools-file"> <primary sortas="a-File">File</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The File package contains a utility for determining the type of a given - file or files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/file.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&file-ch6-sbu;</seg> - <seg>&file-ch6-du;</seg> + <seg>&file-ch5-sbu;</seg> + <seg>&file-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,65 +45,28 @@ <para>Prepare File for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT</userinput></screen> +<!-- devs: if using - -build here, the build system wants to compile + the signature file with "file" on the build system, but stops if it is not + the same version. One possibility would be to build "file" on the build + system first, but it is simpler to have the system think it is not + cross-compiling, and use the just built "file". --> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - - <sect2 id="contents-file" role="content"> - <title>Contents of File</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>file</seg> - <seg>libmagic.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="file"> - <term><command>file</command></term> - <listitem> - <para>Tries to classify each given file; it does this by performing - several tests—file system tests, magic number tests, and language - tests</para> - <indexterm zone="ch-system-file file"> - <primary sortas="b-file">file</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libmagic"> - <term><filename class="libraryfile">libmagic</filename></term> - <listitem> - <para>Contains routines for magic number recognition, used by the - <command>file</command> program</para> - <indexterm zone="ch-system-file libmagic"> - <primary sortas="c-libmagic">libmagic</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in<!-- TODO + <xref linkend="contents-file" role="."/> --></para> </sect2> diff --git a/chapter06/findutils.xml b/chapter06/findutils.xml index 37393f0de..bf9f9c62a 100644 --- a/chapter06/findutils.xml +++ b/chapter06/findutils.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-findutils" role="wrap"> +<sect1 id="ch-tools-findutils" role="wrap"> <?dbhtml filename="findutils.html"?> <sect1info condition="script"> @@ -16,25 +16,25 @@ <title>Findutils-&findutils-version;</title> - <indexterm zone="ch-system-findutils"> + <indexterm zone="ch-tools-findutils"> <primary sortas="a-Findutils">Findutils</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Findutils package contains programs to find files. These programs - are provided to recursively search through a directory tree and to - create, maintain, and search a database (often faster than the recursive - find, but unreliable if the database has not been recently updated).</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/findutils.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&findutils-ch6-sbu;</seg> - <seg>&findutils-ch6-du;</seg> + <seg>&findutils-ch5-sbu;</seg> + <seg>&findutils-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -45,116 +45,30 @@ <para>Prepare Findutils for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--localstatedir</parameter></term> - <listitem> - <para>This option changes the location of the <command>locate</command> - database to be in <filename class="directory">/var/lib/locate</filename>, - which is FHS-compliant.</para> - </listitem> - </varlistentry> - - </variablelist> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">chown -Rv tester . -su tester -c "PATH=$PATH make check"</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> - - <para revision="sysv">Some of the scripts in the LFS-Bootscripts package - depend on <command>find</command>. As <filename - class="directory">/usr</filename> may not be available during the early - stages of booting, this program needs to be on the root partition. The - <command>updatedb</command> script also needs to be modified to correct an - explicit path:</para> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - <para revision="systemd"> Some packages in BLFS and beyond expect the - <command>find</command> program in <filename - class="directory">/bin</filename>, so make sure it's placed there:</para> + <para>Move the excutable to its final expected location:</para> -<screen><userinput remap="install">mv -v /usr/bin/find /bin -sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/bin/find $LFS/bin +sed -i 's|find:=${BINDIR}|find:=/bin|' $LFS/usr/bin/updatedb</userinput></screen> </sect2> - <sect2 id="contents-findutils" role="content"> - <title>Contents of Findutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>find, locate, updatedb, and xargs</seg> - <seg>/var/lib/locate</seg> - </seglistitem> - - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="find"> - <term><command>find</command></term> - <listitem> - <para>Searches given directory trees for files matching the specified - criteria</para> - <indexterm zone="ch-system-findutils find"> - <primary sortas="b-find">find</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="locate"> - <term><command>locate</command></term> - <listitem> - <para>Searches through a database of file names and reports the names - that contain a given string or match a given pattern</para> - <indexterm zone="ch-system-findutils locate"> - <primary sortas="b-locate">locate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="updatedb"> - <term><command>updatedb</command></term> - <listitem> - <para>Updates the <command>locate</command> database; it scans the - entire file system (including other file systems that are currently - mounted, unless told not to) and puts every file name it finds into - the database</para> - <indexterm zone="ch-system-findutils updatedb"> - <primary sortas="b-updatedb">updatedb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xargs"> - <term><command>xargs</command></term> - <listitem> - <para>Can be used to apply a given command to a list of files</para> - <indexterm zone="ch-system-findutils xargs"> - <primary sortas="b-xargs">xargs</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-findutils" role="."/></para> </sect2> diff --git a/chapter06/flex.xml b/chapter06/flex.xml index bd4bd545f..88e263413 100644 --- a/chapter06/flex.xml +++ b/chapter06/flex.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-flex" role="wrap"> +<sect1 id="ch-tools-flex" role="wrap"> <?dbhtml filename="flex.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Flex-&flex-version;</title> - <indexterm zone="ch-system-flex"> + <indexterm zone="ch-tools-flex"> <primary sortas="a-Flex">Flex</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Flex package contains a utility for generating programs that - recognize patterns in text.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter06/flex.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&flex-ch6-sbu;</seg> - <seg>&flex-ch6-du;</seg> + <seg>&flex-ch5-sbu;</seg> + <seg>&flex-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -41,108 +43,45 @@ <sect2 role="installation"> <title>Installation of Flex</title> -<!-- - <para>First, fix a problem introduced with glibc-2.26:</para> - -<screen><userinput remap="pre">sed -i "/math.h/a #include <malloc.h>" src/flexdef.h</userinput></screen> - - <para>The build procedure assumes the <application>help2man</application> - program is available to create a man page from the executable - -help option. - This is not present, so we use an environment variable to skip this process. - Now, prepare Flex for compilation:</para> --> - <para>Prepare Flex for compilation:</para> -<!-- <screen><userinput remap="configure">HELP2MAN=/tools/bin/true \ --> -<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --docdir=/usr/share/doc/flex-&flex-version;</userinput></screen> + <!-- + <variablelist> + <title>The meaning of the new configure option:</title> + + <varlistentry> + <term><parameter>- -disable-bootstrap</parameter></term> + <listitem> + <para>Normally, building flex is done in two stages. A first + programs, which is used to generate the source of a second one, + which is then compiled. When using cross-compilation, the first + program is generated on the build system. However, due to a bug + in configure, the presence of some function is tested only on the + host system. If this function is not found on the build system, the + build fails. This can be prevented by disabling the two stage + build.</para> + </listitem> + </varlistentry> + </variablelist> + --> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results (about 0.5 SBU), issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> - <para>A few programs do not know about <command>flex</command> yet and - try to run its predecessor, <command>lex</command>. To support those - programs, create a symbolic link named <filename>lex</filename> that - runs <filename>flex</filename> in <command>lex</command> emulation - mode:</para> - -<screen><userinput remap="install">ln -sv flex /usr/bin/lex</userinput></screen> - </sect2> - <sect2 id="contents-flex" role="content"> - <title>Contents of Flex</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>flex, flex++ (link to flex), and lex (link to flex)</seg> - <seg>libfl.so</seg> - <seg>/usr/share/doc/flex-&flex-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="flex"> - <term><command>flex</command></term> - <listitem> - <para>A tool for generating programs that recognize patterns in text; - it allows for the versatility to specify the rules for pattern-finding, - eradicating the need to develop a specialized program</para> - <indexterm zone="ch-system-flex flex"> - <primary sortas="b-flex">flex</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="flexpp"> - <term><command>flex++</command></term> - <listitem> - <para>An extension of flex, is used for generating C++ code - and classes. It is a symbolic link to <command>flex</command></para> - <indexterm zone="ch-system-flex flexpp"> - <primary sortas="b-flex++">flex++</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lex"> - <term><command>lex</command></term> - <listitem> - <para>A symbolic link that runs <command>flex</command> in - <command>lex</command> emulation mode</para> - <indexterm zone="ch-system-flex lex"> - <primary sortas="b-lex">lex</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libfl"> - <term><filename class="libraryfile">libfl</filename></term> - <listitem> - <para>The <filename class="libraryfile">flex</filename> library</para> - <indexterm zone="ch-system-flex libfl"> - <primary sortas="c-libfl">libfl</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-flex" role="."/></para> </sect2> diff --git a/chapter06/gawk.xml b/chapter06/gawk.xml index b112eb10d..105abdb8e 100644 --- a/chapter06/gawk.xml +++ b/chapter06/gawk.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-gawk" role="wrap"> +<sect1 id="ch-tools-gawk" role="wrap"> <?dbhtml filename="gawk.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Gawk-&gawk-version;</title> - <indexterm zone="ch-system-gawk"> + <indexterm zone="ch-tools-gawk"> <primary sortas="a-Gawk">Gawk</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Gawk package contains programs for manipulating text files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gawk.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gawk-ch6-sbu;</seg> - <seg>&gawk-ch6-du;</seg> + <seg>&gawk-ch5-sbu;</seg> + <seg>&gawk-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -46,82 +49,25 @@ <para>Prepare Gawk for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> - - <para>If desired, install the documentation:</para> - -<screen><userinput remap="install">mkdir -v /usr/share/doc/gawk-&gawk-version; -cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-gawk" role="content"> - <title>Contents of Gawk</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>awk (link to gawk), gawk, and awk-&gawk-version;</seg> - <seg>filefuncs.so, fnmatch.so, fork.so, inplace.so, intdiv.so, ordchr.so, - readdir.so, readfile.so, revoutput.so, revtwoway.so, rwarray.so, - and time.so (all in /usr/lib/gawk)</seg> - <seg>/usr/lib/gawk, /usr/libexec/awk, /usr/share/awk, and - /usr/share/doc/gawk-&gawk-version;</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="awk"> - <term><command>awk</command></term> - <listitem> - <para>A link to <command>gawk</command></para> - <indexterm zone="ch-system-gawk awk"> - <primary sortas="b-awk">awk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gawk"> - <term><command>gawk</command></term> - <listitem> - <para>A program for manipulating text files; it is the GNU - implementation of <command>awk</command></para> - <indexterm zone="ch-system-gawk gawk"> - <primary sortas="b-gawk">gawk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gawk-version"> - <term><command>gawk-&gawk-version;</command></term> - <listitem> - <para>A hard link to <command>gawk</command></para> - <indexterm zone="ch-system-gawk gawk-version"> - <primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-gawk" role="."/></para> </sect2> diff --git a/chapter06/gcc-pass1.xml b/chapter06/gcc-pass1.xml new file mode 100644 index 000000000..1bd308f09 --- /dev/null +++ b/chapter06/gcc-pass1.xml @@ -0,0 +1,208 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-gcc-pass1" role="wrap" xreflabel="gcc-pass1"> + <?dbhtml filename="gcc-pass1.html"?> + + <sect1info condition="script"> + <productname>gcc-pass1</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>GCC-&gcc-version; - Pass 1</title> + + <indexterm zone="ch-tools-gcc-pass1"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, pass 1</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter06/gcc.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&gcc-ch5p1-sbu;</seg> + <seg>&gcc-ch5p1-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Cross GCC</title> + + <para>GCC requires the GMP, MPFR and MPC packages. As these packages may + not be included in your host distribution, they will be built with + GCC. Unpack each package into the GCC source directory and rename the + resulting directories so the GCC build procedures will automatically + use them:</para> + + <note><para>There are frequent misunderstandings about this chapter. The + procedures are the same as every other chapter as explained earlier (<xref + linkend='buildinstr'/>). First extract the gcc tarball from the sources + directory and then change to the directory created. Only then should you + proceed with the instructions below.</para></note> + +<screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz +mv -v mpfr-&mpfr-version; mpfr +tar -xf ../gmp-&gmp-version;.tar.xz +mv -v gmp-&gmp-version; gmp +tar -xf ../mpc-&mpc-version;.tar.gz +mv -v mpc-&mpc-version; mpc</userinput></screen> + + <para>On x86_64 hosts, set the default directory name for + 64-bit libraries to <quote>lib</quote>:</para> + +<screen><userinput remap="pre">case $(uname -m) in + x86_64) + sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 + ;; +esac</userinput></screen> + + <para>The GCC documentation recommends building GCC + in a dedicated build directory:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Prepare GCC for compilation:</para> + +<screen><userinput remap="configure">../configure \ + --target=$LFS_TGT \ + --prefix=$LFS/tools \ + --with-glibc-version=2.11 \ + --with-sysroot=$LFS \ + --with-newlib \ + --without-headers \ + --enable-initfini-array \ + --disable-nls \ + --disable-shared \ + --disable-multilib \ + --disable-decimal-float \ + --disable-threads \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libstdcxx \ + --enable-languages=c,c++</userinput></screen> + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--with-glibc-version=2.11</parameter></term> + <listitem> + <para>This option ensures the package will be compatible with the host's + version of glibc. It is set to the minimum glibc requirement + specified in the <xref linkend="ch-partitioning-hostreqs"/>.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-newlib</parameter></term> + <listitem> + <para>Since a working C library is not yet available, this ensures + that the inhibit_libc constant is defined when building libgcc. This prevents + the compiling of any code that requires libc support.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--without-headers</parameter></term> + <listitem> + <para>When creating a complete cross-compiler, GCC requires + standard headers compatible with the target system. For our + purposes these headers will not be needed. This switch prevents + GCC from looking for them.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-shared</parameter></term> + <listitem> + <para>This switch forces GCC to link its internal libraries + statically. We need this because the shared libraries require glibc, + which is not yet installed on the target system.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-decimal-float, --disable-threads, + --disable-libatomic, --disable-libgomp, <!--- -disable-libmpx,--> + --disable-libquadmath, --disable-libssp, --disable-libvtv, + --disable-libstdcxx</parameter></term> + <listitem> + <para>These switches disable support for the decimal floating point + extension, threading, libatomic, libgomp, <!--libmpx, --> libquadmath, libssp, + libvtv, and the C++ standard library respectively. These features + will fail to compile when building a cross-compiler and are not + necessary for the task of cross-compiling the temporary libc.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-multilib</parameter></term> + <listitem> + <para>On x86_64, LFS does not yet support a multilib configuration. + This switch is harmless for x86.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--enable-languages=c,c++</parameter></term> + <listitem> + <para>This option ensures that only the C and C++ compilers are built. + These are the only languages needed now.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile GCC by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + + <screen><userinput remap="install">make install</userinput></screen> + + <para>This build of GCC has installed a couple of internal system + headers. Normally one of them, <filename>limits.h</filename>, would in turn + include the corresponding system <filename>limits.h</filename> header, in + this case, <filename>$LFS/usr/include/limits.h</filename>. However, at the + time of this build of gcc <filename>$LFS/usr/include/limits.h</filename> + does not exist, so the internal header that has just been installed is a + partial, self-contained file and does not include the extended features of + the system header. This is adequate for building glibc, but the full + internal header will be needed later. Create a full version of the internal + header using a command that is identical to what the GCC build system does + in normal circumstances:</para> + +<screen><userinput remap="install">cd .. +cat gcc/limitx.h gcc/glimits.h gcc/limity.h > \ + `dirname $($LFS_TGT-gcc -print-libgcc-file-name)`/install-tools/include/limits.h</userinput></screen> + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/gcc-pass2.xml b/chapter06/gcc-pass2.xml new file mode 100644 index 000000000..7f7d7a021 --- /dev/null +++ b/chapter06/gcc-pass2.xml @@ -0,0 +1,160 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-gcc-pass2" role="wrap"> + <?dbhtml filename="gcc-pass2.html"?> + + <sect1info condition="script"> + <productname>gcc-pass2</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>GCC-&gcc-version; - Pass 2</title> + + <indexterm zone="ch-tools-gcc-pass2"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, pass 2</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gcc.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&gcc-ch5p2-sbu;</seg> + <seg>&gcc-ch5p2-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of GCC</title> + + <para>As in the first build of GCC, the GMP, MPFR, and MPC packages are + required. Unpack the tarballs and move them into the required directory + names:</para> + +<screen><userinput remap="pre">tar -xf ../mpfr-&mpfr-version;.tar.xz +mv -v mpfr-&mpfr-version; mpfr +tar -xf ../gmp-&gmp-version;.tar.xz +mv -v gmp-&gmp-version; gmp +tar -xf ../mpc-&mpc-version;.tar.gz +mv -v mpc-&mpc-version; mpc</userinput></screen> + + <para>If building on x86_64, change the default directory name for 64-bit + libraries to <quote>lib</quote>:</para> + +<screen><userinput remap="pre">case $(uname -m) in + x86_64) + sed -e '/m64=/s/lib64/lib/' \ + -i.orig gcc/config/i386/t-linux64 + ;; +esac</userinput></screen> + + <para>Fix an issue with GCC-10.1 when building with a cross + compiler:</para> + +<screen><userinput remap="pre">patch -Np1 -i ../&gcc-cross-patch;</userinput></screen> + + <para>Create a separate build directory again:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Create a symlink that allos libgcc to be built with posix threads + support:</para> + +<screen><userinput remap="pre">mkdir -pv $LFS_TGT/libgcc +ln -s ../../../libgcc/gthr-posix.h $LFS_TGT/libgcc/gthr-default.h</userinput></screen> + + <para>Before starting to build GCC, remember to unset any environment + variables that override the default optimization flags.</para> + + <para>Now prepare GCC for compilation:</para> + +<screen><userinput remap="configure">../configure \ + --build=$(../config.guess) \ + --host=$LFS_TGT \ + --prefix=/usr \ + CC_FOR_TARGET=$LFS_TGT-gcc \ + --with-build-sysroot=$LFS \ + --enable-initfini-array \ + --disable-nls \ + --disable-multilib \ + --disable-decimal-float \ + --disable-libatomic \ + --disable-libgomp \ + --disable-libquadmath \ + --disable-libssp \ + --disable-libvtv \ + --disable-libstdcxx \ + --enable-languages=c,c++</userinput></screen> + + <variablelist> + <title>The meaning of the new configure options:</title><!-- WIP --> + + <varlistentry> + <term><parameter>-with-build-sysroot=$LFS</parameter></term> + <listitem> + <para>Normally, using <parameter>--host=</parameter> ensures that + a cross-compiler is used for building gcc, and that compiler knows + that it has to look for headers and libraries in <filename + class="directory">$LFS</filename>. But the build system of GCC uses + other tools, which are not aware of this location. This switch is + needed to have them find the needed files in <filename + class="directory">$LFS</filename>, and not on the host.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--enable-initfini-array</parameter></term> + <listitem> + <para>This option is automatically enabled when building a native + compiler with a native compiler on x86. But here, we build with + a cross compiler, so we need to explicitely set this option.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile the package:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the package:</para> + +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + + <para>As a finishing touch, create a symlink. Many programs and scripts + run <command>cc</command> instead of <command>gcc</command>, which is + used to keep programs generic and therefore usable on all kinds of UNIX + systems where the GNU C compiler is not always installed. Running + <command>cc</command> leaves the system administrator free to decide + which C compiler to install:</para> + +<screen><userinput remap="install">ln -sv gcc $LFS/usr/bin/cc</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/gcc.xml b/chapter06/gcc.xml deleted file mode 100644 index 9e4c53ec5..000000000 --- a/chapter06/gcc.xml +++ /dev/null @@ -1,626 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-gcc" role="wrap"> - <?dbhtml filename="gcc.html"?> - - <sect1info condition="script"> - <productname>gcc</productname> - <productnumber>&gcc-version;</productnumber> - <address>&gcc-url;</address> - </sect1info> - - <title>GCC-&gcc-version;</title> - - <indexterm zone="ch-system-gcc"> - <primary sortas="a-GCC">GCC</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The GCC package contains the GNU compiler collection, which includes - the C and C++ compilers.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gcc-ch6-sbu;</seg> - <seg>&gcc-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of GCC</title> - - <para>If building on x86_64, change the default directory name for 64-bit - libraries to <quote>lib</quote>:</para> - -<screen><userinput remap="pre">case $(uname -m) in - x86_64) - sed -e '/m64=/s/lib64/lib/' \ - -i.orig gcc/config/i386/t-linux64 - ;; -esac</userinput></screen> - - <para>The GCC documentation recommends building GCC in a dedicated build directory:</para> - -<screen><userinput remap="pre">mkdir -v build -cd build</userinput></screen> - - <para>Prepare GCC for compilation:</para> - -<screen><userinput remap="configure">../configure --prefix=/usr \ - LD=ld \ - --enable-languages=c,c++ \ - --disable-multilib \ - --disable-bootstrap \ - --with-system-zlib</userinput></screen> - - <para>Note that for other languages, there are some prerequisites that - are not yet available. See the - <ulink url="&blfs-book;general/gcc.html">BLFS Book</ulink> - for instructions on how to build all of GCC's supported languages.</para> - - <variablelist> - <title>The meaning of the new configure parameter:</title> - - <varlistentry> - <term><parameter>--with-system-zlib</parameter></term> - <listitem> - <para>This switch tells GCC to link to the system installed copy of - the Zlib library, rather than its own internal copy.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <important> - <para>In this section, the test suite for GCC is considered - critical. Do not skip it under any circumstance.</para> - </important> - - <para>One set of tests in the GCC test suite is known to exhaust the stack, - so increase the stack size prior to running the tests:</para> - -<screen><userinput remap="test">ulimit -s 32768</userinput></screen> - - <para>Test the results as a non-privileged user, but do not stop at errors:</para> - -<screen><userinput remap="test">chown -Rv tester . -su tester -c "PATH=$PATH make -k check"</userinput></screen> - - <para>To receive a summary of the test suite results, run:</para> - -<screen><userinput remap="test">../contrib/test_summary</userinput></screen> - - <para>For only the summaries, pipe the output through - <userinput>grep -A7 Summ</userinput>.</para> - - <para>Results can be compared with those located at <ulink - url="&test-results;"/> and - <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para> - - <para>Six tests related to get_time are known to fail. These are - apparently related to the en_HK locale.</para> - - <para>Two tests named lookup.cc and reverse.cc in experimental/net - are known to fail in LFS chroot environment because they require - /etc/hosts and iana-etc.</para> - - <para>A few unexpected failures cannot always be avoided. The GCC developers - are usually aware of these issues, but have not resolved them yet. - Unless the test results are vastly different from those at the above URL, - it is safe to continue.</para> - - <!--note><para> - On some combinations of kernel configuration and AMD processors - there may be more than 1100 failures in the gcc.target/i386/mpx - tests (which are designed to test the MPX option on recent - Intel processors). These can safely be ignored on AMD - processors. These tests will also fail on Intel processors if MPX support - is not enabled in the kernel even though it is present on the CPU. - </para></note--> - - <para>Install the package and remove an unneeded directory:</para> - -<screen><userinput remap="install">make install -rm -rf /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include-fixed/bits/</userinput></screen> - - <para>The GCC build directory is owned by <systemitem class="username"> - tester</systemitem> now and the ownership of the installed header - directory (and its content) will be incorrect. Change the ownership to - <systemitem class="username">root</systemitem> user and group:</para> - -<screen><userinput remap="install">chown -v -R root:root \ - /usr/lib/gcc/*linux-gnu/&gcc-version;/include{,-fixed}</userinput></screen> - - <para>Create a symlink required by the <ulink - url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s09.html">FHS</ulink> - for "historical" reasons.</para> - -<screen><userinput remap="install">ln -sv ../usr/bin/cpp /lib</userinput></screen> - <!-- already done earlier - <para>Many packages use the name <command>cc</command> to call the C - compiler. To satisfy those packages, create a symlink:</para> - -<screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen> - --> - <para>Add a compatibility symlink to enable building programs with - Link Time Optimization (LTO):</para> - -<screen><userinput remap="install">install -v -dm755 /usr/lib/bfd-plugins -ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \ - /usr/lib/bfd-plugins/</userinput></screen> - - <para>Now that our final toolchain is in place, it is important to again ensure - that compiling and linking will work as expected. We do this by performing - the same sanity checks as we did earlier in the chapter:</para> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='a'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='b'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='c'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='d'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='e'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='f'])"/> - -<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded -/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded -/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen> - - <para>Depending on your machine architecture, the above may differ slightly, - the difference usually being the name of the directory - after <filename class="directory">/usr/lib/gcc</filename>. The important - thing to look for here is that <command>gcc</command> has found all three - <filename>crt*.o</filename> files under the - <filename class="directory">/usr/lib</filename> directory.</para> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='g'])"/> - -<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='h'])"/> - -<screen><computeroutput>#include <...> search starts here: - /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include - /usr/local/include - /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed - /usr/include</computeroutput></screen> - - <para>Again, note that the directory named after your target triplet may be - different than the above, depending on your architecture.</para> - -<!-- This appears to be obsolete - - <note><para>As of version 4.3.0, GCC now unconditionally installs the - <filename>limits.h</filename> file into the private - <filename class="directory">include-fixed</filename> directory, and that - directory is required to be in place.</para></note> ---> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='i'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='j'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='k'])"/> - -<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64") -SEARCH_DIR("/usr/local/lib64") -SEARCH_DIR("/lib64") -SEARCH_DIR("/usr/lib64") -SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib") -SEARCH_DIR("/usr/local/lib") -SEARCH_DIR("/lib") -SEARCH_DIR("/usr/lib");</computeroutput></screen> - - <para>A 32-bit system may see a few different directories. For example, here - is the output from an i686 machine:</para> - -<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32") -SEARCH_DIR("/usr/local/lib32") -SEARCH_DIR("/lib32") -SEARCH_DIR("/usr/lib32") -SEARCH_DIR("/usr/i686-pc-linux-gnu/lib") -SEARCH_DIR("/usr/local/lib") -SEARCH_DIR("/lib") -SEARCH_DIR("/usr/lib");</computeroutput></screen> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='l'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='m'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='n'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='o'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='p'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='q'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='r'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='s'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='t'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='u'])"/> - - <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" - href="adjusting.xml" - xpointer="xpointer(//*[@os='v'])"/> - - <para>Finally, move a misplaced file:</para> - -<screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib -mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen> - - </sect2> - - <sect2 id="contents-gcc" role="content"> - <title>Contents of GCC</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>c++, cc (link to gcc), cpp, g++, gcc, - gcc-ar, gcc-nm, gcc-ranlib, gcov, gcov-dump, and gcov-tool</seg> - - <seg>libasan.{a,so}, libatomic.{a,so}, libcc1.so, libgcc.a, libgcc_eh.a, - libgcc_s.so, libgcov.a, libgomp.{a,so}, libitm.{a,so}, - liblsan.{a,so}, liblto_plugin.so, - libquadmath.{a,so}, libssp.{a,so}, libssp_nonshared.a, - libstdc++.{a,so}, libstdc++fs.a, libsupc++.a, libtsan.{a,so}, - and libubsan.{a,so}</seg> - - <seg>/usr/include/c++, /usr/lib/gcc, /usr/libexec/gcc, and - /usr/share/gcc-&gcc-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="c"> - <term><command>c++</command></term> - <listitem> - <para>The C++ compiler</para> - <indexterm zone="ch-system-gcc c"> - <primary sortas="b-c++">c++</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cc"> - <term><command>cc</command></term> - <listitem> - <para>The C compiler</para> - <indexterm zone="ch-system-gcc cc"> - <primary sortas="b-cc">cc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cpp"> - <term><command>cpp</command></term> - <listitem> - <para>The C preprocessor; it is used by the compiler to expand the - #include, #define, and similar statements in the source files</para> - <indexterm zone="ch-system-gcc cpp"> - <primary sortas="b-cpp">cpp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="g"> - <term><command>g++</command></term> - <listitem> - <para>The C++ compiler</para> - <indexterm zone="ch-system-gcc g"> - <primary sortas="b-g++">g++</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcc"> - <term><command>gcc</command></term> - <listitem> - <para>The C compiler</para> - <indexterm zone="ch-system-gcc gcc"> - <primary sortas="b-gcc">gcc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcc-ar"> - <term><command>gcc-ar</command></term> - <listitem> - <para>A wrapper around <command>ar</command> that adds a - plugin to the command line. This program is only used - to add "link time optimization" and is not useful with the - default build options</para> - <indexterm zone="ch-system-gcc gcc-ar"> - <primary sortas="b-gcc-ar">gc-ar</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcc-nm"> - <term><command>gcc-nm</command></term> - <listitem> - <para>A wrapper around <command>nm</command> that adds a - plugin to the command line. This program is only used - to add "link time optimization" and is not useful with the - default build options</para> - <indexterm zone="ch-system-gcc gcc-nm"> - <primary sortas="b-gcc-nm">gc-nm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcc-ranlib"> - <term><command>gcc-ranlib</command></term> - <listitem> - <para>A wrapper around <command>ranlib</command> that adds a - plugin to the command line. This program is only used - to add "link time optimization" and is not useful with the - default build options</para> - <indexterm zone="ch-system-gcc gcc-ranlib"> - <primary sortas="b-gcc-ranlib">gc-ranlib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcov"> - <term><command>gcov</command></term> - <listitem> - <para>A coverage testing tool; it is used to analyze programs to - determine where optimizations will have the most effect</para> - <indexterm zone="ch-system-gcc gcov"> - <primary sortas="b-gcov">gcov</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcov-dump"> - <term><command>gcov-dump</command></term> - <listitem> - <para>Offline gcda and gcno profile dump tool</para> - <indexterm zone="ch-system-gcc gcov-dump"> - <primary sortas="b-gcov-dump">gcov-dump</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gcov-tool"> - <term><command>gcov-tool</command></term> - <listitem> - <para>Offline gcda profile processing tool</para> - <indexterm zone="ch-system-gcc gcov-tool"> - <primary sortas="b-gcov-tool">gcov-tool</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libasan"> - <term><filename class="libraryfile">libasan</filename></term> - <listitem> - <para>The Address Sanitizer runtime library</para> - <indexterm zone="ch-system-gcc libasan"> - <primary sortas="b-libasan">libasan</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libatomic"> - <term><filename class="libraryfile">libatomic</filename></term> - <listitem> - <para>GCC atomic built-in runtime library</para> - <indexterm zone="ch-system-gcc libatomic"> - <primary sortas="b-libatomic">libatomic</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcc1"> - <term><filename class="libraryfile">libcc1</filename></term> - <listitem> - <para>The C preprocessing library</para> - <indexterm zone="ch-system-gcc libcc1"> - <primary sortas="b-libcc1">libcc1</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgcc"> - <term><filename class="libraryfile">libgcc</filename></term> - <listitem> - <para>Contains run-time support for <command>gcc</command></para> - <indexterm zone="ch-system-gcc libgcc"> - <primary sortas="c-libgcc">libgcc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgcov"> - <term><filename class="libraryfile">libgcov</filename></term> - <listitem> - <para>This library is linked in to a program when GCC is instructed - to enable profiling</para> - <indexterm zone="ch-system-gcc libgcov"> - <primary sortas="c-libgcov">libgcov</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgomp"> - <term><filename class="libraryfile">libgomp</filename></term> - <listitem> - <para>GNU implementation of the OpenMP API for multi-platform - shared-memory parallel programming in C/C++ and Fortran</para> - <indexterm zone="ch-system-gcc libgomp"> - <primary sortas="c-libgomp">libgomp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="liblsan"> - <term><filename class="libraryfile">liblsan</filename></term> - <listitem> - <para>The Leak Sanitizer runtime library</para> - <indexterm zone="ch-system-gcc liblsan"> - <primary sortas="c-liblsan">liblsan</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="liblto_plugin"> - <term><filename class="libraryfile">liblto_plugin</filename></term> - <listitem> - <para>GCC's Link Time Optimization (LTO) plugin allows GCC to perform - optimizations across compilation units</para> - <indexterm zone="ch-system-gcc liblto_plugin"> - <primary sortas="c-liblto_plugin">liblto_plugin</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libquadmath"> - <term><filename class="libraryfile">libquadmath</filename></term> - <listitem> - <para>GCC Quad Precision Math Library API</para> - <indexterm zone="ch-system-gcc libquadmath"> - <primary sortas="c-libquadmath">libquadmath</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libssp"> - <term><filename class="libraryfile">libssp</filename></term> - <listitem> - <para>Contains routines supporting GCC's stack-smashing protection - functionality</para> - <indexterm zone="ch-system-gcc libssp"> - <primary sortas="c-libssp">libssp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libstdc"> - <term><filename class="libraryfile">libstdc++</filename></term> - <listitem> - <para>The standard C++ library</para> - <indexterm zone="ch-system-gcc libstdc"> - <primary sortas="c-libstdc++">libstdc++</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libstdcfs"> - <term><filename class="libraryfile">libstdc++fs</filename></term> - <listitem> - <para>ISO/IEC TS 18822:2015 Filesystem library</para> - <indexterm zone="ch-system-gcc libstdcfs"> - <primary sortas="c-libstdc++fs">libstdc++fs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libsupc"> - <term><filename class="libraryfile">libsupc++</filename></term> - <listitem> - <para>Provides supporting routines for the C++ programming - language</para> - <indexterm zone="ch-system-gcc libsupc"> - <primary sortas="c-libsupc++">libsupc++</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libtsan"> - <term><filename class="libraryfile">libtsan</filename></term> - <listitem> - <para>The Thread Sanitizer runtime library</para> - <indexterm zone="ch-system-gcc libtsan"> - <primary sortas="c-libtsan">libtsan</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libubsan"> - <term><filename class="libraryfile">libubsan</filename></term> - <listitem> - <para>The Undefined Behavior Sanitizer runtime library</para> - <indexterm zone="ch-system-gcc libubsan"> - <primary sortas="c-libubsan">libubsan</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/gdbm.xml b/chapter06/gdbm.xml deleted file mode 100644 index f953b63f9..000000000 --- a/chapter06/gdbm.xml +++ /dev/null @@ -1,156 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-gdbm" role="wrap"> - <?dbhtml filename="gdbm.html"?> - - <sect1info condition="script"> - <productname>gdbm</productname> - <productnumber>&gdbm-version;</productnumber> - <address>&gdbm-url;</address> - </sect1info> - - <title>GDBM-&gdbm-version;</title> - - <indexterm zone="ch-system-gdbm"> - <primary sortas="a-Gdbm">GDBM</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The GDBM package contains the GNU Database Manager. It is a library - of database functions that use extensible hashing and work similar to the - standard UNIX dbm. The library provides primitives for storing key/data - pairs, searching and retrieving the data by its key and deleting a key - along with its data. </para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gdbm-ch6-sbu;</seg> - <seg>&gdbm-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of GDBM</title> - - <para>First, fix an issue first identified by gcc-10:</para> - -<screen><userinput remap="pre">sed -r -i '/^char.*parseopt_program_(doc|args)/d' src/parseopt.c</userinput></screen> - - <para>Prepare GDBM for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --enable-libgdbm-compat</userinput></screen> - - <variablelist> - <title>The meaning of the configure option:</title> - - <varlistentry> - <term><envar>--enable-libgdbm-compat</envar></term> - <listitem> - <para>This switch enables the libgdbm compatibility library to be - built, as some packages outside of LFS may require the older DBM - routines it provides.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-gdbm" role="content"> - <title>Contents of GDBM</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - - <seglistitem> - <seg>gdbm_dump, gdbm_load, and gdbmtool</seg> - <seg>libgdbm.so and libgdbm_compat.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="gdbm_dump"> - <term><command>gdbm_dump</command></term> - <listitem> - <para>Dumps a GDBM database to a file</para> - <indexterm zone="ch-system-gdbm gdbm_dump"> - <primary sortas="b-gdbm_dump">gdbm_dump</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gdbm_load"> - <term><command>gdbm_load</command></term> - <listitem> - <para>Recreates a GDBM database from a dump file</para> - <indexterm zone="ch-system-gdbm gdbm_load"> - <primary sortas="b-gdbm_load">gdbm_load</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gdbmtool"> - <term><command>gdbmtool</command></term> - <listitem> - <para>Tests and modifies a GDBM database</para> - <indexterm zone="ch-system-gdbm gdbmtool"> - <primary sortas="b-gdbmtool">gdbmtool</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgdbm"> - <term><filename class="libraryfile">libgdbm</filename></term> - <listitem> - <para>Contains functions to manipulate a hashed database</para> - <indexterm zone="ch-system-gdbm libgdbm"> - <primary sortas="c-libgdbm">libgdbm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgdbm_compat"> - <term><filename class="libraryfile">libgdbm_compat</filename></term> - <listitem> - <para>Compatibility library containing older DBM functions</para> - <indexterm zone="ch-system-gdbm libgdbm_compat"> - <primary sortas="c-libgdbm_compat">libgdbm_compat</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/generalinstructions.xml b/chapter06/generalinstructions.xml new file mode 100644 index 000000000..05b88b98c --- /dev/null +++ b/chapter06/generalinstructions.xml @@ -0,0 +1,120 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-generalinstructions"> + <?dbhtml filename="generalinstructions.html"?> + + <title>General Compilation Instructions</title> + + <para>When building packages there are several assumptions made within + the instructions:</para> + + <itemizedlist> + + <listitem> + <para>Several of the packages are patched before compilation, but only when + the patch is needed to circumvent a problem. A patch is often needed in + both this and the next chapter, but sometimes in only one or the other. + Therefore, do not be concerned if instructions for a downloaded patch seem + to be missing. Warning messages about <emphasis>offset</emphasis> or + <emphasis>fuzz</emphasis> may also be encountered when applying a patch. Do + not worry about these warnings, as the patch was still successfully + applied.</para> + </listitem> + + <listitem> + <para>During the compilation of most packages, there will be several + warnings that scroll by on the screen. These are normal and can safely be + ignored. These warnings are as they appear—warnings about + deprecated, but not invalid, use of the C or C++ syntax. C standards change + fairly often, and some packages still use the older standard. This is not a + problem, but does prompt the warning.</para> + </listitem> + + <listitem> + <para>Check one last time that the <envar>LFS</envar> environment variable + is set up properly:</para> + +<screen role="nodump"><userinput>echo $LFS</userinput></screen> + + <para>Make sure the output shows the path to the LFS partition's mount + point, which is <filename class="directory">/mnt/lfs</filename>, using our + example.</para> + </listitem> + + <listitem> + + <para>Finally, two important items must be emphasized:</para> + + <important> + + <para>The build instructions assume that the <xref + linkend='ch-partitioning-hostreqs'/>, including symbolic links, have + been set properly:</para> + + <itemizedlist role='important'> + + <listitem override='bullet'><para><command>bash</command> is the shell + in use.</para></listitem> + + <listitem override='bullet'><para><command>sh</command> is a symbolic + link to <command>bash</command>.</para></listitem> + + <listitem override='bullet'><para><command>/usr/bin/awk</command> is a + symbolic link to <command>gawk</command>.</para></listitem> + + <listitem override='bullet'><para><command>/usr/bin/yacc</command> is a + symbolic link to <command>bison</command> or a small script that + executes bison.</para></listitem> + + </itemizedlist> + </important> + + <important> + <para>To re-emphasize the build process:</para> + + <orderedlist numeration="arabic" spacing="compact"> + <listitem> + <para>Place all the sources and patches in a directory that will be + accessible from the chroot environment such as + <filename class="directory">/mnt/lfs/sources/</filename>.<!-- Do + <emphasis>not</emphasis> put sources in + <filename class="directory">/mnt/lfs/tools/</filename>. --></para> + </listitem> + <listitem> + <para>Change to the sources directory.</para> + </listitem> + <listitem id='buildinstr' xreflabel='Package build instructions'> + <para>For each package:</para> + <orderedlist numeration="loweralpha" spacing="compact"> + <listitem> + <para>Using the <command>tar</command> program, extract the package + to be built. In Chapter 5, ensure you are the <emphasis>lfs</emphasis> + user when extracting the package.</para> + </listitem> + <listitem> + <para>Change to the directory created when the package was + extracted.</para> + </listitem> + <listitem> + <para>Follow the book's instructions for building the package.</para> + </listitem> + <listitem> + <para>Change back to the sources directory.</para> + </listitem> + <listitem> + <para>Delete the extracted source directory unless instructed otherwise.</para> + </listitem> + </orderedlist> + </listitem> + </orderedlist> + </important> + </listitem> + + </itemizedlist> + +</sect1> diff --git a/chapter06/gettext.xml b/chapter06/gettext.xml index 2c4683804..34d0ee32e 100644 --- a/chapter06/gettext.xml +++ b/chapter06/gettext.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-gettext" role="wrap"> +<sect1 id="ch-tools-gettext" role="wrap"> <?dbhtml filename="gettext.html"?> <sect1info condition="script"> @@ -16,25 +16,25 @@ <title>Gettext-&gettext-version;</title> - <indexterm zone="ch-system-gettext"> + <indexterm zone="ch-tools-gettext"> <primary sortas="a-Gettext">Gettext</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Gettext package contains utilities for internationalization and - localization. These allow programs to be compiled with NLS (Native Language - Support), enabling them to output messages in the user's native - language.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gettext.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gettext-ch6-sbu;</seg> - <seg>&gettext-ch6-du;</seg> + <seg>&gettext-ch5-sbu;</seg> + <seg>&gettext-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,402 +43,42 @@ <sect2 role="installation"> <title>Installation of Gettext</title> - <!-- This has been fixed in upstream gnulib, when a new version of - gettext is released, please check #4055 to see if the change has been - picked up in this package - - As of April 11, 2018, 'TESTS = test-lock' is in gettext-runtime/tests/Makefile.am - Perhaps the test is fixed. + <para>For our temporary set of tools, we only need to install + three programs from Gettext.</para> - There is no reference to 'test' or TEST in gettext-tools/gnulib-tests/Makefile.am - --> - <!-- - <para>First, suppress two invocations of test-lock which on some machines - can loop forever:</para> - -<screen><userinput remap="pre">sed -i '/^TESTS =/d' gettext-runtime/tests/Makefile.in && -sed -i 's/test-lock..EXEEXT.//' gettext-tools/gnulib-tests/Makefile.in</userinput></screen>--> - - <!-- As of April 11, 2018 appdata.* is NOT in git master, but appears - to be in metainfo.{its,loc}, When updating, check BLFS gnome-screenshot. --> - -<!-- - <para>Now fix a configuration file:</para> - -<screen><userinput remap="pre">sed -e '/AppData/{N;N;p;s/\.appdata\./.metainfo./}' \ - -i gettext-tools/its/appdata.loc</userinput></screen> ---> <para>Prepare Gettext for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen> +<screen><userinput remap="configure">./configure --disable-shared</userinput></screen> - <para>Compile the package:</para> - -<screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen> - - <variablelist> - <title>The meaning of the make parameter:</title> + <variablelist> + <title>The meaning of the configure option:</title> <varlistentry> - <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term> + <term><parameter>--disable-shared</parameter></term> <listitem> - <para>Since bison is not yet installed in /usr, configure hardcodes - the directory containing translations for the bison program (the - "locale" directory) as /tools/share/locale. Passing this variable - to make allows overriding the choice made by configure.</para> + <para>We do not need to install any of the shared Gettext libraries at + this time, therefore there is no need to build them.</para> </listitem> </varlistentry> </variablelist> - <para>To test the results (this takes a long time, around 3 SBUs), - issue:</para> + <para>Compile the package:</para> -<screen><userinput remap="test">make check</userinput></screen> +<screen><userinput remap="make">make</userinput></screen> - <para>Install the package:</para> + <para>Install the <command>msgfmt</command>, <command>msgmerge</command> and + <command>xgettext</command> programs:</para> -<screen><userinput remap="install">make install -chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen> +<screen><userinput remap="install">cp -v gettext-tools/src/{msgfmt,msgmerge,xgettext} /usr/bin</userinput></screen> </sect2> - <sect2 id="contents-gettext" role="content"> - <title>Contents of Gettext</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>autopoint, envsubst, gettext, gettext.sh, - gettextize, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen, - msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq, - ngettext, recode-sr-latin, and xgettext</seg> - <seg>libasprintf.so, libgettextlib.so, libgettextpo.so, - libgettextsrc.so, libtextstyle.so, and preloadable_libintl.so</seg> - <seg>/usr/lib/gettext, /usr/share/doc/gettext-&gettext-version;, - /usr/share/gettext, and /usr/share/gettext-0.19.8</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="autopoint"> - <term><command>autopoint</command></term> - <listitem> - <para>Copies standard Gettext infrastructure files into a source - package</para> - <indexterm zone="ch-system-gettext autopoint"> - <primary sortas="b-autopoint">autopoint</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="envsubst"> - <term><command>envsubst</command></term> - <listitem> - <para>Substitutes environment variables in shell format strings</para> - <indexterm zone="ch-system-gettext envsubst"> - <primary sortas="b-envsubst">envsubst</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gettext"> - <term><command>gettext</command></term> - <listitem> - <para>Translates a natural language message into the user's language - by looking up the translation in a message catalog</para> - <indexterm zone="ch-system-gettext gettext"> - <primary sortas="b-gettext">gettext</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gettext.sh"> - <term><command>gettext.sh</command></term> - <listitem> - <para>Primarily serves as a shell function library for gettext</para> - <indexterm zone="ch-system-gettext gettext.sh"> - <primary sortas="b-gettext.sh">gettext.sh</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gettextize"> - <term><command>gettextize</command></term> - <listitem> - <para>Copies all standard Gettext files into the given top-level - directory of a package to begin internationalizing it</para> - <indexterm zone="ch-system-gettext gettextize"> - <primary sortas="b-gettextize">gettextize</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgattrib"> - <term><command>msgattrib</command></term> - <listitem> - <para>Filters the messages of a translation catalog according to their - attributes and manipulates the attributes</para> - <indexterm zone="ch-system-gettext msgattrib"> - <primary sortas="b-msgattrib">msgattrib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgcat"> - <term><command>msgcat</command></term> - <listitem> - <para>Concatenates and merges the given - <filename class="extension">.po</filename> files</para> - <indexterm zone="ch-system-gettext msgcat"> - <primary sortas="b-msgcat">msgcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgcmp"> - <term><command>msgcmp</command></term> - <listitem> - <para>Compares two <filename class="extension">.po</filename> - files to check that both contain the same set of msgid strings</para> - <indexterm zone="ch-system-gettext msgcmp"> - <primary sortas="b-msgcmp">msgcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgcomm"> - <term><command>msgcomm</command></term> - <listitem> - <para>Finds the messages that are common to the given - <filename class="extension">.po</filename> files</para> - <indexterm zone="ch-system-gettext msgcomm"> - <primary sortas="b-msgcomm">msgcomm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgconv"> - <term><command>msgconv</command></term> - <listitem> - <para>Converts a translation catalog to a different character - encoding</para> - <indexterm zone="ch-system-gettext msgconv"> - <primary sortas="b-msgconv">msgconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgen"> - <term><command>msgen</command></term> - <listitem> - <para>Creates an English translation catalog</para> - <indexterm zone="ch-system-gettext msgen"> - <primary sortas="b-msgen">msgen</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgexec"> - <term><command>msgexec</command></term> - <listitem> - <para>Applies a command to all translations of a translation - catalog</para> - <indexterm zone="ch-system-gettext msgexec"> - <primary sortas="b-msgexec">msgexec</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgfilter"> - <term><command>msgfilter</command></term> - <listitem> - <para>Applies a filter to all translations of a translation - catalog</para> - <indexterm zone="ch-system-gettext msgfilter"> - <primary sortas="b-msgfilter">msgfilter</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgfmt"> - <term><command>msgfmt</command></term> - <listitem> - <para>Generates a binary message catalog from a translation - catalog</para> - <indexterm zone="ch-system-gettext msgfmt"> - <primary sortas="b-msgfmt">msgfmt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msggrep"> - <term><command>msggrep</command></term> - <listitem> - <para>Extracts all messages of a translation catalog that match a - given pattern or belong to some given source files</para> - <indexterm zone="ch-system-gettext msggrep"> - <primary sortas="b-msggrep">msggrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msginit"> - <term><command>msginit</command></term> - <listitem> - <para>Creates a new <filename class="extension">.po</filename> file, - initializing the meta information with values from the user's - environment</para> - <indexterm zone="ch-system-gettext msginit"> - <primary sortas="b-msginit">msginit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgmerge"> - <term><command>msgmerge</command></term> - <listitem> - <para>Combines two raw translations into a single file</para> - <indexterm zone="ch-system-gettext msgmerge"> - <primary sortas="b-msgmerge">msgmerge</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msgunfmt"> - <term><command>msgunfmt</command></term> - <listitem> - <para>Decompiles a binary message catalog into raw translation - text</para> - <indexterm zone="ch-system-gettext msgunfmt"> - <primary sortas="b-msgunfmt">msgunfmt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="msguniq"> - <term><command>msguniq</command></term> - <listitem> - <para>Unifies duplicate translations in a translation catalog</para> - <indexterm zone="ch-system-gettext msguniq"> - <primary sortas="b-msguniq">msguniq</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ngettext"> - <term><command>ngettext</command></term> - <listitem> - <para>Displays native language translations of a textual message whose - grammatical form depends on a number</para> - <indexterm zone="ch-system-gettext ngettext"> - <primary sortas="b-ngettext">ngettext</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="recode-sr-latin"> - <term><command>recode-sr-latin</command></term> - <listitem> - <para>Recodes Serbian text from Cyrillic to Latin script</para> - <indexterm zone="ch-system-gettext recode-sr-latin"> - <primary sortas="b-recode-sr-latin">recode-sr-latin</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xgettext"> - <term><command>xgettext</command></term> - <listitem> - <para>Extracts the translatable message lines from the given source - files to make the first translation template</para> - <indexterm zone="ch-system-gettext xgettext"> - <primary sortas="b-xgettext">xgettext</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libasprintf"> - <term><filename class="libraryfile">libasprintf</filename></term> - <listitem> - <para>defines the <emphasis>autosprintf</emphasis> class, which makes - C formatted output routines usable in C++ programs, for use with the - <emphasis><string></emphasis> strings and the - <emphasis><iostream></emphasis> streams</para> - <indexterm zone="ch-system-gettext libasprintf"> - <primary sortas="c-libasprintf">libasprintf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgettextlib"> - <term><filename class="libraryfile">libgettextlib</filename></term> - <listitem> - <para>a private library containing common routines used by the - various Gettext programs; these are not intended for general use</para> - <indexterm zone="ch-system-gettext libgettextlib"> - <primary sortas="c-libgettextlib">libgettextlib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgettextpo"> - <term><filename class="libraryfile">libgettextpo</filename></term> - <listitem> - <para>Used to write specialized programs that process - <filename class="extension">.po</filename> files; this library is - used when the standard applications shipped with Gettext (such as - <command>msgcomm</command>, <command>msgcmp</command>, - <command>msgattrib</command>, and <command>msgen</command>) will - not suffice</para> - <indexterm zone="ch-system-gettext libgettextpo"> - <primary sortas="c-libgettextpo">libgettextpo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgettextsrc"> - <term><filename class="libraryfile">libgettextsrc</filename></term> - <listitem> - <para>A private library containing common routines used by the - various Gettext programs; these are not intended for general use</para> - <indexterm zone="ch-system-gettext libgettextsrc"> - <primary sortas="c-libgettextsrc">libgettextsrc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libtextstyle"> - <term><filename class="libraryfile">libtextstyle</filename></term> - <listitem> - <para>Text styling library</para> - <indexterm zone="ch-system-gettext libtextstyle"> - <primary sortas="c-libtextstyle">libtextstyle</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - <varlistentry id="preloadable_libintl"> - <term><filename class="libraryfile">preloadable_libintl</filename></term> - <listitem> - <para>A library, intended to be used by LD_PRELOAD that assists - <filename class="libraryfile">libintl</filename> in logging - untranslated messages</para> - <indexterm zone="ch-system-gettext preloadable_libintl"> - <primary sortas="c-preloadable_libintl">preloadable_libintl</primary> - </indexterm> - </listitem> - </varlistentry> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-gettext" role="."/></para> </sect2> diff --git a/chapter06/glibc.xml b/chapter06/glibc.xml index a422c8d3c..5213c23e5 100644 --- a/chapter06/glibc.xml +++ b/chapter06/glibc.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-glibc" role="wrap"> +<sect1 id="ch-tools-glibc" role="wrap"> <?dbhtml filename="glibc.html"?> <sect1info condition="script"> @@ -16,25 +16,25 @@ <title>Glibc-&glibc-version;</title> - <indexterm zone="ch-system-glibc"> + <indexterm zone="ch-tools-glibc"> <primary sortas="a-Glibc">Glibc</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Glibc package contains the main C library. This library provides - the basic routines for allocating memory, searching directories, opening and - closing files, reading and writing files, string handling, pattern matching, - arithmetic, and so on.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter06/glibc.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&glibc-ch6-sbu;</seg> - <seg>&glibc-ch6-du;</seg> + <seg>&glibc-ch5-sbu;</seg> + <seg>&glibc-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,927 +43,187 @@ <sect2 role="installation"> <title>Installation of Glibc</title> + <para>First, create two symbolic links, which are needed for proper + operation of the dynamic library loader:</para> + +<screen><userinput remap="pre">ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64 +ln -sfv ../lib/ld-linux-x86-64.so.2 $LFS/lib64/ld-lsb-x86-64.so.3</userinput></screen> + <para>Some of the Glibc programs use the non-FHS compliant - <filename class="directory">/var/db</filename> directory to store - their runtime data. Apply the following patch to make such programs - store their runtime data in the FHS-compliant locations:</para> + <filename class="directory">/var/db</filename> directory to store their + runtime data. Apply the following patch to make such programs store their + runtime data in the FHS-compliant locations:</para> + +<screen><userinput remap="pre">patch -Np1 -i ../glibc-&glibc-version;-fhs-1.patch</userinput></screen> -<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen> -<!-- - <para>Fix a minor security issue with glob functions:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&glibc-glob-patch;</userinput></screen> ---> -<!-- No longer needed - <para>Fix a problem introduced with the linux-5.2 kernel:</para> - -<screen><userinput remap="pre">sed -i '/asm.socket.h/a# include <linux/sockios.h>' \ - sysdeps/unix/sysv/linux/bits/socket.h</userinput></screen> -=== already done === - <para>Create a symlink for LSB - compliance. Additionally, for x86_64, create a compatibility symlink - required for the dynamic loader to function correctly:</para> - -<screen><userinput remap="pre">case $(uname -m) in - i?86) ln -sfv ld-linux.so.2 /lib/ld-lsb.so.3 - ;; - x86_64) ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64 - ln -sfv ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 - ;; -esac</userinput></screen> - - <para>Remove a file that may be left over from a previous build attempt: - </para> - -<screen><userinput remap="pre">rm -f /usr/include/limits.h</userinput></screen> ---> <para>The Glibc documentation recommends building Glibc in a dedicated build directory:</para> <screen><userinput remap="pre">mkdir -v build cd build</userinput></screen> - <para>Prepare Glibc for compilation:</para> + <para>Next, prepare Glibc for compilation:</para> + +<screen><userinput remap="configure">../configure \ + --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(../scripts/config.guess) \ + --enable-kernel=&min-kernel; \ + --with-headers=$LFS/usr/include \ + libc_cv_slibdir=/lib</userinput></screen> +<!-- + libc_cv_forced_unwind=yes \ + libc_cv_c_cleanup=yes</userinput></screen> --> -<screen><userinput remap="configure">../configure --prefix=/usr \ - --disable-werror \ - --enable-kernel=&min-kernel; \ - --enable-stack-protector=strong \ - --with-headers=/usr/include \ - libc_cv_slibdir=/lib</userinput></screen> - <!-- WIP --> <variablelist> - <title>The meaning of the options and new configure parameters:</title> + <title>The meaning of the configure options:</title> <varlistentry> - <term><parameter>CC="gcc -ffile-prefix-map=$LFS_DIR=$DIR"</parameter></term> + <term><parameter>--host=$LFS_TGT, --build=$(../scripts/config.guess)</parameter></term> <listitem> - <para>Make GCC record any references to files in <filename - class="directory">/usr/lib/gcc/x86_64-lfs-linux-gnu</filename> - in result of the compilation as if the files resided in <filename - class="directory">/usr/lib/gcc/x86_64-pc-linux-gnu</filename>. - This avoids introduction of invalid paths in debugging - symbols.</para> + <para>The combined effect of these switches is that Glibc's build system + configures itself to be cross-compiled, using the cross-linker and + cross-compiler in <filename class="directory">/tools</filename>.</para> </listitem> </varlistentry> <varlistentry> - <term><parameter>--disable-werror</parameter></term> + <term><parameter>--enable-kernel=&min-kernel;</parameter></term> <listitem> - <para>This option disables the -Werror option passed to - GCC. This is necessary for running the test suite.</para> + <para>This tells Glibc to compile the library with support + for &min-kernel; and later Linux kernels. Workarounds for older + kernels are not enabled.</para> </listitem> </varlistentry> <varlistentry> - <term><parameter>--enable-stack-protector=strong</parameter></term> - <listitem> - <para>This option increases system security by adding - extra code to check for buffer overflows, such as stack - smashing attacks.</para> - </listitem> - </varlistentry> -<!-- do we need this one? --> - <varlistentry> - <term><parameter>--with-headers=/usr/include</parameter></term> + <term><parameter>--with-headers=$LFS/usr/include</parameter></term> <listitem> - <para>This option tells the build system where to find the - kernel API headers.</para> + <para>This tells Glibc to compile itself against the headers recently + installed to the usr/include directory, so that it knows exactly what + features the kernel has and can optimize itself accordingly.</para> </listitem> </varlistentry> <varlistentry> <term><parameter>libc_cv_slibdir=/lib</parameter></term> <listitem> - <para>This variable sets the correct library for all - systems. We do not want lib64 to be used.</para> + <para>This ensures that the library is installed in /lib instead + of the default /lib64 on 64 bit machines.</para> </listitem> </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <important> - <para>In this section, the test suite for Glibc is considered critical. - Do not skip it under any circumstance.</para> - </important> - - <para>Generally a few tests do not pass. The test failures listed below - are usually safe to ignore.</para> - -<!-- Use remap="make" here to work around a jhalfs issue. --> -<screen><userinput remap="make">case $(uname -m) in - i?86) ln -sfnv $PWD/elf/ld-linux.so.2 /lib ;; - x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;; -esac</userinput></screen> - - <note><para>The symbolic link above is needed to run the tests at this - stage of building in the chroot environment. It will be overwritten - in the install phase below.</para></note> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>You may see some test failures. The Glibc test suite is - somewhat dependent on the host system. This is a list of the most common - issues seen for some versions of LFS:</para> - - <itemizedlist> - - <listitem> - <para><emphasis>misc/tst-ttyname</emphasis> - is known to fail in the LFS chroot environment.</para> - </listitem> - - <listitem> - <para><emphasis>inet/tst-idna_name_classify</emphasis> - is known to fail in the LFS chroot environment.</para> - </listitem> - - <listitem> - <para><emphasis>posix/tst-getaddrinfo4</emphasis> and - <emphasis>posix/tst-getaddrinfo5</emphasis> - may fail on some architectures.</para> - </listitem> - - <listitem> - <para>The <emphasis>nss/tst-nss-files-hosts-multi</emphasis> - test may fail for reasons that have not been determined.</para> - </listitem> - - <listitem> - <para>The <emphasis>rt/tst-cputimer{1,2,3}</emphasis> tests depend on - the host system kernel. Kernels 4.14.91–4.14.96, - 4.19.13–4.19.18, and 4.20.0–4.20.5 are known to - cause these tests to fail. - </para> - </listitem> - - <listitem> - <para>The math tests sometimes fail when running on - systems where the CPU is not a relatively new Intel or - AMD processor.</para> - </listitem> <!-- - <listitem> - <para>The - <emphasis>nptl/tst-thread-affinity-{pthread,pthread2,sched}</emphasis> - tests may fail for reasons that have not been determined. </para> - </listitem> - - <listitem> - <para>Other tests known to fail on some architectures are - malloc/tst-malloc-usable and nptl/tst-cleanupx4. </para> - </listitem> ---> - </itemizedlist> - - <para>Though it is a harmless message, the install stage of Glibc will - complain about the absence of <filename>/etc/ld.so.conf</filename>. - Prevent this warning with:</para> - -<screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen> - - <para>Fix the generated Makefile to skip an unneeded sanity check - that fails in the LFS partial environment: - </para> - -<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Install the configuration file and runtime directory for - <command>nscd</command>:</para> - -<screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf -mkdir -pv /var/cache/nscd</userinput></screen> - - <para revision="systemd">Install the systemd support files for - <command>nscd</command>:</para> - - <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf -install -v -Dm644 ../nscd/nscd.service /lib/systemd/system/nscd.service</userinput></screen> - - <para>Next, install the locales that can make the system respond in a - different language. None of the locales are required, but if some of them - are missing, the test suites of future packages would skip important - testcases.</para> - - <para>Individual locales can be installed using the - <command>localedef</command> program. E.g., the first - <command>localedef</command> command below combines the - <filename>/usr/share/i18n/locales/cs_CZ</filename> - charset-independent locale definition with the - <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename> - charmap definition and appends the result to the - <filename>/usr/lib/locale/locale-archive</filename> file. - The following instructions will install the minimum set of - locales necessary for the optimal coverage of tests:</para> - -<screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale -localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true -localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8 -localedef -i de_DE -f ISO-8859-1 de_DE -localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro -localedef -i de_DE -f UTF-8 de_DE.UTF-8 -localedef -i el_GR -f ISO-8859-7 el_GR -localedef -i en_GB -f UTF-8 en_GB.UTF-8 -localedef -i en_HK -f ISO-8859-1 en_HK -localedef -i en_PH -f ISO-8859-1 en_PH -localedef -i en_US -f ISO-8859-1 en_US -localedef -i en_US -f UTF-8 en_US.UTF-8 -localedef -i es_MX -f ISO-8859-1 es_MX -localedef -i fa_IR -f UTF-8 fa_IR -localedef -i fr_FR -f ISO-8859-1 fr_FR -localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro -localedef -i fr_FR -f UTF-8 fr_FR.UTF-8 -localedef -i it_IT -f ISO-8859-1 it_IT -localedef -i it_IT -f UTF-8 it_IT.UTF-8 -localedef -i ja_JP -f EUC-JP ja_JP -localedef -i ja_JP -f SHIFT_JIS ja_JP.SIJS 2> /dev/null || true -localedef -i ja_JP -f UTF-8 ja_JP.UTF-8 -localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R -localedef -i ru_RU -f UTF-8 ru_RU.UTF-8 -localedef -i tr_TR -f UTF-8 tr_TR.UTF-8 -localedef -i zh_CN -f GB18030 zh_CN.GB18030 -localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS</userinput></screen> - - <para>In addition, install the locale for your own country, language and - character set.</para> - - <para>Alternatively, install all locales listed in the - <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file - (it includes every locale listed above and many more) at once with the - following time-consuming command:</para> - -<screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen> - - <para>Then use the <command>localedef</command> command to create and - install locales not listed in the - <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file - in the unlikely case you need them.</para> - - <note><para>Glibc now uses libidn2 when resolving internationalized - domain names. This is a run time dependency. If this capability - is needed, the instructions for installing libidn2 are in the - <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>. - </para></note> - - </sect2> - - <sect2 id="conf-glibc" role="configuration"> - <title>Configuring Glibc</title> - - <indexterm zone="conf-glibc"> - <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary> - </indexterm> - - <indexterm zone="conf-glibc"> - <primary sortas="e-/etc/localtime">/etc/localtime</primary> - </indexterm> - - <sect3> - <title>Adding nsswitch.conf</title> - - <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created - because the Glibc defaults do not work well in a networked environment. - </para> - - <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the - following:</para> - -<screen><userinput>cat > /etc/nsswitch.conf << "EOF" -<literal># Begin /etc/nsswitch.conf - -passwd: files -group: files -shadow: files - -hosts: files dns -networks: files - -protocols: files -services: files -ethers: files -rpc: files - -# End /etc/nsswitch.conf</literal> -EOF</userinput></screen> - - </sect3> - - <sect3> - <title>Adding time zone data</title> - - <para>Install and set up the time zone data with the following:</para> -<screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz - -ZONEINFO=/usr/share/zoneinfo -mkdir -pv $ZONEINFO/{posix,right} - -for tz in etcetera southamerica northamerica europe africa antarctica \ - asia australasia backward pacificnew systemv; do - zic -L /dev/null -d $ZONEINFO ${tz} - zic -L /dev/null -d $ZONEINFO/posix ${tz} - zic -L leapseconds -d $ZONEINFO/right ${tz} -done - -cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO -zic -d $ZONEINFO -p America/New_York -unset ZONEINFO</userinput></screen> - - <variablelist> - <title>The meaning of the zic commands:</title> - - <varlistentry> - <term><parameter>zic -L /dev/null ...</parameter></term> - <listitem> - <para>This creates posix time zones, without any leap seconds. It is - conventional to put these in both - <filename class="directory">zoneinfo</filename> and - <filename class="directory">zoneinfo/posix</filename>. It is - necessary to put the POSIX time zones in - <filename class="directory">zoneinfo</filename>, otherwise various - test-suites will report errors. On an embedded system, where space is - tight and you do not intend to ever update the time zones, you could save - 1.9MB by not using the <filename class="directory">posix</filename> - directory, but some applications or test-suites might produce some - failures.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>zic -L leapseconds ...</parameter></term> - <listitem> - <para>This creates right time zones, including leap seconds. On an - embedded system, where space is tight and you do not intend to - ever update the time zones, or care about the correct time, you could - save 1.9MB by omitting the <filename class="directory">right</filename> - directory.</para> - </listitem> - </varlistentry> <varlistentry> - <term><parameter>zic ... -p ...</parameter></term> - <listitem> - <para>This creates the <filename>posixrules</filename> file. We use - New York because POSIX requires the daylight savings time rules - to be in accordance with US rules.</para> - </listitem> - </varlistentry> - </variablelist> - - - <para>One way to determine the local time zone is to run the following - script:</para> - -<screen role="nodump"><userinput>tzselect</userinput></screen> - - <para>After answering a few questions about the location, the script will - output the name of the time zone (e.g., - <emphasis>America/Edmonton</emphasis>). There are also some other possible - time zones listed in <filename - class='directory'>/usr/share/zoneinfo</filename> such as - <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that - are not identified by the script but can be used.</para> - - <para>Then create the <filename>/etc/localtime</filename> file by - running:</para> - -<screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable><xxx></replaceable> /etc/localtime</userinput></screen> - - <para>Replace <replaceable><xxx></replaceable> with the name of the - time zone selected (e.g., Canada/Eastern).</para> - - </sect3> - - <sect3 id="conf-ld" role="configuration"> - <title>Configuring the Dynamic Loader</title> - - <indexterm zone="conf-ld"> - <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary> - </indexterm> - - <para>By default, the dynamic loader (<filename - class="libraryfile">/lib/ld-linux.so.2</filename>) searches through - <filename class="directory">/lib</filename> and <filename - class="directory">/usr/lib</filename> for dynamic libraries that are - needed by programs as they are run. However, if there are libraries in - directories other than <filename class="directory">/lib</filename> and - <filename class="directory">/usr/lib</filename>, these need to be added - to the <filename>/etc/ld.so.conf</filename> file in order for the - dynamic loader to find them. Two directories that are commonly known - to contain additional libraries are <filename - class="directory">/usr/local/lib</filename> and <filename - class="directory">/opt/lib</filename>, so add those directories to the - dynamic loader's search path.</para> - - <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the - following:</para> - -<screen><userinput>cat > /etc/ld.so.conf << "EOF" -<literal># Begin /etc/ld.so.conf -/usr/local/lib -/opt/lib -</literal> -EOF</userinput></screen> - - <para>If desired, the dynamic loader can also search a directory and - include the contents of files found there. Generally the files in - this include directory are one line specifying the desired library path. - To add this capability run the following commands:</para> - -<screen role="nodump"><userinput>cat >> /etc/ld.so.conf << "EOF" -<literal># Add an include directory -include /etc/ld.so.conf.d/*.conf -</literal> -EOF -mkdir -pv /etc/ld.so.conf.d</userinput></screen> - - </sect3> - </sect2> - - <sect2 id="contents-glibc" role="content"> - <title>Contents of Glibc</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig, - ldd, lddlibc4, locale, localedef, makedb, mtrace, nscd, - pcprofiledump, pldd, sln, sotruss, sprof, tzselect, xtrace, - zdump, and zic</seg> - <seg>ld-&glibc-version;.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so}, - libc.{a,so}, libc_nonshared.a, - libcrypt.{a,so}, libdl.{a,so}, libg.a, libm.{a,so}, - libmcheck.a, libmemusage.so, libmvec.{a,so}, libnsl.{a,so}, - libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so, - libpcprofile.so, libpthread.{a,so}, - libpthread_nonshared.a, libresolv.{a,so}, librt.{a,so}, - libthread_db.so, and libutil.{a,so}</seg> - <seg>/usr/include/arpa, /usr/include/bits, /usr/include/gnu, - /usr/include/net, /usr/include/netash, /usr/include/netatalk, - /usr/include/netax25, /usr/include/neteconet, /usr/include/netinet, - /usr/include/netipx, /usr/include/netiucv, /usr/include/netpacket, - /usr/include/netrom, /usr/include/netrose, /usr/include/nfs, - /usr/include/protocols, /usr/include/rpc, - /usr/include/sys, /usr/lib/audit, /usr/lib/gconv, /usr/lib/locale, - /usr/libexec/getconf, /usr/share/i18n, /usr/share/zoneinfo, - /var/cache/nscd, and /var/lib/nss_db</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="catchsegv"> - <term><command>catchsegv</command></term> - <listitem> - <para>Can be used to create a stack trace when a program - terminates with a segmentation fault</para> - <indexterm zone="ch-system-glibc catchsegv"> - <primary sortas="b-catchsegv">catchsegv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gencat"> - <term><command>gencat</command></term> - <listitem> - <para>Generates message catalogues</para> - <indexterm zone="ch-system-glibc gencat"> - <primary sortas="b-gencat">gencat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getconf"> - <term><command>getconf</command></term> - <listitem> - <para>Displays the system configuration values for file system - specific variables</para> - <indexterm zone="ch-system-glibc getconf"> - <primary sortas="b-getconf">getconf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getent"> - <term><command>getent</command></term> - <listitem> - <para>Gets entries from an administrative database</para> - <indexterm zone="ch-system-glibc getent"> - <primary sortas="b-getent">getent</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="iconv"> - <term><command>iconv</command></term> - <listitem> - <para>Performs character set conversion</para> - <indexterm zone="ch-system-glibc iconv"> - <primary sortas="b-iconv">iconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="iconvconfig"> - <term><command>iconvconfig</command></term> - <listitem> - <para>Creates fastloading <command>iconv</command> module configuration - files</para> - <indexterm zone="ch-system-glibc iconvconfig"> - <primary sortas="b-iconvconfig">iconvconfig</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ldconfig"> - <term><command>ldconfig</command></term> - <listitem> - <para>Configures the dynamic linker runtime bindings</para> - <indexterm zone="ch-system-glibc ldconfig"> - <primary sortas="b-ldconfig">ldconfig</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ldd"> - <term><command>ldd</command></term> - <listitem> - <para>Reports which shared libraries are required - by each given program or shared library</para> - <indexterm zone="ch-system-glibc ldd"> - <primary sortas="b-ldd">ldd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lddlibc4"> - <term><command>lddlibc4</command></term> - <listitem> - <para>Assists <command>ldd</command> with object files</para> - <indexterm zone="ch-system-glibc lddlibc4"> - <primary sortas="b-lddlibc4">lddlibc4</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="locale"> - <term><command>locale</command></term> + <term><parameter>libc_cv_c_cleanup=yes</parameter></term> <listitem> - <para>Prints various information about the current locale</para> - <indexterm zone="ch-system-glibc locale"> - <primary sortas="b-locale">locale</primary> - </indexterm> + <para>Similarly, we pass libc_cv_c_cleanup=yes through to the + <command>configure</command> script so that the test is skipped and C + cleanup handling support is configured.</para> </listitem> </varlistentry> - <varlistentry id="localedef"> - <term><command>localedef</command></term> - <listitem> - <para>Compiles locale specifications</para> - <indexterm zone="ch-system-glibc localedef"> - <primary sortas="b-localedef">localedef</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="makedb"> - <term><command>makedb</command></term> - <listitem> - <para>Creates a simple database from textual input</para> - <indexterm zone="ch-system-glibc makedb"> - <primary sortas="b-makedb">makedb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mtrace"> - <term><command>mtrace</command></term> - <listitem> - <para>Reads and interprets a memory trace file and displays a summary - in human-readable format</para> - <indexterm zone="ch-system-glibc mtrace"> - <primary sortas="b-mtrace">mtrace</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nscd"> - <term><command>nscd</command></term> - <listitem> - <para>A daemon that provides a cache for the most common name - service requests</para> - <indexterm zone="ch-system-glibc nscd"> - <primary sortas="b-nscd">nscd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pcprofiledump"> - <term><command>pcprofiledump</command></term> + <varlistentry> + <term><parameter>libc_cv_ctors_header=yes</parameter></term> <listitem> - <para>Dump information generated by PC profiling</para> - <indexterm zone="ch-system-glibc pcprofiledump"> - <primary sortas="b-pcprofiledump">pcprofiledump</primary> - </indexterm> + <para>Similarly, we pass libc_cv_ctors_header=yes through to the + <command>configure</command> script so that the test is skipped and + gcc constructor support is configured.</para> </listitem> - </varlistentry> + </varlistentry>--> - <varlistentry id="pldd"> - <term><command>pldd</command></term> - <listitem> - <para>Lists dynamic shared objects used by running processes</para> - <indexterm zone="ch-system-glibc pldd"> - <primary sortas="b-pldd">pldd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sln"> - <term><command>sln</command></term> - <listitem> - <para>A statically linked <command>ln</command> program</para> - <indexterm zone="ch-system-glibc sln"> - <primary sortas="b-sln">sln</primary> - </indexterm> - </listitem> - </varlistentry> + </variablelist> - <varlistentry id="sotruss"> - <term><command>sotruss</command></term> - <listitem> - <para>Traces shared library procedure calls of a specified command</para> - <indexterm zone="ch-system-glibc sotruss"> - <primary sortas="b-sotruss">sotruss</primary> - </indexterm> - </listitem> - </varlistentry> + <para>During this stage the following warning might appear:</para> - <varlistentry id="sprof"> - <term><command>sprof</command></term> - <listitem> - <para>Reads and displays shared object profiling data</para> - <indexterm zone="ch-system-glibc sprof"> - <primary sortas="b-sprof">sprof</primary> - </indexterm> - </listitem> - </varlistentry> + <blockquote> +<screen><computeroutput>configure: WARNING: +*** These auxiliary programs are missing or +*** incompatible versions: msgfmt +*** some features will be disabled. +*** Check the INSTALL file for required versions.</computeroutput></screen> + </blockquote> - <varlistentry id="tzselect"> - <term><command>tzselect</command></term> - <listitem> - <para>Asks the user about the location of the system and reports - the corresponding time zone description</para> - <indexterm zone="ch-system-glibc tzselect"> - <primary sortas="b-tzselect">tzselect</primary> - </indexterm> - </listitem> - </varlistentry> + <para>The missing or incompatible <command>msgfmt</command> program is + generally harmless. This <command>msgfmt</command> program is part of the + Gettext package which the host distribution should provide.</para> - <varlistentry id="xtrace"> - <term><command>xtrace</command></term> - <listitem> - <para>Traces the execution of a program by printing the currently - executed function</para> - <indexterm zone="ch-system-glibc xtrace"> - <primary sortas="b-xtrace">xtrace</primary> - </indexterm> - </listitem> - </varlistentry> + <note><para>There have been reports that this package may fail when + building as a "parallel make". If this occurs, rerun the make command + with a "-j1" option.</para></note> - <varlistentry id="zdump"> - <term><command>zdump</command></term> - <listitem> - <para>The time zone dumper</para> - <indexterm zone="ch-system-glibc zdump"> - <primary sortas="b-zdump">zdump</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Compile the package:</para> - <varlistentry id="zic"> - <term><command>zic</command></term> - <listitem> - <para>The time zone compiler</para> - <indexterm zone="ch-system-glibc zic"> - <primary sortas="b-zic">zic</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput remap="make">make</userinput></screen> - <varlistentry id="ld.so"> - <term><filename class="libraryfile">ld-&glibc-version;.so</filename></term> - <listitem> - <para>The helper program for shared library executables</para> - <indexterm zone="ch-system-glibc ld.so"> - <primary sortas="c-ld.so">ld-&glibc-version;.so</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Install the package:</para> - <varlistentry id="libBrokenLocale"> - <term><filename class="libraryfile">libBrokenLocale</filename></term> - <listitem> - <para>Used internally by Glibc as a gross hack to get broken programs - (e.g., some Motif applications) running. See comments in - <filename>glibc-&glibc-version;/locale/broken_cur_max.c</filename> - for more information</para> - <indexterm zone="ch-system-glibc libBrokenLocale"> - <primary sortas="c-libBrokenLocale">libBrokenLocale</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - <varlistentry id="libSegFault"> - <term><filename class="libraryfile">libSegFault</filename></term> - <listitem> - <para>The segmentation fault signal handler, used by - <command>catchsegv</command></para> - <indexterm zone="ch-system-glibc libSegFault"> - <primary sortas="c-libSegFault">libSegFault</primary> - </indexterm> - </listitem> - </varlistentry> + <variablelist> + <title>The meaning of the <command>make install</command> option:</title> - <varlistentry id="libanl"> - <term><filename class="libraryfile">libanl</filename></term> + <varlistentry> + <term><parameter>DESTDIR=$LFS</parameter></term> <listitem> - <para>An asynchronous name lookup library</para> - <indexterm zone="ch-system-glibc libanl"> - <primary sortas="c-libanl">libanl</primary> - </indexterm> + <para>The <envar>DESTDIR</envar> make variable is used by almost all + packages to define the location where the package should be + installed. If it is not set, it defaults to the root (<filename + class="directory">/</filename>) directory. Here we specify that + the package be installed in <filename class="directory">$LFS + </filename>, which will become the root after <xref linkend= + "ch-tools-chroot"/>.</para> </listitem> </varlistentry> - <varlistentry id="libc"> - <term><filename class="libraryfile">libc</filename></term> - <listitem> - <para>The main C library</para> - <indexterm zone="ch-system-glibc libc"> - <primary sortas="c-libc">libc</primary> - </indexterm> - </listitem> - </varlistentry> + </variablelist> - <varlistentry id="libcrypt"> - <term><filename class="libraryfile">libcrypt</filename></term> - <listitem> - <para>The cryptography library</para> - <indexterm zone="ch-system-glibc libcrypt"> - <primary sortas="c-libcrypt">libcrypt</primary> - </indexterm> - </listitem> - </varlistentry> + <caution> + <para>At this point, it is imperative to stop and ensure that the basic + functions (compiling and linking) of the new toolchain are working as + expected. To perform a sanity check, run the following commands:</para> - <varlistentry id="libdl"> - <term><filename class="libraryfile">libdl</filename></term> - <listitem> - <para>The dynamic linking interface library</para> - <indexterm zone="ch-system-glibc libdl"> - <primary sortas="c-libdl">libdl</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput>echo 'int main(){}' > dummy.c +$LFS_TGT-gcc dummy.c +readelf -l a.out | grep '/ld-linux'</userinput></screen> - <varlistentry id="libg"> - <term><filename class="libraryfile">libg</filename></term> - <listitem> - <para>Dummy library containing no functions. Previously was a runtime - library for <command>g++</command></para> - <indexterm zone="ch-system-glibc libg"> - <primary sortas="c-libg">libg</primary> - </indexterm> - </listitem> - </varlistentry> + <para>If everything is working correctly, there should be no errors, + and the output of the last command will be of the form:</para> - <varlistentry id="libm"> - <term><filename class="libraryfile">libm</filename></term> - <listitem> - <para>The mathematical library</para> - <indexterm zone="ch-system-glibc libm"> - <primary sortas="c-libm">libm</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen> - <varlistentry id="libmcheck"> - <term><filename class="libraryfile">libmcheck</filename></term> - <listitem> - <para>Turns on memory allocation checking when linked to</para> - <indexterm zone="ch-system-glibc libmcheck"> - <primary sortas="c-libmcheck">libmcheck</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Note that for 32-bit machines, the interpreter name will be + <filename>/lib/ld-linux.so.2</filename>.</para> - <varlistentry id="libmemusage"> - <term><filename class="libraryfile">libmemusage</filename></term> - <listitem> - <para>Used by <command>memusage</command> to help collect - information about the memory usage of a program</para> - <indexterm zone="ch-system-glibc libmemusage"> - <primary sortas="c-libmemusage">libmemusage</primary> - </indexterm> - </listitem> - </varlistentry> + <para>If the output is not shown as above or there was no output at all, + then something is wrong. Investigate and retrace the steps to find out + where the problem is and correct it. This issue must be resolved before + continuing on.</para> - <varlistentry id="libnsl"> - <term><filename class="libraryfile">libnsl</filename></term> - <listitem> - <para>The network services library</para> - <indexterm zone="ch-system-glibc libnsl"> - <primary sortas="c-libnsl">libnsl</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Once all is well, clean up the test files:</para> - <varlistentry id="libnss"> - <term><filename class="libraryfile">libnss</filename></term> - <listitem> - <para>The Name Service Switch libraries, containing functions for - resolving host names, user names, group names, aliases, services, - protocols, etc.</para> - <indexterm zone="ch-system-glibc libnss"> - <primary sortas="c-libnss">libnss</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput>rm -v dummy.c a.out</userinput></screen> - <varlistentry id="libpcprofile"> - <term><filename class="libraryfile">libpcprofile</filename></term> - <listitem> - <para>Can be preloaded to PC profile an executable</para> - <indexterm zone="ch-system-glibc libpcprofile"> - <primary sortas="c-libpcprofile">libpcprofile</primary> - </indexterm> - </listitem> - </varlistentry> + </caution> - <varlistentry id="libpthread"> - <term><filename class="libraryfile">libpthread</filename></term> - <listitem> - <para>The POSIX threads library</para> - <indexterm zone="ch-system-glibc libpthread"> - <primary sortas="c-libpthread">libpthread</primary> - </indexterm> - </listitem> - </varlistentry> + <note><para>Building packages in the next sections will serve as an + additional check that the toolchain has been built properly. If some + package, especially binutils-pass2 or gcc-pass2, fails to build, it is + an indication that something has gone wrong with the + previous Binutils, GCC, or Glibc installations.</para></note> - <varlistentry id="libresolv"> - <term><filename class="libraryfile">libresolv</filename></term> - <listitem> - <para>Contains functions for creating, sending, and interpreting - packets to the Internet domain name servers</para> - <indexterm zone="ch-system-glibc libresolv"> - <primary sortas="c-libresolv">libresolv</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Now that our cross-toolchain is complete, finalize the installation + of the limits.h header. For doing so, run an utility provided by the GCC + developers:</para> - <varlistentry id="librt"> - <term><filename class="libraryfile">librt</filename></term> - <listitem> - <para>Contains functions providing most of the interfaces specified - by the POSIX.1b Realtime Extension</para> - <indexterm zone="ch-system-glibc librt"> - <primary sortas="c-librt">librt</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen> - <varlistentry id="libthread_db"> - <term><filename class="libraryfile">libthread_db</filename></term> - <listitem> - <para>Contains functions useful for building debuggers for - multi-threaded programs</para> - <indexterm zone="ch-system-glibc libthread_db"> - <primary sortas="c-libthread_db">libthread_db</primary> - </indexterm> - </listitem> - </varlistentry> + </sect2> - <varlistentry id="libutil"> - <term><filename class="libraryfile">libutil</filename></term> - <listitem> - <para>Contains code for <quote>standard</quote> functions used in - many different Unix utilities</para> - <indexterm zone="ch-system-glibc libutil"> - <primary sortas="c-libutil">libutil</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-glibc" role="."/></para> </sect2> diff --git a/chapter06/gmp.xml b/chapter06/gmp.xml deleted file mode 100644 index 4bc361a56..000000000 --- a/chapter06/gmp.xml +++ /dev/null @@ -1,164 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-gmp" role="wrap"> - <?dbhtml filename="gmp.html"?> - - <sect1info condition="script"> - <productname>gmp</productname> - <productnumber>&gmp-version;</productnumber> - <address>&gmp-url;</address> - </sect1info> - - <title>GMP-&gmp-version;</title> - - <indexterm zone="ch-system-gmp"> - <primary sortas="a-GMP">GMP</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The GMP package contains math libraries. These have useful functions - for arbitrary precision arithmetic.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gmp-ch6-sbu;</seg> - <seg>&gmp-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of GMP</title> - - <note> - <para>If you are building for 32-bit x86, but you have a CPU which is - capable of running 64-bit code <emphasis>and</emphasis> you have specified - <envar>CFLAGS</envar> in the environment, the configure script will - attempt to configure for 64-bits and fail. - Avoid this by invoking the configure command below with -<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para> - </note> - - <note> - <para>The default settings of GMP produce libraries optimized for - the host processor. If libraries suitable for processors less - capable than the host's CPU are desired, generic libraries can be - created by running the following: - -<screen role="nodump"><userinput>cp -v configfsf.guess config.guess -cp -v configfsf.sub config.sub</userinput></screen></para> - </note> - - <para>Prepare GMP for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --enable-cxx \ - --disable-static \ - --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>--enable-cxx</parameter></term> - <listitem> - <para>This parameter enables C++ support</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term> - <listitem> - <para>This variable specifies the correct place for the - documentation.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package and generate the HTML documentation:</para> - -<screen><userinput remap="make">make -make html</userinput></screen> - - <important> - <para>The test suite for GMP in this section is considered critical. - Do not skip it under any circumstances.</para> - </important> - - <para>Test the results:</para> - -<screen><userinput remap="test">make check 2>&1 | tee gmp-check-log</userinput></screen> - - <caution><para>The code in gmp is highly optimized for the processor where - it is built. Occasionally, the code that detects the processor misidentifies - the system capabilities and there will be errors in the tests or other - applications using the gmp libraries with the message "Illegal - instruction". In this case, gmp should be reconfigured with the option - --build=x86_64-unknown-linux-gnu and rebuilt.</para></caution> - - <para>Ensure that all 197 tests in the test suite passed. - Check the results by issuing the following command:</para> - -<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen> - - <para>Install the package and its documentation:</para> - -<screen><userinput remap="install">make install -make install-html</userinput></screen> - - </sect2> - - <sect2 id="contents-gmp" role="content"> - <title>Contents of GMP</title> - - <segmentedlist> - <segtitle>Installed Libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>libgmp.so and libgmpxx.so</seg> - <seg>/usr/share/doc/gmp-&gmp-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libgmp"> - <term><filename class="libraryfile">libgmp</filename></term> - <listitem> - <para>Contains precision math functions</para> - <indexterm zone="ch-system-gmp libgmp"> - <primary sortas="c-libgmp">libgmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libgmpxx"> - <term><filename class="libraryfile">libgmpxx</filename></term> - <listitem> - <para>Contains C++ precision math functions</para> - <indexterm zone="ch-system-gmp libgmpxx"> - <primary sortas="c-libgmpxx">libgmpxx</primary> - </indexterm> - </listitem> - </varlistentry> - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/gperf.xml b/chapter06/gperf.xml deleted file mode 100644 index d8c5b6594..000000000 --- a/chapter06/gperf.xml +++ /dev/null @@ -1,95 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-gperf" role="wrap"> - <?dbhtml filename="gperf.html"?> - - <sect1info condition="script"> - <productname>gperf</productname> - <productnumber>&gperf-version;</productnumber> - <address>&gperf-url;</address> - </sect1info> - - <title>Gperf-&gperf-version;</title> - - <indexterm zone="ch-system-gperf"> - <primary sortas="a-Gperf">Gperf</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>Gperf generates a perfect hash function from a key set.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&gperf-ch6-sbu;</seg> - <seg>&gperf-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Gperf</title> - - <para>Prepare Gperf for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/gperf-&gperf-version;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>The tests are known to fail if running multiple - simultaneous tests (-j option greater than 1). To test - the results, issue:</para> - -<screen><userinput remap="test">make -j1 check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-gperf" role="content"> - <title>Contents of Gperf</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>gperf</seg> - <seg>/usr/share/doc/gperf-&gperf-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="gperf"> - <term><command>gperf</command></term> - <listitem> - <para>Generates a perfect hash from a key set</para> - <indexterm zone="ch-system-gperf gperf"> - <primary sortas="b-gperf">gperf</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/grep.xml b/chapter06/grep.xml index 58b0db366..6a8ada4b8 100644 --- a/chapter06/grep.xml +++ b/chapter06/grep.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-grep" role="wrap"> +<sect1 id="ch-tools-grep" role="wrap"> <?dbhtml filename="grep.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Grep-&grep-version;</title> - <indexterm zone="ch-system-grep"> + <indexterm zone="ch-tools-grep"> <primary sortas="a-Grep">Grep</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Grep package contains programs for searching through files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/grep.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&grep-ch6-sbu;</seg> - <seg>&grep-ch6-du;</seg> + <seg>&grep-ch5-sbu;</seg> + <seg>&grep-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -42,69 +45,25 @@ <para>Prepare Grep for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --bindir=/bin</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-grep" role="content"> - <title>Contents of Grep</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>egrep, fgrep, and grep</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="egrep"> - <term><command>egrep</command></term> - <listitem> - <para>Prints lines matching an extended regular expression</para> - <indexterm zone="ch-system-grep egrep"> - <primary sortas="b-egrep">egrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fgrep"> - <term><command>fgrep</command></term> - <listitem> - <para>Prints lines matching a list of fixed strings</para> - <indexterm zone="ch-system-grep fgrep"> - <primary sortas="b-fgrep">fgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grep"> - <term><command>grep</command></term> - <listitem> - <para>Prints lines matching a basic regular expression</para> - <indexterm zone="ch-system-grep grep"> - <primary sortas="b-grep">grep</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-grep" role="."/></para> </sect2> diff --git a/chapter06/groff.xml b/chapter06/groff.xml deleted file mode 100644 index aad0cbf85..000000000 --- a/chapter06/groff.xml +++ /dev/null @@ -1,607 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-groff" role="wrap"> - <?dbhtml filename="groff.html"?> - - <sect1info condition="script"> - <productname>groff</productname> - <productnumber>&groff-version;</productnumber> - <address>&groff-url;</address> - </sect1info> - - <title>Groff-&groff-version;</title> - - <indexterm zone="ch-system-groff"> - <primary sortas="a-Groff">Groff</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Groff package contains programs for processing and formatting - text.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&groff-ch6-sbu;</seg> - <seg>&groff-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Groff</title> - - <para>Groff expects the environment variable <envar>PAGE</envar> to - contain the default paper size. For users in the United States, - <parameter>PAGE=letter</parameter> is appropriate. Elsewhere, - <parameter>PAGE=A4</parameter> may be more suitable. While the default - paper size is configured during compilation, it can be overridden later - by echoing either <quote>A4</quote> or <quote>letter</quote> to the - <filename>/etc/papersize</filename> file.</para> - - <para>Prepare Groff for compilation:</para> - -<screen><userinput remap="configure">PAGE=<replaceable><paper_size></replaceable> ./configure --prefix=/usr</userinput></screen> - - <para>This package does not support parallel build. Compile the package:</para> - -<screen><userinput remap="make">make -j1</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-groff" role="content"> - <title>Contents of Groff</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>addftinfo, afmtodit, chem, eqn, eqn2graph, gdiffmk, glilypond, - gperl, gpinyin, grap2graph, grn, grodvi, groff, groffer, grog, grolbp, - grolj4, gropdf, grops, grotty, hpftodit, indxbib, lkbib, lookbib, - mmroff, neqn, nroff, pdfmom, pdfroff, pfbtops, pic, pic2graph, - post-grohtml, preconv, pre-grohtml, refer, roff2dvi, roff2html, - roff2pdf, roff2ps, roff2text, roff2x, soelim, tbl, tfmtodit, and - troff</seg> - <seg>/usr/lib/groff and /usr/share/doc/groff-&groff-version;, - /usr/share/groff</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="addftinfo"> - <term><command>addftinfo</command></term> - <listitem> - <para>Reads a troff font file and adds some additional font-metric - information that is used by the <command>groff</command> system</para> - <indexterm zone="ch-system-groff addftinfo"> - <primary sortas="b-addftinfo">addftinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="afmtodit"> - <term><command>afmtodit</command></term> - <listitem> - <para>Creates a font file for use with <command>groff</command> and - <command>grops</command></para> - <indexterm zone="ch-system-groff afmtodit"> - <primary sortas="b-afmtodit">afmtodit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chem"> - <term><command>chem</command></term> - <listitem> - <para>Groff preprocessor for producing chemical structure diagrams</para> - <indexterm zone="ch-system-groff chem"> - <primary sortas="b-chem">chem</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="eqn"> - <term><command>eqn</command></term> - <listitem> - <para>Compiles descriptions of equations embedded within troff - input files into commands that are understood by - <command>troff</command></para> - <indexterm zone="ch-system-groff eqn"> - <primary sortas="b-eqn">eqn</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="eqn2graph"> - <term><command>eqn2graph</command></term> - <listitem> - <para>Converts a troff EQN (equation) into a cropped image</para> - <indexterm zone="ch-system-groff eqn2graph"> - <primary sortas="b-eqn2graph">eqn2graph</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gdiffmk"> - <term><command>gdiffmk</command></term> - <listitem> - <para>Marks differences between groff/nroff/troff files</para> - <indexterm zone="ch-system-groff gdiffmk"> - <primary sortas="b-gdiffmk">gdiffmk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="glilypond"> - <term><command>glilypond</command></term> - <listitem> - <para>Transforms sheet music written in the lilypond language into - the groff language</para> - <indexterm zone="ch-system-groff glilypond"> - <primary sortas="b-glilypond">glilypond</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gperl"> - <term><command>gperl</command></term> - <listitem> - <para>Preprocesor for groff, allowing addition of perl code - into groff files</para> - <indexterm zone="ch-system-groff gperl"> - <primary sortas="b-gperl">gperl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gpinyin"> - <term><command>gpinyin</command></term> - <listitem> - <para>Preprocesor for groff, allowing addition of Chinese - European-like language Pinyin into groff files.</para> - <indexterm zone="ch-system-groff gpinyin"> - <primary sortas="b-gpinyin">gpinyin</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grap2graph"> - <term><command>grap2graph</command></term> - <listitem> - <para>Converts a grap diagram into a cropped bitmap image</para> - <indexterm zone="ch-system-groff grap2graph"> - <primary sortas="b-grap2graph">grap2graph</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grn"> - <term><command>grn</command></term> - <listitem> - <para>A <command>groff</command> preprocessor for gremlin files</para> - <indexterm zone="ch-system-groff grn"> - <primary sortas="b-grn">grn</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grodvi"> - <term><command>grodvi</command></term> - <listitem> - <para>A driver for <command>groff</command> that produces TeX dvi - format</para> - <indexterm zone="ch-system-groff grodvi"> - <primary sortas="b-grodvi">grodvi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groff"> - <term><command>groff</command></term> - <listitem> - <para>A front-end to the groff document formatting system; normally, it - runs the <command>troff</command> program and a post-processor - appropriate for the selected device</para> - <indexterm zone="ch-system-groff groff"> - <primary sortas="b-groff">groff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groffer"> - <term><command>groffer</command></term> - <listitem> - <para>Displays groff files and man pages on X and tty terminals</para> - <indexterm zone="ch-system-groff groffer"> - <primary sortas="b-groffer">groffer</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grog"> - <term><command>grog</command></term> - <listitem> - <para>Reads files and guesses which of the <command>groff</command> - options <option>-e</option>, <option>-man</option>, <option>-me</option>, - <option>-mm</option>, <option>-ms</option>, <option>-p</option>, - <option>-s</option>, and <option>-t</option> are required for printing - files, and reports the <command>groff</command> command including those - options</para> - <indexterm zone="ch-system-groff grog"> - <primary sortas="b-grog">grog</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grolbp"> - <term><command>grolbp</command></term> - <listitem> - <para>Is a <command>groff</command> driver for Canon CAPSL printers - (LBP-4 and LBP-8 series laser printers)</para> - <indexterm zone="ch-system-groff grolbp"> - <primary sortas="b-grolbp">grolbp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grolj4"> - <term><command>grolj4</command></term> - <listitem> - <para>Is a driver for <command>groff</command> that produces output - in PCL5 format suitable for an HP LaserJet 4 printer</para> - <indexterm zone="ch-system-groff grolj4"> - <primary sortas="b-grolj4">grolj4</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gropdf"> - <term><command>gropdf</command></term> - <listitem> - <para>Translates the output of GNU <command>troff</command> to - PDF</para> - <indexterm zone="ch-system-groff gropdf"> - <primary sortas="b-gropdf">gropdf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grops"> - <term><command>grops</command></term> - <listitem> - <para>Translates the output of GNU <command>troff</command> to - PostScript</para> - <indexterm zone="ch-system-groff grops"> - <primary sortas="b-grops">grops</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grotty"> - <term><command>grotty</command></term> - <listitem> - <para>Translates the output of GNU <command>troff</command> into - a form suitable for typewriter-like devices</para> - <indexterm zone="ch-system-groff grotty"> - <primary sortas="b-grotty">grotty</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hpftodit"> - <term><command>hpftodit</command></term> - <listitem> - <para>Creates a font file for use with <command>groff -Tlj4</command> - from an HP-tagged font metric file</para> - <indexterm zone="ch-system-groff hpftodit"> - <primary sortas="b-hpftodit">hpftodit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="indxbib"> - <term><command>indxbib</command></term> - <listitem> - <para>Creates an inverted index for the bibliographic databases with a - specified file for use with <command>refer</command>, - <command>lookbib</command>, and <command>lkbib</command></para> - <indexterm zone="ch-system-groff indxbib"> - <primary sortas="b-indxbib">indxbib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lkbib"> - <term><command>lkbib</command></term> - <listitem> - <para>Searches bibliographic databases for references that contain - specified keys and reports any references found</para> - <indexterm zone="ch-system-groff lkbib"> - <primary sortas="b-lkbib">lkbib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lookbib"> - <term><command>lookbib</command></term> - <listitem> - <para>Prints a prompt on the standard error (unless the standard input - is not a terminal), reads a line containing a set of keywords from the - standard input, searches the bibliographic databases in a specified file - for references containing those keywords, prints any references found - on the standard output, and repeats this process until the end of - input</para> - <indexterm zone="ch-system-groff lookbib"> - <primary sortas="b-lookbib">lookbib</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mmroff"> - <term><command>mmroff</command></term> - <listitem> - <para>A simple preprocessor for <command>groff</command></para> - <indexterm zone="ch-system-groff mmroff"> - <primary sortas="b-mmroff">mmroff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="neqn"> - <term><command>neqn</command></term> - <listitem> - <para>Formats equations for American Standard Code for Information - Interchange (ASCII) output</para> - <indexterm zone="ch-system-groff neqn"> - <primary sortas="b-neqn">neqn</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nroff"> - <term><command>nroff</command></term> - <listitem> - <para>A script that emulates the <command>nroff</command> command - using <command>groff</command></para> - <indexterm zone="ch-system-groff nroff"> - <primary sortas="b-nroff">nroff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pdfmom"> - <term><command>pdfmom</command></term> - <listitem> - <para>Is a wrapper around groff that facilitates the production of PDF - documents from files formatted with the mom macros.</para> - <indexterm zone="ch-system-groff pdfmom"> - <primary sortas="b-pdfmom">pdfmom</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pdfroff"> - <term><command>pdfroff</command></term> - <listitem> - <para>Creates pdf documents using groff</para> - <indexterm zone="ch-system-groff pdfroff"> - <primary sortas="b-pdfroff">pdfroff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pfbtops"> - <term><command>pfbtops</command></term> - <listitem> - <para>Translates a PostScript font in <filename - class="extension">.pfb</filename> format to ASCII</para> - <indexterm zone="ch-system-groff pfbtops"> - <primary sortas="b-pfbtops">pfbtops</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pic"> - <term><command>pic</command></term> - <listitem> - <para>Compiles descriptions of pictures embedded within troff or - TeX input files into commands understood by TeX or - <command>troff</command></para> - <indexterm zone="ch-system-groff pic"> - <primary sortas="b-pic">pic</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pic2graph"> - <term><command>pic2graph</command></term> - <listitem> - <para>Converts a PIC diagram into a cropped image</para> - <indexterm zone="ch-system-groff pic2graph"> - <primary sortas="b-pic2graph">pic2graph</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="post-grohtml"> - <term><command>post-grohtml</command></term> - <listitem> - <para>Translates the output of GNU <command>troff</command> to - HTML</para> - <indexterm zone="ch-system-groff post-grohtml"> - <primary sortas="b-post-grohtml">post-grohtml</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="preconv"> - <term><command>preconv</command></term> - <listitem> - <para>Converts encoding of input files to something GNU - <command>troff</command> understands</para> - <indexterm zone="ch-system-groff preconv"> - <primary sortas="b-preconv">preconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pre-grohtml"> - <term><command>pre-grohtml </command></term> - <listitem> - <para>Translates the output of GNU <command>troff</command> to - HTML</para> - <indexterm zone="ch-system-groff pre-grohtml"> - <primary sortas="b-pre-grohtml">pre-grohtml</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="refer"> - <term><command>refer</command></term> - <listitem> - <para>Copies the contents of a file to the standard output, except - that lines between <emphasis>.[</emphasis> and <emphasis>.]</emphasis> - are interpreted as citations, and lines between <emphasis>.R1</emphasis> - and <emphasis>.R2</emphasis> are interpreted as commands for how - citations are to be processed</para> - <indexterm zone="ch-system-groff refer"> - <primary sortas="b-refer">refer</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="roff2dvi"> - <term><command>roff2dvi</command></term> - <listitem> - <para>Transforms roff files into DVI format</para> - <indexterm zone="ch-system-groff roff2dvi"> - <primary sortas="b-roff2dvi">roff2dvi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="roff2html"> - <term><command>roff2html</command></term> - <listitem> - <para>Transforms roff files into HTML format</para> - <indexterm zone="ch-system-groff roff2html"> - <primary sortas="b-roff2html">roff2html</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="roff2pdf"> - <term><command>roff2pdf</command></term> - <listitem> - <para>Transforms roff files into PDFs</para> - <indexterm zone="ch-system-groff roff2pdf"> - <primary sortas="b-roff2pdf">roff2pdf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="roff2ps"> - <term><command>roff2ps</command></term> - <listitem> - <para>Transforms roff files into ps files</para> - <indexterm zone="ch-system-groff roff2ps"> - <primary sortas="b-roff2ps">roff2ps</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="roff2text"> - <term><command>roff2text</command></term> - <listitem> - <para>Transforms roff files into text files</para> - <indexterm zone="ch-system-groff roff2text"> - <primary sortas="b-roff2text">roff2text</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="roff2x"> - <term><command>roff2x</command></term> - <listitem> - <para>Transforms roff files into other formats</para> - <indexterm zone="ch-system-groff roff2x"> - <primary sortas="b-roff2x">roff2x</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="soelim"> - <term><command>soelim</command></term> - <listitem> - <para>Reads files and replaces lines of the form <emphasis>.so - file</emphasis> by the contents of the mentioned - <emphasis>file</emphasis></para> - <indexterm zone="ch-system-groff soelim"> - <primary sortas="b-soelim">soelim</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tbl"> - <term><command>tbl</command></term> - <listitem> - <para>Compiles descriptions of tables embedded within troff input - files into commands that are understood by - <command>troff</command></para> - <indexterm zone="ch-system-groff tbl"> - <primary sortas="b-tbl">tbl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tfmtodit"> - <term><command>tfmtodit</command></term> - <listitem> - <para>Creates a font file for use with <command>groff - -Tdvi</command></para> - <indexterm zone="ch-system-groff tfmtodit"> - <primary sortas="b-tfmtodit">tfmtodit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="troff"> - <term><command>troff</command></term> - <listitem> - <para>Is highly compatible with Unix <command>troff</command>; it - should usually be invoked using the <command>groff</command> command, - which will also run preprocessors and post-processors in the - appropriate order and with the appropriate options</para> - <indexterm zone="ch-system-groff troff"> - <primary sortas="b-troff">troff</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/grub.xml b/chapter06/grub.xml deleted file mode 100644 index 25a61077b..000000000 --- a/chapter06/grub.xml +++ /dev/null @@ -1,374 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-grub" role="wrap"> - <?dbhtml filename="grub.html"?> - - <sect1info condition="script"> - <productname>grub</productname> - <productnumber>&grub-version;</productnumber> - <address>&grub-url;</address> - </sect1info> - - <title>GRUB-&grub-version;</title> - - <indexterm zone="ch-system-grub"> - <primary sortas="a-Grub">GRUB</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The GRUB package contains the GRand Unified Bootloader.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&grub-ch6-sbu;</seg> - <seg>&grub-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of GRUB</title> - - <para>Prepare GRUB for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --sbindir=/sbin \ - --sysconfdir=/etc \ - --disable-efiemu \ - --disable-werror</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>--disable-werror</parameter></term> - <listitem> - <para>This allows the build to complete with warnings introduced - by more recent Flex versions.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-efiemu</parameter></term> - <listitem> - <para>This option minimizes what is built by disabling a feature and - testing programs not needed for LFS.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install -mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen> - - <para>Using GRUB to make your LFS system bootable will be discussed in - <xref linkend="ch-bootable-grub"/>.</para> - - </sect2> - - <sect2 id="contents-gRUB" role="content"> - <title>Contents of GRUB</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - - <seg>grub-bios-setup, grub-editenv, grub-file, grub-fstest, - grub-glue-efi, grub-install, grub-kbdcomp, grub-macbless, - grub-menulst2cfg, grub-mkconfig, - grub-mkimage, grub-mklayout, grub-mknetdir, - grub-mkpasswd-pbkdf2, grub-mkrelpath, grub-mkrescue, grub-mkstandalone, - grub-ofpathname, grub-probe, grub-reboot, grub-render-label, - grub-script-check, - grub-set-default, grub-sparc64-setup, and grub-syslinux2cfg</seg> - - <seg>/usr/lib/grub, /etc/grub.d, /usr/share/grub, and /boot/grub (when grub-install - is first run)</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="grub-bios-setup"> - <term><command>grub-bios-setup</command></term> - <listitem> - <para>Is a helper program for grub-install</para> - <indexterm zone="ch-system-grub grub-bios-setup"> - <primary sortas="b-grub-bios-setup">grub-bios-setup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-editenv"> - <term><command>grub-editenv</command></term> - <listitem> - <para>A tool to edit the environment block</para> - <indexterm zone="ch-system-grub grub-editenv"> - <primary sortas="b-grub-editenv">grub-editenv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-file"> - <term><command>grub-file</command></term> - <listitem> - <para>Checks if FILE is of the specified type.</para> - <indexterm zone="ch-system-grub grub-file"> - <primary sortas="b-grub-file">grub-file</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-fstest"> - <term><command>grub-fstest</command></term> - <listitem> - <para>Tool to debug the filesystem driver</para> - <indexterm zone="ch-system-grub grub-fstest"> - <primary sortas="b-grub-fstest">grub-fstest</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-glue-efi"> - <term><command>grub-glue-efi</command></term> - <listitem> - <para>Processes ia32 and amd64 EFI images and glues them - according to Apple format.</para> - <indexterm zone="ch-system-grub grub-glue-efi"> - <primary sortas="b-grub-glue-efi">grub-glue-efi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-install"> - <term><command>grub-install</command></term> - <listitem> - <para>Install GRUB on your drive</para> - <indexterm zone="ch-system-grub grub-install"> - <primary sortas="b-grub-install">grub-install</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-kbdcomp"> - <term><command>grub-kbdcomp</command></term> - <listitem> - <para>Script that converts an xkb layout into one recognized by - GRUB</para> - <indexterm zone="ch-system-grub grub-kbdcomp"> - <primary sortas="b-grub-kbdcomp">grub-kbdcomp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-macbless"> - <term><command>grub-macbless</command></term> - <listitem> - <para>Mac-style bless on HFS or HFS+ files</para> - <indexterm zone="ch-system-grub grub-macbless"> - <primary sortas="b-grub-macbless">grub-macbless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-menulst2cfg"> - <term><command>grub-menulst2cfg</command></term> - <listitem> - <para>Converts a GRUB Legacy <filename>menu.lst</filename> - into a <filename>grub.cfg</filename> for use with GRUB 2</para> - <indexterm zone="ch-system-grub grub-menulst2cfg"> - <primary sortas="b-grub-menulst2cfg">grub-menulst2cfg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkconfig"> - <term><command>grub-mkconfig</command></term> - <listitem> - <para>Generate a grub config file</para> - <indexterm zone="ch-system-grub grub-mkconfig"> - <primary sortas="b-grub-mkconfig">grub-mkconfig</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkimage"> - <term><command>grub-mkimage</command></term> - <listitem> - <para>Make a bootable image of GRUB</para> - <indexterm zone="ch-system-grub grub-mkimage"> - <primary sortas="b-grub-mkimage">grub-mkimage</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mklayout"> - <term><command>grub-mklayout</command></term> - <listitem> - <para>Generates a GRUB keyboard layout file</para> - <indexterm zone="ch-system-grub grub-mklayout"> - <primary sortas="b-grub-mklayout">grub-mklayout</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mknetdir"> - <term><command>grub-mknetdir</command></term> - <listitem> - <para>Prepares a GRUB netboot directory</para> - <indexterm zone="ch-system-grub grub-mknetdir"> - <primary sortas="b-grub-mknetdir">grub-mknetdir</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkpasswd-pbkdf2"> - <term><command>grub-mkpasswd-pbkdf2</command></term> - <listitem> - <para>Generates an encrypted PBKDF2 password for use in the boot - menu</para> - <indexterm zone="ch-system-grub grub-mkpasswd-pbkdf2"> - <primary sortas="b-grub-mkpasswd-pbkdf2">grub-mkpasswd-pbkdf2</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkrelpath"> - <term><command>grub-mkrelpath</command></term> - <listitem> - <para>Makes a system pathname relative to its root</para> - <indexterm zone="ch-system-grub grub-mkrelpath"> - <primary sortas="b-grub-mkrelpath">grub-mkrelpath</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkrescue"> - <term><command>grub-mkrescue</command></term> - <listitem> - <para>Make a bootable image of GRUB suitable for a floppy disk or CDROM/DVD</para> - <indexterm zone="ch-system-grub grub-mkrescue"> - <primary sortas="b-grub-mkrescue">grub-mkrescue</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-mkstandalone"> - <term><command>grub-mkstandalone</command></term> - <listitem> - <para>Generates a standalone image</para> - <indexterm zone="ch-system-grub grub-mkstandalone"> - <primary sortas="b-grub-mkstandalone">grub-mkstandalone</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-ofpathname"> - <term><command>grub-ofpathname</command></term> - <listitem> - <para>Is a helper program that prints the path of a GRUB device</para> - <indexterm zone="ch-system-grub grub-ofpathname"> - <primary sortas="b-grub-ofpathname">grub-ofpathname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-probe"> - <term><command>grub-probe</command></term> - <listitem> - <para>Probe device information for a given path or device</para> - <indexterm zone="ch-system-grub grub-probe"> - <primary sortas="b-grub-probe">grub-probe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-reboot"> - <term><command>grub-reboot</command></term> - <listitem> - <para>Sets the default boot entry for GRUB for the next boot only</para> - <indexterm zone="ch-system-grub grub-reboot"> - <primary sortas="b-grub-reboot">grub-reboot</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-render-label"> - <term><command>grub-render-label</command></term> - <listitem> - <para>Render Apple .disk_label for Apple Macs</para> - <indexterm zone="ch-system-grub grub-render-label"> - <primary sortas="b-grub-render-label">grub-render-label</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-script-check"> - <term><command>grub-script-check</command></term> - <listitem> - <para>Checks GRUB configuration script for syntax errors</para> - <indexterm zone="ch-system-grub grub-script-check"> - <primary sortas="b-grub-script-check">grub-script-check</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-set-default"> - <term><command>grub-set-default</command></term> - <listitem> - <para>Sets the default boot entry for GRUB</para> - <indexterm zone="ch-system-grub grub-set-default"> - <primary sortas="b-grub-set-default">grub-set-default</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-sparc64-setup"> - <term><command>grub-sparc64-setup</command></term> - <listitem> - <para>Is a helper program for grub-setup</para> - <indexterm zone="ch-system-grub grub-sparc64-setup"> - <primary sortas="b-grub-sparc64-setup">grub-setup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grub-syslinux2cfg"> - <term><command>grub-syslinux2cfg</command></term> - <listitem> - <para>Transform a syslinux config file into grub.cfg format</para> - <indexterm zone="ch-system-grub grub-syslinux2cfg"> - <primary sortas="b-grub-syslinux2cfg">grub-syslinux2cfg</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/gzip.xml b/chapter06/gzip.xml index 09eebbdf7..e5b5d0a37 100644 --- a/chapter06/gzip.xml +++ b/chapter06/gzip.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-gzip" role="wrap"> +<sect1 id="ch-tools-gzip" role="wrap"> <?dbhtml filename="gzip.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Gzip-&gzip-version;</title> - <indexterm zone="ch-system-gzip"> + <indexterm zone="ch-tools-gzip"> <primary sortas="a-Gzip">Gzip</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Gzip package contains programs for compressing and decompressing - files.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/gzip.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&gzip-ch6-sbu;</seg> - <seg>&gzip-ch6-du;</seg> + <seg>&gzip-ch5-sbu;</seg> + <seg>&gzip-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,193 +45,27 @@ <para>Prepare Gzip for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Two tests are known to fail in the LFS environment: - help-version and zmore.</para> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - <para>Move a program that needs to be on the root filesystem:</para> + <para>Move the excutable to its final expected location:</para> -<screen><userinput remap="install">mv -v /usr/bin/gzip /bin</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/bin/gzip $LFS/bin</userinput></screen> </sect2> - <sect2 id="contents-gzip" role="content"> - <title>Contents of Gzip</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>gunzip, gzexe, gzip, uncompress (hard link with gunzip), zcat, zcmp, - zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="gunzip"> - <term><command>gunzip</command></term> - <listitem> - <para>Decompresses gzipped files</para> - <indexterm zone="ch-system-gzip gunzip"> - <primary sortas="b-gunzip">gunzip</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gzexe"> - <term><command>gzexe</command></term> - <listitem> - <para>Creates self-decompressing executable files</para> - <indexterm zone="ch-system-gzip gzexe"> - <primary sortas="b-gzexe">gzexe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gzip"> - <term><command>gzip</command></term> - <listitem> - <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para> - <indexterm zone="ch-system-gzip gzip"> - <primary sortas="b-gzip">gzip</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uncompress"> - <term><command>uncompress</command></term> - <listitem> - <para>Decompresses compressed files</para> - <indexterm zone="ch-system-gzip uncompress"> - <primary sortas="b-uncompress">uncompress</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zcat"> - <term><command>zcat</command></term> - <listitem> - <para>Decompresses the given gzipped files to standard output</para> - <indexterm zone="ch-system-gzip zcat"> - <primary sortas="b-zcat">zcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zcmp"> - <term><command>zcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zcmp"> - <primary sortas="b-zcmp">zcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zdiff"> - <term><command>zdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zdiff"> - <primary sortas="b-zdiff">zdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zegrep"> - <term><command>zegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zegrep"> - <primary sortas="b-zegrep">zegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zfgrep"> - <term><command>zfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zfgrep"> - <primary sortas="b-zfgrep">zfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zforce"> - <term><command>zforce</command></term> - <listitem> - <para>Forces a <filename class="extension">.gz</filename> extension on - all given files that are gzipped files, so that <command>gzip</command> - will not compress them again; this can be useful when file names were - truncated during a file transfer</para> - <indexterm zone="ch-system-gzip zforce"> - <primary sortas="b-zforce">zforce</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zgrep"> - <term><command>zgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zgrep"> - <primary sortas="b-zgrep">zgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zless"> - <term><command>zless</command></term> - <listitem> - <para>Runs <command>less</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zless"> - <primary sortas="b-zless">zless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zmore"> - <term><command>zmore</command></term> - <listitem> - <para>Runs <command>more</command> on gzipped files</para> - <indexterm zone="ch-system-gzip zmore"> - <primary sortas="b-zmore">zmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="znew"> - <term><command>znew</command></term> - <listitem> - <para>Re-compresses files from <command>compress</command> format to - <command>gzip</command> format—<filename - class="extension">.Z</filename> to <filename - class="extension">.gz</filename></para> - <indexterm zone="ch-system-gzip znew"> - <primary sortas="b-znew">znew</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-gzip" role="."/></para> </sect2> diff --git a/chapter06/iana-etc.xml b/chapter06/iana-etc.xml deleted file mode 100644 index 42ab25c34..000000000 --- a/chapter06/iana-etc.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-iana-etc" role="wrap"> - <?dbhtml filename="iana-etc.html"?> - - <sect1info condition="script"> - <productname>iana-etc</productname> - <productnumber>&iana-etc-version;</productnumber> - <address>&iana-etc-url;</address> - </sect1info> - - <title>Iana-Etc-&iana-etc-version;</title> - - <indexterm zone="ch-system-iana-etc"> - <primary sortas="a-Iana-Etc">Iana-Etc</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Iana-Etc package provides data for network services and - protocols.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&iana-etc-ch6-sbu;</seg> - <seg>&iana-etc-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Iana-Etc</title> - - <para>For this package, we only need to copy the files into place:</para> - -<screen><userinput remap="install">cp services protocols /etc</userinput></screen> - - </sect2> - - <sect2 id="contents-iana-etc" role="content"> - <title>Contents of Iana-Etc</title> - - <segmentedlist> - <segtitle>Installed files</segtitle> - - <seglistitem> - <seg>/etc/protocols and /etc/services</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="protocols"> - <term><filename>/etc/protocols</filename></term> - <listitem> - <para>Describes the various DARPA Internet protocols that are - available from the TCP/IP subsystem</para> - <indexterm zone="ch-system-iana-etc"> - <primary sortas="e-/etc/protocols">/etc/protocols</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="services"> - <term><filename>/etc/services</filename></term> - <listitem> - <para>Provides a mapping between friendly textual names for internet - services, and their underlying assigned port numbers and protocol - types</para> - <indexterm zone="ch-system-iana-etc"> - <primary sortas="e-/etc/services">/etc/services</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/inetutils.xml b/chapter06/inetutils.xml deleted file mode 100644 index c8fdd456f..000000000 --- a/chapter06/inetutils.xml +++ /dev/null @@ -1,249 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-inetutils" role="wrap"> - <?dbhtml filename="inetutils.html"?> - - <sect1info condition="script"> - <productname>inetutils</productname> - <productnumber>&inetutils-version;</productnumber> - <address>&inetutils-url;</address> - </sect1info> - - <title>Inetutils-&inetutils-version;</title> - - <indexterm zone="ch-system-inetutils"> - <primary sortas="a-Inetutils">Inetutils</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Inetutils package contains programs for basic networking.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&inetutils-ch6-sbu;</seg> - <seg>&inetutils-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Inetutils</title> - - <para>Prepare Inetutils for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --localstatedir=/var \ - --disable-logger \ - --disable-whois \ - --disable-rcp \ - --disable-rexec \ - --disable-rlogin \ - --disable-rsh \ - --disable-servers</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--disable-logger</parameter></term> - <listitem> - <para>This option prevents Inetutils from installing the - <command>logger</command> program, which is used by scripts to - pass messages to the System Log Daemon. Do not install it because - Util-linux installs a more recent version.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-whois</parameter></term> - <listitem> - <para>This option disables the building of the Inetutils - <command>whois</command> client, which is out of date. Instructions for - a better <command>whois</command> client are in the BLFS book.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-r*</parameter></term> - <listitem> - <para>These parameters disable building obsolete programs that should not - be used due to security issues. The functions provided by these - programs can be provided by the <application>openssh</application> - package in the BLFS book.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-servers</parameter></term> - <listitem> - <para>This disables the installation of the various network servers - included as part of the Inetutils package. These servers are deemed not - appropriate in a basic LFS system. Some are insecure by nature and are - only considered safe on trusted networks. Note that - better replacements are available for many of these servers.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <note><para>One test, libls.sh, may fail in the initial chroot - environment but will pass if the test is rerun after the LFS system - is complete. One test, ping-localhost.sh, will fail if the host - system does not have ipv6 capability.</para></note> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Move some programs so they are available if <filename - class='directory'>/usr</filename> is not accessible:</para> - -<screen><userinput remap="install">mv -v /usr/bin/{hostname,ping,ping6,traceroute} /bin -mv -v /usr/bin/ifconfig /sbin</userinput></screen> - - </sect2> - - <sect2 id="contents-inetutils" role="content"> - <title>Contents of Inetutils</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>dnsdomainname, ftp, ifconfig, hostname, ping, ping6, - talk, telnet, tftp, and traceroute</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="dnsdomainname"> - <term><command>dnsdomainname</command></term> - <listitem> - <para>Show the system's DNS domain name</para> - <indexterm zone="ch-system-inetutils dnsdomainname"> - <primary sortas="b-dnsdomainname">dnsdomainname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ftp"> - <term><command>ftp</command></term> - <listitem> - <para>Is the file transfer protocol program</para> - <indexterm zone="ch-system-inetutils ftp"> - <primary sortas="b-ftp">ftp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hostname"> - <term><command>hostname</command></term> - <listitem> - <para>Reports or sets the name of the host</para> - <indexterm zone="ch-system-inetutils hostname"> - <primary sortas="b-hostname">hostname</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ifconfig"> - <term><command>ifconfig</command></term> - <listitem> - <para>Manages network interfaces</para> - <indexterm zone="ch-system-inetutils ifconfig"> - <primary sortas="b-ifconfig">ifconfig</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ping"> - <term><command>ping</command></term> - <listitem> - <para>Sends echo-request packets and reports how long the replies - take</para> - <indexterm zone="ch-system-inetutils ping"> - <primary sortas="b-ping">ping</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ping6"> - <term><command>ping6</command></term> - <listitem> - <para>A version of <command>ping</command> for IPv6 networks</para> - <indexterm zone="ch-system-inetutils ping6"> - <primary sortas="b-ping6">ping6</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="talk"> - <term><command>talk</command></term> - <listitem> - <para>Is used to chat with another user</para> - <indexterm zone="ch-system-inetutils talk"> - <primary sortas="b-talk">talk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="telnet"> - <term><command>telnet</command></term> - <listitem> - <para>An interface to the TELNET protocol</para> - <indexterm zone="ch-system-inetutils telnet"> - <primary sortas="b-telnet">telnet</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tftp"> - <term><command>tftp</command></term> - <listitem> - <para>A trivial file transfer program</para> - <indexterm zone="ch-system-inetutils tftp"> - <primary sortas="b-tftp">tftp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="traceroute"> - <term><command>traceroute</command></term> - <listitem> - <para>Traces the route your packets take from the host you are - working on to another host on a network, showing all the intermediate - hops (gateways) along the way</para> - <indexterm zone="ch-system-inetutils traceroute"> - <primary sortas="b-traceroute">traceroute</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/intltool.xml b/chapter06/intltool.xml deleted file mode 100644 index 9e9ebad20..000000000 --- a/chapter06/intltool.xml +++ /dev/null @@ -1,141 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-intltool" role="wrap"> - <?dbhtml filename="intltool.html"?> - - <sect1info condition="script"> - <productname>intltool</productname> - <productnumber>&intltool-version;</productnumber> - <address>&intltool-url;</address> - </sect1info> - - <title>Intltool-&intltool-version;</title> - - <indexterm zone="ch-system-intltool"> - <primary sortas="a-Intltool">Intltool</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Intltool is an internationalization tool used for extracting - translatable strings from source files.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&intltool-ch6-sbu;</seg> - <seg>&intltool-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Intltool</title> - - <para>First fix a warning that is caused by perl-5.22 and later:</para> - -<screen><userinput remap="pre">sed -i 's:\\\${:\\\$\\{:' intltool-update.in</userinput></screen> - - <para>Prepare Intltool for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install -install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-&intltool-version;/I18N-HOWTO</userinput></screen> - - </sect2> - - <sect2 id="contents-intltool" role="content"> - <title>Contents of Intltool</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>intltool-extract, intltool-merge, intltool-prepare, - intltool-update, and intltoolize</seg> - <seg>/usr/share/doc/intltool-&intltool-version; and - /usr/share/intltool</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="intltoolize"> - <term><command>intltoolize</command></term> - <listitem> - <para>Prepares a package to use intltool</para> - <indexterm zone="ch-system-intltool intltoolize"> - <primary sortas="b-intltoolize">intltoolize</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="intltool-extract"> - <term><command>intltool-extract</command></term> - <listitem> - <para>Generates header files that can be read by <command>gettext</command></para> - <indexterm zone="ch-system-intltool intltool-extract"> - <primary sortas="b-intltool-extract">intltool-extract</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="intltool-merge"> - <term><command>intltool-merge</command></term> - <listitem> - <para>Merges translated strings into various file types</para> - <indexterm zone="ch-system-intltool intltool-merge"> - <primary sortas="b-intltool-merge">intltool-merge</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="intltool-prepare"> - <term><command>intltool-prepare</command></term> - <listitem> - <para>Updates pot files and merges them with translation files</para> - <indexterm zone="ch-system-intltool intltool-prepare"> - <primary sortas="b-intltool-prepare">intltool-prepare</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="intltool-update"> - <term><command>intltool-update</command></term> - <listitem> - <para>Updates the po template files and merges them with the translations</para> - <indexterm zone="ch-system-intltool intltool-update"> - <primary sortas="b-intltool-update">intltool-update</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/introduction.xml b/chapter06/introduction.xml index c8ccb3908..5614270b2 100644 --- a/chapter06/introduction.xml +++ b/chapter06/introduction.xml @@ -5,70 +5,25 @@ %general-entities; ]> -<sect1 id="ch-system-introduction"> +<sect1 id="ch-tools-introduction"> <?dbhtml filename="introduction.html"?> <title>Introduction</title> - <para>In this chapter, we enter the building site and start constructing the - LFS system in earnest. That is, we chroot into the temporary mini Linux system, - make a few final preparations, and then begin installing the packages.</para> - - <para>The installation of this software is straightforward. Although in many - cases the installation instructions could be made shorter and more generic, - we have opted to provide the full instructions for every package to minimize - the possibilities for mistakes. The key to learning what makes a Linux system - work is to know what each package is used for and why you (or the system) - may need it.</para> - - <para>We do not recommend using optimizations. They can make - a program run slightly faster, but they may also cause compilation - difficulties and problems when running the program. If a package refuses to - compile when using optimization, try to compile it without optimization and - see if that fixes the problem. Even if the package does compile when using - optimization, there is the risk it may have been compiled incorrectly because - of the complex interactions between the code and build tools. Also note that - the <option>-march</option> and <option>-mtune</option> options using values - not specified in the book have not been tested. This may cause problems with - the toolchain packages (Binutils, GCC and Glibc). The small potential gains - achieved in using compiler optimizations are often outweighed by the risks. - First-time builders of LFS are encouraged to build without custom - optimizations. The subsequent system will still run very fast and be stable - at the same time.</para> - - <para>Before the installation instructions, each installation page provides - information about the package, including a concise description of what it - contains, approximately how long it will take to build, and how much disk - space is required during this building process. Following the installation - instructions, there is a list of programs and libraries (along with brief - descriptions of these) that the package installs.</para> - - <note><para>The SBU values and required disk space includes - test suite data for all applicable packages in Chapter 6.</para></note> - - <sect2> - <title>About libraries</title> - - <para>In general, the LFS editors discourage building and installing static - libraries. The original purpose for most static libraries has been made - obsolete in a modern Linux system. In addition linking a static library - into a program can be detrimental. If an update to the library is needed - to remove a security problem, all programs that use the static library will - need to be relinked to the new library. Since the use of static libraries - is not always obvious, the relevant programs (and the procedures needed to - do the linking) may not even be known.</para> - - <para>In the procedures in Chapter 6, we remove or disable installation of - most static libraries. Usually this is done by passing a - <option>--disable-static</option> option to <command>configure</command>. - In other cases, alternate means are needed. In a few cases, especially - glibc and gcc, the use of static libraries remains essential to the general - package building process. </para> - - <para>For a more complete discussion of libraries, see the discussion - <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> - Libraries: Static or shared?</ulink> in the BLFS book.</para> - - </sect2> - + <para>This chapter shows how to build a minimal Linux system. + This system will contain just enough tools to start constructing the final + LFS system in <xref linkend="chapter-building-system"/> and allow a working + environment with more user convenience than a minimum environment would.</para> + + <para>There are two steps in building this minimal system. The first step + is to build a new and host-independent toolchain (compiler, assembler, + linker, libraries, and a few useful utilities). The second step uses this + toolchain to build the other essential tools.</para> +<!-- + <para>The files compiled in this chapter will be installed under the + <filename class="directory">$LFS</filename> directory to keep them + separate from the files installed in the next chapter and the host + production directories. Since the packages compiled here are temporary, + we do not want them to pollute the soon-to-be LFS system.</para> +--> </sect1> diff --git a/chapter06/iproute2.xml b/chapter06/iproute2.xml deleted file mode 100644 index 8b868df65..000000000 --- a/chapter06/iproute2.xml +++ /dev/null @@ -1,322 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-iproute2" role="wrap"> - <?dbhtml filename="iproute2.html"?> - - <sect1info condition="script"> - <productname>iproute2</productname> - <productnumber>&iproute2-version;</productnumber> - <address>&iproute2-url;</address> - </sect1info> - - <title>IPRoute2-&iproute2-version;</title> - - <indexterm zone="ch-system-iproute2"> - <primary sortas="a-IPRoute2">IPRoute2</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The IPRoute2 package contains programs for basic and advanced IPV4-based - networking.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&iproute2-ch6-sbu;</seg> - <seg>&iproute2-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of IPRoute2</title> - - <para>The <command>arpd</command> program included in this package will not - be built since it is dependent on Berkeley DB, which is not installed in - LFS. However, a directory for <command>arpd</command> and a man page will still - be installed. Prevent this by running the commands below. - If the <command>arpd</command> binary is needed, - instructions for compiling Berkeley DB can be found in the BLFS Book at - <ulink url="&blfs-book;server/databases.html#db"/>. - </para> - -<screen><userinput remap="pre">sed -i /ARPD/d Makefile -rm -fv man/man8/arpd.8</userinput></screen> - - <para>It is also necessary to disable building two modules that - requires <ulink url="&blfs-book;postlfs/iptables.html"/>.</para> - -<screen><userinput remap="pre">sed -i 's/.m_ipt.o//' tc/Makefile</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not have a working test suite.</para> -<!-- currently not useful, no tests actually run - <para>This package comes with a test suite, but due to assumptions it makes, - it is not possible to reliably run these tests from within the chroot - environment. If you wish to run these tests after booting into your new LFS - system, ensure you enable <filename>/proc/config.gz</filename> support - in your kernel ("General setup" -> "Enable access to - .config through /proc/config.gz" [CONFIG_IKCONFIG_PROC]), then run - 'make alltests' from the <filename class="directory">testsuite/</filename> - subdirectory.</para>--> - - <para>Install the package:</para> - -<screen><userinput remap="install">make DOCDIR=/usr/share/doc/iproute2-&iproute2-version; install</userinput></screen> - - </sect2> - - <sect2 id="contents-iproute2" role="content"> - <title>Contents of IPRoute2</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>bridge, ctstat (link to lnstat), genl, ifcfg, ifstat, ip, lnstat, - nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss, - and tc</seg> - <seg>/etc/iproute2, /usr/lib/tc, and /usr/share/doc/iproute2-&iproute2-version;, - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bridge"> - <term><command>bridge</command></term> - <listitem> - <para>Configures network bridges</para> - <indexterm zone="ch-system-iproute2 bridge"> - <primary sortas="b-bridge">bridge</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ctstat"> - <term><command>ctstat</command></term> - <listitem> - <para>Connection status utility</para> - <indexterm zone="ch-system-iproute2 ctstat"> - <primary sortas="b-ctstat">ctstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="genl"> - <term><command>genl</command></term> - <listitem> - <para>Generic netlink utility frontend</para> - <indexterm zone="ch-system-iproute2 genl"> - <primary sortas="b-genl">genl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ifcfg"> - <term><command>ifcfg</command></term> - <listitem> - <para>A shell script wrapper for the <command>ip</command> command - [Note that it requires the <command>arping</command> and - <command>rdisk</command> programs from the - iputils package found at <ulink url="http://www.skbuff.net/iputils/"/>.]</para> - <indexterm zone="ch-system-iproute2 ifcfg"> - <primary sortas="b-ifcfg">ifcfg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ifstat"> - <term><command>ifstat</command></term> - <listitem> - <para>Shows the interface statistics, including the amount of - transmitted and received packets by interface</para> - <indexterm zone="ch-system-iproute2 ifstat"> - <primary sortas="b-ifstat">ifstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ip"> - <term><command>ip</command></term> - <listitem> - <para>The main executable. It has several different functions:</para> - - <para><command>ip link <replaceable><device></replaceable></command> - allows users to look at the state of devices and to make changes</para> - - <para><command>ip addr</command> allows users to look at addresses and - their properties, add new addresses, and delete old ones</para> - - <para><command>ip neighbor</command> allows users to look at neighbor - bindings and their properties, add new neighbor entries, and delete - old ones</para> - - <para><command>ip rule</command> allows users to look at the routing - policies and change them</para> - - <para><command>ip route</command> allows users to look at the routing - table and change routing table rules</para> - - <para><command>ip tunnel</command> allows users to look at the IP - tunnels and their properties, and change them</para> - - <para><command>ip maddr</command> allows users to look at the multicast - addresses and their properties, and change them</para> - - <para><command>ip mroute</command> allows users to set, change, or - delete the multicast routing</para> - - <para><command>ip monitor</command> allows users to continuously monitor - the state of devices, addresses and routes</para> - <indexterm zone="ch-system-iproute2 ip"> - <primary sortas="b-ip">ip</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lnstat"> - <term><command>lnstat</command></term> - <listitem> - <para>Provides Linux network statistics; it is a generalized and more - feature-complete replacement for the old <command>rtstat</command> - program</para> - <indexterm zone="ch-system-iproute2 lnstat"> - <primary sortas="b-lnstat">lnstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nstat"> - <term><command>nstat</command></term> - <listitem> - <para>Shows network statistics</para> - <indexterm zone="ch-system-iproute2 nstat"> - <primary sortas="b-nstat">nstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="routef"> - <term><command>routef</command></term> - <listitem> - <para>A component of <command>ip route</command>. This is for flushing - the routing tables</para> - <indexterm zone="ch-system-iproute2 routef"> - <primary sortas="b-routef">routef</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="routel"> - <term><command>routel</command></term> - <listitem> - <para>A component of <command>ip route</command>. This is for listing - the routing tables</para> - <indexterm zone="ch-system-iproute2 routel"> - <primary sortas="b-routel">routel</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rtacct"> - <term><command>rtacct</command></term> - <listitem> - <para>Displays the contents of - <filename>/proc/net/rt_acct</filename></para> - <indexterm zone="ch-system-iproute2 rtacct"> - <primary sortas="b-rtacct">rtacct</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rtmon"> - <term><command>rtmon</command></term> - <listitem> - <para>Route monitoring utility</para> - <indexterm zone="ch-system-iproute2 rtmon"> - <primary sortas="b-rtmon">rtmon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rtpr"> - <term><command>rtpr</command></term> - <listitem> - <para>Converts the output of <command>ip -o</command> back into a - readable form</para> - <indexterm zone="ch-system-iproute2 rtpr"> - <primary sortas="b-rtpr">rtpr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rtstat"> - <term><command>rtstat</command></term> - <listitem> - <para>Route status utility</para> - <indexterm zone="ch-system-iproute2 rtstat"> - <primary sortas="b-rtstat">rtstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ss"> - <term><command>ss</command></term> - <listitem> - <para>Similar to the <command>netstat</command> command; shows active - connections</para> - <indexterm zone="ch-system-iproute2 ss"> - <primary sortas="b-ss">ss</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tc"> - <term><command>tc</command></term> - <listitem> - <para>Traffic Controlling Executable; this is for Quality Of Service - (QOS) and Class Of Service (COS) implementations</para> - - <para><command>tc qdisc</command> allows users to setup the queueing - discipline</para> - - <para><command>tc class</command> allows users to setup classes based - on the queuing discipline scheduling</para> - - <para><command>tc estimator</command> allows users to estimate the - network flow into a network</para> - - <para><command>tc filter</command> allows users to setup the QOS/COS - packet filtering</para> - - <para><command>tc policy</command> allows users to setup the QOS/COS - policies</para> - <indexterm zone="ch-system-iproute2 ss"> - <primary sortas="b-tc">tc</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/kbd.xml b/chapter06/kbd.xml deleted file mode 100644 index 2f9cfd3f1..000000000 --- a/chapter06/kbd.xml +++ /dev/null @@ -1,392 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-kbd" role="wrap"> - <?dbhtml filename="kbd.html"?> - - <sect1info condition="script"> - <productname>kbd</productname> - <productnumber>&kbd-version;</productnumber> - <address>&kbd-url;</address> - </sect1info> - - <title>Kbd-&kbd-version;</title> - - <indexterm zone="ch-system-kbd"> - <primary sortas="a-Kbd">Kbd</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Kbd package contains key-table files, console fonts, and keyboard - utilities.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&kbd-ch6-sbu;</seg> - <seg>&kbd-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Kbd</title> - - <para>The behaviour of the Backspace and Delete keys is not consistent - across the keymaps in the Kbd package. The following patch fixes this - issue for i386 keymaps:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen> - - <para>After patching, the Backspace key generates the character with code 127, - and the Delete key generates a well-known escape sequence.</para> - - <para>Remove the redundant <command>resizecons</command> program (it requires - the defunct svgalib to provide the video mode files - for normal use - <command>setfont</command> sizes the console appropriately) together with its - manpage.</para> - -<screen><userinput remap="pre">sed -i 's/\(RESIZECONS_PROGS=\)yes/\1no/g' configure -sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen> - - <para>Prepare Kbd for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr --disable-vlock</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--disable-vlock</parameter></term> - <listitem> - <para>This option prevents the vlock utility from being built, as it - requires the PAM library, which isn't available in the chroot - environment.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <note> - <para>For some languages (e.g., Belarusian) the Kbd package doesn't - provide a useful keymap where the stock <quote>by</quote> keymap assumes - the ISO-8859-5 encoding, and the CP1251 keymap is normally used. Users of - such languages have to download working keymaps separately.</para> - </note> - - <para>If desired, install the documentation:</para> - -<screen><userinput remap="install">mkdir -v /usr/share/doc/kbd-&kbd-version; -cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version;</userinput></screen> - - </sect2> - - <sect2 id="contents-kbd" role="content"> - <title>Contents of Kbd</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, kbdinfo, - kbd_mode, kbdrate, loadkeys, loadunimap, - mapscrn, openvt, psfaddtable (link to psfxtable), psfgettable (link to - psfxtable), psfstriptable (link to psfxtable), psfxtable, <!--resizecons,--> - setfont, setkeycodes, setleds, setmetamode, setvtrgb, - showconsolefont, showkey, unicode_start, and unicode_stop</seg> - <seg>/usr/share/consolefonts, /usr/share/consoletrans, /usr/share/keymaps, - /usr/share/doc/kbd-&kbd-version;, and /usr/share/unimaps</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="chvt"> - <term><command>chvt</command></term> - <listitem> - <para>Changes the foreground virtual terminal</para> - <indexterm zone="ch-system-kbd chvt"> - <primary sortas="b-chvt">chvt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="deallocvt"> - <term><command>deallocvt</command></term> - <listitem> - <para>Deallocates unused virtual terminals</para> - <indexterm zone="ch-system-kbd deallocvt"> - <primary sortas="b-deallocvt">deallocvt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dumpkeys"> - <term><command>dumpkeys</command></term> - <listitem> - <para>Dumps the keyboard translation tables</para> - <indexterm zone="ch-system-kbd dumpkeys"> - <primary sortas="b-dumpkeys">dumpkeys</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fgconsole"> - <term><command>fgconsole</command></term> - <listitem> - <para>Prints the number of the active virtual terminal</para> - <indexterm zone="ch-system-kbd fgconsole"> - <primary sortas="b-fgconsole">fgconsole</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getkeycodes"> - <term><command>getkeycodes</command></term> - <listitem> - <para>Prints the kernel scancode-to-keycode mapping table</para> - <indexterm zone="ch-system-kbd getkeycodes"> - <primary sortas="b-getkeycodes">getkeycodes</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="kbdinfo"> - <term><command>kbdinfo</command></term> - <listitem> - <para>Obtains information about the status of a console</para> - <indexterm zone="ch-system-kbd kbdinfo"> - <primary sortas="b-kbdinfo">kbdinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="kbd_mode"> - <term><command>kbd_mode</command></term> - <listitem> - <para>Reports or sets the keyboard mode</para> - <indexterm zone="ch-system-kbd kbd_mode"> - <primary sortas="b-kbd_mode">kbd_mode</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="kbdrate"> - <term><command>kbdrate</command></term> - <listitem> - <para>Sets the keyboard repeat and delay rates</para> - <indexterm zone="ch-system-kbd kbdrate"> - <primary sortas="b-kbdrate">kbdrate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="loadkeys"> - <term><command>loadkeys</command></term> - <listitem> - <para>Loads the keyboard translation tables</para> - <indexterm zone="ch-system-kbd loadkeys"> - <primary sortas="b-loadkeys">loadkeys</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="loadunimap"> - <term><command>loadunimap</command></term> - <listitem> - <para>Loads the kernel unicode-to-font mapping table</para> - <indexterm zone="ch-system-kbd loadunimap"> - <primary sortas="b-loadunimap">loadunimap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mapscrn"> - <term><command>mapscrn</command></term> - <listitem> - <para>An obsolete program that used to load a user-defined output - character mapping table into the console driver; this is now done - by <command>setfont</command></para> - <indexterm zone="ch-system-kbd mapscrn"> - <primary sortas="b-mapscrn">mapscrn</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="openvt"> - <term><command>openvt</command></term> - <listitem> - <para>Starts a program on a new virtual terminal (VT)</para> - <indexterm zone="ch-system-kbd openvt"> - <primary sortas="b-openvt">openvt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="psfaddtable"> - <term><command>psfaddtable</command></term> - <listitem> - <para>Adds a Unicode character table to a console font</para> - <indexterm zone="ch-system-kbd psfaddtable"> - <primary sortas="b-psfaddtable">psfaddtable</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="psfgettable"> - <term><command>psfgettable</command></term> - <listitem> - <para>Extracts the embedded Unicode character table from a console - font</para> - <indexterm zone="ch-system-kbd psfgettable"> - <primary sortas="b-psfgettable">psfgettable</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="psfstriptable"> - <term><command>psfstriptable</command></term> - <listitem> - <para>Removes the embedded Unicode character table from a console - font</para> - <indexterm zone="ch-system-kbd psfstriptable"> - <primary sortas="b-psfstriptable">psfstriptable</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="psfxtable"> - <term><command>psfxtable</command></term> - <listitem> - <para>Handles Unicode character tables for console fonts</para> - <indexterm zone="ch-system-kbd psfxtable"> - <primary sortas="b-psfxtable">psfxtable</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setfont"> - <term><command>setfont</command></term> - <listitem> - <para>Changes the Enhanced Graphic Adapter (EGA) and Video Graphics - Array (VGA) fonts on the console</para> - <indexterm zone="ch-system-kbd setfont"> - <primary sortas="b-setfont">setfont</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setkeycodes"> - <term><command>setkeycodes</command></term> - <listitem> - <para>Loads kernel scancode-to-keycode mapping table entries; this is - useful if there are unusual keys on the keyboard</para> - <indexterm zone="ch-system-kbd setkeycodes"> - <primary sortas="b-setkeycodes">setkeycodes</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setleds"> - <term><command>setleds</command></term> - <listitem> - <para>Sets the keyboard flags and Light Emitting Diodes (LEDs)</para> - <indexterm zone="ch-system-kbd setleds"> - <primary sortas="b-setleds">setleds</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setmetamode"> - <term><command>setmetamode</command></term> - <listitem> - <para>Defines the keyboard meta-key handling</para> - <indexterm zone="ch-system-kbd setmetamode"> - <primary sortas="b-setmetamode">setmetamode</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setvtrgb"> - <term><command>setvtrgb</command></term> - <listitem> - <para>Sets the console color map in all virtual terminals</para> - <indexterm zone="ch-system-kbd setvtrgb"> - <primary sortas="b-setvtrgb">setvtrgb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="showconsolefont"> - <term><command>showconsolefont</command></term> - <listitem> - <para>Shows the current EGA/VGA console screen font</para> - <indexterm zone="ch-system-kbd showconsolefont"> - <primary sortas="b-showconsolefont">showconsolefont</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="showkey"> - <term><command>showkey</command></term> - <listitem> - <para>Reports the scancodes, keycodes, and ASCII codes of the keys - pressed on the keyboard</para> - <indexterm zone="ch-system-kbd showkey"> - <primary sortas="b-showkey">showkey</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unicode_start"> - <term><command>unicode_start</command></term> - <listitem> - <para>Puts the keyboard and console in UNICODE mode [Don't use this - program unless your keymap file is in the ISO-8859-1 encoding. For - other encodings, this utility produces incorrect results.]</para> - <indexterm zone="ch-system-kbd unicode_start"> - <primary sortas="b-unicode_start">unicode_start</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unicode_stop"> - <term><command>unicode_stop</command></term> - <listitem> - <para>Reverts keyboard and console from UNICODE mode</para> - <indexterm zone="ch-system-kbd unicode_stop"> - <primary sortas="b-unicode_stop">unicode_stop</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/kernfs.xml b/chapter06/kernfs.xml new file mode 100644 index 000000000..dd6b8991c --- /dev/null +++ b/chapter06/kernfs.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-kernfs"> + <?dbhtml filename="kernfs.html"?> + + <title>Preparing Virtual Kernel File Systems</title> + + <indexterm zone="ch-tools-kernfs"> + <primary sortas="e-/dev/">/dev/*</primary> + </indexterm> + + <para>Various file systems exported by the kernel are used to communicate to + and from the kernel itself. These file systems are virtual in that no disk + space is used for them. The content of the file systems resides in + memory.</para> + + <para>Begin by creating directories onto which the file systems will be + mounted:</para> + +<screen><userinput>mkdir -pv $LFS/{dev,proc,sys,run}</userinput></screen> + + <sect2> + <title>Creating Initial Device Nodes</title> + + <para>When the kernel boots the system, it requires the presence of a few + device nodes, in particular the <filename + class="devicefile">console</filename> and <filename + class="devicefile">null</filename> devices. The device nodes must be created + on the hard disk so that they are available before <command>udevd</command> + has been started, and additionally when Linux is started with + <parameter>init=/bin/bash</parameter>. Create the devices by running the + following commands:</para> + +<screen><userinput>mknod -m 600 $LFS/dev/console c 5 1 +mknod -m 666 $LFS/dev/null c 1 3</userinput></screen> + + </sect2> + + <sect2 id="ch-system-bindmount"> + <title>Mounting and Populating /dev</title> + + <para>The recommended method of populating the <filename + class="directory">/dev</filename> directory with devices is to mount a + virtual filesystem (such as <systemitem + class="filesystem">tmpfs</systemitem>) on the <filename + class="directory">/dev</filename> directory, and allow the devices to be + created dynamically on that virtual filesystem as they are detected or + accessed. Device creation is generally done during the boot process + by Udev. Since this new system does not yet have Udev and has not yet + been booted, it is necessary to mount and populate <filename + class="directory">/dev</filename> manually. This is accomplished by bind + mounting the host system's <filename class="directory">/dev</filename> + directory. A bind mount is a special type of mount that allows you to + create a mirror of a directory or mount point to some other location. Use + the following command to achieve this:</para> + +<screen><userinput>mount -v --bind /dev $LFS/dev</userinput></screen> + + </sect2> + + <sect2 id="ch-system-kernfsmount"> + <title>Mounting Virtual Kernel File Systems</title> + + <para>Now mount the remaining virtual kernel filesystems:</para> + +<screen><userinput>mount -v --bind /dev/pts $LFS/dev/pts +mount -vt proc proc $LFS/proc +mount -vt sysfs sysfs $LFS/sys +mount -vt tmpfs tmpfs $LFS/run</userinput></screen> + + <variablelist> + <title>The meaning of the mount options for devpts:</title> + + <varlistentry> + <term><parameter>gid=5</parameter></term> + <listitem> + <para>This ensures that all devpts-created device nodes are owned by + group ID 5. This is the ID we will use later on for the <systemitem + class="groupname">tty</systemitem> group. We use the group ID instead + of a name, since the host system might use a different ID for its + <systemitem class="groupname">tty</systemitem> group.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>mode=0620</parameter></term> + <listitem> + <para>This ensures that all devpts-created device nodes have mode 0620 + (user readable and writable, group writable). Together with the + option above, this ensures that devpts will create device nodes that + meet the requirements of grantpt(), meaning the Glibc + <command>pt_chown</command> helper binary (which is not installed by + default) is not necessary.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>In some host systems, <filename>/dev/shm</filename> is a + symbolic link to <filename class="directory">/run/shm</filename>. + The /run tmpfs was mounted above so in this case only a + directory needs to be created.</para> + +<screen><userinput>if [ -h $LFS/dev/shm ]; then + mkdir -pv $LFS/$(readlink $LFS/dev/shm) +fi</userinput></screen> + + </sect2> + +</sect1> diff --git a/chapter06/kmod.xml b/chapter06/kmod.xml deleted file mode 100644 index 6cc3eb168..000000000 --- a/chapter06/kmod.xml +++ /dev/null @@ -1,211 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-kmod" role="wrap"> - <?dbhtml filename="kmod.html"?> - - <sect1info condition="script"> - <productname>kmod</productname> - <productnumber>&kmod-version;</productnumber> - <address>&kmod-url;</address> - </sect1info> - - <title>Kmod-&kmod-version;</title> - - <indexterm zone="ch-system-kmod"> - <primary sortas="a-Kmod">Kmod</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Kmod package contains libraries and utilities for loading kernel - modules</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&kmod-ch6-sbu;</seg> - <seg>&kmod-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Kmod</title> - - <para>Prepare Kmod for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --bindir=/bin \ - --sysconfdir=/etc \ - --with-rootlibdir=/lib \ - --with-xz \ - --with-zlib</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--with-xz, --with-zlib</parameter></term> - <listitem> - <para>These options enable Kmod to handle compressed kernel modules.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--with-rootlibdir=/lib</parameter></term> - <listitem> - <para>This option ensures different library related files are placed - in the correct directories.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite that can be run in the - LFS chroot environment. At a minimum the git program is required and - several tests will not run outside of a git repository. </para> - -<!-- - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> ---> - <para>Install the package, and create symlinks for - compatibility with Module-Init-Tools (the package that previously handled - Linux kernel modules):</para> - -<screen><userinput remap="install">make install - -for target in depmod insmod lsmod modinfo modprobe rmmod; do - ln -sfv ../bin/kmod /sbin/$target -done - -ln -sfv kmod /bin/lsmod</userinput></screen> - - </sect2> - - <sect2 id="contents-kmod" role="content"> - <title>Contents of Kmod</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>depmod (link to kmod), insmod (link to kmod), kmod, - lsmod (link to kmod), modinfo (link to kmod), modprobe (link to kmod), - and rmmod (link to kmod)</seg> - <seg>libkmod.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="depmod"> - <term><command>depmod</command></term> - <listitem> - <para>Creates a dependency file based on the symbols it finds in the - existing set of modules; this dependency file is used by - <command>modprobe</command> to automatically load the required - modules</para> - <indexterm zone="ch-system-kmod depmod"> - <primary sortas="b-depmod">depmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="insmod"> - <term><command>insmod</command></term> - <listitem> - <para>Installs a loadable module in the running kernel</para> - <indexterm zone="ch-system-kmod insmod"> - <primary sortas="b-insmod">insmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="kmod"> - <term><command>kmod</command></term> - <listitem> - <para>Loads and unloads kernel modules</para> - <indexterm zone="ch-system-kmod kmod"> - <primary sortas="b-kmod">kmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lsmod"> - <term><command>lsmod</command></term> - <listitem> - <para>Lists currently loaded modules</para> - <indexterm zone="ch-system-kmod lsmod"> - <primary sortas="b-lsmod">lsmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="modinfo"> - <term><command>modinfo</command></term> - <listitem> - <para>Examines an object file associated with a kernel module and - displays any information that it can glean</para> - <indexterm zone="ch-system-kmod modinfo"> - <primary sortas="b-modinfo">modinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="modprobe"> - <term><command>modprobe</command></term> - <listitem> - <para>Uses a dependency file, created by - <command>depmod</command>, to automatically load relevant modules</para> - <indexterm zone="ch-system-kmod modprobe"> - <primary sortas="b-modprobe">modprobe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rmmod"> - <term><command>rmmod</command></term> - <listitem> - <para>Unloads modules from the running kernel</para> - <indexterm zone="ch-system-kmod rmmod"> - <primary sortas="b-rmmod">rmmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libkmod"> - <term><filename class="libraryfile">libkmod</filename></term> - <listitem> - <para>This library is used by other programs to load and unload kernel - modules</para> - <indexterm zone="ch-system-kmod"> - <primary sortas="c-libkmod">libkmod</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> - diff --git a/chapter06/less.xml b/chapter06/less.xml deleted file mode 100644 index 087b2e6a3..000000000 --- a/chapter06/less.xml +++ /dev/null @@ -1,125 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-less" role="wrap"> - <?dbhtml filename="less.html"?> - - <sect1info condition="script"> - <productname>less</productname> - <productnumber>&less-version;</productnumber> - <address>&less-url;</address> - </sect1info> - - <title>Less-&less-version;</title> - - <indexterm zone="ch-system-less"> - <primary sortas="a-Less">Less</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Less package contains a text file viewer.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&less-ch6-sbu;</seg> - <seg>&less-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Less</title> - - <para>Prepare Less for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr --sysconfdir=/etc</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--sysconfdir=/etc</parameter></term> - <listitem> - <para>This option tells the programs created by the package to look - in <filename class="directory">/etc</filename> for the configuration - files.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-less" role="content"> - <title>Contents of Less</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>less, lessecho, and lesskey</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="less"> - <term><command>less</command></term> - <listitem> - <para>A file viewer or pager; it displays the contents of the given - file, letting the user scroll, find strings, and jump to marks</para> - <indexterm zone="ch-system-less less"> - <primary sortas="b-less">less</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lessecho"> - <term><command>lessecho</command></term> - <listitem> - <para>Needed to expand meta-characters, such as <emphasis>*</emphasis> - and <emphasis>?</emphasis>, in filenames on Unix systems</para> - <indexterm zone="ch-system-less lessecho"> - <primary sortas="b-lessecho">lessecho</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lesskey"> - <term><command>lesskey</command></term> - <listitem> - <para>Used to specify the key bindings for <command>less</command></para> - <indexterm zone="ch-system-less lesskey"> - <primary sortas="b-lesskey">lesskey</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/libcap.xml b/chapter06/libcap.xml deleted file mode 100644 index 8126dfaae..000000000 --- a/chapter06/libcap.xml +++ /dev/null @@ -1,166 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-libcap" role="wrap"> - <?dbhtml filename="libcap.html"?> - - <sect1info condition="script"> - <productname>libcap</productname> - <productnumber>&libcap-version;</productnumber> - <address>&libcap-url;</address> - </sect1info> - - <title>Libcap-&libcap-version;</title> - - <indexterm zone="ch-system-libcap"> - <primary sortas="a-Libcap">Libcap</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Libcap package implements the user-space interfaces to the POSIX - 1003.1e capabilities available in Linux kernels. These capabilities are a - partitioning of the all powerful root privilege into a set of distinct - privileges.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&libcap-ch6-sbu;</seg> - <seg>&libcap-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Libcap</title> - - <para>Prevent a static library from being installed:</para> - -<screen><userinput remap="pre">sed -i '/install.*STACAPLIBNAME/d' libcap/Makefile</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make lib=lib</userinput></screen> - - <variablelist> - <title>The meaning of the make option:</title> - - <varlistentry> - <term><parameter>lib=lib</parameter></term> - <listitem> - <para>This parameter sets the library directory to - <filename>/lib</filename> rather than - <filename>/lib64</filename> on x86_64. It has no effect on - x86.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make test</userinput></screen> - - <para>Install the package and do some cleanup:</para> - -<screen><userinput remap="install">make lib=lib PKGCONFIGDIR=/usr/lib/pkgconfig install -chmod -v 755 /lib/libcap.so.&libcap-version; -mv -v /lib/libpsx.a /usr/lib -rm -v /lib/libcap.so -ln -sfv ../../lib/libcap.so.2 /usr/lib/libcap.so</userinput></screen> - - </sect2> - - <sect2 id="contents-libcap" role="content"> - <title>Contents of Libcap</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>capsh, getcap, getpcaps, and setcap</seg> - <seg>libcap.so and libpsx.a</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="capsh"> - <term><command>capsh</command></term> - <listitem> - <para>A shell wrapper to explore and constrain capability support</para> - <indexterm zone="ch-system-libcap capsh"> - <primary sortas="b-capsh">capsh</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getcap"> - <term><command>getcap</command></term> - <listitem> - <para>Examines file capabilities</para> - <indexterm zone="ch-system-libcap getcap"> - <primary sortas="b-getcap">getcap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getpcaps"> - <term><command>getpcaps</command></term> - <listitem> - <para>Displays the capabilities on the queried process(es)</para> - <indexterm zone="ch-system-libcap getpcaps"> - <primary sortas="b-getpcaps">getpcaps</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setcap"> - <term><command>setcap</command></term> - <listitem> - <para>Sets file capabilities</para> - <indexterm zone="ch-system-libcap setcap"> - <primary sortas="b-setcap">setcap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcap"> - <term><filename class="libraryfile">libcap</filename></term> - <listitem> - <para>Contains the library functions for manipulating POSIX 1003.1e - capabilities</para> - <indexterm zone="ch-system-libcap libcap"> - <primary sortas="c-libcap">libcap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libpsx"> - <term><filename class="libraryfile">libpsx</filename></term> - <listitem> - <para>Contains functions to support POSIX semantics for syscalls - associated with the pthread library</para> - <indexterm zone="ch-system-libcap libpsx"> - <primary sortas="c-libpsx">libpsx</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/libelf.xml b/chapter06/libelf.xml deleted file mode 100644 index b559e6aa2..000000000 --- a/chapter06/libelf.xml +++ /dev/null @@ -1,88 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-libelf" role="wrap"> - <?dbhtml filename="libelf.html"?> - - <sect1info condition="script"> - <productname>libelf</productname> - <productnumber>&elfutils-version;</productnumber> - <address>&elfutils-url;</address> - </sect1info> - - <title>Libelf from Elfutils-&elfutils-version;</title> - - <indexterm zone="ch-system-libelf"> - <primary sortas="a-Libelf">Libelf</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>Libelf is a library for handling ELF (Executable and Linkable Format) - files.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&elfutils-ch6-sbu;</seg> - <seg>&elfutils-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Libelf</title> - - <para>Libelf is part of elfutils-&elfutils-version; package. Use - the elfutils-&elfutils-version;.tar.bz2 as the source tarball.</para> - - <para>Prepare Libelf for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr --disable-debuginfod</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - -<!-- <para>One test, run-elfclassify.sh, is known to fail.</para>--> - - <para>Install only Libelf:</para> - -<screen><userinput remap="install">make -C libelf install -install -vm644 config/libelf.pc /usr/lib/pkgconfig -rm /usr/lib/libelf.a</userinput></screen> - - </sect2> - - <sect2 id="contents-elfutils" role="content"> - <title>Contents of Libelf</title> - - <segmentedlist> - <segtitle>Installed Library</segtitle> - <segtitle>Installed Directory</segtitle> - - <seglistitem> - <seg> - libelf.so - </seg> - <seg> - /usr/include/elfutils - </seg> - </seglistitem> - </segmentedlist> - - </sect2> - -</sect1> diff --git a/chapter06/libffi.xml b/chapter06/libffi.xml deleted file mode 100644 index 6a6f8a458..000000000 --- a/chapter06/libffi.xml +++ /dev/null @@ -1,133 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-libffi" role="wrap"> - <?dbhtml filename="libffi.html"?> - - <sect1info condition="script"> - <productname>libffi</productname> - <productnumber>&libffi-version;</productnumber> - <address>&libffi-url;</address> - </sect1info> - - <title>Libffi-&libffi-version;</title> - - <indexterm zone="ch-system-libffi"> - <primary sortas="a-libffi">libffi</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Libffi library provides a portable, high level programming - interface to various calling conventions. This allows a programmer to call - any function specified by a call interface description at run time.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&libffi-ch6-sbu;</seg> - <seg>&libffi-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Libffi</title> - - <note> - <para>Similar to GMP, libffi builds with optimizations specific - to the proccesor in use. If building for another system, export - CFLAGS and CXXFLAGS to specify a generic build for your architecture. - If this is not done, all applications that link to libffi will trigger - Illegal Operation Errors.</para> - </note> -<!-- - <para>Modify the Makefile to install headers into the standard - <filename class="directory">/usr/include</filename> directory instead of - <filename class="directory">/usr/lib/libffi-&libffi-version;/include</filename>.</para> - -<screen><userinput remap="pre">sed -e '/^includesdir/ s/$(libdir).*$/$(includedir)/' \ - -i include/Makefile.in - -sed -e '/^includedir/ s/=.*$/=@includedir@/' \ - -e 's/^Cflags: -I${includedir}/Cflags:/' \ - -i libffi.pc.in</userinput></screen> ---> - <para>Prepare libffi for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr --disable-static --with-gcc-arch=native</userinput></screen> - - <variablelist> - <title>The meaning of the configure option:</title> - - <varlistentry> - <term><parameter>--with-gcc-arch=native</parameter></term> - <listitem> - <para>Ensure gcc optimizes for the current system. If this - is not specified, the system is guessed and the code generated - may not be correct for some systems. If the generated code - will be copied from the native system to a less capable - system, use the less capable system as a parameter. For details - about alternative system types, see <ulink - url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'> - the x86 options in the gcc manual</ulink>.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Six tests, all related to test-callback.c, are known to fail.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-libffi" role="content"> - <title>Contents of Libffi</title> - - <segmentedlist> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>libffi.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libffi"> - <term><filename class="libraryfile">libffi</filename></term> - <listitem> - <para>contains the libffi API functions.</para> - <indexterm zone="ch-system-libffi"> - <primary sortas="c-libffi">libffi</primary> - </indexterm> - </listitem> - </varlistentry> - </variablelist> - - </sect2> - -</sect1> - diff --git a/chapter06/libpipeline.xml b/chapter06/libpipeline.xml deleted file mode 100644 index eb5a19438..000000000 --- a/chapter06/libpipeline.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-libpipeline" role="wrap"> - <?dbhtml filename="libpipeline.html"?> - - <sect1info condition="script"> - <productname>libpipeline</productname> - <productnumber>&libpipeline-version;</productnumber> - <address>&libpipeline-url;</address> - </sect1info> - - <title>Libpipeline-&libpipeline-version;</title> - - <indexterm zone="ch-system-libpipeline"> - <primary sortas="a-Libpipeline">Libpipeline</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Libpipeline package contains a library for manipulating pipelines - of subprocesses in a flexible and convenient way.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&libpipeline-ch6-sbu;</seg> - <seg>&libpipeline-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Libpipeline</title> - - <para>Prepare Libpipeline for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-libpipeline" role="content"> - <title>Contents of Libpipeline</title> - - <segmentedlist> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>libpipeline.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libpipeline"> - <term><filename class="libraryfile">libpipeline</filename></term> - <listitem> - <para>This library is used to safely construct pipelines between - subprocesses</para> - <indexterm zone="ch-system-libpipeline"> - <primary sortas="c-libpipeline">libpipeline</primary> - </indexterm> - </listitem> - </varlistentry> - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/libstdc++-pass2.xml b/chapter06/libstdc++-pass2.xml new file mode 100644 index 000000000..999a4fa4e --- /dev/null +++ b/chapter06/libstdc++-pass2.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-libstdcpp-pass2" role="wrap"> + <?dbhtml filename="gcc-libstdc++-pass2.html"?> + + <sect1info condition="script"> + <productname>gcc-libstdc++</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>Libstdc++ from GCC-&gcc-version;, Pass 2</title> + + <indexterm zone="ch-tools-libstdcpp-pass2"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, libstdc++ pass 2</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>Again, when building <xref linkend="ch-tools-gcc-pass2"/>, we had to + defer the installation of the C++ standard library, because no suitable + compiler was available to compile it: we could not use the compiler + installed, because this compiler is a native + compiler, and should not be used outside of chroot without being at + risk of polluting the build with some host components.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <!-- TODO --> + <seglistitem> + <seg>&libstdcpp-ch5-sbu;</seg> + <seg>&libstdcpp-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Target Libstdc++</title> + + <note> + <para><application>Libstdc++</application> is part of the GCC sources. + You should first unpack the GCC tarball and change to the + <filename>gcc-&gcc-version;</filename> directory.</para> + </note> + + <para>Create a link which exists when building Libstdc++ in the gcc + tree:</para> + +<screen><userinput remap="pre">ln -s gthr-posix.h libgcc/gthr-default.h</userinput></screen> + + <para>Create a separate build directory for Libstdc++ and enter it:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Prepare Libstdc++ for compilation:</para> + +<screen><userinput remap="configure">../libstdc++-v3/configure \ + CXXFLAGS="-g -O2 -D_GNU_SOURCE" \ + --prefix=/usr \ + --disable-multilib \ + --disable-nls \ + --disable-libstdcxx-pch</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>CXXFLAGS="-g -O2 -D_GNU_SOURCE"</parameter></term> + <listitem> + <para>Those flags are passed by the top level Makefile when doing + a full build of GCC.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-libstdcxx-pch</parameter></term> + <listitem> + <para>This switch prevents the installation of precompiled + include files, which are not needed at this stage.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile libstdc++ by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the library:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/libstdc++.xml b/chapter06/libstdc++.xml new file mode 100644 index 000000000..3a1b0f2bf --- /dev/null +++ b/chapter06/libstdc++.xml @@ -0,0 +1,122 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-libstdcpp-pass1" role="wrap"> + <?dbhtml filename="gcc-libstdc++-pass1.html"?> + + <sect1info condition="script"> + <productname>gcc-libstdc++</productname> + <productnumber>&gcc-version;</productnumber> + <address>&gcc-url;</address> + </sect1info> + + <title>Libstdc++ from GCC-&gcc-version;, Pass 1</title> + + <indexterm zone="ch-tools-libstdcpp-pass1"> + <primary sortas="a-GCC">GCC</primary> + <secondary>tools, libstdc++ pass 1</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>Libstdc++ is the standard C++ library. It is needed + to compile C++ code + (part of GCC is written in C++), but we had to defer its installation + when we built <xref linkend="ch-tools-gcc-pass1"/> + because it depends on glibc, which was not yet available in the target + directory. + </para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&libstdcpp-ch5-sbu;</seg> + <seg>&libstdcpp-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Target Libstdc++</title> + + <note> + <para><application>Libstdc++</application> is part of the GCC sources. + You should first unpack the GCC tarball and change to the + <filename>gcc-&gcc-version;</filename> directory.</para> + </note> + + <para>Create a separate build directory for Libstdc++ and enter it:</para> + +<screen><userinput remap="pre">mkdir -v build +cd build</userinput></screen> + + <para>Prepare Libstdc++ for compilation:</para> + +<screen><userinput remap="configure">../libstdc++-v3/configure \ + --host=$LFS_TGT \ + --build=$(../config.guess) \ + --prefix=/usr \ + --disable-multilib \ + --disable-nls \ + --disable-libstdcxx-pch \ + --with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>--host=...</parameter></term> + <listitem> + <para>Indicates to use the cross compiler we have just built + instead of the one in <filename>/usr/bin</filename>.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--disable-libstdcxx-pch</parameter></term> + <listitem> + <para>This switch prevents the installation of precompiled + include files, which are not needed at this stage.</para> + </listitem> + </varlistentry> + + <varlistentry> + <term><parameter>--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/&gcc-version;</parameter></term> + <listitem> + <para>This is the location where the standard include files are + searched by the C++ compiler. In a normal build, this information + is automatically passed to the Libstdc++ <command>configure</command> + options from the top level directory. In our case, this information + must be explicitly given.</para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Compile libstdc++ by running:</para> + +<screen><userinput remap="make">make</userinput></screen> + + <para>Install the library:</para> + +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> + + </sect2> + + <sect2 role="content"> + <title/> + + <para>Details on this package are located in + <xref linkend="contents-gcc" role="."/></para> + + </sect2> + +</sect1> diff --git a/chapter06/libtool.xml b/chapter06/libtool.xml deleted file mode 100644 index 3093b4164..000000000 --- a/chapter06/libtool.xml +++ /dev/null @@ -1,129 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-libtool" role="wrap"> - <?dbhtml filename="libtool.html"?> - - <sect1info condition="script"> - <productname>libtool</productname> - <productnumber>&libtool-version;</productnumber> - <address>&libtool-url;</address> - </sect1info> - - <title>Libtool-&libtool-version;</title> - - <indexterm zone="ch-system-libtool"> - <primary sortas="a-Libtool">Libtool</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Libtool package contains the GNU generic library support script. - It wraps the complexity of using shared libraries in a consistent, portable - interface.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&libtool-ch6-sbu;</seg> - <seg>&libtool-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Libtool</title> - - <para>Prepare Libtool for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - -<para>To test the results<!--(about 11.0 SBU)-->, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <note><para>The test time for libtool can be reduced significantly on a - system with multiple cores. To do this, append - <command>TESTSUITEFLAGS=-j<N></command> to the line above. For - instance, using -j4 can reduce the test time by over 60 - percent.</para></note> - - <para>Five tests are known to fail in the LFS build environment due - to a circular dependency, but all tests pass if rechecked after - automake is installed.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - - <sect2 id="contents-libtool" role="content"> - <title>Contents of Libtool</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>libtool and libtoolize</seg> - <seg>libltdl.so</seg> - <seg>/usr/include/libltdl and /usr/share/libtool</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libtool"> - <term><command>libtool</command></term> - <listitem> - <para>Provides generalized library-building support services</para> - <indexterm zone="ch-system-libtool libtool"> - <primary sortas="b-libtool">libtool</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libtoolize"> - <term><command>libtoolize</command></term> - <listitem> - <para>Provides a standard way to add <command>libtool</command> - support to a package</para> - <indexterm zone="ch-system-libtool libtoolize"> - <primary sortas="b-libtoolize">libtoolize</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libltdl"> - <term><filename class="libraryfile">libltdl</filename></term> - <listitem> - <para>Hides the various difficulties of dlopening libraries</para> - <indexterm zone="ch-system-libtool libltdl"> - <primary sortas="c-libltdl">libltdl</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/linux-headers.xml b/chapter06/linux-headers.xml new file mode 100644 index 000000000..6c1af3173 --- /dev/null +++ b/chapter06/linux-headers.xml @@ -0,0 +1,207 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-linux-headers" role="wrap"> + <?dbhtml filename="linux-headers.html"?> + + <sect1info condition="script"> + <productname>linux-headers</productname> + <productnumber>&linux-version;</productnumber> + <address>&linux-url;</address> + </sect1info> + + <title>Linux-&linux-version; API Headers</title> + + <indexterm zone="ch-tools-linux-headers"> + <primary sortas="a-Linux">Linux</primary> + <secondary>tools, API headers</secondary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the + kernel's API for use by Glibc.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&linux-headers-ch5-sbu;</seg> + <seg>&linux-headers-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Linux API Headers</title> + + <para>The Linux kernel needs to expose an Application Programming Interface + (API) for the system's C library (Glibc in LFS) to use. This is done + by way of sanitizing various C header files that are shipped in the Linux + kernel source tarball.</para> + + <para>Make sure there are no stale files embedded in the package:</para> + +<screen><userinput remap="pre">make mrproper</userinput></screen> + + <para>Now extract the user-visible kernel headers from the source. + The recommended make target <quote>headers_install</quote> cannot be + used, because it requires <application>rsync</application>, which may not + be available. The headers are first placed in + <filename class="directory">./usr</filename>, then copied to the needed + location.</para> + +<screen><userinput remap="make">make headers +find usr/include -name '.*' -delete +rm usr/include/Makefile +</userinput><userinput remap="install">cp -rv usr/include $LFS/usr</userinput></screen> + + </sect2> + + <sect2 id="contents-linux-headers" role="content"> + <title>Contents of Linux API Headers</title> + + <segmentedlist> + <segtitle>Installed headers</segtitle> + <segtitle>Installed directories</segtitle> + + <seglistitem> + <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h, + /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h, + /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h, + /usr/include/sound/*.h, /usr/include/video/*.h, + and /usr/include/xen/*.h</seg> + <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm, + /usr/include/linux, /usr/include/misc, /usr/include/mtd, + /usr/include/rdma, /usr/include/scsi, /usr/include/sound, + /usr/include/video, and /usr/include/xen</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="asm"> + <term><filename class="headerfile">/usr/include/asm/*.h</filename></term> + <listitem> + <para>The Linux API ASM Headers</para> + <indexterm zone="ch-tools-linux-headers asm"> + <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="asm-generic"> + <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term> + <listitem> + <para>The Linux API ASM Generic Headers</para> + <indexterm zone="ch-tools-linux-headers asm-generic"> + <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="drm"> + <term><filename class="headerfile">/usr/include/drm/*.h</filename></term> + <listitem> + <para>The Linux API DRM Headers</para> + <indexterm zone="ch-tools-linux-headers drm"> + <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="linux"> + <term><filename class="headerfile">/usr/include/linux/*.h</filename></term> + <listitem> + <para>The Linux API Linux Headers</para> + <indexterm zone="ch-tools-linux-headers linux"> + <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="misc"> + <term><filename class="headerfile">/usr/include/misc/*.h</filename></term> + <listitem> + <para>The Linux API Miscellaneous Headers</para> + <indexterm zone="ch-tools-linux-headers misc"> + <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="mtd"> + <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term> + <listitem> + <para>The Linux API MTD Headers</para> + <indexterm zone="ch-tools-linux-headers mtd"> + <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="rdma"> + <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term> + <listitem> + <para>The Linux API RDMA Headers</para> + <indexterm zone="ch-tools-linux-headers rdma"> + <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="scsi"> + <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term> + <listitem> + <para>The Linux API SCSI Headers</para> + <indexterm zone="ch-tools-linux-headers scsi"> + <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="sound"> + <term><filename class="headerfile">/usr/include/sound/*.h</filename></term> + <listitem> + <para>The Linux API Sound Headers</para> + <indexterm zone="ch-tools-linux-headers sound"> + <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="video"> + <term><filename class="headerfile">/usr/include/video/*.h</filename></term> + <listitem> + <para>The Linux API Video Headers</para> + <indexterm zone="ch-tools-linux-headers video"> + <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="xen"> + <term><filename class="headerfile">/usr/include/xen/*.h</filename></term> + <listitem> + <para>The Linux API Xen Headers</para> + <indexterm zone="ch-tools-linux-headers xen"> + <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/m4.xml b/chapter06/m4.xml index 7fe282ee7..79559f6da 100644 --- a/chapter06/m4.xml +++ b/chapter06/m4.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-m4" role="wrap"> +<sect1 id="ch-tools-m4" role="wrap"> <?dbhtml filename="m4.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>M4-&m4-version;</title> - <indexterm zone="ch-system-m4"> + <indexterm zone="ch-tools-m4"> <primary sortas="a-M4">M4</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The M4 package contains a macro processor.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/m4.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&m4-ch6-sbu;</seg> - <seg>&m4-ch6-du;</seg> + <seg>&m4-ch5-sbu;</seg> + <seg>&m4-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -40,64 +43,31 @@ <sect2 role="installation"> <title>Installation of M4</title> - <para>First, make some fixes required by glibc-2.28:</para> + <para>First, make some fixes introduced by glibc-2.28:</para> <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen> <para>Prepare M4 for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-m4" role="content"> - <title>Contents of M4</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - - <seglistitem> - <seg>m4</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="m4"> - <!-- Don't remove the extra space, it prevet a FOP warning. --> - <term><command>m4 </command></term> - <listitem> - <para>Copies the given files while expanding the macros that they - contain [These macros are either built-in or user-defined and can - take any number of arguments. Besides performing macro expansion, - <command>m4</command> has built-in functions for including named - files, running Unix commands, performing integer arithmetic, - manipulating text, recursion, etc. The <command>m4</command> program - can be used either as a front-end to a compiler or as a macro processor - in its own right.]</para> - <indexterm zone="ch-system-m4 m4"> - <primary sortas="b-m4">m4</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in + <xref linkend="contents-m4" role="."/></para> </sect2> diff --git a/chapter06/make.xml b/chapter06/make.xml index 9c649cdc5..fef5555aa 100644 --- a/chapter06/make.xml +++ b/chapter06/make.xml @@ -4,8 +4,7 @@ <!ENTITY % general-entities SYSTEM "../general.ent"> %general-entities; ]> - -<sect1 id="ch-system-make" role="wrap"> +<sect1 id="ch-tools-make" role="wrap"> <?dbhtml filename="make.html"?> <sect1info condition="script"> @@ -16,22 +15,25 @@ <title>Make-&make-version;</title> - <indexterm zone="ch-system-make"> + <indexterm zone="ch-tools-make"> <primary sortas="a-Make">Make</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Make package contains a program for compiling packages.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/make.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&make-ch6-sbu;</seg> - <seg>&make-ch6-du;</seg> + <seg>&make-ch5-sbu;</seg> + <seg>&make-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -39,60 +41,42 @@ <sect2 role="installation"> <title>Installation of Make</title> -<!-- - <para>Again, work around an error caused by glibc-2.27 and later:</para> -<screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen> ---> <para>Prepare Make for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --without-guile \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> - <para>Compile the package:</para> + <variablelist> + <title>The meaning of the new configure option:</title> -<screen><userinput remap="make">make</userinput></screen> + <varlistentry> + <term><parameter>--without-guile</parameter></term> + <listitem> + <para>Although we are cross-compiling, configure tries to use + guile from the build host if it finds it. This makes compilation + fail, so this switch prevents using it.</para> + </listitem> + </varlistentry> + </variablelist> - <para>The test suite needs to know where supporting perl files are located. - We use an environment variable to accomplish this. To test the - results, issue:</para> + <para>Compile the package:</para> -<screen><userinput remap="test">make check</userinput></screen> +<screen><userinput remap="make">make</userinput></screen> <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> + <sect2 role="content"> + <title/> - <sect2 id="contents-make" role="content"> - <title>Contents of Make</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - - <seglistitem> - <seg>make</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="make"> - <term><command>make</command></term> - <listitem> - <para>Automatically determines which pieces of a package need to - be (re)compiled and then issues the relevant commands</para> - <indexterm zone="ch-system-make make"> - <primary sortas="b-make">make</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-make" role="."/></para> </sect2> diff --git a/chapter06/man-db.xml b/chapter06/man-db.xml deleted file mode 100644 index f2f46b891..000000000 --- a/chapter06/man-db.xml +++ /dev/null @@ -1,456 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-man-db" role="wrap"> - <?dbhtml filename="man-db.html"?> - - <sect1info condition="script"> - <productname>man-db</productname> - <productnumber>&man-db-version;</productnumber> - <address>&man-db-url;</address> - </sect1info> - - <title>Man-DB-&man-db-version;</title> - - <indexterm zone="ch-system-man-db"> - <primary sortas="a-Man-DB">Man-DB</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Man-DB package contains programs for finding and viewing man - pages.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&man-db-ch6-sbu;</seg> - <seg>&man-db-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Man-DB</title> - - <para>Prepare Man-DB for compilation:</para> - -<screen revision="systemd"><userinput remap="configure">sed -i '/find/s@/usr@@' init/systemd/man-db.service.in - -./configure --prefix=/usr \ - --docdir=/usr/share/doc/man-db-&man-db-version; \ - --sysconfdir=/etc \ - --disable-setuid \ - --enable-cache-owner=bin \ - --with-browser=/usr/bin/lynx \ - --with-vgrind=/usr/bin/vgrind \ - --with-grap=/usr/bin/grap</userinput></screen> - -<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \ - --docdir=/usr/share/doc/man-db-&man-db-version; \ - --sysconfdir=/etc \ - --disable-setuid \ - --enable-cache-owner=bin \ - --with-browser=/usr/bin/lynx \ - --with-vgrind=/usr/bin/vgrind \ - --with-grap=/usr/bin/grap \ - --with-systemdtmpfilesdir= \ - --with-systemdsystemunitdir=</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry revision="systemd"> - <term><command>sed -i '/find/s@/usr@@' init/systemd/man-db.service.in</command></term> - <listitem> - <para>This changes a harcoded path to the <command>find</command> - utility, which we install in - <filename class="directory">/bin</filename>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-setuid</parameter></term> - <listitem> - <para>This disables making the <command>man</command> program setuid - to user <systemitem class="username">man</systemitem>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--enable-cache-owner=bin</parameter></term> - <listitem> - <para>This makes the system-wide cache files be owned by user - <systemitem class="username">bin</systemitem>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--with-...</parameter></term> - <listitem> - <para>These three parameters are used to set some default programs. - <command>lynx</command> is a text-based web browser (see - BLFS for installation instructions), <command>vgrind</command> - converts program sources to Groff input, and <command>grap</command> - is useful for typesetting graphs in Groff documents. The - <command>vgrind</command> and <command>grap</command> programs are - not normally needed for viewing manual pages. They are not part of - LFS or BLFS, but you should be able to install them yourself after - finishing LFS if you wish to do so.</para> - </listitem> - </varlistentry> - - <varlistentry revision="sysv"> - <term><parameter>--with-systemd...</parameter></term> - <listitem> - <para>These parameters prevent installing unneeded systemd - directories and files.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>One test, man-missing-locales, is known to fail in the LFS chroot envirnment.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> -<!-- - <para revision="sysv">Remove an unwanted directory used for service files - which would cause some BLFS packages to also install files there: </para> - -<screen revision="sysv"><userinput remap="install">rm -rfv /lib/systemd</userinput></screen> - - <para revision="systemd">Remove a reference to a non-existent user:</para> - -<screen revision="systemd"><userinput remap="install">sed -i "s:man man:root root:g" /usr/lib/tmpfiles.d/man-db.conf</userinput></screen> ---> - </sect2> - - <sect2> - <title>Non-English Manual Pages in LFS</title> - - <para>The following table shows the character set that Man-DB assumes - manual pages installed under - <filename class="directory">/usr/share/man/<ll></filename> will be - encoded with. In addition to this, Man-DB correctly determines if manual - pages installed in that directory are UTF-8 encoded.</para> - - <!-- Origin: man-db-2.5.9/lib/encodings.c --> - <table> -<title>Expected character encoding of legacy 8-bit manual pages</title> - <?dbfo table-width="6in" ?> - - <tgroup cols="4"> - - <colspec colnum="1" colwidth="1.5in"/> - <colspec colnum="2" colwidth="1in"/> - <colspec colnum="3" colwidth="2.5in"/> - <colspec colnum="4" colwidth="1in"/> - - <thead> - <row> - <entry>Language (code)</entry> - <entry>Encoding</entry> - <entry>Language (code)</entry> - <entry>Encoding</entry> - </row> - </thead> - - <tbody> - <row> - <entry>Danish (da)</entry> - <entry>ISO-8859-1</entry> - <entry>Croatian (hr)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>German (de)</entry> - <entry>ISO-8859-1</entry> - <entry>Hungarian (hu)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>English (en)</entry> - <entry>ISO-8859-1</entry> - <entry>Japanese (ja)</entry> - <entry>EUC-JP</entry> - </row> - <row> - <entry>Spanish (es)</entry> - <entry>ISO-8859-1</entry> - <entry>Korean (ko)</entry> - <entry>EUC-KR</entry> - </row> - <row> - <entry>Estonian (et)</entry> - <entry>ISO-8859-1</entry> - <entry>Lithuanian (lt)</entry> - <entry>ISO-8859-13</entry> - </row> - <row> - <entry>Finnish (fi)</entry> - <entry>ISO-8859-1</entry> - <entry>Latvian (lv)</entry> - <entry>ISO-8859-13</entry> - </row> - <row> - <entry>French (fr)</entry> - <entry>ISO-8859-1</entry> - <entry>Macedonian (mk)</entry> - <entry>ISO-8859-5</entry> - </row> - <row> - <entry>Irish (ga)</entry> - <entry>ISO-8859-1</entry> - <entry>Polish (pl)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>Galician (gl)</entry> - <entry>ISO-8859-1</entry> - <entry>Romanian (ro)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>Indonesian (id)</entry> - <entry>ISO-8859-1</entry> - <entry>Russian (ru)</entry> - <entry>KOI8-R</entry> - </row> - <row> - <entry>Icelandic (is)</entry> - <entry>ISO-8859-1</entry> - <entry>Slovak (sk)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>Italian (it)</entry> - <entry>ISO-8859-1</entry> - <entry>Slovenian (sl)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>Norwegian Bokmal (nb)</entry> - <entry>ISO-8859-1</entry> - <entry>Serbian Latin (sr@latin)</entry> - <entry>ISO-8859-2</entry> - </row> - <row> - <entry>Dutch (nl)</entry> - <entry>ISO-8859-1</entry> - <entry>Serbian (sr)</entry> - <entry>ISO-8859-5</entry> - </row> - <row> - <entry>Norwegian Nynorsk (nn)</entry> - <entry>ISO-8859-1</entry> - <entry>Turkish (tr)</entry> - <entry>ISO-8859-9</entry> - </row> - <row> - <entry>Norwegian (no)</entry> - <entry>ISO-8859-1</entry> - <entry>Ukrainian (uk)</entry> - <entry>KOI8-U</entry> - </row> - <row> - <entry>Portuguese (pt)</entry> - <entry>ISO-8859-1</entry> - <entry>Vietnamese (vi)</entry> - <entry>TCVN5712-1</entry> - </row> - <row> - <entry>Swedish (sv)</entry> - <entry>ISO-8859-1</entry> - <entry>Simplified Chinese (zh_CN)</entry> - <entry>GBK</entry> - </row> - <row> - <entry>Belarusian (be)</entry> - <entry>CP1251</entry> - <entry>Simplified Chinese, Singapore (zh_SG)</entry> - <entry>GBK</entry> - </row> - <row> - <entry>Bulgarian (bg)</entry> - <entry>CP1251</entry> - <entry>Traditional Chinese, Hong Kong (zh_HK)</entry> - <entry>BIG5HKSCS</entry> - </row> - <row> - <entry>Czech (cs)</entry> - <entry>ISO-8859-2</entry> - <entry>Traditional Chinese (zh_TW)</entry> - <entry>BIG5</entry> - </row> - <row> - <entry>Greek (el)</entry> - <entry>ISO-8859-7</entry> - <entry></entry> - <entry></entry> - </row> - - </tbody> - - </tgroup> - - </table> - - <note> - <para>Manual pages in languages not in the list are not supported.</para> - </note> - - </sect2> - - <sect2 id="contents-man-db" role="content"> - <title>Contents of Man-DB</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>accessdb, apropos (link to whatis), catman, lexgrog, man, mandb, - manpath, and whatis</seg> - <seg>libman.so and libmandb.so (both in /usr/lib/man-db)</seg> - <seg>/usr/lib/man-db, /usr/libexec/man-db, - and /usr/share/doc/man-db-&man-db-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="accessdb"> - <term><command>accessdb</command></term> - <listitem> - <para>Dumps the <command>whatis</command> database contents in - human-readable form</para> - <indexterm zone="ch-system-man-db accessdb"> - <primary sortas="b-accessdb">accessdb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="apropos"> - <term><command>apropos</command></term> - <listitem> - <para>Searches the <command>whatis</command> database and displays - the short descriptions of system commands that contain a given - string</para> - <indexterm zone="ch-system-man-db apropos"> - <primary sortas="b-apropos">apropos</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="catman"> - <term><command>catman</command></term> - <listitem> - <para>Creates or updates the pre-formatted manual pages</para> - <indexterm zone="ch-system-man-db catman"> - <primary sortas="b-catman">catman</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lexgrog"> - <term><command>lexgrog</command></term> - <listitem> - <para>Displays one-line summary information about a given manual - page</para> - <indexterm zone="ch-system-man-db lexgrog"> - <primary sortas="b-lexgrog">lexgrog</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="man"> - <term><command>man</command></term> - <listitem> - <para>Formats and displays the requested manual page</para> - <indexterm zone="ch-system-man-db man"> - <primary sortas="b-man">man</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mandb"> - <term><command>mandb</command></term> - <listitem> - <para>Creates or updates the <command>whatis</command> database</para> - <indexterm zone="ch-system-man-db mandb"> - <primary sortas="b-mandb">mandb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="manpath"> - <term><command>manpath</command></term> - <listitem> - <para>Displays the contents of $MANPATH or (if $MANPATH is not set) - a suitable search path based on the settings in man.conf and the - user's environment</para> - <indexterm zone="ch-system-man-db manpath"> - <primary sortas="b-manpath">manpath</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="whatis"> - <term><command>whatis</command></term> - <listitem> - <para>Searches the <command>whatis</command> database and displays - the short descriptions of system commands that contain the given - keyword as a separate word</para> - <indexterm zone="ch-system-man-db whatis"> - <primary sortas="b-whatis">whatis</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libman"> - <term><filename class="libraryfile">libman</filename></term> - <listitem> - <para>Contains run-time support for <command>man</command></para> - <indexterm zone="ch-system-man-db libman"> - <primary sortas="c-libman">libman</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libmandb"> - <term><filename class="libraryfile">libmandb</filename></term> - <listitem> - <para>Contains run-time support for <command>man</command></para> - <indexterm zone="ch-system-man-db libmandb"> - <primary sortas="c-libmandb">libmandb</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/man-pages.xml b/chapter06/man-pages.xml deleted file mode 100644 index 3d2c52046..000000000 --- a/chapter06/man-pages.xml +++ /dev/null @@ -1,80 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-man-pages" role="wrap"> - <?dbhtml filename="man-pages.html"?> - - <sect1info condition="script"> - <productname>man-pages</productname> - <productnumber>&man-pages-version;</productnumber> - <address>&man-pages-url;</address> - </sect1info> - - <title>Man-pages-&man-pages-version;</title> - - <indexterm zone="ch-system-man-pages"> - <primary sortas="a-Man-pages">Man-pages</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Man-pages package contains over 2,200 man pages.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&man-pages-ch6-sbu;</seg> - <seg>&man-pages-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Man-pages</title> - - <para>Install Man-pages by running:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-manpages" role="content"> - <title>Contents of Man-pages</title> - - <segmentedlist> - <segtitle>Installed files</segtitle> - - <seglistitem> - <seg>various man pages</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="man-pages"> - <term><filename>man pages</filename></term> - <listitem> - <para>Describe C programming language functions, important - device files, and significant configuration files</para> - <indexterm zone="ch-system-man-pages man-pages"> - <primary sortas="e-man-pages">man pages</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/meson.xml b/chapter06/meson.xml deleted file mode 100644 index 0b49c5441..000000000 --- a/chapter06/meson.xml +++ /dev/null @@ -1,109 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-meson" role="wrap"> - <?dbhtml filename="meson.html"?> - - <sect1info condition="script"> - <productname>meson</productname> - <productnumber>&meson-version;</productnumber> - <address>&meson-url;</address> - </sect1info> - - <title>Meson-&meson-version;</title> - - <indexterm zone="ch-system-meson"> - <primary sortas="a-Meson">Meson</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>Meson is an open source build system meant to be both extremely fast, - and, even more importantly, as user friendly as possible.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - <seglistitem> - <seg>&meson-ch6-sbu;</seg> - <seg>&meson-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Meson</title> -<!-- - <para>Apply a fix from upstream to fix a regression:</para> - -<screen><userinput remap="pre">sed -i "s@isfile(a)@& and not a.startswith('/dev')@" mesonbuild/interpreter.py</userinput></screen> ---> - <para>Compile Meson with the following command:</para> - -<screen><userinput remap="make">python3 setup.py build</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">python3 setup.py install --root=dest -cp -rv dest/* /</userinput></screen> - - <variablelist> - <title>The meaning of the install parameters:</title> - - <varlistentry> - <term><parameter>--root=dest</parameter></term> - <listitem> - <para>By default <command>python3 setup.py install</command> - installs various files (such as man pages) into Python Eggs. - With a specified root location, <command>setup.py</command> installs - these files into a standard hierarchy. Then we can just copy - the hierarchy so the files will be in the standard location. - </para> - </listitem> - </varlistentry> - - </variablelist> - </sect2> - - <sect2 id="contents-meson" role="content"> - <title>Contents of Meson</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>meson</seg> - <seg>/usr/lib/python&python-minor;/site-packages/meson-&meson-version;-py&python-minor;.egg-info and /usr/lib/python&python-minor;/site-packages/mesonbuild</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="meson"> - <term><command>meson</command></term> - <listitem> - <para>A high productivity build system</para> - <indexterm zone="ch-system-meson meson"> - <primary sortas="b-meson">meson</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> - diff --git a/chapter06/mpc.xml b/chapter06/mpc.xml deleted file mode 100644 index 2d518c8c1..000000000 --- a/chapter06/mpc.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-mpc" role="wrap"> - <?dbhtml filename="mpc.html"?> - - <sect1info condition="script"> - <productname>mpc</productname> - <productnumber>&mpc-version;</productnumber> - <address>&mpc-url;</address> - </sect1info> - - <title>MPC-&mpc-version;</title> - - <indexterm zone="ch-system-mpc"> - <primary sortas="a-MPC">MPC</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The MPC package contains a library for the arithmetic of complex - numbers with arbitrarily high precision and correct rounding of the - result.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&mpc-ch6-sbu;</seg> - <seg>&mpc-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of MPC</title> - - <para>Prepare MPC for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --docdir=/usr/share/doc/mpc-&mpc-version;</userinput></screen> - - <para>Compile the package and generate the HTML documentation:</para> - -<screen><userinput remap="make">make -make html</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package and its documentation:</para> - -<screen><userinput remap="install">make install -make install-html</userinput></screen> - - </sect2> - - - <sect2 id="contents-mpc" role="content"> - <title>Contents of MPC</title> - - <segmentedlist> - <segtitle>Installed Libraries</segtitle> - <segtitle>Installed Directory</segtitle> - - <seglistitem> - <seg>libmpc.so</seg> - <seg>/usr/share/doc/mpc-&mpc-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libmpc"> - <term><filename class="libraryfile">libmpc</filename></term> - <listitem> - <para>Contains complex math functions</para> - <indexterm zone="ch-system-mpc libmpc"> - <primary sortas="c-libmpc">libmpc</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/mpfr.xml b/chapter06/mpfr.xml deleted file mode 100644 index ff8e323b7..000000000 --- a/chapter06/mpfr.xml +++ /dev/null @@ -1,105 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-mpfr" role="wrap"> - <?dbhtml filename="mpfr.html"?> - - <sect1info condition="script"> - <productname>mpfr</productname> - <productnumber>&mpfr-version;</productnumber> - <address>&mpfr-url;</address> - </sect1info> - - <title>MPFR-&mpfr-version;</title> - - <indexterm zone="ch-system-mpfr"> - <primary sortas="a-MPFR">MPFR</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The MPFR package contains functions for multiple precision - math.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&mpfr-ch6-sbu;</seg> - <seg>&mpfr-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of MPFR</title> - - <para>Prepare MPFR for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --enable-thread-safe \ - --docdir=/usr/share/doc/mpfr-&mpfr-version;</userinput></screen> - - <para>Compile the package and generate the HTML documentation:</para> - -<screen><userinput remap="make">make -make html</userinput></screen> - - <important> - <para>The test suite for MPFR in this section is considered critical. - Do not skip it under any circumstances.</para> - </important> - - <para>Test the results and ensure that all tests passed:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package and its documentation:</para> - -<screen><userinput remap="install">make install -make install-html</userinput></screen> - - </sect2> - - - <sect2 id="contents-mpfr" role="content"> - <title>Contents of MPFR</title> - - <segmentedlist> - <segtitle>Installed Libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>libmpfr.so</seg> - <seg>/usr/share/doc/mpfr-&mpfr-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libmpfr"> - <term><filename class="libraryfile">libmpfr</filename></term> - <listitem> - <para>Contains multiple-precision math functions</para> - <indexterm zone="ch-system-mpfr libmpfr"> - <primary sortas="c-libmpfr">libmpfr</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/ncurses.xml b/chapter06/ncurses.xml index b37f1f69c..93cf85263 100644 --- a/chapter06/ncurses.xml +++ b/chapter06/ncurses.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-ncurses" role="wrap"> +<sect1 id="ch-tools-ncurses" role="wrap"> <?dbhtml filename="ncurses.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Ncurses-&ncurses-version;</title> - <indexterm zone="ch-system-ncurses"> + <indexterm zone="ch-tools-ncurses"> <primary sortas="a-Ncurses">Ncurses</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Ncurses package contains libraries for terminal-independent - handling of character screens.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/ncurses.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&ncurses-ch6-sbu;</seg> - <seg>&ncurses-ch6-du;</seg> + <seg>&ncurses-ch5-sbu;</seg> + <seg>&ncurses-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -41,24 +43,46 @@ <sect2 role="installation"> <title>Installation of Ncurses</title> - <para>Don't install a static library that is not handled by configure:</para> + <para>First, ensure that <command>gawk</command> is found first during configuration:</para> -<screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen> +<screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen> + + <para>Then, run the following commands to build the <quote>tic</quote> + program on the build host:</para> + +<screen><userinput remap="pre">mkdir build +cd build +../configure +make -C include +make -C progs tic +cd ..</userinput></screen> <para>Prepare Ncurses for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --with-shared \ - --without-debug \ - --without-normal \ - --enable-pc-files \ - --enable-widec</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(./config.guess) \ + --mandir=/usr/share/man \ + --with-shared \ + --without-debug \ + --without-ada \ + --without-normal \ + --enable-widec \ + --enable-pc-files</userinput></screen> <variablelist> <title>The meaning of the new configure options:</title> <varlistentry> + <term><parameter>--without-ada</parameter></term> + <listitem> + <para>This ensures that Ncurses does not build support for the Ada + compiler which may be present on the host but will not be available + once we enter the <command>chroot</command> environment.</para> + </listitem> + </varlistentry> + + <varlistentry> <term><parameter>--enable-widec</parameter></term> <listitem> <para>This switch causes wide-character libraries (e.g., <filename @@ -87,293 +111,46 @@ </para> </listitem> </varlistentry> - + <!-- + <varlistentry> + <term><parameter>- -disable-db-install</parameter></term> + <listitem> + <para>This switch disables building the terminfo database: it is not + needed at this stage, and if <command>tic</command> is too old, + it cannot compile recent databases.</para> + </listitem> + </varlistentry> + --> </variablelist> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>This package has a test suite, but it can only be run after the - package has been installed. The tests reside in the - <filename class="directory">test/</filename> directory. See the - <filename>README</filename> file in that directory for further details. - </para> - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> +<!-- TODO: check and document --> +<screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install +ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen> <para>Move the shared libraries to the <filename class="directory">/lib</filename> directory, where they are expected to reside:</para> -<screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6* /lib</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen> <para>Because the libraries have been moved, one symlink points to a non-existent file. Recreate it:</para> -<screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen> - - <para>Many applications still expect the linker to be able to find - non-wide-character Ncurses libraries. Trick such applications into linking with - wide-character libraries by means of symlinks and linker scripts:</para> - -<screen><userinput remap="install">for lib in ncurses form panel menu ; do - rm -vf /usr/lib/lib${lib}.so - echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so - ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc -done</userinput></screen> - - <para>Finally, make sure that old applications that look for - <filename class="libraryfile">-lcurses</filename> at build time are still - buildable:</para> - -<screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so -echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so -ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen> +<screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen> - <para>If desired, install the Ncurses documentation:</para> - -<screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version; -cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen> - - <note> - - <para>The instructions above don't create non-wide-character Ncurses - libraries since no package installed by compiling from sources would link - against them at runtime. However, the only known binary-only - applications that link against non-wide-character Ncurses libraries - require version 5. If you must have such libraries because of some binary-only - application or to be compliant with LSB, build the package again with the - following commands:</para> - -<screen role="nodump"><userinput>make distclean -./configure --prefix=/usr \ - --with-shared \ - --without-normal \ - --without-debug \ - --without-cxx-binding \ - --with-abi-version=5 -make sources libs -cp -av lib/lib*.so.5* /usr/lib</userinput></screen> - </note> </sect2> - <sect2 id="contents-ncurses" role="content"> - <title>Contents of Ncurses</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg> - captoinfo (link to tic), - clear, - infocmp, - infotocap (link to tic), - ncursesw6-config, - reset (link to tset), - tabs, - tic, - toe, - tput, and - tset - </seg> - <seg> - libcursesw.so (symlink and linker script to libncursesw.so), - libformw.so, - libmenuw.so, - libncursesw.so, - libncurses++w.a, - libpanelw.so, and their non-wide-character counterparts without "w" - in the library names.</seg> - <seg> - /usr/share/tabset, - /usr/share/terminfo, and - /usr/share/doc/ncurses-&ncurses-version; - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="captoinfo"> - <term><command>captoinfo</command></term> - <listitem> - <para>Converts a termcap description into a terminfo description</para> - <indexterm zone="ch-system-ncurses captoinfo"> - <primary sortas="b-captoinfo">captoinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="clear"> - <term><command>clear</command></term> - <listitem> - <para>Clears the screen, if possible</para> - <indexterm zone="ch-system-ncurses clear"> - <primary sortas="b-clear">clear</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="infocmp"> - <term><command>infocmp</command></term> - <listitem> - <para>Compares or prints out terminfo descriptions</para> - <indexterm zone="ch-system-ncurses infocmp"> - <primary sortas="b-infocmp">infocmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="infotocap"> - <term><command>infotocap</command></term> - <listitem> - <para>Converts a terminfo description into a termcap description</para> - <indexterm zone="ch-system-ncurses infotocap"> - <primary sortas="b-infotocap">infotocap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ncursesw6-config"> - <term><command>ncursesw6-config</command></term> - <listitem> - <para>Provides configuration information for ncurses</para> - <indexterm zone="ch-system-ncurses ncursesw6-config"> - <primary sortas="b-ncursesw6-config">ncursesw6-config</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="reset"> - <term><command>reset</command></term> - <listitem> - <para>Reinitializes a terminal to its default values</para> - <indexterm zone="ch-system-ncurses reset"> - <primary sortas="b-reset">reset</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tabs"> - <term><command>tabs</command></term> - <listitem> - <para>Clears and sets tab stops on a terminal</para> - <indexterm zone="ch-system-ncurses tabs"> - <primary sortas="b-tabs">tabs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tic"> - <term><command>tic</command></term> - <listitem> - <para>The terminfo entry-description compiler that translates a - terminfo file from source format into the binary format needed for the - ncurses library routines [A terminfo file contains information on the - capabilities of a certain terminal.]</para> - <indexterm zone="ch-system-ncurses tic"> - <primary sortas="b-tic">tic</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="toe"> - <term><command>toe</command></term> - <listitem> - <para>Lists all available terminal types, giving the primary name and - description for each</para> - <indexterm zone="ch-system-ncurses toe"> - <primary sortas="b-toe">toe</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tput"> - <term><command>tput</command></term> - <listitem> - <para>Makes the values of terminal-dependent capabilities available to - the shell; it can also be used to reset or initialize a terminal or - report its long name</para> - <indexterm zone="ch-system-ncurses tput"> - <primary sortas="b-tput">tput</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tset"> - <term><command>tset</command></term> - <listitem> - <para>Can be used to initialize terminals</para> - <indexterm zone="ch-system-ncurses tset"> - <primary sortas="b-tset">tset</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcursesw"> - <term><filename class="libraryfile">libcursesw</filename></term> - <listitem> - <para>A link to <filename>libncursesw</filename></para> - <indexterm zone="ch-system-ncurses libcursesw"> - <primary sortas="c-libcursesw">libcursesw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libncursesw"> - <term><filename class="libraryfile">libncursesw</filename></term> - <listitem> - <para>Contains functions to display text in many complex ways on a - terminal screen; a good example of the use of these functions is the - menu displayed during the kernel's <command>make - menuconfig</command></para> - <indexterm zone="ch-system-ncurses libncursesw"> - <primary sortas="c-libncursesw">libncursesw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libformw"> - <term><filename class="libraryfile">libformw</filename></term> - <listitem> - <para>Contains functions to implement forms</para> - <indexterm zone="ch-system-ncurses libformw"> - <primary sortas="c-libformw">libformw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libmenuw"> - <term><filename class="libraryfile">libmenuw</filename></term> - <listitem> - <para>Contains functions to implement menus</para> - <indexterm zone="ch-system-ncurses libmenuw"> - <primary sortas="c-libmenuw">libmenuw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libpanelw"> - <term><filename class="libraryfile">libpanelw</filename></term> - <listitem> - <para>Contains functions to implement panels</para> - <indexterm zone="ch-system-ncurses libpanelw"> - <primary sortas="c-libpanelw">libpanelw</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-ncurses" role="."/></para> </sect2> diff --git a/chapter06/ninja.xml b/chapter06/ninja.xml deleted file mode 100644 index e998c64fb..000000000 --- a/chapter06/ninja.xml +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-ninja" role="wrap"> - <?dbhtml filename="ninja.html"?> - - <sect1info condition="script"> - <productname>ninja</productname> - <productnumber>&ninja-version;</productnumber> - <address>&ninja-url;</address> - </sect1info> - - <title>Ninja-&ninja-version;</title> - - <indexterm zone="ch-system-ninja"> - <primary sortas="a-Ninja">Ninja</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>Ninja is a small build system with a focus on speed.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&ninja-ch6-sbu;</seg> - <seg>&ninja-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Ninja</title> - - <para>When run, ninja normally runs a maximum number of processes - in parallel. By default this is the number of cores on the system - plus two. In some cases this can overheat a CPU or run a system out - of memory. If run from the command line, passing a -jN parameter - will limit the number of parallel processes, but some packages - embed the execution of ninja and do not pass a -j parameter.</para> - - <para>Using the <emphasis>optional</emphasis> procedure below allows a user to - limit the number of parallel processes via an environment variable, - NINJAJOBS. <command>For example</command>, setting: - - <!--Using <command> here to make the output bold. We really don't want - users setting this now and experience shows that many users blindly - copy/paste anything in a box. --> - - <screen>export NINJAJOBS=4</screen> - - will limit ninja to four parallel processes.</para> - - <para>If desired, add the capability to use the environment variable - NINJAJOBS by running:</para> - -<screen><userinput remap="pre">sed -i '/int Guess/a \ - int j = 0;\ - char* jobs = getenv( "NINJAJOBS" );\ - if ( jobs != NULL ) j = atoi( jobs );\ - if ( j > 0 ) return j;\ -' src/ninja.cc</userinput></screen> - - <para>Build Ninja with:</para> - -<screen><userinput remap="configure">python3 configure.py --bootstrap</userinput></screen> - - <variablelist> - <title>The meaning of the build option:</title> - - <varlistentry> - <term><parameter>--bootstrap</parameter></term> - <listitem> - <para>This parameter forces ninja to rebuild itself for the current - system.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">./ninja ninja_test -./ninja_test --gtest_filter=-SubprocessTest.SetWithLots</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">install -vm755 ninja /usr/bin/ -install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja -install -vDm644 misc/zsh-completion /usr/share/zsh/site-functions/_ninja</userinput></screen> - - </sect2> - - <sect2 id="contents-ninja" role="content"> - <title>Contents of Ninja</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>ninja</seg> - </seglistitem> - </segmentedlist> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="ninja"> - <term><command>ninja</command></term> - <listitem> - <para>is the Ninja build system.</para> - <indexterm zone="ch-system-ninja ninja"> - <primary sortas="b-ninja">ninja</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> - diff --git a/chapter06/openssl.xml b/chapter06/openssl.xml deleted file mode 100644 index f2ff1fa80..000000000 --- a/chapter06/openssl.xml +++ /dev/null @@ -1,176 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-openssl" role="wrap"> - <?dbhtml filename="openssl.html"?> - - <sect1info condition="script"> - <productname>openssl</productname> - <productnumber>&openssl-version;</productnumber> - <address>&openssl-url;</address> - </sect1info> - - <title>OpenSSL-&openssl-version;</title> - - <indexterm zone="ch-system-openssl"> - <primary sortas="a-OpenSSL">OpenSSL</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The OpenSSL package contains management tools and libraries relating - to cryptography. These are useful for providing cryptographic functions - to other packages, such as OpenSSH, email applications and web browsers - (for accessing HTTPS sites). </para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&openssl-ch6-sbu;</seg> - <seg>&openssl-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of OpenSSL</title> -<!-- - <para>First, fix a problem identified upstream:</para> - -<screen><userinput remap="pre">sed -i '/\} data/s/ =.*$/;\n memset(\&data, 0, sizeof(data));/' \ - crypto/rand/rand_lib.c</userinput></screen> ---> - <para>Prepare OpenSSL for compilation:</para> - -<screen><userinput remap="configure">./config --prefix=/usr \ - --openssldir=/etc/ssl \ - --libdir=lib \ - shared \ - zlib-dynamic</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make test</userinput></screen> - - <para>One test 30-test_afalg.t is known to fail on some kernel - configurations (it apparently assumes certain unspecified crypto - options have been selected).</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile -make MANSUFFIX=ssl install</userinput></screen> - - <para>If desired, install the documentation:</para> - -<screen><userinput remap="install">mv -v /usr/share/doc/openssl /usr/share/doc/openssl-&openssl-version; -cp -vfr doc/* /usr/share/doc/openssl-&openssl-version;</userinput></screen> - - </sect2> - - <sect2 id="contents-openssl" role="content"> - <title>Contents of OpenSSL</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg> - c_rehash and openssl - </seg> - <seg> - libcrypto.{so,a} and libssl.{so,a} - </seg> - <seg> - /etc/ssl, - /usr/include/openssl, - /usr/lib/engines and - /usr/share/doc/openssl-&openssl-version; - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="c_rehash"> - <term><command>c_rehash</command></term> - <listitem> - <para> - is a <application>Perl</application> script that scans all files in - a directory and adds symbolic links to their hash values. - </para> - <indexterm zone="ch-system-openssl c_rehash"> - <primary sortas="b-c_rehash">c_rehash</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="openssl-prog"> - <term><command>openssl</command></term> - <listitem> - <para> - is a command-line tool for using the various cryptography functions - of <application>OpenSSL</application>'s crypto library from the - shell. It can be used for various functions which are documented in - <command>man 1 openssl</command>. - </para> - <indexterm zone="ch-system-openssl openssl-prog"> - <primary sortas="b-openssl">openssl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libcrypto"> - <term><filename class="libraryfile">libcrypto.so</filename></term> - <listitem> - <para> - implements a wide range of cryptographic algorithms used in various - Internet standards. The services provided by this library are used - by the <application>OpenSSL</application> implementations of SSL, - TLS and S/MIME, and they have also been used to implement - <application>OpenSSH</application>, - <application>OpenPGP</application>, and other cryptographic - standards. - </para> - <indexterm zone="ch-system-openssl libcrypto"> - <primary sortas="c-libcrypto">libcrypto.so</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libssl"> - <term><filename class="libraryfile">libssl.so</filename></term> - <listitem> - <para> - implements the Transport Layer Security (TLS v1) protocol. - It provides a rich API, documentation - on which can be found by running <command>man 3 ssl</command>. - </para> - <indexterm zone="ch-system-openssl libssl"> - <primary sortas="c-libssl">libssl.so</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/patch.xml b/chapter06/patch.xml index 6c6c6852b..ecd5b2c47 100644 --- a/chapter06/patch.xml +++ b/chapter06/patch.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-patch" role="wrap"> +<sect1 id="ch-tools-patch" role="wrap"> <?dbhtml filename="patch.html"?> <sect1info condition="script"> @@ -16,24 +16,25 @@ <title>Patch-&patch-version;</title> - <indexterm zone="ch-system-patch"> + <indexterm zone="ch-tools-patch"> <primary sortas="a-Patch">Patch</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Patch package contains a program for modifying or creating files - by applying a <quote>patch</quote> file typically created by the - <command>diff</command> program.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/patch.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&patch-ch6-sbu;</seg> - <seg>&patch-ch6-du;</seg> + <seg>&patch-ch5-sbu;</seg> + <seg>&patch-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -44,52 +45,25 @@ <para>Prepare Patch for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess)</userinput></screen> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> -<screen><userinput remap="install">make install</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-patch" role="content"> - <title>Contents of Patch</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - - <seglistitem> - <seg>patch</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="patch"> - <term><command>patch</command></term> - <listitem> - <para>Modifies files according to a patch file [A patch file is - normally a difference listing created with the <command>diff</command> - program. By applying these differences to the original files, - <command>patch</command> creates the patched versions.]</para> - <indexterm zone="ch-system-patch patch"> - <primary sortas="b-patch">patch</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-patch" role="."/></para> </sect2> diff --git a/chapter06/perl.xml b/chapter06/perl.xml index 284464d87..663d3dbc2 100644 --- a/chapter06/perl.xml +++ b/chapter06/perl.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-perl" role="wrap"> +<sect1 id="ch-tools-perl" role="wrap"> <?dbhtml filename="perl.html"?> <sect1info condition="script"> @@ -16,23 +16,25 @@ <title>Perl-&perl-version;</title> - <indexterm zone="ch-system-perl"> + <indexterm zone="ch-tools-perl"> <primary sortas="a-Perl">Perl</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Perl package contains the Practical Extraction and Report - Language.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter06/perl.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&perl-ch6-sbu;</seg> - <seg>&perl-ch6-du;</seg> + <seg>&perl-ch5-sbu;</seg> + <seg>&perl-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -41,481 +43,36 @@ <sect2 role="installation"> <title>Installation of Perl</title> - <para>First create a basic <filename>/etc/hosts</filename> file to be - referenced in one of Perl's configuration files as well as the optional - test suite:</para> + <para>Prepare Perl for compilation:</para> -<screen><userinput remap="pre">echo "127.0.0.1 localhost $(hostname)" > /etc/hosts</userinput></screen> - - <para>This version of Perl now builds the Compress::Raw::Zlib and - Compress::Raw::BZip2 modules. By - default Perl will use an internal copy of the sources for the build. - Issue the following command so that Perl will use the libraries - installed on the system:</para> - -<screen><userinput remap="pre">export BUILD_ZLIB=False -export BUILD_BZIP2=0</userinput></screen> -<!-- - <para>Apply a patch to allow the Errno.pm module and the h2ph - program to build correctly when building with GCC 5:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&perl-gcc5-fixes-patch;</userinput></screen> ---> - - <para>To have full control over the way Perl is set up, you can remove the - <quote>-des</quote> options from the following command and hand-pick the way - this package is built. Alternatively, use the command exactly as below to - use the defaults that Perl auto-detects:</para> - -<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Dman1dir=/usr/share/man/man1 \ - -Dman3dir=/usr/share/man/man3 \ - -Dpager="/usr/bin/less -isR" \ - -Duseshrplib \ - -Dusethreads</userinput></screen> +<screen><userinput remap="configure">sh Configure -des -Dprefix=/usr</userinput></screen> <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>-Dvendorprefix=/usr</parameter></term> - <listitem> - <para>This ensures <command>perl</command> knows how to - tell packages where they should install their perl modules.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dpager="/usr/bin/less -isR"</parameter></term> - <listitem> - <para>This ensures that <userinput>less</userinput> is used instead - of <userinput>more</userinput>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dman1dir=/usr/share/man/man1 - -Dman3dir=/usr/share/man/man3</parameter></term> - <listitem> - <para>Since Groff is not installed yet, <command>Configure</command> - thinks that we do not want man pages for Perl. Issuing these - parameters overrides this decision.</para> - </listitem> - </varlistentry> - + <title>The meaning of the new Configure options:</title> <varlistentry> - <term><parameter>-Duseshrplib</parameter></term> + <term><parameter>-des</parameter></term> <listitem> - <para>Build a shared libperl needed by some perl modules.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dusethreads</parameter></term> - <listitem> - <para>Build perl with support for threads.</para> + <para>This is a combination of three options: -d uses defaults for + all items; -e ensures completion of all tasks; -s silences + non-essential output.</para> </listitem> </varlistentry> </variablelist> - <para>Compile the package:</para> + <para>Build the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results (approximately 11 SBU), issue:</para> - -<screen><userinput remap="test">make test</userinput></screen> - - <!--note><para>One test fails due to using the most recent version of gdbm. - </para></note--> - - <para>Install the package and clean up:</para> - -<screen><userinput remap="install">make install -unset BUILD_ZLIB BUILD_BZIP2</userinput></screen> +<screen><userinput remap="install">make install</userinput></screen> </sect2> - <sect2 id="contents-perl" role="content"> - <title>Contents of Perl</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>corelist, cpan, enc2xs, encguess, h2ph, h2xs, instmodsh, - json_pp, libnetcfg, perl, perl&perl-version; (hard link to perl), - perlbug, perldoc, perlivp, perlthanks (hard link to perlbug), piconv, - pl2pm, pod2html, pod2man, pod2text, pod2usage, podchecker, podselect, - prove, ptar, ptardiff, ptargrep, shasum, - splain, xsubpp, and zipdetails</seg> - <seg>Many which cannot all be listed here</seg> - <seg>/usr/lib/perl5</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> -<!-- - <varlistentry id="c2ph"> - <term><command>c2ph</command></term> - <listitem> - <para>Dumps C structures as generated from - <command>cc -g -S</command></para> - <indexterm zone="ch-system-perl c2ph"> - <primary sortas="b-c2ph">c2ph</primary> - </indexterm> - </listitem> - </varlistentry> ---> - <varlistentry id="corelist"> - <term><command>corelist</command></term> - <listitem> - <para>A commandline frontend to Module::CoreList</para> - <indexterm zone="ch-system-perl corelist"> - <primary sortas="b-corelist">corelist</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cpan"> - <term><command>cpan</command></term> - <listitem> - <para>Interact with the Comprehensive Perl Archive Network (CPAN) - from the command line</para> - <indexterm zone="ch-system-perl cpan"> - <primary sortas="b-cpan">cpan</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="enc2xs"> - <term><command>enc2xs</command></term> - <listitem> - <para>Builds a Perl extension for the Encode module from either - Unicode Character Mappings or Tcl Encoding Files</para> - <indexterm zone="ch-system-perl enc2xs"> - <primary sortas="b-enc2xs">enc2xs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="encguess"> - <term><command>encguess</command></term> - <listitem> - <para>Guess the encoding type of one or several files</para> - <indexterm zone="ch-system-perl encguess"> - <primary sortas="b-encguess">encguess</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="h2ph"> - <term><command>h2ph</command></term> - <listitem> - <para>Converts <filename class="extension">.h</filename> C header - files to <filename class="extension">.ph</filename> Perl header - files</para> - <indexterm zone="ch-system-perl h2ph"> - <primary sortas="b-h2ph">h2ph</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="h2xs"> - <term><command>h2xs</command></term> - <listitem> - <para>Converts <filename class="extension">.h</filename> C header - files to Perl extensions</para> - <indexterm zone="ch-system-perl h2xs"> - <primary sortas="b-h2xs">h2xs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="instmodsh"> - <term><command>instmodsh</command></term> - <listitem> - <para>Shell script for examining installed Perl modules, - and can create a tarball from an installed module</para> - <indexterm zone="ch-system-perl instmodsh"> - <primary sortas="b-instmodsh">instmodsh</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="json_pp"> - <term><command>json_pp</command></term> - <listitem> - <para>Converts data between certain input and output formats</para> - <indexterm zone="ch-system-perl json_pp"> - <primary sortas="b-json_pp">json_pp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libnetcfg"> - <term><command>libnetcfg</command></term> - <listitem> - <para>Can be used to configure the - <filename class="libraryfile">libnet</filename> Perl module</para> - <indexterm zone="ch-system-perl libnetcfg"> - <primary sortas="b-libnetcfg">libnetcfg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="perl"> - <term><command>perl</command></term> - <listitem> - <para>Combines some of the best features of C, <command>sed</command>, - <command>awk</command> and <command>sh</command> into a single - swiss-army language</para> - <indexterm zone="ch-system-perl perl"> - <primary sortas="b-perl">perl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="perl-version"> - <term><command>perl&perl-version;</command></term> - <listitem> - <para>A hard link to <command>perl</command></para> - <indexterm zone="ch-system-perl perl-version"> - <primary sortas="b-perl&perl-version;">perl&perl-version;</primary> - </indexterm> - </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="perldoc"> - <term><command>perldoc</command></term> - <listitem> - <para>Displays a piece of documentation in pod format that is embedded - in the Perl installation tree or in a Perl script</para> - <indexterm zone="ch-system-perl perldoc"> - <primary sortas="b-perldoc">perldoc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="perlivp"> - <term><command>perlivp</command></term> - <listitem> - <para>The Perl Installation Verification Procedure; it can be used to - verify that Perl and its libraries have been installed - correctly</para> - <indexterm zone="ch-system-perl perlivp"> - <primary sortas="b-perlivp">perlivp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="perlthanks"> - <term><command>perlthanks</command></term> - <listitem> - <para>Used to generate thank you messages to mail to the Perl - developers</para> - <indexterm zone="ch-system-perl perlthanks"> - <primary sortas="b-perlthanks">perlthanks</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="piconv"> - <term><command>piconv</command></term> - <listitem> - <para>A Perl version of the character encoding converter - <command>iconv</command></para> - <indexterm zone="ch-system-perl piconv"> - <primary sortas="b-piconv">piconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pl2pm"> - <term><command>pl2pm</command></term> - <listitem> - <para>A rough tool for converting Perl4 - <filename class="extension">.pl</filename> files to Perl5 - <filename class="extension">.pm</filename> modules</para> - <indexterm zone="ch-system-perl pl2pm"> - <primary sortas="b-pl2pm">pl2pm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pod2html"> - <term><command>pod2html</command></term> - <listitem> - <para>Converts files from pod format to HTML format</para> - <indexterm zone="ch-system-perl pod2html"> - <primary sortas="b-pod2html">pod2html</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pod2man"> - <term><command>pod2man</command></term> - <listitem> - <para>Converts pod data to formatted *roff input</para> - <indexterm zone="ch-system-perl pod2man"> - <primary sortas="b-pod2man">pod2man</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pod2text"> - <term><command>pod2text</command></term> - <listitem> - <para>Converts pod data to formatted ASCII text</para> - <indexterm zone="ch-system-perl pod2text"> - <primary sortas="b-pod2text">pod2text</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pod2usage"> - <term><command>pod2usage</command></term> - <listitem> - <para>Prints usage messages from embedded pod docs in files</para> - <indexterm zone="ch-system-perl pod2usage"> - <primary sortas="b-pod2usage">pod2usage</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="podchecker"> - <term><command>podchecker</command></term> - <listitem> - <para>Checks the syntax of pod format documentation files</para> - <indexterm zone="ch-system-perl podchecker"> - <primary sortas="b-podchecker">podchecker</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="podselect"> - <term><command>podselect</command></term> - <listitem> - <para>Displays selected sections of pod documentation</para> - <indexterm zone="ch-system-perl podselect"> - <primary sortas="b-podselect">podselect</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="prove"> - <term><command>prove</command></term> - <listitem> - <para>Command line tool for running tests against the Test::Harness - module</para> - <indexterm zone="ch-system-perl prove"> - <primary sortas="b-prove">prove</primary> - </indexterm> - </listitem> - </varlistentry> -<!-- - <varlistentry id="pstruct"> - <term><command>pstruct</command></term> - <listitem> - <para>Dumps C structures as generated from <command>cc -g -S</command> - stabs</para> - <indexterm zone="ch-system-perl pstruct"> - <primary sortas="b-pstruct">pstruct</primary> - </indexterm> - </listitem> - </varlistentry> ---> - <varlistentry id="ptar"> - <term><command>ptar</command></term> - <listitem> - <para>A <command>tar</command>-like program written in Perl</para> - <indexterm zone="ch-system-perl ptar"> - <primary sortas="b-ptar">ptar</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ptardiff"> - <term><command>ptardiff</command></term> - <listitem> - <para>A Perl program that compares an extracted archive with an - unextracted one</para> - <indexterm zone="ch-system-perl ptardiff"> - <primary sortas="b-ptardiff">ptardiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ptargrep"> - <term><command>ptargrep</command></term> - <listitem> - <para>A Perl program that applies pattern matching to the contents - of files in a tar archive</para> - <indexterm zone="ch-system-perl ptargrep"> - <primary sortas="b-ptargrep">ptargrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shasum"> - <term><command>shasum</command></term> - <listitem> - <para>Prints or checks SHA checksums</para> - <indexterm zone="ch-system-perl shasum"> - <primary sortas="b-shasum">shasum</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="splain"> - <term><command>splain</command></term> - <listitem> - <para>Is used to force verbose warning diagnostics in Perl</para> - <indexterm zone="ch-system-perl splain"> - <primary sortas="b-splain">splain</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xsubpp"> - <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> - - <varlistentry id="zipdetails"> - <term><command>zipdetails</command></term> - <listitem> - <para>Displays details about the internal structure of a Zip file</para> - <indexterm zone="ch-system-perl zipdetails"> - <primary sortas="b-zipdetails">zipdetails</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-perl" role="."/></para> </sect2> diff --git a/chapter06/pkgconfig.xml b/chapter06/pkgconfig.xml deleted file mode 100644 index 3c311e389..000000000 --- a/chapter06/pkgconfig.xml +++ /dev/null @@ -1,121 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-pkgconfig" role="wrap"> - <?dbhtml filename="pkg-config.html"?> - - <sect1info condition="script"> - <productname>pkg-config</productname> - <productnumber>&pkgconfig-version;</productnumber> - <address>&pkgconfig-url;</address> - </sect1info> - - <title>Pkg-config-&pkgconfig-version;</title> - - <indexterm zone="ch-system-pkgconfig"> - <primary sortas="a-pkgconfig">Pkgconfig</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para> The pkg-config package contains a tool for passing the include path - and/or library paths to build tools during the configure and make file - execution.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&pkgconfig-ch6-sbu;</seg> - <seg>&pkgconfig-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Pkg-config</title> - - <para>Prepare Pkg-config for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --with-internal-glib \ - --disable-host-tool \ - --docdir=/usr/share/doc/pkg-config-&pkgconfig-version;</userinput></screen> - - <variablelist> - <title>The meaning of the new configure options:</title> - - <varlistentry> - <term><parameter>--with-internal-glib</parameter></term> - <listitem> - <para>This will allow pkg-config to use its internal version of - Glib because an external version is not available in LFS.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--disable-host-tool</parameter></term> - <listitem> - <para>This option disables the creation of an undesired hard link - to the pkg-config program.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-pkgconfig" role="content"> - <title>Contents of Pkg-config</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>pkg-config</seg> - <seg>/usr/share/doc/pkg-config-&pkgconfig-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="pkgconfig"> - <!-- Don't remove the extra space, it prevents a FOP warning. --> - <term><command>pkg-config </command></term> - <listitem> - <para>Returns meta information for the specified library or package - </para> - <indexterm zone="ch-system-pkgconfig pkgconfig"> - <primary sortas="b-pkgconfig">pkg-config</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/pkgmgt.xml b/chapter06/pkgmgt.xml deleted file mode 100644 index d28038467..000000000 --- a/chapter06/pkgmgt.xml +++ /dev/null @@ -1,291 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-pkgmgt"> - <?dbhtml filename="pkgmgt.html"?> - - <title>Package Management</title> - - <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 - remove and upgrade packages. As well as the binary and library files, a - package manager will handle the installation of configuration files. Before - you begin to wonder, NO—this section will not talk about nor recommend - any particular package manager. What it provides is a roundup of the more - popular techniques and how they work. The perfect package manager for you may - be among these techniques or may be a combination of two or more of these - techniques. This section briefly mentions issues that may arise when upgrading - packages.</para> - - <para>Some reasons why no package manager is mentioned in LFS or BLFS - include:</para> - - <itemizedlist> - <listitem> - <para>Dealing with package management takes the focus away from the goals - of these books—teaching how a Linux system is built.</para> - </listitem> - - <listitem> - <para>There are multiple solutions for package management, each having - its strengths and drawbacks. Including one that satisfies all audiences - is difficult.</para> - </listitem> - </itemizedlist> - - <para>There are some hints written on the topic of package management. Visit - the <ulink url="&hints-index;">Hints Project</ulink> and see if one of them - fits your need.</para> - - <sect2> - <title>Upgrade Issues</title> - - <para>A Package Manager makes it easy to upgrade to newer versions when they - are released. Generally the instructions in the LFS and BLFS Book can be - used to upgrade to the newer versions. Here are some points that you should - be aware of when upgrading packages, especially on a running system.</para> - - <itemizedlist> - <listitem> - <para>If Glibc needs to be upgraded to a newer version, (e.g. from - glibc-2.19 to glibc-2.20), it is safer to rebuild LFS. Though you - <emphasis>may</emphasis> be able to rebuild all the packages in their - dependency order, we do not recommend it. </para> - </listitem> - - <listitem> - <para>If a package containing a shared library is updated, and if the - name of the library changes, then all the packages dynamically linked - to the library need to be recompiled to link against the newer library. - (Note that there is no correlation between the package version and the - name of the library.) For example, consider a package foo-1.2.3 that - installs a shared library with name - <filename class='libraryfile'>libfoo.so.1</filename>. Say you upgrade - the package to a newer version foo-1.2.4 that installs a shared library - with name <filename class='libraryfile'>libfoo.so.2</filename>. In this - case, all packages that are dynamically linked to - <filename class='libraryfile'>libfoo.so.1</filename> need to be - recompiled to link against - <filename class='libraryfile'>libfoo.so.2</filename>. Note that you - should not remove the previous libraries until the dependent packages - are recompiled.</para> - </listitem> - </itemizedlist> - - </sect2> - - <sect2> - <title>Package Management Techniques</title> - - <para>The following are some common package management techniques. Before - making a decision on a package manager, do some research on the various - techniques, particularly the drawbacks of the particular scheme.</para> - - <sect3> - <title>It is All in My Head!</title> - - <para>Yes, this is a package management technique. Some folks do not find - the need for a package manager because they know the packages intimately - 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 - system when a package is changed.</para> - - </sect3> - - <sect3> - <title>Install in Separate Directories</title> - - <para>This is a simplistic package management that does not need any extra - package to manage the installations. Each package is installed in a - separate directory. For example, package foo-1.1 is installed in - <filename class='directory'>/usr/pkg/foo-1.1</filename> - and a symlink is made from <filename>/usr/pkg/foo</filename> to - <filename class='directory'>/usr/pkg/foo-1.1</filename>. When installing - a new version foo-1.2, it is installed in - <filename class='directory'>/usr/pkg/foo-1.2</filename> and the previous - symlink is replaced by a symlink to the new version.</para> - - <para>Environment variables such as <envar>PATH</envar>, - <envar>LD_LIBRARY_PATH</envar>, <envar>MANPATH</envar>, - <envar>INFOPATH</envar> and <envar>CPPFLAGS</envar> need to be expanded to - include <filename>/usr/pkg/foo</filename>. For more than a few packages, - this scheme becomes unmanageable.</para> - - </sect3> - - <sect3> - <title>Symlink Style Package Management</title> - - <para>This is a variation of the previous package management technique. - Each package is installed similar to the previous scheme. But instead of - making the symlink, each file is symlinked into the - <filename class='directory'>/usr</filename> hierarchy. This removes the - need to expand the environment variables. Though the symlinks can be - created by the user to automate the creation, many package managers have - been written using this approach. A few of the popular ones include Stow, - Epkg, Graft, and Depot.</para> - - <para>The installation needs to be faked, so that the package thinks that - it is installed in <filename class="directory">/usr</filename> though in - reality it is installed in the - <filename class="directory">/usr/pkg</filename> hierarchy. Installing in - this manner is not usually a trivial task. For example, consider that you - are installing a package libfoo-1.1. The following instructions may - not install the package properly:</para> - -<screen role="nodump"><userinput>./configure --prefix=/usr/pkg/libfoo/1.1 -make -make install</userinput></screen> - - <para>The installation will work, but the dependent packages may not link - to libfoo as you would expect. If you compile a package that links against - libfoo, you may notice that it is linked to - <filename class='libraryfile'>/usr/pkg/libfoo/1.1/lib/libfoo.so.1</filename> - instead of <filename class='libraryfile'>/usr/lib/libfoo.so.1</filename> - as you would expect. The correct approach is to use the - <envar>DESTDIR</envar> strategy to fake installation of the package. This - approach works as follows:</para> - -<screen role="nodump"><userinput>./configure --prefix=/usr -make -make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen> - - <para>Most packages support this approach, but there are some which do not. - For the non-compliant packages, you may either need to manually install the - package, or you may find that it is easier to install some problematic - packages into <filename class='directory'>/opt</filename>.</para> - - </sect3> - - <sect3> - <title>Timestamp Based</title> - - <para>In this technique, a file is timestamped before the installation of - the package. After the installation, a simple use of the - <command>find</command> command with the appropriate options can generate - a log of all the files installed after the timestamp file was created. A - package manager written with this approach is install-log.</para> - - <para>Though this scheme has the advantage of being simple, it has two - drawbacks. If, during installation, the files are installed with any - timestamp other than the current time, those files will not be tracked by - 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 - being installed on two different consoles.</para> - - </sect3> - - <sect3> - <title>Tracing Installation Scripts</title> - - <para>In this approach, the commands that the installation scripts perform - are recorded. There are two techniques that one can use:</para> - - <para>The <envar>LD_PRELOAD</envar> environment variable can be set to - point to a library to be preloaded before installation. During - installation, this library tracks the packages that are being installed by - attaching itself to various executables such as <command>cp</command>, - <command>install</command>, <command>mv</command> and tracking the system - calls that modify the filesystem. For this approach to work, all the - executables need to be dynamically linked without the suid or sgid bit. - Preloading the library may cause some unwanted side-effects during - installation. Therefore, it is advised that one performs some tests to - ensure that the package manager does not break anything and logs all the - appropriate files.</para> - - <para>The second technique is to use <command>strace</command>, which - logs all system calls made during the execution of the installation - scripts.</para> - </sect3> - - <sect3> - <title>Creating Package Archives</title> - - <para>In this scheme, the package installation is faked into a separate - tree as described in the Symlink style package management. After the - installation, a package archive is created using the installed files. - 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.</para> - - <para>This approach is used by most of the package managers found in the - commercial distributions. Examples of package managers that follow this - approach are RPM (which, incidentally, is required by the <ulink - url="http://refspecs.linuxfoundation.org/lsb.shtml">Linux - Standard Base Specification</ulink>), pkg-utils, Debian's apt, and - Gentoo's Portage system. A hint describing how to adopt this style of - package management for LFS systems is located at <ulink - url="&hints-root;fakeroot.txt"/>.</para> - - <para>Creation of package files that include dependency information is - complex and is beyond the scope of LFS.</para> - - <para>Slackware uses a <command>tar</command> based system for package - archives. This system purposely does not handle package dependencies - as more complex package managers do. For details of Slackware package - management, see <ulink - url="http://www.slackbook.org/html/package-management.html"/>.</para> - </sect3> - - <sect3> - <title>User Based Management</title> - - <para>This scheme, unique to LFS, was devised by Matthias Benkmann, and is - available from the <ulink url="&hints-index;">Hints Project</ulink>. In - this scheme, each package is installed as a separate user into the - standard locations. Files belonging to a package are easily identified by - 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 - hint at <ulink url="&hints-root;more_control_and_pkg_man.txt"/>.</para> - - </sect3> - - </sect2> - - <sect2> - <title>Deploying LFS on Multiple Systems</title> - - <para>One of the advantages of an LFS system is that there are no files that - depend on the position of files on a disk system. Cloning an LFS build to - another computer with the same architecture as the base system is as - simple as using <command>tar</command> on the LFS partition that contains - the root directory (about 250MB uncompressed for a base LFS build), copying - that file via network transfer or CD-ROM to the new system and expanding - it. From that point, a few configuration files will have to be changed. - Configuration files that may need to be updated include: - <filename>/etc/hosts</filename>, - <filename>/etc/fstab</filename>, - <filename>/etc/passwd</filename>, - <filename>/etc/group</filename>, - <phrase revision="systemd"> - <filename>/etc/shadow</filename>, and - <filename>/etc/ld.so.conf</filename>. - </phrase> - <phrase revision="sysv"> - <filename>/etc/shadow</filename>, - <filename>/etc/ld.so.conf</filename>, - <filename>/etc/sysconfig/rc.site</filename>, - <filename>/etc/sysconfig/network</filename>, and - <filename>/etc/sysconfig/ifconfig.eth0</filename>. - </phrase> - </para> - - <para>A custom kernel may need to be built for the new system depending on - differences in system hardware and the original kernel - configuration.</para> - - <note><para>There have been some reports of issues when copying between - similar but not identical architectures. For instance, the instruction set - for an Intel system is not identical with an AMD processor and later - versions of some processors may have instructions that are unavailable in - earlier versions.</para></note> - - <para>Finally the new system has to be made bootable via <xref - linkend="ch-bootable-grub"/>.</para> - - </sect2> - -</sect1> diff --git a/chapter06/procps.xml b/chapter06/procps.xml deleted file mode 100644 index 59bf0864c..000000000 --- a/chapter06/procps.xml +++ /dev/null @@ -1,292 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-procps" role="wrap"> - <?dbhtml filename="procps-ng.html"?> - - <sect1info condition="script"> - <productname>procps-ng</productname> - <productnumber>&procps-ng-version;</productnumber> - <address>&procps-ng-url;</address> - </sect1info> - - <title>Procps-ng-&procps-ng-version;</title> - - <indexterm zone="ch-system-procps"> - <primary sortas="a-Procps">Procps-ng</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Procps-ng package contains programs for monitoring processes.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&procps-ng-ch6-sbu;</seg> - <seg>&procps-ng-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Procps-ng</title> - - <para>Prepare procps-ng for compilation:</para> - -<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \ - --exec-prefix= \ - --libdir=/usr/lib \ - --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \ - --disable-static \ - --disable-kill</userinput></screen> - -<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr \ - --exec-prefix= \ - --libdir=/usr/lib \ - --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \ - --disable-static \ - --disable-kill \ - --with-systemd</userinput></screen> - - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--disable-kill</parameter></term> - <listitem> - <para>This switch disables building the <command>kill</command> - command that will be installed by the Util-linux package.</para> - </listitem> - </varlistentry> - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>The test suite needs some custom modifications for LFS. - Remove a test that fails when scripting does not use a tty device and - fix two others. - To run the test suite, run the following commands:</para> - -<screen><userinput remap="test">sed -i -r 's|(pmap_initname)\\\$|\1|' testsuite/pmap.test/pmap.exp -sed -i '/set tty/d' testsuite/pkill.test/pkill.exp -rm testsuite/pgrep.test/pgrep.exp -make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - -<para>Finally, move essential libraries to a location that can be found if -<filename class="directory">/usr</filename> is not mounted.</para> - -<screen><userinput remap="install">mv -v /usr/lib/libprocps.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libprocps.so) /usr/lib/libprocps.so</userinput></screen> - - </sect2> - - <sect2 id="contents-procps" role="content"> - <title>Contents of Procps-ng</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>free, pgrep, pidof, pkill, pmap, ps, pwdx, slabtop, - sysctl, tload, top, uptime, vmstat, w, and watch</seg> - <seg>libprocps.so</seg> - <seg>/usr/include/proc and /usr/share/doc/procps-ng-&procps-ng-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="free"> - <term><command>free</command></term> - <listitem> - <para>Reports the amount of free and used memory (both physical and - swap memory) in the system</para> - <indexterm zone="ch-system-procps free"> - <primary sortas="b-free">free</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pgrep"> - <term><command>pgrep</command></term> - <listitem> - <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> - </listitem> - </varlistentry> - - <varlistentry id="pidof"> - <term><command>pidof</command></term> - <listitem> - <para>Reports the PIDs of the given programs</para> - <indexterm zone="ch-system-procps pidof"> - <primary sortas="b-pidof">pidof</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pkill"> - <term><command>pkill</command></term> - <listitem> - <para>Signals processes based on their name and other attributes</para> - <indexterm zone="ch-system-procps pkill"> - <primary sortas="b-pkill">pkill</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pmap"> - <term><command>pmap</command></term> - <listitem> - <para>Reports the memory map of the given process</para> - <indexterm zone="ch-system-procps pmap"> - <primary sortas="b-pmap">pmap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ps"> - <term><command>ps</command></term> - <listitem> - <para>Lists the current running processes</para> - <indexterm zone="ch-system-procps ps"> - <primary sortas="b-ps">ps</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pwdx"> - <term><command>pwdx</command></term> - <listitem> - <para>Reports the current working directory of a process</para> - <indexterm zone="ch-system-procps pwdx"> - <primary sortas="b-pwdx">pwdx</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="slabtop"> - <term><command>slabtop</command></term> - <listitem> - <para>Displays detailed kernel slab cache information in real time</para> - <indexterm zone="ch-system-procps slabtop"> - <primary sortas="b-slabtop">slabtop</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sysctl"> - <term><command>sysctl</command></term> - <listitem> - <para>Modifies kernel parameters at run time</para> - <indexterm zone="ch-system-procps sysctl"> - <primary sortas="b-sysctl">sysctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tload"> - <term><command>tload</command></term> - <listitem> - <para>Prints a graph of the current system load average</para> - <indexterm zone="ch-system-procps tload"> - <primary sortas="b-tload">tload</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="top"> - <term><command>top</command></term> - <listitem> - <para>Displays a list of the most CPU intensive processes; it - provides an ongoing look at processor activity in real time</para> - <indexterm zone="ch-system-procps top"> - <primary sortas="b-top">top</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uptime"> - <term><command>uptime</command></term> - <listitem> - <para>Reports how long the system has been running, how many users are - logged on, and the system load averages</para> - <indexterm zone="ch-system-procps uptime"> - <primary sortas="b-uptime">uptime</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vmstat"> - <term><command>vmstat</command></term> - <listitem> - <para>Reports virtual memory statistics, giving information about - processes, memory, paging, block Input/Output (IO), traps, and CPU - activity</para> - <indexterm zone="ch-system-procps vmstat"> - <primary sortas="b-vmstat">vmstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="w"> - <term><command>w</command></term> - <listitem> - <para>Shows which users are currently logged on, where, and since - when</para> - <indexterm zone="ch-system-procps w"> - <primary sortas="b-w">w</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="watch"> - <term><command>watch</command></term> - <listitem> - <para>Runs a given command repeatedly, displaying the first - screen-full of its output; this allows a user to watch the output - change over time</para> - <indexterm zone="ch-system-procps watch"> - <primary sortas="b-watch">watch</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libprocps"> - <term><filename class="libraryfile">libprocps</filename></term> - <listitem> - <para>Contains the functions used by most programs in this - package</para> - <indexterm zone="ch-system-procps libprocps"> - <primary sortas="c-libprocps">libprocps</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/psmisc.xml b/chapter06/psmisc.xml deleted file mode 100644 index b01303131..000000000 --- a/chapter06/psmisc.xml +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-psmisc" role="wrap"> - <?dbhtml filename="psmisc.html"?> - - <sect1info condition="script"> - <productname>psmisc</productname> - <productnumber>&psmisc-version;</productnumber> - <address>&psmisc-url;</address> - </sect1info> - - <title>Psmisc-&psmisc-version;</title> - - <indexterm zone="ch-system-psmisc"> - <primary sortas="a-Psmisc">Psmisc</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Psmisc package contains programs for displaying information about - running processes.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&psmisc-ch6-sbu;</seg> - <seg>&psmisc-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Psmisc</title> - - <para>Prepare Psmisc for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Finally, move the <command>killall</command> and <command>fuser</command> - programs to the location specified by the FHS:</para> - -<screen><userinput remap="install">mv -v /usr/bin/fuser /bin -mv -v /usr/bin/killall /bin</userinput></screen> - - </sect2> - - <sect2 id="contents-psmisc" role="content"> - <title>Contents of Psmisc</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>fuser, killall, peekfd, prtstat, pslog, pstree, and pstree.x11 (link to pstree)</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="fuser"> - <term><command>fuser</command></term> - <listitem> - <para>Reports the Process IDs (PIDs) of processes that use the given - files or file systems</para> - <indexterm zone="ch-system-psmisc fuser"> - <primary sortas="b-fuser">fuser</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="killall"> - <term><command>killall</command></term> - <listitem> - <para>Kills processes by name; it sends a signal to all processes - running any of the given commands</para> - <indexterm zone="ch-system-psmisc killall"> - <primary sortas="b-killall">killall</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="peekfd"> - <term><command>peekfd</command></term> - <listitem> - <para>Peek at file descriptors of a running process, given its - PID</para> - <indexterm zone="ch-system-psmisc peekfd"> - <primary sortas="b-peekfd">peekfd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="prtstat"> - <term><command>prtstat</command></term> - <listitem> - <para>Prints information about a process</para> - <indexterm zone="ch-system-psmisc prtstat"> - <primary sortas="b-prtstat">prtstat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pslog"> - <term><command>pslog</command></term> - <listitem> - <para>Reports current logs path of a process</para> - <indexterm zone="ch-system-psmisc pslog"> - <primary sortas="b-pslog">pslog</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pstree"> - <term><command>pstree</command></term> - <listitem> - <para>Displays running processes as a tree</para> - <indexterm zone="ch-system-psmisc pstree"> - <primary sortas="b-pstree">pstree</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pstree.x11"> - <term><command>pstree.x11</command></term> - <listitem> - <para>Same as <command>pstree</command>, except that it waits for - confirmation before exiting</para> - <indexterm zone="ch-system-psmisc pstree.x11"> - <primary sortas="b-pstree.x11">pstree.x11</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/python.xml b/chapter06/python.xml index cc440903d..52c070ab3 100644 --- a/chapter06/python.xml +++ b/chapter06/python.xml @@ -5,8 +5,8 @@ %general-entities; ]> -<sect1 id="ch-system-Python" role="wrap"> - <?dbhtml filename="Python.html"?> +<sect1 id="ch-system-Python-temp" role="wrap"> + <?dbhtml filename="Python-temp.html"?> <sect1info condition="script"> <productname>Python</productname> @@ -16,66 +16,54 @@ <title>Python-&python-version;</title> - <indexterm zone="ch-system-Python"> - <primary sortas="a-python">python</primary> + <indexterm zone="ch-system-Python-temp"> + <primary sortas="a-Python">Python</primary> + <secondary>temporary</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Python 3 package contains the Python development environment. It - is useful for object-oriented programming, writing scripts, prototyping - large programs or developing entire applications.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/python.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> - <segtitle>&buildtime;</segtitle> + <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&python-ch6-sbu;</seg> - <seg>&python-ch6-du;</seg> + <seg>&python-ch5-sbu;</seg> + <seg>&python-ch5-du;</seg> </seglistitem> </segmentedlist> </sect2> <sect2 role="installation"> - <title>Installation of Python 3</title> + <title>Installation of Python</title> + + <note> + <para>There are two package files whose name starts with + <quote>python</quote>. The one to extract from is + <filename>Python-&python-version;.tar.xz</filename> (notice the + uppercase first letter).</para> + </note> <para>Prepare Python for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr \ - --enable-shared \ - --with-system-expat \ - --with-system-ffi \ - --with-ensurepip=yes</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr --without-ensurepip</userinput></screen> <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--with-system-expat</parameter></term> - <listitem> - <para>This switch enables linking against system version of - <application>Expat</application>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--with-system-ffi</parameter></term> - <listitem> - <para>This switch enables linking against system version of - <application>libffi</application>.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>--with-ensurepip=yes</parameter></term> - <listitem> - <para>This switch enables building <command>pip</command> and - <command>setuptools</command> packaging programs.</para> - </listitem> - </varlistentry> + <title>The meaning of the configure option:</title> + + <varlistentry> + <term><parameter>--without-ensurepip</parameter></term> + <listitem> + <para>This switch disables the Python package installer, which is not + needed at this stage.</para> + </listitem> + </varlistentry> </variablelist> @@ -83,171 +71,18 @@ <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue <command>make test</command>. - Some tests requiring network connection or additional packages are - skipped. The test named test_normalization fails because network - configuration is not completed yet. For more comprehensive results, - the test can be rerun when Python 3 is reinstalled in BLFS.</para> - <para>Install the package:</para> -<screen><userinput remap="install">make install -chmod -v 755 /usr/lib/libpython&python-minor;.so -chmod -v 755 /usr/lib/libpython3.so -ln -sfv pip&python-minor; /usr/bin/pip3</userinput></screen> - - <variablelist> - <title>The meaning of the install commands:</title> -<!-- ====== Change 8m if Python minor version changes ======= --> - <varlistentry> - <term><command>chmod -v 755 /usr/lib/libpython3.{8.,}so</command></term> - <listitem> - <para>Fix permissions for libraries to be consistent with other - libraries.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>If desired, install the preformatted documentation:</para> - -<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html - -tar --strip-components=1 \ - --no-same-owner \ - --no-same-permissions \ - -C /usr/share/doc/python-&python-version;/html \ - -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen> - - <variablelist> - <title>The meaning of the documentation install commands:</title> - - <varlistentry> - <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term> - <listitem> - <para>Ensure the installed files have the correct ownership and - permissions. Without these options, using <application>tar</application> - will install the package files with the upstream creator's values. - </para> - </listitem> - </varlistentry> - - </variablelist> +<screen><userinput remap="install">make install</userinput></screen> </sect2> - <sect2 id="contents-python" role="content"> - <title>Contents of Python 3</title> - - <segmentedlist> - <segtitle>Installed Programs</segtitle> - <segtitle>Installed Library</segtitle> - <segtitle>Installed Directories</segtitle> - - <seglistitem> - <seg> - 2to3, idle3, pip3, pydoc3, python3, and python3-config - </seg> - <seg> - libpython&python-minor;.so and libpython3.so - </seg> - <seg> - /usr/include/python&python-minor;, - /usr/lib/python3, and - /usr/share/doc/python-&python-version; - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="python-2to3"> - <term><command>2to3</command></term> - <listitem> - <para> - is a <application>Python</application> program that reads - <application>Python 2.x</application> source code and applies a - series of fixes to transform it into valid - <application>Python 3.x</application> code. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-2to3">2to3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="idle3"> - <term><command>idle3</command></term> - <listitem> - <para> - is a wrapper script that opens a <application>Python</application> - aware GUI editor. For this script to run, you must have installed - <application>Tk</application> before Python so that the Tkinter - Python module is built. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-idle3">idle3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pip3"> - <term><command>pip3</command></term> - <listitem> - <para> - The package installer for Python. You can use pip to install - packages from Python Package Index and other indexes. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-pip3">pip3</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pydoc3"> - <term><command>pydoc3</command></term> - <listitem> - <para> - is the <application>Python</application> documentation tool. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-pydoc3">pydoc3</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - <varlistentry id="python3"> - <term><command>python3</command></term> - <listitem> - <para> - is an interpreted, interactive, object-oriented programming - language. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-python3">python3</primary> - </indexterm> - </listitem> - </varlistentry> -<!-- - <varlistentry id="pyvenv"> - <term><command>pyvenv</command></term> - <listitem> - <para> - creates virtual <application>Python</application> environments in - one or more target directories. - </para> - <indexterm zone="ch-system-Python"> - <primary sortas="b-pyvenv">pyvenv</primary> - </indexterm> - </listitem> - </varlistentry> ---> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-python" role="."/></para> </sect2> </sect1> - diff --git a/chapter06/readline.xml b/chapter06/readline.xml deleted file mode 100644 index 87571ea9d..000000000 --- a/chapter06/readline.xml +++ /dev/null @@ -1,156 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-readline" role="wrap"> - <?dbhtml filename="readline.html"?> - - <sect1info condition="script"> - <productname>readline</productname> - <productnumber>&readline-version;</productnumber> - <address>&readline-url;</address> - </sect1info> - - <title>Readline-&readline-version;</title> - - <indexterm zone="ch-system-readline"> - <primary sortas="a-Readline">Readline</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Readline package is a set of libraries that offers command-line - editing and history capabilities.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&readline-ch6-sbu;</seg> - <seg>&readline-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Readline</title> - - <para>Reinstalling Readline will cause the old libraries to be moved to - <libraryname>.old. While this is normally not a problem, in some cases - it can trigger a linking bug in <command>ldconfig</command>. This can be - avoided by issuing the following two seds:</para> - -<screen><userinput remap="pre">sed -i '/MV.*old/d' Makefile.in -sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen> - - <para>Prepare Readline for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ - --with-curses \ - --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen> - - <variablelist> - <title>The meaning of the configure option:</title> - - <varlistentry> - <term><parameter>--with-curses"</parameter></term> - <listitem> - <para>This option tells Readline that it can find the termcap - library functions in the curses library, rather than a separate - termcap library. It allows generating a correct - <filename>readline.pc</filename> file.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make SHLIB_LIBS="-lncursesw"</userinput></screen> - - <variablelist> - <title>The meaning of the make option:</title> - - <varlistentry> - <term><parameter>SHLIB_LIBS="-lncursesw"</parameter></term> - <listitem> - <para>This option forces Readline to link against the - <filename class="libraryfile">libncursesw</filename> library.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make SHLIB_LIBS="-lncursesw" install</userinput></screen> - - <para>Now move the dynamic libraries to a more appropriate location - and fix up some permissions and symbolic links:</para> - -<screen><userinput remap="install">mv -v /usr/lib/lib{readline,history}.so.* /lib -chmod -v u+w /lib/lib{readline,history}.so.* -ln -sfv ../../lib/$(readlink /usr/lib/libreadline.so) /usr/lib/libreadline.so -ln -sfv ../../lib/$(readlink /usr/lib/libhistory.so ) /usr/lib/libhistory.so</userinput></screen> - - <para>If desired, install the documentation:</para> - -<screen><userinput remap="install">install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-&readline-version;</userinput></screen> - - </sect2> - - <sect2 id="contents-readline" role="content"> - <title>Contents of Readline</title> - - <segmentedlist> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>libhistory.so and libreadline.so</seg> - <seg>/usr/include/readline and - /usr/share/doc/readline-&readline-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libhistory"> - <term><filename class="libraryfile">libhistory</filename></term> - <listitem> - <para>Provides a consistent user interface for recalling lines - of history</para> - <indexterm zone="ch-system-readline libhistory"> - <primary sortas="c-libhistory">libhistory</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libreadline"> - <term><filename class="libraryfile">libreadline</filename></term> - <listitem> - <para>Provides a set of commands for manipulating text entered in an - interactive session of a program.</para> - <indexterm zone="ch-system-readline libreadline"> - <primary sortas="c-libreadline">libreadline</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/revisedchroot.xml b/chapter06/revisedchroot.xml deleted file mode 100644 index 0e836d661..000000000 --- a/chapter06/revisedchroot.xml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-revisedchroot"> - <?dbhtml filename="revisedchroot.html"?> - - <title>Cleaning Up</title> - - <para>Finally, clean up some extra files left around from running tests:</para> - -<screen><userinput>rm -rf /tmp/*</userinput></screen> - - <para>Now log out and reenter the chroot environment with an updated - chroot command. From now on, use this updated chroot command any time - you need to reenter the chroot environment after exiting:</para> - -<screen role="nodump"><userinput>logout - -chroot "$LFS" /usr/bin/env -i \ - HOME=/root TERM="$TERM" \ - PS1='(lfs chroot) \u:\w\$ ' \ - PATH=/bin:/usr/bin:/sbin:/usr/sbin \ - /bin/bash --login</userinput></screen> - - <para>Here the <parameter>+h</parameter> option is not used anymore, since - all the previous programs have been replaced: hashing is therefore - possible.</para> - - <para>If the virtual kernel file systems have been unmounted, either manually - or through a reboot, ensure that the virtual kernel file systems are mounted - when reentering the chroot. This process was explained in <xref - linkend="ch-system-bindmount"/> and <xref - linkend="ch-system-kernfsmount"/>.</para> - - <para>There were several static libraries that were not suppressed earlier - in the chapter in order to satisfy the regression tests in several packages. These - libraries are from binutils, bzip2, e2fsprogs, flex, libtool, and zlib. If desired, - remove them now:</para> - -<screen><userinput>rm -f /usr/lib/lib{bfd,opcodes}.a -rm -f /usr/lib/libctf{,-nobfd}.a -rm -f /usr/lib/libbz2.a -rm -f /usr/lib/lib{com_err,e2p,ext2fs,ss}.a -rm -f /usr/lib/libltdl.a -rm -f /usr/lib/libfl.a -rm -f /usr/lib/libz.a</userinput></screen> - - <para>There are also several files installed in the /usr/lib and /usr/libexec - directories with a file name extention of .la. These are "libtool archive" - files. As already said, they are only useful when linking with static - libraries. They are unneeded, and potentially harmful, when using dynamic - shared libraries, specially when using also non-autotools build systems. - To remove them, run:</para> - -<screen><userinput>find /usr/lib /usr/libexec -name \*.la -delete</userinput></screen> - - <para>For more information about libtool archive files, see the <ulink - url="&blfs-book;/introduction/la-files.html">BLFS section "About Libtool - Archive (.la) files"</ulink>.</para> - - <para>Finally, remove the temporary 'tester' usr account created at the - beginning of this chapter.</para> - -<screen><userinput>sed -i '/tester/d' /etc/passwd /etc/group -rm -rf /home/tester</userinput></screen> -</sect1> diff --git a/chapter06/sed.xml b/chapter06/sed.xml index 030e77a0b..f146b5102 100644 --- a/chapter06/sed.xml +++ b/chapter06/sed.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-sed" role="wrap"> +<sect1 id="ch-tools-sed" role="wrap"> <?dbhtml filename="sed.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Sed-&sed-version;</title> - <indexterm zone="ch-system-sed"> + <indexterm zone="ch-tools-sed"> <primary sortas="a-Sed">Sed</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Sed package contains a stream editor.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/sed.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> - <segtitle>&buildtime;</segtitle> + <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&sed-ch6-sbu;</seg> - <seg>&sed-ch6-du;</seg> + <seg>&sed-ch5-sbu;</seg> + <seg>&sed-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -42,55 +45,25 @@ <para>Prepare Sed for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --bindir=/bin</userinput></screen> - <para>Compile the package and generate the HTML documentation:</para> + <para>Compile the package:</para> -<screen><userinput remap="make">make -make html</userinput></screen> +<screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> + <para>Install the package:</para> -<screen><userinput remap="test">chown -Rv tester . -su tester -c "PATH=$PATH make check"</userinput></screen> - - <para>Install the package and its documentation:</para> - -<screen><userinput remap="install">make install -install -d -m755 /usr/share/doc/sed-&sed-version; -install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> - <sect2 id="contents-sed" role="content"> - <title>Contents of Sed</title> - - <segmentedlist> - <segtitle>Installed program</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>sed</seg> - <seg>/usr/share/doc/sed-&sed-version;</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="sed"> - <term><command>sed</command></term> - <listitem> - <para>Filters and transforms text files in a single pass</para> - <indexterm zone="ch-system-sed sed"> - <primary sortas="b-sed">sed</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-sed" role="."/></para> </sect2> diff --git a/chapter06/shadow.xml b/chapter06/shadow.xml deleted file mode 100644 index 425112cbd..000000000 --- a/chapter06/shadow.xml +++ /dev/null @@ -1,608 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-shadow" role="wrap"> - <?dbhtml filename="shadow.html"?> - - <sect1info condition="script"> - <productname>shadow</productname> - <productnumber>&shadow-version;</productnumber> - <address>&shadow-url;</address> - </sect1info> - - <title>Shadow-&shadow-version;</title> - - <indexterm zone="ch-system-shadow"> - <primary sortas="a-Shadow">Shadow</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Shadow package contains programs for handling passwords in a secure - way.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&shadow-ch6-sbu;</seg> - <seg>&shadow-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Shadow</title> - - <note> - <para>If you would like to enforce the use of strong passwords, refer to - <ulink url="&blfs-book;postlfs/cracklib.html"/> for installing - CrackLib prior to building Shadow. Then add - <parameter>--with-libcrack</parameter> to the <command>configure</command> - command below.</para> - </note> - - <para>Disable the installation of the <command>groups</command> program - and its man pages, as Coreutils provides a better version. Also, - prevent the installation of manual pages that were already installed in - <xref linkend="ch-system-man-pages"/>:</para> - -<screen><userinput remap="pre">sed -i 's/groups$(EXEEXT) //' src/Makefile.in -find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; -find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; -find man -name Makefile.in -exec sed -i 's/passwd\.5 / /' {} \;</userinput></screen> - - <para id="shadow-login_defs">Instead of using the default - <emphasis>crypt</emphasis> method, use the more secure - <emphasis>SHA-512</emphasis> method of password encryption, which also - allows passwords longer than 8 characters. It is also necessary to change - the obsolete <filename class="directory">/var/spool/mail</filename> location - for user mailboxes that Shadow uses by default to the <filename - class="directory">/var/mail</filename> location used currently:</para> - -<screen><userinput remap="pre">sed -i -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \ - -e 's@/var/spool/mail@/var/mail@' etc/login.defs</userinput></screen> - - <note> - <para>If you chose to build Shadow with Cracklib support, run the following:</para> - -<screen role="nodump"><userinput>sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs</userinput></screen> - </note> - - <para>Make a minor change to make the first group number generated - by useradd 1000:</para> - -<screen><userinput remap="pre">sed -i 's/1000/999/' etc/useradd</userinput></screen> - - <para>Prepare Shadow for compilation:</para> - -<screen><userinput remap="configure">touch /usr/bin/passwd -./configure --sysconfdir=/etc \ - --with-group-name-max-length=32</userinput></screen> - - <variablelist> - <title>The meaning of the configure option:</title> - - <varlistentry> - <term><command>touch /usr/bin/passwd</command></term> - <listitem> - <para>The file <filename>/usr/bin/passwd</filename> needs - to exist because its location is harcoded in some programs, and - the default location if it does not exist is not right.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>--with-group-name-max-length=32</parameter></term> - <listitem> - <para>The maximum user name is 32 characters. Make the maximum - group name the same.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - <!-- - <para>Move a misplaced program to its proper location:</para> - -<screen><userinput remap="install">mv -v /usr/bin/passwd /bin</userinput></screen> - --> - - <!-- <para>Move Shadow's libraries to more appropriate locations:</para> - -<screen><userinput remap="install">mv -v /lib/libshadow.*a /usr/lib -rm -v /lib/libshadow.so -ln -sfv ../../lib/libshadow.so.0 /usr/lib/libshadow.so</userinput></screen> --> - - </sect2> - - <sect2 id="conf-shadow" role="configuration"> - <title>Configuring Shadow</title> - - <indexterm zone="conf-shadow"> - <primary sortas="a-Shadow">Shadow</primary> - <secondary>configuring</secondary> - </indexterm> - - <para>This package contains utilities to add, modify, and delete users and - groups; set and change their passwords; and perform other administrative - tasks. For a full explanation of what <emphasis>password shadowing</emphasis> - means, see the <filename>doc/HOWTO</filename> file within the unpacked - source tree. If using Shadow support, keep in mind that programs which need - to verify passwords (display managers, FTP programs, pop3 daemons, etc.) - must be Shadow-compliant. That is, they need to be able to work with - shadowed passwords.</para> - - <para>To enable shadowed passwords, run the following command:</para> - -<screen><userinput>pwconv</userinput></screen> - - <para>To enable shadowed group passwords, run:</para> - -<screen><userinput>grpconv</userinput></screen> - - <para>Shadow's stock configuration for the <command>useradd</command> - utility has a few caveats that need some explanation. First, the default - action for the <command>useradd</command> utility is to create the user and - a group of the same name as the user. By default the user ID (UID) and - group ID (GID) numbers will begin with 1000. This means if you don't pass - parameters to <command>useradd</command>, each user will be a member of a - unique group on the system. If this behavior is undesirable, you'll need - to pass the <parameter>-g</parameter> parameter to - <command>useradd</command>. The default parameters are stored in the - <filename>/etc/default/useradd</filename> file. You may need to modify two - parameters in this file to suit your particular needs.</para> - - <variablelist> - <title><filename>/etc/default/useradd</filename> Parameter Explanations</title> - - <varlistentry> - <term><parameter>GROUP=1000</parameter></term> - <listitem> - <para>This parameter sets the beginning of the group numbers used in - the /etc/group file. You can modify it to anything you desire. Note - that <command>useradd</command> will never reuse a UID or GID. If the - number identified in this parameter is used, it will use the next - available number after this. Note also that if you don't have a group - 1000 on your system the first time you use <command>useradd</command> - without the <parameter>-g</parameter> parameter, you'll get a message - displayed on the terminal that says: - <computeroutput>useradd: unknown GID 1000</computeroutput>. You may - disregard this message and group number 1000 will be used.</para> - </listitem> - </varlistentry> - <varlistentry> - <term><parameter>CREATE_MAIL_SPOOL=yes</parameter></term> - <listitem> - <para>This parameter causes <command>useradd</command> to create a - mailbox file for the newly created user. <command>useradd</command> - will make the group ownership of this file to the - <systemitem class="groupname">mail</systemitem> group with 0660 - permissions. If you would prefer that these mailbox files are not - created by <command>useradd</command>, issue the following - command:</para> - -<screen><userinput>sed -i 's/yes/no/' /etc/default/useradd</userinput></screen> - </listitem> - </varlistentry> - - </variablelist> - - - </sect2> - - <sect2 role="configuration"> - <title>Setting the root password</title> - - <para>Choose a password for user <emphasis>root</emphasis> and set it - by running:</para> - -<screen role="nodump"><userinput>passwd root</userinput></screen> - - </sect2> - - <sect2 id="contents-shadow" role="content"> - <title>Contents of Shadow</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>chage, chfn, chgpasswd, chpasswd, chsh, expiry, faillog, gpasswd, - groupadd, groupdel, groupmems, groupmod, grpck, grpconv, grpunconv, - lastlog, login, logoutd, newgidmap, newgrp, newuidmap, newusers, - nologin, passwd, pwck, pwconv, pwunconv, sg (link to newgrp), su, - useradd, userdel, usermod, vigr (link to vipw), and vipw</seg> - <seg>/etc/default</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="chage"> - <term><command>chage</command></term> - <listitem> - <para>Used to change the maximum number of days between obligatory - password changes</para> - <indexterm zone="ch-system-shadow chage"> - <primary sortas="b-chage">chage</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chfn"> - <term><command>chfn</command></term> - <listitem> - <para>Used to change a user's full name and other information</para> - <indexterm zone="ch-system-shadow chfn"> - <primary sortas="b-chfn">chfn</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chgpasswd"> - <term><command>chgpasswd</command></term> - <listitem> - <para>Used to update group passwords in batch mode</para> - <indexterm zone="ch-system-shadow chgpasswd"> - <primary sortas="b-chgpasswd">chgpasswd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chpasswd"> - <term><command>chpasswd</command></term> - <listitem> - <para>Used to update user passwords in batch mode</para> - <indexterm zone="ch-system-shadow chpasswd"> - <primary sortas="b-chpasswd">chpasswd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chsh"> - <term><command>chsh</command></term> - <listitem> - <para>Used to change a user's default login shell</para> - <indexterm zone="ch-system-shadow chsh"> - <primary sortas="b-chsh">chsh</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="expiry"> - <term><command>expiry</command></term> - <listitem> - <para>Checks and enforces the current password expiration policy</para> - <indexterm zone="ch-system-shadow expiry"> - <primary sortas="b-expiry">expiry</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="faillog"> - <term><command>faillog</command></term> - <listitem> - <para>Is used to examine the log of login failures, to set a maximum - number of failures before an account is blocked, or to reset the - failure count</para> - <indexterm zone="ch-system-shadow faillog"> - <primary sortas="b-faillog">faillog</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="gpasswd"> - <term><command>gpasswd</command></term> - <listitem> - <para>Is used to add and delete members and administrators to - groups</para> - <indexterm zone="ch-system-shadow gpasswd"> - <primary sortas="b-gpasswd">gpasswd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groupadd"> - <term><command>groupadd</command></term> - <listitem> - <para>Creates a group with the given name</para> - <indexterm zone="ch-system-shadow groupadd"> - <primary sortas="b-groupadd">groupadd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groupdel"> - <term><command>groupdel</command></term> - <listitem> - <para>Deletes the group with the given name</para> - <indexterm zone="ch-system-shadow groupdel"> - <primary sortas="b-groupdel">groupdel</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groupmems"> - <term><command>groupmems</command></term> - <listitem> - <para>Allows a user to administer his/her own group membership list - without the requirement of super user privileges.</para> - <indexterm zone="ch-system-shadow groupmems"> - <primary sortas="b-groupmems">groupmems</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="groupmod"> - <term><command>groupmod</command></term> - <listitem> - <para>Is used to modify the given group's name or GID</para> - <indexterm zone="ch-system-shadow groupmod"> - <primary sortas="b-groupmod">groupmod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grpck"> - <term><command>grpck</command></term> - <listitem> - <para>Verifies the integrity of the group files - <filename>/etc/group</filename> and - <filename>/etc/gshadow</filename></para> - <indexterm zone="ch-system-shadow grpck"> - <primary sortas="b-grpck">grpck</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grpconv"> - <term><command>grpconv</command></term> - <listitem> - <para>Creates or updates the shadow group file from the normal - group file</para> - <indexterm zone="ch-system-shadow grpconv"> - <primary sortas="b-grpconv">grpconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="grpunconv"> - <term><command>grpunconv</command></term> - <listitem> - <para>Updates <filename>/etc/group</filename> from - <filename>/etc/gshadow</filename> and then deletes the latter</para> - <indexterm zone="ch-system-shadow grpunconv"> - <primary sortas="b-grpunconv">grpunconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lastlog"> - <term><command>lastlog</command></term> - <listitem> - <para>Reports the most recent login of all users or of a - given user</para> - <indexterm zone="ch-system-shadow lastlog"> - <primary sortas="b-lastlog">lastlog</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="login"> - <term><command>login</command></term> - <listitem> - <para>Is used by the system to let users sign on</para> - <indexterm zone="ch-system-shadow login"> - <primary sortas="b-login">login</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="logoutd"> - <term><command>logoutd</command></term> - <listitem> - <para>Is a daemon used to enforce restrictions on log-on time - and ports</para> - <indexterm zone="ch-system-shadow logoutd"> - <primary sortas="b-logoutd">logoutd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="newgidmap"> - <term><command>newgidmap</command></term> - <listitem> - <para>Is used to set the gid mapping of a user namespace</para> - <indexterm zone="ch-system-shadow newgidmap"> - <primary sortas="b-newgidmap">newgidmap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="newgrp"> - <term><command>newgrp</command></term> - <listitem> - <para>Is used to change the current GID during a login session</para> - <indexterm zone="ch-system-shadow newgrp"> - <primary sortas="b-newgrp">newgrp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="newuidmap"> - <term><command>newuidmap</command></term> - <listitem> - <para>Is used to set the uid mapping of a user namespace</para> - <indexterm zone="ch-system-shadow newuidmap"> - <primary sortas="b-newuidmap">newuidmap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="newusers"> - <term><command>newusers</command></term> - <listitem> - <para>Is used to create or update an entire series of user - accounts</para> - <indexterm zone="ch-system-shadow newusers"> - <primary sortas="b-newusers">newusers</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nologin"> - <term><command>nologin</command></term> - <listitem> - <para>Displays a message that an account is not available; it is designed - to be used as the default shell for accounts that have been - disabled</para> - <indexterm zone="ch-system-shadow nologin"> - <primary sortas="b-nologin">nologin</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="passwd"> - <term><command>passwd</command></term> - <listitem> - <para>Is used to change the password for a user or group account</para> - <indexterm zone="ch-system-shadow passwd"> - <primary sortas="b-passwd">passwd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pwck"> - <term><command>pwck</command></term> - <listitem> - <para>Verifies the integrity of the password files - <filename>/etc/passwd</filename> and - <filename>/etc/shadow</filename></para> - <indexterm zone="ch-system-shadow pwck"> - <primary sortas="b-pwck">pwck</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pwconv"> - <term><command>pwconv</command></term> - <listitem> - <para>Creates or updates the shadow password file from the normal - password file</para> - <indexterm zone="ch-system-shadow pwconv"> - <primary sortas="b-pwconv">pwconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pwunconv"> - <term><command>pwunconv</command></term> - <listitem> - <para>Updates <filename>/etc/passwd</filename> from - <filename>/etc/shadow</filename> and then deletes the latter</para> - <indexterm zone="ch-system-shadow pwunconv"> - <primary sortas="b-pwunconv">pwunconv</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="sg"> - <term><command>sg</command></term> - <listitem> - <para>Executes a given command while the user's GID - is set to that of the given group</para> - <indexterm zone="ch-system-shadow sg"> - <primary sortas="b-sg">sg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="su"> - <term><command>su</command></term> - <listitem> - <para>Runs a shell with substitute user and group IDs</para> - <indexterm zone="ch-system-shadow su"> - <primary sortas="b-su">su</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="useradd"> - <term><command>useradd</command></term> - <listitem> - <para>Creates a new user with the given name, or updates the default - new-user information</para> - <indexterm zone="ch-system-shadow useradd"> - <primary sortas="b-useradd">useradd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="userdel"> - <term><command>userdel</command></term> - <listitem> - <para>Deletes the given user account</para> - <indexterm zone="ch-system-shadow userdel"> - <primary sortas="b-userdel">userdel</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="usermod"> - <term><command>usermod</command></term> - <listitem> - <para>Is used to modify the given user's login name, User - Identification (UID), shell, initial group, home directory, etc.</para> - <indexterm zone="ch-system-shadow usermod"> - <primary sortas="b-usermod">usermod</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vigr"> - <term><command>vigr</command></term> - <listitem> - <para>Edits the <filename>/etc/group</filename> or - <filename>/etc/gshadow</filename> files</para> - <indexterm zone="ch-system-shadow vigr"> - <primary sortas="b-vigr">vigr</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vipw"> - <term><command>vipw</command></term> - <listitem> - <para>Edits the <filename>/etc/passwd</filename> or - <filename>/etc/shadow</filename> files</para> - <indexterm zone="ch-system-shadow vipw"> - <primary sortas="b-vipw">vipw</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/stripping.xml b/chapter06/stripping.xml new file mode 100644 index 000000000..7c054b6b2 --- /dev/null +++ b/chapter06/stripping.xml @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-stripping"> + <?dbhtml filename="stripping.html"?> + + <title>Stripping</title> + + <para>The steps in this section are optional, but if the LFS partition is + rather small, it is beneficial to learn that unnecessary items can be removed. + The executables and libraries built so far contain about 70 MB of unneeded + debugging symbols. Remove those symbols with:</para> + +<screen><userinput>$LFS_TGT-strip --strip-debug $LFS/usr/lib/* +$LFS_TGT-strip --strip-unneeded $LFS/usr/{,s}bin/*</userinput></screen> + + <para>These commands will skip a number of files, reporting that it does not + recognize their file format. Most of these are scripts instead of binaries. + Note that we use the <command>strip</command> program built in + <quote>Binutils pass 1</quote>, since it is the one that knows how to strip + our cross-compiled programs.</para> +<!-- Normally, the host "strip" could be used too, since it is actually the +same computer. But Some old versions of binutils may generate buggy crt1.o +and the like, because they do not know about recently introduced symbol +types. For more details, +see https://sourceware.org/bugzilla/show_bug.cgi?id=22875--> + + <para>Take care <emphasis>not</emphasis> to use + <parameter>--strip-unneeded</parameter> on the libraries. The static + ones would be destroyed and the toolchain packages would need to be + built all over again.</para> + + <para>To save more, remove the documentation:</para> + +<screen><userinput>rm -rf $LFS/usr/{,share}/{info,man,doc}</userinput></screen> + + <para>The libtool .la files are only useful when linking with static + libraries. They are unneeded, and potentially harmful, when using dynamic + shared libraries, specially when using also non-autotools build systems. + Remove those files now:</para> + +<screen><userinput>find $LFS/usr/{lib,libexec} -name \*.la -delete</userinput></screen> + + <para>At this point, you should have at least 3 GB of free space in + <envar>$LFS</envar> that can be used to build and install Glibc and Gcc in + the next phase. If you can build and install Glibc, you can build and install + the rest too.</para> + +</sect1> diff --git a/chapter06/strippingagain.xml b/chapter06/strippingagain.xml deleted file mode 100644 index fb2a1b55f..000000000 --- a/chapter06/strippingagain.xml +++ /dev/null @@ -1,81 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-strippingagain"> - <?dbhtml filename="strippingagain.html"?> - - <title>Stripping Again</title> - - <para>This section is optional. If the intended user is not a - programmer and does not plan to do - any debugging on the system software, the system size can be decreased - by about 90 MB by removing the debugging symbols from binaries and - libraries. This causes no inconvenience other than not being able to - debug the software fully anymore.</para> - - <para>Most people who use the commands mentioned below do not - experience any difficulties. However, it is easy to make a typo and - render the new system unusable, so before running the - <command>strip</command> commands, it is a good idea to make a - backup of the LFS system in its current state.</para> - - <para>First place the debugging symbols for selected libraries - in separate files. This debugging information is needed if running - regression tests that use <ulink - url='&blfs-book;/general/valgrind.html'>valgrind</ulink> or <ulink - url='&blfs-book;/general/gdb.html'>gdb</ulink> later in BLFS. - </para> - -<!-- also of interest are libgfortan, libgo, libgomp, and libobjc from gcc --> - -<!--<screen><userinput>save_lib="ld-2.25.so libc-2.25.so libpthread-2.25.so libthread_db-1.0.so"--> -<screen><userinput>save_lib="ld-&glibc-version;.so libc-&glibc-version;.so libpthread-&glibc-version;.so libthread_db-&libthread_db-version;.so" - -cd /lib - -for LIB in $save_lib; do - objcopy --only-keep-debug $LIB $LIB.dbg - strip --strip-unneeded $LIB - objcopy --add-gnu-debuglink=$LIB.dbg $LIB -done - -save_usrlib="libquadmath.so.&libquadmath-version; libstdc++.so.&libstdcpp-version; - libitm.so.&libitm-version; libatomic.so.&libatomic-version;" <!-- libcilkrts.so.&libcilkrts-version;--> - -cd /usr/lib - -for LIB in $save_usrlib; do - objcopy --only-keep-debug $LIB $LIB.dbg - strip --strip-unneeded $LIB - objcopy --add-gnu-debuglink=$LIB.dbg $LIB -done - -unset LIB save_lib save_usrlib</userinput></screen> - -<!-- <para>Before performing the stripping, take special care to ensure that - none of the binaries that are about to be stripped are running:</para> - -<screen role="nodump"><userinput>exec /tools/bin/bash</userinput></screen> - - <para>Now the binaries and libraries can be safely stripped:</para> ---> - <para>Now the binaries and libraries can be stripped:</para> -<screen><userinput>find /usr/lib -type f -name \*.a \ - -exec strip --strip-debug {} ';' - -find /lib /usr/lib -type f -name \*.so* ! -name \*dbg \ - -exec strip --strip-unneeded {} ';' - -find /{bin,sbin} /usr/{bin,sbin,libexec} -type f \ - -exec strip --strip-all {} ';'</userinput></screen> - - <para>A large number of files will be reported as having their file - format not recognized. These warnings can be safely ignored. These - warnings indicate that those files are scripts instead of - binaries.</para> - -</sect1> diff --git a/chapter06/sysklogd.xml b/chapter06/sysklogd.xml deleted file mode 100644 index e96980cb4..000000000 --- a/chapter06/sysklogd.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-sysklogd" role="wrap" revision="sysv"> - <?dbhtml filename="sysklogd.html"?> - - <sect1info condition="script"> - <productname>sysklogd</productname> - <productnumber>&sysklogd-version;</productnumber> - <address>&sysklogd-url;</address> - </sect1info> - - <title>Sysklogd-&sysklogd-version;</title> - - <indexterm zone="ch-system-sysklogd"> - <primary sortas="a-Sysklogd">Sysklogd</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Sysklogd package contains programs for logging system messages, - such as those given by the kernel when unusual things happen.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&sysklogd-ch6-sbu;</seg> - <seg>&sysklogd-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Sysklogd</title> - - <para>First, fix problems that causes a segmentation fault under - some conditions in klogd and fix an obsolete program construct:</para> - -<screen><userinput remap="pre">sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c -sed -i 's/union wait/int/' syslogd.c</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make BINDIR=/sbin install</userinput></screen> - - </sect2> - - <sect2 id="conf-sysklogd" role="configuration"> - <title>Configuring Sysklogd</title> - - <indexterm zone="conf-sysklogd"> - <primary sortas="a-Sysklogd">Sysklogd</primary> - <secondary>configuring</secondary> - </indexterm> - - <indexterm zone="conf-sysklogd"> - <primary sortas="e-/etc/syslog.conf">/etc/syslog.conf</primary> - </indexterm> - - <para>Create a new <filename>/etc/syslog.conf</filename> file by running the - following:</para> - -<screen><userinput>cat > /etc/syslog.conf << "EOF" -<literal># Begin /etc/syslog.conf - -auth,authpriv.* -/var/log/auth.log -*.*;auth,authpriv.none -/var/log/sys.log -daemon.* -/var/log/daemon.log -kern.* -/var/log/kern.log -mail.* -/var/log/mail.log -user.* -/var/log/user.log -*.emerg * - -# End /etc/syslog.conf</literal> -EOF</userinput></screen> - - </sect2> - - <sect2 id="contents-sysklogd" role="content"> - <title>Contents of Sysklogd</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>klogd and syslogd</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="klogd"> - <term><command>klogd</command></term> - <listitem> - <para>A system daemon for intercepting and logging kernel messages</para> - <indexterm zone="ch-system-sysklogd klogd"> - <primary sortas="b-klogd">klogd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="syslogd"> - <term><command>syslogd</command></term> - <listitem> - <para>Logs the messages that system programs offer for logging [Every - logged message contains at least a date stamp and a hostname, and - normally the program's name too, but that depends on how trusting the - logging daemon is told to be.]</para> - <indexterm zone="ch-system-sysklogd syslogd"> - <primary sortas="b-syslogd">syslogd</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/systemd.xml b/chapter06/systemd.xml deleted file mode 100644 index 2cf2d1d1b..000000000 --- a/chapter06/systemd.xml +++ /dev/null @@ -1,830 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-systemd" role="wrap" revision="systemd"> - <?dbhtml filename="systemd.html"?> - - <sect1info condition="script"> - <productname>systemd</productname> - <productnumber>&systemd-version;</productnumber> - <address>&systemd-url;</address> - </sect1info> - - <title>Systemd-&systemd-version;</title> - - <indexterm zone="ch-system-systemd"> - <primary sortas="a-systemd">systemd</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The systemd package contains programs for controlling the startup, - running, and shutdown of the system.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&systemd-ch6-sbu;</seg> - <seg>&systemd-ch6-du;</seg> - </seglistitem> - </segmentedlist> - </sect2> - - <sect2 role="installation"> - <title>Installation of systemd</title> - - <para>First, apply a patch to fix the build with GCC-10:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../systemd-&systemd-version;-gcc_10-fixes-1.patch</userinput></screen> - - - <para>Create a symlink to work around missing xsltproc:</para> - -<screen><userinput remap="pre">ln -sf /bin/true /usr/bin/xsltproc</userinput></screen> - - <para>Set up the man pages:</para> - -<screen><userinput remap="pre">tar -xf ../systemd-man-pages-&systemd-version;.tar.xz</userinput></screen> - - <para>Remove tests that cannot be built in chroot:</para> - -<screen><userinput remap="pre">sed '179,$ d' -i src/resolve/meson.build</userinput></screen> - - <para>Remove an unneeded group, - <systemitem class="groupname">render</systemitem>, from the default udev - rules:</para> - -<screen><userinput remap="pre">sed -i 's/GROUP="render", //' rules.d/50-udev-default.rules.in</userinput></screen> - - <para>Prepare systemd for compilation:</para> - -<screen><userinput remap="configure">mkdir -p build -cd build - -LANG=en_US.UTF-8 \ -meson --prefix=/usr \ - --sysconfdir=/etc \ - --localstatedir=/var \ - -Dblkid=true \ - -Dbuildtype=release \ - -Ddefault-dnssec=no \ - -Dfirstboot=false \ - -Dinstall-tests=false \ - -Dkmod-path=/bin/kmod \ - -Dldconfig=false \ - -Dmount-path=/bin/mount \ - -Drootprefix= \ - -Drootlibdir=/lib \ - -Dsplit-usr=true \ - -Dsulogin-path=/sbin/sulogin \ - -Dsysusers=false \ - -Dumount-path=/bin/umount \ - -Db_lto=false \ - -Drpmmacrosdir=no \ - -Dhomed=false \ - -Duserdb=false \ - -Dman=true \ - ..</userinput></screen> - - <variablelist> - <title>The meaning of the meson options:</title> - -<!-- - <varlistentry> - <term><parameter>-Dc_args=-Wno-format-overflow</parameter></term> - <listitem> - <para>The defaults flags passed to gcc contain - <parameter>-Werror=format-overflow</parameter>, which generates - an error with GCC 10. Passing this parameter prevents the error - from occuring.</para> - </listitem> - </varlistentry> ---> - - <varlistentry> - <term><parameter>-D*-path=*</parameter></term> - <listitem> - <para>These switches provide location of binaries needed by - systemd at runtime that have not yet been installed.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Ddefault-dnssec=no</parameter></term> - <listitem> - <para>This switch turns off the experimental DNSSEC support.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dfirstboot=false</parameter></term> - <listitem> - <para>This switch prevents installation of systemd - services responsible for setting up the system for - the first time. They are not useful for LFS because - everything is done manually.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dinstall-tests=false</parameter></term> - <listitem> - <para>This switch prevents installation of the compiled tests.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dldconfig=false</parameter></term> - <listitem> - <para>This switch prevents installation of a systemd unit that runs - <command>ldconfig</command> at boot, which is not useful for source - distributions such as LFS and makes the boot time longer. Remove it - if the described feature is desired.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Droot*</parameter></term> - <listitem> - <para>These switches ensure that core programs and - shared libraries are installed in the subdirectories - of the root partition.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dsplit-usr=true</parameter></term> - <listitem> - <para>This switch ensures that systemd will work on - systems where /bin, /lib and /sbin directories are not - symlinks to their /usr counterparts.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Dsysusers=false</parameter></term> - <listitem> - <para>This switch prevents installation of systemd - services responsible for setting up the - <filename>/etc/group</filename> and - <filename>/etc/passwd</filename> files. Both files - were created earlier in this chapter.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-Drpmmacrosdir=no</parameter></term> - <listitem> - <para>This switch disables installation of RPM Macros - for use with systemd because LFS does not support RPM.</para> - </listitem> - </varlistentry> - - <varlistentry> - <term><parameter>-D{userdb,homed}=false</parameter></term> - <listitem> - <para>Remove two daemons that have dependencies that do not fit - the scope of LFS.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>Compile the package:</para> - -<screen><userinput remap="make">LANG=en_US.UTF-8 ninja</userinput></screen> -<!-- - <para>To test the package, execute the following command:</para> - -<screen><userinput remap="test">LANG=en_US.UTF-8 ninja test</userinput></screen> ---> - <para>Install the package:</para> - -<screen><userinput remap="install">LANG=en_US.UTF-8 ninja install</userinput></screen> - - <para>Remove an unnecessary symbolic link:</para> - -<screen><userinput remap="install">rm -f /usr/bin/xsltproc</userinput></screen> - - <para>Create the <filename>/etc/machine-id</filename> file needed by - <command>systemd-journald</command>:</para> - -<screen><userinput remap="adjust">systemd-machine-id-setup</userinput></screen> - - <para>Setup the basic target structure:</para> - -<screen><userinput remap="adjust">systemctl preset-all</userinput></screen> - - <para>Disable a service that is known to cause problems with systems that - use a network configuration other than what is provided by - systemd-networkd:</para> - <!-- Observed halting startup with dhcpcd handling the primary NIC --> - -<screen><userinput remap="adjust">systemctl disable systemd-time-wait-sync.service</userinput></screen> - - <para>Prevent systemd from resetting the maximum PID value which causes - some problems with packages and units in BLFS:</para> - - -<screen><userinput remap="adjust">rm -f /usr/lib/sysctl.d/50-pid-max.conf</userinput></screen> - - <!-- - <para>Prevent systemd from creating <filename>/run/nologin</filename> - to allow unprivileged user logins without - <application>systemd-logind</application>:</para> - -<screen><userinput remap="adjust">rm -f /usr/lib/tmpfiles.d/systemd-nologin.conf</userinput></screen> - --> - </sect2> - - <sect2 id="contents-systemd" role="content"> - <title>Contents of systemd</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>bootctl, busctl, coredumpctl, halt (symlink to systemctl), - hostnamectl, init, journalctl, kernel-install, localectl, loginctl, - machinectl, networkctl, portablectl, poweroff (symlink to - systemctl), reboot (symlink to systemctl), resolvconf (symlink to - resolvectl), resolvectl, runlevel (symlink to systemctl), shutdown - (symlink to systemctl), systemctl, systemd-analyze, - systemd-ask-password, systemd-cat, systemd-cgls, systemd-cgtop, - systemd-delta, systemd-detect-virt, systemd-escape, systemd-hwdb, - systemd-id128, systemd-inhibit, systemd-machine-id-setup, - systemd-mount, systemd-notify, systemd-nspawn, systemd-path, - systemd-repart, systemd-resolve (symlink to resolvectl), systemd-run, - systemd-socket-activate, systemd-stdio-bridge, systemd-tmpfiles, - systemd-tty-ask-password-agent, systemd-umount (symlink to - systemd-mount), telinit (symlink to systemctl), timedatectl, and - udevadm</seg> - <seg>libnss_myhostname.so.2, libnss_mymachines.so.2, - libnss_resolve.so.2, libnss_systemd.so.2, - libsystemd.so, libsystemd-shared-&systemd-version;.so (in /lib/systemd), - and libudev.so</seg> - <seg>/etc/binfmt.d, /etc/init.d, /etc/kernel, /etc/modules-load.d, - /etc/sysctl.d, /etc/systemd, /etc/tmpfiles.d, /etc/udev, - /etc/xdg/systemd, /lib/systemd, /lib/udev, /usr/include/systemd, - /usr/lib/binfmt.d, /usr/lib/kernel, /usr/lib/modules-load.d, - /usr/lib/sysctl.d, /usr/lib/systemd, /usr/lib/tmpfiles.d, - /usr/share/doc/systemd-&systemd-version;, /usr/share/factory, - /usr/share/systemd, /var/lib/systemd, and /var/log/journal</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bootctl"> - <term><command>bootctl</command></term> - <listitem> - <para>Used to query the firmware and boot manager settings</para> - <indexterm zone="ch-system-systemd bootctl"> - <primary sortas="b-bootctl">bootctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="busctl"> - <term><command>busctl</command></term> - <listitem> - <para>Used to introspect and monitor the D-Bus bus</para> - <indexterm zone="ch-system-systemd busctl"> - <primary sortas="b-busctl">busctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="coredumpctl"> - <term><command>coredumpctl</command></term> - <listitem> - <para>Used to retrieve coredumps from the systemd journal</para> - <indexterm zone="ch-system-systemd coredumpctl"> - <primary sortas="b-coredumpctl">coredumpctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="halt"> - <term><command>halt</command></term> - <listitem> - <para>Normally invokes <command>shutdown</command> with the - <parameter>-h</parameter> option, except when already in run-level 0, - then it tells the kernel to halt the system; it notes in the - file <filename>/var/log/wtmp</filename> that the system is being - brought down</para> - <indexterm zone="ch-system-systemd halt"> - <primary sortas="b-halt">halt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hostnamectl"> - <term><command>hostnamectl</command></term> - <listitem> - <para>Used to query and change the system hostname and related - settings</para> - <indexterm zone="ch-system-systemd hostnamectl"> - <primary sortas="b-hostnamectl">hostnamectl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="init"> - <term><command>init</command></term> - <listitem> - <para>The first process to be started when the kernel has initialized - the hardware which takes over the boot process and starts all - processes according to its configuration files</para> - <indexterm zone="ch-system-systemd init"> - <primary sortas="b-init">init</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="journalctl"> - <term><command>journalctl</command></term> - <listitem> - <para>Used to query the contents of the systemd journal</para> - <indexterm zone="ch-system-systemd journalctl"> - <primary sortas="b-journalctl">journalctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="kernel-install"> - <term><command>kernel-install</command></term> - <listitem> - <para>Used to add and remove kernel and initramfs images to and - from /boot</para> - <indexterm zone="ch-system-systemd kernel-install"> - <primary sortas="b-kernel-install">kernel-install</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="localectl"> - <term><command>localectl</command></term> - <listitem> - <para>Used to query and change the system locale and keyboard layout - settings</para> - <indexterm zone="ch-system-systemd localectl"> - <primary sortas="b-localectl">localectl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="loginctl"> - <term><command>loginctl</command></term> - <listitem> - <para>Used to introspect and control the state of the systemd Login - Manager</para> - <indexterm zone="ch-system-systemd loginctl"> - <primary sortas="b-loginctl">loginctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="machinectl"> - <term><command>machinectl</command></term> - <listitem> - <para>Used to introspect and control the state of the systemd Virtual - Machine and Container Registration Manager</para> - <indexterm zone="ch-system-systemd machinectl"> - <primary sortas="b-machinectl">machinectl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="networkctl"> - <term><command>networkctl</command></term> - <listitem> - <para>Used to introspect the state of the network links as seen by - systemd-networkd</para> - <indexterm zone="ch-system-systemd networkctl"> - <primary sortas="b-networkctl">networkctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="portablectl"> - <term><command>portablectl</command></term> - <listitem> - <para>Used to attach or detach portable services from the local - system</para> - <indexterm zone="ch-system-systemd portablectl"> - <primary sortas="b-portablectl">portablectl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="poweroff"> - <term><command>poweroff</command></term> - <listitem> - <para>Tells the kernel to halt the system and switch off the computer - (see <command>halt</command>)</para> - <indexterm zone="ch-system-systemd poweroff"> - <primary sortas="b-poweroff">poweroff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="reboot"> - <term><command>reboot</command></term> - <listitem> - <para>Tells the kernel to reboot the system (see - <command>halt</command>)</para> - <indexterm zone="ch-system-systemd reboot"> - <primary sortas="b-reboot">reboot</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="resolvconf"> - <term><command>resolvconf</command></term> - <listitem> - <para>Register DNS server and domain configuration with - <command>systemd-resolved</command></para> - <indexterm zone="ch-system-systemd resolvconf"> - <primary sortas="b-resolvconf">resolvconf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="resolvectl"> - <term><command>resolvectl</command></term> - <listitem> - <para>Send control commands to the network name resolution - manager, or resolve domain names, IPv4 and IPv6 addresses, - DNS records, and services.</para> - <indexterm zone="ch-system-systemd resolvectl"> - <primary sortas="b-resolvectl">resolvectl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="runlevel"> - <term><command>runlevel</command></term> - <listitem> - <para>Reports the previous and the current run-level, as noted in the - last run-level record in <filename>/var/run/utmp</filename></para> - <indexterm zone="ch-system-systemd runlevel"> - <primary sortas="b-runlevel">runlevel</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shutdown"> - <term><command>shutdown</command></term> - <listitem> - <para>Brings the system down in a secure way, signaling all processes - and notifying all logged-in users</para> - <indexterm zone="ch-system-systemd shutdown"> - <primary sortas="b-shutdown">shutdown</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemctl"> - <term><command>systemctl</command></term> - <listitem> - <para>Used to introspect and control the state of the systemd system - and service manager</para> - <indexterm zone="ch-system-systemd systemctl"> - <primary sortas="b-systemctl">systemctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-analyze"> - <term><command>systemd-analyze</command></term> - <listitem> - <para>Used to determine system boot-up performance of the current - boot</para> - <indexterm zone="ch-system-systemd systemd-analyze"> - <primary sortas="b-systemd-analyze">systemd-analyze</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-ask-password"> - <term><command>systemd-ask-password</command></term> - <listitem> - <para>Used to query a system password or passphrase from the user, - using a question message specified on the command line</para> - <indexterm zone="ch-system-systemd systemd-ask-password"> - <primary sortas="b-systemd-ask-password">systemd-ask-password</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-cat"> - <term><command>systemd-cat</command></term> - <listitem> - <para>Used to connect STDOUT and STDERR of a process with the Journal - </para> - <indexterm zone="ch-system-systemd systemd-cat"> - <primary sortas="b-systemd-cat">systemd-cat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-cgls"> - <term><command>systemd-cgls</command></term> - <listitem> - <para>Recursively shows the contents of the selected Linux control - group hierarchy in a tree</para> - <indexterm zone="ch-system-systemd systemd-cgls"> - <primary sortas="b-systemd-cgls">systemd-cgls</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-cgtop"> - <term><command>systemd-cgtop</command></term> - <listitem> - <para>Shows the top control groups of the local Linux control group - hierarchy, ordered by their CPU, memory and disk I/O load</para> - <indexterm zone="ch-system-systemd systemd-cgtop"> - <primary sortas="b-systemd-cgtop">systemd-cgtop</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-delta"> - <term><command>systemd-delta</command></term> - <listitem> - <para>Used to identify and compare configuration files in - <filename class="directory">/etc</filename> that override default - counterparts in <filename class="directory">/usr</filename></para> - <indexterm zone="ch-system-systemd systemd-delta"> - <primary sortas="b-systemd-delta">systemd-delta</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-detect-virt"> - <term><command>systemd-detect-virt</command></term> - <listitem> - <para>Detects execution in a virtualized environment</para> - <indexterm zone="ch-system-systemd systemd-detect-virt"> - <primary sortas="b-systemd-detect-virt">systemd-detect-virt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-escape"> - <term><command>systemd-escape</command></term> - <listitem> - <para>Used to escape strings for inclusion in systemd unit - names</para> - <indexterm zone="ch-system-systemd systemd-escape"> - <primary sortas="b-systemd-escape">systemd-escape</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-hwdb"> - <term><command>systemd-hwdb</command></term> - <listitem> - <para>Used to manage hardware database (hwdb)</para> - <indexterm zone="ch-system-systemd systemd-hwdb"> - <primary sortas="b-systemd-hwdb">systemd-hwdb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-id128"> - <term><command>systemd-id128</command></term> - <listitem> - <para>Generate and print id128 strings</para> - <indexterm zone="ch-system-systemd systemd-id128"> - <primary sortas="b-systemd-id128">systemd-id128</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-inhibit"> - <term><command>systemd-inhibit</command></term> - <listitem> - <para>Used to execute a program with a shutdown, sleep or idle - inhibitor lock taken</para> - <indexterm zone="ch-system-systemd systemd-inhibit"> - <primary sortas="b-systemd-inhibit">systemd-inhibit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-machine-id-setup"> - <term><command>systemd-machine-id-setup</command></term> - <listitem> - <para>Used by system installer tools to initialize the machine ID - stored in <filename>/etc/machine-id</filename> at install time with a - randomly generated ID</para> - <indexterm zone="ch-system-systemd systemd-machine-id-setup"> - <primary sortas="b-systemd-machine-id-setup">systemd-machine-id-setup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-mount"> - <term><command>systemd-mount</command></term> - <listitem> - <para>A tool to temporarily mount or auto-mount a drive.</para> - <indexterm zone="ch-system-systemd systemd-mount"> - <primary sortas="b-systemd-mount">systemd-mount</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-notify"> - <term><command>systemd-notify</command></term> - <listitem> - <para>Used by daemon scripts to notify the init system about status - changes</para> - <indexterm zone="ch-system-systemd systemd-notify"> - <primary sortas="b-systemd-notify">systemd-notify</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-nspawn"> - <term><command>systemd-nspawn</command></term> - <listitem> - <para>Used to run a command or OS in a light-weight namespace - container</para> - <indexterm zone="ch-system-systemd systemd-nspawn"> - <primary sortas="b-systemd-nspawn">systemd-nspawn</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-path"> - <term><command>systemd-path</command></term> - <listitem> - <para>Used to query system and user paths</para> - <indexterm zone="ch-system-systemd systemd-path"> - <primary sortas="b-systemd-path">systemd-path</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-repart"> - <term><command>systemd-repart</command></term> - <listitem> - <para>Used go grow and add partitions to a partition table when - systemd is used in an OS image (e.g. a container).</para> - <indexterm zone="ch-system-systemd systemd-repart"> - <primary sortas="b-systemd-repart">systemd-repart</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-resolve"> - <term><command>systemd-resolve</command></term> - <listitem> - <para>Used to resolve domain names, IPV4 and IPv6 addresses, DNS - resource records, and services</para> - <indexterm zone="ch-system-systemd systemd-resolve"> - <primary sortas="b-systemd-resolve">systemd-resolve</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-run"> - <term><command>systemd-run</command></term> - <listitem> - <para>Used to create and start a transient .service or a .scope unit - and run the specified command in it</para> - <indexterm zone="ch-system-systemd systemd-run"> - <primary sortas="b-systemd-run">systemd-run</primary> - </indexterm> - </listitem> - </varlistentry> - - <!-- <varlistentry id="systemd-stdio-bridge"> - <term><command>systemd-stdio-bridge</command></term> - <listitem> - <para>To be completed</para> - <indexterm zone="ch-system-systemd systemd-stdio-bridge"> - <primary sortas="b-systemd-stdio-bridge">systemd-stdio-bridge</primary> - </indexterm> - </listitem> - </varlistentry> --> - - <varlistentry id="systemd-socket-activate"> - <term><command>systemd-socket-activate</command></term> - <listitem> - <para>A tool to listen on socket devices and launch a process upon - connection.</para> - <indexterm zone="ch-system-systemd systemd-socket-activate"> - <primary sortas="b-systemd-socket-activate">systemd-socket-activate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-tmpfiles"> - <term><command>systemd-tmpfiles</command></term> - <listitem> - <para>Creates, deletes and cleans up volatile and temporary files and - directories, based on the configuration file format and location - specified in - <filename class="directory">tmpfiles.d</filename> directories</para> - <indexterm zone="ch-system-systemd systemd-tmpfiles"> - <primary sortas="b-systemd-tmpfiles">systemd-tmpfiles</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-umount"> - <term><command>systemd-umount</command></term> - <listitem> - <para>Unmount mount points</para> - <indexterm zone="ch-system-systemd systemd-umount"> - <primary sortas="b-systemd-umount">systemd-umount</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="systemd-tty-ask-password-agent"> - <term><command>systemd-tty-ask-password-agent</command></term> - <listitem> - <para>Used to list or process pending systemd password requests</para> - <indexterm zone="ch-system-systemd systemd-tty-ask-password-agent"> - <primary sortas="b-systemd-tty-ask-password-agent">systemd-tty-ask-password-agent</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="telinit"> - <term><command>telinit</command></term> - <listitem> - <para>Tells <command>init</command> which run-level to change - to</para> - <indexterm zone="ch-system-systemd telinit"> - <primary sortas="b-telinit">telinit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="timedatectl"> - <term><command>timedatectl</command></term> - <listitem> - <para>Used to query and change the system clock and its settings - </para> - <indexterm zone="ch-system-systemd timedatectl"> - <primary sortas="b-timedatectl">timedatectl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="udevadm"> - <term><command>udevadm</command></term> - <listitem> - <para>Generic udev administration tool: controls the udevd daemon, - provides info from the Udev database, monitors uevents, waits for - uevents to finish, tests udev configuration, and triggers uevents - for a given device</para> - <indexterm zone="ch-system-systemd udevadm"> - <primary sortas="b-udevadm">udevadm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libsystemd"> - <term><filename class="libraryfile">libsystemd</filename></term> - <listitem> - <para>The main systemd utility library</para> - <indexterm zone="ch-system-systemd libsystemd"> - <primary sortas="c-libsystemd">libsystemd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libudev"> - <term><filename class="libraryfile">libudev</filename></term> - <listitem> - <para>A library to access Udev device information</para> - <indexterm zone="ch-system-systemd libudev"> - <primary sortas="c-libudev">libudev</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/sysvinit.xml b/chapter06/sysvinit.xml deleted file mode 100644 index 0c171acf5..000000000 --- a/chapter06/sysvinit.xml +++ /dev/null @@ -1,220 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-sysvinit" role="wrap" revision="sysv"> - <?dbhtml filename="sysvinit.html"?> - - <sect1info condition="script"> - <productname>sysvinit</productname> - <productnumber>&sysvinit-version;</productnumber> - <address>&sysvinit-url;</address> - </sect1info> - - <title>Sysvinit-&sysvinit-version;</title> - - <indexterm zone="ch-system-sysvinit"> - <primary sortas="a-Sysvinit">Sysvinit</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Sysvinit package contains programs for controlling the startup, - running, and shutdown of the system.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&sysvinit-ch6-sbu;</seg> - <seg>&sysvinit-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Sysvinit</title> - -<!-- - <para>When run-levels are changed (for example, when halting the - system), <command>init</command> sends termination signals to those - processes that <command>init</command> itself started and that should - not be running in the new run-level. While doing this, - <command>init</command> outputs messages like <quote>Sending processes - the TERM signal</quote> which seem to imply that it is sending these - signals to all currently running processes. To avoid this - misinterpretation, modify the source so that these messages read like - <quote>Sending processes configured via /etc/inittab the TERM signal</quote> - instead:</para> - -<screen><userinput remap="pre">sed -i 's@Sending processes@& configured via /etc/inittab@g' src/init.c</userinput></screen> - - <para>Maintained versions of the <command>wall</command>, - <command>mountpoint</command>, <command>last</command>, - <command>mesg</command>, <command>sulogin</command>, and - <command>utmpdump</command> programs were installed earlier by Util-linux. - Suppress the installation of Sysvinit's versions of these programs and - their man pages:</para> - -<screen><userinput remap="make">sed -ri -e '/utmpdump/d' \ - -e '/mountpoint/d' \ - -e '/mesg/d' \ - -e 's/= sulogin(\.8)?/=/' src/Makefile</userinput></screen> ---> - <para>First, apply a patch that removes several programs installed by other - packages, clarifies a message, and fixes a compiler warning:</para> - -<screen><userinput remap="pre">patch -Np1 -i ../&sysvinit-consolidated-patch;</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-sysvinit" role="content"> - <title>Contents of Sysvinit</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - - <seglistitem> - <seg>bootlogd, fstab-decode, halt, init, killall5, - poweroff (link to halt), reboot (link to halt), runlevel, - shutdown, and telinit (link to init)</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="bootlogd"> - <term><command>bootlogd</command></term> - <listitem> - <para>Logs boot messages to a log file</para> - <indexterm zone="ch-system-sysvinit bootlogd"> - <primary sortas="b-bootlogd">bootlogd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fstab-decode"> - <term><command>fstab-decode</command></term> - <listitem> - <para>Run a command with fstab-encoded arguments</para> - <indexterm zone="ch-system-sysvinit fstab-decode"> - <primary sortas="b-fstab-decode">fstab-decode</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="halt-sysv"> - <term><command>halt</command></term> - <listitem> - <para>Normally invokes <command>shutdown</command> with the - <parameter>-h</parameter> option, except when already in run-level 0, - then it tells the kernel to halt the system; it notes in the - file <filename>/var/log/wtmp</filename> that the system is being - brought down</para> - <indexterm zone="ch-system-sysvinit halt-sysv"> - <primary sortas="b-halt">halt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="init-sysv"> - <term><command>init</command></term> - <listitem> - <para>The first process to be started when the kernel has initialized - the hardware which takes over the boot process and starts all the - proceses specified in its configuration file</para> - <indexterm zone="ch-system-sysvinit init-sysv"> - <primary sortas="b-init">init</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="killall5"> - <term><command>killall5</command></term> - <listitem> - <para>Sends a signal to all processes, except the processes in its own - session so it will not kill its parent shell</para> - <indexterm zone="ch-system-sysvinit killall5"> - <primary sortas="b-killall5">killall5</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="poweroff-sysv"> - <term><command>poweroff</command></term> - <listitem> - <para>Tells the kernel to halt the system and switch off the computer - (see <command>halt</command>)</para> - <indexterm zone="ch-system-sysvinit poweroff-sysv"> - <primary sortas="b-poweroff">poweroff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="reboot-sysv"> - <term><command>reboot</command></term> - <listitem> - <para>Tells the kernel to reboot the system (see - <command>halt</command>)</para> - <indexterm zone="ch-system-sysvinit reboot-sysv"> - <primary sortas="b-reboot">reboot</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="runlevel-sysv"> - <term><command>runlevel</command></term> - <listitem> - <para>Reports the previous and the current run-level, as noted in the - last run-level record in <filename>/var/run/utmp</filename></para> - <indexterm zone="ch-system-sysvinit runlevel-sysv"> - <primary sortas="b-runlevel">runlevel</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="shutdown-sysv"> - <term><command>shutdown</command></term> - <listitem> - <para>Brings the system down in a secure way, signaling all processes - and notifying all logged-in users</para> - <indexterm zone="ch-system-sysvinit shutdown-sysv"> - <primary sortas="b-shutdown">shutdown</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="telinit-sysv"> - <term><command>telinit</command></term> - <listitem> - <para>Tells <command>init</command> which run-level to change to</para> - <indexterm zone="ch-system-sysvinit telinit-sysv"> - <primary sortas="b-telinit">telinit</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/tar.xml b/chapter06/tar.xml index d148c4695..ff2008e28 100644 --- a/chapter06/tar.xml +++ b/chapter06/tar.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-tar" role="wrap"> +<sect1 id="ch-tools-tar" role="wrap"> <?dbhtml filename="tar.html"?> <sect1info condition="script"> @@ -16,22 +16,25 @@ <title>Tar-&tar-version;</title> - <indexterm zone="ch-system-tar"> + <indexterm zone="ch-tools-tar"> <primary sortas="a-Tar">Tar</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Tar package contains an archiving program.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/tar.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&tar-ch6-sbu;</seg> - <seg>&tar-ch6-du;</seg> + <seg>&tar-ch5-sbu;</seg> + <seg>&tar-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -42,74 +45,26 @@ <para>Prepare Tar for compilation:</para> -<screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 \ -./configure --prefix=/usr \ +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ --bindir=/bin</userinput></screen> - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> - <listitem> - <para>This forces the test for <function>mknod</function> to be run - as root. It is generally considered dangerous to run this test as - the root user, but as it is being run on a system that has only been - partially built, overriding it is OK.</para> - </listitem> - </varlistentry> - </variablelist> - <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results (about 3 SBU), issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - -<!-- Seems to pass for version 1.31. Keeping as a comment just in case... - <para>One test, link mismatch, is known to fail.</para> ---> - <para>Install the package:</para> -<screen><userinput remap="install">make install -make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> </sect2> + <sect2 role="content"> + <title/> - <sect2 id="contents-tar" role="content"> - <title>Contents of Tar</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg>tar</seg> - <seg>/usr/share/doc/tar-&tar-version;</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="tar"> - <term><command>tar</command></term> - <listitem> - <para>Creates, extracts files from, and lists the contents of archives, - also known as tarballs</para> - <indexterm zone="ch-system-tar tar"> - <primary sortas="b-tar">tar</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-tar" role="."/></para> </sect2> diff --git a/chapter06/tcl.xml b/chapter06/tcl.xml new file mode 100644 index 000000000..bd17a91a8 --- /dev/null +++ b/chapter06/tcl.xml @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; + <!ENTITY tdbc-ver "1.1.1"> + <!ENTITY itcl-ver "4.2.0"> +]> + +<sect1 id="ch-tools-tcl" role="wrap"> + <?dbhtml filename="tcl.html"?> + + <sect1info condition="script"> + <productname>tcl</productname> + <productnumber>&tcl-version;</productnumber> + <address>&tcl-url;</address> + </sect1info> + + <title>Tcl-&tcl-version;</title> + + <indexterm zone="ch-tools-tcl"> + <primary sortas="a-Tcl">Tcl</primary> + </indexterm> + + <sect2 role="package"> + <title/> + + <para>The <application>Tcl</application> package contains the Tool Command Language, + a robust general-purpose scripting language. The <application>Expect</application> package + is written in the <application>Tcl</application> language.</para> + + <segmentedlist> + <segtitle>&buildtime;</segtitle> + <segtitle>&diskspace;</segtitle> + + <seglistitem> + <seg>&tcl-ch5-sbu;</seg> + <seg>&tcl-ch5-du;</seg> + </seglistitem> + </segmentedlist> + + </sect2> + + <sect2 role="installation"> + <title>Installation of Tcl</title> + + <para>This package and the next two (Expect and DejaGNU) are + installed to support running the test suites for GCC and Binutils and other + packages. Installing three packages for testing purposes may seem + excessive, but it is very reassuring, if not essential, to know that the + most important tools are working properly. These packages are required + to run the test suites in <xref linkend="chapter-building-system"/>.</para> + + <para>Note that the Tcl package used here is a minimal version needed + to run the LFS tests. For the full package, see the + <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para> + + <para>Prepare Tcl for compilation:</para> + +<screen><userinput remap="configure">SRCDIR=$(pwd) +cd unix +./configure --prefix=/usr \ + --mandir=/usr/share/man \ + $([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</userinput></screen> + + <variablelist> + <title>The meaning of the configure options:</title> + + <varlistentry> + <term><parameter>$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)</parameter></term> + <listitem> + <para>The construct <parameter>$(<shell command>)</parameter> + is replaced by the output of the chell command. Here this output is + empty if running on a 32 bit machine, and is + <parameter>--enable-64bit</parameter> if running on a 64 bit machine. + </para> + </listitem> + </varlistentry> + + </variablelist> + + <para>Build the package:</para> + +<screen><userinput remap="make">make + +sed -e "s|$SRCDIR/unix|/usr/lib|" \ + -e "s|$SRCDIR|/usr/include|" \ + -i tclConfig.sh + +sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \ + -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|" \ + -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh + +sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \ + -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|" \ + -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|" \ + -i pkgs/itcl&itcl-ver;/itclConfig.sh + +unset SRCDIR</userinput></screen> + + <para>The various <quote>sed</quote> after the <quote>make</quote> command + remove references to the build directory from various configuration files, + and replaces them with the install directory. This is not mandatory + for the remaining of LFS, but may be needed in case a package built later + uses Tcl.</para> + + <para>Install the package:</para> + +<screen><userinput remap="install">make install</userinput></screen> + + <para>Make the installed library writable so debugging symbols can + be removed later:</para> + +<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen> + + <para>Install Tcl's headers. The next package, Expect, requires them + to build.</para> + +<screen><userinput remap="install">make install-private-headers</userinput></screen> + + <para>Now make a necessary symbolic link:</para> + +<screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen> + + </sect2> + + <sect2 id="contents-tcl" role="content"> + <title>Contents of Tcl</title> + + <segmentedlist> + <segtitle>Installed programs</segtitle> + <segtitle>Installed library</segtitle> + + <seglistitem> + <seg>tclsh (link to tclsh&tcl-major-version;) and tclsh&tcl-major-version;</seg> + <seg>libtcl&tcl-major-version;.so, libtclstub&tcl-major-version;.a</seg> + </seglistitem> + </segmentedlist> + + <variablelist> + <bridgehead renderas="sect3">Short Descriptions</bridgehead> + <?dbfo list-presentation="list"?> + <?dbhtml list-presentation="table"?> + + <varlistentry id="tclsh&tcl-major-version;"> + <term><command>tclsh&tcl-major-version;</command></term> + <listitem> + <para>The Tcl command shell</para> + <indexterm zone="ch-tools-tcl tclsh&tcl-major-version;"> + <primary sortas="b-tclsh&tcl-major-version;">tclsh&tcl-major-version;</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="tclsh"> + <term><command>tclsh</command></term> + <listitem> + <para>A link to tclsh&tcl-major-version;</para> + <indexterm zone="ch-tools-tcl tclsh"> + <primary sortas="b-tclsh">tclsh</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libtcl&tcl-major-version;.so"> + <term><filename class="libraryfile">libtcl&tcl-major-version;.so</filename></term> + <listitem> + <para>The Tcl library</para> + <indexterm zone="ch-tools-tcl libtcl&tcl-major-version;.so"> + <primary sortas="c-libtcl&tcl-major-version;.so">libtcl&tcl-major-version;.so</primary> + </indexterm> + </listitem> + </varlistentry> + + <varlistentry id="libtclstub&tcl-major-version;.a"> + <term><filename class="libraryfile">libtclstub&tcl-major-version;.a</filename></term> + <listitem> + <para>The Tcl Stub library</para> + <indexterm zone="ch-tools-tcl libtclstub&tcl-major-version;.a"> + <primary sortas="c-libtclstub&tcl-major-version;.a">libtclstub&tcl-major-version;.a</primary> + </indexterm> + </listitem> + </varlistentry> + + </variablelist> + + </sect2> + +</sect1> diff --git a/chapter06/texinfo.xml b/chapter06/texinfo.xml index d61df477b..8434c7112 100644 --- a/chapter06/texinfo.xml +++ b/chapter06/texinfo.xml @@ -5,8 +5,8 @@ %general-entities; ]> -<sect1 id="ch-system-texinfo" role="wrap"> - <?dbhtml filename="texinfo.html"?> +<sect1 id="ch-system-texinfo-temp" role="wrap"> + <?dbhtml filename="texinfo-temp.html"?> <sect1info condition="script"> <productname>texinfo</productname> @@ -16,23 +16,25 @@ <title>Texinfo-&texinfo-version;</title> - <indexterm zone="ch-system-texinfo"> + <indexterm zone="ch-system-texinfo-temp"> <primary sortas="a-Texinfo">Texinfo</primary> + <secondary>temporary</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Texinfo package contains programs for reading, writing, and - converting info pages.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/texinfo.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&texinfo-ch6-sbu;</seg> - <seg>&texinfo-ch6-du;</seg> + <seg>&texinfo-ch5-sbu;</seg> + <seg>&texinfo-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -43,194 +45,29 @@ <para>Prepare Texinfo for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen> +<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - <variablelist> - <title>The meaning of the configure options:</title> - - <varlistentry> - <term><parameter>--disable-static</parameter></term> - <listitem> - <para>In this case, the top-level configure script will complain that - this is an unrecognized option, but the configure script for - XSParagraph recognizes it and uses it to disable installing a static - <filename class="libraryfile">XSParagraph.a</filename> to <filename - class="directory">/usr/lib/texinfo</filename>.</para> - </listitem> - </varlistentry> - - </variablelist> + <note> + <para>As part of the configure process, a test is made that indicates an + error for TestXS_la-TestXS.lo. This is not relevant for LFS and should be + ignored.</para> + </note> <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - <para>Install the package:</para> <screen><userinput remap="install">make install</userinput></screen> - <para>Optionally, install the components belonging in a TeX - installation:</para> - <!-- FIXME: doesn't the TeX installation in BLFS overwrite files there? --> - -<screen><userinput remap="install">make TEXMF=/usr/share/texmf install-tex</userinput></screen> - - <variablelist> - <title>The meaning of the make parameter:</title> - - <varlistentry> - <term><parameter>TEXMF=/usr/share/texmf</parameter></term> - <listitem> - <para>The <envar>TEXMF</envar> makefile variable holds the location - of the root of the TeX tree if, for example, a TeX package will be - installed later.</para> - </listitem> - </varlistentry> - - </variablelist> - - <para>The Info documentation system uses a plain text file to hold its list of - menu entries. The file is located at <filename>/usr/share/info/dir</filename>. - Unfortunately, due to occasional problems in the Makefiles of various packages, - it can sometimes get out of sync with the info pages installed on the system. - If the <filename>/usr/share/info/dir</filename> file ever needs to be - recreated, the following optional commands will accomplish the task:</para> - -<screen role="nodump"><userinput>pushd /usr/share/info -rm -v dir -for f in * - do install-info $f dir 2>/dev/null -done -popd</userinput></screen> - </sect2> - <sect2 id="contents-texinfo" role="content"> - <title>Contents of Texinfo</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>info, install-info, makeinfo (link to texi2any), - pdftexi2dvi, pod2texi, texi2any, texi2dvi, texi2pdf, and texindex</seg> - <seg>MiscXS.so, Parsetexi.so, and XSParagraph.so - (all in /usr/lib/texinfo)</seg> - <seg>/usr/share/texinfo and /usr/lib/texinfo</seg> - </seglistitem> - </segmentedlist> + <sect2 role="content"> + <title/> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="info"> - <term><command>info</command></term> - <listitem> - <para>Used to read info pages which are similar to man pages, but - often go much deeper than just explaining all the available command - line options [For example, compare <command>man bison</command> and - <command>info bison</command>.]</para> - <indexterm zone="ch-system-texinfo info"> - <primary sortas="b-info">info</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="install-info"> - <term><command>install-info</command></term> - <listitem> - <para>Used to install info pages; it updates entries in the - <command>info</command> index file</para> - <indexterm zone="ch-system-texinfo install-info"> - <primary sortas="b-install-info">install-info</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="makeinfo"> - <term><command>makeinfo</command></term> - <listitem> - <para>Translates the given Texinfo source documents into - info pages, plain text, or HTML</para> - <indexterm zone="ch-system-texinfo makeinfo"> - <primary sortas="b-makeinfo">makeinfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pdftexi2dvi"> - <term><command>pdftexi2dvi</command></term> - <listitem> - <para>Used to format the given Texinfo document into a - Portable Document Format (PDF) file</para> - <indexterm zone="ch-system-texinfo pdftexi2dvi"> - <primary sortas="b-pdftexi2dvi">pdftexi2dvi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pod2texi"> - <term><command>pod2texi</command></term> - <listitem> - <para>Converts Pod to Texinfo format</para> - <indexterm zone="ch-system-texinfo pod2texi"> - <primary sortas="b-pod2texi">pod2texi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="texi2any"> - <term><command>texi2any</command></term> - <listitem> - <para>Translate Texinfo source documentation to - various other formats</para> - <indexterm zone="ch-system-texinfo texi2any"> - <primary sortas="b-texiany">texi2any</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="texi2dvi"> - <term><command>texi2dvi</command></term> - <listitem> - <para>Used to format the given Texinfo document into a - device-independent file that can be printed</para> - <indexterm zone="ch-system-texinfo texi2dvi"> - <primary sortas="b-texi2dvi">texi2dvi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="texi2pdf"> - <term><command>texi2pdf</command></term> - <listitem> - <para>Used to format the given Texinfo document into a - Portable Document Format (PDF) file</para> - <indexterm zone="ch-system-texinfo texi2pdf"> - <primary sortas="b-texi2pdf">texi2pdf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="texindex"> - <term><command>texindex</command></term> - <listitem> - <para>Used to sort Texinfo index files</para> - <indexterm zone="ch-system-texinfo texindex"> - <primary sortas="b-texindex">texindex</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-texinfo" role="."/></para> </sect2> diff --git a/chapter06/toolchaintechnotes.xml b/chapter06/toolchaintechnotes.xml new file mode 100644 index 000000000..63c9210e5 --- /dev/null +++ b/chapter06/toolchaintechnotes.xml @@ -0,0 +1,335 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + <!ENTITY % general-entities SYSTEM "../general.ent"> + %general-entities; +]> + +<sect1 id="ch-tools-toolchaintechnotes"> + <?dbhtml filename="toolchaintechnotes.html"?> + + <title>Toolchain Technical Notes</title> + + <para>This section explains some of the rationale and technical details + behind the overall build method. It is not essential to immediately + understand everything in this section. Most of this information will be + clearer after performing an actual build. This section can be referred + to at any time during the process.</para> + + <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to + produce a temporary area that contains a known-good set of tools that can be + isolated from the host system. By using <command>chroot</command>, the + commands in the remaining chapters will be contained within that environment, + ensuring a clean, trouble-free build of the target LFS system. The build + process has been designed to minimize the risks for new readers and to provide + the most educational value at the same time.</para> + + <para>The build process is based on the process of + <emphasis>cross-compilation</emphasis>. Cross-compilation is normally used + for building a compiler and its toolchain for a machine different from + the one that is used for the build. This is not strictly needed for LFS, + since the machine where the new system will run is the same as the one + used for the build. But cross-compilation has the great advantage that + anything that is cross-compiled cannot depend on the host environment.</para> + + <sect2 id="cross-compile" xreflabel="About Cross-Compilation"> + + <title>About Cross-Compilation</title> + + <para>Cross-compilation involves some concepts that deserve a section on + their own. Although this section may be omitted in a first reading, it + is strongly suggested to come back to it later in order to get a full + grasp of the build process.</para> + + <para>Let us first define some terms used in this context:</para> + + <variablelist> + <varlistentry><term>build</term><listitem> + <para>is the machine where we build programs. Note that this machine + is referred to as the <quote>host</quote> in other + sections.</para></listitem> + </varlistentry> + + <varlistentry><term>host</term><listitem> + <para>is the machine/system where the built programs will run. Note + that this use of <quote>host</quote> is not the same as in other + sections.</para></listitem> + </varlistentry> + + <varlistentry><term>target</term><listitem> + <para>is only used for compilers. It is the machine the compiler + produces code for. It may be different from both build and + host.</para></listitem> + </varlistentry> + + </variablelist> + + <para>As an example, let us imagine the following scenario: we may have a + compiler on a slow machine only, let's call the machine A, and the compiler + ccA. We may have also a fast machine (B), but with no compiler, and we may + want to produce code for a another slow machine (C). Then, to build a + compiler for machine C, we would have three stages:</para> + + <informaltable align="center"> + <tgroup cols="5"> + <colspec colnum="1" align="center"/> + <colspec colnum="2" align="center"/> + <colspec colnum="3" align="center"/> + <colspec colnum="4" align="center"/> + <colspec colnum="5" align="left"/> + <thead> + <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> + <entry>Target</entry><entry>Action</entry></row> + </thead> + <tbody> + <row> + <entry>1</entry><entry>A</entry><entry>A</entry><entry>B</entry> + <entry>build cross-compiler cc1 using ccA on machine A</entry> + </row> + <row> + <entry>2</entry><entry>A</entry><entry>B</entry><entry>B</entry> + <entry>build cross-compiler cc2 using cc1 on machine A</entry> + </row> + <row> + <entry>3</entry><entry>B</entry><entry>C</entry><entry>C</entry> + <entry>build compiler ccC using cc2 on machine B</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>Then, all the other programs needed by machine C can be compiled + using cc2 on the fast machine B. Note that unless B can run programs + produced for C, there is no way to test the built programs until machine + C itself is running. For example, for testing ccC, we may want to add a + fourth stage:</para> + + <informaltable align="center"> + <tgroup cols="5"> + <colspec colnum="1" align="center"/> + <colspec colnum="2" align="center"/> + <colspec colnum="3" align="center"/> + <colspec colnum="4" align="center"/> + <colspec colnum="5" align="left"/> + <thead> + <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> + <entry>Target</entry><entry>Action</entry></row> + </thead> + <tbody> + <row> + <entry>4</entry><entry>C</entry><entry>C</entry><entry>C</entry> + <entry>rebuild and test ccC using itself on machine C</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>In the example above, only cc1 and cc2 are cross-compilers, that is, + they produce code for a machine different from the one they are run on. + The other compilers ccA and ccC produce code for the machine they are run + on. Such compilers are called <emphasis>native</emphasis> compilers.</para> + + </sect2> + + <sect2 id="lfs-cross"> + <title>Implementation of Cross-Compilation for LFS</title> + + <note> + <para>Almost all the build systems use names of the form + cpu-vendor-kernel-os referred to as the machine triplet. An astute + reader may wonder why a <quote>triplet</quote> refers to a four component + name. The reason is history: initially, three component names were enough + to designate unambiguously a machine, but with new machines and systems + appearing, that proved insufficient. The word <quote>triplet</quote> + remained. A simple way to determine your machine triplet is to run + the <command>config.guess</command> + script that comes with the source for many packages. Unpack the Binutils + sources and run the script: <userinput>./config.guess</userinput> and note + the output. For example, for a 32-bit Intel processor the + output will be <emphasis>i686-pc-linux-gnu</emphasis>. On a 64-bit + system it will be <emphasis>x86_64-pc-linux-gnu</emphasis>.</para> + + <para>Also be aware of the name of the platform's dynamic linker, often + referred to as the dynamic loader (not to be confused with the standard + linker <command>ld</command> that is part of Binutils). The dynamic linker + provided by Glibc finds and loads the shared libraries needed by a + program, prepares the program to run, and then runs it. The name of the + dynamic linker for a 32-bit Intel machine will be <filename + class="libraryfile">ld-linux.so.2</filename> (<filename + class="libraryfile">ld-linux-x86-64.so.2</filename> for 64-bit systems). A + sure-fire way to determine the name of the dynamic linker is to inspect a + random binary from the host system by running: <userinput>readelf -l + <name of binary> | grep interpreter</userinput> and noting the + output. The authoritative reference covering all platforms is in the + <filename>shlib-versions</filename> file in the root of the Glibc source + tree.</para> + </note> + + <para>In order to fake a cross compilation, the name of the host triplet + is slightly adjusted by changing the "vendor" field in the + <envar>LFS_TGT</envar> variable. We also use the + <parameter>--with-sysroot</parameter> when building the cross linker and + cross compiler, to tell them where to find the needed host files. This + ensures none of the other programs built in <xref + linkend="chapter-temporary-tools"/> can link to libraries on the build + machine. Only two stages are mandatory, and one more for tests:</para> + + <informaltable align="center"> + <tgroup cols="5"> + <colspec colnum="1" align="center"/> + <colspec colnum="2" align="center"/> + <colspec colnum="3" align="center"/> + <colspec colnum="4" align="center"/> + <colspec colnum="5" align="left"/> + <thead> + <row><entry>Stage</entry><entry>Build</entry><entry>Host</entry> + <entry>Target</entry><entry>Action</entry></row> + </thead> + <tbody> + <row> + <entry>1</entry><entry>pc</entry><entry>pc</entry><entry>lfs</entry> + <entry>build cross-compiler cc1 using cc-pc on pc</entry> + </row> + <row> + <entry>2</entry><entry>pc</entry><entry>lfs</entry><entry>lfs</entry> + <entry>build compiler cc-lfs using cc1 on pc</entry> + </row> + <row> + <entry>3</entry><entry>lfs</entry><entry>lfs</entry><entry>lfs</entry> + <entry>rebuild and test cc-lfs using itself on lfs</entry> + </row> + </tbody> + </tgroup> + </informaltable> + + <para>In the above table, <quote>on pc</quote> means the commands are run + on a machine using the already installed distribution. <quote>On + lfs</quote> means the commands are run in a chrooted environment.</para> + + <para>Now, there is more about cross-compiling: the C language is not + just a compiler, but also defines a standard library. In this book, the + GNU C library, named glibc, is used. This library must + be compiled for the lfs machine, that is, using the cross compiler cc1. + But the compiler itself uses an internal library implementing complex + instructions not available in the assembler instruction set. This + internal library is named libgcc, and must be linked to the glibc + library to be fully functional! Furthermore, the standard library for + C++ (libstdc++) also needs being linked to glibc. The solution + to this chicken and egg problem is to first build a degraded cc1+libgcc, + lacking some fuctionalities such as threads and exception handling, then + build glibc using this degraded compiler (glibc itself is not + degraded), then build libstdc++. But this last library will lack the + same functionalities as libgcc.</para> + + <para>This is not the end of the story: the conclusion of the preceding + paragraph is that cc1 is unable to build a fully functional libstdc++, but + this is the only compiler available for building the C/C++ libraries + during stage 2! Of course, the compiler built during stage 2, cc-lfs, + would be able to build those libraries, but (i) the build system of + gcc does not know that it is usable on pc, and (ii) using it on pc + would be at risk of linking to the pc libraries, since cc-lfs is a native + compiler. So we have to build libstdc++ later, in chroot.</para> + + </sect2> + + <sect2 id="other-details"> + + <title>Other procedural details</title> + + <para>The cross-compiler will be installed in a separate <filename + class="directory">$LFS/tools</filename> directory, since it will not + be part of the final system.</para> + + <para>Binutils is installed first because the <command>configure</command> + runs of both GCC and Glibc perform various feature tests on the assembler + and linker to determine which software features to enable or disable. This + is more important than one might first realize. An incorrectly configured + GCC or Glibc can result in a subtly broken toolchain, where the impact of + such breakage might not show up until near the end of the build of an + entire distribution. A test suite failure will usually highlight this error + before too much additional work is performed.</para> + + <para>Binutils installs its assembler and linker in two locations, + <filename class="directory">$LFS/tools/bin</filename> and <filename + class="directory">$LFS/tools/$LFS_TGT/bin</filename>. The tools in one + location are hard linked to the other. An important facet of the linker is + its library search order. Detailed information can be obtained from + <command>ld</command> by passing it the <parameter>--verbose</parameter> + flag. For example, <command>$LFS_TGT-ld --verbose | grep SEARCH</command> + will illustrate the current search paths and their order. It shows which + files are linked by <command>ld</command> by compiling a dummy program and + passing the <parameter>--verbose</parameter> switch to the linker. For + example, + <command>$LFS_TGT-gcc dummy.c -Wl,--verbose 2>&1 | grep succeeded</command> + will show all the files successfully opened during the linking.</para> + + <para>The next package installed is GCC. An example of what can be + seen during its run of <command>configure</command> is:</para> + +<screen><computeroutput>checking what assembler to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/as +checking what linker to use... /mnt/lfs/tools/i686-lfs-linux-gnu/bin/ld</computeroutput></screen> + + <para>This is important for the reasons mentioned above. It also + demonstrates that GCC's configure script does not search the PATH + directories to find which tools to use. However, during the actual + operation of <command>gcc</command> itself, the same search paths are not + necessarily used. To find out which standard linker <command>gcc</command> + will use, run: <command>$LFS_TGT-gcc -print-prog-name=ld</command>.</para> + + <para>Detailed information can be obtained from <command>gcc</command> by + passing it the <parameter>-v</parameter> command line option while compiling + a dummy program. For example, <command>gcc -v dummy.c</command> will show + detailed information about the preprocessor, compilation, and assembly + stages, including <command>gcc</command>'s included search paths and their + order.</para> + + <para>Next installed are sanitized Linux API headers. These allow the + standard C library (Glibc) to interface with features that the Linux + kernel will provide.</para> + + <para>The next package installed is Glibc. The most important + considerations for building Glibc are the compiler, binary tools, and + kernel headers. The compiler is generally not an issue since Glibc will + always use the compiler relating to the <parameter>--host</parameter> + parameter passed to its configure script; e.g. in our case, the compiler + will be <command>$LFS_TGT-gcc</command>. The binary tools and kernel + headers can be a bit more complicated. Therefore, take no risks and use + the available configure switches to enforce the correct selections. After + the run of <command>configure</command>, check the contents of the + <filename>config.make</filename> file in the <filename + class="directory">build</filename> directory for all important details. + Note the use of <parameter>CC="$LFS_TGT-gcc"</parameter> (with + <envar>$LFS_TGT</envar> expanded) to control which binary tools are used + and the use of the <parameter>-nostdinc</parameter> and + <parameter>-isystem</parameter> flags to control the compiler's include + search path. These items highlight an important aspect of the Glibc + package—it is very self-sufficient in terms of its build machinery + and generally does not rely on toolchain defaults.</para> + + <para>As said above, the standard C++ library is compiled next, followed + by all the programs that need themselves to be built. The install step + uses the <envar>DESTDIR</envar> variable to have the programs land into + the LFS filesystem.</para> + + <para>Then the native lfs compiler is built. First Binutils Pass 2, with + the same <envar>DESTDIR</envar> install as the other programs, then the + second pass of GCC, omitting libstdc++ and other non-important libraries. + Due to some weird logic in GCC's configure script, + <envar>CC_FOR_TARGET</envar> ends up as <command>cc</command> when host + is the same as target, but is different from build. This is why + <parameter>CC_FOR_TARGET=$LFS_TGT-gcc</parameter> is put explicitely into + the configure options.</para> + + <para>Upon entering the chroot environment in <xref + linkend="chapter-building-system"/>, the first task is to install + libstdc++. Then temporary installations of programs needed for the proper + operation of the toolchain are performed. Programs needed for testing + other programs are also built. From this point onwards, the + core toolchain is self-contained and self-hosted. In the remainder of + the <xref linkend="chapter-building-system"/>, final versions of all the + packages needed for a fully functional system are built, tested and + installed.</para> + + </sect2> + +</sect1> diff --git a/chapter06/util-linux.xml b/chapter06/util-linux.xml index 519c3b171..6aebad7a1 100644 --- a/chapter06/util-linux.xml +++ b/chapter06/util-linux.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-util-linux" role="wrap"> +<sect1 id="ch-tools-util-linux" role="wrap"> <?dbhtml filename="util-linux.html"?> <sect1info condition="script"> @@ -16,24 +16,23 @@ <title>Util-linux-&util-linux-version;</title> - <indexterm zone="ch-system-util-linux"> + <indexterm zone="ch-tools-util-linux"> <primary sortas="a-Util-linux">Util-linux</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Util-linux package contains miscellaneous utility programs. - Among them are utilities for handling file systems, consoles, partitions, - and messages.</para> + <para>The Util-linux package contains miscellaneous utility programs.</para> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&util-linux-ch6-sbu;</seg> - <seg>&util-linux-ch6-du;</seg> + <seg>&util-linux-ch5-sbu;</seg> + <seg>&util-linux-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -42,31 +41,14 @@ <sect2 role="installation"> <title>Installation of Util-linux</title> - <para>The FHS recommends using the <filename - class="directory">/var/lib/hwclock</filename> directory instead of the - usual <filename class="directory">/etc</filename> directory as the - location for the <filename>adjtime</filename> file. Create this directory - with:</para> + <para>First create a directory + to enable storage for the <command>hwclock</command> program:</para> <screen><userinput remap="pre">mkdir -pv /var/lib/hwclock</userinput></screen> <para>Prepare Util-linux for compilation:</para> -<screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --docdir=/usr/share/doc/util-linux-&util-linux-version; \ - --disable-chfn-chsh \ - --disable-login \ - --disable-nologin \ - --disable-su \ - --disable-setpriv \ - --disable-runuser \ - --disable-pylibmount \ - --disable-static \ - --without-python \ - --without-systemd \ - --without-systemdsystemunitdir</userinput></screen> - -<screen revision="systemd"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ +<screen><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ --docdir=/usr/share/doc/util-linux-&util-linux-version; \ --disable-chfn-chsh \ --disable-login \ @@ -78,1241 +60,53 @@ --disable-static \ --without-python</userinput></screen> - <para>The --disable and --without options prevent warnings about - building components that require packages not in LFS or are - inconsistent with programs installed by other packages.</para> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>If desired, run the test suite as a non-root user:</para> - - <warning><para>Running the test suite as the root user can be harmful to - your system. To run it, the CONFIG_SCSI_DEBUG option for the kernel must - be available in the currently running system, and must be built as a - module. Building it into the kernel will prevent booting. For complete - coverage, other BLFS packages must be installed. If desired, this test can - be run after rebooting into the completed LFS system and running:</para> - -<screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen> - </warning> - -<screen><userinput remap="test">chown -Rv tester . -su tester -c "make -k check"</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-utillinux" role="content"> - <title>Contents of Util-linux</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg>addpart, agetty, blkdiscard, blkid, blkzone, blockdev, cal, cfdisk, chcpu, - chmem, choom, chrt, col, colcrt, colrm, column, ctrlaltdel, delpart, dmesg, - eject, fallocate, fdformat, fdisk, fincore, findfs, findmnt, flock, fsck, - fsck.cramfs, fsck.minix, fsfreeze, fstrim, getopt, hexdump, hwclock, - i386, ionice, ipcmk, ipcrm, ipcs, isosize, kill, last, lastb (link to - last), ldattach, linux32, linux64, logger, look, losetup, lsblk, lscpu, - lsipc, lslocks, lslogins, lsmem, lsns, mcookie, mesg, mkfs, mkfs.bfs, mkfs.cramfs, mkfs.minix, mkswap, - more, mount, mountpoint, namei, nsenter, partx, pivot_root, prlimit, raw, - readprofile, rename, renice, resizepart, rev, rfkill, rtcwake, script, - scriptreplay, setarch, setsid, setterm, sfdisk, sulogin, swaplabel, - swapoff (link to swapon), swapon, switch_root, taskset, ul, - umount, uname26, unshare, utmpdump, uuidd, uuidgen, uuidparse, wall, wdctl, whereis, - wipefs, x86_64, and zramctl</seg> - <seg>libblkid.so, libfdisk.so, libmount.so, - libsmartcols.so, and libuuid.so</seg> - <seg>/usr/include/blkid, - /usr/include/libfdisk, - /usr/include/libmount, - /usr/include/libsmartcols, - /usr/include/uuid, - /usr/share/doc/util-linux-&util-linux-version;, - and /var/lib/hwclock</seg> - </seglistitem> - </segmentedlist> - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="addpart"> - <term><command>addpart</command></term> - <listitem> - <para>Informs the Linux kernel of new partitions</para> - <indexterm zone="ch-system-util-linux addpart"> - <primary sortas="b-addpart">addpart</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="agetty"> - <term><command>agetty</command></term> - <listitem> - <para>Opens a tty port, prompts for a login name, - and then invokes the <command>login</command> program</para> - <indexterm zone="ch-system-util-linux agetty"> - <primary sortas="b-agetty">agetty</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="blkdiscard"> - <term><command>blkdiscard</command></term> - <listitem> - <para>Discards sectors on a device</para> - <indexterm zone="ch-system-util-linux blkdiscard"> - <primary sortas="b-blkdiscard">blkdiscard</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="blkid"> - <term><command>blkid</command></term> - <listitem> - <para>A command line utility to locate and print block device - attributes</para> - <indexterm zone="ch-system-util-linux blkid"> - <primary sortas="b-blkid">blkid</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="blkzone"> - <term><command>blkzone</command></term> - <listitem> - <para>Runs zone command on the given block device</para> - <indexterm zone="ch-system-util-linux blkzone"> - <primary sortas="b-blkzone">blkzone</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="blockdev"> - <term><command>blockdev</command></term> - <listitem> - <para>Allows users to call block device ioctls from the command - line</para> - <indexterm zone="ch-system-util-linux blockdev"> - <primary sortas="b-blockdev">blockdev</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cal"> - <term><command>cal</command></term> - <listitem> - <para>Displays a simple calendar</para> - <indexterm zone="ch-system-util-linux cal"> - <primary sortas="b-cal">cal</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="cfdisk"> - <term><command>cfdisk</command></term> - <listitem> - <para>Manipulates the partition table of the given device</para> - <indexterm zone="ch-system-util-linux cfdisk"> - <primary sortas="b-cfdisk">cfdisk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chcpu"> - <term><command>chcpu</command></term> - <listitem> - <para>Modifies the state of CPUs</para> - <indexterm zone="ch-system-util-linux chcpu"> - <primary sortas="b-chcpu">chcpu</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chmem"> - <term><command>chmem</command></term> - <listitem> - <para>Configures memory</para> - <indexterm zone="ch-system-util-linux chmem"> - <primary sortas="b-chmem">chmem</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="choom"> - <term><command>choom</command></term> - <listitem> - <para>Displays and adjusts OOM-killer score</para> - <indexterm zone="ch-system-util-linux choom"> - <primary sortas="b-choom">choom</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="chrt"> - <term><command>chrt</command></term> - <listitem> - <para>Manipulates real-time attributes of a process</para> - <indexterm zone="ch-system-util-linux chrt"> - <primary sortas="b-chrt">chrt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="col"> - <term><command>col</command></term> - <listitem> - <para>Filters out reverse line feeds</para> - <indexterm zone="ch-system-util-linux col"> - <primary sortas="b-col">col</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="colcrt"> - <term><command>colcrt</command></term> - <listitem> - <para>Filters <command>nroff</command> output for terminals - that lack some capabilities, such as overstriking and half-lines</para> - <indexterm zone="ch-system-util-linux colcrt"> - <primary sortas="b-colcrt">colcrt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="colrm"> - <term><command>colrm</command></term> - <listitem> - <para>Filters out the given columns</para> - <indexterm zone="ch-system-util-linux colrm"> - <primary sortas="b-colrm">colrm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="column"> - <term><command>column</command></term> - <listitem> - <para>Formats a given file into multiple columns</para> - <indexterm zone="ch-system-util-linux column"> - <primary sortas="b-column">column</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ctrlaltdel"> - <term><command>ctrlaltdel</command></term> - <listitem> - <para>Sets the function of the Ctrl+Alt+Del key combination to a - hard or a soft reset</para> - <indexterm zone="ch-system-util-linux ctrlaltdel"> - <primary sortas="b-ctrlaltdel">ctrlaltdel</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="delpart"> - <term><command>delpart</command></term> - <listitem> - <para>Asks the Linux kernel to remove a partition</para> - <indexterm zone="ch-system-util-linux delpart"> - <primary sortas="b-delpart">delpart</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="dmesg"> - <term><command>dmesg</command></term> - <listitem> - <para>Dumps the kernel boot messages</para> - <indexterm zone="ch-system-util-linux dmesg"> - <primary sortas="b-dmesg">dmesg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="eject"> - <term><command>eject</command></term> - <listitem> - <para>Ejects removable media</para> - <indexterm zone="ch-system-util-linux eject"> - <primary sortas="b-eject">eject</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fallocate"> - <term><command>fallocate</command></term> - <listitem> - <para>Preallocates space to a file</para> - <indexterm zone="ch-system-util-linux fallocate"> - <primary sortas="b-fallocate">fallocate</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fdformat"> - <term><command>fdformat</command></term> - <listitem> - <para>Low-level formats a floppy disk</para> - <indexterm zone="ch-system-util-linux fdformat"> - <primary sortas="b-fdformat">fdformat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fdisk"> - <term><command>fdisk</command></term> - <listitem> - <para>Manipulates the partition table of the given device</para> - <indexterm zone="ch-system-util-linux fdisk"> - <primary sortas="b-fdisk">fdisk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fincore"> - <term><command>fincore</command></term> - <listitem> - <para>Counts pages of file contents in core</para> - <indexterm zone="ch-system-util-linux fincore"> - <primary sortas="b-fincore">fincore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="findfs"> - <term><command>findfs</command></term> - <listitem> - <para>Finds a file system by label or Universally Unique Identifier - (UUID)</para> - <indexterm zone="ch-system-util-linux findfs"> - <primary sortas="b-findfs">findfs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="findmnt"> - <term><command>findmnt</command></term> - <listitem> - <para>Is a command line interface to the libmount library - for work with mountinfo, fstab and mtab files</para> - <indexterm zone="ch-system-util-linux findmnt"> - <primary sortas="b-findmnt">findmnt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="flock"> - <term><command>flock</command></term> - <listitem> - <para>Acquires a file lock and then executes a command with the lock - held</para> - <indexterm zone="ch-system-util-linux flock"> - <primary sortas="b-flock">flock</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsck"> - <term><command>fsck</command></term> - <listitem> - <para>Is used to check, and optionally repair, file systems</para> - <indexterm zone="ch-system-util-linux fsck"> - <primary sortas="b-fsck">fsck</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsck.cramfs"> - <term><command>fsck.cramfs</command></term> - <listitem> - <para>Performs a consistency check on the Cramfs file system on the - given device</para> - <indexterm zone="ch-system-util-linux fsck.cramfs"> - <primary sortas="b-fsck.cramfs">fsck.cramfs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsck.minix"> - <term><command>fsck.minix</command></term> - <listitem> - <para>Performs a consistency check on the Minix file system on the - given device</para> - <indexterm zone="ch-system-util-linux fsck.minix"> - <primary sortas="b-fsck.minix">fsck.minix</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fsfreeze"> - <term><command>fsfreeze</command></term> - <listitem> - <para>Is a very simple wrapper around FIFREEZE/FITHAW ioctl - kernel driver operations</para> - <indexterm zone="ch-system-util-linux fsfreeze"> - <primary sortas="b-fsfreeze">fsfreeze</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="fstrim"> - <term><command>fstrim</command></term> - <listitem> - <para>Discards unused blocks on a mounted filesystem</para> - <indexterm zone="ch-system-util-linux fstrim"> - <primary sortas="b-fstrim">fstrim</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="getopt"> - <term><command>getopt</command></term> - <listitem> - <para>Parses options in the given command line</para> - <indexterm zone="ch-system-util-linux getopt"> - <primary sortas="b-getopt">getopt</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hexdump"> - <term><command>hexdump</command></term> - <listitem> - <para>Dumps the given file in hexadecimal or in another given - format</para> - <indexterm zone="ch-system-util-linux hexdump"> - <primary sortas="b-hexdump">hexdump</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="hwclock"> - <term><command>hwclock</command></term> - <listitem> - <para>Reads or sets the system's hardware clock, also called - the Real-Time Clock (RTC) or Basic Input-Output System (BIOS) - clock</para> - <indexterm zone="ch-system-util-linux hwclock"> - <primary sortas="b-hwclock">hwclock</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="i386"> - <term><command>i386</command></term> - <listitem> - <para>A symbolic link to setarch</para> - <indexterm zone="ch-system-util-linux i386"> - <primary sortas="b-i386">i386</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ionice"> - <term><command>ionice</command></term> - <listitem> - <para>Gets or sets the io scheduling class and priority for a program</para> - <indexterm zone="ch-system-util-linux ionice"> - <primary sortas="b-ionice">ionice</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ipcmk"> - <term><command>ipcmk</command></term> - <listitem> - <para>Creates various IPC resources</para> - <indexterm zone="ch-system-util-linux ipcmk"> - <primary sortas="b-ipcmk">ipcmk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ipcrm"> - <term><command>ipcrm</command></term> - <listitem> - <para>Removes the given Inter-Process Communication (IPC) resource</para> - <indexterm zone="ch-system-util-linux ipcrm"> - <primary sortas="b-ipcrm">ipcrm</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ipcs"> - <term><command>ipcs</command></term> - <listitem> - <para>Provides IPC status information</para> - <indexterm zone="ch-system-util-linux ipcs"> - <primary sortas="b-ipcs">ipcs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="isosize"> - <term><command>isosize</command></term> - <listitem> - <para>Reports the size of an iso9660 file system</para> - <indexterm zone="ch-system-util-linux isosize"> - <primary sortas="b-isosize">isosize</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="kill"> - <term><command>kill</command></term> - <listitem> - <para>Sends signals to processes</para> - <indexterm zone="ch-system-util-linux kill"> - <primary sortas="b-kill">kill</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="last"> - <term><command>last</command></term> - <listitem> - <para>Shows which users last logged in (and out), searching back - through the <filename>/var/log/wtmp</filename> file; it also shows - system boots, shutdowns, and run-level changes</para> - <indexterm zone="ch-system-util-linux last"> - <primary sortas="b-last">last</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lastb"> - <term><command>lastb</command></term> - <listitem> - <para>Shows the failed login attempts, as logged in - <filename>/var/log/btmp</filename></para> - <indexterm zone="ch-system-util-linux lastb"> - <primary sortas="b-lastb">lastb</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ldattach"> - <term><command>ldattach</command></term> - <listitem> - <para>Attaches a line discipline to a serial line</para> - <indexterm zone="ch-system-util-linux ldattach"> - <primary sortas="b-ldattach">ldattach</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="linux32"> - <term><command>linux32</command></term> - <listitem> - <para>A symbolic link to setarch</para> - <indexterm zone="ch-system-util-linux linux32"> - <primary sortas="b-linux32">linux32</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="linux64"> - <term><command>linux64</command></term> - <listitem> - <para>A symbolic link to setarch</para> - <indexterm zone="ch-system-util-linux linux64"> - <primary sortas="b-linux64">linux64</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="logger"> - <term><command>logger</command></term> - <listitem> - <para>Enters the given message into the system log</para> - <indexterm zone="ch-system-util-linux logger"> - <primary sortas="b-logger">logger</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="look"> - <term><command>look</command></term> - <listitem> - <para>Displays lines that begin with the given string</para> - <indexterm zone="ch-system-util-linux look"> - <primary sortas="b-look">look</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="losetup"> - <term><command>losetup</command></term> - <listitem> - <para>Sets up and controls loop devices</para> - <indexterm zone="ch-system-util-linux losetup"> - <primary sortas="b-losetup">losetup</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lsblk"> - <term><command>lsblk</command></term> - <listitem> - <para>Lists information about all or selected block devices in - a tree-like format</para> - <indexterm zone="ch-system-util-linux lsblk"> - <primary sortas="b-lsblk">lsblk</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lscpu"> - <term><command>lscpu</command></term> - <listitem> - <para>Prints CPU architecture information</para> - <indexterm zone="ch-system-util-linux lscpu"> - <primary sortas="b-lscpu">lscpu</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lsipc"> - <term><command>lsipc</command></term> - <listitem> - <para>Prints information on IPC facilities currently employed - in the system</para> - <indexterm zone="ch-system-util-linux lsipc"> - <primary sortas="b-lsipc">lsipc</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lslocks"> - <term><command>lslocks</command></term> - <listitem> - <para>Lists local system locks</para> - <indexterm zone="ch-system-util-linux lslocks"> - <primary sortas="b-lslocks">lslocks</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lslogins"> - <term><command>lslogins</command></term> - <listitem> - <para>Lists information about users, groups and system accounts</para> - <indexterm zone="ch-system-util-linux lslogins"> - <primary sortas="b-lslogins">lslogins</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lsmem"> - <term><command>lsmem</command></term> - <listitem> - <para>Lists the ranges of available memory with their online - status</para> - <indexterm zone="ch-system-util-linux lsmem"> - <primary sortas="b-lsmem">lsmem</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lsns"> - <term><command>lsns</command></term> - <listitem> - <para>Lists namespaces</para> - <indexterm zone="ch-system-util-linux lsns"> - <primary sortas="b-lsns">lsns</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mcookie"> - <term><command>mcookie</command></term> - <listitem> - <para>Generates magic cookies (128-bit random hexadecimal numbers) for - <command>xauth</command></para> - <indexterm zone="ch-system-util-linux mcookie"> - <primary sortas="b-mcookie">mcookie</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mesg"> - <term><command>mesg</command></term> - <listitem> - <para>Controls whether other users can send messages to the current - user's terminal</para> - <indexterm zone="ch-system-util-linux mesg"> - <primary sortas="b-mesg">mesg</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs"> - <term><command>mkfs</command></term> - <listitem> - <para>Builds a file system on a device (usually a hard disk - partition)</para> - <indexterm zone="ch-system-util-linux mkfs"> - <primary sortas="b-mkfs">mkfs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs.bfs"> - <term><command>mkfs.bfs</command></term> - <listitem> - <para>Creates a Santa Cruz Operations (SCO) bfs file system</para> - <indexterm zone="ch-system-util-linux mkfs.bfs"> - <primary sortas="b-mkfs.bfs">mkfs.bfs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs.cramfs"> - <term><command>mkfs.cramfs</command></term> - <listitem> - <para>Creates a cramfs file system</para> - <indexterm zone="ch-system-util-linux mkfs.cramfs"> - <primary sortas="b-mkfs.cramfs">mkfs.cramfs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkfs.minix"> - <term><command>mkfs.minix</command></term> - <listitem> - <para>Creates a Minix file system</para> - <indexterm zone="ch-system-util-linux mkfs.minix"> - <primary sortas="b-mkfs.minix">mkfs.minix</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mkswap"> - <term><command>mkswap</command></term> - <listitem> - <para>Initializes the given device or file to be used as a swap - area</para> - <indexterm zone="ch-system-util-linux mkswap"> - <primary sortas="b-mkswap">mkswap</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="more"> - <term><command>more</command></term> - <listitem> - <para>A filter for paging through text one screen at a time</para> - <indexterm zone="ch-system-util-linux more"> - <primary sortas="b-more">more</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mount"> - <term><command>mount</command></term> - <listitem> - <para>Attaches the file system on the given device to a specified - directory in the file-system tree</para> - <indexterm zone="ch-system-util-linux mount"> - <primary sortas="b-mount">mount</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="mountpoint"> - <term><command>mountpoint</command></term> - <listitem> - <para>Checks if the directory is a mountpoint</para> - <indexterm zone="ch-system-util-linux mountpoint"> - <primary sortas="b-mountpoint">mountpoint</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="namei"> - <term><command>namei</command></term> - <listitem> - <para>Shows the symbolic links in the given pathnames</para> - <indexterm zone="ch-system-util-linux namei"> - <primary sortas="b-namei">namei</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="nsenter"> - <term><command>nsenter</command></term> - <listitem> - <para>Runs a program with namespaces of other processes</para> - <indexterm zone="ch-system-util-linux nsenter"> - <primary sortas="b-nsenter">nsenter</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="partx"> - <term><command>partx</command></term> - <listitem> - <para>Tells the kernel about the presence and numbering of on-disk - partitions</para> - <indexterm zone="ch-system-util-linux partx"> - <primary sortas="b-partx">partx</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="pivot_root"> - <term><command>pivot_root</command></term> - <listitem> - <para>Makes the given file system the new root file system of the - current process</para> - <indexterm zone="ch-system-util-linux pivot_root"> - <primary sortas="b-pivot_root">pivot_root</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="prlimit"> - <term><command>prlimit</command></term> - <listitem> - <para>Get and set a process' resource limits</para> - <indexterm zone="ch-system-util-linux prlimit"> - <primary sortas="b-prlimit">prlimit</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="raw"> - <term><command>raw</command></term> - <listitem> - <para>Bind a Linux raw character device to a block device</para> - <indexterm zone="ch-system-util-linux raw"> - <primary sortas="b-raw">raw</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="readprofile"> - <term><command>readprofile</command></term> - <listitem> - <para>Reads kernel profiling information</para> - <indexterm zone="ch-system-util-linux readprofile"> - <primary sortas="b-readprofile">readprofile</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rename"> - <term><command>rename</command></term> - <listitem> - <para>Renames the given files, replacing a given string with - another</para> - <indexterm zone="ch-system-util-linux rename"> - <primary sortas="b-rename">rename</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="renice"> - <term><command>renice</command></term> - <listitem> - <para>Alters the priority of running processes</para> - <indexterm zone="ch-system-util-linux renice"> - <primary sortas="b-renice">renice</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="resizepart"> - <term><command>resizepart</command></term> - <listitem> - <para>Asks the Linux kernel to resize a partition</para> - <indexterm zone="ch-system-util-linux resizepart"> - <primary sortas="b-resizepart">resizepart</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rev"> - <term><command>rev</command></term> - <listitem> - <para>Reverses the lines of a given file</para> - <indexterm zone="ch-system-util-linux rev"> - <primary sortas="b-rev">rev</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rkfill"> - <term><command>rkfill</command></term> - <listitem> - <para>Tool for enabling and disabling wireless devices</para> - <indexterm zone="ch-system-util-linux rkfill"> - <primary sortas="b-rkfill">rkfill</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rtcwake"> - <term><command>rtcwake</command></term> - <listitem> - <para>Used to enter a system sleep state until specified wakeup - time</para> - <indexterm zone="ch-system-util-linux rtcwake"> - <primary sortas="b-rtcwake">rtcwake</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="script"> - <term><command>script</command></term> - <listitem> - <para>Makes a typescript of a terminal session</para> - <indexterm zone="ch-system-util-linux script"> - <primary sortas="b-script">script</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="scriptreplay"> - <term><command>scriptreplay</command></term> - <listitem> - <para>Plays back typescripts using timing information</para> - <indexterm zone="ch-system-util-linux scriptreplay"> - <primary sortas="b-scriptreplay">scriptreplay</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setarch"> - <term><command>setarch</command></term> - <listitem> - <para>Changes reported architecture in a new program environment and - sets personality flags</para> - <indexterm zone="ch-system-util-linux setarch"> - <primary sortas="b-setarch">setarch</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setsid"> - <term><command>setsid</command></term> - <listitem> - <para>Runs the given program in a new session</para> - <indexterm zone="ch-system-util-linux setsid"> - <primary sortas="b-setsid">setsid</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="setterm"> - <term><command>setterm</command></term> + <title>The meaning of the configure options:</title> +<!-- TODO --> + <varlistentry> + <term><parameter>ADJTIME_PATH=/var/lib/hwclock/adjtime</parameter></term> <listitem> - <para>Sets terminal attributes</para> - <indexterm zone="ch-system-util-linux setterm"> - <primary sortas="b-setterm">setterm</primary> - </indexterm> + <para>This sets the location of the file recording information about + the hardware clock, in accordance to the FHS. This is not stricly + needed fot his temporary tool, but it prevent creating a file + at another location, which would not be overwritten or removed + when building the final util-linux.</para> </listitem> </varlistentry> - <varlistentry id="sfdisk"> - <term><command>sfdisk</command></term> + <varlistentry> + <term><parameter>--disable-*</parameter></term> <listitem> - <para>A disk partition table manipulator</para> - <indexterm zone="ch-system-util-linux sfdisk"> - <primary sortas="b-sfdisk">sfdisk</primary> - </indexterm> + <para>Those switches prevent warnings about building components + that require packages not in LFS or not installed yet.</para> </listitem> </varlistentry> - <varlistentry id="sulogin"> - <term><command>sulogin</command></term> + <varlistentry> + <term><parameter>--without-python</parameter></term> <listitem> - <para>Allows <systemitem class="username">root</systemitem> to log in; - it is normally invoked by <command>init</command> when the system goes - into single user mode</para> - <indexterm zone="ch-system-util-linux sulogin"> - <primary sortas="b-sulogin">sulogin</primary> - </indexterm> + <para>This switch disables using <application>Python</application>. + It avoids trying to build unneeded bindings.</para> </listitem> </varlistentry> - <varlistentry id="swaplabel"> - <term><command>swaplabel</command></term> - <listitem> - <para>Allows to change swaparea UUID and label</para> - <indexterm zone="ch-system-util-linux swaplabel"> - <primary sortas="b-swaplabel">swaplabel</primary> - </indexterm> - </listitem> - </varlistentry> + </variablelist> - <varlistentry id="swapoff"> - <term><command>swapoff</command></term> - <listitem> - <para>Disables devices and files for paging and swapping</para> - <indexterm zone="ch-system-util-linux swapoff"> - <primary sortas="b-swapoff">swapoff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="swapon"> - <term><command>swapon</command></term> - <listitem> - <para>Enables devices and files for paging and swapping and - lists the devices and files currently in use</para> - <indexterm zone="ch-system-util-linux swapon"> - <primary sortas="b-swapon">swapon</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="switch_root"> - <term><command>switch_root</command></term> - <listitem> - <para>Switches to another filesystem as the root of the mount tree</para> - <indexterm zone="ch-system-util-linux switch_root"> - <primary sortas="b-switch_root">switch_root</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="tailf"> - <term><command>tailf</command></term> - <listitem> - <para>Tracks the growth of a log file; displays the last 10 lines - of a log file, then continues displaying any new entries in the - log file as they are created</para> - <indexterm zone="ch-system-util-linux tailf"> - <primary sortas="b-tailf">tailf</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="taskset"> - <term><command>taskset</command></term> - <listitem> - <para>Retrieves or sets a process' CPU affinity</para> - <indexterm zone="ch-system-util-linux taskset"> - <primary sortas="b-taskset">taskset</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="ul"> - <term><command>ul</command></term> - <listitem> - <para>A filter for translating underscores into escape sequences - indicating underlining for the terminal in use</para> - <indexterm zone="ch-system-util-linux ul"> - <primary sortas="b-ul">ul</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="umount"> - <term><command>umount</command></term> - <listitem> - <para>Disconnects a file system from the system's file tree</para> - <indexterm zone="ch-system-util-linux umount"> - <primary sortas="b-umount">umount</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uname26"> - <term><command>uname26</command></term> - <listitem> - <para>A symbolic link to setarch</para> - <indexterm zone="ch-system-util-linux uname26"> - <primary sortas="b-uname26">uname26</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unshare"> - <term><command>unshare</command></term> - <listitem> - <para>Runs a program with some namespaces unshared from parent</para> - <indexterm zone="ch-system-util-linux unshare"> - <primary sortas="b-unshare">unshare</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="utmpdump"> - <term><command>utmpdump</command></term> - <listitem> - <para>Displays the content of the given login file in a more - user-friendly format</para> - <indexterm zone="ch-system-util-linux utmpdump"> - <primary sortas="b-utmpdump">utmpdump</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uuidd"> - <term><command>uuidd</command></term> - <listitem> - <para>A daemon used by the UUID library to generate time-based - UUIDs in a secure and guaranteed-unique fashion</para> - <indexterm zone="ch-system-util-linux uuidd"> - <primary sortas="b-uuidd">uuidd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uuidgen"> - <term><command>uuidgen</command></term> - <listitem> - <para>Creates new UUIDs. Each new UUID can reasonably be considered - unique among all UUIDs created, on the local system and on other - systems, in the past and in the future</para> - <indexterm zone="ch-system-util-linux uuidgen"> - <primary sortas="b-uuidgen">uuidgen</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="uuidparse"> - <term><command>uuidparse</command></term> - <listitem> - <para>An utility to parse unique identifiers</para> - <indexterm zone="ch-system-util-linux uuidparse"> - <primary sortas="b-uuidparse">uuidparse</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="wall"> - <term><command>wall</command></term> - <listitem> - <para>Displays the contents of a file or, by default, its standard - input, on the terminals of all currently logged in users</para> - <indexterm zone="ch-system-util-linux wall"> - <primary sortas="b-wall">wall</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="wdctl"> - <term><command>wdctl</command></term> - <listitem> - <para>Shows hardware watchdog status</para> - <indexterm zone="ch-system-util-linux wdctl"> - <primary sortas="b-wdctl">wdctl</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="whereis"> - <term><command>whereis</command></term> - <listitem> - <para>Reports the location of the binary, source, and man page - for the given command</para> - <indexterm zone="ch-system-util-linux whereis"> - <primary sortas="b-whereis">whereis</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="wipefs"> - <term><command>wipefs</command></term> - <listitem> - <para>Wipes a filesystem signature from a device</para> - <indexterm zone="ch-system-util-linux wipefs"> - <primary sortas="b-wipefs">wipefs</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="x86_64"> - <term><command>x86_64</command></term> - <listitem> - <para>A symbolic link to setarch</para> - <indexterm zone="ch-system-util-linux x86_64"> - <primary sortas="b-x86_64">x86_64</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zramctl"> - <term><command>zramctl</command></term> - <listitem> - <para>A program to set up and control zram (compressed ram disk) - devices</para> - <indexterm zone="ch-system-util-linux zramctl"> - <primary sortas="b-zramctl">zramctl</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Compile the package:</para> - <varlistentry id="libblkid"> - <term><filename class="libraryfile">libblkid</filename></term> - <listitem> - <para>Contains routines for device identification and token - extraction</para> - <indexterm zone="ch-system-util-linux libblkid"> - <primary sortas="c-libblkid">libblkid</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput remap="make">make</userinput></screen> - <varlistentry id="libfdisk"> - <term><filename class="libraryfile">libfdisk</filename></term> - <listitem> - <para>Contains routines for manipulating partition tables</para> - <indexterm zone="ch-system-util-linux libfdisk"> - <primary sortas="c-libfdisk">libfdisk</primary> - </indexterm> - </listitem> - </varlistentry> + <para>Install the package:</para> - <varlistentry id="libmount"> - <term><filename class="libraryfile">libmount</filename></term> - <listitem> - <para>Contains routines for block device mounting and - unmounting</para> - <indexterm zone="ch-system-util-linux libmount"> - <primary sortas="c-libmount">libmount</primary> - </indexterm> - </listitem> - </varlistentry> +<screen><userinput remap="install">make install</userinput></screen> - <varlistentry id="libsmartcols"> - <term><filename class="libraryfile">libsmartcols</filename></term> - <listitem> - <para>Contains routines for aiding screen output in tabular form</para> - <indexterm zone="ch-system-util-linux libsmartcols"> - <primary sortas="c-libsmartcols">libsmartcols</primary> - </indexterm> - </listitem> - </varlistentry> + </sect2> - <varlistentry id="libuuid"> - <term><filename class="libraryfile">libuuid</filename></term> - <listitem> - <para>Contains routines for generating unique identifiers for objects - that may be accessible beyond the local system</para> - <indexterm zone="ch-system-util-linux libuuid"> - <primary sortas="c-libuuid">libuuid</primary> - </indexterm> - </listitem> - </varlistentry> + <sect2 role="content"> + <title/> - </variablelist> + <para>Details on this package are located in + <xref linkend="contents-utillinux" role="."/></para> </sect2> diff --git a/chapter06/vim.xml b/chapter06/vim.xml deleted file mode 100644 index 263122bd7..000000000 --- a/chapter06/vim.xml +++ /dev/null @@ -1,319 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-vim" role="wrap"> - <?dbhtml filename="vim.html"?> - - <sect1info condition="script"> - <productname>vim</productname> - <productnumber>&vim-version;</productnumber> - <address>&vim-url;</address> - </sect1info> - - <title>Vim-&vim-version;</title> - - <indexterm zone="ch-system-vim"> - <primary sortas="a-Vim">Vim</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Vim package contains a powerful text editor.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&vim-ch6-sbu;</seg> - <seg>&vim-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - <tip> - <title>Alternatives to Vim</title> - - <para>If you prefer another editor—such as Emacs, Joe, or - Nano—please refer to <ulink - url="&blfs-book;postlfs/editors.html"/> for suggested - installation instructions.</para> - </tip> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Vim</title> - - <para>First, change the default location of the <filename>vimrc</filename> - configuration file to <filename class="directory">/etc</filename>:</para> - -<screen><userinput remap="pre">echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h</userinput></screen> - -<!-- <para>Disable a test that fails:</para> - -<screen><userinput remap="pre">sed -i '/call/{s/split/xsplit/;s/303/492/}' src/testdir/test_recover.vim</userinput></screen> ---> - <para>Prepare Vim for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To prepare the tests, ensure that the - <systemitem class="username">tester</systemitem> user can write - to the sources tree:</para> - -<screen><userinput remap="test">chown -Rv tester .</userinput></screen> - - <para>Now run the tests as the <systemitem - class="username">tester</systemitem> user:</para> - -<screen><userinput remap="test">su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log</userinput></screen> - -<!--<screen><userinput remap="test">LANG=en_US.UTF-8 make -j1 test &> vim-test.log</userinput></screen>--> - - <para>The test suite outputs a lot of binary data to the screen. This can - cause issues with the settings of the current terminal. The problem can be - avoided by redirecting the output to a log file as shown above. A - successful test will result in the words "ALL DONE" in the log file - at completion.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>Many users are used to using <command>vi</command> instead of - <command>vim</command>. To allow execution of <command>vim</command> - when users habitually enter <command>vi</command>, create a - symlink for both the binary and the man page in the provided - languages:</para> - -<screen><userinput remap="install">ln -sv vim /usr/bin/vi -for L in /usr/share/man/{,*/}man1/vim.1; do - ln -sv vim.1 $(dirname $L)/vi.1 -done</userinput></screen> - - <para>By default, Vim's documentation is installed in <filename - class="directory">/usr/share/vim</filename>. The following symlink - allows the documentation to be accessed via <filename - class="directory">/usr/share/doc/vim-&vim-version;</filename>, making - it consistent with the location of documentation for other packages:</para> - -<screen><userinput remap="install">ln -sv ../&vim-docdir;/doc /usr/share/doc/vim-&vim-version;</userinput></screen> - - <para>If an X Window System is going to be installed on the LFS - system, it may be necessary to recompile Vim after installing X. Vim - comes with a GUI version of the editor that requires X and some - additional libraries to be installed. For more information on this - process, refer to the Vim documentation and the Vim installation page - in the BLFS book at <ulink - url="&blfs-book;postlfs/vim.html"/>.</para> - - </sect2> - - <sect2 id="conf-vim" role="configuration"> - <title>Configuring Vim</title> - - <indexterm zone="conf-vim"> - <primary sortas="e-/etc/vimrc">/etc/vimrc</primary> - </indexterm> - - <para>By default, <command>vim</command> runs in vi-incompatible mode. - This may be new to users who have used other editors in the past. The - <quote>nocompatible</quote> setting is included below to highlight the - fact that a new behavior is being used. It also reminds those who would - change to <quote>compatible</quote> mode that it should be the first - setting in the configuration file. This is necessary because it changes - other settings, and overrides must come after this setting. Create a default - <command>vim</command> configuration file by running the following:</para> - -<screen><userinput>cat > /etc/vimrc << "EOF" -<literal>" Begin /etc/vimrc - -" Ensure defaults are set before customizing settings, not after -source $VIMRUNTIME/defaults.vim -let skip_defaults_vim=1 - -set nocompatible -set backspace=2 -set mouse= -syntax on -if (&term == "xterm") || (&term == "putty") - set background=dark -endif - -" End /etc/vimrc</literal> -EOF</userinput></screen> - - <para>The <parameter>set nocompatible</parameter> setting makes - <command>vim</command> behave in a more useful way (the default) than the - vi-compatible manner. Remove the <quote>no</quote> to keep the old - <command>vi</command> behavior. The <parameter>set backspace=2</parameter> - setting allows backspacing over line breaks, autoindents, and the start of - insert. The <parameter>syntax on</parameter> parameter enables vim's syntax - highlighting. The <parameter>set mouse=</parameter> setting enables - proper pasting of text with the mouse when working in chroot or over a - remote connection. Finally, the <emphasis>if</emphasis> statement with the - <parameter>set background=dark</parameter> setting corrects - <command>vim</command>'s guess about the background color of some terminal - emulators. This gives the highlighting a better color scheme for use on the - black background of these programs.</para> -<!-- - <para>Creating an empty <filename>~/.vimrc</filename> prevents vim from - overriding settings in <filename>/etc/vimrc</filename> by using - <filename>/usr/share/vim/vim80/defaults.vim</filename>.</para> ---> - <para>Documentation for other available options can be obtained by - running the following command:</para> - -<screen role="nodump"><userinput>vim -c ':options'</userinput></screen> - - <note> - <para>By default, Vim only installs spell files for the English language. - To install spell files for your preferred language, download the - <filename>*.spl</filename> and optionally, the <filename>*.sug</filename> - files for your language and character encoding from <ulink - url="ftp://ftp.vim.org/pub/vim/runtime/spell/"/> and save them to - <filename class='directory'>/usr/share/&vim-docdir;/spell/</filename>.</para> - - <para>To use these spell files, some configuration in - <filename>/etc/vimrc</filename> is needed, e.g.:</para> - -<screen><literal>set spelllang=en,ru -set spell</literal></screen> - - <para>For more information, see the appropriate README file located - at the URL above.</para> - </note> - - </sect2> - - <sect2 id="contents-vim" role="content"> - <title>Contents of Vim</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed directory</segtitle> - - <seglistitem> - <seg> ex (link to vim), rview (link to vim), rvim (link to vim), vi - (link to vim), view (link to vim), vim, vimdiff (link to vim), vimtutor, - and xxd</seg> - <seg>/usr/share/vim</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="ex"> - <term><command>ex</command></term> - <listitem> - <para>Starts <command>vim</command> in ex mode</para> - <indexterm zone="ch-system-vim ex"> - <primary sortas="b-ex">ex</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rview"> - <term><command>rview</command></term> - <listitem> - <para>Is a restricted version of <command>view</command>; no shell - commands can be started and <command>view</command> cannot be - suspended</para> - <indexterm zone="ch-system-vim rview"> - <primary sortas="b-rview">rview</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="rvim"> - <term><command>rvim</command></term> - <listitem> - <para>Is a restricted version of <command>vim</command>; no shell - commands can be started and <command>vim</command> cannot be - suspended</para> - <indexterm zone="ch-system-vim rvim"> - <primary sortas="b-rvim">rvim</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vi"> - <term><command>vi</command></term> - <listitem> - <para>Link to <command>vim</command></para> - <indexterm zone="ch-system-vim vi"> - <primary sortas="b-vi">vi</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="view"> - <term><command>view</command></term> - <listitem> - <para>Starts <command>vim</command> in read-only mode</para> - <indexterm zone="ch-system-vim view"> - <primary sortas="b-view">view</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vim"> - <term><command>vim</command></term> - <listitem> - <para>Is the editor</para> - <indexterm zone="ch-system-vim vim"> - <primary sortas="b-vim">vim</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vimdiff"> - <term><command>vimdiff</command></term> - <listitem> - <para>Edits two or three versions of a file with <command>vim</command> - and shows differences</para> - <indexterm zone="ch-system-vim vimdiff"> - <primary sortas="b-vimdiff">vimdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="vimtutor"> - <term><command>vimtutor</command></term> - <listitem> - <para>Teaches the basic keys and commands of - <command>vim</command></para> - <indexterm zone="ch-system-vim vimtutor"> - <primary sortas="b-vimtutor">vimtutor</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xxd"> - <term><command>xxd</command></term> - <listitem> - <para>Creates a hex dump of the given file; it can - also do the reverse, so it can be used for binary patching</para> - <indexterm zone="ch-system-vim xxd"> - <primary sortas="b-xxd">xxd</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/xml-parser.xml b/chapter06/xml-parser.xml deleted file mode 100644 index 54d5bcb35..000000000 --- a/chapter06/xml-parser.xml +++ /dev/null @@ -1,92 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-xml-parser" role="wrap"> - <?dbhtml filename="xml-parser.html"?> - - <sect1info condition="script"> - <productname>xml-parser</productname> - <productnumber>&xml-parser-version;</productnumber> - <address>&xml-parser-url;</address> - </sect1info> - - <title>XML::Parser-&xml-parser-version;</title> - - <indexterm zone="ch-system-xml-parser"> - <primary sortas="a-Xml-Parser">XML::Parser</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The XML::Parser module is a Perl interface to James Clark's - XML parser, Expat.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&xml-parser-ch6-sbu;</seg> - <seg>&xml-parser-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of XML::Parser</title> - - <para>Prepare XML::Parser for compilation:</para> - -<screen><userinput remap="configure">perl Makefile.PL</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make test</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - </sect2> - - <sect2 id="contents-xml-parser" role="content"> - <title>Contents of XML::Parser</title> - - <segmentedlist> - <segtitle>Installed module</segtitle> - - <seglistitem> - <seg>Expat.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="Expat"> - <term><filename class="libraryfile">Expat</filename></term> - <listitem> - <para>provides the Perl Expat interface</para> - <indexterm zone="ch-system-xml-parser Expat"> - <primary sortas="c-Expat">Expat</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/xz.xml b/chapter06/xz.xml index 5a342b2ff..9e2d0da4b 100644 --- a/chapter06/xz.xml +++ b/chapter06/xz.xml @@ -5,7 +5,7 @@ %general-entities; ]> -<sect1 id="ch-system-xz" role="wrap"> +<sect1 id="ch-tools-xz" role="wrap"> <?dbhtml filename="xz.html"?> <sect1info condition="script"> @@ -16,26 +16,25 @@ <title>Xz-&xz-version;</title> - <indexterm zone="ch-system-xz"> + <indexterm zone="ch-tools-xz"> <primary sortas="a-xz">Xz</primary> + <secondary>tools</secondary> </indexterm> <sect2 role="package"> <title/> - <para>The Xz package contains programs for compressing and decompressing - files. It provides capabilities for the lzma and the newer xz compression - formats. Compressing text files with <command>xz</command> yields a better - compression percentage than with the traditional <command>gzip</command> or - <command>bzip2</command> commands.</para> + <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" + href="../chapter08/xz.xml" + xpointer="xpointer(/sect1/sect2[1]/para[1])"/> <segmentedlist> <segtitle>&buildtime;</segtitle> <segtitle>&diskspace;</segtitle> <seglistitem> - <seg>&xz-ch6-sbu;</seg> - <seg>&xz-ch6-du;</seg> + <seg>&xz-ch5-sbu;</seg> + <seg>&xz-ch5-du;</seg> </seglistitem> </segmentedlist> @@ -44,320 +43,34 @@ <sect2 role="installation"> <title>Installation of Xz</title> - <para>Prepare Xz for compilation with:</para> + <para>Prepare Xz for compilation:</para> -<screen><userinput remap="configure">./configure --prefix=/usr \ - --disable-static \ +<screen><userinput remap="configure">./configure --prefix=/usr \ + --host=$LFS_TGT \ + --build=$(build-aux/config.guess) \ + --disable-static \ --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen> - <para>Compile the package:</para> + <para>Compile the package:</para> <screen><userinput remap="make">make</userinput></screen> - <para>To test the results, issue:</para> + <para>Install the package:</para> -<screen><userinput remap="test">make check</userinput></screen> +<screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> - <para>Install the package and make sure that all essential files are in the - correct directory:</para> + <para>Make sure that all essential files are in the correct directory:</para> -<screen><userinput remap="install">make install -mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin -mv -v /usr/lib/liblzma.so.* /lib -ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen> +<screen><userinput remap="install">mv -v $LFS/usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} $LFS/bin +mv -v $LFS/usr/lib/liblzma.so.* $LFS/lib +ln -svf ../../lib/$(readlink $LFS/usr/lib/liblzma.so) $LFS/usr/lib/liblzma.so</userinput></screen> </sect2> - <sect2 id="contents-xz" role="content"> - <title>Contents of Xz</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed libraries</segtitle> - <segtitle>Installed directories</segtitle> - - <seglistitem> - <seg> - lzcat (link to xz), - lzcmp (link to xzdiff), - lzdiff (link to xzdiff), - lzegrep (link to xzgrep), - lzfgrep (link to xzgrep), - lzgrep (link to xzgrep), - lzless (link to xzless), - lzma (link to xz), - lzmadec, - lzmainfo, - lzmore (link to xzmore), - unlzma (link to xz), - unxz (link to xz), - xz, - xzcat (link to xz), - xzcmp (link to xzdiff), - xzdec, - xzdiff, - xzegrep (link to xzgrep), - xzfgrep (link to xzgrep), - xzgrep, - xzless, and - xzmore</seg> - <seg> - liblzma.so - </seg> - <seg> - /usr/include/lzma and - /usr/share/doc/xz-&xz-version; - </seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="lzcat"> - <term><command>lzcat</command></term> - <listitem> - <para>Decompresses to standard output</para> - <indexterm zone="ch-system-xz lzcat"> - <primary sortas="b-lzcat">lzcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzcmp"> - <term><command>lzcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzcmp"> - <primary sortas="b-lzcmp">lzcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzdiff"> - <term><command>lzdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzdiff"> - <primary sortas="b-lzdiff">lzdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzegrep"> - <term><command>lzegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzegrep"> - <primary sortas="b-lzegrep">lzegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzfgrep"> - <term><command>lzfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzfgrep"> - <primary sortas="b-lzfgrep">lzfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzgrep"> - <term><command>lzgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzgrep"> - <primary sortas="b-lzgrep">lzgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzless"> - <term><command>lzless</command></term> - <listitem> - <para>Runs <command>less</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzless"> - <primary sortas="b-lzless">lzless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzma"> - <term><command>lzma</command></term> - <listitem> - <para>Compresses or decompresses files using the LZMA format</para> - <indexterm zone="ch-system-xz lzma"> - <primary sortas="b-lzma">lzma</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzmadec"> - <term><command>lzmadec</command></term> - <listitem> - <para>A small and fast decoder for LZMA compressed files</para> - <indexterm zone="ch-system-xz lzmadec"> - <primary sortas="b-lzmadec">lzmadec</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzmainfo"> - <term><command>lzmainfo</command></term> - <listitem> - <para>Shows information stored in the LZMA compressed file header</para> - <indexterm zone="ch-system-xz lzmainfo"> - <primary sortas="b-lzmainfo">lzmainfo</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="lzmore"> - <term><command>lzmore</command></term> - <listitem> - <para>Runs <command>more</command> on LZMA compressed files</para> - <indexterm zone="ch-system-xz lzmore"> - <primary sortas="b-lzmamore">lzmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unlzma"> - <term><command>unlzma</command></term> - <listitem> - <para>Decompresses files using the LZMA format</para> - <indexterm zone="ch-system-xz unlzma"> - <primary sortas="b-unlzma">unlzma</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="unxz"> - <term><command>unxz</command></term> - <listitem> - <para>Decompresses files using the XZ format</para> - <indexterm zone="ch-system-xz unxz"> - <primary sortas="b-unxz">unxz</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xz"> - <term><command>xz</command></term> - <listitem> - <para>Compresses or decompresses files using the XZ format</para> - <indexterm zone="ch-system-xz xz"> - <primary sortas="b-xz">xz</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzcat"> - <term><command>xzcat</command></term> - <listitem> - <para>Decompresses to standard output</para> - <indexterm zone="ch-system-xz xzcat"> - <primary sortas="b-xzcat">xzcat</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzcmp"> - <term><command>xzcmp</command></term> - <listitem> - <para>Runs <command>cmp</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzcmp"> - <primary sortas="b-xzcmp">xzcmp</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzdec"> - <term><command>xzdec</command></term> - <listitem> - <para>A small and fast decoder for XZ compressed files</para> - <indexterm zone="ch-system-xz xzdec"> - <primary sortas="b-xzdec">xzdec</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzdiff"> - <term><command>xzdiff</command></term> - <listitem> - <para>Runs <command>diff</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzdiff"> - <primary sortas="b-xzdiff">xzdiff</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzegrep"> - <term><command>xzegrep</command></term> - <listitem> - <para>Runs <command>egrep</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzegrep"> - <primary sortas="b-xzegrep">xzegrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzfgrep"> - <term><command>xzfgrep</command></term> - <listitem> - <para>Runs <command>fgrep</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzfgrep"> - <primary sortas="b-xzfgrep">xzfgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzgrep"> - <term><command>xzgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzgrep"> - <primary sortas="b-xzgrep">xzgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzless"> - <term><command>xzless</command></term> - <listitem> - <para>Runs <command>less</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzless"> - <primary sortas="b-xzless">xzless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="xzmore"> - <term><command>xzmore</command></term> - <listitem> - <para>Runs <command>more</command> on XZ compressed files</para> - <indexterm zone="ch-system-xz xzmore"> - <primary sortas="b-xzmore">xzmore</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="liblzma"> - <term><filename class="libraryfile">liblzma</filename></term> - <listitem> - <para>The library implementing lossless, block-sorting data - compression, using the Lempel-Ziv-Markov chain algorithm</para> - <indexterm zone="ch-system-xz liblzma"> - <primary sortas="c-liblzma">liblzma</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> + <sect2 role="content"> + <title/> + <para>Details on this package are located in<!-- TODO + <xref linkend="contents-xz" role="."/> --></para> </sect2> diff --git a/chapter06/zlib.xml b/chapter06/zlib.xml deleted file mode 100644 index 2dcc49413..000000000 --- a/chapter06/zlib.xml +++ /dev/null @@ -1,101 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-zlib" role="wrap"> - <?dbhtml filename="zlib.html"?> - - <sect1info condition="script"> - <productname>zlib</productname> - <productnumber>&zlib-version;</productnumber> - <address>&zlib-url;</address> - </sect1info> - - <title>Zlib-&zlib-version;</title> - - <indexterm zone="ch-system-zlib"> - <primary sortas="a-Zlib">Zlib</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>The Zlib package contains compression and decompression routines used by - some programs.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&zlib-ch6-sbu;</seg> - <seg>&zlib-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Zlib</title> - - <para>Prepare Zlib for compilation:</para> - -<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>To test the results, issue:</para> - -<screen><userinput remap="test">make check</userinput></screen> - - <para>Install the package:</para> - -<screen><userinput remap="install">make install</userinput></screen> - - <para>The shared library needs to be moved to - <filename class="directory">/lib</filename>, and as a result the - <filename class="extension">.so</filename> file in - <filename class="directory">/usr/lib</filename> will need to be recreated:</para> - -<screen><userinput remap="install">mv -v /usr/lib/libz.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libz.so) /usr/lib/libz.so</userinput></screen> - - </sect2> - - <sect2 id="contents-zlib" role="content"> - <title>Contents of Zlib</title> - - <segmentedlist> - <segtitle>Installed libraries</segtitle> - - <seglistitem> - <seg>libz.{a,so}</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="libz"> - <term><filename class="libraryfile">libz</filename></term> - <listitem> - <para>Contains compression and decompression functions used by - some programs</para> - <indexterm zone="ch-system-zlib libz"> - <primary sortas="c-libz">libz</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> diff --git a/chapter06/zstd.xml b/chapter06/zstd.xml deleted file mode 100644 index 71e7794b6..000000000 --- a/chapter06/zstd.xml +++ /dev/null @@ -1,136 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1"?> -<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" - "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ - <!ENTITY % general-entities SYSTEM "../general.ent"> - %general-entities; -]> - -<sect1 id="ch-system-zstd" role="wrap"> - <?dbhtml filename="zstd.html"?> - - <sect1info condition="script"> - <productname>zstd</productname> - <productnumber>&zstd-version;</productnumber> - <address>&zstd-url;</address> - </sect1info> - - <title>Zstd-&zstd-version;</title> - - <indexterm zone="ch-system-zstd"> - <primary sortas="a-zstd">zstd</primary> - </indexterm> - - <sect2 role="package"> - <title/> - - <para>Zstandard is a real-time compression algorithm, providing high - compression ratios. It offers a very wide range of compression / speed - trade-offs, while being backed by a very fast decoder.</para> - - <segmentedlist> - <segtitle>&buildtime;</segtitle> - <segtitle>&diskspace;</segtitle> - - <seglistitem> - <seg>&zstd-ch6-sbu;</seg> - <seg>&zstd-ch6-du;</seg> - </seglistitem> - </segmentedlist> - - </sect2> - - <sect2 role="installation"> - <title>Installation of Zstd</title> - - <para>Compile the package:</para> - -<screen><userinput remap="make">make</userinput></screen> - - <para>This package does not come with a test suite.</para> - - <para>Install the package:</para> - -<screen><userinput remap="install">make prefix=/usr install</userinput></screen> - - <para>Remove the static library and move the shared library to - <filename class="directory">/lib</filename>. Also, the - <filename class="extension">.so</filename> file in - <filename class="directory">/usr/lib</filename> will need to be recreated:</para> - -<screen><userinput remap="install">rm -v /usr/lib/libzstd.a -mv -v /usr/lib/libzstd.so.* /lib -ln -sfv ../../lib/$(readlink /usr/lib/libzstd.so) /usr/lib/libzstd.so</userinput></screen> - - </sect2> - - <sect2 id="contents-zstd" role="content"> - <title>Contents of Zstd</title> - - <segmentedlist> - <segtitle>Installed programs</segtitle> - <segtitle>Installed library</segtitle> - - <seglistitem> - <seg>zstd, - zstdcat (link to zstd), - zstdgrep, - zstdless, - zstdmt (link to zstd), and - unzstd (link to zstd) - </seg> - - <seg>libzstd.so</seg> - </seglistitem> - </segmentedlist> - - <variablelist> - <bridgehead renderas="sect3">Short Descriptions</bridgehead> - <?dbfo list-presentation="list"?> - <?dbhtml list-presentation="table"?> - - <varlistentry id="zstd"> - <term><command>zstd</command></term> - <listitem> - <para>Compresses or decompresses files using the ZSTD format</para> - <indexterm zone="ch-system-zstd zstd"> - <primary sortas="b-zstd">zstd</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zstdgrep"> - <term><command>zstdgrep</command></term> - <listitem> - <para>Runs <command>grep</command> on ZSTD compressed files</para> - <indexterm zone="ch-system-zstd zstdgrep"> - <primary sortas="b-zstdgrep">zstdgrep</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="zstdless"> - <term><command>zstdless</command></term> - <listitem> - <para>Runs <command>less</command> on ZSTD compressed files</para> - <indexterm zone="ch-system-zstd zstdless"> - <primary sortas="b-zstdless">zstdless</primary> - </indexterm> - </listitem> - </varlistentry> - - <varlistentry id="libzstd"> - <term><filename class="libraryfile">libzstd</filename></term> - <listitem> - <para>The library implementing lossless data - compression, using the ZSTD algorithm</para> - <indexterm zone="ch-system-zstd libzstd"> - <primary sortas="c-libzstd">libzstd</primary> - </indexterm> - </listitem> - </varlistentry> - - </variablelist> - - </sect2> - -</sect1> |