chapter04.xml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329
  1. <chapter id="chapter-getting-materials" xreflabel="Chapter 4">
  2. <title>The materials: packages and patches</title>
  3. <sect1 id="materials-introduction">
  4. <title>Introduction</title>
  5. <para>Below is a list of packages you need to download for building a basic
  6. Linux system. The listed version numbers correspond to versions of the
  7. software that are <emphasis>known</emphasis> to work, and this book is
  8. based upon them. Unless you are an experienced LFS builder, we highly
  9. recommend not to try out newer versions, as the build commands for one
  10. version may not work with a newer version. Also, there is often a good
  11. reason for not using the latest version due to known problems that haven't
  12. been worked around yet.</para>
  13. <para>All the URLs, when possible, refer to the project's page at
  14. <ulink url="http://www.freshmeat.net/"/>. The Freshmeat
  15. pages will give you easy access to the official download sites as well as
  16. project websites, mailing lists, FAQs, changelogs and more.</para>
  17. <para>We can't guarantee that these download locations are always available.
  18. In case a download location has changed since this book was published, please
  19. try to google for the package. Should you remain unsuccessful with this, you
  20. can consult the book's errata page at <ulink url="&lfs-root;lfs/print/"/>
  21. or, better yet, try one of the alternative means of downloading listed on
  22. <ulink url="&lfs-root;lfs/packages.html"/>.</para>
  23. <para>You'll need to store all the downloaded packages and patches somewhere
  24. that is conveniently available throughout the entire build. You'll also need a
  25. working directory in which to unpack the sources and build them. A scheme that
  26. works well is to use <filename>$LFS/sources</filename> as the place to store
  27. the tarballs and patches, <emphasis>and</emphasis> as a working directory.
  28. This way everything you need will be located on the LFS partition and available
  29. during all stages of the building process.</para>
  30. <para>So you may want to execute, as <emphasis>root</emphasis>, the following
  31. command before starting your download session:</para>
  32. <screen><userinput>mkdir $LFS/sources</userinput></screen>
  33. <para>And make this directory writable (and sticky) for your normal user -- as
  34. you won't do the downloading as <emphasis>root</emphasis>, we guess:</para>
  35. <screen><userinput>chmod a+wt $LFS/sources</userinput></screen>
  36. <!--
  37. <para>For your convenience the top of the list contains a link to a file
  38. you can use with the <ulink url="http://wget.sunsite.dk">wget</ulink>
  39. program. Using this file and the <command>wget</command> program will
  40. make it easy to download all the files at once, rather than downloading each
  41. and every individual file manually.</para>
  42. -->
  43. </sect1>
  44. <sect1 id="materials-packages">
  45. <title>All the packages</title>
  46. <para>Download or otherwise obtain the following packages:</para>
  47. <literallayout>
  48. Autoconf (&autoconf-version;) - &autoconf-size;:
  49. <ulink url="http://freshmeat.net/projects/autoconf/"/>
  50. Automake (&automake-version;) - &automake-size;:
  51. <ulink url="http://freshmeat.net/projects/automake/"/>
  52. Bash (&bash-version;) - &bash-size;:
  53. <ulink url="http://freshmeat.net/projects/gnubash/"/>
  54. Binutils (&binutils-version;) - &binutils-size;:
  55. <ulink url="http://freshmeat.net/projects/binutils/"/>
  56. Bison (&bison-version;) - &bison-size;:
  57. <ulink url="http://freshmeat.net/projects/bison/"/>
  58. Bzip2 (&bzip2-version;) - &bzip2-size;:
  59. <ulink url="http://freshmeat.net/projects/bzip2/"/>
  60. Coreutils (&coreutils-version;) - &coreutils-size;:
  61. <ulink url="http://freshmeat.net/projects/coreutils/"/>
  62. DejaGnu (&dejagnu-version;) - &dejagnu-size;:
  63. <ulink url="http://freshmeat.net/projects/dejagnu/"/>
  64. Diffutils (&diffutils-version;) - &diffutils-size;:
  65. <ulink url="http://freshmeat.net/projects/diffutils/"/>
  66. E2fsprogs (&e2fsprogs-version;) - &e2fsprogs-size;:
  67. <ulink url="http://freshmeat.net/projects/e2fsprogs/"/>
  68. Ed (&ed-version;) - &ed-size;:
  69. <ulink url="http://freshmeat.net/projects/ed/"/>
  70. Expect (&expect-version;) - &expect-size;:
  71. <ulink url="http://freshmeat.net/projects/expect/"/>
  72. File (&file-version;) - &file-size;: -- <emphasis>(see Note 1 below)</emphasis>
  73. <ulink url="http://freshmeat.net/projects/file/"/>
  74. Findutils (&findutils-version;) - &findutils-size;:
  75. <ulink url="http://freshmeat.net/projects/findutils/"/>
  76. Flex (&flex-version;) - &flex-size;:
  77. <ulink url="ftp://ftp.gnu.org/gnu/non-gnu/flex/"/>
  78. Gawk (&gawk-version;) - &gawk-size;:
  79. <ulink url="http://freshmeat.net/projects/gnuawk/"/>
  80. GCC (&gcc-2953-version;) - &gcc-2953-size;:
  81. <ulink url="http://freshmeat.net/projects/gcc/"/>
  82. GCC-core (&gcc-version;) - &gcc-core-size;:
  83. <ulink url="http://freshmeat.net/projects/gcc/"/>
  84. GCC-g++ (&gcc-version;) - &gcc-gpp-size;:
  85. <ulink url="http://freshmeat.net/projects/gcc/"/>
  86. GCC-testsuite (&gcc-version;) - &gcc-testsuite-size;:
  87. <ulink url="http://freshmeat.net/projects/gcc/"/>
  88. Gettext (&gettext-version;) - &gettext-size;:
  89. <ulink url="http://freshmeat.net/projects/gettext/"/>
  90. Glibc (&glibc-version;) - &glibc-size;: -- <emphasis>(see Note 2 below)</emphasis>
  91. <ulink url="http://freshmeat.net/projects/glibc/"/>
  92. Grep (&grep-version;) - &grep-size;:
  93. <ulink url="http://freshmeat.net/projects/grep/"/>
  94. Groff (&groff-version;) - &groff-size;:
  95. <ulink url="http://freshmeat.net/projects/groff/"/>
  96. Grub (&grub-version;) - &grub-size;:
  97. <ulink url="ftp://alpha.gnu.org/pub/gnu/grub/"/>
  98. Gzip (&gzip-version;) - &gzip-size;:
  99. <ulink url="ftp://alpha.gnu.org/gnu/gzip/"/>
  100. Inetutils (&inetutils-version;) - &inetutils-size;:
  101. <ulink url="http://freshmeat.net/projects/inetutils/"/>
  102. Kbd (&kbd-version;) - &kbd-size;:
  103. <ulink url="http://freshmeat.net/projects/kbd/"/>
  104. Less (&less-version;) - &less-size;:
  105. <ulink url="http://freshmeat.net/projects/less/"/>
  106. LFS-Bootscripts (&bootscripts-version;) - &bootscripts-size;:
  107. <ulink url="&http-down;lfs-bootscripts-&bootscripts-version;.tar.bz2"/>
  108. Lfs-Utils (&lfs-utils-version;) - &lfs-utils-size;:
  109. <ulink url="&lfs-root;~winkie/downloads/lfs-utils/"/>
  110. Libtool (&libtool-version;) - &libtool-size;:
  111. <ulink url="http://freshmeat.net/projects/libtool/"/>
  112. Linux (&kernel-version;) - &kernel-size;:
  113. <ulink url="http://freshmeat.net/projects/linux/"/>
  114. M4 (&m4-version;) - &m4-size;:
  115. <ulink url="http://freshmeat.net/projects/gnum4/"/>
  116. Make (&make-version;) - &make-size;:
  117. <ulink url="http://freshmeat.net/projects/gnumake/"/>
  118. Make_devices (&makedev-version;) - &makedev-size;:
  119. <ulink url="&lfs-root;~alex/make_devices-&makedev-version;.bz2"/>
  120. Man (&man-version;) - &man-size;:
  121. <ulink url="http://freshmeat.net/projects/man/"/>
  122. Man-pages (&man-pages-version;) - &man-pages-size;:
  123. <ulink url="http://freshmeat.net/projects/man-pages/"/>
  124. Modutils (&modutils-version;) - &modutils-size;:
  125. <ulink url="http://freshmeat.net/projects/modutils/"/>
  126. Ncurses (&ncurses-version;) - &ncurses-size;:
  127. <ulink url="http://freshmeat.net/projects/ncurses/"/>
  128. Net-tools (&net-tools-version;) - &net-tools-size;:
  129. <ulink url="http://freshmeat.net/projects/net-tools/"/>
  130. Patch (&patch-version;) - &patch-size;:
  131. <ulink url="http://freshmeat.net/projects/patch/"/>
  132. Perl (&perl-version;) - &perl-size;:
  133. <ulink url="http://freshmeat.net/projects/perl/"/>
  134. Procinfo (&procinfo-version;) - &procinfo-size;:
  135. <ulink url="http://freshmeat.net/projects/procinfo/"/>
  136. Procps (&procps-version;) - &procps-size;:
  137. <ulink url="http://freshmeat.net/projects/procps/"/>
  138. Psmisc (&psmisc-version;) - &psmisc-size;:
  139. <ulink url="http://freshmeat.net/projects/psmisc/"/>
  140. Sed (&sed-version;) - &sed-size;:
  141. <ulink url="http://freshmeat.net/projects/sed/"/>
  142. Shadow (&shadow-version;) - &shadow-size;:
  143. <ulink url="http://freshmeat.net/projects/shadow/"/>
  144. Sysklogd (&sysklogd-version;) - &sysklogd-size;:
  145. <ulink url="http://freshmeat.net/projects/sysklogd/"/>
  146. Sysvinit (&sysvinit-version;) - &sysvinit-size;:
  147. <ulink url="http://freshmeat.net/projects/sysvinit/"/>
  148. Tar (&tar-version;) - &tar-size;:
  149. <ulink url="ftp://alpha.gnu.org/gnu/tar/"/>
  150. Tcl (&tcl-version;) - &tcl-size;:
  151. <ulink url="http://freshmeat.net/projects/tcltk/"/>
  152. Texinfo (&texinfo-version;) - &texinfo-size;:
  153. <ulink url="http://freshmeat.net/projects/texinfo/"/>
  154. Util-linux (&util-linux-version;) - &util-linux-size;:
  155. <ulink url="http://freshmeat.net/projects/util-linux/"/>
  156. Vim (&vim-version;) - &vim-size;:
  157. <ulink url="http://freshmeat.net/projects/vim/"/>
  158. Zlib (&zlib-version;) - &zlib-size;:
  159. <ulink url="http://freshmeat.net/projects/zlib/"/>
  160. Total size of these packages: &all-size-mb;
  161. </literallayout>
  162. <note><para>1) File (&file-version;) may not be available by the time you read
  163. this. The site admins of the master download location are known to occasionally
  164. remove old versions when new ones are released. Please refer to the
  165. <xref linkend="ch-system-file"/> section for an alternate download
  166. location.</para></note>
  167. <note><para>2) As of this writing, the Glibc maintainers have decided in their
  168. wisdom not to make available new release tarballs for download. The only way to
  169. obtain the current Glibc release from pristine upstream sources is to pull it
  170. from the Glibc CVS repository. The following commands will download the current
  171. release and make a tarball from it:</para>
  172. <screen><userinput>cvs -z 9 -d :pserver:anoncvs@sources.redhat.com:/cvs/glibc \
  173. &nbsp;&nbsp;&nbsp;&nbsp;export -d &glibc-dir; -D "2003-12-02 UTC" libc
  174. tar jcvf &glibc-package; &glibc-dir;</userinput></screen>
  175. <para>Alternatively, we've made our own tarball available which you can
  176. download courtesy of the generous LFS mirror sites. Please refer to the
  177. <xref linkend="ch-tools-glibc"/> section for the download links.</para></note>
  178. </sect1>
  179. <sect1 id="materials-patches">
  180. <title>Needed patches</title>
  181. <para>Besides all those packages, you'll also need several patches. These
  182. correct tiny mistakes in the packages that should be fixed by the maintainer,
  183. or just make some small modifications to bend things our way. You'll need the
  184. following:</para>
  185. <literallayout>
  186. Bash Patch - &bash-patch-size;:
  187. <ulink url="&patches-root;&bash-patch;"/>
  188. Bison Attribute Patch - &bison-patch-size;:
  189. <ulink url="&patches-root;&bison-patch;"/>
  190. Coreutils Hostname Patch - &coreutils-hostname-patch-size;:
  191. <ulink url="&patches-root;&coreutils-hostname-patch;"/>
  192. Coreutils Posixver Patch - &coreutils-posixver-patch-size;:
  193. <ulink url="&patches-root;&coreutils-posixver-patch;"/>
  194. Coreutils Uname Patch - &coreutils-uname-patch-size;:
  195. <ulink url="&patches-root;&coreutils-uname-patch;"/>
  196. Ed Mkstemp Patch - &ed-patch-size;:
  197. <ulink url="&patches-root;&ed-patch;"/>
  198. Expect Spawn Patch - &expect-patch-size;:
  199. <ulink url="&patches-root;&expect-patch;"/>
  200. GCC No-Fixincludes Patch - &gcc-nofixincludes-patch-size;:
  201. <ulink url="&patches-root;&gcc-nofixincludes-patch;"/>
  202. GCC Specs Patch - &gcc-specs-patch-size;:
  203. <ulink url="&patches-root;&gcc-specs-patch;"/>
  204. GCC-2 Patch - &gcc-2953-patch-size;:
  205. <ulink url="&patches-root;&gcc-2953-patch;"/>
  206. GCC-2 No-Fixincludes Patch - &gcc-2953-no-fixinc-patch-size;:
  207. <ulink url="&patches-root;&gcc-2953-no-fixinc-patch;"/>
  208. GCC-2 Return-Type Patch - &gcc-2953-returntype-fix-patch-size;:
  209. <ulink url="&patches-root;&gcc-2953-returntype-fix-patch;"/>
  210. Inetutils No-Server-Man-Pages Patch - &inetutils-no-server-man-pages-patch-size;:
  211. <ulink url="&patches-root;&inetutils-no-server-man-pages-patch;"/>
  212. Kbd More-Programs Patch - &kbd-patch-size;:
  213. <ulink url="&patches-root;&kbd-patch;"/>
  214. Man 80-Columns Patch - &man-80cols-patch-size;:
  215. <ulink url="&patches-root;&man-80cols-patch;"/>
  216. Net-tools Mii-Tool-Gcc33 Patch - &net-tools-mii-patch-size;:
  217. <ulink url="&patches-root;&net-tools-mii-patch;"/>
  218. Perl Libc Patch - &perl-libc-patch-size;:
  219. <ulink url="&patches-root;&perl-libc-patch;"/>
  220. </literallayout>
  221. <para>In addition to the above required patches, there exist a number of
  222. optional ones created by the LFS community. Most of these solve slight
  223. problems, or enable some functionality that's not enabled by default.
  224. Feel free to examine the patches database, located at <ulink
  225. url="&lfs-root;patches/"/>, and pick any additional patches you wish to
  226. use.</para>
  227. </sect1>
  228. </chapter>