coreutils.xml 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <?xml version="1.0" encoding="ISO-8859-1"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="ch-tools-coreutils" role="wrap">
  8. <?dbhtml filename="coreutils.html"?>
  9. <sect1info condition="script">
  10. <productname>coreutils</productname>
  11. <productnumber>&coreutils-version;</productnumber>
  12. <address>&coreutils-url;</address>
  13. </sect1info>
  14. <title>Coreutils-&coreutils-version;</title>
  15. <indexterm zone="ch-tools-coreutils">
  16. <primary sortas="a-Coreutils">Coreutils</primary>
  17. <secondary>tools</secondary>
  18. </indexterm>
  19. <sect2 role="package">
  20. <title/>
  21. <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
  22. href="../chapter08/coreutils.xml"
  23. xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
  24. <segmentedlist>
  25. <segtitle>&buildtime;</segtitle>
  26. <segtitle>&diskspace;</segtitle>
  27. <seglistitem>
  28. <seg>&coreutils-tmp-sbu;</seg>
  29. <seg>&coreutils-tmp-du;</seg>
  30. </seglistitem>
  31. </segmentedlist>
  32. </sect2>
  33. <sect2 role="installation">
  34. <title>Installation of Coreutils</title>
  35. <para>Prepare Coreutils for compilation:</para>
  36. <screen><userinput remap="configure">./configure --prefix=/usr \
  37. --host=$LFS_TGT \
  38. --build=$(build-aux/config.guess) \
  39. --enable-install-program=hostname \
  40. --enable-no-install-program=kill,uptime</userinput></screen>
  41. <variablelist>
  42. <title>The meaning of the configure options:</title>
  43. <varlistentry>
  44. <term><envar>--enable-install-program=hostname</envar></term>
  45. <listitem>
  46. <para>This enables the <command>hostname</command> binary to be built
  47. and installed &ndash; it is disabled by default but is required by the
  48. Perl test suite.</para>
  49. </listitem>
  50. </varlistentry>
  51. </variablelist>
  52. <para>Compile the package:</para>
  53. <screen><userinput remap="make">make</userinput></screen>
  54. <para>Install the package:</para>
  55. <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen>
  56. <!--
  57. <para>The above command refuses to install <filename>su</filename>
  58. because the program cannot be installed setuid root as a non-privileged
  59. user. By manually installing it, we can use it for running tests in the
  60. final system as a non-privileged user. Install it with:</para>
  61. <screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen>
  62. -->
  63. <para>Move programs to their final expected locations. Although this is
  64. not necessary in this temporary environment, we must do so because some
  65. programs harcode executable locations:</para>
  66. <screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin
  67. mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin
  68. mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin
  69. mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin
  70. mv -v $LFS/usr/bin/chroot $LFS/usr/sbin
  71. mkdir -pv $LFS/usr/share/man/man8
  72. mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8
  73. sed -i 's/"1"/"8"/' $LFS/usr/share/man/man8/chroot.8</userinput></screen>
  74. </sect2>
  75. <sect2 role="content">
  76. <title/>
  77. <para>Details on this package are located in
  78. <xref linkend="contents-coreutils" role="."/></para>
  79. </sect2>
  80. </sect1>