浏览代码

Changing branch name

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/6.2/BOOK@7678 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
Bruce Dubbs 19 年之前
当前提交
519ee45236
共有 100 个文件被更改,包括 18838 次插入0 次删除
  1. 47 0
      INSTALL
  2. 71 0
      Makefile
  3. 28 0
      README
  4. 426 0
      appendices/acknowledgments.xml
  5. 580 0
      appendices/acronymlist.xml
  6. 1481 0
      appendices/dependencies.xml
  7. 126 0
      chapter01/askforhelp.xml
  8. 2330 0
      chapter01/changelog.xml
  9. 21 0
      chapter01/chapter01.xml
  10. 89 0
      chapter01/how.xml
  11. 106 0
      chapter01/livecd.xml
  12. 92 0
      chapter01/resources.xml
  13. 311 0
      chapter01/whatsnew.xml
  14. 19 0
      chapter02/chapter02.xml
  15. 73 0
      chapter02/creatingfilesystem.xml
  16. 55 0
      chapter02/creatingpartition.xml
  17. 17 0
      chapter02/introduction.xml
  18. 59 0
      chapter02/mounting.xml
  19. 18 0
      chapter03/chapter03.xml
  20. 52 0
      chapter03/introduction.xml
  21. 586 0
      chapter03/packages.xml
  22. 305 0
      chapter03/patches.xml
  23. 39 0
      chapter04/aboutlfs.xml
  24. 45 0
      chapter04/aboutsbus.xml
  25. 52 0
      chapter04/abouttestsuites.xml
  26. 102 0
      chapter04/addinguser.xml
  27. 21 0
      chapter04/chapter04.xml
  28. 48 0
      chapter04/creatingtoolsdir.xml
  29. 91 0
      chapter04/settingenviron.xml
  30. 126 0
      chapter05/adjusting.xml
  31. 86 0
      chapter05/bash.xml
  32. 144 0
      chapter05/binutils-pass1.xml
  33. 99 0
      chapter05/binutils-pass2.xml
  34. 65 0
      chapter05/bison.xml
  35. 59 0
      chapter05/bzip2.xml
  36. 46 0
      chapter05/changingowner.xml
  37. 47 0
      chapter05/chapter05.xml
  38. 69 0
      chapter05/coreutils.xml
  39. 83 0
      chapter05/dejagnu.xml
  40. 64 0
      chapter05/diffutils.xml
  41. 155 0
      chapter05/expect.xml
  42. 65 0
      chapter05/findutils.xml
  43. 77 0
      chapter05/flex.xml
  44. 75 0
      chapter05/gawk.xml
  45. 137 0
      chapter05/gcc-pass1.xml
  46. 216 0
      chapter05/gcc-pass2.xml
  47. 85 0
      chapter05/gettext.xml
  48. 202 0
      chapter05/glibc.xml
  49. 81 0
      chapter05/grep.xml
  50. 64 0
      chapter05/gzip.xml
  51. 67 0
      chapter05/introduction.xml
  52. 66 0
      chapter05/linux-libc-headers.xml
  53. 65 0
      chapter05/m4.xml
  54. 64 0
      chapter05/make.xml
  55. 90 0
      chapter05/ncurses.xml
  56. 64 0
      chapter05/patch.xml
  57. 92 0
      chapter05/perl.xml
  58. 65 0
      chapter05/sed.xml
  59. 39 0
      chapter05/stripping.xml
  60. 70 0
      chapter05/tar.xml
  61. 131 0
      chapter05/tcl.xml
  62. 65 0
      chapter05/texinfo.xml
  63. 218 0
      chapter05/toolchaintechnotes.xml
  64. 76 0
      chapter05/util-linux.xml
  65. 53 0
      chapter06/aboutdebug.xml
  66. 171 0
      chapter06/autoconf.xml
  67. 263 0
      chapter06/automake.xml
  68. 150 0
      chapter06/bash.xml
  69. 327 0
      chapter06/binutils.xml
  70. 120 0
      chapter06/bison.xml
  71. 250 0
      chapter06/bzip2.xml
  72. 75 0
      chapter06/chapter06.xml
  73. 61 0
      chapter06/chroot.xml
  74. 1062 0
      chapter06/coreutils.xml
  75. 137 0
      chapter06/createfiles.xml
  76. 69 0
      chapter06/creatingdirs.xml
  77. 279 0
      chapter06/db.xml
  78. 131 0
      chapter06/diffutils.xml
  79. 470 0
      chapter06/e2fsprogs.xml
  80. 100 0
      chapter06/file.xml
  81. 180 0
      chapter06/findutils.xml
  82. 133 0
      chapter06/flex.xml
  83. 172 0
      chapter06/gawk.xml
  84. 349 0
      chapter06/gcc.xml
  85. 394 0
      chapter06/gettext.xml
  86. 854 0
      chapter06/glibc.xml
  87. 114 0
      chapter06/grep.xml
  88. 474 0
      chapter06/groff.xml
  89. 156 0
      chapter06/grub.xml
  90. 255 0
      chapter06/gzip.xml
  91. 95 0
      chapter06/iana-etc.xml
  92. 218 0
      chapter06/inetutils.xml
  93. 57 0
      chapter06/introduction.xml
  94. 299 0
      chapter06/iproute2.xml
  95. 371 0
      chapter06/kbd.xml
  96. 78 0
      chapter06/kernfs.xml
  97. 119 0
      chapter06/less.xml
  98. 110 0
      chapter06/libtool.xml
  99. 93 0
      chapter06/linux-libc-headers.xml
  100. 92 0
      chapter06/m4.xml

+ 47 - 0
INSTALL

@@ -0,0 +1,47 @@
+LFS Book Conversion Tools Installation Instructions
+
+After downloading the SVN source, there are some things that need to be set up 
+on your computer if you want to convert the XML source into something easier to 
+read (e.g. HTML, TXT, or PDF).  If you are interested in this, then keep 
+reading.  If you are only interested in editing the XML source for re- 
+submission to the lfs-book or lfs-dev mailing lists, then you do not need this 
+document.  Instead, you need to read the LFS Editor's Manual.  See the LFS 
+website at http://www.linuxfromscratch.org for more information.
+
+-------------------------------------------------------------------------------
+
+If you want to convert the XML to HTML, install the following:
+
+* libxml2
+  - http://www.linuxfromscratch.org/blfs/view/svn/general/libxml2.html
+
+* libxslt
+  - http://www.linuxfromscratch.org/blfs/view/svn/general/libxslt.html
+
+* DocBook DTD 
+  - http://www.linuxfromscratch.org/blfs/view/svn/pst/xml.html
+
+* DocBook XSL Stylesheets 
+  - http://www.linuxfromscratch.org/blfs/view/svn/pst/docbook-xsl.html
+
+* HTMLTidy
+  - http://www.linuxfromscratch.org/blfs/view/svn/general/tidy.html
+
+------------------------------------------------------------------------------- 
+
+If you want to convert the XML to TXT, install the above items, and then install
+the following:
+
+* lynx
+  - http://www.linuxfromscratch.org/blfs/view/svn/basicnet/lynx.html
+
+------------------------------------------------------------------------------- 
+
+If you want to convert the XML to PDF, install the items listed above (except
+lynx) and then install the following:
+
+* JDK
+  - http://www.linuxfromscratch.org/blfs/view/svn/general/jdk.html
+
+* FOP and JAI
+  - http://www.linuxfromscratch.org/blfs/view/svn/pst/fop.html

+ 71 - 0
Makefile

@@ -0,0 +1,71 @@
+BASEDIR=~/lfs-book
+DUMPDIR=~/lfs-commands
+CHUNK_QUIET=0
+PDF_OUTPUT=LFS-BOOK.pdf
+NOCHUNKS_OUTPUT=LFS-BOOK.html
+XSLROOTDIR=/usr/share/xml/docbook/xsl-stylesheets-1.69.1
+
+lfs:
+	xsltproc --xinclude --nonet -stringparam profile.condition html \
+	-stringparam chunk.quietly $(CHUNK_QUIET) -stringparam base.dir $(BASEDIR)/ \
+	stylesheets/lfs-chunked.xsl index.xml
+
+	if [ ! -e $(BASEDIR)/stylesheets ]; then \
+	  mkdir -p $(BASEDIR)/stylesheets; \
+	fi;
+	cp stylesheets/*.css $(BASEDIR)/stylesheets
+
+	if [ ! -e $(BASEDIR)/images ]; then \
+	  mkdir -p $(BASEDIR)/images; \
+	fi;
+	cp $(XSLROOTDIR)/images/*.png \
+	  $(BASEDIR)/images
+	cd $(BASEDIR)/; sed -i -e "s@../stylesheets@stylesheets@g" \
+	  *.html
+	cd $(BASEDIR)/; sed -i -e "s@../images@images@g" \
+	  *.html
+
+	for filename in `find $(BASEDIR) -name "*.html"`; do \
+	  tidy -config tidy.conf $$filename; \
+	  true; \
+	  sh obfuscate.sh $$filename; \
+	  sed -i -e "s@text/html@application/xhtml+xml@g" $$filename; \
+	done;
+
+# Uncomment this for testing and stable versions
+#pdf:
+#	xsltproc --xinclude --nonet --stringparam profile.condition pdf \
+#		--output $(BASEDIR)/lfs-pdf.xml stylesheets/lfs-profile.xsl index.xml
+#	xsltproc --nonet --output $(BASEDIR)/lfs-pdf.fo stylesheets/lfs-pdf.xsl \
+#		$(BASEDIR)/lfs-pdf.xml
+#	sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
+#	fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
+#	rm $(BASEDIR)/lfs-pdf.xml $(BASEDIR)/lfs-pdf.fo
+
+# Remove this for testing and stable versions
+pdf:
+	xsltproc --xinclude --nonet --output $(BASEDIR)/lfs-pdf.fo \
+		stylesheets/lfs-pdf.xsl index.xml
+	sed -i -e "s/inherit/all/" $(BASEDIR)/lfs-pdf.fo
+	fop.sh $(BASEDIR)/lfs-pdf.fo $(BASEDIR)/$(PDF_OUTPUT)
+	rm $(BASEDIR)/lfs-pdf.fo
+
+nochunks:
+	xsltproc --xinclude --nonet -stringparam profile.condition html \
+	--output $(BASEDIR)/$(NOCHUNKS_OUTPUT) \
+	  stylesheets/lfs-nochunks.xsl index.xml
+
+	tidy -config tidy.conf $(BASEDIR)/$(NOCHUNKS_OUTPUT) || true
+
+	sh obfuscate.sh $(BASEDIR)/$(NOCHUNKS_OUTPUT)
+
+	sed -i -e "s@text/html@application/xhtml+xml@g"  \
+	  $(BASEDIR)/$(NOCHUNKS_OUTPUT)
+
+dump-commands:
+	xsltproc --xinclude --nonet --output $(DUMPDIR)/ \
+	   stylesheets/dump-commands.xsl index.xml
+
+validate:
+	xmllint --noout --nonet --xinclude --postvalid index.xml
+

+ 28 - 0
README

@@ -0,0 +1,28 @@
+LFS Book README
+
+This document is meant to instruct the user on how to convert the book's XML 
+source to other formats (e.g. HTML, PDF, PS and TXT).  First, if you have not 
+already done so, please read the INSTALL file for instructions on how to install
+the required software.  If you have already completed the steps outlined in the
+INSTALL file, then continue reading for examples how to convert these files into
+various other formats.
+
+XML to XHTML:
+-------------
+make BASEDIR=/path/to/output/location
+
+
+XML to single file XHTML (nochunks):
+------------------------------------
+make BASEDIR=/path/to/output/location nochunks
+
+
+XML to TXT
+----------
+Follow the instructions for nochunks and then run:
+lynx -dump /path/to/nochunks >/path/to/output
+
+
+XML to PDF:
+-----------
+make BASEDIR=/path/to/output/location pdf

+ 426 - 0
appendices/acknowledgments.xml

@@ -0,0 +1,426 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<appendix id="appendixb" xreflabel="Appendix B">
+  <?dbhtml dir="appendices"?>
+  <?dbhtml filename="acknowledgements.html"?>
+
+  <title>Acknowledgments</title>
+
+  <para>We would like to thank the following people and organizations
+  for their contributions to the Linux From Scratch Project.</para>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:gerard@linuxfromscratch.org">Gerard
+      Beekmans</ulink> &lt;gerard@linuxfromscratch.org&gt; &ndash;
+      LFS Creator, LFS Project Leader</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:matthew@linuxfromscratch.org">Matthew
+      Burgess</ulink> &lt;matthew@linuxfromscratch.org&gt; &ndash;
+      LFS Project Leader, LFS Technical Writer/Editor, LFS Release
+      Manager</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:archaic@linuxfromscratch.org">Archaic</ulink>
+      &lt;archaic@linuxfromscratch.org&gt; &ndash; LFS Technical Writer/Editor,
+      HLFS Project Leader, BLFS Editor, Hints and Patches Project
+      Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:nathan@linuxfromscratch.org">Nathan
+      Coulson</ulink> &lt;nathan@linuxfromscratch.org&gt; &ndash;
+      LFS-Bootscripts Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:bdubbs@linuxfromscratch.org">Bruce
+      Dubbs</ulink> &lt;bdubbs@linuxfromscratch.org&gt; &ndash; BLFS Project
+      Leader</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:manuel@linuxfromscratch.org">Manuel
+      Canales Esparcia</ulink> &lt;manuel@linuxfromscratch.org&gt; &ndash;
+      LFS/BLFS/HLFS XML and XSL Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jim@linuxfromscratch.org">Jim
+      Gifford</ulink> &lt;jim@linuxfromscratch.org&gt; &ndash; LFS Technical
+      Writer, Patches Project Leader</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jhuntwork@linuxfromscratch.org">Jeremy
+      Huntwork</ulink> &lt;jhuntwork@linuxfromscratch.org&gt; &ndash; LFS
+      Technical Writer, LFS LiveCD Maintainer, ALFS Project Leader</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:lizardo@linuxfromscratch.org">Anderson
+      Lizardo</ulink> &lt;lizardo@linuxfromscratch.org&gt; &ndash; Website
+      Backend-Scripts Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:ryan@linuxfromscratch.org">Ryan
+      Oliver</ulink> &lt;ryan@linuxfromscratch.org&gt; &ndash; LFS Toolchain
+      Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jwrober@linuxfromscratch.org">James
+      Robertson</ulink> &lt;jwrober@linuxfromscratch.org&gt; &ndash; Bugzilla
+      Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:tushar@linuxfromscratch.org">Tushar
+      Teredesai</ulink> &lt;tushar@linuxfromscratch.org&gt; &ndash; BLFS Book
+      Editor, Hints and Patches Project Leader</para>
+    </listitem>
+
+    <listitem>
+      <para>Countless other people on the various LFS and BLFS mailing lists
+      who helped make this book possible by giving their suggestions, testing
+      the book, and submitting bug reports, instructions, and their
+      experiences with installing various packages.</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect2">Translators</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:macana@macana-es.com">Manuel Canales
+      Esparcia</ulink> &lt;macana@macana-es.com&gt; &ndash; Spanish
+      LFS translation project</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:johan@linuxfromscratch.org">Johan
+      Lenglet</ulink> &lt;johan@linuxfromscratch.org&gt; &ndash; French LFS
+      translation project</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:lizardo@linuxfromscratch.org">Anderson
+      Lizardo</ulink> &lt;lizardo@linuxfromscratch.org&gt; &ndash;
+      Portuguese LFS translation project</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:tr@erdfunkstelle.de">Thomas
+      Reitelbach </ulink> &lt;tr@erdfunkstelle.de&gt; &ndash; German LFS
+      translation project</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect2">Mirror Maintainers</bridgehead>
+
+  <bridgehead renderas="sect3">North American Mirrors</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:scott@osuosl.org">Scott Kveton</ulink>
+      &lt;scott@osuosl.org&gt; &ndash; lfs.oregonstate.edu mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:miha@xuy.biz">Mikhail Pastukhov</ulink>
+      &lt;miha@xuy.biz&gt; &ndash; lfs.130th.net mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:lost@l-w.net">William Astle</ulink>
+      &lt;lost@l-w.net&gt; &ndash; ca.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jpolen@rackspace.com">Jeremy Polen</ulink>
+      &lt;jpolen@rackspace.com&gt; &ndash; us2.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:tim@idge.net">Tim Jackson</ulink>
+      &lt;tim@idge.net&gt; &ndash; linuxfromscratch.idge.net mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jeremy@linux-phreak.net">Jeremy Utley</ulink>
+      &lt;jeremy@linux-phreak.net&gt; &ndash; lfs.linux-phreak.net mirror</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect3">South American Mirrors</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:sysop@mesi.com.ar">Andres Meggiotto</ulink>
+      &lt;sysop@mesi.com.ar&gt; &ndash; lfs.mesi.com.ar mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:manuel@linuxfromscratch.org">Manuel
+      Canales Esparcia</ulink> &lt;manuel@linuxfromscratch.org&gt; &ndash;
+      lfsmirror.lfs-es.info mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:ebf@aedsolucoes.com.br">Eduardo B.
+      Fonseca</ulink> &lt;ebf@aedsolucoes.com.br&gt; &ndash;
+      br.linuxfromscratch.org mirror</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect3">European Mirrors</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:barna@siker.hu">Barna Koczka</ulink>
+      &lt;barna@siker.hu&gt; &ndash; hu.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="http://www.mirror.ac.uk">UK Mirror Service</ulink>
+      &ndash; linuxfromscratch.mirror.ac.uk mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:Martin.Voss@ada.de">Martin Voss</ulink>
+      &lt;Martin.Voss@ada.de&gt; &ndash; lfs.linux-matrix.net mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:guido@primerelay.net">Guido Passet</ulink>
+      &lt;guido@primerelay.net&gt; &ndash; nl.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:baafie@planet.nl">Bastiaan Jacques</ulink>
+      &lt;baafie@planet.nl&gt; &ndash; lfs.pagefault.net mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:lfs-mirror@linuxfromscratch.rave.org">Roel
+      Neefs</ulink> &lt;lfs-mirror@linuxfromscratch.rave.org&gt; &ndash;
+      linuxfromscratch.rave.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:justin@jrknierim.de">Justin Knierim</ulink>
+      &lt;justin@jrknierim.de&gt; &ndash; www.lfs-matrix.de mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:stevie@stevie20.de">Stephan Brendel</ulink>
+      &lt;stevie@stevie20.de&gt; &ndash; lfs.netservice-neuss.de mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:Antonin.Sprinzl@tuwien.ac.at">Antonin
+      Sprinzl</ulink> &lt;Antonin.Sprinzl@tuwien.ac.at&gt; &ndash;
+      at.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:fredan-lfs@fredan.org">Fredrik
+      Danerklint</ulink> &lt;fredan-lfs@fredan.org&gt; &ndash;
+      se.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:archive@doc.cs.univ-paris8.fr">Parisian
+      sysadmins</ulink> &lt;archive@doc.cs.univ-paris8.fr&gt; &ndash;
+      www2.fr.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:velin@zadnik.org">Alexander Velin</ulink>
+      &lt;velin@zadnik.org&gt; &ndash; bg.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:dirk@securewebservices.co.uk"> Dirk
+      Webster</ulink> &lt;dirk@securewebservices.co.uk&gt; &ndash;
+      lfs.securewebservices.co.uk mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:thomas@sofagang.dk">Thomas Skyt</ulink>
+      &lt;thomas@sofagang.dk&gt; &ndash; dk.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:sime@dot-sime.com">Simon Nicoll</ulink>
+      &lt;sime@dot-sime.com&gt; &ndash; uk.linuxfromscratch.org mirror</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect3">Asian Mirrors</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:pyng@spam.averse.net">Pui Yong</ulink>
+      &lt;pyng@spam.averse.net&gt; &ndash; sg.linuxfromscratch.org mirror</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:stuart@althalus.me.uk">Stuart
+      Harris</ulink> &lt;stuart@althalus.me.uk&gt; &ndash;
+      lfs.mirror.intermedia.com.sg mirror</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect3">Australian Mirrors</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:jason@dstc.edu.au">Jason Andrade</ulink>
+      &lt;jason@dstc.edu.au&gt; &ndash; au.linuxfromscratch.org mirror</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect2">Former Project Team Members</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:theladyskye@linuxfromscratch.org">Christine
+      Barczak</ulink> &lt;theladyskye@linuxfromscratch.org&gt; &ndash; LFS
+      Book Editor</para>
+    </listitem>
+
+    <listitem>
+      <para>Timothy Bauscher</para>
+    </listitem>
+
+    <listitem>
+      <para>Robert Briggs</para>
+    </listitem>
+
+    <listitem>
+      <para>Ian Chilton</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jeroen@linuxfromscratch.org">Jeroen
+      Coumans</ulink> &lt;jeroen@linuxfromscratch.org&gt; &ndash; Website
+      Developer, FAQ Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para>Alex Groenewoud &ndash; LFS Technical Writer</para>
+    </listitem>
+
+    <listitem>
+      <para>Marc Heerdink</para>
+    </listitem>
+
+    <listitem>
+      <para>Mark Hymers</para>
+    </listitem>
+
+    <listitem><para>Seth W. Klein &ndash; FAQ maintainer</para></listitem>
+
+    <listitem>
+      <para><ulink url="mailto:nicholas@linuxfromscratch.org">Nicholas
+      Leippe</ulink> &lt;nicholas@linuxfromscratch.org&gt; &ndash; Wiki
+      Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para>Simon Perreault</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:scot@linuxfromscratch.org">Scot Mc
+      Pherson</ulink> &lt;scot@linuxfromscratch.org&gt; &ndash; LFS NNTP
+      Gateway Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:semzx@newmail.ru">Alexander Patrakov</ulink>
+      &lt;semzx@newmail.ru&gt; &ndash; LFS Technical Writer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:gschafer@zip.com.au">Greg Schafer</ulink>
+      &lt;gschafer@zip.com.au&gt; &ndash; LFS Technical Writer</para>
+    </listitem>
+
+    <listitem>
+      <para>Jesse Tie-Ten-Quee &ndash; LFS Technical Writer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:jeremy@linuxfromscratch.org">Jeremy
+      Utley</ulink> &lt;jeremy@linuxfromscratch.org&gt; &ndash; LFS Technical
+      Writer, Bugzilla Maintainer, LFS-Bootscripts Maintainer</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:zwinkles@gmail.com">Zack Winkles</ulink>
+      &lt;zwinkles@gmail.com&gt; &ndash; LFS Technical Writer</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <bridgehead renderas="sect2">A very special thank you to our
+  donators</bridgehead>
+
+  <itemizedlist>
+
+    <listitem>
+      <para><ulink url="mailto:dean@vipersoft.co.uk">Dean Benson</ulink>
+      &lt;dean@vipersoft.co.uk&gt; for several monetary contributions</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="mailto:hrx@hrxnet.de">Hagen Herrschaft</ulink>
+      &lt;hrx@hrxnet.de&gt; for donating a 2.2 GHz P4 system, now running
+      under the name of Lorien</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="http://www.seocompany.ca/">SEO Company Canada</ulink>
+      supports Open Source projects and different Linux distributions</para>
+    </listitem>
+
+    <listitem>
+      <para><ulink url="http://www.vasoftware.com">VA Software</ulink> who,
+      on behalf of <ulink url="http://www.linux.com">Linux.com</ulink>,
+      donated a VA Linux 420 (former StartX SP2) workstation</para>
+    </listitem>
+
+    <listitem>
+      <para>Mark Stone for donating Belgarath, the linuxfromscratch.org
+      server</para>
+    </listitem>
+
+  </itemizedlist>
+
+</appendix>

+ 580 - 0
appendices/acronymlist.xml

@@ -0,0 +1,580 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<appendix id="appendixa" xreflabel="Appendix A">
+  <?dbhtml dir="appendices"?>
+  <?dbhtml filename="acronymlist.html"?>
+
+  <title>Acronyms and Terms</title>
+
+  <variablelist>
+    <?dbfo list-presentation="list"?>
+    <?dbhtml list-presentation="table"?>
+
+    <varlistentry>
+      <term><emphasis role="bold">ABI</emphasis></term>
+      <listitem>
+        <para>Application Binary Interface</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ALFS</emphasis></term>
+      <listitem>
+        <para>Automated Linux From Scratch</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ALSA</emphasis></term>
+      <listitem>
+        <para>Advanced Linux Sound Architecture</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">API</emphasis></term>
+      <listitem>
+        <para>Application Programming Interface</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ASCII</emphasis></term>
+      <listitem>
+        <para>American Standard Code for Information Interchange</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">BIOS</emphasis></term>
+      <listitem>
+        <para>Basic Input/Output System</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">BLFS</emphasis></term>
+      <listitem>
+        <para>Beyond Linux From Scratch</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">BSD</emphasis></term>
+      <listitem>
+        <para>Berkeley Software Distribution</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">chroot</emphasis></term>
+      <listitem>
+        <para>change root</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">CMOS</emphasis></term>
+      <listitem>
+        <para>Complementary Metal Oxide Semiconductor</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">COS</emphasis></term>
+      <listitem>
+        <para>Class Of Service</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">CPU</emphasis></term>
+      <listitem>
+        <para>Central Processing Unit</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">CRC</emphasis></term>
+      <listitem>
+        <para>Cyclic Redundancy Check</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">CVS</emphasis></term>
+      <listitem>
+        <para>Concurrent Versions System</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">DHCP</emphasis></term>
+      <listitem>
+        <para>Dynamic Host Configuration Protocol</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">DNS</emphasis></term>
+      <listitem>
+        <para>Domain Name Service</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">EGA</emphasis></term>
+      <listitem>
+        <para>Enhanced Graphics Adapter</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ELF</emphasis></term>
+      <listitem>
+        <para>Executable and Linkable Format</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">EOF</emphasis></term>
+      <listitem>
+        <para>End of File</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">EQN</emphasis></term>
+      <listitem>
+        <para>equation</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">EVMS</emphasis></term>
+      <listitem>
+        <para>Enterprise Volume Management System</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ext2</emphasis></term>
+      <listitem>
+        <para>second extended file system</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ext3</emphasis></term>
+      <listitem>
+        <para>third extended file system</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">FAQ</emphasis></term>
+      <listitem>
+        <para>Frequently Asked Questions</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">FHS</emphasis></term>
+      <listitem>
+        <para>Filesystem Hierarchy Standard</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">FIFO</emphasis></term>
+      <listitem>
+        <para>First-In, First Out</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">FQDN</emphasis></term>
+      <listitem>
+        <para>Fully Qualified Domain Name</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">FTP</emphasis></term>
+      <listitem>
+        <para>File Transfer Protocol</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">GB</emphasis></term>
+      <listitem>
+        <para>Gibabytes</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">GCC</emphasis></term>
+      <listitem>
+        <para>GNU Compiler Collection</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">GID</emphasis></term>
+      <listitem>
+        <para>Group Identifier</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">GMT</emphasis></term>
+      <listitem>
+        <para>Greenwich Mean Time</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">GPG</emphasis></term>
+      <listitem>
+        <para>GNU Privacy Guard</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">HTML</emphasis></term>
+      <listitem>
+        <para>Hypertext Markup Language</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">IDE</emphasis></term>
+      <listitem>
+        <para>Integrated Drive Electronics</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">IEEE</emphasis></term>
+      <listitem>
+        <para>Institute of Electrical and Electronic Engineers</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">IO</emphasis></term>
+      <listitem>
+        <para>Input/Output</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">IP</emphasis></term>
+      <listitem>
+        <para>Internet Protocol</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">IPC</emphasis></term>
+      <listitem>
+        <para>Inter-Process Communication</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">IRC</emphasis></term>
+      <listitem>
+        <para>Internet Relay Chat</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ISO</emphasis></term>
+      <listitem>
+        <para>International Organization for Standardization</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">ISP</emphasis></term>
+      <listitem>
+        <para>Internet Service Provider</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">KB</emphasis></term>
+      <listitem>
+        <para>Kilobytes</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">LED</emphasis></term>
+      <listitem>
+        <para>Light Emitting Diode</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">LFS</emphasis></term>
+      <listitem>
+        <para>Linux From Scratch</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">LSB</emphasis></term>
+      <listitem>
+        <para>Linux Standard Base</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">MB</emphasis></term>
+      <listitem>
+        <para>Megabytes</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">MBR</emphasis></term>
+      <listitem>
+        <para>Master Boot Record</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">MD5</emphasis></term>
+      <listitem>
+        <para>Message Digest 5</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">NIC</emphasis></term>
+      <listitem>
+        <para>Network Interface Card</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">NLS</emphasis></term>
+      <listitem>
+        <para>Native Language Support</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">NNTP</emphasis></term>
+      <listitem>
+        <para>Network News Transport Protocol</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">NPTL</emphasis></term>
+      <listitem>
+        <para>Native POSIX Threading Library</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">OSS</emphasis></term>
+      <listitem>
+        <para>Open Sound System</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">PCH</emphasis></term>
+      <listitem>
+        <para>Pre-Compiled Headers</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">PCRE</emphasis></term>
+      <listitem>
+        <para>Perl Compatible Regular Expression</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">PID</emphasis></term>
+      <listitem>
+        <para>Process Identifier</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">PLFS</emphasis></term>
+      <listitem>
+        <para>Pure Linux From Scratch</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">PTY</emphasis></term>
+      <listitem>
+        <para>pseudo terminal</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">QA</emphasis></term>
+      <listitem>
+        <para>Quality Assurance</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">QOS</emphasis></term>
+      <listitem>
+        <para>Quality Of Service</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">RAM</emphasis></term>
+      <listitem>
+        <para>Random Access Memory</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">RPC</emphasis></term>
+      <listitem>
+        <para>Remote Procedure Call</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">RTC</emphasis></term>
+      <listitem>
+        <para>Real Time Clock</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">SBU</emphasis></term>
+      <listitem>
+        <para>Standard Build Unit</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">SCO</emphasis></term>
+      <listitem>
+        <para>The Santa Cruz Operation</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">SGR</emphasis></term>
+      <listitem>
+        <para>Select Graphic Rendition</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">SHA1</emphasis></term>
+      <listitem>
+        <para>Secure-Hash Algorithm 1</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">SMP</emphasis></term>
+      <listitem>
+        <para>Symmetric Multi-Processor</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">TLDP</emphasis></term>
+      <listitem>
+        <para>The Linux Documentation Project</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">TFTP</emphasis></term>
+      <listitem>
+        <para>Trivial File Transfer Protocol</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">TLS</emphasis></term>
+      <listitem>
+        <para>Thread-Local Storage</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">UID</emphasis></term>
+      <listitem>
+        <para>User Identifier</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">umask</emphasis></term>
+      <listitem>
+        <para>user file-creation mask</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">USB</emphasis></term>
+      <listitem>
+        <para>Universal Serial Bus</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">UTC</emphasis></term>
+      <listitem>
+        <para>Coordinated Universal Time</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">UUID</emphasis></term>
+      <listitem>
+        <para>Universally Unique Identifier</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">VC</emphasis></term>
+      <listitem>
+        <para>Virtual Console</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">VGA</emphasis></term>
+      <listitem>
+        <para>Video Graphics Array</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><emphasis role="bold">VT</emphasis></term>
+      <listitem>
+        <para>Virtual Terminal</para>
+      </listitem>
+    </varlistentry>
+
+  </variablelist>
+
+</appendix>

+ 1481 - 0
appendices/dependencies.xml

@@ -0,0 +1,1481 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE appendix PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<appendix id="appendixc" xreflabel="Appendix C">
+  <?dbhtml dir="appendices"?>
+  <?dbhtml filename="dependencies.html"?>
+
+  <title>Dependencies</title>
+
+  <para>Every package built in LFS relies on one or more other packages
+  in order to build and install properly. Some packages even participate
+  in circular dependencies, that is, the first package depends on the second
+  which in turn depends on the first. Because of these dependencies, the
+  order in which packages are built in LFS is very important. The purpose
+  of this page is to document the dependencies of each package built in LFS.</para>
+
+  <para>For each package we build, we have listed three types of dependencies.
+  The first lists what other packages need to be available in order to compile
+  and install the package in question. The second lists what packages, in
+  addition to those on the first list, need to be available in order to run the
+  testsuites. The last list of dependencies are packages that require this
+  package to be built and installed in its final location before they are built
+  and installed. In most cases, this is because these packages will hardcode
+  paths to binaries within their scripts. If not built in a certain order,
+  this could result in paths of /tools/bin/[binary] being placed inside
+  scripts installed to the final system. This is obviously not desirable.
+  </para>
+
+<!-- Begin Autoconf dependency info -->
+  <bridgehead renderas="sect2" id="autoconf-dep">Autoconf</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+          <seg>Bash, Coreutils, Grep, M4, Make, Perl, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Automake, Diffutils, Findutils, GCC, and Libtool</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Automake</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Automake dependency info -->
+  <bridgehead renderas="sect2" id="automake-dep">Automake</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+          <seg>Autoconf, Bash, Coreutils, Gettext, Grep, M4, Make, Perl,
+          Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Binutils, Bison, Bzip2, DejaGNU, Diffutils, Expect, Findutils,
+          Flex, GCC, Gettext, Gzip, Libtool, and Tar. Can also use several
+          other packages that are not installed in LFS.</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Bash dependency info -->
+  <bridgehead renderas="sect2" id="bash-dep">Bash</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+          <seg>Bash, Bison, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+	  Ncurses, Patch, Readline, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Berkeley DB dependency info -->
+  <bridgehead renderas="sect2" id="bdb-dep">Berkeley DB</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+         Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Not run. Requires TCL installed on the final system</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Binutils dependency info -->
+  <bridgehead renderas="sect2" id="binutils-dep">Binutils</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
+         Make, Perl, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>DejaGNU and Expect</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Bison dependency info -->
+  <bridgehead renderas="sect2" id="bison-dep">Bison</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc,
+         Grep, M4, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils and Findutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Flex, Kbd, and Tar</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Bzip2 dependency info -->
+  <bridgehead renderas="sect2" id="bzip2-dep">Bzip2</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Make,
+         and Patch</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Coreutils dependency info -->
+  <bridgehead renderas="sect2" id="coreutils-dep">Coreutils</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+         Patch, Perl, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Bash, Diffutils, Findutils, Man-DB, and Udev</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin DejaGNU dependency info -->
+  <bridgehead renderas="sect2" id="dejagnu-dep">DejaGNU</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Coreutils, Diffutils, GCC, Grep, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Diffutils dependency info -->
+  <bridgehead renderas="sect2" id="diffutils-dep">Diffutils</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
+	 Make, Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Expect dependency info -->
+  <bridgehead renderas="sect2" id="expect-dep">Expect</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+         Patch, Sed, and Tcl</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin E2fsprogs dependency info -->
+  <bridgehead renderas="sect2" id="e2fsprogs-dep">E2fsprogs</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Gawk, GCC, Gettext, Glibc, Grep, Gzip,
+         Make, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Util-Linux</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin File dependency info -->
+  <bridgehead renderas="sect2" id="file-dep">File</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+	 Make, Sed, and Zlib</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Findutils dependency info -->
+  <bridgehead renderas="sect2" id="findutils-dep">Findutils</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+         Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>DejaGNU, Diffutils, and Expect</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Flex dependency info -->
+  <bridgehead renderas="sect2" id="flex-dep">Flex</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, M4, Make,
+         Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Bison and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>IPRoute2, Kbd, and Man-DB</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Gawk dependency info -->
+  <bridgehead renderas="sect2" id="gawk-dep">Gawk</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+         Patch, Sed and, Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Gcc dependency info -->
+  <bridgehead renderas="sect2" id="gcc-dep">Gcc</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC,
+         Gettext, Glibc, Grep, Make, Patch, Perl, Sed, Tar, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>DejaGNU and Expect</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Gettext dependency info -->
+  <bridgehead renderas="sect2" id="gettext-dep">Gettext</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Gawk, GCC, Glibc, Grep, Make,
+         Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils, Perl, and Tcl</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Automake</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Glibc dependency info -->
+  <bridgehead renderas="sect2" id="glibc-dep">Glibc</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Gettext,
+         Grep, Gzip, Make, Perl, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Grep dependency info -->
+  <bridgehead renderas="sect2" id="grep-dep">Grep</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Make,
+         Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Man-DB</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Groff dependency info -->
+  <bridgehead renderas="sect2" id="groff-dep">Groff</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Bison, Coreutils,  Gawk, GCC, Glibc, Grep, Make,
+         Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Man-DB and Perl</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin GRUB dependency info -->
+  <bridgehead renderas="sect2" id="grub-dep">GRUB</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+         Ncurses, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Gzip dependency info -->
+  <bridgehead renderas="sect2" id="gzip-dep">Gzip</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+         Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Man-DB</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Iana-Etc dependency info -->
+  <bridgehead renderas="sect2" id="iana-etc-dep">Iana-Etc</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Coreutils, Gawk, and Make</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Perl</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Inetutils dependency info -->
+  <bridgehead renderas="sect2" id="inetutils-dep">Inetutils</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses,
+         Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Tar</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin IProute2 dependency info -->
+  <bridgehead renderas="sect2" id="iproute2-dep">IProute2</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Berkeley DB, Bison, Coreutils, Flex, GCC, Glibc, Make,
+         and Linux-Libc-Headers</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Kbd dependency info -->
+  <bridgehead renderas="sect2" id="kbd-dep">Kbd</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Bison, Coreutils, Flex, GCC, Gettext, Glibc,
+         Gzip, Make, Patch, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Less dependency info -->
+  <bridgehead renderas="sect2" id="less-dep">Less</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+         Ncurses, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Libtool dependency info -->
+  <bridgehead renderas="sect2" id="libtool-dep">Libtool</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+         Make, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Findutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Linux Kernel dependency info -->
+  <bridgehead renderas="sect2" id="linux-dep">Linux Kernel</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, GCC, Glibc, Grep,
+         Gzip, Make, Module-Init-Tools, Ncurses, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin M4 dependency info -->
+  <bridgehead renderas="sect2" id="m4-dep">M4</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Autoconf and Bison</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Man-DB dependency info -->
+  <bridgehead renderas="sect2" id="man-db-dep">Man-DB</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Berkeley DB, Binutils, Bzip2, Coreutils, Flex, GCC, Gettext,
+         Glibc, Grep, Groff, Gzip, Less, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Not run. Requires Man-DB testsuite package</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Make dependency info -->
+  <bridgehead renderas="sect2" id="make-dep">Make</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Gettext, Glibc, Grep,
+         Make, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Perl</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Mktemp dependency info -->
+  <bridgehead renderas="sect2" id="mktemp-dep">Mktemp</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Patch, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Module-Init-Tools dependency info -->
+  <bridgehead renderas="sect2" id="module-init-tools-dep">Module-Init-Tools</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Sed,
+         and Zlib</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>File, Findutils, and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Ncurses dependency info -->
+  <bridgehead renderas="sect2" id="ncurses-dep">Ncurses</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Gawk, GCC, Glibc, Grep,
+         Make, Patch, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Bash, GRUB, Inetutils, Less, Procps, Psmisc, Readline, Texinfo,
+          Util-Linux, and Vim</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Patch dependency info -->
+  <bridgehead renderas="sect2" id="patch-dep">Patch</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Perl dependency info -->
+  <bridgehead renderas="sect2" id="perl-dep">Perl</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Berkeley DB, Binutils, Coreutils, Gawk, GCC, Glibc, Grep,
+         Groff, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Iana-Etc and Procps</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Autoconf</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Procps dependency info -->
+  <bridgehead renderas="sect2" id="procps-dep">Procps</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Make, and Ncurses</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Psmisc dependency info -->
+  <bridgehead renderas="sect2" id="psmisc-dep">Psmisc</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Coreutils, GCC, Gettext, Glibc, Grep, Make, Ncurses,
+         and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Readline dependency info -->
+  <bridgehead renderas="sect2" id="readline-dep">Readline</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, Ncurses,
+         Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>Bash</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Sed dependency info -->
+  <bridgehead renderas="sect2" id="sed-dep">Sed</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+         Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>E2fsprogs, File, Libtool, and Shadow</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Shadow dependency info -->
+  <bridgehead renderas="sect2" id="shadow-dep">Shadow</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, Findutils, Gawk, GCC,
+         Gettext, Glibc, Grep, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Sysklogd dependency info -->
+  <bridgehead renderas="sect2" id="sysklogd-dep">Sysklogd</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Binutils, Coreutils, GCC, Glibc, Make, and Patch</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Sysvinit dependency info -->
+  <bridgehead renderas="sect2" id="sysvinit-dep">Sysvinit</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Tar dependency info -->
+  <bridgehead renderas="sect2" id="tar-dep">Tar</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Bison, Coreutils, GCC, Gettext, Glibc,
+         Grep, Inetutils, Make, Patch, Sed, and Texinfo</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Diffutils, Findutils, and Gawk</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Tcl dependency info -->
+  <bridgehead renderas="sect2" id="tcl-dep">Tcl</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep,
+         Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Texinfo dependency info -->
+  <bridgehead renderas="sect2" id="texinfo-dep">Texinfo</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Gettext, Glibc, Grep, Make,
+         Ncurses, Patch, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Udev dependency info -->
+  <bridgehead renderas="sect2" id="udev-dep">Udev</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Binutils, Coreutils, GCC, Glibc, and Make</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>Findutils, Perl, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Util-Linux dependency info -->
+  <bridgehead renderas="sect2" id="util-linux-dep">Util-Linux</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, E2fprogs, GCC, Gettext, Glibc, Grep,
+         Make, Ncurses, Patch, Sed, and Zlib</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>No testsuite available</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Vim dependency info -->
+  <bridgehead renderas="sect2" id="vim-dep">Vim</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, Diffutils, GCC, Glibc, Grep, Make,
+         Ncurses, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+<!-- Begin Zlib dependency info -->
+  <bridgehead renderas="sect2" id="zlib-dep">Zlib</bridgehead>
+
+      <segmentedlist>
+        <segtitle>&dependencies;</segtitle>
+
+        <seglistitem>
+         <seg>Bash, Binutils, Coreutils, GCC, Glibc, Grep, Make, and Sed</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&testsuites;</segtitle>
+
+        <seglistitem>
+          <seg>None</seg>
+        </seglistitem>
+      </segmentedlist>
+
+      <segmentedlist>
+        <segtitle>&before;</segtitle>
+
+        <seglistitem>
+          <seg>File, Module-Init-Tools, and Util-Linux</seg>
+        </seglistitem>
+      </segmentedlist>
+
+</appendix>

+ 126 - 0
chapter01/askforhelp.xml

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-intro-askforhelp">
+  <?dbhtml filename="askforhelp.html"?>
+
+  <title>Help</title>
+
+  <para>If an issue or a question is encountered while working through
+  this book, check the FAQ page at <ulink url="&faq-root;#generalfaq"/>.
+  Questions are often already answered there. If your question is not
+  answered on this page, try to find the source of the problem. The
+  following hint will give you some guidance for troubleshooting:
+  <ulink url="&hints-root;errors.txt"/>.</para>
+
+  <para>If you cannot find your problem listed in the FAQ, search the mailing
+  lists at <ulink url="&lfs-root;search.html"/>.</para>
+
+  <para>We also have a wonderful LFS community that is willing to offer
+  assistance through the mailing lists and IRC (see the <xref
+  linkend="ch-intro-resources"/> section of this book). However,
+  we get several support questions every day and many of them can be easily
+  answered by going to the FAQ and by searching the mailing lists first.
+  So, for us to offer the best assistance possible, you need to do some
+  research on your own first. That allows us to focus on the more unusual
+  support needs. If your searches do not produce a solution, please include
+  all relevant information (mentioned below) in your request for help.</para>
+
+  <sect2>
+    <title>Things to Mention</title>
+
+    <para>Apart from a brief explanation of the problem being experienced,
+    the essential things to include in any request for help are:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>The version of the book being used (in this case &version;)</para>
+      </listitem>
+      <listitem>
+        <para>The host distribution and version being used to create LFS</para>
+      </listitem>
+      <listitem>
+        <para>The package or section the problem was encountered in</para>
+      </listitem>
+      <listitem>
+        <para>The exact error message or symptom being received</para>
+      </listitem>
+      <listitem>
+        <para>Note whether you have deviated from the book at all </para>
+      </listitem>
+    </itemizedlist>
+
+    <note>
+      <para>Deviating from this book does <emphasis>not</emphasis> mean that
+      we will not help you. After all, LFS is about personal preference.
+      Being upfront about any changes to the established procedure helps us
+      evaluate and determine possible causes of your problem.</para>
+    </note>
+
+  </sect2>
+
+  <sect2>
+    <title>Configure Script Problems</title>
+
+    <para>If something goes wrong while running the <command>configure</command>
+    script, review the <filename>config.log</filename> file. This file may
+    contain errors encountered during <command>configure</command> which were
+    not printed to the screen. Include the <emphasis>relevant</emphasis> lines
+    if you need to ask for help.</para>
+
+  </sect2>
+
+  <sect2>
+    <title>Compilation Problems</title>
+
+    <para>Both the screen output and the contents of various files are useful
+    in determining the cause of compilation problems. The screen output from
+    the <command>configure</command> script and the <command>make</command>
+    run can be helpful. It is not necessary to include the entire output, but
+    do include enough of the relevant information. Below is an example of the
+    type of information to include from the screen output from
+    <command>make</command>:</para>
+
+<screen><computeroutput>gcc -DALIASPATH=\"/mnt/lfs/usr/share/locale:.\"
+-DLOCALEDIR=\"/mnt/lfs/usr/share/locale\"
+-DLIBDIR=\"/mnt/lfs/usr/lib\"
+-DINCLUDEDIR=\"/mnt/lfs/usr/include\" -DHAVE_CONFIG_H -I. -I.
+-g -O2 -c getopt1.c
+gcc -g -O2 -static -o make ar.o arscan.o commands.o dir.o
+expand.o file.o function.o getopt.o implicit.o job.o main.o
+misc.o read.o remake.o rule.o signame.o variable.o vpath.o
+default.o remote-stub.o version.o opt1.o
+-lutil job.o: In function `load_too_high':
+/lfs/tmp/make-3.79.1/job.c:1565: undefined reference
+to `getloadavg'
+collect2: ld returned 1 exit status
+make[2]: *** [make] Error 1
+make[2]: Leaving directory `/lfs/tmp/make-3.79.1'
+make[1]: *** [all-recursive] Error 1
+make[1]: Leaving directory `/lfs/tmp/make-3.79.1'
+make: *** [all-recursive-am] Error 2</computeroutput></screen>
+
+    <para>In this case, many people would just include the bottom
+    section:</para>
+
+<screen><computeroutput>make [2]: *** [make] Error 1</computeroutput></screen>
+
+    <para>This is not enough information to properly diagnose the problem
+    because it only notes that something went wrong, not
+    <emphasis>what</emphasis> went wrong. The entire section, as in the
+    example above, is what should be saved because it includes the command
+    that was executed and the associated error message(s).</para>
+
+    <para>An excellent article about asking for help on the Internet is
+    available online at <ulink
+    url="http://catb.org/~esr/faqs/smart-questions.html"/>. Read and
+    follow the hints in this document to increase the likelihood of getting
+    the help you need.</para>
+
+  </sect2>
+
+</sect1>

+ 2330 - 0
chapter01/changelog.xml

@@ -0,0 +1,2330 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-scatter-changelog">
+  <?dbhtml filename="changelog.html"?>
+
+  <title>Changelog</title>
+
+  <para>This is version &version; of the Linux From Scratch book, dated
+  &releasedate;. If this book is more than six months old, a newer and better
+  version is probably already available. To find out, please check one of the
+  mirrors via <ulink url="&lfs-root;mirrors.html"/>.</para>
+
+  <para>Below is a list of changes made since the previous release of the
+  book.</para>
+
+  <itemizedlist>
+    <title>Changelog Entries:</title>
+
+<!-- Changelog template
+
+    <listitem>
+      <para>Date</para>
+      <itemizedlist>
+        <listitem>
+          <para>[name] - New changelog entry.</para>
+        </listitem>
+        <listitem>
+          <para>[name] - Previous changelog entry.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+-->
+    <listitem>
+      <para>July 15, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Added a patch to module-init-tools to
+          correct a possible problem when aliesa are specified with
+          regular expressions.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Updated the kernel to version 2.6.16.26.
+          </para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Added sed to correct path to the find
+          program in updatedb after moving find to /bin.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Updated text concerning test failures in 
+          glibc to describe the most recent results.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 13, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Moved the executables: nice, find, kbd_mode,
+          openvt, and setfont to /bin to support boot scripts.
+          Added --datadir=/lib/kbd to kbd's configure so that keyboard 
+          data will always be on the root partition.
+          </para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Updated text in section 7.9 (The Bash 
+          Shell Startup Files) to better explain the Xlib example.
+          </para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 12, 20006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Updated to man-pages-2.34.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Updated to e2fsprogs-1.39.</para>
+        </listitem>
+        <listitem>
+          <para>[dnicholson] - Changed text explaining the installation
+          of the udev-config rules. Thanks to Matthew Burgess.</para>
+        </listitem>
+        <listitem>
+          <para>[dnicholson] - Various fixes and additions for examples
+          of custom rules in Udev courtesy of Alexander Patrakov. Added
+          the "Creating custom symlinks" page which includes examples
+          of creating persistent device symlinks, including CD-ROMs. Added
+          a second set of guidelines for creating persistent symlinks for
+          network cards. Other text touch ups on the configuration pages
+          involving Udev. Closes ticket #1818.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Updated udev-config and bootscripts download
+          location.</para>
+        </listitem>
+        <listitem>
+          <para>[dnicholson] - Added commands to create the vi to vim
+          man page symlink in all available languages. Closes ticket
+          #1811. Thanks to Alexander Patrakov.</para>
+        </listitem>
+        <listitem>
+          <para>[dnicholson] - Updated to udev-096 and udev-config-20060712.
+          Removed the bug.c program and the cd symlinks script. The cd
+          symlinks will be covered in Chapter 7. Closes ticket #1804. Thanks
+          to Alexander Patrakov for making the appropriate changes in the
+          Udev rules.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 11, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[bdubbs] - Changed url for the SBU pages to a generic 
+          location.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Added clarifying text to section 7.9 concerning 
+          charmap specifications.  Thanks to Dan Nicholson.
+          Closes ticket #1813.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Moved text in section 5.7 "Adjusting the Toolchain"
+          referencing TCL out of the caution and into its own note so it does not
+          get included later in gcc-pass2.
+          Closes ticket #1822.</para>
+        </listitem>
+        <listitem>
+          <para>[bdubbs] - Updated the kernel to version 2.6.16.24.
+          Closes ticket #1808.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 10, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[dnicholson] - Specified the full path to
+          <command>modprobe</command> in the example modprobe rule.
+          Closes ticket #1812.</para>
+        </listitem>
+        <listitem>
+          <para>[dnicholson] - Remove the
+          <command>locale country</command> command from the heuristic to
+          determine the locale in the Bash Shell Startup Files since it
+          doesn't produce results in all locales.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 7, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt] - Updated module-init-tools download information as it
+          has a new maintainer.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>June 10, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken] - Added <command>gettext.sh</command> to list of programs
+	  installed by gettext, similarly <command>nologin</command> for shadow,
+	  <command>grub-set-default</command> for grub, <command>enc2xs</command>
+	  and <command>instmodsh</command> for perl, <command>slabtop</command>
+	  for procps, <command>flock</command> and <command>tailf</command> for
+	  util-linux, <command>bootlogd</command> for sysvinit, <command>manpath
+	  </command>for man-db, <command>filefrag</command> for e2fsprogs.
+	  Thanks to Chris Staub for the patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 31, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to Linux-2.6.16.19.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Man-pages-2.33.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Bison-2.2.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Coreutils-5.96.</para>
+        </listitem>
+        <listitem>
+          <para>[gerard] - Added <command>tee</command> to chapter 6's Glibc
+          <command>make check</command> so the output can be seen on screen
+          as well as captured in the log file.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 30, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Removed an out of date comment regarding having to
+          run <command>pwconv</command> to reset passwords after enabling
+          password shadowing.  Thanks to Chris Staub for the report.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Removed <command>getunimap</command>,
+          <command>setlogons</command>, and <command>setvesablank</command> from
+          the list of programs installed by kbd.  Thanks to Chris Staub for the
+          patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 30, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Removed <command>swapdev</command> from the list of
+            files installed by util-linux.  Thanks to Chris Staub for the patch.
+          </para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 27, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Remove the 'refer back's in the gcc-pass2 and
+          chapter06/gcc pages. Better organizes the commands and data so that
+	  the flow of the book is not lost.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Add a note about installing spell files for
+          Vim in a language other than English.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Correct Vim's installation of man pages to work
+          well with Man-DB. Patch from Alexander Patrakov and Ag Hatzim.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 26, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Some version corrections in the vim page.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 25, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Updated to Vim-7.0. Fixes #1793.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Fixed generation of diff's man page.
+	  Thanks Randy McMurchy for the report and Ken Moffat for the fix.
+	  Fixes #1800.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 22, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim] - Fixed a constant support question asked in #IRC and
+ 	  the mailing lists about shadow's additional sed command
+	  for cracklib. Using a complete sed command instead.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 15, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated to udev-config-20060515. This adds the rule
+          to create /dev/usb nodes as well as making the rules files slightly
+          more modular by reorganizing which rules go to which files. This is a
+          very minor update.</para>
+        </listitem>
+       <listitem>
+          <para>[archaic] - Updated to man-pages-2.32.</para>
+        </listitem>
+         <listitem>
+          <para>[archaic] - Updated to udev-092.</para>
+        </listitem>
+     </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 14, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Updated SBU and disk usage values.</para>
+        </listitem>
+        <listitem>
+          <para>[manuel] - Created packages.ent. Moved data about packages
+          to packages.ent as entities.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 12, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated to linux-2.6.16.16.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 9, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Updated packages and patches sizes.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 8, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Made the directory tree creation more concise and
+          removed the extraneous /opt/* hierarchy (it is not required by
+          FHS). Closes ticket #1656.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 7, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated to linux-2.6.16.14.</para>
+        </listitem>
+        <listitem>
+          <para>[ken] - Use ext3 filesystem instead of ext2.
+	  Resolves ticket #1792.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 6, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Added MD5 sums for packages and patches.
+	  Resolves ticket #1788.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 3, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Upgraded to linux-2.6.16.13.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Updated stripping notes to reflect current
+          findings. Resolves ticket #1657.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Updated the bug.c code to avoid USB-related uevent
+          leakage reports.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 2, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Fixed sanity checks to work after final GCC
+          and changed their format. Resolves ticket #1768.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Removed mention of usbfs from the fstab page since
+          it is already covered in BLFS.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Updated to man-pages-2.31.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Updated to iana-etc-2.10.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Updated to tcl8.4.13.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 1, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Added two seds to avoid symlink problems with
+          Readline during reinstallation. Thanks to Dan and Manuel for the fix
+          and for testing. Fixes ticket #1770.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Fixed issue where module-init-tools would not
+          re-install its binaries.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Updated to linux-2.6.16.11.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Updated to udev-091. Moved to a tarball-based set of
+          udev rules. Updated the bootscripts to support the new udevsettle
+          program.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 27, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Added SEO Company Canada to donators
+          acknowledgements.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 23, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Fixed command to change $LFS/tools
+          ownership. Resolves ticket #1780.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 22, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Revised again the Host System Requirements page
+          wording and look. Thanks to Bruce Dubbs for the patch. Resolves
+          ticket #1779.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 21, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Added commands to determine the version of the
+          required packages installed on the host. Thanks to Bruce Dubbs
+          for the commands list and Randy McMurchy for reviewing the
+          wording.</para>
+        </listitem>
+        <listitem>
+          <para>[manuel] - Alphabetized patches list. Thanks to Justin
+          R. Knierim for the patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 20, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Updated bash to 3.1.17 via an updated patch.
+          Resolves Ticket 1775.</para>
+        </listitem>
+        <listitem>
+          <para>[manuel] - Reworded why a 2.6 kernel compiled with GCC-3
+          is required on the host system.</para>
+        </listitem>
+        <listitem>
+          <para>[manuel] - Revised dependencies info. Thanks to Chris Staub
+          for the patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 19, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Added a more detailed list of minimum
+          software requirements. Thanks to Chris Staub for researching these
+          and Alexander Patrakov for suggesting the enhancement.
+          Resolves Ticket 1598.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 18, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Moved all dependency information to a new page,
+          Appendix C. Appendix C also contains information concerning the
+          build order. While there might need to be a few tweaks yet, this
+          information is complete enough at this point to close out the
+          long-standing ticket #684. Many thanks to Chris Staub, Dan Nicholson
+          and Manuel Canales Esparcia for helping get this finished.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 15, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated to lfs-bootscripts-20060415.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Added patch to glibc to fix build errors in packages
+          that include linux/types.h after sys/kd.h.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 14, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken] - Add security patch for tar to address CVE-2006-0300.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Upgraded to man-pages-2.29 and linux-2.6.16.5. No
+          command changes.</para>
+        </listitem>
+        <listitem>
+          <para>[manuel] - Changed typography conventions. From now,
+          replaceable text is encapsulated inside &lt; &gt;, optional text
+          inside [ ], and library extensions inside { }. Thanks to
+          Bruce Dubbs for the patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 13, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Removed boot logging rule from /etc/syslog.conf and
+          removed the command to move logger to /bin.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Added symlink from vim.1 to vi.1.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Added chgpasswd to the list of installed files for
+          Shadow.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Merged the udev_update branch to trunk.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 12, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Rewrote section explaining IP Addresses.
+          Thanks Bryan Kadzban and Bruce Dubbs. Resolves Ticket 1663.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Added a pointer to GDBM in Berkeley DB page.
+          Also added explanatory text concerning why LFS chose Debian's
+          convention for storing man pages. Thanks to Tushar Teredesai and
+          Alexander Patrakov. Resolves Ticket 1694.</para>
+        </listitem>
+       <listitem>
+          <para>[jhuntwork] - Remove symlink of zsoelim to groff's soelim
+          in chapter 6. Man-DB produces a sufficient zsoelim which overwrites
+          the symlink we used to create.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 11, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Updated bash-3.1 patch. (Ticket 1758)</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 8, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Added a command to create an empty /etc/mtab file early
+          in chapter 6. This avoids testsuite failures in e2fsprogs and possibly other
+          programs that expect /etc/mtab to be present. Explanation from Dan Nicholson,
+          slightly modified. Also merged the 'Creating Essential Symlinks' section with
+          'Creating passwd, group and log Files'.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 6, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Placed home page (when available) and full download
+          links for all packages in chapter03/packages.xml.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Merged alphabetical branch to trunk.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 2, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Moved the chowning of /tools to the end of chapter 5
+          and rewrote note about backing up or re-using /tools. Moved the
+          mounting of kernel filesystems before the package management page and
+          rewrote the page to mount --bind /dev and mount all other kernel
+          filesystems while outside chroot. Rewrote note about re-entering
+          chroot and remounting kernel filesystems. Removed /dev from the list
+          of dirs created in chroot and added it before chroot.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 30, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken] - Correct my erroneous comment about UTF-8 locales in
+          Man-DB.  Thanks to Alexander for explaining it.</para>
+        </listitem>
+        <listitem>
+          <para>[ken] - upgraded to Linux-2.6.16.1, Iproute2-2.6.16-060323,
+          and Udev-088.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 29, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken] - Upgrade to shadow-4.0.15 and add convert-mans script
+          to convert its UTF-8 man pages.  Thanks to Alexander and Archaic for
+          the script and commands.  Fixes tickets #1748 and #1750.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+     <listitem>
+      <para>March 22, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated to
+          lfs-bootscripts-udev_update-20060321.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+   <listitem>
+      <para>March 21, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Updated the bootscripts. Removed references to
+          hotplug and the bootscripts udev patch. Removed reference to
+          udevstart. Added text and commands for generating Udev bug reports.
+          </para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 18, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Do not run configure manually for iproute2 as it
+          is run automatically by the Makefile.  Thanks to Chris Staub for the
+          patch.  Fixes ticket #1734.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Make bzdiff use mktemp instead of the deprecated
+          tempfile command.  Thanks to Chris Staub for the patch.  Fixes ticket
+          #1713.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to flex-2.5.33.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to readline-5.1.004.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to bash-3.1.014.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to psmisc-22.2.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to file-4.17.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Use updated version of the coreutils suppression
+          patch to prevent coreutils version of the su man page from being
+          installed.  Fixes #1690.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 11, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to GCC 4.0.3.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 8, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to Man-pages 2.25.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Remove an example of poor Udev support as it
+          does not apply to the kernel used in the book. Thanks to Alexander
+          Patrakov.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Linux 2.6.15.6.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to udev-087.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Udev's run_program rules require a null device to be
+          present at an early stage, so create one in /lib/udev/devices.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 7, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Update Udev rules file to load SCSI modules and
+          upload firmware to devices that need it.  Improve explanations of
+          device and module handling.  Thanks to Alexander Patrakov.</para>
+        </listitem>
+        <listitem>
+          <para>[archaic] - Replaced the debian-specific groff patch with an
+          LFS-style patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 3, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[gerard] - Remove -D_GNU_SOURCE from chapter 5 - Patch. Thanks
+          to Dan Nicholson for the patch.</para>
+        </listitem>
+     </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>March 1, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - Create the Udev directories before creating the
+          symlinks.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Added a description of perl configure flags that
+          help perl deal with a lack of groff. Thanks Dan Nicholson.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 27, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic] - New bash fixes patch adds patch 011 from Bash
+          upstream. Bash patch 010 broke quoting in certain situations.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 20, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Use non-deprecated format for accessing MODALIAS
+          keys in the Udev rules file, and prevent the &quot;$&quot; from being
+          expanded by the shell.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Add patches 009 and 010 from Bash upstream.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Man-pages 2.24.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 19, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade Perl libc patch to prevent Perl from trying
+          to find headers on the host system. Fixes bug 1695.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Expand the Udev module handling rule to run for
+          every subsystem, not just USB.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Linux 2.6.15.4.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Udev 085.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Install Sed's HTML documentation by using
+          --enable-html instead of editing the Makefile.  Thanks to Greg Schafer
+          for the report and the fix.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Add upstream fixes 001-002 for Readline.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Add upstream fixes 001-008 for Bash.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Sed 4.1.5.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Man-pages 2.23.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Coreutils-5.94.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to DB-4.4.20.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Perl-5.8.8, removing the now unneeded
+          vulnerability and DB module patches.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Add the verbose parameter to a couple of commands in
+          Linux-Libc-Headers and DB.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Create udev specific directories in udev's
+          instructions instead of the more generic creatingdirs.xml.  Add
+          &quot;pts&quot; and &quot;shm&quot; directories to
+          <filename class="directory">/lib/udev/devices</filename> so that they
+          can be mounted successfully at boot time.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 10, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel] - Finished the XML indentation plus few tags
+          changes.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 8, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Rewrite the majority of chapter07/udev.xml to
+          reflect the new configuration for handling dynamic device naming and
+          module loading.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 3, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Create the
+          <filename class="directory">/lib/firmware</filename> directory that
+          can be used by Udev's <command>firmware_helper</command> utility.
+          </para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Add descriptions of Udev's helper binaries.</para>
+        </listitem>
+        <listitem>
+          <para>[manuel] - Add udev bootscript patch to whatsnew. Removed
+          hotplug from list of packages to download.</para>
+        </listitem>
+        <listitem>
+          <para>[ken] - Add udev bootscript patch to list of patches to
+          download.</para>
+        </listitem>
+        <listitem>
+          <para>[ken] - Correct the size of the udev tarball.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>February 2, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to Udev-084 and build all its extras to
+          enable custom rules to be written more easily.  Also, change the
+          rules file to handle kernel module loading and patch the udev
+          bootscript to work with this version of udev.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Remove the hotplug package and related bootscript.
+          Udev will now handle device creation and module loading.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Linux-2.6.15.2.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 30, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Adjust binutils-pass1 so we don't need to hang
+          on to its source directories. Also use 'gcc -dumpmachine' instead
+          of the MACHTYPE var.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Various textual corrections. Thanks Chris
+          Staub.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Remove unnecessary LDFLAGS variables in binutils
+          pass 1 and 2. Thanks Dan Nicholson.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 29, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Restore the use of *startfile_prefix_spec.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Remove a spurious -i from the perl command when
+          readjusting the toolchain. Thanks Dan Nicholson.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 26, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Modify chapter 6 Glibc's make install command to
+          allow test-installation.pl to run.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Adjust chapter 5 binutils to build a static ld-new
+          for use in the chapter 6 readjusting section. Also add some extended
+          sanity checks. These fixes are adapted from DIY-Linux and Greg Schafer.
+          Thanks to Dan Nicholson for the report, as well.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Added 'nodump' to commands in the Package Management
+          section.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 25, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Remove ppc specific instructions from chapter 6
+          patch. Cross-LFS can handle non-x86 arch specifics at this point.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Fix chapter 6 Glibc's test-installation.pl to test
+          the correct Glibc. Fixes bug 1675. Thanks to Dan Nicholson for the report
+          and Greg Schafer for the fix.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork] - Fixed the re-adjusting of the toolchain in chapter
+          6 so that chapter 6 GCC and Binutils links against the proper Glibc and
+          so that we don't have to keep the binutils directories from chapter 5.
+          Also moved a note about saving the /tools directory to the beginning of
+          chapter 6. Fixes bug 1677. Thanks to Chris Staub, Alexander Patrakov,
+          Greg Schafer and Tushar Teredesai for reporting and resolving this
+          issue.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade coreutils i18n patch to version 2 to fix
+          <command>sort -n</command> and add the en_US.UTF-8 locale to improve
+          coreutils' test coverage.  Fixes bugs 1688 and 1689.  Thanks to
+          Alexander Patrakov.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Add information about package management.  Thanks to
+          the BLFS project for the text.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 24, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to Groff-1.18.1.1-11.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 23, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matthew] - Upgrade to Man-pages 2.21.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Psmisc 22.1.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Upgrade to Shadow 4.0.14.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Install documentation for the Linux kernel.  Thanks
+          to Tushar for the report.  Fixes bug 1683.</para>
+        </listitem>
+        <listitem>
+          <para>[matthew] - Added a patch to enable Perl's DB_File module to
+          compile with the latest version of Berkeley DB.  Thanks to Alexander
+          Patrakov for the patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 20, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Added a patch to fix the sprintf security
+          vulnerability in Perl. Thanks to Tim van der Molen for pointing
+          it out.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 17, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork] - Fixed locale generation for French UTF-8. Thanks
+          to Dan McGhee for the report and Alexander Patrakov for the fix.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 10, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken]: Define YYENABLE_NLS in bison, to resolve a code
+          difference shown up by Iterative Comparison Analysis. Thanks
+          to Greg Schafer.</para>
+        </listitem>
+        <listitem>
+          <para>[ken]: Revert my move of mktemp and add a sed to correct
+          gccbug.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 7, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken]: Alter the Perl instructions to always create an
+          /etc/hosts file. This fixes a potential difference in the
+          'hostcat' recorded in Config_heavy.pl.  Thanks to Bryan Kadzban
+          for explaining this.</para>
+        </listitem>
+        <listitem>
+          <para>[ken]: Move grep ahead of libtool, so that the latter
+          will correctly reference /bin/grep in references to EGREP.</para>
+        </listitem>
+        <listitem>
+          <para>[ken]: Move mktemp ahead of gcc so that gccbug will
+          use mktemp.</para>
+        </listitem>
+        <listitem>
+          <para>[ken]: Give Berkeley DB its full name, and remove the
+          '-lpthread' overrides.  Also add pointer to BLFS, thanks to
+          Randy McMurchy.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 5, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Remove mention of news server until we actually
+          have one. Thanks Randy.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Initial addition of UTF-8 support. Thanks to
+          Alexander Patrakov.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>January 3, 2006</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Clarify the description of mktemp's --with-libc
+          configure parameter (fixes bug 1667).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to libtool 1.5.22.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages 2.18.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Remove the -v flag from the example mkswap command in
+          chapter 2 as it does not affect verbosity (fixes bug 1674).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 31, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken]: Alter installation of Linux Libc asm Headers in chroot,
+          to be repeatable.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 23, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim]: Corrected version on Vim symlink</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 21, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Correctly symlink Vim's documentation to /usr/share/doc.
+          Thanks to Jeremy for the report and the fix.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 17, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Pass a valid path to module-init-tools' --prefix
+          configure switch and remove the now unnecessary --mandir switch</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Symlink Vim's documentation to /usr/share/doc. Fixes
+          bug 1610.  Thanks to Randy McMurchy for the original report and to
+          Ken and Jeremy for their investigations into the fix.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to psmisc-21.9</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages-2.17</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 16, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Move Procps to before Perl in chapter 6. Perl's
+          testsuite uses 'ps'.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 13, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Install Tcl's internal headers to /tools/include,
+          allowing us to drop its source directory right away. Origin is
+          Greg Schafer, and thanks to Dan Nicholson for the report (fixes
+          bug 1670).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 12, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Updated texinfo patch. Fixes segfault issues
+          with texindex. Thanks to Randy McMurchy for the report and Bruce
+          Dubbs and Joe Ciccone for the fix.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 11, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Upgrade to tcl-8.4.12</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Upgrade to less-394.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Upgrade to readline-5.1. Also removed bash-3.0
+          and readline-5.0 specific patches.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Upgrade to bash-3.1. Also fixed Tcl to work with
+          the new bash version. Thanks to Alexander Patrakov and ultimately,
+          Greg Schafer for the fix.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Changed variable used in readline for linking
+          in ncurses. Thanks to Alexander Patrakov for the fix.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 9, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages-2.16</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to module-init-tools-3.2.2
+        </para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to findutils-4.2.27</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>December 7, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Mention the testsuites (or lack of them) for all
+          packages (fixes bug 1664).  Thanks to Chris Staub for the report
+          and analysis of affected packages.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 26, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Don't install the Linuxthreads man pages, the POSIX
+          threading API is documented in the man3p section provided by the
+          man-pages package (fixes bug 1660).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Remove the incorrect note about not having to dump/check
+          a journalled filesystem (fixes bug 1662).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to module-init-tools 3.2.1.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Prevent installing the internationalized man pages
+          for Shadow's <command>groups</command> binary (thanks to Randy
+          McMurchy for the report).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages 2.14.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to findutils-4.2.26</para>
+        </listitem>
+        <listitem>
+          <para>[manuel]: Changed --strip-path to --strip-components in the
+          unpack of module-init-tools-testsuite package.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 23, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[gerard]: Corrected reference to 'man page' to 'HTML
+          documentation' in chapter 6/sec</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 18, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel]: Fixed the unpack of the module-init-tools-testsuite
+          package.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 16, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Textual correction concerning gettext in
+          chapter 5 and the use of --disable-shared</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 15, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic]: Changed the chapter 6 Perl Dpager configure option
+          to reflect the new location of the less binary.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 14, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Only install <command>msgfmt</command> from
+          gettext in chapter 5. This is all that is necessary and prevents
+          gettext from trying to pull in unnecessary elements from the host.
+          Thanks to Greg Schafer for pointing this out.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 12, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Improve the heuristic for determining a locale that
+          is supported by both Glibc and packages outside LFS (bug 1642).
+          Many thanks to Alexander Patrakov for highlighting the numerous
+          issues and for reviewing the various suggested fixes.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Move sed to earlier in the build.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Move m4 to earlier in the build. Thanks
+          Chris Staub.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 11, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Omit running Bzip2's testsuite as a separate step,
+          as <command>make</command> runs it automatically (bug 1652).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 10, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Initial re-ordering of packages. Thanks to
+          Chris Staub (bug 684).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 7, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Install the binaries from Less to /usr/bin instead
+          of /bin (fixes bug 1643).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Remove the --libexecdir option from both passes of
+          GCC in chapter 5 (fixes bug 1646).  Also change the --libexecdir
+          option for Findutils to conform with the /usr/lib/packagename
+          convention already prevalent in the book (fixes bug 1644).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 6, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Remove the optimization related warnings from the
+          toolchain packages (bug 1650).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Install Vim's documentation to
+          /usr/share/doc/vim-&vim-version; instead of /usr/share/vim/vim64/doc
+          (bug 1610). Thanks to Randy McMurchy for the report, and Jeremy
+          Huntwork for the fix.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Stop Udev from killing udevd processes on the host
+          system (fixes bug 1651).  Thanks to Alexander Patrakov for the
+          report and the fix.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to Coreutils 5.93.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to Psmisc 21.8.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to Glibc 2.3.6.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 5, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Add a note to the toolchain sanity check in chapter 5
+          to explain that if TCL fails to build, it's an indication of a broken
+          toolchain (bug 1581).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>November 3, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages 2.13.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Correct the instructions for running Module-Init-Tools'
+          testsuite (fixes bug 1597).  Thanks to Greg Schafer, Tushar Teredesai
+          and to Randy McMurchy for providing the patch.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 31, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to shadow-4.0.13.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to vim-6.4.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to procps-3.2.6.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Build udev_run_devd and udev_run_hotplugd and alter
+          the udev rules file so that udev once again executes programs in
+          the /etc/dev.d and /etc/hotplug.d directories (fixes bug 1635).
+          Also change the udev rules to prevent udev from handling the "card"
+          and "dm" devices as these are managed entirely by programs outside
+          of LFS.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 29, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to udev-071</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages 2.11.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to coreutils-5.92. This involved removing
+          the DEFAULT_POSIX2_VERSION environment variable as it is no longer
+          required.  The testsuite also requires the Data::Dumper module from
+          Perl, so it is now built in chapter05/perl.xml.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 22, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic]: Upgrade to m4-1.4.4.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 21, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to file-4.16.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages 2.10.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to ncurses 5.5.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 15, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages 2.09.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Use an updated version of the Udev rules file
+          (fixes bug 1639).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Add a cdrom group as required by the Udev rules.
+          file</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 9, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Emphasise the fact that one must delete the source
+          directory after each package has been installed. Fixes bug 1638.
+          Thanks to Chris Staub.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 8, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic]: Added patch to fix poor tempfile creation in
+          Texinfo-4.8 that can lead to a symlink attack.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to iproute2-051007.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 7, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to gcc-4.0.2.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>October 4, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Prevent GCC from running the <command>fixincludes</command>
+          script in chapter5 pass2 and chapter 6 (fixes bug 1636). Thanks to Tushar
+          and Greg for their contributions on this issue.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 29, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Add more explicit reader prerequisites (fixes
+          bug 1629).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Add <option>-v</option> to commands that accept it
+          (fixes bug 1612).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 26, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to man-pages-2.08.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 24, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to gawk-3.1.5.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to man-1.6b.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to util-linux-2.12r.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 20, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to bison-2.1.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 17, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to udev-070 and remove the unnecessary
+          &quot;udevdir=/dev&quot; parameter.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Added patch for coreutils to improve echo's POSIX
+          and bash compatibility and to recognise &quot;\xhh&quot; syntax
+          as required by the test suite in udev-069 and later.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 15, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic]: Added patch for util-linux to prevent a umount
+          vulnerability.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 8, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Upgrade to groff-1.19.2</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 6, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken]: Reworded the glibc text to expect test failures.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 5, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken]: Add patch to fix some of the math tests in glibc.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem><para>September 4, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Add patch to stop <command>cfdisk</command> segfaulting
+          when invoked on devices with partitions that don't contain an ext2,
+          ext3, xfs or jfs filesystem (see bug 1604).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to libtool-1.5.20.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to findutils-4.2.25.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>September 2, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: The optimization flag for util-linux comes from
+          <filename>configure</filename> rather than <filename>MCONFIG</filename>,
+          so adjust the <command>sed</command> in order for the segfault fix
+          to actually work.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Avoid the potential race condition when invoking
+          <command>find</command> to remove GCC's fixed headers.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 30th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Work around a segfault in cfdisk by compiling with -O
+          instead of the default -O2 optimization setting (fixes bug 1604).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Update the inetutils patch to use the upstream fix
+          for GCC-4.x compilation problems (fixes bug 1602).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to shadow-2.0.12</para>
+        </listitem>
+        <listitem>
+          <para>[ken]: Remove <command>sed -i</command> commands from
+          gcc-pass2.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 28th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Adjusted tar commands in Bash and Glibc chapter 6
+          builds for consistency</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 23rd, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: <command>find</command> may fail due to a race
+          condition when deleting files.  Remove the &amp;&amp; construct in
+          chapter05/adjusting.xml so that the rest of the commands for removing
+          fixed headers will be executed (fixes bug 1621).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Install Udev's documentation relating to configuring
+          rules (fixes bug 1622).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to Man-1.6a.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 20th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Stop moving some of coreutils' binaries to /bin as
+          they aren't required to be there (fixes bug 1620).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 19th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgrade to Udev-068.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to IANA-etc-2.00.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to file-4.15.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 18th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Simplify the method for finding where GCC's default
+          specs file and private include directory live.  Additionally, don't
+          assume the host's sed supports the -i switch.</para>
+        </listitem>
+        <listitem>
+          <para>[ken]: Add a patch to sanitise bzgrep's handling of
+          filenames.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 16th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Install sed's man page to /usr/share/doc/sed-4.1.4
+          instead of /usr/share/doc (fixes bug 1600).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgraded to linux-2.6.12.5.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 15th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Alter the GCC -fomit-frame-pointer sed to protect
+          from multiple invocations (Greg Schafer).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 14th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[ken]: Upgrade shadow to 4.0.11.1 with --enable-shadowgrp as
+          advised by Greg Schafer.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Mention the common libmudflap test failures in GCC
+          (fixes bug 1615).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Added patch to install documentation for bzip2 (fixes
+          bug 1603).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to linux-2.6.12.4.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Add sed to chapter05/gcc-pass2 and chapter06/gcc to
+          ensure they get built with -fomit-frame-pointer so it matches the
+          bootstrap build in chapter05/gcc-pass1 (fixes bug 1609).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgrade to udev-067 including a fix for the failing
+          test (bug 1611).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 12th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Explain that libiconv isn't required on an LFS
+          system (fixes bug 1614).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Fix ownership of libtool's libltdl data files
+          (fixes bug 1601).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Change findutils and vim's configure switch explanations
+          to the convention used in the rest of the book (Bug 1613).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Expand explanation of device node creation at the start
+          of chapter 6.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Fix incorrect version number for expect's installed
+          library (Bug 1608).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 7th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic]: Added note in Shadow regarding building Cracklib
+          from BLFS first.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>August 6th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Add texi2pdf to list of Texinfo's installed files.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated Vim's security patch to address the latest
+          modeline vulnerability.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  30th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Added instructions for installing Bash documentation
+          (Randy McMurchy).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Remove GCC linkonce patch from chapter03/patches.xml
+          as it's no longer used in the book</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  29th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel]: Removed the text about defining gvimrc.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 28th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Add GCC-4 related patch for kbd.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Add GCC-4 related patch for inetutils.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Remove the note regarding a known test failure in GRUB.
+          The test no longer fails under GCC-4.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Add GCC-4 related patch to chapter06 tar.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  27th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Don't define gvim's configuration file as we don't
+          compile gvim in LFS (Bruce Dubbs).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  26th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Remove <quote>groups</quote> from the list of programs
+          installed by shadow, as we use the version provided by coreutils
+          instead (Randy McMurchy).</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to mktemp-1.5-add_tempfile-3.patch, which adds
+          license and copyright information to the previous version.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  23rd, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Moved FORMER_CONTRIBUTORS information into the book,
+          so as people can actually see it. The space constraint argument in
+          that file was weak - it only added another 10 lines to a 255 page
+          document (PDF). Now at least we <emphasis>publically</emphasis>
+          acknowledge the efforts of previous contributors.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to man-pages-2.07.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to zlib-1.2.3.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  22nd, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel]: Added obfuscate.sh and modified the Makefile to
+          obfuscate e-mail addresses in XHTML output.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 21st, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Add GCC-4 related patches to chapter06 glibc.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Unset the GCC_INCLUDEDIR variable once it's no longer
+          needed.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  19th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Removed flex++ from the list of installed files, as
+          it is no longer present (Randy McMurchy)</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 18th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Re-added the explanation of the fixincludes process
+          and rewording where necessary (Chris Staub), and reworded description
+          of the specs patch.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Remove all host headers brought in via the fixincludes
+          process, not just pthread.h and sigaction.h</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July 17th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Slightly adjusted the specs file seds, to prevent
+          multiple seds from adversely affecting them.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Removed the fixincludes sed from gcc-pass1 as we may
+          need to fix up host's headers. Also reinstate the associated removal
+          of pthread.h and sigthread.h.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  16th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jhuntwork]: Added sed to chapter 5 gcc builds to force the
+          fixincludes to use the headers in /tools and not the host.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Removed no_fixincludes and linkonce patches for
+          gcc4. Also removed the command to remove the fixed pthread.h.</para>
+        </listitem>
+        <listitem>
+          <para>[jhuntwork]: Fixed adjusting toolchain sed for both chapters
+          5 and 6.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  15th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Updated to Linux-2.6.12.3.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Added a patch to enable tar to build with gcc-4.0.1</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: GCC-4.x no longer installs its specs file by default.
+          Alter the toolchain adjustment stage to first dump the specs file
+          where GCC will find it, then alter it.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Added patches for chapter 5's Glibc to build with
+          gcc-4.0.1</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to gcc-4.0.1.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to udev-063.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  13th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Updated to automake-1.9.6.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  8th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Updated to udev-062.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to linux-libc-headers-2.6.12.0.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to linux-2.6.12.2.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to shadow-4.0.10.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to iana-etc-1.10.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  6th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[archaic]: Pulled the inetutils kernel header patch out again
+          as it is not needed.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to e2fsprogs-1.38.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to binutils-2.16.1.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>July  5th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Updated to tcl-8.4.11.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to man-1.6.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to file 4.14.</para>
+        </listitem>
+          <listitem><para>[matt]: Updated to man-pages 2.05.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>June 12th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Upgraded to gettext-0.14.5.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgraded to perl-5.8.7.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgraded to tcl-8.4.10.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Upgraded to man-pages-2.03.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 24th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim]: Changed gcc-specs patch to -2.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 23nd, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim]: Changed changelog to use version entities.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 22nd, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Updated to Udev-058.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to Libtool-1.5.18.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to Gcc-3.4.4.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to Binutils-2.16.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>May 15th, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[matt]: Updated to Grub 0.97.</para>
+        </listitem>
+        <listitem>
+          <para>[matt]: Updated to Libtool 1.5.16.</para>
+        </listitem>
+        <listitem>
+          <para>[jim]: Updated to udev 057.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 14, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim]: Updated to man-pages 2.02.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 13, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim]: Updated to glibc 2.3.5.</para>
+        </listitem>
+        <listitem>
+          <para>[jim]: Updated to gettext 0.14.4.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 12, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel]: Small redaction changes.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 11, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[manuel]: Several tags and text corrections.</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>April 6, 2005</para>
+      <itemizedlist>
+        <listitem>
+          <para>[jim]: Removed IPRoute2 patch for a sed (Ryan Oliver).</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+  </itemizedlist>
+
+  <para>Branch frozen for LFS 6.1 as of April 5, 2005. Some packages
+  and patches updates related with security up to July 9, 2005.</para>
+
+</sect1>

+ 21 - 0
chapter01/chapter01.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<chapter id="chapter-intro" xreflabel="Chapter 1">
+  <?dbhtml dir="chapter01"?>
+  <?dbhtml filename="chapter01.html"?>
+
+  <title>Introduction</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="how.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="whatsnew.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changelog.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="resources.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="askforhelp.xml"/>
+  <!--<xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="livecd.xml"/>-->
+
+</chapter>

+ 89 - 0
chapter01/how.xml

@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-intro-how">
+  <?dbhtml filename="how.html"?>
+
+  <title>How to Build an LFS System</title>
+
+  <para>The LFS system will be built by using a previously installed
+  Linux distribution (such as Debian, Mandrake, Red Hat, or SuSE). This
+  existing Linux system (the host) will be used as a starting point to
+  provide necessary programs, including a compiler, linker, and shell,
+  to build the new system. Select the <quote>development</quote> option
+  during the distribution installation to be able to access these
+  tools.</para>
+
+  <para>As an alternative to installing a separate distribution
+  onto your machine, you may wish to use the Linux From Scratch LiveCD.
+  The CD works well as a host system, providing all the tools you need
+  to successfully follow the instructions in this book. Additionally,
+  it contains all the source packages, patches and a copy of this book.
+  So once you have the CD, no network connection or additional downloads
+  are necessary. For more information about the LFS LiveCD or to download
+  a copy, visit <ulink url="&livecd-root;"/>.</para>
+
+  <para><xref linkend="chapter-partitioning"/> of this book describes how
+  to create a new Linux native partition and file system, the place
+  where the new LFS system will be compiled and installed. <xref
+  linkend="chapter-getting-materials"/> explains which packages and
+  patches need to be downloaded to build an LFS system and how to store
+  them on the new file system. <xref linkend="chapter-final-preps"/>
+  discusses the setup of an appropriate working environment. Please read
+  <xref linkend="chapter-final-preps"/> carefully as it explains several
+  important issues the reader should be aware of before beginning to
+  work through <xref linkend="chapter-temporary-tools"/> and beyond.</para>
+
+  <para><xref linkend="chapter-temporary-tools"/> explains the
+  installation of a number of packages that will form the basic
+  development suite (or toolchain) which is used to build the actual
+  system in <xref linkend="chapter-building-system"/>. Some of these
+  packages are needed to resolve circular dependencies&mdash;for example,
+  to compile a compiler, you need a compiler.</para>
+
+  <para><xref linkend="chapter-temporary-tools"/> also shows the user how to
+  build a first pass of the toolchain, including Binutils and GCC (first pass
+  basically means these two core packages will be reinstalled).
+  The next step is to build Glibc, the C library. Glibc will be compiled by
+  the toolchain programs built in the first pass. Then, a second pass of the
+  toolchain will be built. This time, the toolchain will be dynamically linked
+  against the newly built Glibc. The remaining <xref
+  linkend="chapter-temporary-tools"/> packages are built using this second
+  pass toolchain. When this is done, the LFS installation process will no
+  longer depend on the host distribution, with the exception of the running
+  kernel. </para>
+
+  <para>This effort to isolate the new system from the host distribution may
+  seem excessive, but a full technical explanation is provided in
+  <xref linkend="ch-tools-toolchaintechnotes"/>.</para>
+
+  <para>In <xref linkend="chapter-building-system"/>, the full LFS system is
+  built. The <command>chroot</command> (change root) program is used to enter
+  a virtual environment and start a new shell whose root directory will be
+  set to the LFS partition. This is very similar to rebooting and instructing
+  the kernel to mount the LFS partition as the root partition. The system
+  does not actually reboot, but instead <command>chroot</command>'s because
+  creating a bootable system requires additional work which is not necessary
+  just yet. The major advantage is that <quote>chrooting</quote> allows the
+  builder to continue using the host while LFS is being built. While waiting
+  for package compilation to complete, a user can switch to a different
+  virtual console (VC) or X desktop and continue using the computer as
+  normal.</para>
+
+  <para>To finish the installation, the LFS-Bootscripts are set up in
+  <xref linkend="chapter-bootscripts"/>, and the kernel and boot loader are set
+  up in <xref linkend="chapter-bootable"/>. <xref linkend="chapter-finalizing"/>
+  contains information on furthering the LFS experience beyond this book.
+  After the steps in this book have been implemented, the computer will be
+  ready to reboot into the new LFS system.</para>
+
+  <para>This is the process in a nutshell. Detailed information on each
+  step is discussed in the following chapters and package descriptions.
+  Items that may seem complicated will be clarified, and everything will
+  fall into place as the reader embarks on the LFS adventure.</para>
+
+</sect1>

+ 106 - 0
chapter01/livecd.xml

@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-intro-livecd">
+  <?dbhtml filename="livecd.html"?>
+
+  <title>About the Included CD</title>
+
+  <para>For your convenience, we have included a CD with this book that
+  contains the source packages needed for creating a Linux From Scratch
+  system.  The CD is bootable and provides a stable working environment
+  for building LFS.  This book refers to this system as the
+  <quote>host system.</quote>  The CD images are actively maintained and
+  updated versions can be found at
+  <ulink url="ftp://ftp.lfs-matrix.net/pub/lfs-livecd/"/></para>
+
+  <para>In addition to the tools required to build LFS, the host system
+  on the CD has a number of other helpful tools installed:</para>
+
+  <itemizedlist>
+
+    <listitem>
+      <para>An HTML version of this book</para>
+    </listitem>
+
+    <listitem>
+      <para>The X Window System Environment</para>
+    </listitem>
+
+    <listitem>
+      <para>Web Tools</para>
+      <itemizedlist>
+        <listitem>
+          <para>Wget (command line file retriever)</para>
+        </listitem>
+        <listitem>
+          <para>Lynx (text web browser)</para>
+        </listitem>
+        <listitem>
+          <para>Irssi (console IRC client)</para>
+        </listitem>
+        <listitem>
+          <para>Firefox (graphical web browser)</para>
+        </listitem>
+        <listitem>
+          <para>Xchat (X-based IRC client)</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>Text Editors</para>
+      <itemizedlist>
+        <listitem>
+          <para>Vim</para>
+        </listitem>
+        <listitem>
+          <para>Nano</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>Network Tools</para>
+      <itemizedlist>
+        <listitem>
+          <para>SSH Server and Client</para>
+        </listitem>
+        <listitem>
+          <para>NFS Server and Client</para>
+        </listitem>
+        <listitem>
+          <para>Smbmount (mount.cifs) for Windows shares</para>
+        </listitem>
+        <listitem>
+          <para>Subversion</para>
+        </listitem>
+        <listitem>
+          <para>Dhcpcd (DHCP client)</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>Filesystem Programs</para>
+      <itemizedlist>
+        <listitem>
+          <para>Reiserfsprogs</para>
+        </listitem>
+        <listitem>
+          <para>Xfsprogs</para>
+        </listitem>
+      </itemizedlist>
+    </listitem>
+
+    <listitem>
+      <para>nALFS - A tool for automating LFS builds</para>
+    </listitem>
+
+  </itemizedlist>
+
+</sect1>

+ 92 - 0
chapter01/resources.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-intro-resources">
+  <?dbhtml filename="resources.html"?>
+
+  <title>Resources</title>
+
+  <sect2 id="ch-intro-faq">
+    <title>FAQ</title>
+
+    <para>If during the building of the LFS system you encounter any
+    errors, have any questions, or think there is a typo in the book,
+    please start by consulting the Frequently Asked Questions (FAQ)
+    that is located at <ulink url="&faq-root;"/>.</para>
+
+  </sect2>
+
+  <sect2 id="ch-intro-maillists" xreflabel="Chapter 1 - Mailing Lists">
+    <title>Mailing Lists</title>
+
+    <para>The <uri>linuxfromscratch.org</uri> server hosts a number of mailing
+    lists used for the development of the LFS project. These lists include the
+    main development and support lists, among others. If the FAQ does not solve
+    the problem you are having, the next step would be to search the mailing
+    lists at <ulink url="&lfs-root;search.html"/>.</para>
+
+    <para>For information on the different lists, how to subscribe, archive
+    locations, and additional information, visit
+    <ulink url="&lfs-root;mail.html"/>.</para>
+
+  </sect2>
+
+  <!-- FIXME: Remove until such time as we have our own News Server, JH 20060105
+
+  <sect2 id="ch-intro-newsserver">
+    <title>News Server</title>
+
+    <para>The mailing lists hosted at <uri>linuxfromscratch.org</uri> are
+    also accessible via the Network News Transfer Protocol (NNTP) server.
+    All messages posted to a mailing list are copied to the corresponding
+    newsgroup, and vice versa.</para>
+
+    <para>The news server is located at
+    <uri>news.linuxfromscratch.org</uri>.</para>
+
+  </sect2> -->
+
+  <sect2 id="ch-intro-irc">
+    <title>IRC</title>
+
+    <para>Several members of the LFS community offer assistance on our
+    community Internet Relay Chat (IRC) network. Before using this support,
+    please make sure that your question is not already answered in the LFS
+    FAQ or the mailing list archives. You can find the IRC network at
+    <uri>irc.linuxfromscratch.org</uri>. The support channel is named
+    #LFS-support.</para>
+
+  </sect2>
+
+  <sect2 id="ch-intro-references">
+    <title>References</title>
+
+    <para>For additional information on the packages, useful tips are
+    available in the LFS Package Reference page located at <ulink
+    url="http://www.linuxfromscratch.org/~matthew/LFS-references.html"/>.</para>
+
+  </sect2>
+
+  <sect2 id="ch-intro-mirrors" xreflabel="Chapter 1 - Mirror sites">
+    <title>Mirror Sites</title>
+
+    <para>The LFS project has a number of world-wide mirrors to make accessing
+    the website and downloading the required packages more convenient. Please
+    visit the LFS website at <ulink url="&lfs-root;mirrors.html"/> for a list
+    of current mirrors.</para>
+
+  </sect2>
+
+  <sect2 id="ch-intro-contactinfo">
+    <title>Contact Information</title>
+
+    <para>Please direct all your questions and comments to one of the LFS
+    mailing lists (see above).</para>
+
+  </sect2>
+
+</sect1>

+ 311 - 0
chapter01/whatsnew.xml

@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-intro-whatsnew">
+  <?dbhtml filename="whatsnew.html"?>
+
+  <title>What's new since the last release</title>
+
+  <para>Below is a list of package updates made since the previous
+  release of the book.</para>
+
+  <!--
+    Every package in the book is listed in the "Upgraded to:" section.
+    Comment/uncomment as needed. DO NOT delete any of these lines unless that
+    package is removed from the book entirely.
+  -->
+
+  <itemizedlist>
+    <title>Upgraded to:</title>
+
+    <!--<listitem>
+      <para>Autoconf &autoconf-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Automake &automake-version;</para>
+    </listitem>
+    <listitem>
+      <para>Bash &bash-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Berkeley DB &db-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Binutils &binutils-version;</para>
+    </listitem>
+    <listitem>
+      <para>Bison &bison-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Bzip2 &bzip2-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Coreutils &coreutils-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>DejaGNU &dejagnu-version;</para>
+    </listitem>-->
+    <!--<listitem>
+      <para>Diffutils &diffutils-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>E2fsprogs &e2fsprogs-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Expect &expect-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>File &file-version;</para>
+    </listitem>
+    <listitem>
+      <para>Findutils &findutils-version;</para>
+    </listitem>
+    <listitem>
+      <para>Flex &flex-version;</para>
+    </listitem>
+    <listitem>
+      <para>Gawk &gawk-version;</para>
+    </listitem>
+    <listitem>
+      <para>GCC &gcc-version;</para>
+    </listitem>
+    <listitem>
+      <para>Gettext &gettext-version;</para>
+    </listitem>
+    <listitem>
+      <para>Glibc &glibc-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Grep &grep-version;</para>
+    </listitem>-->
+    <!--<listitem>
+      <para>Groff &groff-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>GRUB &grub-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Gzip &gzip-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>IANA-Etc &iana-etc-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Inetutils &inetutils-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>IPRoute2 &iproute2-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Kbd &kbd-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Less &less-version;</para>
+    </listitem>
+    <listitem>
+      <para>LFS-Bootscripts &lfs-bootscripts-version;</para>
+    </listitem>
+    <listitem>
+      <para>Libtool &libtool-version;</para>
+    </listitem>
+    <listitem>
+      <para>Linux &linux-version;</para>
+    </listitem>
+    <listitem>
+      <para>Linux-Libc-Headers &linux-libc-headers-version;</para>
+    </listitem>
+    <listitem>
+      <para>M4 &m4-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Make &make-version;</para>
+    </listitem>-->
+    <!--<listitem>
+      <para>Man-DB &man-db-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Man-pages &man-pages-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Mktemp &mktemp-version;</para>
+    </listitem>-->
+    <!--<listitem>
+      <para>Module-Init-Tools &module-init-tools-version;</para>
+    </listitem-->
+    <listitem>
+      <para>Ncurses &ncurses-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Patch &patch-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Perl &perl-version;</para>
+    </listitem>
+    <listitem>
+      <para>Procps &procps-version;</para>
+    </listitem>
+    <listitem>
+      <para>Psmisc &psmisc-version;</para>
+    </listitem>
+    <listitem>
+      <para>Readline &readline-version;</para>
+    </listitem>
+    <listitem>
+      <para>Sed &sed-version;</para>
+    </listitem>
+    <listitem>
+      <para>Shadow &shadow-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Sysklogd &sysklogd-version;</para>
+    </listitem>-->
+    <!--<listitem>
+      <para>SysVinit &sysvinit-version;</para>
+    </listitem>-->
+    <!--<listitem>
+      <para>Tar &tar-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>TCL &tcl-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Texinfo &texinfo-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Udev &udev-version;</para>
+    </listitem>
+    <!--<listitem>
+      <para>Util-Linux &util-linux-version;</para>
+    </listitem>-->
+    <listitem>
+      <para>Vim &vim-version;</para>
+    </listitem>
+    <listitem>
+      <para>Zlib &zlib-version;</para>
+    </listitem>
+  </itemizedlist>
+
+  <itemizedlist>
+    <title>Downgraded to:</title>
+
+    <listitem>
+      <para>Groff &groff-version;</para>
+    </listitem>
+
+  </itemizedlist>
+
+  <itemizedlist>
+    <title>Added:</title>
+
+    <listitem>
+      <para>&bash-fixes-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&bzip2-bzgrep-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&bzip2-docs-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&gawk-segfault-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&gcc-specs-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&glibc-linux_types-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&groff-debian-patch;</para>
+    </listitem>
+    <listitem>
+      <para>Berkeley DB-&db-version;</para>
+    </listitem>
+    <listitem>
+      <para>&inetutils-gcc4_fixes-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&kbd-gcc4_fixes-patch;</para>
+    </listitem>
+    <listitem>
+      <para>MAN-DB-&man-db-version;</para>
+    </listitem>
+    <listitem>
+      <para>&mktemp-tempfile-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&perl-libc-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&readline-fixes-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&tar-gcc4_fix-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&texinfo-tempfile_fix-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&udev-config;</para>
+    </listitem>
+    <listitem>
+      <para>&vim-fixes-patch;</para>
+    </listitem>
+    <listitem>
+      <para>&vim-mandir-patch;</para>
+    </listitem>
+  </itemizedlist>
+
+  <itemizedlist>
+    <title>Removed:</title>
+
+    <listitem>
+      <para>flex-2.5.31-debian_fixes-3.patch</para>
+    </listitem>
+    <listitem>
+      <para>gcc-3.4.3-linkonce-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>gcc-3.4.3-no_fixincludes-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>gcc-3.4.3-specs-2.patch</para>
+    </listitem>
+    <listitem>
+      <para>glibc-2.3.4-fix_test-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>hotplug-2004-09-23</para>
+    </listitem>
+    <listitem>
+      <para>inetutils-1.4.2-kernel_headers-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>iproute2-2.6.11-050330-remove_db-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>Man-1.6b</para>
+    </listitem>
+    <listitem>
+      <para>mktemp-1.5-add_tempfile-2.patch</para>
+    </listitem>
+    <listitem>
+      <para>perl-5.8.6-libc-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>udev-config-4.rules</para>
+    </listitem>
+    <listitem>
+      <para>vim-6.3-security_fix-1.patch</para>
+    </listitem>
+    <listitem>
+      <para>zlib-1.2.2-security_fix-1.patch</para>
+    </listitem>
+
+  </itemizedlist>
+
+</sect1>

+ 19 - 0
chapter02/chapter02.xml

@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<chapter id="chapter-partitioning" xreflabel="Chapter 2">
+  <?dbhtml dir="chapter02"?>
+  <?dbhtml filename="chapter02.html"?>
+
+  <title>Preparing a New Partition</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingpartition.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingfilesystem.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mounting.xml"/>
+
+</chapter>

+ 73 - 0
chapter02/creatingfilesystem.xml

@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="space-creatingfilesystem">
+  <?dbhtml filename="creatingfilesystem.html"?>
+
+  <title>Creating a File System on the Partition</title>
+
+  <para>Now that a blank partition has been set up, the file system can be created.
+  The most widely-used system in the Linux world is the second extended file
+  system (<systemitem class="filesystem">ext2</systemitem>), but with newer
+  high-capacity hard disks, journaling file systems are becoming increasingly
+  popular. The third extended filesystem (<systemitem
+  class="filesystem">ext3</systemitem>) is a widely used enhancement to
+  <systemitem class="filesystem">ext2</systemitem>, which adds journalling
+  capabilities and is compatible with the E2fsprogs utilities.
+  We will create an <systemitem class="filesystem">ext3</systemitem>
+  file system. Instructions for creating other file systems can be found at
+  <ulink url="&blfs-root;view/svn/postlfs/filesystems.html"/>.</para>
+
+  <para>To create an <systemitem class="filesystem">ext3</systemitem> file
+  system on the LFS partition, run the following:</para>
+
+<screen role="nodump"><userinput>mke2fs -jv /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
+
+  <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the LFS
+  partition (<filename class="devicefile">hda5</filename> in our previous
+  example).</para>
+
+  <note>
+    <para>Some host distributions use custom features in their filesystem
+    creation tools (E2fsprogs). This can cause problems when booting into your new
+    LFS in Chapter 9, as those features will not be supported by the LFS-installed
+    E2fsprogs; you will get an error similar to <quote>unsupported filesystem
+    features, upgrade your e2fsprogs</quote>. To check if your host system
+    uses custom enhancements, run the following command:</para>
+
+<screen role="nodump"><userinput>debugfs -R feature /dev/<replaceable>&lt;xxx&gt;</replaceable></userinput></screen>
+
+    <para>If the output contains features other than: <option>dir_index</option>;
+    <option>filetype</option>; <option>large_file</option>;
+    <option>resize_inode</option> or <option>sparse_super</option> then your host
+    system may have custom enhancements.  In that case, to avoid later problems,
+    you should compile the stock E2fsprogs package and use the resulting binaries
+    to re-create the filesystem on your LFS partition:</para>
+
+<screen role="nodump"><userinput>cd /tmp
+tar -xjvf /path/to/sources/e2fsprogs-&e2fsprogs-version;.tar.bz2
+cd e2fsprogs-&e2fsprogs-version;
+mkdir -v build
+cd build
+../configure
+make #note that we intentionally don't 'make install' here!
+./misc/mke2fs -jv /dev/<replaceable>&lt;xxx&gt;</replaceable>
+cd /tmp
+rm -rfv e2fsprogs-&e2fsprogs-version;</userinput></screen>
+  </note>
+
+  <para>If a <systemitem class="filesystem">swap</systemitem> partition was
+  created, it will need to be initialized for use by issuing the command below.
+  If you are using an existing <systemitem class="filesystem">swap</systemitem>
+  partition, there is no need to format it.</para>
+
+<screen role="nodump"><userinput>mkswap /dev/<replaceable>&lt;yyy&gt;</replaceable></userinput></screen>
+
+  <para>Replace <replaceable>&lt;yyy&gt;</replaceable> with the name of the
+  <systemitem class="filesystem">swap</systemitem> partition.</para>
+
+</sect1>

+ 55 - 0
chapter02/creatingpartition.xml

@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="space-creatingpartition">
+  <?dbhtml filename="creatingpartition.html"?>
+
+  <title>Creating a New Partition</title>
+
+  <para>Like most other operating systems, LFS is usually installed on a
+  dedicated partition. The recommended approach to building an LFS system
+  is to use an available empty partition or, if you have enough unpartitioned
+  space, to create one. However, an LFS system (in fact even multiple LFS
+  systems) may also be installed on a partition already occupied by another
+  operating system and the different systems will co-exist peacefully. The
+  document <ulink url="&hints-root;lfs_next_to_existing_systems.txt"/>
+  explains how to implement this, whereas this book discusses the method of
+  using a fresh partition for the installation.</para>
+
+  <para>A minimal system requires a partition of around 1.3 gigabytes (GB).
+  This is enough to store all the source tarballs and compile the packages.
+  However, if the LFS system is intended to be the primary Linux system,
+  additional software will probably be installed which will require additional
+  space (2-3 GB). The LFS system itself will not take up this much room.
+  A large portion of this requirement is to provide sufficient free temporary
+  storage. Compiling packages can require a lot of disk space which will be
+  reclaimed after the package is installed.</para>
+
+  <para>Because there is not always enough Random Access Memory (RAM) available
+  for compilation processes, it is a good idea to use a small disk partition as
+  <systemitem class="filesystem">swap</systemitem> space. This is used by the
+  kernel to store seldom-used data and leave more memory available for active
+  processes. The <systemitem class="filesystem">swap</systemitem> partition for
+  an LFS system can be the same as the one used by the host system, in which
+  case it is not necessary to create another one.</para>
+
+  <para>Start a disk partitioning program such as <command>cfdisk</command>
+  or <command>fdisk</command> with a command line option naming the hard
+  disk on which the new partition will be created&mdash;for example
+  <filename class="devicefile">/dev/hda</filename> for the primary Integrated
+  Drive Electronics (IDE) disk. Create a Linux native partition and a
+  <systemitem class="filesystem">swap</systemitem> partition, if needed. Please
+  refer to <filename>cfdisk(8)</filename> or <filename>fdisk(8)</filename> if
+  you do not yet know how to use the programs.</para>
+
+  <para>Remember the designation of the new partition (e.g., <filename
+  class="devicefile">hda5</filename>). This book will refer to this as
+  the LFS partition. Also remember the designation of the <systemitem
+  class="filesystem">swap</systemitem> partition. These names will be
+  needed later for the <filename>/etc/fstab</filename> file.</para>
+
+</sect1>

+ 17 - 0
chapter02/introduction.xml

@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="space-introduction">
+  <?dbhtml filename="introduction.html"?>
+
+  <title>Introduction</title>
+
+  <para>In this chapter, the partition which will host the LFS system is
+  prepared. We will create the partition itself, create a file system
+  on it, and mount it.</para>
+
+</sect1>

+ 59 - 0
chapter02/mounting.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="space-mounting">
+  <?dbhtml filename="mounting.html"?>
+
+  <title>Mounting the New Partition</title>
+
+  <para>Now that a file system has been created, the partition needs to
+  be made accessible. In order to do this, the partition needs to be
+  mounted at a chosen mount point. For the purposes of this book, it is
+  assumed that the file system is mounted under <filename
+  class="directory">/mnt/lfs</filename>, but the directory choice is up
+  to you.</para>
+
+  <para>Choose a mount point and assign it to the <envar>LFS</envar>
+  environment variable by running:</para>
+
+<screen role="nodump"><userinput>export LFS=/mnt/lfs</userinput></screen>
+
+  <para>Next, create the mount point and mount the LFS file system by
+  running:</para>
+
+<screen role="nodump"><userinput>mkdir -pv $LFS
+mount -v -t ext3 /dev/<replaceable>&lt;xxx&gt;</replaceable> $LFS</userinput></screen>
+
+  <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the designation of the LFS
+  partition.</para>
+
+  <para>If using multiple partitions for LFS (e.g., one for <filename
+  class="directory">/</filename> and another for <filename
+  class="directory">/usr</filename>), mount them using:</para>
+
+<screen role="nodump"><userinput>mkdir -pv $LFS
+mount -v -t ext3 /dev/<replaceable>&lt;xxx&gt;</replaceable> $LFS
+mkdir -v $LFS/usr
+mount -v -t ext3 /dev/<replaceable>&lt;yyy&gt;</replaceable> $LFS/usr</userinput></screen>
+
+  <para>Replace <replaceable>&lt;xxx&gt;</replaceable> and
+  <replaceable>&lt;yyy&gt;</replaceable> with the appropriate partition
+  names.</para>
+
+  <para>Ensure that this new partition is not mounted with permissions that
+  are too restrictive (such as the <option>nosuid</option>, <option>nodev</option>,
+  or <option>noatime</option> options). Run the <command>mount</command> command
+  without any parameters to see what options are set for the mounted LFS
+  partition. If <option>nosuid</option>, <option>nodev</option>, and/or
+  <option>noatime</option> are set, the partition will need to be
+  remounted.</para>
+
+  <para>Now that there is an established place to work, it is time to
+  download the packages.</para>
+
+</sect1>
+

+ 18 - 0
chapter03/chapter03.xml

@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<chapter id="chapter-getting-materials" xreflabel="Chapter 3">
+  <?dbhtml dir="chapter03"?>
+  <?dbhtml filename="chapter03.html"?>
+
+  <title>Packages and Patches</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="packages.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patches.xml"/>
+
+</chapter>

+ 52 - 0
chapter03/introduction.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="materials-introduction">
+  <?dbhtml filename="introduction.html"?>
+
+  <title>Introduction</title>
+
+  <para>This chapter includes a list of packages that need to be downloaded in
+  order to build a basic Linux system. The listed version numbers correspond to
+  versions of the software that are known to work, and this book is based on
+  their use. We highly recommend against using newer versions because the build
+  commands for one version may not work with a newer version. The newest package
+  versions may also have problems that require work-arounds. These work-arounds
+  will be developed and stabilized in the development version of the
+  book.</para>
+
+  <para>Download locations may not always be accessible. If a download
+  location has changed since this book was published, Google (<ulink
+  url="http://www.google.com/"/>) provides a useful search engine for
+  most packages. If this search is unsuccessful, try one of the
+  alternative means of downloading discussed at <ulink
+  url="&lfs-root;lfs/packages.html"/>.</para>
+
+  <para>Downloaded packages and patches will need to be stored somewhere
+  that is conveniently available throughout the entire build. A working
+  directory is also required to unpack the sources and build them.
+  <filename class="directory">$LFS/sources</filename> can be used both
+  as the place to store the tarballs and patches and as a working
+  directory. By using this directory, the required elements will be
+  located on the LFS partition and will be available during all stages
+  of the building process.</para>
+
+  <para>To create this directory, execute the following command, as user
+  <systemitem class="username">root</systemitem>, before starting the download
+  session:</para>
+
+<screen role="nodump"><userinput>mkdir -v $LFS/sources</userinput></screen>
+
+  <para>Make this directory writable and sticky. <quote>Sticky</quote>
+  means that even if multiple users have write permission on a
+  directory, only the owner of a file can delete the file within a
+  sticky directory. The following command will enable the write and
+  sticky modes:</para>
+
+<screen role="nodump"><userinput>chmod -v a+wt $LFS/sources</userinput></screen>
+
+</sect1>

+ 586 - 0
chapter03/packages.xml

@@ -0,0 +1,586 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="materials-packages">
+  <?dbhtml filename="packages.html"?>
+
+  <title>All Packages</title>
+
+  <para>Download or otherwise obtain the following packages:</para>
+
+  <variablelist role="materials">
+
+    <varlistentry>
+      <term>Autoconf (&autoconf-version;) - <token>&autoconf-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&autoconf-home;"/></para>
+        <para>Download: <ulink url="&autoconf-url;"/></para>
+        <para>MD5 sum: <literal>&autoconf-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Automake (&automake-version;) - <token>&automake-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&automake-home;"/></para>
+        <para>Download: <ulink url="&automake-url;"/></para>
+        <para>MD5 sum: <literal>&automake-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bash (&bash-version;) - <token>&bash-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&bash-home;"/></para>
+        <para>Download: <ulink url="&bash-url;"/></para>
+        <para>MD5 sum: <literal>&bash-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bash Documentation (&bash-doc-version;) - <token>&bash-doc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&bash-doc-home;"/></para>
+        <para>Download: <ulink url="&bash-doc-url;"/></para>
+        <para>MD5 sum: <literal>&bash-doc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Berkeley DB (&db-version;) - <token>&db-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&db-home;"/></para>
+        <para>Download: <ulink url="&db-url;"/></para>
+        <para>MD5 sum: <literal>&db-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Binutils (&binutils-version;) - <token>&binutils-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&binutils-home;"/></para>
+        <para>Download: <ulink url="&binutils-url;"/></para>
+        <para>MD5 sum: <literal>&binutils-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bison (&bison-version;) - <token>&bison-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&bison-home;"/></para>
+        <para>Download: <ulink url="&bison-url;"/></para>
+        <para>MD5 sum: <literal>&bison-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bzip2 (&bzip2-version;) - <token>&bzip2-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&bzip2-home;"/></para>
+        <para>Download: <ulink url="&bzip2-url;"/></para>
+        <para>MD5 sum: <literal>&bzip2-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Coreutils (&coreutils-version;) - <token>&coreutils-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&coreutils-home;"/></para>
+        <para>Download: <ulink url="&coreutils-url;"/></para>
+        <para>MD5 sum: <literal>&coreutils-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>DejaGNU (&dejagnu-version;) - <token>&dejagnu-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&dejagnu-home;"/></para>
+        <para>Download: <ulink url="&dejagnu-url;"/></para>
+        <para>MD5 sum: <literal>&dejagnu-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Diffutils (&diffutils-version;) - <token>&diffutils-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&diffutils-home;"/></para>
+        <para>Download: <ulink url="&diffutils-url;"/></para>
+        <para>MD5 sum: <literal>&diffutils-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>E2fsprogs (&e2fsprogs-version;) - <token>&e2fsprogs-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&e2fsprogs-home;"/></para>
+        <para>Download: <ulink url="&e2fsprogs-url;"/></para>
+        <para>MD5 sum: <literal>&e2fsprogs-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Expect (&expect-version;) - <token>&expect-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&expect-home;"/></para>
+        <para>Download: <ulink url="&expect-url;"/></para>
+        <para>MD5 sum: <literal>&expect-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>File (&file-version;) - <token>&file-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&file-home;"/></para>
+        <para>Download: <ulink url="&file-url;"/></para>
+        <para>MD5 sum: <literal>&file-md5;</literal></para>
+
+        <note>
+          <para>File (&file-version;) may no longer be available at the
+          listed location. The site administrators of the master download
+          location occasionally remove older versions when new ones are
+          released. An alternative download location that may have the correct
+          version available can also be found at: <ulink
+          url="http://www.linuxfromscratch.org/lfs/download.html#ftp"/>.</para>
+        </note>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Findutils (&findutils-version;) - <token>&findutils-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&findutils-home;"/></para>
+        <para>Download: <ulink url="&findutils-url;"/></para>
+        <para>MD5 sum: <literal>&findutils-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Flex (&flex-version;) - <token>&flex-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&flex-home;"/></para>
+        <para>Download: <ulink url="&flex-url;"/></para>
+        <para>MD5 sum: <literal>&flex-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gawk (&gawk-version;) - <token>&gawk-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&gawk-home;"/></para>
+        <para>Download: <ulink url="&gawk-url;"/></para>
+        <para>MD5 sum: <literal>&gawk-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>GCC (&gcc-version;) - <token>&gcc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&gcc-home;"/></para>
+        <para>Download: <ulink url="&gcc-url;"/></para>
+        <para>MD5 sum: <literal>&gcc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gettext (&gettext-version;) - <token>&gettext-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&gettext-home;"/></para>
+        <para>Download: <ulink url="&gettext-url;"/></para>
+        <para>MD5 sum: <literal>&gettext-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Glibc (&glibc-version;) - <token>&glibc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&glibc-home;"/></para>
+        <para>Download: <ulink url="&glibc-url;"/></para>
+        <para>MD5 sum: <literal>&glibc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Glibc LibIDN add-on (&glibc-libidn-version;) - <token>&glibc-libidn-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&glibc-libidn-home;"/></para>
+        <para>Download: <ulink url="&glibc-libidn-url;"/></para>
+        <para>MD5 sum: <literal>&glibc-libidn-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Grep (&grep-version;) - <token>&grep-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&grep-home;"/></para>
+        <para>Download: <ulink url="&grep-url;"/></para>
+        <para>MD5 sum: <literal>&grep-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Groff (&groff-version;) - <token>&groff-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&groff-home;"/></para>
+        <para>Download: <ulink url="&groff-url;"/></para>
+        <para>MD5 sum: <literal>&groff-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>GRUB (&grub-version;) - <token>&grub-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&grub-home;"/></para>
+        <para>Download: <ulink url="&grub-url;"/></para>
+        <para>MD5 sum: <literal>&grub-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gzip (&gzip-version;) - <token>&gzip-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&gzip-home;"/></para>
+        <para>Download: <ulink url="&gzip-url;"/></para>
+        <para>MD5 sum: <literal>&gzip-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Iana-Etc (&iana-etc-version;) - <token>&iana-etc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&iana-etc-home;"/></para>
+        <para>Download: <ulink url="&iana-etc-url;"/></para>
+        <para>MD5 sum: <literal>&iana-etc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Inetutils (&inetutils-version;) - <token>&inetutils-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&inetutils-home;"/></para>
+        <para>Download: <ulink url="&inetutils-url;"/></para>
+        <para>MD5 sum: <literal>&inetutils-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>IPRoute2 (&iproute2-version;) - <token>&iproute2-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&iproute2-home;"/></para>
+        <para>Download: <ulink url="&iproute2-url;"/></para>
+        <para>MD5 sum: <literal>&iproute2-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Kbd (&kbd-version;) - <token>&kbd-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&kbd-home;"/></para>
+        <para>Download: <ulink url="&kbd-url;"/></para>
+        <para>MD5 sum: <literal>&kbd-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Less (&less-version;) - <token>&less-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&less-home;"/></para>
+        <para>Download: <ulink url="&less-url;"/></para>
+        <para>MD5 sum: <literal>&less-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>LFS-Bootscripts (&lfs-bootscripts-version;) - <token>&lfs-bootscripts-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&lfs-bootscripts-home;"/></para>
+        <para>Download: <ulink url="&lfs-bootscripts-url;"/></para>
+        <para>MD5 sum: <literal>&lfs-bootscripts-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libtool (&libtool-version;) - <token>&libtool-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libtool-home;"/></para>
+        <para>Download: <ulink url="&libtool-url;"/></para>
+        <para>MD5 sum: <literal>&libtool-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Linux (&linux-version;) - <token>&linux-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&linux-home;"/></para>
+        <para>Download: <ulink url="&linux-url;"/></para>
+        <para>MD5 sum: <literal>&linux-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Linux-Libc-Headers (&linux-libc-headers-version;) - <token>&linux-libc-headers-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&linux-libc-headers-home;"/></para>
+        <para>Download: <ulink url="&linux-libc-headers-url;"/></para>
+        <para>MD5 sum: <literal>&linux-libc-headers-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>M4 (&m4-version;) - <token>&m4-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&m4-home;"/></para>
+        <para>Download: <ulink url="&m4-url;"/></para>
+        <para>MD5 sum: <literal>&m4-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Make (&make-version;) - <token>&make-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&make-home;"/></para>
+        <para>Download: <ulink url="&make-url;"/></para>
+        <para>MD5 sum: <literal>&make-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Man-DB (&man-db-version;) - <token>&man-db-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&man-db-home;"/></para>
+        <para>Download: <ulink url="&man-db-url;"/></para>
+        <para>MD5 sum: <literal>&man-db-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Man-pages (&man-pages-version;) - <token>&man-pages-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&man-pages-home;"/></para>
+        <para>Download: <ulink url="&man-pages-url;"/></para>
+        <para>MD5 sum: <literal>&man-pages-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Mktemp (&mktemp-version;) - <token>&mktemp-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&mktemp-home;"/></para>
+        <para>Download: <ulink url="&mktemp-url;"/></para>
+        <para>MD5 sum: <literal>&mktemp-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Module-Init-Tools (&module-init-tools-version;) - <token>&module-init-tools-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&module-init-tools-home;"/></para>
+        <para>Download: <ulink url="&module-init-tools-url;"/></para>
+        <para>MD5 sum: <literal>&module-init-tools-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Ncurses (&ncurses-version;) - <token>&ncurses-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&ncurses-home;"/></para>
+        <para>Download: <ulink url="&ncurses-url;"/></para>
+        <para>MD5 sum: <literal>&ncurses-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <!-- FIXME:
+    <varlistentry>
+      <term>Ncurses Rollup Patch (&ncurses-date;) - 328 KB:</term>
+      <listitem>
+        <para><ulink url="ftp://invisible-island.net/ncurses/&ncurses-version;/"/></para>
+
+        <note>
+          <para>Ncurses Rollup Patch (&ncurses-date;) may no longer be available
+          at the listed location. The site administrators of the master download
+          location occasionally remove older versions when new ones are released.
+          There is no alternative download location yet.</para>
+        </note>
+      </listitem>
+    </varlistentry>
+    -->
+
+    <varlistentry>
+      <term>Patch (&patch-version;) - <token>&patch-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&patch-home;"/></para>
+        <para>Download: <ulink url="&patch-url;"/></para>
+        <para>MD5 sum: <literal>&patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Perl (&perl-version;) - <token>&perl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&perl-home;"/></para>
+        <para>Download: <ulink url="&perl-url;"/></para>
+        <para>MD5 sum: <literal>&perl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Procps (&procps-version;) - <token>&procps-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&procps-home;"/></para>
+        <para>Download: <ulink url="&procps-url;"/></para>
+        <para>MD5 sum: <literal>&procps-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Psmisc (&psmisc-version;) - <token>&psmisc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&psmisc-home;"/></para>
+        <para>Download: <ulink url="&psmisc-url;"/></para>
+        <para>MD5 sum: <literal>&psmisc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Readline (&readline-version;) - <token>&readline-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&readline-home;"/></para>
+        <para>Download: <ulink url="&readline-url;"/></para>
+        <para>MD5 sum: <literal>&readline-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sed (&sed-version;) - <token>&sed-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&sed-home;"/></para>
+        <para>Download: <ulink url="&sed-url;"/></para>
+        <para>MD5 sum: <literal>&sed-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Shadow (&shadow-version;) - <token>&shadow-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&shadow-home;"/></para>
+        <para>Download: <ulink url="&shadow-url;"/></para>
+        <para>MD5 sum: <literal>&shadow-md5;</literal></para>
+
+        <note>
+          <para>Shadow (&shadow-version;) may no longer be available at the
+          listed location. The site administrators of the master download
+          location occasionally remove older versions when new ones are released.
+          An alternative download location that may have the correct version
+          available can also be found at: <ulink
+          url="http://www.linuxfromscratch.org/lfs/download.html#ftp"/>.</para>
+        </note>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sysklogd (&sysklogd-version;) - <token>&sysklogd-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&sysklogd-home;"/></para>
+        <para>Download: <ulink url="&sysklogd-url;"/></para>
+        <para>MD5 sum: <literal>&sysklogd-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sysvinit (&sysvinit-version;) - <token>&sysvinit-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&sysvinit-home;"/></para>
+        <para>Download: <ulink url="&sysvinit-url;"/></para>
+        <para>MD5 sum: <literal>&sysvinit-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar (&tar-version;) - <token>&tar-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&tar-home;"/></para>
+        <para>Download: <ulink url="&tar-url;"/></para>
+        <para>MD5 sum: <literal>&tar-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tcl (&tcl-version;) - <token>&tcl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&tcl-home;"/></para>
+        <para>Download: <ulink url="&tcl-url;"/></para>
+        <para>MD5 sum: <literal>&tcl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Texinfo (&texinfo-version;) - <token>&texinfo-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&texinfo-home;"/></para>
+        <para>Download: <ulink url="&texinfo-url;"/></para>
+        <para>MD5 sum: <literal>&texinfo-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Udev (&udev-version;) - <token>&udev-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&udev-home;"/></para>
+        <para>Download: <ulink url="&udev-url;"/></para>
+        <para>MD5 sum: <literal>&udev-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Udev Configuration Tarball - <token>&udev-config-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&udev-config-home;"/></para>
+        <para>Download: <ulink url="&udev-config-url;"/></para>
+        <para>MD5 sum: <literal>&udev-config-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Util-linux (&util-linux-version;) - <token>&util-linux-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&util-linux-home;"/></para>
+        <para>Download: <ulink url="&util-linux-url;"/></para>
+        <para>MD5 sum: <literal>&util-linux-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Vim (&vim-version;) - <token>&vim-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&vim-home;"/></para>
+        <para>Download: <ulink url="&vim-url;"/></para>
+        <para>MD5 sum: <literal>&vim-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Vim (&vim-lang-version;) language files (optional) - <token>&vim-lang-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&vim-lang-home;"/></para>
+        <para>Download: <ulink url="&vim-lang-url;"/></para>
+        <para>MD5 sum: <literal>&vim-lang-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Zlib (&zlib-version;) - <token>&zlib-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&zlib-home;"/></para>
+        <para>Download: <ulink url="&zlib-url;"/></para>
+        <para>MD5 sum: <literal>&zlib-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+  </variablelist>
+
+  <para>Total size of these packages: about <returnvalue/></para>
+
+</sect1>

+ 305 - 0
chapter03/patches.xml

@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="materials-patches">
+  <?dbhtml filename="patches.html"?>
+
+  <title>Needed Patches</title>
+
+  <para>In addition to the packages, several patches are also required.
+  These patches correct any mistakes in the packages that should be
+  fixed by the maintainer.  The patches also make small modifications to
+  make the packages easier to work with. The following patches will be
+  needed to build an LFS system:</para>
+
+  <variablelist role="materials">
+
+    <varlistentry>
+      <term>Bash Upstream Fixes Patch - <token>&bash-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&bash-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&bash-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bzip2 Bzgrep Security Fixes Patch - <token>&bzip2-bzgrep-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&bzip2-bzgrep-patch;"/></para>
+        <para>MD5 sum: <literal>&bzip2-bzgrep-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Bzip2 Documentation Patch - <token>&bzip2-docs-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&bzip2-docs-patch;"/></para>
+        <para>MD5 sum: <literal>&bzip2-docs-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Coreutils Internationalization Fixes Patch - <token>&coreutils-i18n-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&coreutils-i18n-patch;"/></para>
+        <para>MD5 sum: <literal>&coreutils-i18n-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Coreutils Suppress Uptime, Kill, Su Patch - <token>&coreutils-suppress-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&coreutils-suppress-patch;"/></para>
+        <para>MD5 sum: <literal>&coreutils-suppress-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Coreutils Uname Patch - <token>&coreutils-uname-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&coreutils-uname-patch;"/></para>
+        <para>MD5 sum: <literal>&coreutils-uname-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Diffutils Internationalization Fixes Patch - <token>&diffutils-i18n-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&diffutils-i18n-patch;"/></para>
+        <para>MD5 sum: <literal>&diffutils-i18n-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Expect Spawn Patch - <token>&expect-spawn-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&expect-spawn-patch;"/></para>
+        <para>MD5 sum: <literal>&expect-spawn-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gawk Segfault Patch - <token>&gawk-segfault-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&gawk-segfault-patch;"/></para>
+        <para>MD5 sum: <literal>&gawk-segfault-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>GCC Specs Patch - <token>&gcc-specs-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&gcc-specs-patch;"/></para>
+        <para>MD5 sum: <literal>&gcc-specs-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Glibc Linux Types Patch - <token>&glibc-linux_types-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&glibc-linux_types-patch;"/></para>
+        <para>MD5 sum: <literal>&glibc-linux_types-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Grep RedHat Fixes Patch - <token>&grep-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&grep-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&grep-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Groff Debian Patch - <token>&groff-debian-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&groff-debian-patch;"/></para>
+        <para>MD5 sum: <literal>&groff-debian-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Gzip Security Patch - <token>&gzip-security_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&gzip-security_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&gzip-security_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Inetutils GCC-4.x Fix Patch - <token>&inetutils-gcc4_fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&inetutils-gcc4_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&inetutils-gcc4_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Inetutils No-Server-Man-Pages Patch - <token>&inetutils-man_pages-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&inetutils-man_pages-patch;"/></para>
+        <para>MD5 sum: <literal>&inetutils-man_pages-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Kbd Backspace/Delete Fix Patch - <token>&kbd-backspace-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&kbd-backspace-patch;"/></para>
+        <para>MD5 sum: <literal>&kbd-backspace-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Kbd GCC-4.x Fix Patch - <token>&kbd-gcc4_fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&kbd-gcc4_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&kbd-gcc4_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Linux kernel UTF-8 Composing Patch - <token>&linux-utf8-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&linux-utf8-patch;"/></para>
+        <para>MD5 sum: <literal>&linux-utf8-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Mktemp Tempfile Patch - <token>&mktemp-tempfile-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&mktemp-tempfile-patch;"/></para>
+        <para>MD5 sum: <literal>&mktemp-tempfile-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Module-init-tools Patch - <token>&module-init-modprobe-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&module-init-modprobe-patch;"/></para>
+        <para>MD5 sum: <literal>&module-init-modprobe-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Ncurses Fixes Patch - <token>&ncurses-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&ncurses-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&ncurses-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Perl Libc Patch - <token>&perl-libc-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&perl-libc-patch;"/></para>
+        <para>MD5 sum: <literal>&perl-libc-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Readline Upstream Fixes Patch - <token>&readline-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&readline-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&readline-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sysklogd 8-Bit Cleanness Patch - <token>&sysklogd-8bit-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&sysklogd-8bit-patch;"/></para>
+        <para>MD5 sum: <literal>&sysklogd-8bit-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Sysklogd Fixes Patch - <token>&sysklogd-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&sysklogd-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&sysklogd-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar GCC-4.x Fix Patch - <token>&tar-gcc4_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&tar-gcc4_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&tar-gcc4_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar Security Fixes Patch - <token>&tar-security_fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&tar-security_fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&tar-security_fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Tar Sparse Fix Patch - <token>&tar-sparse_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&tar-sparse_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&tar-sparse_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Texinfo Multibyte Fixes Patch - <token>&texinfo-multibyte-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&texinfo-multibyte-patch;"/></para>
+        <para>MD5 sum: <literal>&texinfo-multibyte-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+
+    <varlistentry>
+      <term>Texinfo Tempfile Fix Patch - <token>&texinfo-tempfile_fix-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&texinfo-tempfile_fix-patch;"/></para>
+        <para>MD5 sum: <literal>&texinfo-tempfile_fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Util-linux Cramfs Patch - <token>&util-linux-cramfs-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&util-linux-cramfs-patch;"/></para>
+        <para>MD5 sum: <literal>&util-linux-cramfs-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Vim Upstream Fixes Patch - <token>&vim-fixes-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&vim-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&vim-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Vim Man Directories Patch - <token>&vim-mandir-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="&patches-root;&vim-mandir-patch;"/></para>
+        <para>MD5 sum: <literal>&vim-mandir-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+  </variablelist>
+
+  <para>Total size of these patches: about <returnvalue/></para>
+
+  <para>In addition to the above required patches, there exist a number of
+  optional patches created by the LFS community. These optional patches
+  solve minor problems or enable functionality that is not enabled by
+  default. Feel free to peruse the patches database located at
+  <ulink url="&lfs-root;patches/"/> and acquire any additional
+  patches to suit the system needs.</para>
+
+</sect1>

+ 39 - 0
chapter04/aboutlfs.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="prepare-aboutlfs">
+  <?dbhtml filename="aboutlfs.html"?>
+
+  <title>About $LFS</title>
+
+  <para>Throughout this book, the environment variable <envar>LFS</envar> will
+  be used several times. It is paramount that this variable is always defined.
+  It should be set to the mount point chosen for the LFS partition.
+  Check that the <envar>LFS</envar> variable is set up properly with:</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> if the
+  provided example was followed. If the output is incorrect, the
+  variable can be set with:</para>
+
+<screen role="nodump"><userinput>export LFS=/mnt/lfs</userinput></screen>
+
+  <para>Having this variable set is beneficial in that commands such as
+  <command>mkdir $LFS/tools</command> can be typed literally. The shell
+  will automatically replace <quote>$LFS</quote> with
+  <quote>/mnt/lfs</quote> (or whatever the variable was set to) when it
+  processes the command line.</para>
+
+  <para>Do not forget to check that <envar>$LFS</envar> is set whenever
+  you leave and reenter the current working environment (as when doing a
+  <command>su</command> to <systemitem class="username">root</systemitem>
+  or another user).</para>
+
+</sect1>
+

+ 45 - 0
chapter04/aboutsbus.xml

@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="prepare-aboutsbus">
+  <?dbhtml filename="aboutsbus.html"?>
+
+  <title>About SBUs</title>
+
+  <para>Many people would like to know beforehand approximately how long
+  it takes to compile and install each package. Because Linux From
+  Scratch can be built on many different systems, it is impossible to
+  provide accurate time estimates. The biggest package (Glibc) will
+  take approximately 20 minutes on the fastest systems, but could take
+  up to three days on slower systems! Instead of providing actual times,
+  the Standard Build Unit (SBU) measure will be
+  used instead.</para>
+
+  <para>The SBU measure works as follows. The first package to be compiled
+  from this book is Binutils in <xref linkend="chapter-temporary-tools"/>. The
+  time it takes to compile this package is what will be referred to as the
+  Standard Build Unit or SBU. All other compile times will be expressed relative
+  to this time.</para>
+
+  <para>For example, consider a package whose compilation time is 4.5
+  SBUs. This means that if a system took 10 minutes to compile and
+  install the first pass of Binutils, it will take
+  <emphasis>approximately</emphasis> 45 minutes to build this example package.
+  Fortunately, most build times are shorter than the one for Binutils.</para>
+
+  <para>In general, SBUs are not entirely accurate because they depend on many
+  factors, including the host system's version of GCC. Note that on Symmetric
+  Multi-Processor (SMP)-based machines, SBUs are even less accurate. They are
+  provided here to give an estimate of how long it might take to install a
+  package, but the numbers can vary by as much as dozens of minutes in some
+  cases.</para>
+
+  <para>To view actual timings for a number of specific machines, we recommend
+  The LinuxFromScratch SBU Home Page at <ulink url="&lfs-root;~sbu/"/>.</para>
+
+</sect1>
+

+ 52 - 0
chapter04/abouttestsuites.xml

@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="prepare-abouttestsuites">
+  <?dbhtml filename="abouttestsuites.html"?>
+
+  <title>About the Test Suites</title>
+
+  <para>Most packages provide a test suite. Running the test suite for a
+  newly built package is a good idea because it can provide a <quote>sanity
+  check</quote> indicating that everything compiled correctly. A test suite
+  that passes its set of checks usually proves that the package is
+  functioning as the developer intended. It does not, however, guarantee
+  that the package is totally bug free.</para>
+
+  <para>Some test suites are more important than others. For example,
+  the test suites for the core toolchain packages&mdash;GCC, Binutils, and
+  Glibc&mdash;are of the utmost importance due to their central role in a
+  properly functioning system. The test suites for GCC and Glibc can
+  take a very long time to complete, especially on slower hardware, but
+  are strongly recommended.</para>
+
+  <note>
+    <para>Experience has shown that there is little to be gained from running
+    the test suites in <xref linkend="chapter-temporary-tools"/>. There can be
+    no escaping the fact that the host system always exerts some influence on
+    the tests in that chapter, often causing inexplicable failures. Because
+    the tools built in <xref linkend="chapter-temporary-tools"/> are temporary
+    and eventually discarded, we do not recommend running the test suites in
+    <xref linkend="chapter-temporary-tools"/> for the average reader. The
+    instructions for running those test suites are provided for the benefit of
+    testers and developers, but they are strictly optional.</para>
+  </note>
+
+  <para>A common issue with running the test suites for Binutils and GCC
+  is running out of pseudo terminals (PTYs). This can result in a high
+  number of failing tests. This may happen for several reasons, but the
+  most likely cause is that the host system does not have the
+  <systemitem class="filesystem">devpts</systemitem> file system set up
+  correctly. This issue is discussed in greater detail in <xref
+  linkend="chapter-temporary-tools"/>.</para>
+
+  <para>Sometimes package test suites will fail, but for reasons which the
+  developers are aware of and have deemed non-critical. Consult the logs located
+  at <ulink url="&test-results;"/> to verify whether or not these failures are
+  expected. This site is valid for all tests throughout this book.</para>
+
+</sect1>

+ 102 - 0
chapter04/addinguser.xml

@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-addinguser">
+  <?dbhtml filename="addinguser.html"?>
+
+  <title>Adding the LFS User</title>
+
+  <para>When logged in as user <systemitem class="username">root</systemitem>,
+  making a single mistake can damage or destroy a system. Therefore, we
+  recommend building the packages in this chapter as an unprivileged user.
+  You could use your own user name, but to make it easier to set up a clean
+  working environment, create a new user called <systemitem
+  class="username">lfs</systemitem> as a member of a new group (also named
+  <systemitem class="groupname">lfs</systemitem>) and use this user during
+  the installation process. As <systemitem class="username">root</systemitem>,
+  issue the following commands to add the new user:</para>
+
+<screen><userinput>groupadd lfs
+useradd -s /bin/bash -g lfs -m -k /dev/null lfs</userinput></screen>
+
+  <variablelist>
+    <title>The meaning of the command line options:</title>
+
+    <varlistentry>
+      <term><parameter>-s /bin/bash</parameter></term>
+      <listitem>
+        <para>This makes <command>bash</command> the default shell for user
+        <systemitem class="username">lfs</systemitem>.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>-g lfs</parameter></term>
+      <listitem>
+        <para>This option adds user <systemitem class="username">lfs</systemitem>
+        to group <systemitem class="groupname">lfs</systemitem>.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>-m</parameter></term>
+      <listitem>
+        <para>This creates a home directory for <systemitem
+        class="username">lfs</systemitem>.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>-k /dev/null</parameter></term>
+      <listitem>
+        <para>This parameter prevents possible copying of files from a skeleton
+        directory (default is <filename class="directory">/etc/skel</filename>)
+        by changing the input location to the special null device.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>lfs</parameter></term>
+      <listitem>
+        <para>This is the actual name for the created group and user.</para>
+      </listitem>
+    </varlistentry>
+
+  </variablelist>
+
+  <para>To log in as <systemitem class="username">lfs</systemitem> (as opposed
+  to switching to user <systemitem class="username">lfs</systemitem> when logged
+  in as <systemitem class="username">root</systemitem>, which does not require
+  the <systemitem class="username">lfs</systemitem> user to have a password),
+  give <systemitem class="username">lfs</systemitem> a password:</para>
+
+<screen role="nodump"><userinput>passwd lfs</userinput></screen>
+
+  <para>Grant <systemitem class="username">lfs</systemitem> full access to
+  <filename class="directory">$LFS/tools</filename> by making
+  <systemitem class="username">lfs</systemitem> the directory owner:</para>
+
+<screen><userinput>chown -v lfs $LFS/tools</userinput></screen>
+
+  <para>If a separate working directory was created as suggested, give
+  user <systemitem class="username">lfs</systemitem> ownership of this
+  directory:</para>
+
+<screen><userinput>chown -v lfs $LFS/sources</userinput></screen>
+
+  <para>Next, login as user <systemitem class="username">lfs</systemitem>.
+  This can be done via a virtual console, through a display manager, or with
+  the following substitute user command:</para>
+
+<screen role="nodump"><userinput>su - lfs</userinput></screen>
+
+  <para>The <quote><parameter>-</parameter></quote> instructs
+  <command>su</command> to start a login shell as opposed to a non-login shell.
+  The difference between these two types of shells can be found in detail in
+  <filename>bash(1)</filename> and <command>info bash</command>.</para>
+
+</sect1>

+ 21 - 0
chapter04/chapter04.xml

@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<chapter id="chapter-final-preps" xreflabel="Chapter 4">
+  <?dbhtml dir="chapter04"?>
+  <?dbhtml filename="chapter04.html"?>
+
+  <title>Final Preparations</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutlfs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingtoolsdir.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="addinguser.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="settingenviron.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutsbus.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="abouttestsuites.xml"/>
+
+</chapter>

+ 48 - 0
chapter04/creatingtoolsdir.xml

@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-creatingtoolsdir">
+  <?dbhtml filename="creatingtoolsdir.html"?>
+
+  <title>Creating the $LFS/tools Directory</title>
+
+  <para>All programs compiled in <xref linkend="chapter-temporary-tools"/>
+  will be installed under <filename class="directory">$LFS/tools</filename>
+  to keep them separate from the programs compiled in <xref
+  linkend="chapter-building-system"/>. The programs compiled here are
+  temporary tools and will not be a part of the final LFS system. By keeping
+  these programs in a separate directory, they can easily be discarded later
+  after their use. This also prevents these programs from ending up in the
+  host production directories (easy to do by accident in <xref
+  linkend="chapter-temporary-tools"/>).</para>
+
+  <para>Create the required directory by running the following as
+  <systemitem class="username">root</systemitem>:</para>
+
+<screen><userinput>mkdir -v $LFS/tools</userinput></screen>
+
+  <para>The next step is to create a <filename class="symlink">/tools</filename>
+  symlink on the host system. This will point to the newly-created directory on
+  the LFS partition. Run this command as <systemitem
+  class="username">root</systemitem> as well:</para>
+
+<screen><userinput>ln -sv $LFS/tools /</userinput></screen>
+
+  <note>
+    <para>The above command is correct. The <command>ln</command> command
+    has a few syntactic variations, so be sure to check
+    <command>info coreutils ln</command> and <filename>ln(1)</filename>
+    before reporting what you may think is an error.</para>
+  </note>
+
+  <para>The created symlink enables the toolchain to be compiled so that it
+  always refers to <filename class="directory">/tools</filename>, meaning
+  that the compiler, assembler, and linker will work both in this chapter
+  (when we are still using some tools from the host) and in the next (when
+  we are <quote>chrooted</quote> to the LFS partition).</para>
+
+</sect1>

+ 91 - 0
chapter04/settingenviron.xml

@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-settingenviron">
+  <?dbhtml filename="settingenvironment.html"?>
+
+  <title>Setting Up the Environment</title>
+
+  <para>Set up a good working environment by creating two new startup files
+  for the <command>bash</command> shell. While logged in as user
+  <systemitem class="username">lfs</systemitem>, issue the following command
+  to create a new <filename>.bash_profile</filename>:</para>
+
+<screen><userinput>cat &gt; ~/.bash_profile &lt;&lt; "EOF"
+<literal>exec env -i HOME=$HOME TERM=$TERM PS1='\u:\w\$ ' /bin/bash</literal>
+EOF</userinput></screen>
+
+  <para>When logged on as user <systemitem class="username">lfs</systemitem>,
+  the initial shell is usually a <emphasis>login</emphasis> shell which reads
+  the <filename>/etc/profile</filename> of the host (probably containing some
+  settings and environment variables) and then <filename>.bash_profile</filename>.
+  The <command>exec env -i.../bin/bash</command> command in the
+  <filename>.bash_profile</filename> file replaces the running shell with a new
+  one with a completely empty environment, except for the <envar>HOME</envar>,
+  <envar>TERM</envar>, and <envar>PS1</envar> variables. This ensures that no
+  unwanted and potentially hazardous environment variables from the host system
+  leak into the build environment. The technique used here achieves the goal of
+  ensuring a clean environment.</para>
+
+  <para>The new instance of the shell is a <emphasis>non-login</emphasis>
+  shell, which does not read the <filename>/etc/profile</filename> or
+  <filename>.bash_profile</filename> files, but rather reads the
+  <filename>.bashrc</filename> file instead. Create the
+  <filename>.bashrc</filename> file now:</para>
+
+<screen><userinput>cat &gt; ~/.bashrc &lt;&lt; "EOF"
+<literal>set +h
+umask 022
+LFS=/mnt/lfs
+LC_ALL=POSIX
+PATH=/tools/bin:/bin:/usr/bin
+export LFS LC_ALL PATH</literal>
+EOF</userinput></screen>
+
+  <para>The <command>set +h</command> command turns off
+  <command>bash</command>'s hash function. Hashing is ordinarily a useful
+  feature&mdash;<command>bash</command> uses a hash table to remember the
+  full path of executable files to avoid searching the <envar>PATH</envar>
+  time and again to find the same executable. However, the new tools should
+  be used as soon as they are installed. By switching off the hash function,
+  the shell will always search the <envar>PATH</envar> when a program is to
+  be run. As such, the shell will find the newly compiled tools in
+  <filename class="directory">$LFS/tools</filename> as soon as they are
+  available without remembering a previous version of the same program in a
+  different location.</para>
+
+  <para>Setting the user file-creation mask (umask) to 022 ensures that newly
+  created files and directories are only writable by their owner, but are
+  readable and executable by anyone (assuming default modes are used by the
+  <function>open(2)</function> system call, new files will end up with permission
+  mode 644 and directories with mode 755).</para>
+
+  <para>The <envar>LFS</envar> variable should be set to the chosen mount
+  point.</para>
+
+  <para>The <envar>LC_ALL</envar> variable controls the localization of certain
+  programs, making their messages follow the conventions of a specified country.
+  If the host system uses a version of Glibc older than 2.2.4, having
+  <envar>LC_ALL</envar> set to something other than <quote>POSIX</quote> or
+  <quote>C</quote> (during this chapter) may cause issues if you exit the chroot
+  environment and wish to return later. Setting <envar>LC_ALL</envar> to
+  <quote>POSIX</quote> or <quote>C</quote> (the two are equivalent) ensures that
+  everything will work as expected in the chroot environment.</para>
+
+  <para>By putting <filename class="directory">/tools/bin</filename> ahead of the
+  standard <envar>PATH</envar>, all the programs installed in <xref
+  linkend="chapter-temporary-tools"/> are picked up by the shell immediately after
+  their installation. This, combined with turning off hashing, limits the risk
+  that old programs are used from the host when the same programs are available in
+  the chapter 5 environment.</para>
+
+  <para>Finally, to have the environment fully prepared for building the
+  temporary tools, source the just-created user profile:</para>
+
+<screen><userinput>source ~/.bash_profile</userinput></screen>
+
+</sect1>

+ 126 - 0
chapter05/adjusting.xml

@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-adjusting">
+  <?dbhtml filename="adjusting.html"?>
+
+  <title>Adjusting the Toolchain</title>
+
+  <para>Now that the temporary C libraries have been installed, all
+  tools compiled in the rest of this chapter should be linked against
+  these libraries. In order to accomplish this, the linker and the
+  compiler's specs file need to be adjusted.</para>
+
+  <para>The linker, adjusted at the end of the first pass of Binutils, needs
+  to be renamed so that it can be properly found and used. First, backup the
+  original linker, then replace it with the adjusted linker. We'll also
+  create a link to its counterpart in <filename class="directory">
+  /tools/$(gcc -dumpmachine)/bin</filename></para>
+
+<screen><userinput>mv -v /tools/bin/{ld,ld-old}
+mv -v /tools/$(gcc -dumpmachine)/bin/{ld,ld-old}
+mv -v /tools/bin/{ld-new,ld}
+ln -sv /tools/bin/ld /tools/$(gcc -dumpmachine)/bin/ld</userinput></screen>
+
+  <para>From this point onwards, everything will link only against the
+  libraries in <filename class="directory">/tools/lib</filename>.</para>
+
+  <para>The next task is to point GCC to the new dynamic linker. This is done by
+  dumping GCC's <quote>specs</quote> file to a location where GCC will look for it
+  by default. A simple <command>sed</command> substitution then alters the
+  dynamic linker that GCC will use:</para>
+
+<!-- Ampersands are needed to allow copy and paste -->
+<screen><userinput>SPECFILE=`dirname $(gcc -print-libgcc-file-name)`/specs &amp;&amp;
+gcc -dumpspecs > $SPECFILE &amp;&amp;
+sed 's@^/lib/ld-linux.so.2@/tools&amp;@g' $SPECFILE &gt; tempspecfile &amp;&amp;
+mv -vf tempspecfile $SPECFILE &amp;&amp;
+unset SPECFILE</userinput></screen>
+
+  <para>It is recommended that the above command be copy-and-pasted in order to
+  ensure accuracy. Alternatively, the specs file can be edited by hand. This is
+  done by replacing every occurrence of <quote>/lib/ld-linux.so.2</quote> with
+  <quote>/tools/lib/ld-linux.so.2</quote></para>
+
+  <para>Be sure to visually inspect the specs file in order to verify the
+  intended changes have been made.</para>
+
+  <important>
+    <para>If working on a platform where the name of the dynamic linker is
+    something other than <filename class="libraryfile">ld-linux.so.2</filename>,
+    replace <quote>ld-linux.so.2</quote> with the name of the platform's
+    dynamic linker in the above commands. Refer back to <xref
+    linkend="ch-tools-toolchaintechnotes" role=","/> if necessary.</para>
+  </important>
+
+  <para>During the build process, GCC runs a script
+  (<command>fixincludes</command>) that scans the system for header files
+  that may need to be fixed (they might contain syntax errors, for example),
+  and installs the fixed versions in a private include directory. There is a
+  possibility that, as a result of this process, some header files from the
+  host system have found their way into GCC's private include directory. As
+  the rest of this chapter only requires the headers from GCC and Glibc,
+  which have both been installed at this point, any <quote>fixed</quote>
+  headers can safely be removed. This helps to avoid any host headers
+  polluting the build environment. Run the following commands to remove the
+  header files in GCC's private include directory (you may find it easier to
+  copy and paste these commands, rather than typing them by hand, due to
+  their length):</para>
+
+<!-- && used to ease copy and pasting -->
+<screen><userinput>GCC_INCLUDEDIR=`dirname $(gcc -print-libgcc-file-name)`/include &amp;&amp;
+find ${GCC_INCLUDEDIR}/* -maxdepth 0 -xtype d -exec rm -rvf '{}' \; &amp;&amp;
+rm -vf `grep -l "DO NOT EDIT THIS FILE" ${GCC_INCLUDEDIR}/*` &amp;&amp;
+unset GCC_INCLUDEDIR</userinput></screen>
+
+  <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>
+
+<screen><userinput>echo 'main(){}' &gt; dummy.c
+cc dummy.c
+readelf -l a.out | grep ': /tools'</userinput></screen>
+
+    <para>If everything is working correctly, there should be no errors,
+    and the output of the last command will be of the form:</para>
+
+<screen><computeroutput>[Requesting program interpreter:
+    /tools/lib/ld-linux.so.2]</computeroutput></screen>
+
+    <para>Note that <filename class="directory">/tools/lib</filename>
+    appears as the prefix of the dynamic linker.</para>
+
+    <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. First, perform the sanity check again, using
+    <command>gcc</command> instead of <command>cc</command>. If this works,
+    then the <filename class="symlink">/tools/bin/cc</filename> symlink is
+    missing. Revisit <xref linkend="ch-tools-gcc-pass1" role=","/> and install
+    the symlink. Next, ensure that the <envar>PATH</envar> is correct. This
+    can be checked by running <command>echo $PATH</command> and verifying that
+    <filename class="directory">/tools/bin</filename> is at the head of the
+    list. If the <envar>PATH</envar> is wrong it could mean that you are not
+    logged in as user <systemitem class="username">lfs</systemitem> or that
+    something went wrong back in <xref linkend="ch-tools-settingenviron"
+    role="."/> Another option is that something may have gone wrong with the
+    specs file amendment above. In this case, redo the specs file amendment,
+    being careful to copy-and-paste the commands.</para>
+
+    <para>Once all is well, clean up the test files:</para>
+
+<screen><userinput>rm -v dummy.c a.out</userinput></screen>
+
+  </caution>
+
+  <note><para>Building TCL in the next section will serve as an additional check that
+  the toolchain has been built properly.  If TCL fails to build, it is an
+  indication that something has gone wrong with the Binutils, GCC, or Glibc
+  installation, but not with TCL itself.</para></note>
+
+</sect1>

+ 86 - 0
chapter05/bash.xml

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-bash" role="wrap">
+  <?dbhtml filename="bash.html"?>
+
+  <title>Bash-&bash-version;</title>
+
+  <indexterm zone="ch-tools-bash">
+    <primary sortas="a-Bash">Bash</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/bash.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bash-ch5-sbu;</seg>
+        <seg>&bash-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bash</title>
+
+    <para>Prepare Bash for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools --without-bash-malloc</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--without-bash-malloc</parameter></term>
+        <listitem>
+          <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>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make tests</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Make a link for the programs that use <command>sh</command> for
+    a shell:</para>
+
+<screen><userinput>ln -vs bash /tools/bin/sh</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-bash" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 144 - 0
chapter05/binutils-pass1.xml

@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-binutils-pass1" role="wrap">
+  <?dbhtml filename="binutils-pass1.html"?>
+
+  <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/2003/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 Binutils</title>
+
+    <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 outside of the
+    source directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir -v ../binutils-build
+cd ../binutils-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 three commands in a <command>time</command>
+      command like this: <userinput>time { ./configure ... &amp;&amp; make
+      &amp;&amp; make install; }</userinput>.</para>
+    </note>
+
+    <para>Now prepare Binutils for compilation:</para>
+
+<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools --disable-nls</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--prefix=/tools</parameter></term>
+        <listitem>
+          <para>This tells the configure script to prepare to install the
+          Binutils programs in the <filename class="directory">/tools</filename>
+          directory.</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>
+
+    </variablelist>
+
+    <para>Continue with compiling the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>Compilation is now complete. Ordinarily we would now run the
+    test suite, but at this early stage the test suite framework (Tcl,
+    Expect, and DejaGNU) is not yet in place. The benefits of running the
+    tests at this point are minimal since the programs from this
+    first pass will soon be replaced by those from the second.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Next, prepare the linker for the <quote>Adjusting</quote> phase
+    later on:</para>
+
+<screen><userinput>make -C ld clean
+make -C ld LIB_PATH=/tools/lib
+cp -v ld/ld-new /tools/bin</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make parameters:</title>
+
+      <varlistentry>
+        <term><parameter>-C ld clean</parameter></term>
+        <listitem>
+          <para>This tells the make program to remove all compiled
+          files in the <filename class="directory">ld</filename>
+          subdirectory.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>-C ld LIB_PATH=/tools/lib</parameter></term>
+        <listitem>
+          <para>This option rebuilds everything in the <filename
+          class="directory">ld</filename> subdirectory. Specifying the
+          <envar>LIB_PATH</envar> Makefile variable on the command line
+          allows us to override the default value and point it to the
+          temporary tools location. The value of this variable specifies
+          the linker's default library search path. This preparation is
+          used later in the chapter.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-binutils" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 99 - 0
chapter05/binutils-pass2.xml

@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-binutils-pass2" role="wrap">
+  <?dbhtml filename="binutils-pass2.html"?>
+
+  <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/2003/XInclude"
+    href="../chapter06/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>Re-installation of Binutils</title>
+
+    <para>Create a separate build directory again:</para>
+
+<screen><userinput>mkdir -v ../binutils-build
+cd ../binutils-build</userinput></screen>
+
+    <para>Prepare Binutils for compilation:</para>
+
+<screen><userinput>../binutils-&binutils-version;/configure --prefix=/tools \
+    --disable-nls --with-lib-path=/tools/lib</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the new configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--with-lib-path=/tools/lib</parameter></term>
+        <listitem>
+          <para>This tells the configure script to specify the library
+          search path during the compilation of Binutils, resulting in
+          <filename class="directory">/tools/lib</filename> being passed
+          to the linker. This prevents the linker from searching through
+          library directories on the host.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>Compilation is now complete. As discussed earlier, running the
+    test suite is not mandatory for the temporary tools here in this
+    chapter. To run the Binutils test suite anyway, issue the following
+    command:</para>
+
+<screen><userinput>make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Now prepare the linker for the <quote>Re-adjusting</quote> phase in
+    the next chapter:</para>
+
+<screen><userinput>make -C ld clean
+make -C ld LIB_PATH=/usr/lib:/lib
+cp -v ld/ld-new /tools/bin</userinput></screen>
+
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-binutils" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 65 - 0
chapter05/bison.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-bison" role="wrap">
+  <?dbhtml filename="bison.html"?>
+
+  <title>Bison-&bison-version;</title>
+
+  <indexterm zone="ch-tools-bison">
+    <primary sortas="a-Bison">Bison</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/bison.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bison-ch5-sbu;</seg>
+        <seg>&bison-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bison</title>
+
+    <para>Prepare Bison for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-bison" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 59 - 0
chapter05/bzip2.xml

@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-bzip2" role="wrap">
+  <?dbhtml filename="bzip2.html"?>
+
+  <title>Bzip2-&bzip2-version;</title>
+
+  <indexterm zone="ch-tools-bzip2">
+    <primary sortas="a-Bzip2">Bzip2</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/bzip2.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bzip2-ch5-sbu;</seg>
+        <seg>&bzip2-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bzip2</title>
+
+    <para>The Bzip2 package does not contain a <command>configure</command>
+    script. Compile and test it with:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make PREFIX=/tools install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-bzip2" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 46 - 0
chapter05/changingowner.xml

@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!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 <filename class="directory">$LFS/tools</filename> directory
+  is owned by the user <systemitem class="username">lfs</systemitem>, a user
+  that exists only on the host system. If the <filename
+  class="directory">$LFS/tools</filename> directory is kept as is, 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 the
+  <filename class="directory">$LFS/tools</filename> directory and all the files
+  therein, 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/tools</filename> directory to
+  user <systemitem class="username">root</systemitem> by running the following
+  command:</para>
+
+<screen><userinput>chown -R root:root $LFS/tools</userinput></screen>
+
+  <para>Although the <filename class="directory">$LFS/tools</filename> directory
+  can be deleted once the LFS system has been finished, it can be retained to build
+  additional LFS systems <emphasis>of the same book version</emphasis>. How best
+  to backup <filename class="directory">$LFS/tools</filename> is a matter of
+  personal preference and is left as an exercise for the reader.</para>
+
+</sect1>

+ 47 - 0
chapter05/chapter05.xml

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<chapter id="chapter-temporary-tools" xreflabel="Chapter 5">
+  <?dbhtml dir="chapter05"?>
+  <?dbhtml filename="chapter05.html"?>
+
+  <title>Constructing a Temporary System</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="toolchaintechnotes.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass1.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass1.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="adjusting.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tcl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="expect.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="dejagnu.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc-pass2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils-pass2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="stripping.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="changingowner.xml"/>
+
+</chapter>

+ 69 - 0
chapter05/coreutils.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-coreutils" role="wrap">
+  <?dbhtml filename="coreutils.html"?>
+
+  <title>Coreutils-&coreutils-version;</title>
+
+  <indexterm zone="ch-tools-coreutils">
+    <primary sortas="a-Coreutils">Coreutils</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/coreutils.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&coreutils-ch5-sbu;</seg>
+        <seg>&coreutils-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Coreutils</title>
+
+    <para>Prepare Coreutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make RUN_EXPENSIVE_TESTS=yes check</userinput>. The
+    <parameter>RUN_EXPENSIVE_TESTS=yes</parameter> parameter tells the
+    test suite to run several additional tests that are considered
+    relatively expensive (in terms of CPU power and memory usage) on some
+    platforms, but generally are not a problem on Linux.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-coreutils" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 83 - 0
chapter05/dejagnu.xml

@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-dejagnu" role="wrap">
+  <?dbhtml filename="dejagnu.html"?>
+
+  <title>DejaGNU-&dejagnu-version;</title>
+
+  <indexterm zone="ch-tools-dejagnu">
+    <primary sortas="a-DejaGNU">DejaGNU</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The DejaGNU package contains a framework for testing other
+    programs.</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>./configure --prefix=/tools</userinput></screen>
+
+    <para>Build and install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+  </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>

+ 64 - 0
chapter05/diffutils.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-diffutils" role="wrap">
+  <?dbhtml filename="diffutils.html"?>
+
+  <title>Diffutils-&diffutils-version;</title>
+
+  <indexterm zone="ch-tools-diffutils">
+    <primary sortas="a-Diffutils">Diffutils</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/diffutils.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&diffutils-ch5-sbu;</seg>
+        <seg>&diffutils-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Diffutils</title>
+
+    <para>Prepare Diffutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-diffutils" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 155 - 0
chapter05/expect.xml

@@ -0,0 +1,155 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-expect" role="wrap">
+  <?dbhtml filename="expect.html"?>
+
+  <title>Expect-&expect-version;</title>
+
+  <indexterm zone="ch-tools-expect">
+    <primary sortas="a-Expect">Expect</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Expect package contains a program for carrying out scripted
+    dialogues with other interactive programs.</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>First, fix a bug that can result in false failures during the GCC test
+    suite run:</para>
+
+<screen><userinput>patch -Np1 -i ../&expect-spawn-patch;</userinput></screen>
+
+    <para>Now prepare Expect for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools --with-tcl=/tools/lib \
+  --with-tclinclude=/tools/include --with-x=no</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--with-tcl=/tools/lib</parameter></term>
+        <listitem>
+          <para>This ensures that the configure script finds the Tcl
+          installation in the temporary tools location instead of possibly
+          locating an existing one on the host system.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--with-tclinclude=/tools/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>
+
+      <varlistentry>
+        <term><parameter>--with-x=no</parameter></term>
+        <listitem>
+          <para>This tells the configure script not to search for Tk (the
+          Tcl GUI component) or the X Window System libraries, both of which
+          may reside on the host system but will not exist in the temporary
+          environment.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Build the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue: <userinput>make test</userinput>.
+    Note that the Expect test suite is known to experience failures under
+    certain host conditions that are not within our control. Therefore,
+    test suite failures here are not surprising and are not considered
+    critical.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make SCRIPTS="" install</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>SCRIPTS=""</parameter></term>
+        <listitem>
+          <para>This prevents installation of the supplementary Expect
+          scripts, which are not needed.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </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;.a</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;.a</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>

+ 65 - 0
chapter05/findutils.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-findutils" role="wrap">
+  <?dbhtml filename="findutils.html"?>
+
+  <title>Findutils-&findutils-version;</title>
+
+  <indexterm zone="ch-tools-findutils">
+    <primary sortas="a-Findutils">Findutils</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/findutils.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&findutils-ch5-sbu;</seg>
+        <seg>&findutils-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Findutils</title>
+
+    <para>Prepare Findutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-findutils" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 77 - 0
chapter05/flex.xml

@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-flex" role="wrap">
+  <?dbhtml filename="flex.html"?>
+
+  <title>Flex-&flex-version;</title>
+
+  <indexterm zone="ch-tools-flex">
+    <primary sortas="a-Flex">Flex</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/flex.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&flex-ch5-sbu;</seg>
+        <seg>&flex-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Flex</title>
+
+    <para>Flex contains several known bugs. These can be fixed with the
+    following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../&flex-fixes-patch;</userinput></screen>
+
+    <para>The GNU autotools will detect that the Flex source code has been
+    modified by the previous patch and tries to update the man page
+    accordingly.  This does not work on many systems, and the default page is
+    fine, so make sure it does not get regenerated:</para>
+
+<screen><userinput>touch doc/flex.1</userinput></screen>
+
+    <para>Now prepare Flex for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-flex" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 75 - 0
chapter05/gawk.xml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-gawk" role="wrap">
+  <?dbhtml filename="gawk.html"?>
+
+  <title>Gawk-&gawk-version;</title>
+
+  <indexterm zone="ch-tools-gawk">
+    <primary sortas="a-Gawk">Gawk</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/gawk.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gawk-ch5-sbu;</seg>
+        <seg>&gawk-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Gawk</title>
+
+    <para>Prepare Gawk for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Due to a bug in the <command>configure</command> script, Gawk fails
+    to detect certain aspects of locale support in Glibc. This bug leads to,
+    e.g., Gettext testsuite failures. Work around this issue by appending the
+    missing macro definitions to <filename>config.h</filename>:</para>
+
+<screen><userinput>cat &gt;&gt;config.h &lt;&lt;"EOF"
+<literal>#define HAVE_LANGINFO_CODESET 1
+#define HAVE_LC_MESSAGES 1</literal>
+EOF</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-gawk" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 137 - 0
chapter05/gcc-pass1.xml

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-gcc-pass1" role="wrap">
+  <?dbhtml filename="gcc-pass1.html"?>
+
+  <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/2003/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 GCC</title>
+
+    <para>The GCC documentation recommends building GCC outside of the
+    source directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir -v ../gcc-build
+cd ../gcc-build</userinput></screen>
+
+    <para>Prepare GCC for compilation:</para>
+
+<screen><userinput>../gcc-&gcc-version;/configure --prefix=/tools \
+    --with-local-prefix=/tools --disable-nls --enable-shared \
+    --enable-languages=c</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--with-local-prefix=/tools</parameter></term>
+        <listitem>
+          <para>The purpose of this switch is to remove <filename
+          class="directory">/usr/local/include</filename> from
+          <command>gcc</command>'s include search path. This is not
+          absolutely essential, however, it helps to minimize the
+          influence of the host system.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-shared</parameter></term>
+        <listitem>
+          <para>This switch allows the building of <filename
+          class="libraryfile">libgcc_s.so.1</filename> and
+          <filename class="libraryfile">libgcc_eh.a</filename>.
+          Having <filename class="libraryfile">libgcc_eh.a</filename>
+          available ensures that the configure script for Glibc (the
+          next package we compile) produces the proper results.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-languages=c</parameter></term>
+        <listitem>
+          <para>This option ensures that only the C compiler is built.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Continue with compiling the package:</para>
+
+<screen><userinput>make bootstrap</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>bootstrap</parameter></term>
+        <listitem>
+          <para>This target does not just compile GCC, but compiles it
+          several times. It uses the programs compiled in a first round
+          to compile itself a second time, and then again a third time.
+          It then compares these second and third compiles to make sure
+          it can reproduce itself flawlessly. This also implies that it
+          was compiled correctly.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compilation is now complete. At this point, the test suite would
+    normally be run, but, as mentioned before, the test suite framework is
+    not in place yet. The benefits of running the tests at this point
+    are minimal since the programs from this first pass will soon be
+    replaced.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make 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>ln -vs gcc /tools/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>

+ 216 - 0
chapter05/gcc-pass2.xml

@@ -0,0 +1,216 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-gcc-pass2" role="wrap">
+  <?dbhtml filename="gcc-pass2.html"?>
+
+  <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/2003/XInclude"
+    href="../chapter06/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>Re-installation of GCC</title>
+
+    <para>The tools required to test GCC and Binutils&mdash;Tcl, Expect
+    and DejaGNU&mdash;are installed now. GCC and Binutils can now be
+    rebuilt, linking them against the new Glibc and testing them properly
+    (if running the test suites in this chapter). Please note that these
+    test suites are highly dependent on properly functioning PTYs which
+    are provided by the host. PTYs are most commonly implemented via the
+    <systemitem class="filesystem">devpts</systemitem> file system. Check
+    to see if the host system is set up correctly in this regard by
+    performing a quick test:</para>
+
+<screen><userinput>expect -c "spawn ls"</userinput></screen>
+
+    <para>The response might be:</para>
+
+<screen><computeroutput>The system has no more ptys.
+Ask your system administrator to create more.</computeroutput></screen>
+
+    <para>If the above message is received, the host does not have its PTYs
+    set up properly. In this case, there is no point in running the test
+    suites for GCC and Binutils until this issue is resolved. Please consult
+    the LFS FAQ at <ulink url="&lfs-root;/lfs/faq.html#no-ptys"/> for more
+    information on how to get PTYs working.</para>
+
+    <para>As previously explained in <xref linkend="ch-tools-adjusting"/>,
+    under normal circumstances the GCC <command>fixincludes</command> script
+    is run in order to fix potentially broken header files. As GCC-&gcc-version;
+    and Glibc-&glibc-version; have already been installed at this point, and
+    their respective header files are known to not require fixing, the
+    <command>fixincludes</command> script is not required. As mentioned
+    previously, the script may in fact pollute the build environment by
+    installing fixed headers from the host system into GCC's private include
+    directory. The running of the <command>fixincludes</command> script can
+    be suppressed by issuing the following commands:</para>
+
+<screen><userinput>cp -v gcc/Makefile.in{,.orig} &amp;&amp;
+sed 's@\./fixinc\.sh@-c true@' gcc/Makefile.in.orig &gt; gcc/Makefile.in</userinput></screen>
+
+    <para>The bootstrap build performed in <xref linkend="ch-tools-gcc-pass1"/>
+    built GCC with the <option>-fomit-frame-pointer</option> compiler flag.
+    Non-bootstrap builds omit this flag by default, so apply the following
+    <command>sed</command> to use it in order to ensure consistent compiler
+    builds.</para>
+
+<screen><userinput>cp -v gcc/Makefile.in{,.tmp} &amp;&amp;
+sed 's/^XCFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in.tmp \
+  &gt; gcc/Makefile.in</userinput></screen>
+
+    <para>Apply the following patch to change the location of GCC's default
+    dynamiclinker (typically <filename
+    class="libraryfile">ld-linux.so.2</filename>):</para>
+
+<screen><userinput>patch -Np1 -i ../&gcc-specs-patch;</userinput></screen>
+
+    <para>The above patch also removes <filename
+    class="directory">/usr/include</filename> from GCC's include search path.
+    Patching now rather than adjusting the specs file after installation
+    ensures that the new dynamic linker is used during the actual build of
+    GCC. That is, all of the binaries created during the build will link
+    against the new Glibc.</para>
+
+    <important>
+      <para>The above patch is critical in ensuring a successful overall
+      build. Do not forget to apply it.</para>
+    </important>
+
+    <para>Create a separate build directory again:</para>
+
+<screen><userinput>mkdir -v ../gcc-build
+cd ../gcc-build</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>../gcc-&gcc-version;/configure --prefix=/tools \
+    --with-local-prefix=/tools --enable-clocale=gnu \
+    --enable-shared --enable-threads=posix \
+    --enable-__cxa_atexit --enable-languages=c,c++ \
+    --disable-libstdcxx-pch</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the new configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--enable-clocale=gnu</parameter></term>
+        <listitem>
+          <para>This option ensures the correct locale model is selected
+          for the C++ libraries under all circumstances. If the configure
+          script finds the <emphasis>de_DE</emphasis> locale installed,
+          it will select the correct gnu locale model. However, if the
+          <emphasis>de_DE</emphasis> locale is not installed, there is the
+          risk of building Application Binary Interface (ABI)-incompatible
+          C++ libraries because the incorrect generic locale model may be
+          selected.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-threads=posix</parameter></term>
+        <listitem>
+          <para>This enables C++ exception handling for multi-threaded code.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-__cxa_atexit</parameter></term>
+        <listitem>
+          <para>This option allows use of <function>__cxa_atexit</function>,
+          rather than <function>atexit</function>, to register C++ destructors
+          for local statics and global objects. This option is essential for
+          fully standards-compliant handling of destructors. It also affects
+          the C++ ABI, and therefore results in C++ shared libraries and C++
+          programs that are interoperable with other Linux distributions.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-languages=c,c++</parameter></term>
+        <listitem>
+          <para>This option ensures that both the C and C++ compilers are
+          built.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-libstdcxx-pch</parameter></term>
+        <listitem>
+          <para>Do not build the pre-compiled header (PCH) for
+          <filename class="libraryfile">libstdc++</filename>. It takes up a
+          lot of space, and we have no use for it.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>There is no need to use the <parameter>bootstrap</parameter> target
+    now because the compiler being used to compile this GCC was built from
+    the exact same version of the GCC sources used earlier.</para>
+
+    <para>Compilation is now complete. As previously mentioned, running the test
+    suites for the temporary tools compiled in this chapter is not mandatory.
+    To run the GCC test suite anyway, use the following command:</para>
+
+<screen><userinput>make -k check</userinput></screen>
+
+    <para>The <parameter>-k</parameter> flag is used to make the test suite run
+    through to completion and not stop at the first failure. The GCC test
+    suite is very comprehensive and is almost guaranteed to generate a few
+    failures.</para>
+
+    <para>For a discussion of test failures that are of particular
+    importance, please see <xref linkend="ch-system-gcc" role="."/></para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="adjusting.xml"
+    xpointer="xpointer(/sect1/caution[1])"/>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-gcc" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 85 - 0
chapter05/gettext.xml

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-gettext" role="wrap">
+  <?dbhtml filename="gettext.html"?>
+
+  <title>Gettext-&gettext-version;</title>
+
+  <indexterm zone="ch-tools-gettext">
+    <primary sortas="a-Gettext">Gettext</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/gettext.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gettext-ch5-sbu;</seg>
+        <seg>&gettext-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Gettext</title>
+
+    <para>For our temporary set of tools, we only need to build and install
+    one binary from Gettext.</para>
+
+    <para>Prepare Gettext for compilation:</para>
+
+<screen><userinput>cd gettext-tools
+./configure --prefix=/tools --disable-shared</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--disable-shared</parameter></term>
+        <listitem>
+          <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>Compile the package:</para>
+
+<screen><userinput>make -C lib
+make -C src msgfmt</userinput></screen>
+
+    <para>As only one binary has been compiled, it is not possible to run the
+    testsuite without compiling additional support libraries from the Gettext
+    package. It is therefore not recommended to attempt to run the testsuite at
+    this stage.</para>
+
+    <para>Install the <command>msgfmt</command> binary:</para>
+
+<screen><userinput>cp -v src/msgfmt /tools/bin</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-gettext" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 202 - 0
chapter05/glibc.xml

@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-glibc" role="wrap">
+  <?dbhtml filename="glibc.html"?>
+
+  <title>Glibc-&glibc-version;</title>
+
+  <indexterm zone="ch-tools-glibc">
+    <primary sortas="a-Glibc">Glibc</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/glibc.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&glibc-ch5-sbu;</seg>
+        <seg>&glibc-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Glibc</title>
+
+    <para>The Glibc documentation recommends building Glibc outside of the source
+    directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir -v ../glibc-build
+cd ../glibc-build</userinput></screen>
+
+    <para>Next, prepare Glibc for compilation:</para>
+
+<screen><userinput>../glibc-&glibc-version;/configure --prefix=/tools \
+    --disable-profile --enable-add-ons \
+    --enable-kernel=2.6.0 --with-binutils=/tools/bin \
+    --without-gd --with-headers=/tools/include \
+    --without-selinux</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--disable-profile</parameter></term>
+        <listitem>
+          <para>This builds the libraries without profiling information. Omit
+          this option if profiling on the temporary tools is necessary.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-add-ons</parameter></term>
+        <listitem>
+          <para>This tells Glibc to use the NPTL add-on as its threading
+          library.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-kernel=2.6.0</parameter></term>
+        <listitem>
+          <para>This tells Glibc to compile the library with support
+          for 2.6.x Linux kernels.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--with-binutils=/tools/bin</parameter></term>
+        <listitem>
+          <para>While not required, this switch ensures that there are
+          no errors pertaining to which Binutils programs get used during the
+          Glibc build.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--without-gd</parameter></term>
+        <listitem>
+          <para>This prevents the build of the <command>memusagestat</command>
+          program, which insists on linking against the host's libraries
+          (libgd, libpng, libz, etc.).</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--with-headers=/tools/include</parameter></term>
+        <listitem>
+          <para>This tells Glibc to compile itself against the headers recently
+          installed to the tools directory, so that it knows exactly what
+          features the kernel has and can optimize itself accordingly.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--without-selinux</parameter></term>
+        <listitem>
+          <para>When building from hosts that include SELinux functionality
+          (e.g., Fedora Core 3), Glibc will build with support for SELinux.
+          As the LFS tools environment does not contain support for SELinux, a
+          Glibc compiled with such support will fail to operate correctly.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>During this stage the following warning might appear:</para>
+
+    <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>
+
+    <para>The missing or incompatible <command>msgfmt</command> program is
+    generally harmless, but it can sometimes cause issues when running the
+    test suite. This <command>msgfmt</command> program is part of the
+    Gettext package which the host distribution should provide. If
+    <command>msgfmt</command> is present but deemed incompatible, upgrade
+    the host system's Gettext package or continue without it and see if
+    the test suite runs without problems regardless.</para>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>Compilation is now complete. As mentioned earlier, running the
+    test suites for the temporary tools installed in this chapter is not
+    mandatory. To run the Glibc test suite (if desired), the following
+    command will do so:</para>
+
+<screen><userinput>make check</userinput></screen>
+
+    <para>For a discussion of test failures that are of particular
+    importance, please see <xref linkend="ch-system-glibc" role="."/></para>
+
+    <para>In this chapter, some tests can be adversely affected by
+    existing tools or environmental issues on the host system. Glibc test
+    suite failures in this chapter are typically not worrisome. The Glibc
+    installed in <xref linkend="chapter-building-system"/> is the one that
+    will ultimately end up being used, so that is the one that needs to pass
+    most tests (even in <xref linkend="chapter-building-system"/>, some
+    failures could still occur, for example, with the math tests).</para>
+
+    <para>When experiencing a failure, make a note of it, then continue by
+    reissuing the <command>make check</command> command. The test suite
+    should pick up where it left off and continue. This stop-start sequence
+    can be circumvented by issuing a <command>make -k check</command> command.
+    If using this option, be sure to log the output so that the log file can
+    be examined for failures later.</para>
+
+    <para>The install stage of Glibc will issue a harmless warning at the
+    end about the absence of <filename>/tools/etc/ld.so.conf</filename>.
+    Prevent this warning with:</para>
+
+<screen><userinput>mkdir -v /tools/etc
+touch /tools/etc/ld.so.conf</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Different countries and cultures have varying conventions for
+    how to communicate. These conventions range from the format for
+    representing dates and times to more complex issues, such as the
+    language spoken. The <quote>internationalization</quote> of GNU
+    programs works by locale.</para>
+
+    <note>
+      <para>If the test suites are not being run in this chapter (as per
+      the recommendation), there is no need to install the locales now.
+      The appropriate locales will be installed in the next chapter.
+      To install the Glibc locales anyway, use instructions from
+      <xref linkend="ch-system-glibc" role="."/></para>
+    </note>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-glibc" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 81 - 0
chapter05/grep.xml

@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-grep" role="wrap">
+  <?dbhtml filename="grep.html"?>
+
+  <title>Grep-&grep-version;</title>
+
+  <indexterm zone="ch-tools-grep">
+    <primary sortas="a-Grep">Grep</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/grep.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&grep-ch5-sbu;</seg>
+        <seg>&grep-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Grep</title>
+
+    <para>Prepare Grep for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools \
+    --disable-perl-regexp</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--disable-perl-regexp</parameter></term>
+        <listitem>
+          <para>This ensures that the <command>grep</command> program does
+          not get linked against a Perl Compatible Regular Expression (PCRE)
+          library that may be present on the host but will not be available
+          once we enter the <command>chroot</command> environment.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-grep" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 64 - 0
chapter05/gzip.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-gzip" role="wrap">
+  <?dbhtml filename="gzip.html"?>
+
+  <title>Gzip-&gzip-version;</title>
+
+  <indexterm zone="ch-tools-gzip">
+    <primary sortas="a-Gzip">Gzip</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/gzip.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gzip-ch5-sbu;</seg>
+        <seg>&gzip-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Gzip</title>
+
+    <para>Prepare Gzip for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-gzip" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 67 - 0
chapter05/introduction.xml

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-introduction">
+  <?dbhtml filename="introduction.html"?>
+
+  <title>Introduction</title>
+
+  <para>This chapter shows how to compile and install 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/tools</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>
+
+  <important>
+    <para>Before issuing the build instructions for a package, the package
+    should be unpacked as user <systemitem class="username">lfs</systemitem>,
+    and a <command>cd</command> into the created directory should be performed.
+    The build instructions assume that the <command>bash</command> shell is
+    in use.</para>
+  </important>
+
+  <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>
+
+  <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&mdash;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>
+
+  <important>
+    <para>After installing each package, delete its source and build directories,
+    unless specifically instructed otherwise. Deleting the sources prevents
+    mis-configuration when the same package is reinstalled later.</para>
+  </important>
+
+  <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>
+
+</sect1>

+ 66 - 0
chapter05/linux-libc-headers.xml

@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-linux-libc-headers" role="wrap">
+  <?dbhtml filename="linux-libc-headers.html"?>
+
+  <title>Linux-Libc-Headers-&linux-libc-headers-version;</title>
+
+  <indexterm zone="ch-tools-linux-libc-headers">
+    <primary sortas="a-Linux-Libc-Headers">Linux-Libc-Headers</primary>
+    <secondary>tools, headers</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/linux-libc-headers.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&linux-libc-headers-ch5-sbu;</seg>
+        <seg>&linux-libc-headers-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Linux-Libc-Headers</title>
+
+    <para>For years it has been common practice to use <quote>raw</quote>
+    kernel headers (straight from a kernel tarball) in <filename
+    class="directory">/usr/include</filename>, but over the last few years,
+    the kernel developers have taken a strong stance that this should not
+    be done. This gave birth to the Linux-Libc-Headers Project, which was
+    designed to maintain an Application Programming Interface (API) stable
+    version of the Linux headers.</para>
+
+    <para>Install the header files:</para>
+
+<screen><userinput>cp -Rv include/asm-i386 /tools/include/asm
+cp -Rv include/linux /tools/include</userinput></screen>
+
+    <para>If your architecture is not i386 (compatible), adjust the first command
+    accordingly.</para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-linux-libc-headers" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 65 - 0
chapter05/m4.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-m4" role="wrap">
+  <?dbhtml filename="m4.html"?>
+
+  <title>M4-&m4-version;</title>
+
+  <indexterm zone="ch-tools-m4">
+    <primary sortas="a-M4">M4</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/m4.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&m4-ch5-sbu;</seg>
+        <seg>&m4-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of M4</title>
+
+    <para>Prepare M4 for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-m4" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 64 - 0
chapter05/make.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+<sect1 id="ch-tools-make" role="wrap">
+  <?dbhtml filename="make.html"?>
+
+  <title>Make-&make-version;</title>
+
+  <indexterm zone="ch-tools-make">
+    <primary sortas="a-Make">Make</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/make.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&make-ch5-sbu;</seg>
+        <seg>&make-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Make</title>
+
+    <para>Prepare Make for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-make" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 90 - 0
chapter05/ncurses.xml

@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-ncurses" role="wrap">
+  <?dbhtml filename="ncurses.html"?>
+
+  <title>Ncurses-&ncurses-version;</title>
+
+  <indexterm zone="ch-tools-ncurses">
+    <primary sortas="a-Ncurses">Ncurses</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/ncurses.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&ncurses-ch5-sbu;</seg>
+        <seg>&ncurses-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Ncurses</title>
+
+    <para>Prepare Ncurses for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools --with-shared \
+    --without-debug --without-ada --enable-overwrite</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the 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-overwrite</parameter></term>
+        <listitem>
+          <para>This tells Ncurses to install its header files into
+          <filename class="directory">/tools/include</filename>, instead of
+          <filename class="directory">/tools/include/ncurses</filename>, to
+          ensure that other packages can find the Ncurses headers
+          successfully.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-ncurses" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 64 - 0
chapter05/patch.xml

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-patch" role="wrap">
+  <?dbhtml filename="patch.html"?>
+
+  <title>Patch-&patch-version;</title>
+
+  <indexterm zone="ch-tools-patch">
+    <primary sortas="a-Patch">Patch</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/patch.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&patch-ch5-sbu;</seg>
+        <seg>&patch-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Patch</title>
+
+    <para>Prepare Patch for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-patch" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 92 - 0
chapter05/perl.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-perl" role="wrap">
+  <?dbhtml filename="perl.html"?>
+
+  <title>Perl-&perl-version;</title>
+
+  <indexterm zone="ch-tools-perl">
+    <primary sortas="a-Perl">Perl</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/perl.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&perl-ch5-sbu;</seg>
+        <seg>&perl-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Perl</title>
+
+    <para>First adapt some hard-wired paths to the C library by applying
+    the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../&perl-libc-patch;</userinput></screen>
+
+    <para>Prepare Perl for compilation (make sure to get the
+    'Data/Dumper Fcntl IO POSIX' part of the command correct&mdash;they are all
+    letters):</para>
+
+<screen><userinput>./configure.gnu --prefix=/tools -Dstatic_ext='Data/Dumper Fcntl IO POSIX'</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>-Dstatic_ext='Data/Dumper Fcntl IO POSIX'</parameter></term>
+        <listitem>
+          <para>This tells Perl to build the minimum set of static extensions
+          needed for installing and testing the Coreutils and Glibc packages in the
+	  next chapter.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Only a few of the utilities contained in this package need to be
+    built:</para>
+
+<screen><userinput>make perl utilities</userinput></screen>
+
+    <para>Although Perl comes with a test suite, it is not recommended to
+    run it at this point. Only part of Perl was built and running
+    <command>make test</command> now will cause the rest of Perl to be
+    built as well, which is unnecessary at this point. The test suite can
+    be run in the next chapter if desired.</para>
+
+    <para>Install these tools and their libraries:</para>
+
+<screen><userinput>cp -v perl pod/pod2man /tools/bin
+mkdir -pv /tools/lib/perl5/&perl-version;
+cp -Rv lib/* /tools/lib/perl5/&perl-version;</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-perl" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 65 - 0
chapter05/sed.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-sed" role="wrap">
+  <?dbhtml filename="sed.html"?>
+
+  <title>Sed-&sed-version;</title>
+
+  <indexterm zone="ch-tools-sed">
+    <primary sortas="a-Sed">Sed</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/sed.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+    <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&sed-ch5-sbu;</seg>
+        <seg>&sed-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Sed</title>
+
+    <para>Prepare Sed for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-sed" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 39 - 0
chapter05/stripping.xml

@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!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>strip --strip-debug /tools/lib/*
+strip --strip-unneeded /tools/{,s}bin/*</userinput></screen>
+
+  <para>The last of the above commands will skip some twenty files,
+  reporting that it does not recognize their file format. Most of these
+  are scripts instead of binaries.</para>
+
+  <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 nearly 20 MB more, remove the documentation:</para>
+
+<screen><userinput>rm -rf /tools/{info,man}</userinput></screen>
+
+  <para>At this point, you should have at least 850 MB of free space in
+  <envar>$LFS</envar> that can be used to build and install Glibc in the
+  next phase. If you can build and install Glibc, you can build and install
+  the rest too.</para>
+
+</sect1>

+ 70 - 0
chapter05/tar.xml

@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-tar" role="wrap">
+  <?dbhtml filename="tar.html"?>
+
+  <title>Tar-&tar-version;</title>
+
+  <indexterm zone="ch-tools-tar">
+    <primary sortas="a-Tar">Tar</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/tar.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&tar-ch5-sbu;</seg>
+        <seg>&tar-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Tar</title>
+
+    <para>If you wish to run the test suite, apply the following patch to fix
+    some issues with GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&tar-gcc4_fix-patch;</userinput></screen>
+
+    <para>Prepare Tar for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-tar" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 131 - 0
chapter05/tcl.xml

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-tcl" role="wrap">
+  <?dbhtml filename="tcl.html"?>
+
+  <title>Tcl-&tcl-version;</title>
+
+  <indexterm zone="ch-tools-tcl">
+    <primary sortas="a-Tcl">Tcl</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Tcl package contains the Tool Command 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. 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. Even if the test suites are not run in this chapter
+    (they are not mandatory), these packages are required to run the test
+    suites in <xref linkend="chapter-building-system"/>.</para>
+
+    <para>Prepare Tcl for compilation:</para>
+
+<screen><userinput>cd unix
+./configure --prefix=/tools</userinput></screen>
+
+    <para>Build the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue: <userinput>TZ=UTC make test</userinput>.
+    The Tcl test suite is known to experience failures under certain host
+    conditions that are not fully understood. Therefore, test suite failures
+    here are not surprising, and are not considered critical. The
+    <parameter>TZ=UTC</parameter> parameter sets the time zone to Coordinated
+    Universal Time (UTC), also known as Greenwich Mean Time (GMT), but only
+    for the duration of the test suite run. This ensures that the clock tests
+    are exercised correctly. Details on the <envar>TZ</envar> environment
+    variable are provided in <xref linkend="chapter-bootscripts"/>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Install Tcl's headers. The next package, Expect, requires them
+    to build.</para>
+
+<screen><userinput>make install-private-headers</userinput></screen>
+
+    <para>Now make a necessary symbolic link:</para>
+
+<screen><userinput>ln -sv tclsh8.4 /tools/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 tclsh8.4) and tclsh8.4</seg>
+        <seg>libtcl8.4.so</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="tclsh8.4">
+        <term><command>tclsh8.4</command></term>
+        <listitem>
+          <para>The Tcl command shell</para>
+          <indexterm zone="ch-tools-tcl tclsh8.4">
+            <primary sortas="b-tclsh8.4">tclsh8.4</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="tclsh">
+        <term><command>tclsh</command></term>
+        <listitem>
+          <para>A link to tclsh8.4</para>
+          <indexterm zone="ch-tools-tcl tclsh">
+            <primary sortas="b-tclsh">tclsh</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libtcl8.4.so">
+        <term><filename class="libraryfile">libtcl8.4.so</filename></term>
+        <listitem>
+          <para>The Tcl library</para>
+          <indexterm zone="ch-tools-tcl libtcl8.4.so">
+            <primary sortas="c-libtcl8.4.so">libtcl8.4.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 65 - 0
chapter05/texinfo.xml

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-texinfo" role="wrap">
+  <?dbhtml filename="texinfo.html"?>
+
+  <title>Texinfo-&texinfo-version;</title>
+
+  <indexterm zone="ch-tools-texinfo">
+    <primary sortas="a-Texinfo">Texinfo</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/texinfo.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&texinfo-ch5-sbu;</seg>
+        <seg>&texinfo-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Texinfo</title>
+
+    <para>Prepare Texinfo for compilation:</para>
+
+<screen><userinput>./configure --prefix=/tools</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-texinfo" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 218 - 0
chapter05/toolchaintechnotes.xml

@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!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
+  back to at any time during the process.</para>
+
+  <para>The overall goal of <xref linkend="chapter-temporary-tools"/> is to
+  provide a temporary environment that can be chrooted into and from which can be
+  produced a clean, trouble-free build of the target LFS system in <xref
+  linkend="chapter-building-system"/>. Along the way, we separate the new system
+  from the host system as much as possible, and in doing so, build a
+  self-contained and self-hosted toolchain. It should be noted that the build
+  process has been designed to minimize the risks for new readers and provide
+  maximum educational value at the same time.</para>
+
+  <important>
+    <para>Before continuing, be aware of the name of the working platform,
+    often referred to as the target triplet. Many times, the target
+    triplet will probably be <emphasis>i686-pc-linux-gnu</emphasis>. A
+    simple way to determine the name of the target 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.</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 will usually be <filename class="libraryfile">ld-linux.so.2</filename>.
+    On platforms that are less prevalent, the name might be <filename
+    class="libraryfile">ld.so.1</filename>, and newer 64 bit platforms might
+    be named something else entirely. The name of the platform's dynamic linker
+    can be determined by looking in the <filename class="directory">/lib</filename>
+    directory on the host system. A sure-fire way to determine the name is to
+    inspect a random binary from the host system by running:
+    <userinput>readelf -l &lt;name of binary&gt; | 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>
+  </important>
+
+  <para>Some key technical points of how the <xref
+  linkend="chapter-temporary-tools"/> build method works:</para>
+
+  <itemizedlist>
+    <listitem>
+      <para>The process is similar in principle to cross-compiling, whereby
+      tools installed in the same prefix work in cooperation, and thus utilize
+      a little GNU <quote>magic</quote></para>
+    </listitem>
+    <listitem>
+      <para>Careful manipulation of the standard linker's library search path
+      ensures programs are linked only against chosen libraries</para>
+    </listitem>
+    <listitem>
+      <para>Careful manipulation of <command>gcc</command>'s
+      <filename>specs</filename> file tells the compiler which target dynamic
+      linker will be used</para>
+    </listitem>
+  </itemizedlist>
+
+  <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">/tools/bin</filename> and <filename
+  class="directory">/tools/$TARGET_TRIPLET/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, an <userinput>ld --verbose | grep SEARCH</userinput>
+  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,
+  <userinput>gcc dummy.c -Wl,--verbose 2&gt;&amp;1 | grep succeeded</userinput>
+  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...
+        /tools/i686-pc-linux-gnu/bin/as
+checking what linker to use... /tools/i686-pc-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:
+  <userinput>gcc -print-prog-name=ld</userinput>.</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, <userinput>gcc -v dummy.c</userinput> will show
+  detailed information about the preprocessor, compilation, and assembly stages,
+  including <command>gcc</command>'s included search paths and their order.</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
+  <command>gcc</command> found in a <envar>PATH</envar> directory. 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">glibc-build</filename> directory for all important details.
+  Note the use of <parameter>CC="gcc -B/tools/bin/"</parameter> 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&mdash;it is very self-sufficient in terms of its build machinery and
+  generally does not rely on toolchain defaults.</para>
+
+  <para>After the Glibc installation, make some adjustments to ensure that
+  searching and linking take place only within the <filename
+  class="directory">/tools</filename> prefix.  Install an adjusted
+  <command>ld</command>, which has a hard-wired search path limited to
+  <filename class="directory">/tools/lib</filename>. Then amend
+  <command>gcc</command>'s specs file to point to the new dynamic linker in
+  <filename class="directory">/tools/lib</filename>. This last step is vital
+  to the whole process. As mentioned above, a hard-wired path to a dynamic
+  linker is embedded into every Executable and Link Format (ELF)-shared
+  executable.  This can be inspected by running:
+  <userinput>readelf -l &lt;name of binary&gt; | grep interpreter</userinput>.
+  Amending gcc's specs file ensures that every program compiled from here
+  through the end of this chapter will use the new dynamic linker in
+  <filename class="directory">/tools/lib</filename>.</para>
+
+  <para>The need to use the new dynamic linker is also the reason why
+  the Specs patch is applied for the second pass of GCC. Failure to do
+  so will result in the GCC programs themselves having the name of the
+  dynamic linker from the host system's <filename
+  class="directory">/lib</filename> directory embedded into them, which
+  would defeat the goal of getting away from the host.</para>
+
+  <para>During the second pass of Binutils, we are able to utilize the
+  <parameter>--with-lib-path</parameter> configure switch to control
+  <command>ld</command>'s library search path.  From this point onwards,
+  the core toolchain is self-contained and self-hosted. The remainder of
+  the <xref linkend="chapter-temporary-tools"/> packages all build against
+  the new Glibc in <filename class="directory">/tools</filename>.</para>
+
+  <para>Upon entering the chroot environment in <xref
+  linkend="chapter-building-system"/>, the first major package to be
+  installed is Glibc, due to its self-sufficient nature mentioned above.
+  Once this Glibc is installed into <filename
+  class="directory">/usr</filename>, perform a quick changeover of the
+  toolchain defaults, then proceed in building the rest of the target
+  LFS system.</para>
+
+  <!-- FIXME: Removed as part of the fix for bug 1061 - we no longer build pass1
+      packages statically, therefore this explanation isn't required
+
+  <sect2>
+  <title>Notes on Static Linking</title>
+
+  <para>Besides their specific task, most programs have to perform many
+  common and sometimes trivial operations. These include allocating
+  memory, searching directories, reading and writing files, string
+  handling, pattern matching, arithmetic, and other tasks. Instead of
+  obliging each program to reinvent the wheel, the GNU system provides
+  all these basic functions in ready-made libraries. The major library
+  on any Linux system is Glibc.</para>
+
+  <para>There are two primary ways of linking the functions from a
+  library to a program that uses them&mdash;statically or dynamically. When
+  a program is linked statically, the code of the used functions is
+  included in the executable, resulting in a rather bulky program. When
+  a program is dynamically linked, it includes a reference to the
+  dynamic linker, the name of the library, and the name of the function,
+  resulting in a much smaller executable. A third option is to use the
+  programming interface of the dynamic linker (see <filename>dlopen(3)</filename>
+  for more information).</para>
+
+  <para>Dynamic linking is the default on Linux and has three major
+  advantages over static linking. First, only one copy of the executable
+  library code is needed on the hard disk, instead of having multiple
+  copies of the same code included in several programs, thus saving
+  disk space. Second, when several programs use the same library
+  function at the same time, only one copy of the function's code is
+  required in core, thus saving memory space. Third, when a library
+  function gets a bug fixed or is otherwise improved, only the one
+  library needs to be recompiled instead of recompiling all programs
+  that make use of the improved function.</para>
+
+  <para>If dynamic linking has several advantages, why then do we
+  statically link the first two packages in this chapter? The reasons
+  are threefold&mdash;historical, educational, and technical. The
+  historical reason is that earlier versions of LFS statically linked
+  every program in this chapter. Educationally, knowing the difference
+  between static and dynamic linking is useful. The technical benefit is
+  a gained element of independence from the host, meaning that those
+  programs can be used independently of the host system. However, it is
+  worth noting that an overall successful LFS build can still be
+  achieved when the first two packages are built dynamically.</para>
+
+  </sect2>-->
+
+</sect1>

+ 76 - 0
chapter05/util-linux.xml

@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-tools-util-linux" role="wrap">
+  <?dbhtml filename="util-linux.html"?>
+
+  <title>Util-linux-&util-linux-version;</title>
+
+  <indexterm zone="ch-tools-util-linux">
+    <primary sortas="a-Util-linux">Util-linux</primary>
+    <secondary>tools</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="../chapter06/util-linux.xml"
+    xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&util-linux-ch5-sbu;</seg>
+        <seg>&util-linux-ch5-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Util-linux</title>
+
+    <para>Util-linux does not use the freshly installed headers and libraries
+    from the <filename class="directory">/tools</filename> directory by default.
+    This is fixed by altering the configure script:</para>
+
+<screen><userinput>sed -i 's@/usr/include@/tools/include@g' configure</userinput></screen>
+
+    <para>Prepare Util-linux for compilation:</para>
+
+<screen><userinput>./configure</userinput></screen>
+
+    <para>Compile some support routines:</para>
+
+<screen><userinput>make -C lib</userinput></screen>
+
+    <para>Only a few of the utilities contained in this package need to be
+    built:</para>
+
+<screen><userinput>make -C mount mount umount
+make -C text-utils more</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Copy these programs to the temporary tools directory:</para>
+
+<screen><userinput>cp mount/{,u}mount text-utils/more /tools/bin</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title/>
+
+    <para>Details on this package are located in
+    <xref linkend="contents-utillinux" role="."/></para>
+
+  </sect2>
+
+</sect1>

+ 53 - 0
chapter06/aboutdebug.xml

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!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. Additional information on system optimization can be found at
+  <ulink url="&hints-root;optimization.txt"/>.</para>
+
+</sect1>

+ 171 - 0
chapter06/autoconf.xml

@@ -0,0 +1,171 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-autoconf" role="wrap">
+  <?dbhtml filename="autoconf.html"?>
+
+  <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>Prepare Autoconf for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.
+    This takes a long time, about 3 SBUs.  In addition, 2 test are skipped
+    that use Automake.  For full test coverage, Autoconf can be re-tested
+    after Automake has been installed.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-autoconf" role="content">
+    <title>Contents of Autoconf</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate,
+        and ifnames</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&mdash;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>

+ 263 - 0
chapter06/automake.xml

@@ -0,0 +1,263 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-automake" role="wrap">
+  <?dbhtml filename="automake.html"?>
+
+  <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>Prepare Automake for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.
+    This takes a long time, about 10 SBUs.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+
+  <sect2 id="contents-automake" role="content">
+    <title>Contents of Automake</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>acinstall, aclocal, aclocal-&automake-version;, automake,
+        automake-&automake-version;, compile, config.guess, config.sub,
+        depcomp, elisp-comp, install-sh, mdate-sh, missing, mkinstalldirs,
+        py-compile, symlink-tree, and ylwrap</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="acinstall">
+        <term><command>acinstall</command></term>
+        <listitem>
+          <para>A script that installs aclocal-style M4 files</para>
+          <indexterm zone="ch-system-automake acinstall">
+            <primary sortas="b-acinstall">acinstall</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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="aclocal-version">
+        <term><command>aclocal-&automake-version;</command></term>
+        <listitem>
+          <para>A hard link to <command>aclocal</command></para>
+          <indexterm zone="ch-system-automake aclocal-version">
+            <primary sortas="b-aclocal-&automake-version;">aclocal-&automake-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-&automake-version;</command></term>
+        <listitem>
+          <para>A hard link to <command>automake</command></para>
+          <indexterm zone="ch-system-automake automake-version">
+            <primary sortas="b-automake-&automake-version;">automake-&automake-version;</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="compile">
+        <term><command>compile</command></term>
+        <listitem>
+          <para>A wrapper for compilers</para>
+          <indexterm zone="ch-system-automake compile">
+            <primary sortas="b-compile">compile</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="config.guess">
+        <term><command>config.guess</command></term>
+        <listitem>
+          <para>A script that attempts to guess the canonical triplet for
+          the given build, host, or target architecture</para>
+          <indexterm zone="ch-system-automake config.guess">
+            <primary sortas="b-config.guess">config.guess</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="config.sub">
+        <term><command>config.sub</command></term>
+        <listitem>
+          <para>A configuration validation subroutine script</para>
+          <indexterm zone="ch-system-automake config.sub">
+            <primary sortas="b-config.sub">config.sub</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="depcomp">
+        <term><command>depcomp</command></term>
+        <listitem>
+          <para>A script for compiling a program so that dependency information
+          is generated in addition to the desired output</para>
+          <indexterm zone="ch-system-automake depcomp">
+            <primary sortas="b-depcomp">depcomp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="elisp-comp">
+        <term><command>elisp-comp</command></term>
+        <listitem>
+          <para>Byte-compiles Emacs Lisp code</para>
+          <indexterm zone="ch-system-automake elisp-comp">
+            <primary sortas="b-elisp-comp">elisp-comp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="install-sh">
+        <term><command>install-sh</command></term>
+        <listitem>
+          <para>A script that installs a program, script, or data file</para>
+          <indexterm zone="ch-system-automake install-sh">
+            <primary sortas="b-install-sh">install-sh</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mdate-sh">
+        <term><command>mdate-sh</command></term>
+        <listitem>
+          <para>A script that prints the modification time of a file or
+          directory</para>
+          <indexterm zone="ch-system-automake mdate-sh">
+            <primary sortas="b-mdate-sh">mdate-sh</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="missing">
+        <term><command>missing</command></term>
+        <listitem>
+          <para>A script acting as a common stub for missing GNU programs during
+          an installation</para>
+          <indexterm zone="ch-system-automake missing">
+            <primary sortas="b-missing">missing</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkinstalldirs">
+        <term><command>mkinstalldirs</command></term>
+        <listitem>
+          <para>A script that creates a directory tree</para>
+          <indexterm zone="ch-system-automake mkinstalldirs">
+            <primary sortas="b-mkinstalldirs">mkinstalldirs</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="py-compile">
+        <term><command>py-compile</command></term>
+        <listitem>
+          <para>Compiles a Python program</para>
+          <indexterm zone="ch-system-automake py-compile">
+            <primary sortas="b-py-compile">py-compile</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="symlink-tree">
+        <term><command>symlink-tree</command></term>
+        <listitem>
+          <para>A script to create a symlink tree of a directory tree</para>
+          <indexterm zone="ch-system-automake symlink-tree">
+            <primary sortas="b-symlink-tree">symlink-tree</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ylwrap">
+        <term><command>ylwrap</command></term>
+        <listitem>
+          <para>A wrapper for <command>lex</command> and
+          <command>yacc</command></para>
+          <indexterm zone="ch-system-automake ylwrap">
+            <primary sortas="b-ylwrap">ylwrap</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 150 - 0
chapter06/bash.xml

@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-bash" role="wrap">
+  <?dbhtml filename="bash.html"?>
+
+  <title>Bash-&bash-version;</title>
+
+  <indexterm zone="ch-system-bash">
+    <primary sortas="a-Bash">Bash</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Bash package contains the Bourne-Again SHell.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bash-ch6-sbu;</seg>
+        <seg>&bash-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bash</title>
+
+    <para>If you downloaded the Bash documentation tarball and wish to install
+    HTML documentation, issue the following commands:</para>
+
+<screen><userinput>tar -xvf ../bash-doc-&bash-doc-version;.tar.gz &amp;&amp;
+sed -i "s|htmldir = @htmldir@|htmldir = /usr/share/doc/bash-&bash-version;|" \
+    Makefile.in</userinput></screen>
+
+    <para>Upstream developers have fixed several issues since the initial
+     release of Bash-&bash-version;.  Apply those fixes:</para>
+
+<screen><userinput>patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>
+
+    <para>Prepare Bash for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr --bindir=/bin \
+    --without-bash-malloc --with-installed-readline</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--with-installed-readline</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>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make tests</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Run the newly compiled <command>bash</command> program (replacing the one that is
+    currently being executed):</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>
+
+  </sect2>
+
+  <sect2 id="contents-bash" role="content">
+    <title>Contents of Bash</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>bash, bashbug, and sh (link to bash)</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>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 327 - 0
chapter06/binutils.xml

@@ -0,0 +1,327 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-binutils" role="wrap">
+  <?dbhtml filename="binutils.html"?>
+
+  <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. Check that everything is set up correctly by performing a
+    simple test:</para>
+
+<screen><userinput>expect -c "spawn ls"</userinput></screen>
+
+    <para>If the following message shows up, the chroot environment is not
+    set up for proper PTY operation:</para>
+
+<screen><computeroutput>The system has no more ptys.
+Ask your system administrator to create more.</computeroutput></screen>
+
+    <para>This issue needs to be resolved before running the test suites
+    for Binutils and GCC.</para>
+
+    <para>The Binutils documentation recommends building Binutils outside of the
+    source directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir -v ../binutils-build
+cd ../binutils-build</userinput></screen>
+
+    <para>Prepare Binutils for compilation:</para>
+
+<screen><userinput>../binutils-&binutils-version;/configure --prefix=/usr \
+    --enable-shared</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>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, i686 machines would expand that to <filename
+          class="directory">/usr/i686-pc-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>make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make tooldir=/usr install</userinput></screen>
+
+    <para>Install the <filename class="headerfile">libiberty</filename> header
+    file that is needed by some packages:</para>
+
+<screen><userinput>cp -v ../binutils-&binutils-version;/include/libiberty.h /usr/include</userinput></screen>
+
+  </sect2>
+
+
+  <sect2 id="contents-binutils" role="content">
+    <title>Contents of Binutils</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>addr2line, ar, as, c++filt, gprof, ld, nm, objcopy, objdump,
+        ranlib, readelf, size, strings, and strip</seg>
+        <seg>libiberty.a, libbfd.{a,so}, and libopcodes.{a,so}</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="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="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="libiberty">
+        <term><filename class="libraryfile">libiberty</filename></term>
+        <listitem>
+          <para>Contains routines used by various GNU programs, including
+          <command>getopt</command>, <command>obstack</command>,
+          <command>strerror</command>, <command>strtol</command>, and
+          <command>strtoul</command></para>
+          <indexterm zone="ch-system-binutils libiberty">
+            <primary sortas="c-libiberty">libiberty</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="libopcodes">
+        <term><filename class="libraryfile">libopcodes</filename></term>
+        <listitem>
+          <para>A library for dealing with opcodes&mdash;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>

+ 120 - 0
chapter06/bison.xml

@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-bison" role="wrap">
+  <?dbhtml filename="bison.html"?>
+
+  <title>Bison-&bison-version;</title>
+
+  <indexterm zone="ch-system-bison">
+    <primary sortas="a-Bison">Bison</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Bison package contains a parser generator.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bison-ch6-sbu;</seg>
+        <seg>&bison-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bison</title>
+
+    <para>Prepare Bison for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>The configure system causes bison to be built without support for
+    internationalization of error messages if a <command>bison</command>
+    program is not already in $PATH.  The following addition will correct
+    this.</para>
+
+<screen><userinput>echo '#define YYENABLE_NLS 1' &gt;&gt; config.h</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>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>
+
+      <seglistitem>
+        <seg>bison and yacc</seg>
+        <seg>liby.a</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.a">
+        <term><filename class="libraryfile">liby.a</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.a">
+            <primary sortas="c-liby.a">liby.a</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 250 - 0
chapter06/bzip2.xml

@@ -0,0 +1,250 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-bzip2" role="wrap">
+  <?dbhtml filename="bzip2.html"?>
+
+  <title>Bzip2-&bzip2-version;</title>
+
+  <indexterm zone="ch-system-bzip2">
+    <primary sortas="a-Bzip2">Bzip2</primary>
+  </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>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bzip2-ch6-sbu;</seg>
+        <seg>&bzip2-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bzip2</title>
+
+    <para>Apply a patch to install the documentation for this package:</para>
+
+<screen><userinput>patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
+
+    <para>The <command>bzgrep</command> command does not escape '|' and '&amp;'
+    in filenames passed to it. This allows arbitrary commands to be executed
+    with the privileges of the user running <command>bzgrep</command>. Apply
+    the following to address this:</para>
+
+<screen><userinput>patch -Np1 -i ../&bzip2-bzgrep-patch;</userinput></screen>
+
+    <para>The <command>bzdiff</command> script still uses the deprecated
+    <command>tempfile</command> program. Update it to use
+    <command>mktemp</command> instead:</para>
+
+<screen><userinput>sed -i 's@tempfile -d /tmp -p bz@mktemp -p /tmp@' bzdiff</userinput></screen>
+
+    <para>Prepare Bzip2 for compilation with:</para>
+
+<screen><userinput>make -f Makefile-libbz2_so
+make clean</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>-f Makefile-libbz2_so</parameter></term>
+        <listitem>
+          <para>This will cause Bzip2 to be built using a different
+          <filename>Makefile</filename> file, in this case the
+          <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
+          <filename class="libraryfile">libbz2.so</filename> library and links
+          the Bzip2 utilities against it.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile and test the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>If reinstalling Bzip2, perform
+    <userinput>rm -vf /usr/bin/bz*</userinput> first, otherwise the following
+    <command>make install</command> will fail.</para>
+
+    <para>Install the programs:</para>
+
+<screen><userinput>make 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>
+
+<screen><userinput>cp -v bzip2-shared /bin/bzip2
+cp -av libbz2.so* /lib
+ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
+rm -v /usr/bin/{bunzip2,bzcat,bzip2}
+ln -sv bzip2 /bin/bunzip2
+ln -sv bzip2 /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>
+
+      <seglistitem>
+        <seg>bunzip2 (link to bzip2), bzcat (link to bzip2), bzcmp, bzdiff,
+        bzegrep, bzfgrep, bzgrep, bzip2, bzip2recover, bzless, and bzmore</seg>
+        <seg>libbz2.{a,so}</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="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="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="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>
+
+</sect1>

+ 75 - 0
chapter06/chapter06.xml

@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<chapter id="chapter-building-system" xreflabel="Chapter 6">
+  <?dbhtml dir="chapter06"?>
+  <?dbhtml filename="chapter06.html"?>
+
+  <title>Installing Basic System Software</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="introduction.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kernfs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="pkgmgt.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="chroot.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="creatingdirs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="createfiles.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="linux-libc-headers.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-pages.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="glibc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="readjusting.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="binutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="db.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="coreutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="iana-etc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="m4.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bison.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="ncurses.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="procps.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sed.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="libtool.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="perl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="readline.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="zlib.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="autoconf.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="automake.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bash.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="bzip2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="diffutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="e2fsprogs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="file.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="findutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="flex.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grub.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gawk.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gettext.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="grep.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="groff.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="gzip.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="inetutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="iproute2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="kbd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="less.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="make.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="man-db.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="mktemp.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="module-init-tools.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="patch.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="psmisc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="shadow.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysklogd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="sysvinit.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="tar.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="texinfo.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="udev.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="util-linux.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="vim.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="aboutdebug.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="strippingagain.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2003/XInclude" href="revisedchroot.xml"/>
+
+</chapter>

+ 61 - 0
chapter06/chroot.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-chroot">
+  <?dbhtml filename="chroot.html"?>
+
+  <title>Entering the Chroot Environment</title>
+
+  <para>It is time to enter the chroot environment to begin building and
+  installing the final LFS 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><userinput>chroot "$LFS" /tools/bin/env -i \
+    HOME=/root TERM="$TERM" PS1='\u:\w\$ ' \
+    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin \
+    /tools/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> comes last
+  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&mdash;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>

+ 1062 - 0
chapter06/coreutils.xml

@@ -0,0 +1,1062 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-coreutils" role="wrap">
+  <?dbhtml filename="coreutils.html"?>
+
+  <title>Coreutils-&coreutils-version;</title>
+
+  <indexterm zone="ch-system-coreutils">
+    <primary sortas="a-Coreutils">Coreutils</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Coreutils package contains utilities for showing and setting the
+    basic system characteristics.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&coreutils-ch6-sbu;</seg>
+        <seg>&coreutils-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Coreutils</title>
+
+    <para>A known issue with the <command>uname</command> program from
+    this package is that the <parameter>-p</parameter> switch always
+    returns <computeroutput>unknown</computeroutput>. The following patch
+    fixes this behavior for Intel architectures:</para>
+
+<screen><userinput>patch -Np1 -i ../&coreutils-uname-patch;</userinput></screen>
+
+    <para>Prevent Coreutils from installing binaries that will be installed by
+    other packages later:</para>
+
+<screen><userinput>patch -Np1 -i ../&coreutils-suppress-patch;</userinput></screen>
+
+    <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>
+
+<screen><userinput>patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
+
+    <para>In order for the tests added by this patch to pass, the permissions for
+    the test file have to be changed:</para>
+
+<screen><userinput>chmod +x tests/sort/sort-mb-tests</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>
+
+    <para>It has been found that translated messages sometimes overflow a buffer
+    in the <command>who -Hu</command> command. Increase the buffer size:</para>
+
+<screen><userinput>sed -i 's/_LEN 6/_LEN 20/' src/who.c</userinput></screen>
+
+    <para>Now prepare Coreutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>The test suite of Coreutils makes several assumptions about the
+    presence of system users and groups that are not valid within the minimal
+    environment that exists at the moment. Therefore, additional items need
+    to be set up before running the tests. Skip down to <quote>Install the
+    package</quote> if not running the test suite.</para>
+
+    <para>Create two dummy groups and a dummy user:</para>
+
+<screen><userinput>echo "dummy1:x:1000:" &gt;&gt; /etc/group
+echo "dummy2:x:1001:dummy" &gt;&gt; /etc/group
+echo "dummy:x:1000:1000::/root:/bin/bash" &gt;&gt; /etc/passwd</userinput></screen>
+
+    <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>make NON_ROOT_USERNAME=dummy check-root</userinput></screen>
+
+    <para>Then run the remainder of the tests as the
+    <systemitem class="username">dummy</systemitem> user:</para>
+
+<screen><userinput>src/su dummy -c "make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
+
+    <para>When testing is complete, remove the dummy user and groups:</para>
+
+<screen><userinput>sed -i '/dummy/d' /etc/passwd /etc/group</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Move programs to the locations specified by the FHS:</para>
+
+<screen><userinput>mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
+mv -v /usr/bin/{false,hostname,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</userinput></screen>
+
+    <para>Some of the scripts in the LFS-Bootscripts package depend on
+    <command>head</command>, <command>sleep</command>, and
+    <command>nice</command>.  As <filename class="directory">/usr</filename>
+    may not be available during the early stages of booting, those binaries
+    need to be on the root partition:</para>
+
+<screen><userinput>mv -v /usr/bin/{head,sleep,nice} /bin</userinput></screen>
+
+  </sect2>
+
+
+  <sect2 id="contents-coreutils" role="content">
+    <title>Contents of Coreutils</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>basename, cat, 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,
+        hostname, id, install, join, link, ln, logname, ls, md5sum, mkdir,
+        mkfifo, mknod, mv, nice, nl, nohup, od, paste, pathchk, pinky, pr,
+        printenv, printf, ptx, pwd, readlink, rm, rmdir, seq, sha1sum, shred,
+        sleep, sort, split, stat, stty, sum, sync, tac, tail, tee, test,
+        touch, tr, true, tsort, tty, uname, unexpand, uniq, unlink, users,
+        vdir, wc, who, whoami, and yes</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <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="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="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="hostname">
+        <term><command>hostname</command></term>
+        <listitem>
+          <para>Reports or sets the name of the host</para>
+          <indexterm zone="ch-system-coreutils hostname">
+            <primary sortas="b-hostname">hostname</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 <quote>named
+          pipe</quote> 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="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="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="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="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="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="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="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="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="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>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 137 - 0
chapter06/createfiles.xml

@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-createfiles">
+  <?dbhtml filename="createfiles.html"?>
+
+  <title>Creating Essential Files and Symlinks</title>
+
+  <indexterm zone="ch-system-createfiles">
+    <primary sortas="e-/etc/passwd">/etc/passwd</primary>
+  </indexterm>
+
+  <indexterm zone="ch-system-createfiles">
+    <primary sortas="e-/etc/group">/etc/group</primary>
+  </indexterm>
+
+  <indexterm zone="ch-system-createfiles">
+    <primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
+  </indexterm>
+
+  <indexterm zone="ch-system-createfiles">
+    <primary sortas="e-/var/log/btmp">/var/log/btmp</primary>
+  </indexterm>
+
+  <indexterm zone="ch-system-createfiles">
+    <primary sortas="e-/var/log/lastlog">/var/log/lastlog</primary>
+  </indexterm>
+
+  <indexterm zone="ch-system-createfiles">
+    <primary sortas="e-/var/log/wtmp">/var/log/wtmp</primary>
+  </indexterm>
+
+  <para>Some programs use hard-wired paths to programs which do not exist yet. In
+  order to satisfy these programs, create a number of symbolic links which will be
+  replaced by real files throughout the course of this chapter after the software
+  has been installed.</para>
+
+<screen><userinput>ln -sv /tools/bin/{bash,cat,grep,pwd,stty} /bin
+ln -sv /tools/bin/perl /usr/bin
+ln -sv /tools/lib/libgcc_s.so{,.1} /usr/lib
+ln -sv bash /bin/sh</userinput></screen>
+
+  <para>A proper Linux system maintains a list of the mounted file systems in
+  the file <filename>/etc/mtab</filename>.  Normally, this file would be
+  created when we mount a new file system. Since we will not be mounting any
+  file systems inside our chroot environment, create an empty file for
+  utilities that expect the presence of <filename>/etc/mtab</filename>:</para>
+
+<screen><userinput>touch /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><userinput>cat &gt; /etc/passwd &lt;&lt; "EOF"
+<literal>root:x:0:0:root:/root:/bin/bash</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><userinput>cat &gt; /etc/group &lt;&lt; "EOF"
+<literal>root:x:0:
+bin:x:1:
+sys:x:2:
+kmem:x:3:
+tty:x:4:
+tape: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:</literal>
+EOF</userinput></screen>
+
+  <para>The created groups are not part of any standard&mdash;they are groups
+  decided on in part by the requirements of the Udev configuration in this
+  chapter, and in part by common convention employed by a number of existing
+  Linux distributions. 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>To remove the <quote>I have no name!</quote> prompt, start a new
+  shell. Since a full Glibc was installed in <xref
+  linkend="chapter-temporary-tools"/> and 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 /tools/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/run/utmp /var/log/{btmp,lastlog,wtmp}
+chgrp -v utmp /var/run/utmp /var/log/lastlog
+chmod -v 664 /var/run/utmp /var/log/lastlog</userinput></screen>
+
+  <para>The <filename>/var/run/utmp</filename> file records the users
+  that are currently logged in. 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/btmp</filename> file
+  records the bad login attempts.</para>
+
+</sect1>

+ 69 - 0
chapter06/creatingdirs.xml

@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-creatingdirs">
+  <?dbhtml filename="creatingdirs.html"?>
+
+  <title>Creating Directories</title>
+
+  <para>It is time to create some 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,home,lib,mnt,opt}
+mkdir -pv /{media/{floppy,cdrom},sbin,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/{doc,info,locale,man}
+mkdir -v  /usr/{,local/}share/{misc,terminfo,zoneinfo}
+mkdir -pv /usr/{,local/}share/man/man{1..8}
+for dir in /usr /usr/local; do
+  ln -sv share/{man,doc,info} $dir
+done
+mkdir -v /var/{lock,log,mail,run,spool}
+mkdir -pv /var/{opt,cache,lib/{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&mdash;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&mdash;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="http://www.pathname.com/fhs/"/>). In addition to
+    the FHS, we create compatibility symlinks for the <filename
+    class="directory">man</filename>, <filename
+    class="directory">doc</filename>, and <filename
+    class="directory">info</filename> directories since many packages still try
+    to install their documentation into <filename
+    class="directory">/usr/&lt;directory&gt;</filename> or <filename
+    class="directory">/usr/local/&lt;directory&gt;</filename> as opposed to
+    <filename class="directory">/usr/share/&lt;directory&gt;</filename> or
+    <filename class="directory">/usr/local/share/&lt;directory&gt;</filename>.
+    The FHS also stipulates the existence of <filename
+    class="directory">/usr/local/games</filename> and <filename
+    class="directory">/usr/share/games</filename>. The FHS is not precise as to
+    the structure of the <filename class="directory">/usr/local/share</filename>
+    subdirectory, so we create only the directories that are needed. However,
+    feel free to create these directories if you prefer to conform more strictly
+    to the FHS.</para>
+
+  </sect2>
+
+</sect1>

+ 279 - 0
chapter06/db.xml

@@ -0,0 +1,279 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-db" role="wrap">
+  <?dbhtml filename="db.html"?>
+
+  <title>Berkeley DB-&db-version;</title>
+
+  <indexterm zone="ch-system-db">
+    <primary sortas="a-Berkeley-DB">Berkeley DB</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Berkeley DB package contains programs and utilities used by many
+    other applications for database related functions.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&db-ch6-sbu;</seg>
+        <seg>&db-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <tip>
+      <title>Other Installation Possibilities</title>
+
+      <para>There are instructions to build this package in the BLFS book if you
+      need to build the RPC server or additional language bindings. The
+      additional language bindings will require additional packages to be
+      installed. See <ulink url="&blfs-root;view/svn/server/databases.html#db"/>
+      for suggested installation instructions.</para>
+
+      <para>Also, GDBM <emphasis>could</emphasis> be used in place of Berkeley
+      DB to satisfy Man-DB. However, since Berkeley DB is considered a core part
+      of the LFS build, it will not be listed as a dependency for any package in
+      the BLFS book. Likewise, many hours go into testing LFS with Berkeley DB
+      installed, not with GDBM. If you fully understand the risks versus
+      benefits of using GDBM and wish to use it anyway, see the BLFS
+      instructions located at <ulink
+      url="&blfs-root;view/svn/general/gdbm.html"/></para>
+
+    </tip>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Berkeley DB</title>
+
+    <para>Prepare Berkeley DB for compilation:</para>
+
+<screen><userinput>cd build_unix &amp;&amp;
+../dist/configure --prefix=/usr --enable-compat185 --enable-cxx</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--enable-compat185</parameter></term>
+        <listitem>
+          <para>This option enables building Berkeley DB 1.85 compatibility
+          API.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--enable-cxx</parameter></term>
+        <listitem>
+          <para>This option enables building C++ API libraries.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>It is not possible to test the package meaningfully, because
+    that would involve building TCL bindings. TCL bindings cannot be
+    built properly now because TCL is linked against Glibc in
+    <filename class="directory">/tools</filename>, not against Glibc in
+    <filename class="directory">/usr</filename>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make docdir=/usr/share/doc/db-&db-version; install</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>docdir=...</parameter></term>
+        <listitem>
+          <para>This variable specifies the correct place for the
+          documentation.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Fix the ownerships of the installed files:</para>
+
+<screen><userinput>chown -v root:root /usr/bin/db_* \
+    /usr/lib/libdb* /usr/include/db* &amp;&amp;
+chown -Rv root:root /usr/share/doc/db-&db-version;</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-db" role="content">
+    <title>Contents of Berkeley DB</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>db_archive, db_checkpoint, db_deadlock, db_dump, db_hotbackup,
+        db_load, db_printlog, db_recover, db_stat, db_upgrade, and db_verify</seg>
+        <seg>libdb.{so,ar}and libdb_cxx.r{o,ar}</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="db_archive">
+        <term><command>db_archive</command></term>
+        <listitem>
+          <para>Prints the pathnames of log files that are no longer in use</para>
+          <indexterm zone="ch-system-db db_archive">
+            <primary sortas="b-db_archive">db_archive</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_checkpoint">
+        <term><command>db_checkpoint</command></term>
+        <listitem>
+          <para>A daemon used to monitor and checkpoint database logs</para>
+          <indexterm zone="ch-system-db db_checkpoint">
+            <primary sortas="b-db_checkpoint">db_checkpoint</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_deadlock">
+        <term><command>db_deadlock</command></term>
+        <listitem>
+          <para>A daemon used to abort lock requests when deadlocks are
+          detected</para>
+          <indexterm zone="ch-system-db db_deadlock">
+            <primary sortas="b-db_deadlock">db_deadlock</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_dump">
+        <term><command>db_dump</command></term>
+        <listitem>
+          <para>Converts database files to a plain-text file format readable
+          by <command>db_load</command></para>
+          <indexterm zone="ch-system-db db_dump">
+            <primary sortas="b-db_dump">db_dump</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_hotbackup">
+        <term><command>db_hotbackup</command></term>
+        <listitem>
+          <para>Creates <quote>hot backup</quote> or <quote>hot failover</quote>
+          snapshots of Berkeley DB databases</para>
+          <indexterm zone="ch-system-db db_hotbackup">
+            <primary sortas="b-db_hotbackup">db_hotbackup</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_load">
+        <term><command>db_load</command></term>
+        <listitem>
+          <para>Is used to create database files from plain-text files</para>
+          <indexterm zone="ch-system-db db_load">
+            <primary sortas="b-db_load">db_load</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_printlog">
+        <term><command>db_printlog</command></term>
+        <listitem>
+          <para>Converts database log files to human readable text</para>
+          <indexterm zone="ch-system-db db_printlog">
+            <primary sortas="b-db_printlog">db_printlog</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_recover">
+        <term><command>db_recover</command></term>
+        <listitem>
+          <para>Is used to restore a database to a consistent state after a
+          failure</para>
+          <indexterm zone="ch-system-db db_recover">
+            <primary sortas="b-db_recover">db_recover</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_stat">
+        <term><command>db_stat</command></term>
+        <listitem>
+          <para>Displays statistics for Berkeley databases</para>
+          <indexterm zone="ch-system-db db_stat">
+            <primary sortas="b-db_stat">db_stat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_upgrade">
+        <term><command>db_upgrade</command></term>
+        <listitem>
+          <para>Is used to upgrade database files to a newer version of
+          Berkeley DB</para>
+          <indexterm zone="ch-system-db db_upgrade">
+            <primary sortas="b-db_upgrade">db_upgrade</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_verify">
+        <term><command>db_verify</command></term>
+        <listitem>
+          <para>Is used to run consistency checks on database files</para>
+          <indexterm zone="ch-system-db db_verify">
+            <primary sortas="b-db_verify">db_verify</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+
+      <varlistentry id="libdb">
+        <term><filename class="libraryfile">libdb.{so,a}</filename></term>
+        <listitem>
+          <para>Contains functions to manipulate database files from C
+          programs</para>
+          <indexterm zone="ch-system-db libdb">
+            <primary sortas="c-libdb">libdb</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libdb_cxx">
+        <term><filename class="libraryfile">libdb_cxx.{so,a}</filename></term>
+        <listitem>
+          <para>Contains functions to manipulate database files from C++
+          programs</para>
+          <indexterm zone="ch-system-db libdb_cxx">
+            <primary sortas="c-libdb_cxx">libdb_cxx</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 131 - 0
chapter06/diffutils.xml

@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-diffutils" role="wrap">
+  <?dbhtml filename="diffutils.html"?>
+
+  <title>Diffutils-&diffutils-version;</title>
+
+  <indexterm zone="ch-system-diffutils">
+    <primary sortas="a-Diffutils">Diffutils</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Diffutils package contains programs that show the differences
+    between files or directories.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&diffutils-ch6-sbu;</seg>
+        <seg>&diffutils-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Diffutils</title>
+
+    <para>POSIX requires the <command>diff</command> command to treat whitespace
+    characters according to the current locale. The following patch fixes the
+    non-compliance issue:</para>
+
+<screen><userinput>patch -Np1 -i ../&diffutils-i18n-patch;</userinput></screen>
+
+    <para>The above patch will cause the Diffutils build system to attempt to
+    rebuild the <filename>diff.1</filename> man page using the unavailable
+    program <command>help2man</command>. The result is an unreadable man page for
+    <command>diff</command>. We can avoid this by updating the timestamp on
+    the file <filename>man/diff.1</filename>:</para>
+
+<screen><userinput>touch man/diff.1</userinput></screen>
+
+    <para>Prepare Diffutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+
+  <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>
+
+  </sect2>
+
+</sect1>

+ 470 - 0
chapter06/e2fsprogs.xml

@@ -0,0 +1,470 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-e2fsprogs" role="wrap">
+  <?dbhtml filename="e2fsprogs.html"?>
+
+  <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> journaling
+    file system.</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>It is recommended that E2fsprogs be built in a subdirectory of
+    the source tree: </para>
+
+<screen><userinput>mkdir -v build
+cd build</userinput></screen>
+
+    <para>Prepare E2fsprogs for compilation:</para>
+
+<screen><userinput>../configure --prefix=/usr --with-root-prefix="" \
+    --enable-elf-shlibs --disable-evms</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--with-root-prefix=""</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-evms</parameter></term>
+        <listitem>
+          <para>This disables the building of the Enterprise Volume
+          Management System (EVMS) plugin. This plugin is not up-to-date with
+          the latest EVMS internal interfaces and EVMS is not installed as part
+          of a base LFS system, so the plugin is not required. See the EVMS
+          website at <ulink url="http://evms.sourceforge.net/"/> for more
+          information regarding EVMS.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the binaries and documentation:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Install the shared libraries:</para>
+
+<screen><userinput>make install-libs</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-e2fsprogs" role="content">
+    <title>Contents of E2fsprogs</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>badblocks, blkid, chattr, compile_et, debugfs, dumpe2fs, e2fsck,
+        e2image, e2label, filefrag, findfs, fsck, fsck.ext2, fsck.ext3, logsave, lsattr,
+        mk_cmds, mke2fs, mkfs.ext2, mkfs.ext3, mklost+found, resize2fs,
+        tune2fs, and uuidgen.</seg>
+        <seg>libblkid.{a,so}, libcom_err.{a,so}, libe2p.{a,so},
+        libext2fs.{a,so}, libss.{a,so}, and libuuid.{a,so}</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="blkid">
+        <term><command>blkid</command></term>
+        <listitem>
+          <para>A command line utility to locate and print block device
+          attributes</para>
+          <indexterm zone="ch-system-e2fsprogs blkid">
+            <primary sortas="b-blkid">blkid</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="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="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="findfs">
+        <term><command>findfs</command></term>
+        <listitem>
+          <para>Finds a file system by label or Universally Unique Identifier
+          (UUID)</para>
+          <indexterm zone="ch-system-e2fsprogs findfs">
+            <primary sortas="b-findfs">findfs</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-e2fsprogs fsck">
+            <primary sortas="b-fsck">fsck</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</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</para>
+          <indexterm zone="ch-system-e2fsprogs fsck.ext3">
+            <primary sortas="b-fsck.ext3">fsck.ext3</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</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</para>
+          <indexterm zone="ch-system-e2fsprogs mkfs.ext3">
+            <primary sortas="b-mkfs.ext3">mkfs.ext3</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="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-e2fsprogs uuidgen">
+            <primary sortas="b-uuidgen">uuidgen</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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-e2fsprogs libblkid">
+            <primary sortas="c-libblkid">libblkid</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>
+
+      <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-e2fsprogs libuuid">
+            <primary sortas="c-libuuid">libuuid</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 100 - 0
chapter06/file.xml

@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-file" role="wrap">
+  <?dbhtml filename="file.html"?>
+
+  <title>File-&file-version;</title>
+
+  <indexterm zone="ch-system-file">
+    <primary sortas="a-File">File</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The File package contains a utility for determining the type of a given
+    file or files.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&file-ch6-sbu;</seg>
+        <seg>&file-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of File</title>
+
+    <para>Prepare File for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make 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.{a,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&mdash;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>
+
+</sect1>

+ 180 - 0
chapter06/findutils.xml

@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-findutils" role="wrap">
+  <?dbhtml filename="findutils.html"?>
+
+  <title>Findutils-&findutils-version;</title>
+
+  <indexterm zone="ch-system-findutils">
+    <primary sortas="a-Findutils">Findutils</primary>
+  </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>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&findutils-ch6-sbu;</seg>
+        <seg>&findutils-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Findutils</title>
+
+    <para>Prepare Findutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib/findutils \
+    --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>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>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 correct an explicit path.</para> 
+
+<screen><userinput>mv -v /usr/bin/find /bin</userinput>
+sed -i -e 's/find:=${BINDIR}/find:=\/bin/' /usr/bin/updatedb</screen>
+                    
+  </sect2>
+
+  <sect2 id="contents-findutils" role="content">
+    <title>Contents of Findutils</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>bigram, code, find, frcode, locate, updatedb, and xargs</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="bigram">
+        <term><command>bigram</command></term>
+        <listitem>
+          <para>Was formerly used to produce <command>locate</command>
+          databases</para>
+          <indexterm zone="ch-system-findutils bigram">
+            <primary sortas="b-bigram">bigram</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="code">
+        <term><command>code</command></term>
+        <listitem>
+          <para>Was formerly used to produce <command>locate</command>
+          databases; it is the ancestor of <command>frcode</command>.</para>
+          <indexterm zone="ch-system-findutils code">
+            <primary sortas="b-code">code</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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="frcode">
+        <term><command>frcode</command></term>
+        <listitem>
+          <para>Is called by <command>updatedb</command> to compress the list
+          of file names; it uses front-compression, reducing the database size
+          by a factor of four to five.</para>
+          <indexterm zone="ch-system-findutils frcode">
+            <primary sortas="b-frcode">frcode</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>
+
+  </sect2>
+
+</sect1>

+ 133 - 0
chapter06/flex.xml

@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-flex" role="wrap">
+  <?dbhtml filename="flex.html"?>
+
+  <title>Flex-&flex-version;</title>
+
+  <indexterm zone="ch-system-flex">
+    <primary sortas="a-Flex">Flex</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Flex package contains a utility for generating programs that
+    recognize patterns in text.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&flex-ch6-sbu;</seg>
+        <seg>&flex-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Flex</title>
+
+    <para>Prepare Flex for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>There are some packages that expect to find the
+    <filename class="libraryfile">lex</filename> library in <filename
+    class="directory">/usr/lib</filename>. Create a symlink to account for
+    this:</para>
+
+<screen><userinput>ln -sv libfl.a /usr/lib/libl.a</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 wrapper script named <filename>lex</filename> that
+    calls <filename>flex</filename> in <command>lex</command> emulation
+    mode:</para>
+
+<screen><userinput>cat &gt; /usr/bin/lex &lt;&lt; "EOF"
+<literal>#!/bin/sh
+# Begin /usr/bin/lex
+
+exec /usr/bin/flex -l "$@"
+
+# End /usr/bin/lex</literal>
+EOF
+chmod -v 755 /usr/bin/lex</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-flex" role="content">
+    <title>Contents of Flex</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed library</segtitle>
+
+      <seglistitem>
+        <seg>flex and lex</seg>
+        <seg>libfl.a</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="lex">
+        <term><command>lex</command></term>
+        <listitem>
+          <para>A script 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.a">
+        <term><filename class="libraryfile">libfl.a</filename></term>
+        <listitem>
+          <para>The <filename class="libraryfile">flex</filename> library</para>
+          <indexterm zone="ch-system-flex libfl.a">
+            <primary sortas="c-libfl.a">libfl.a</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 172 - 0
chapter06/gawk.xml

@@ -0,0 +1,172 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-gawk" role="wrap">
+  <?dbhtml filename="gawk.html"?>
+
+  <title>Gawk-&gawk-version;</title>
+
+  <indexterm zone="ch-system-gawk">
+    <primary sortas="a-Gawk">Gawk</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Gawk package contains programs for manipulating text files.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gawk-ch6-sbu;</seg>
+        <seg>&gawk-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Gawk</title>
+
+    <para>Under some circumstances, Gawk-&gawk-version;  attempts to free a
+    chunk of memory that was not allocated. This bug is fixed by the following
+    patch:</para>
+
+<screen><userinput>patch -Np1 -i ../&gawk-segfault-patch;</userinput></screen>
+
+    <para>Prepare Gawk for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
+
+    <para>Due to a bug in the <command>configure</command> script, Gawk fails
+    to detect certain aspects of locale support in Glibc. This bug leads to,
+    e.g., Gettext testsuite failures. Work around this issue by appending the
+    missing macro definitions to <filename>config.h</filename>:</para>
+
+<screen><userinput>cat &gt;&gt;config.h &lt;&lt;"EOF"
+<literal>#define HAVE_LANGINFO_CODESET 1
+#define HAVE_LC_MESSAGES 1</literal>
+EOF</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-gawk" role="content">
+    <title>Contents of Gawk</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>awk (link to gawk), gawk, gawk-&gawk-version;, grcat, igawk, pgawk,
+        pgawk-&gawk-version;, and pwcat</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <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>
+
+      <varlistentry id="grcat">
+        <term><command>grcat</command></term>
+        <listitem>
+          <para>Dumps the group database <filename>/etc/group</filename></para>
+          <indexterm zone="ch-system-gawk grcat">
+            <primary sortas="b-grcat">grcat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="igawk">
+        <term><command>igawk</command></term>
+        <listitem>
+          <para>Gives <command>gawk</command> the ability to include files</para>
+          <indexterm zone="ch-system-gawk igawk">
+            <primary sortas="b-igawk">igawk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pgawk">
+        <term><command>pgawk</command></term>
+        <listitem>
+          <para>The profiling version of <command>gawk</command></para>
+          <indexterm zone="ch-system-gawk pgawk">
+            <primary sortas="b-pgawk">pgawk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pgawk-version">
+        <term><command>pgawk-&gawk-version;</command></term>
+        <listitem>
+          <para>Hard link to <command>pgawk</command></para>
+          <indexterm zone="ch-system-gawk pgawk-version">
+            <primary sortas="b-pgawk-&gawk-version;">pgawk-&gawk-version;</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pwcat">
+        <term><command>pwcat</command></term>
+        <listitem>
+          <para>Dumps the password database <filename>/etc/passwd</filename></para>
+          <indexterm zone="ch-system-gawk pwcat">
+            <primary sortas="b-pwcat">pwcat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 349 - 0
chapter06/gcc.xml

@@ -0,0 +1,349 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-gcc" role="wrap">
+  <?dbhtml filename="gcc.html"?>
+
+  <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>Apply a <command>sed</command> substitution that will suppress the
+    installation of <filename class="libraryfile">libiberty.a</filename>. The
+    version of <filename class="libraryfile">libiberty.a</filename> provided by
+    Binutils will be used instead:</para>
+
+<screen><userinput>sed -i 's/install_to_$(INSTALL_DEST) //' libiberty/Makefile.in</userinput></screen>
+
+    <para>The bootstrap build performed in <xref linkend="ch-tools-gcc-pass1"/>
+    built GCC with the <option>-fomit-frame-pointer</option> compiler flag.
+    Non-bootstrap builds omit this flag by default, so apply the following
+    <command>sed</command> to use it in order to ensure consistent compiler
+    builds.</para>
+
+<screen><userinput>sed -i 's/^XCFLAGS =$/&amp; -fomit-frame-pointer/' gcc/Makefile.in</userinput></screen>
+
+    <para>The <command>fixincludes</command> script is known to occasionally
+    erroneously attempt to &quot;fix&quot; the system headers installed so far. As
+    the headers installed by GCC-&gcc-version; and Glibc-&glibc-version; are known
+    to not require fixing, issue the following command to prevent the
+    <command>fixincludes</command> script from running:</para>
+
+<screen><userinput>sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in</userinput></screen>
+
+    <para>GCC provides a <command>gccbug</command> script which detects at
+    compile time whether mktemp is present, and hardcodes the result in a test.
+    This will cause the script to fall back to using less random names for
+    temporary files.  We will be installing mktemp later, so the following sed
+    will simulate its presence.</para>
+
+<screen><userinput>sed -i 's/@have_mktemp_command@/yes/' gcc/gccbug.in</userinput></screen>
+
+    <para>The GCC documentation recommends building GCC outside of the source
+    directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir -v ../gcc-build
+cd ../gcc-build</userinput></screen>
+
+    <para>Prepare GCC for compilation:</para>
+
+<screen><userinput>../gcc-&gcc-version;/configure --prefix=/usr \
+    --libexecdir=/usr/lib --enable-shared \
+    --enable-threads=posix --enable-__cxa_atexit \
+    --enable-clocale=gnu --enable-languages=c,c++</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>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>Test the results, but do not stop at errors:</para>
+
+<screen><userinput>make -k check</userinput></screen>
+
+    <para>To receive a summary of the test suite results, run:</para>
+
+<screen><userinput>../gcc-&gcc-version;/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;"/>.</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. In
+    particular, the <filename class="libraryfile">libmudflap</filename> tests
+    are known be particularly problematic as a result of a bug in GCC
+    (<ulink url="http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20003"/>).
+    Unless the test results are vastly different from those at the above URL,
+    it is safe to continue.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Some packages expect the C preprocessor to be installed in the
+    <filename class="directory">/lib</filename> directory.
+    To support those packages, create this symlink:</para>
+
+<screen><userinput>ln -sv ../usr/bin/cpp /lib</userinput></screen>
+
+    <para>Many packages use the name <command>cc</command> to call the C
+    compiler. To satisfy those packages, create a symlink:</para>
+
+<screen><userinput>ln -sv gcc /usr/bin/cc</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/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='a'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='b'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='c'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='d'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='e'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='f'])"/>
+
+<screen><computeroutput>/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crt1.o succeeded
+/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crti.o succeeded
+/usr/lib/gcc/i686-pc-linux-gnu/&gcc-version;/../../../crtn.o succeeded</computeroutput></screen>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='g'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='h'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='i'])"/>
+
+<screen><computeroutput>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/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='j'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='k'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='l'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='m'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='n'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='o'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='p'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='q'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='r'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='s'])"/>
+
+    <xi:include xmlns:xi="http://www.w3.org/2003/XInclude"
+    href="readjusting.xml"
+    xpointer="xpointer(//*[@os='t'])"/>
+
+  </sect2>
+
+  <sect2 id="contents-gcc" role="content">
+    <title>Contents of GCC</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>c++, cc (link to gcc), cpp, g++, gcc, gccbug, and gcov</seg>
+        <seg>libgcc.a, libgcc_eh.a, libgcc_s.so, libstdc++.{a,so}, and
+        libsupc++.a</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <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="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="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="gccbug">
+        <term><command>gccbug</command></term>
+        <listitem>
+          <para>A shell script used to help create useful bug reports</para>
+          <indexterm zone="ch-system-gcc gccbug">
+            <primary sortas="b-gccbug">gccbug</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="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="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="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>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 394 - 0
chapter06/gettext.xml

@@ -0,0 +1,394 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-gettext" role="wrap">
+  <?dbhtml filename="gettext.html"?>
+
+  <title>Gettext-&gettext-version;</title>
+
+  <indexterm zone="ch-system-gettext">
+    <primary sortas="a-Gettext">Gettext</primary>
+  </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>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gettext-ch6-sbu;</seg>
+        <seg>&gettext-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Gettext</title>
+
+    <para>Prepare Gettext for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.
+    This takes a very long time, around 5 SBUs.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-gettext" role="content">
+    <title>Contents of Gettext</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>autopoint, config.charset, config.rpath, envsubst, gettext, gettext.sh,
+        gettextize, hostname, msgattrib, msgcat, msgcmp, msgcomm, msgconv, msgen,
+        msgexec, msgfilter, msgfmt, msggrep, msginit, msgmerge, msgunfmt, msguniq,
+        ngettext, and xgettext</seg>
+        <seg>libasprintf.{a,so}, libgettextlib.so, libgettextpo.{a,so}, and
+        libgettextsrc.so</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="config.charset">
+        <term><command>config.charset</command></term>
+        <listitem>
+          <para>Outputs a system-dependent table of character encoding
+          aliases</para>
+          <indexterm zone="ch-system-gettext config.charset">
+            <primary sortas="b-config.charset">config.charset</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="config.rpath">
+        <term><command>config.rpath</command></term>
+        <listitem>
+          <para>Outputs a system-dependent set of variables, describing how
+          to set the runtime search path of shared libraries in an
+          executable</para>
+          <indexterm zone="ch-system-gettext config.rpath">
+            <primary sortas="b-config.rpath">config.rpath</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="hostname-gettext">
+        <term><command>hostname</command></term>
+        <listitem>
+          <para>Displays a network hostname in various forms</para>
+          <indexterm zone="ch-system-gettext hostname-gettext">
+            <primary sortas="b-hostname-gettext">hostname</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 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="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>&lt;string&gt;</emphasis> strings and the
+          <emphasis>&lt;iostream&gt;</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>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 854 - 0
chapter06/glibc.xml

@@ -0,0 +1,854 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-glibc" role="wrap">
+  <?dbhtml filename="glibc.html"?>
+
+  <title>Glibc-&glibc-version;</title>
+
+  <indexterm zone="ch-system-glibc">
+    <primary sortas="a-Glibc">Glibc</primary>
+  </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>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&glibc-ch6-sbu;</seg>
+        <seg>&glibc-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Glibc</title>
+
+    <note>
+      <para>Some packages outside of LFS suggest installing GNU libiconv in
+      order to translate data from one encoding to another. The project's
+      home page (<ulink url="http://www.gnu.org/software/libiconv/"/>) says
+      <quote>This library provides an <function>iconv()</function>
+      implementation, for use on systems which don't have one, or whose
+      implementation cannot convert from/to Unicode.</quote> Glibc provides
+      an <function>iconv()</function> implementation and can convert from/to
+      Unicode, therefore libiconv is not required on an LFS system.</para>
+    </note>
+
+    <para>The Glibc build system is self-contained and will install
+    perfectly, even though the compiler specs file and linker are still
+    pointing at <filename class="directory">/tools</filename>. The specs
+    and linker cannot be adjusted before the Glibc install because the
+    Glibc autoconf tests would give false results and defeat the goal
+    of achieving a clean build.</para>
+
+    <para>The glibc-libidn tarball adds support for internationalized domain
+    names (IDN) to Glibc. Many programs that support IDN require the full
+    <filename class="libraryfile">libidn</filename> library (see
+    <ulink url="&blfs-root;view/svn/general/libidn.html"/>), not this add-on.
+    Unpack the tarball from within the Glibc source directory:</para>
+
+<screen><userinput>tar -xf ../glibc-libidn-&glibc-version;.tar.bz2</userinput></screen>
+
+    <para>Apply the following patch to fix build errors in packages that include
+    <filename class="headerfile">linux/types.h</filename> after <filename
+    class="headerfile">sys/kd.h</filename>:</para>
+
+<screen><userinput>patch -Np1 -i ../&glibc-linux_types-patch;</userinput></screen>
+
+    <para>In the vi_VN.TCVN locale, <command>bash</command> enters an infinite loop
+    at startup. It is unknown whether this is a <command>bash</command> bug or a
+    Glibc problem. Disable installation of this locale in order to avoid the
+    problem:</para>
+
+<screen><userinput>sed -i '/vi_VN.TCVN/d' localedata/SUPPORTED</userinput></screen>
+
+    <para>When running <command>make install</command>, a script called
+    <filename>test-installation.pl</filename> performs a small sanity test on
+    our newly installed Glibc. However, because our toolchain still points to
+    the <filename class="directory">/tools</filename> directory, the sanity
+    test would be carried out against the wrong Glibc. We can force the script
+    to check the Glibc we have just installed with the following:</para>
+
+<screen><userinput>sed -i \
+'s|libs -o|libs -L/usr/lib -Wl,-dynamic-linker=/lib/ld-linux.so.2 -o|' \
+        scripts/test-installation.pl</userinput></screen>
+
+    <para>The Glibc documentation recommends building Glibc outside of the source
+    directory in a dedicated build directory:</para>
+
+<screen><userinput>mkdir -v ../glibc-build
+cd ../glibc-build</userinput></screen>
+
+    <para>Prepare Glibc for compilation:</para>
+
+<screen><userinput>../glibc-&glibc-version;/configure --prefix=/usr \
+    --disable-profile --enable-add-ons \
+    --enable-kernel=2.6.0 --libexecdir=/usr/lib/glibc</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the new configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--libexecdir=/usr/lib/glibc</parameter></term>
+        <listitem>
+          <para>This changes the location of the <command>pt_chown</command>
+          program from its default of <filename
+          class="directory">/usr/libexec</filename> to <filename
+          class="directory">/usr/lib/glibc</filename>.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>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>Test the results:</para>
+
+<screen><userinput>make -k check 2&gt;&amp;1 | tee glibc-check-log
+grep Error glibc-check-log</userinput></screen>
+
+    <para>You will probably see an expected (ignored) failure in the
+    <emphasis>posix/annexc</emphasis> test.  In addition the Glibc test suite
+    is somewhat dependent on the host system.  This is a list of the most
+    common issues:</para>
+
+    <itemizedlist>
+      <listitem>
+        <para>The <emphasis>nptl/tst-clock2</emphasis> and 
+        <emphasis>tst-attr3</emphasis> tests sometimes 
+        fail.  The reason is not completely understood, but indications
+        are that a heavy system load can trigger these failures.</para>
+      </listitem>
+      <listitem>
+        <para>The math tests sometimes fail when running on
+        systems where the CPU is not a relatively new genuine Intel or
+        authentic AMD processor.</para>
+      </listitem>
+      <listitem>
+        <para>If you have mounted the LFS partition with the
+        <parameter>noatime</parameter> option, the <emphasis>atime</emphasis>
+        test will fail. As mentioned in <xref linkend="space-mounting"/>, do not
+        use the <parameter>noatime</parameter> option while building LFS.</para>
+      </listitem>
+      <listitem>
+        <para>When running on older and slower hardware or on systems under
+        load, some tests can fail because of test timeouts being exceeded.</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>touch /etc/ld.so.conf</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>The locales that can make the system respond in a different language
+    were not installed by the above command. None of the locales are required,
+    but, if some of them are misssing, testuites of the 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/de_DE</filename>
+    charset-independent locale definition with the
+    <filename>/usr/share/i18n/charmaps/ISO-8859-1.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>mkdir -pv /usr/lib/locale
+localedef -i de_DE -f ISO-8859-1 de_DE
+localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
+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 ja_JP -f EUC-JP ja_JP</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>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 if you need them.</para>
+    <!-- The Live CD patches the localedata/SUPPORTED file instead of
+    running localedef, the results are equivalent -->
+
+  </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>
+
+    <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
+    because, although Glibc provides defaults when this file is missing or corrupt,
+    the Glibc defaults do not work well in a networked environment. The time zone
+    also needs to be configured.</para>
+
+    <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
+    following:</para>
+
+<screen><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "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>
+
+    <para>To determine the local time zone, 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>EST5EDT</emphasis> or
+    <emphasis>Canada/Eastern</emphasis>). Then create the
+    <filename>/etc/localtime</filename> file by running:</para>
+
+<screen><userinput>cp -v --remove-destination /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> \
+    /etc/localtime</userinput></screen>
+
+    <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the time zone
+    that <command>tzselect</command> provided (e.g., Canada/Eastern).</para>
+
+    <variablelist>
+      <title>The meaning of the cp option:</title>
+
+      <varlistentry>
+        <term><parameter>--remove-destination</parameter></term>
+        <listitem>
+          <para>This is needed to force removal of the already existing symbolic
+          link. The reason for copying the file instead of using a symlink is to
+          cover the situation where <filename class="directory">/usr</filename>
+          is on a separate partition. This could be important when booted into
+          single user mode.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+  <sect2 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 &gt; /etc/ld.so.conf &lt;&lt; "EOF"
+<literal># Begin /etc/ld.so.conf
+
+/usr/local/lib
+/opt/lib
+
+# End /etc/ld.so.conf</literal>
+EOF</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-glibc" role="content">
+    <title>Contents of Glibc</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+
+      <seglistitem>
+        <seg>catchsegv, gencat, getconf, getent, iconv, iconvconfig, ldconfig,
+        ldd, lddlibc4, locale, localedef, mtrace, nscd, nscd_nischeck,
+        pcprofiledump, pt_chown, rpcgen, rpcinfo, sln, sprof, tzselect, xtrace,
+        zdump, and zic</seg>
+        <seg>ld.so, libBrokenLocale.{a,so}, libSegFault.so, libanl.{a,so},
+        libbsd-compat.a, libc.{a,so}, libcidn.so, libcrypt.{a,so}, libdl.{a,so},
+        libg.a, libieee.a, libm.{a,so}, libmcheck.a, libmemusage.so, libnsl.a,
+        libnss_compat.so, libnss_dns.so, libnss_files.so, libnss_hesiod.so,
+        libnss_nis.so, libnss_nisplus.so, libpcprofile.so, libpthread.{a,so},
+        libresolv.{a,so}, librpcsvc.a, librt.{a,so}, libthread_db.so, and
+        libutil.{a,so}</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>
+        <listitem>
+          <para>Prints various information about the current locale</para>
+          <indexterm zone="ch-system-glibc locale">
+            <primary sortas="b-locale">locale</primary>
+          </indexterm>
+        </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="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="nscd_nischeck">
+        <term><command>nscd_nischeck</command></term>
+        <listitem>
+          <para>Checks whether or not secure mode is necessary for NIS+
+          lookup</para>
+          <indexterm zone="ch-system-glibc nscd_nischeck">
+            <primary sortas="b-nscd_nischeck">nscd_nischeck</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pcprofiledump">
+        <term><command>pcprofiledump</command></term>
+        <listitem>
+          <para>Dumps information generated by PC profiling</para>
+          <indexterm zone="ch-system-glibc pcprofiledump">
+            <primary sortas="b-pcprofiledump">pcprofiledump</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pt_chown">
+        <term><command>pt_chown</command></term>
+        <listitem>
+          <para>A helper program for <command>grantpt</command> to set the owner,
+          group and access permissions of a slave pseudo terminal</para>
+          <indexterm zone="ch-system-glibc pt_chown">
+            <primary sortas="b-pt_chown">pt_chown</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rpcgen">
+        <term><command>rpcgen</command></term>
+        <listitem>
+          <para>Generates C code to implement the Remote Procecure Call (RPC)
+          protocol</para>
+          <indexterm zone="ch-system-glibc rpcgen">
+            <primary sortas="b-rpcgen">rpcgen</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rpcinfo">
+        <term><command>rpcinfo</command></term>
+        <listitem>
+          <para>Makes an RPC call to an RPC server</para>
+          <indexterm zone="ch-system-glibc rpcinfo">
+            <primary sortas="b-rpcinfo">rpcinfo</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>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <varlistentry id="ld.so">
+        <term><filename class="libraryfile">ld.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.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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>
+
+      <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>
+
+      <varlistentry id="libanl">
+        <term><filename class="libraryfile">libanl</filename></term>
+        <listitem>
+          <para>An asynchronous name lookup library</para>
+          <indexterm zone="ch-system-glibc libanl">
+            <primary sortas="c-libanl">libanl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libbsd-compat">
+        <term><filename class="libraryfile">libbsd-compat</filename></term>
+        <listitem>
+          <para>Provides the portability needed in order to run certain Berkey
+          Software Distribution (BSD) programs under Linux</para>
+          <indexterm zone="ch-system-glibc libbsd-compat">
+            <primary sortas="c-libbsd-compat">libbsd-compat</primary>
+          </indexterm>
+        </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>
+
+      <varlistentry id="libcidn">
+        <term><filename class="libraryfile">libcidn</filename></term>
+        <listitem>
+          <para>Used internally by Glibc for handling internationalized domain
+          names in the <function>getaddrinfo()</function> function</para>
+          <indexterm zone="ch-system-glibc libcrypt">
+            <primary sortas="c-libcrypt">libcrypt</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <varlistentry id="libieee">
+        <term><filename class="libraryfile">libieee</filename></term>
+        <listitem>
+          <para>Linking in this module forces error handling rules for math
+          functions as defined by the Institute of Electrical and Electronic
+          Engineers (IEEE). The default is POSIX.1 error handling</para>
+          <indexterm zone="ch-system-glibc libieee">
+            <primary sortas="c-libieee">libieee</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <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>
+
+      <varlistentry id="libpcprofile">
+        <term><filename class="libraryfile">libpcprofile</filename></term>
+        <listitem>
+          <para>Contains profiling functions used to track the amount of CPU
+          time spent in specific source code lines</para>
+          <indexterm zone="ch-system-glibc libpcprofile">
+            <primary sortas="c-libpcprofile">libpcprofile</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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>
+
+      <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>
+
+      <varlistentry id="librpcsvc">
+        <term><filename class="libraryfile">librpcsvc</filename></term>
+        <listitem>
+          <para>Contains functions providing miscellaneous RPC services</para>
+          <indexterm zone="ch-system-glibc librpcsvc">
+            <primary sortas="c-librpcsvc">librpcsvc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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>
+
+      <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>
+
+      <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>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 114 - 0
chapter06/grep.xml

@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-grep" role="wrap">
+  <?dbhtml filename="grep.html"?>
+
+  <title>Grep-&grep-version;</title>
+
+  <indexterm zone="ch-system-grep">
+    <primary sortas="a-Grep">Grep</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Grep package contains programs for searching through files.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&grep-ch6-sbu;</seg>
+        <seg>&grep-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Grep</title>
+
+    <para>The current Grep package has many bugs, especially in the support of
+    multibyte locales. RedHat fixed some of them with the following patch:</para>
+
+<screen><userinput>patch -Np1 -i ../&grep-fixes-patch;</userinput></screen>
+
+    <para>In order for the tests added by this patch to pass, the permissions for
+    the test file have to be changed:</para>
+
+<screen><userinput>chmod +x tests/fmbtest.sh</userinput></screen>
+
+    <para>Prepare Grep for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr --bindir=/bin</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-grep" role="content">
+    <title>Contents of Grep</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>egrep (link to grep), fgrep (link to grep), and grep</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <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>
+
+  </sect2>
+
+</sect1>

+ 474 - 0
chapter06/groff.xml

@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-groff" role="wrap">
+  <?dbhtml filename="groff.html"?>
+
+  <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>Apply the patch that adds the <quote>ascii8</quote> and
+    <quote>nippon</quote> devices to Groff:</para>
+
+<screen><userinput>patch -Np1 -i ../&groff-debian-patch;</userinput></screen>
+
+    <note>
+      <para>These devices are used by Man-DB when formatting non-English manual
+      pages that are not in the ISO-8859-1 encoding. Currently, there is no
+      working patch for Groff-1.19.x that adds this functionality.</para>
+      <!-- Details: http://bugs.debian.org/196762 -->
+    </note>
+
+    <para>Many screen fonts don't have Unicode single quotes and dashes in them.
+    Tell Groff to use the ASCII equivalents instead:</para>
+
+<screen><userinput>sed -i -e 's/2010/002D/' -e 's/2212/002D/' \
+    -e 's/2018/0060/' -e 's/2019/0027/' font/devutf8/R.proto</userinput></screen>
+
+    <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>PAGE=<replaceable>&lt;paper_size&gt;</replaceable> ./configure --prefix=/usr --enable-multibyte</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Some documentation programs, such as <command>xman</command>,
+    will not work properly without the following symlinks:</para>
+
+<screen><userinput>ln -sv eqn /usr/bin/geqn
+ln -sv tbl /usr/bin/gtbl</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-groff" role="content">
+  <title>Contents of Groff</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>addftinfo, afmtodit, eqn, eqn2graph, geqn (link to eqn), grn,
+        grodvi, groff, groffer, grog, grolbp, grolj4, grops, grotty, gtbl
+        (link to tbl), hpftodit, indxbib, lkbib, lookbib, mmroff, neqn,
+        nroff, pfbtops, pic, pic2graph, post-grohtml, pre-grohtml, refer,
+        soelim, tbl, tfmtodit, and troff</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="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="geqn">
+        <term><command>geqn</command></term>
+        <listitem>
+          <para>A link to <command>eqn</command></para>
+          <indexterm zone="ch-system-groff geqn">
+            <primary sortas="b-geqn">geqn</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="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="gtbl">
+        <term><command>gtbl</command></term>
+        <listitem>
+          <para>A link to <command>tbl</command></para>
+          <indexterm zone="ch-system-groff gtbl">
+            <primary sortas="b-gtbl">gtbl</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="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="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="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>

+ 156 - 0
chapter06/grub.xml

@@ -0,0 +1,156 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-grub" role="wrap">
+  <?dbhtml filename="grub.html"?>
+
+  <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>This package is known to have issues when its default
+    optimization flags (including the <parameter>-march</parameter> and
+    <parameter>-mcpu</parameter> options) are changed. If any environment
+    variables that override default optimizations have been defined, such
+    as <envar>CFLAGS</envar> and <envar>CXXFLAGS</envar>,
+    unset them when building GRUB.</para>
+
+    <para>Prepare GRUB for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install
+mkdir -v /boot/grub
+cp -v /usr/lib/grub/i386-pc/stage{1,2} /boot/grub</userinput></screen>
+
+    <para>Replace <filename class="directory">i386-pc</filename> with whatever
+    directory is appropriate for the hardware in use.</para>
+
+    <para>The <filename class="directory">i386-pc</filename> directory
+    contains a number of <filename>*stage1_5</filename> files, different
+    ones for different file systems. Review the files available and copy
+    the appropriate ones to the <filename
+    class="directory">/boot/grub</filename> directory. Most users will
+    copy the <filename>e2fs_stage1_5</filename> and/or
+    <filename>reiserfs_stage1_5</filename> files.</para>
+
+  </sect2>
+
+  <sect2 id="contents-gRUB" role="content">
+    <title>Contents of GRUB</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>grub, grub-install, grub-md5-crypt, grub-set-default,
+        grub-terminfo, and mbchk</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="grub">
+        <term><command>grub</command></term>
+        <listitem>
+          <para>The Grand Unified Bootloader's command shell</para>
+          <indexterm zone="ch-system-grub grub">
+            <primary sortas="b-grub">grub</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="grub-install">
+        <term><command>grub-install</command></term>
+        <listitem>
+          <para>Installs GRUB on the given device</para>
+          <indexterm zone="ch-system-grub grub-install">
+            <primary sortas="b-grub-install">grub-install</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="grub-md5-crypt">
+        <term><command>grub-md5-crypt</command></term>
+        <listitem>
+          <para>Encrypts a password in MD5 format</para>
+          <indexterm zone="ch-system-grub grub-md5-crypt">
+            <primary sortas="b-grub-md5-crypt">grub-md5-crypt</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-terminfo">
+        <term><command>grub-terminfo</command></term>
+        <listitem>
+          <para>Generates a terminfo command from a terminfo name; it can be
+          employed if an unknown terminal is being used</para>
+          <indexterm zone="ch-system-grub grub-terminfo">
+            <primary sortas="b-grub-terminfo">grub-terminfo</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mbchk">
+        <term><command>mbchk</command></term>
+        <listitem>
+          <para>Checks the format of a multi-boot kernel</para>
+          <indexterm zone="ch-system-grub mbchk">
+            <primary sortas="b-mbchk">mbchk</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 255 - 0
chapter06/gzip.xml

@@ -0,0 +1,255 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-gzip" role="wrap">
+  <?dbhtml filename="gzip.html"?>
+
+  <title>Gzip-&gzip-version;</title>
+
+  <indexterm zone="ch-system-gzip">
+    <primary sortas="a-Gzip">Gzip</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Gzip package contains programs for compressing and decompressing
+    files.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gzip-ch6-sbu;</seg>
+        <seg>&gzip-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Gzip</title>
+
+    <para>Gzip has 2 known security vulnerabilities.  The following patch
+    addresses both of them:</para>
+
+<screen><userinput>patch -Np1 -i ../&gzip-security_fix-patch;</userinput></screen>
+
+    <para>Prepare Gzip for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>The <command>gzexe</command> script has the location of the
+    <command>gzip</command> binary hard-wired into it. Because the
+    location of the binary is changed later, the following command ensures
+    that the new location gets placed into the script:</para>
+
+<screen><userinput>sed -i 's@"BINDIR"@/bin@g' gzexe.in</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Move the <command>gzip</command> program to the <filename
+    class="directory">/bin</filename> directory and create some commonly used
+    symlinks to it:</para>
+
+<screen><userinput>mv -v /usr/bin/gzip /bin
+rm -v /usr/bin/{gunzip,zcat}
+ln -sv gzip /bin/gunzip
+ln -sv gzip /bin/zcat
+ln -sv gzip /bin/compress
+ln -sv gunzip /bin/uncompress</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-gzip" role="content">
+    <title>Contents of Gzip</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>compress (link to gzip), gunzip (link to gzip), gzexe, gzip,
+        uncompress (link to gunzip), zcat (link to gzip), zcmp, zdiff,
+        zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="compress">
+        <term><command>compress</command></term>
+        <listitem>
+          <para>Compresses and decompresses files</para>
+          <indexterm zone="ch-system-gzip compress">
+            <primary sortas="b-compress">compress</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <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&mdash;<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>
+
+  </sect2>
+
+</sect1>

+ 95 - 0
chapter06/iana-etc.xml

@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-iana-etc" role="wrap">
+  <?dbhtml filename="iana-etc.html"?>
+
+  <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>The following command converts the raw data provided by IANA into the
+    correct formats for the <filename>/etc/protocols</filename> and
+    <filename>/etc/services</filename> data files:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</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>

+ 218 - 0
chapter06/inetutils.xml

@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-inetutils" role="wrap">
+  <?dbhtml filename="inetutils.html"?>
+
+  <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>Apply a patch to Inetutils to enable it to compile with
+    GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&inetutils-gcc4_fixes-patch;</userinput></screen>
+
+    <para>All programs that come with Inetutils will not be installed.
+    However, the Inetutils build system will insist on installing all the
+    man pages anyway. The following patch will correct this
+    situation:</para>
+
+<screen><userinput>patch -Np1 -i ../&inetutils-man_pages-patch;</userinput></screen>
+
+<para>Prepare Inetutils for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr --libexecdir=/usr/sbin \
+    --sysconfdir=/etc --localstatedir=/var \
+    --disable-logger --disable-syslogd \
+    --disable-whois --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 better version later.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-syslogd</parameter></term>
+        <listitem>
+          <para>This option prevents Inetutils from installing the System Log
+          Daemon, which is installed with the Sysklogd package.</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-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. More information can be found
+          at <ulink url="&blfs-root;view/svn/basicnet/inetutils.html"/>. Note that
+          better replacements are available for many of these servers.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make install</userinput></screen>
+
+    <para>Move the <command>ping</command> program to its FHS-compliant
+    place:</para>
+
+<screen><userinput>mv -v /usr/bin/ping /bin</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-inetutils" role="content">
+    <title>Contents of Inetutils</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>ftp, ping, rcp, rlogin, rsh, talk, telnet, and tftp</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <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="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="rcp">
+        <term><command>rcp</command></term>
+        <listitem>
+          <para>Performs remote file copy</para>
+          <indexterm zone="ch-system-inetutils rcp">
+            <primary sortas="b-rcp">rcp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rlogin">
+        <term><command>rlogin</command></term>
+        <listitem>
+          <para>Performs remote login</para>
+          <indexterm zone="ch-system-inetutils rlogin">
+            <primary sortas="b-rlogin">rlogin</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rsh">
+        <term><command>rsh</command></term>
+        <listitem>
+          <para>Runs a remote shell</para>
+          <indexterm zone="ch-system-inetutils rsh">
+            <primary sortas="b-rsh">rsh</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>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 57 - 0
chapter06/introduction.xml

@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-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 the user (or the system)
+  needs it.  For every installed package, a summary of its contents is given,
+  followed by concise descriptions of each program and library the package
+  installed.</para>
+
+  <para>If using compiler optimizations, please
+  review the optimization hint at <ulink url="&hints-root;optimization.txt"/>.
+  Compiler optimizations 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 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>The order that packages are installed in this chapter needs to be
+  strictly followed to ensure that no program accidentally acquires a path
+  referring to <filename class="directory">/tools</filename> hard-wired into
+  it. For the same reason, do not compile packages in parallel. Compiling in
+  parallel may save time (especially on dual-CPU machines), but it could result
+  in a program containing a hard-wired path to <filename
+  class="directory">/tools</filename>, which will cause the program to stop
+  working when that directory is removed.</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>
+
+</sect1>

+ 299 - 0
chapter06/iproute2.xml

@@ -0,0 +1,299 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-iproute2" role="wrap">
+  <?dbhtml filename="iproute2.html"?>
+
+  <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>Compile the package:</para>
+
+<screen><userinput>make SBINDIR=/sbin</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make option:</title>
+
+      <varlistentry>
+        <term><parameter>SBINDIR=/sbin</parameter></term>
+        <listitem>
+          <para>This ensures that the IPRoute2 binaries will install into
+          <filename class="directory">/sbin</filename>. This is the correct
+          location according to the FHS, because some of the IPRoute2 binaries
+          are used by the LFS-Bootscripts package.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make SBINDIR=/sbin install</userinput></screen>
+
+    <para>The <command>arpd</command> binary links against the Berkeley DB
+    libraries that reside in <filename class="directory">/usr</filename> and
+    uses a database in <filename>/var/lib/arpd/arpd.db</filename>. Thus,
+    according to the FHS, it must be in <filename
+    class="directory">/usr/sbin</filename>. Move it there:</para>
+
+    <screen><userinput>mv -v /sbin/arpd /usr/sbin</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-iproute2" role="content">
+    <title>Contents of IPRoute2</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>arpd, ctstat (link to lnstat), ifcfg, ifstat, ip, lnstat, nstat,
+        routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss,
+        and tc.</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="arpd">
+        <term><command>arpd</command></term>
+        <listitem>
+          <para>Userspace ARP daemon, useful in really large networks, where the
+          kernelspace ARP implementation is insufficient, or when setting up a
+          honeypot</para>
+          <indexterm zone="ch-system-iproute2 arpd">
+            <primary sortas="b-arpd">arpd</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="ifcfg">
+        <term><command>ifcfg</command></term>
+        <listitem>
+          <para>A shell script wrapper for the <command>ip</command> command</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>&lt;device&gt;</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 continously 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>

+ 371 - 0
chapter06/kbd.xml

@@ -0,0 +1,371 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-kbd" role="wrap">
+  <?dbhtml filename="kbd.html"?>
+
+  <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 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>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>Patch Kbd to fix a bug in <command>setfont</command> that is triggered
+    when compiling with GCC-&gcc-version;:</para>
+
+<screen><userinput>patch -Np1 -i ../&kbd-gcc4_fixes-patch;</userinput></screen>
+
+    <para>Prepare Kbd for compilation:</para>
+
+<screen><userinput>./configure --datadir=/lib/kbd</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--datadir=/lib/kbd</parameter></term>
+        <listitem>
+          <para>This option puts keyboard layout data in a directory that will
+          always be on the root partition instead of the default <filename
+          class="directory">/usr/share/kbd</filename>.</para>
+       </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>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>Some of the scripts in the LFS-Bootscripts package depend on
+    <command>kbd_mode</command>, <command>openvt</command>, and
+    <command>setfont</command>.  As <filename class="directory">/usr</filename>
+    may not be available during the early stages of booting, those binaries
+    need to be on the root partition:</para>
+
+<screen><userinput>mv -v /usr/bin/{kbd_mode,openvt,setfont} /bin</userinput></screen>
+
+
+
+
+  </sect2>
+
+  <sect2 id="contents-kbd" role="content">
+    <title>Contents of Kbd</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>chvt, deallocvt, dumpkeys, fgconsole, getkeycodes, 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,
+        showconsolefont, showkey, unicode_start, and unicode_stop</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="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>A link to <command>psfxtable</command></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>A link to <command>psfxtable</command></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>A link to <command>psfxtable</command></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>Handle Unicode character tables for console fonts</para>
+          <indexterm zone="ch-system-kbd psfxtable">
+            <primary sortas="b-psfxtable">psfxtable</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="resizecons">
+        <term><command>resizecons</command></term>
+        <listitem>
+          <para>Changes the kernel idea of the console size</para>
+          <indexterm zone="ch-system-kbd resizecons">
+            <primary sortas="b-resizecons">resizecons</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="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>

+ 78 - 0
chapter06/kernfs.xml

@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-kernfs">
+  <?dbhtml filename="kernfs.html"?>
+
+  <title>Preparing Virtual Kernel File Systems</title>
+
+  <indexterm zone="ch-system-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}</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 will 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. This 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 --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 -vt devpts devpts $LFS/dev/pts
+mount -vt tmpfs shm $LFS/dev/shm
+mount -vt proc proc $LFS/proc
+mount -vt sysfs sysfs $LFS/sys</userinput></screen>
+
+  </sect2>
+
+</sect1>

+ 119 - 0
chapter06/less.xml

@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-less" role="wrap">
+  <?dbhtml filename="less.html"?>
+
+  <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>./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>make</userinput></screen>
+
+    <para>This package does not come with a test suite.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>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>

+ 110 - 0
chapter06/libtool.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-libtool" role="wrap">
+  <?dbhtml filename="libtool.html"?>
+
+  <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>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>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>
+
+      <seglistitem>
+        <seg>libtool and libtoolize</seg>
+        <seg>libltdl.{a,so}</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>

+ 93 - 0
chapter06/linux-libc-headers.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-linux-libc-headers" role="wrap">
+  <?dbhtml filename="linux-libc-headers.html"?>
+
+  <title>Linux-Libc-Headers-&linux-libc-headers-version;</title>
+
+  <indexterm zone="ch-system-linux-libc-headers">
+    <primary sortas="a-Linux-Libc-Headers">Linux-Libc-Headers</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Linux-Libc-Headers package contains the
+    <quote>sanitized</quote> kernel headers.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&linux-libc-headers-ch6-sbu;</seg>
+        <seg>&linux-libc-headers-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Linux-Libc-Headers</title>
+
+    <para>For years it has been common practice to use <quote>raw</quote>
+    kernel headers (straight from a kernel tarball) in <filename
+    class="directory">/usr/include</filename>, but over the last few
+    years, the kernel developers have taken a strong stance that this
+    should not be done. This gave birth to the Linux-Libc-Headers Project,
+    which was designed to maintain an API stable version of the Linux
+    headers.</para>
+
+    <para>Install the header files:</para>
+
+<screen><userinput>install -dv /usr/include/asm
+cp -Rv include/asm-i386/* /usr/include/asm
+cp -Rv include/linux /usr/include</userinput></screen>
+
+    <para>Ensure that all the headers are owned by root:</para>
+
+<screen><userinput>chown -Rv root:root /usr/include/{asm,linux}</userinput></screen>
+
+    <para>Make sure the users can read the headers:</para>
+
+<screen><userinput>find /usr/include/{asm,linux} -type d -exec chmod -v 755 {} \;
+find /usr/include/{asm,linux} -type f -exec chmod -v 644 {} \;</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-linux-libc-headers" role="content">
+    <title>Contents of Linux-Libc-Headers</title>
+
+    <segmentedlist>
+      <segtitle>Installed headers</segtitle>
+
+      <seglistitem>
+        <seg>/usr/include/{asm,linux}/*.h</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="linux-libc-headers">
+        <term><filename class="headerfile">/usr/include/{asm,linux}/*.h</filename></term>
+        <listitem>
+          <para>The Linux API headers</para>
+          <indexterm zone="ch-system-linux-libc-headers linux-libc-headers">
+            <primary sortas="e-/usr/include/{asm,linux}/*.h">/usr/include/{asm,linux}/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>

+ 92 - 0
chapter06/m4.xml

@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
+  "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd" [
+  <!ENTITY % general-entities SYSTEM "../general.ent">
+  %general-entities;
+]>
+
+<sect1 id="ch-system-m4" role="wrap">
+  <?dbhtml filename="m4.html"?>
+
+  <title>M4-&m4-version;</title>
+
+  <indexterm zone="ch-system-m4">
+    <primary sortas="a-M4">M4</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The M4 package contains a macro processor.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&m4-ch6-sbu;</seg>
+        <seg>&m4-ch6-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of M4</title>
+
+    <para>Prepare M4 for compilation:</para>
+
+<screen><userinput>./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput>make</userinput></screen>
+
+    <para>To test the results, issue:
+    <userinput>make check</userinput>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput>make 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">
+        <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>
+
+</sect1>

部分文件因为文件数量过多而无法显示