- Timestamp:
- 03/31/2021 10:41:39 AM (3 years ago)
- Branches:
- ml-11.0, multilib
- Children:
- 7610848
- Parents:
- 811b5a39
- git-author:
- Thomas Trepl <thomas@…> (06/29/2020 07:55:01 AM)
- git-committer:
- Xℹ Ruoyao <xry111@…> (03/31/2021 10:41:39 AM)
- Location:
- chapter06
- Files:
-
- 2 added
- 6 deleted
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter06/bash.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-bash" role="wrap">8 <sect1 id="ch-tools-bash" role="wrap"> 9 9 <?dbhtml filename="bash.html"?> 10 10 … … 17 17 <title>Bash-&bash-version;</title> 18 18 19 <indexterm zone="ch- system-bash">19 <indexterm zone="ch-tools-bash"> 20 20 <primary sortas="a-Bash">Bash</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Bash package contains the Bourne-Again SHell.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/bash.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&bash- ch6-sbu;</seg>34 <seg>&bash- ch6-du;</seg>36 <seg>&bash-tmp-sbu;</seg> 37 <seg>&bash-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of Bash</title> 42 45 43 <para>Incorporate some upstream fixes:</para>44 45 <screen><userinput remap="pre">patch -Np1 -i ../&bash-fixes-patch;</userinput></screen>46 47 46 <para>Prepare Bash for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr 50 -- docdir=/usr/share/doc/bash-&bash-version;\51 -- without-bash-malloc\52 --with -installed-readline</userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --build=$(support/config.guess) \ 50 --host=$LFS_TGT \ 51 --without-bash-malloc</userinput></screen> 53 52 54 53 <variablelist> 55 <title>The meaning of the new configure option:</title>54 <title>The meaning of the configure options:</title> 56 55 57 56 <varlistentry> 58 <term><parameter>--with -installed-readline</parameter></term>57 <term><parameter>--without-bash-malloc</parameter></term> 59 58 <listitem> 60 <para>This option tells Bash to use the <filename 61 class="libraryfile">readline</filename> library that is already 62 installed on the system rather than using its own readline 63 version.</para> 59 <para>This option turns off the use of Bash's memory allocation 60 (<function>malloc</function>) function which is known to cause 61 segmentation faults. By turning this option off, Bash will use 62 the <function>malloc</function> functions from Glibc which are 63 more stable.</para> 64 64 </listitem> 65 65 </varlistentry> … … 71 71 <screen><userinput remap="make">make</userinput></screen> 72 72 73 <para>Skip down to <quote>Install the 74 package</quote> if not running the test suite.</para> 73 <para>Install the package:</para> 75 74 76 <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>75 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 77 76 78 <screen><userinput remap="test">chown -Rv tester .</userinput></screen>77 <para>Move the excutable to where it is expected:</para> 79 78 80 <para>Now, run the tests as the <systemitem 81 class="username">tester</systemitem> user:</para> 79 <screen><userinput remap="install">mv $LFS/usr/bin/bash $LFS/bin/bash</userinput></screen> 82 80 83 <screen><userinput remap="test">su tester << EOF 84 PATH=$PATH make tests < $(tty) 85 EOF</userinput></screen> 81 <para>Make a link for the programs that use <command>sh</command> for 82 a shell:</para> 86 83 87 <para>The <systemitem class="username">tester</systemitem> 88 user does not have enough permissions for all the tests to pass. This shows 89 up in some <quote>diff</quote> output in four test results. Portions of the 90 run-execscript, run-lastpipe, run-read, and run-test programs 91 are known to fail in the LFS chroot environment, but pass if the tests 92 are run in a full system.</para> 93 94 <para>Install the package and move the main executable to 95 <filename class='directory'>/bin</filename>:</para> 96 97 <screen><userinput remap="install">make install 98 mv -vf /usr/bin/bash /bin</userinput></screen> 99 100 <para>Run the newly compiled <command>bash</command> program (replacing the one that is 101 currently being executed):</para> 102 103 <screen role="nodump"><userinput>exec /bin/bash --login +h</userinput></screen> 104 105 <note> 106 <para>The parameters used make the <command>bash</command> 107 process an interactive login shell and continue to disable hashing so 108 that new programs are found as they become available.</para> 109 </note> 84 <screen><userinput remap="install">ln -sv bash $LFS/bin/sh</userinput></screen> 110 85 111 86 </sect2> 112 87 113 <sect2 id="contents-bash"role="content">114 <title >Contents of Bash</title>88 <sect2 role="content"> 89 <title/> 115 90 116 <segmentedlist> 117 <segtitle>Installed programs</segtitle> 118 <segtitle>Installed directory</segtitle> 119 120 <seglistitem> 121 <seg>bash, bashbug, and sh (link to bash)</seg> 122 <seg>/usr/include/bash, /usr/lib/bash, and 123 /usr/share/doc/bash-&bash-version;</seg> 124 </seglistitem> 125 </segmentedlist> 126 127 <variablelist> 128 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 129 <?dbfo list-presentation="list"?> 130 <?dbhtml list-presentation="table"?> 131 132 <varlistentry id="bash"> 133 <term><command>bash</command></term> 134 <listitem> 135 <para>A widely-used command interpreter; it performs many types of 136 expansions and substitutions on a given command line before executing 137 it, thus making this interpreter a powerful tool</para> 138 <indexterm zone="ch-system-bash bash"> 139 <primary sortas="b-bash">bash</primary> 140 </indexterm> 141 </listitem> 142 </varlistentry> 143 144 <varlistentry id="bashbug"> 145 <term><command>bashbug</command></term> 146 <listitem> 147 <para>A shell script to help the user compose and mail standard 148 formatted bug reports concerning <command>bash</command></para> 149 <indexterm zone="ch-system-bash bashbug"> 150 <primary sortas="b-bashbug">bashbug</primary> 151 </indexterm> 152 </listitem> 153 </varlistentry> 154 155 <varlistentry id="sh"> 156 <term><command>sh</command></term> 157 <listitem> 158 <para>A symlink to the <command>bash</command> program; when invoked 159 as <command>sh</command>, <command>bash</command> tries to mimic the 160 startup behavior of historical versions of <command>sh</command> as 161 closely as possible, while conforming to the POSIX standard as 162 well</para> 163 <indexterm zone="ch-system-bash sh"> 164 <primary sortas="b-sh">sh</primary> 165 </indexterm> 166 </listitem> 167 </varlistentry> 168 169 </variablelist> 91 <para>Details on this package are located in 92 <xref linkend="contents-bash" role="."/></para> 170 93 171 94 </sect2> -
chapter06/chapter06.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <chapter id="chapter- building-system" xreflabel="Chapter 6">8 <chapter id="chapter-temporary-tools" xreflabel="Chapter 6"> 9 9 <?dbhtml dir="chapter06"?> 10 10 <?dbhtml filename="chapter06.html"?> 11 11 12 <title> Installing Basic System Software</title>12 <title>Cross Compiling Temporary Tools</title> 13 13 14 14 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/> 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kernfs.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="chroot.xml"/> 18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="creatingdirs.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="createfiles.xml"/> 20 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="adjusting.xml"/> 24 25 <!-- arch="ml_32,ml_x32,ml_all" only --> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc-32.xml"/> 27 15 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/> 16 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/> 17 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/> 18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/> 19 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/> 20 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/> 21 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/> 22 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/> 23 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/> 24 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/> 28 25 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/> 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/>32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>33 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/>34 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>35 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/>36 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>37 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/>38 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/>39 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/>40 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/>41 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="isl.xml"/>42 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>43 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>44 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>45 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>46 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>47 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/>48 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>49 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>50 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/>51 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/>52 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>53 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>54 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>55 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>56 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/>57 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/>58 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/>59 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/>60 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/>61 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>62 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/>63 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/>64 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>65 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/>66 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>67 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>68 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>69 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/>70 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>71 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>72 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>73 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>74 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/>75 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>76 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>77 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>78 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/>79 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>80 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/>81 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>82 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/>83 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/>84 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/>85 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/> 86 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/> 87 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href=" man-db.xml"/>28 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/> 88 29 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/> 89 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/> 90 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/> 91 92 <!-- systemd only --> 93 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/> 94 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/> 95 96 <!-- sysv only --> 97 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/> 98 99 <!-- Both sysv on systemd builds --> 100 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/> 101 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/> 102 103 <!-- Both sysv and systemd builds --> 104 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/> 105 106 <!-- sysv only --> 107 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/> 108 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/> 109 110 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-firmware.xml"/> 111 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/> 112 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="strippingagain.xml"/> 113 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="revisedchroot.xml"/> 30 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/> 31 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils-pass2.xml"/> 32 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc-pass2.xml"/> 114 33 115 34 </chapter> -
chapter06/coreutils.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-coreutils" role="wrap">8 <sect1 id="ch-tools-coreutils" role="wrap"> 9 9 <?dbhtml filename="coreutils.html"?> 10 10 … … 17 17 <title>Coreutils-&coreutils-version;</title> 18 18 19 <indexterm zone="ch- system-coreutils">19 <indexterm zone="ch-tools-coreutils"> 20 20 <primary sortas="a-Coreutils">Coreutils</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Coreutils package contains utilities for showing and setting the 27 basic system characteristics.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/coreutils.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&coreutils- ch6-sbu;</seg>35 <seg>&coreutils- ch6-du;</seg>36 <seg>&coreutils-tmp-sbu;</seg> 37 <seg>&coreutils-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 42 44 <title>Installation of Coreutils</title> 43 45 44 <para>POSIX requires that programs from Coreutils recognize character 45 boundaries correctly even in multibyte locales. The following patch fixes 46 this non-compliance and other internationalization-related bugs.</para> 46 <para>Prepare Coreutils for compilation:</para> 47 47 48 <screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen> 49 50 <note> 51 <para>In the past, many bugs were found in this patch. When reporting new 52 bugs to Coreutils maintainers, please check first if they are reproducible 53 without this patch.</para> 54 </note> 55 56 <!-- this has been fixed in upstream gnulib, when a new version of 57 coreutils is released, please check #4055 to see if the change has been 58 picked up in this package --> 59 <para>Suppress a test which on some machines can loop forever:</para> 60 61 <screen><userinput remap="pre">sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk</userinput></screen> 62 63 <para>Now prepare Coreutils for compilation:</para> 64 65 <screen><userinput remap="configure">autoreconf -fiv 66 FORCE_UNSAFE_CONFIGURE=1 ./configure \ 67 --prefix=/usr \ 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess) \ 51 --enable-install-program=hostname \ 68 52 --enable-no-install-program=kill,uptime</userinput></screen> 69 53 … … 72 56 73 57 <varlistentry> 74 <term>< command>autoreconf</command></term>58 <term><envar>--enable-install-program=hostname</envar></term> 75 59 <listitem> 76 <para>This command updates generated configuration files 77 consistent with the latest version of automake. 78 </para> 79 </listitem> 80 </varlistentry> 81 82 <varlistentry> 83 <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term> 84 <listitem> 85 <para>This environment variable allows the package to be 86 built as the root user. 87 </para> 88 </listitem> 89 </varlistentry> 90 91 <varlistentry> 92 <term><parameter>--enable-no-install-program=kill,uptime</parameter></term> 93 <listitem> 94 <para>The purpose of this switch is to prevent Coreutils from 95 installing binaries that will be installed by other packages later. 96 </para> 60 <para>This enables the <command>hostname</command> binary to be built 61 and installed – it is disabled by default but is required by the 62 Perl test suite.</para> 97 63 </listitem> 98 64 </varlistentry> … … 103 69 <screen><userinput remap="make">make</userinput></screen> 104 70 105 <para>Skip down to <quote>Install the106 package</quote> if not running the test suite.</para>107 108 <para>Now the test suite is ready to be run. First, run the tests that are109 meant to be run as user <systemitem class="username">root</systemitem>:</para>110 111 <screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen>112 113 <para>We're going to run the remainder of the tests as the114 <systemitem class="username">tester</systemitem> user. Certain tests,115 however, require that the user be a member of more than one group. So that116 these tests are not skipped we'll add a temporary group and make the117 user <systemitem class="username">tester</systemitem> a part of it:</para>118 119 <screen><userinput remap="test">echo "dummy:x:102:tester" >> /etc/group</userinput></screen>120 121 <para>Fix some of the permissions so that the non-root user can compile and122 run the tests:</para>123 124 <screen><userinput remap="test">chown -Rv tester . </userinput></screen>125 126 <para>Now run the tests. Make sure the PATH in the <userinput>su</userinput>127 environment includes /tools/bin.</para>128 129 <screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>130 <!--131 <para>The test program test-getlogin is known to fail in a132 partially built system environment like the chroot environment here, but133 passes if run at the end of this chapter. The test program tty.sh is134 also known to fail.</para>135 -->136 137 <para>Remove the temporary group:</para>138 139 <screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>140 71 <para>Install the package:</para> 141 72 142 <screen><userinput remap="install">make install</userinput></screen> 73 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 74 <!-- 75 <para>The above command refuses to install <filename>su</filename> 76 because the program cannot be installed setuid root as a non-privileged 77 user. By manually installing it, we can use it for running tests in the 78 final system as a non-privileged user. Install it with:</para> 143 79 144 <para>Move programs to the locations specified by the FHS:</para> 80 <screen><userinput remap="install">cp -v src/su /tools/bin</userinput></screen> 81 --> 82 <para>Move programs to their final expected locations. Although this is 83 not necessary in this temporary environment, we must do so because some 84 programs harcode executable locations:</para> 145 85 146 <screen><userinput remap="install">mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin 147 mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin 148 mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin 149 mv -v /usr/bin/chroot /usr/sbin 150 mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8 151 sed -i s/\"1\"/\"8\"/1 /usr/share/man/man8/chroot.8</userinput></screen> 152 153 <para revision="sysv">Some of the scripts in the LFS-Bootscripts package 154 depend on <command>head</command>, <command>nice</command>, 155 <command>sleep</command>, and <command>touch</command>. As <filename 156 class="directory">/usr</filename> may not be available during the early and 157 late stages of booting, those binaries need to be on the root partition to 158 maintain FHS compliance:</para> 159 160 <screen><userinput remap="install">mv -v /usr/bin/{head,nice,sleep,touch} /bin</userinput></screen> 86 <screen><userinput remap="install">mv -v $LFS/usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} $LFS/bin 87 mv -v $LFS/usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} $LFS/bin 88 mv -v $LFS/usr/bin/{rmdir,stty,sync,true,uname} $LFS/bin 89 mv -v $LFS/usr/bin/{head,nice,sleep,touch} $LFS/bin 90 mv -v $LFS/usr/bin/chroot $LFS/usr/sbin 91 mkdir -pv $LFS/usr/share/man/man8 92 mv -v $LFS/usr/share/man/man1/chroot.1 $LFS/usr/share/man/man8/chroot.8 93 sed -i 's/"1"/"8"/' $LFS/usr/share/man/man8/chroot.8</userinput></screen> 161 94 162 95 </sect2> 163 96 164 <sect2 id="contents-coreutils"role="content">165 <title >Contents of Coreutils</title>97 <sect2 role="content"> 98 <title/> 166 99 167 <segmentedlist> 168 <segtitle>Installed programs</segtitle> 169 <segtitle>Installed library</segtitle> 170 <segtitle>Installed directory</segtitle> 171 172 <seglistitem> 173 <seg>[, b2sum, base32, base64, basename, basenc, cat, chcon, chgrp, chmod, chown, 174 chroot, cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, 175 dirname, du, echo, env, expand, expr, factor, false, fmt, fold, groups, 176 head, hostid, id, install, join, link, ln, logname, ls, md5sum, mkdir, 177 mkfifo, mknod, mktemp, mv, nice, nl, nohup, nproc, numfmt, od, paste, 178 pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink, realpath, rm, 179 rmdir, runcon, seq, sha1sum, sha224sum, sha256sum, sha384sum, 180 sha512sum, shred, shuf, sleep, sort, split, stat, stdbuf, stty, sum, 181 sync, tac, tail, tee, test, timeout, touch, tr, true, truncate, tsort, 182 tty, uname, unexpand, uniq, unlink, users, vdir, wc, who, whoami, and 183 yes</seg> 184 <seg>libstdbuf.so (in /usr/libexec/coreutils)</seg> 185 <seg>/usr/libexec/coreutils</seg> 186 </seglistitem> 187 </segmentedlist> 188 189 <variablelist> 190 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 191 <?dbfo list-presentation="list"?> 192 <?dbhtml list-presentation="table"?> 193 194 <varlistentry id="base32"> 195 <term><command>base32</command></term> 196 <listitem> 197 <para>Encodes and decodes data according to the base32 specification 198 (RFC 4648)</para> 199 <indexterm zone="ch-system-coreutils base64"> 200 <primary sortas="b-base64">base64</primary> 201 </indexterm> 202 </listitem> 203 </varlistentry> 204 205 <varlistentry id="base64"> 206 <term><command>base64</command></term> 207 <listitem> 208 <para>Encodes and decodes data according to the base64 specification 209 (RFC 4648)</para> 210 <indexterm zone="ch-system-coreutils base64"> 211 <primary sortas="b-base64">base64</primary> 212 </indexterm> 213 </listitem> 214 </varlistentry> 215 216 <varlistentry id="b2sum"> 217 <term><command>b2sum</command></term> 218 <listitem> 219 <para>Prints or checks BLAKE2 (512-bit) checksums</para> 220 <indexterm zone="ch-system-coreutils b2sum"> 221 <primary sortas="b-b2sum">b2sum</primary> 222 </indexterm> 223 </listitem> 224 </varlistentry> 225 226 <varlistentry id="basename"> 227 <term><command>basename</command></term> 228 <listitem> 229 <para>Strips any path and a given suffix from a file name</para> 230 <indexterm zone="ch-system-coreutils basename"> 231 <primary sortas="b-basename">basename</primary> 232 </indexterm> 233 </listitem> 234 </varlistentry> 235 236 <varlistentry id="basenc"> 237 <term><command>basenc</command></term> 238 <listitem> 239 <para>Encodes or decodes data using various algorithms</para> 240 <indexterm zone="ch-system-coreutils basenc"> 241 <primary sortas="b-basenc">basenc</primary> 242 </indexterm> 243 </listitem> 244 </varlistentry> 245 246 <varlistentry id="cat"> 247 <term><command>cat</command></term> 248 <listitem> 249 <para>Concatenates files to standard output</para> 250 <indexterm zone="ch-system-coreutils cat"> 251 <primary sortas="b-cat">cat</primary> 252 </indexterm> 253 </listitem> 254 </varlistentry> 255 256 <varlistentry id="chcon"> 257 <term><command>chcon</command></term> 258 <listitem> 259 <para>Changes security context for files and directories</para> 260 <indexterm zone="ch-system-coreutils chcon"> 261 <primary sortas="b-chcon">chcon</primary> 262 </indexterm> 263 </listitem> 264 </varlistentry> 265 266 <varlistentry id="chgrp"> 267 <term><command>chgrp</command></term> 268 <listitem> 269 <para>Changes the group ownership of files and directories</para> 270 <indexterm zone="ch-system-coreutils chgrp"> 271 <primary sortas="b-chgrp">chgrp</primary> 272 </indexterm> 273 </listitem> 274 </varlistentry> 275 276 <varlistentry id="chmod"> 277 <term><command>chmod</command></term> 278 <listitem> 279 <para>Changes the permissions of each file to the given mode; the mode 280 can be either a symbolic representation of the changes to make or an 281 octal number representing the new permissions</para> 282 <indexterm zone="ch-system-coreutils chmod"> 283 <primary sortas="b-chmod">chmod</primary> 284 </indexterm> 285 </listitem> 286 </varlistentry> 287 288 <varlistentry id="chown"> 289 <term><command>chown</command></term> 290 <listitem> 291 <para>Changes the user and/or group ownership of files and 292 directories</para> 293 <indexterm zone="ch-system-coreutils chown"> 294 <primary sortas="b-chown">chown</primary> 295 </indexterm> 296 </listitem> 297 </varlistentry> 298 299 <varlistentry id="chroot"> 300 <term><command>chroot</command></term> 301 <listitem> 302 <para>Runs a command with the specified directory as the 303 <filename class="directory">/</filename> directory</para> 304 <indexterm zone="ch-system-coreutils chroot"> 305 <primary sortas="b-chroot">chroot</primary> 306 </indexterm> 307 </listitem> 308 </varlistentry> 309 310 <varlistentry id="cksum"> 311 <term><command>cksum</command></term> 312 <listitem> 313 <para>Prints the Cyclic Redundancy Check (CRC) checksum and the byte 314 counts of each specified file</para> 315 <indexterm zone="ch-system-coreutils cksum"> 316 <primary sortas="b-cksum">cksum</primary> 317 </indexterm> 318 </listitem> 319 </varlistentry> 320 321 <varlistentry id="comm"> 322 <term><command>comm</command></term> 323 <listitem> 324 <para>Compares two sorted files, outputting in three columns the lines 325 that are unique and the lines that are common</para> 326 <indexterm zone="ch-system-coreutils comm"> 327 <primary sortas="b-comm">comm</primary> 328 </indexterm> 329 </listitem> 330 </varlistentry> 331 332 <varlistentry id="cp"> 333 <term><command>cp</command></term> 334 <listitem> 335 <para>Copies files</para> 336 <indexterm zone="ch-system-coreutils cp"> 337 <primary sortas="b-cp">cp</primary> 338 </indexterm> 339 </listitem> 340 </varlistentry> 341 342 <varlistentry id="csplit"> 343 <term><command>csplit</command></term> 344 <listitem> 345 <para>Splits a given file into several new files, separating them 346 according to given patterns or line numbers and outputting the byte 347 count of each new file</para> 348 <indexterm zone="ch-system-coreutils csplit"> 349 <primary sortas="b-csplit">csplit</primary> 350 </indexterm> 351 </listitem> 352 </varlistentry> 353 354 <varlistentry id="cut"> 355 <term><command>cut</command></term> 356 <listitem> 357 <para>Prints sections of lines, selecting the parts according to given 358 fields or positions</para> 359 <indexterm zone="ch-system-coreutils cut"> 360 <primary sortas="b-cut">cut</primary> 361 </indexterm> 362 </listitem> 363 </varlistentry> 364 365 <varlistentry id="date"> 366 <term><command>date</command></term> 367 <listitem> 368 <para>Displays the current time in the given format, or sets the 369 system date</para> 370 <indexterm zone="ch-system-coreutils date"> 371 <primary sortas="b-date">date</primary> 372 </indexterm> 373 </listitem> 374 </varlistentry> 375 376 <varlistentry id="dd"> 377 <term><command>dd</command> </term> 378 <listitem> 379 <para>Copies a file using the given block size and count, while 380 optionally performing conversions on it</para> 381 <indexterm zone="ch-system-coreutils dd"> 382 <primary sortas="b-dd">dd</primary> 383 </indexterm> 384 </listitem> 385 </varlistentry> 386 387 <varlistentry id="df"> 388 <term><command>df</command></term> 389 <listitem> 390 <para>Reports the amount of disk space available (and used) on all 391 mounted file systems, or only on the file systems holding the selected 392 files</para> 393 <indexterm zone="ch-system-coreutils df"> 394 <primary sortas="b-df">df</primary> 395 </indexterm> 396 </listitem> 397 </varlistentry> 398 399 <varlistentry id="dir"> 400 <term><command>dir</command></term> 401 <listitem> 402 <para>Lists the contents of each given directory (the same as 403 the <command>ls</command> command)</para> 404 <indexterm zone="ch-system-coreutils dir"> 405 <primary sortas="b-dir">dir</primary> 406 </indexterm> 407 </listitem> 408 </varlistentry> 409 410 <varlistentry id="dircolors"> 411 <term><command>dircolors</command></term> 412 <listitem> 413 <para>Outputs commands to set the <envar>LS_COLOR</envar> 414 environment variable to change the color scheme used by 415 <command>ls</command></para> 416 <indexterm zone="ch-system-coreutils dircolors"> 417 <primary sortas="b-dircolors">dircolors</primary> 418 </indexterm> 419 </listitem> 420 </varlistentry> 421 422 <varlistentry id="dirname"> 423 <term><command>dirname</command></term> 424 <listitem> 425 <para>Strips the non-directory suffix from a file name</para> 426 <indexterm zone="ch-system-coreutils dirname"> 427 <primary sortas="b-dirname">dirname</primary> 428 </indexterm> 429 </listitem> 430 </varlistentry> 431 432 <varlistentry id="du"> 433 <term><command>du</command></term> 434 <listitem> 435 <para>Reports the amount of disk space used by the current directory, 436 by each of the given directories (including all subdirectories) or by 437 each of the given files</para> 438 <indexterm zone="ch-system-coreutils du"> 439 <primary sortas="b-du">du</primary> 440 </indexterm> 441 </listitem> 442 </varlistentry> 443 444 <varlistentry id="echo"> 445 <term><command>echo</command></term> 446 <listitem> 447 <para>Displays the given strings</para> 448 <indexterm zone="ch-system-coreutils echo"> 449 <primary sortas="b-echo">echo</primary> 450 </indexterm> 451 </listitem> 452 </varlistentry> 453 454 <varlistentry id="env"> 455 <term><command>env</command></term> 456 <listitem> 457 <para>Runs a command in a modified environment</para> 458 <indexterm zone="ch-system-coreutils env"> 459 <primary sortas="b-env">env</primary> 460 </indexterm> 461 </listitem> 462 </varlistentry> 463 464 <varlistentry id="expand"> 465 <term><command>expand</command></term> 466 <listitem> 467 <para>Converts tabs to spaces</para> 468 <indexterm zone="ch-system-coreutils expand"> 469 <primary sortas="b-expand">expand</primary> 470 </indexterm> 471 </listitem> 472 </varlistentry> 473 474 <varlistentry id="expr"> 475 <term><command>expr</command></term> 476 <listitem> 477 <para>Evaluates expressions</para> 478 <indexterm zone="ch-system-coreutils expr"> 479 <primary sortas="b-expr">expr</primary> 480 </indexterm> 481 </listitem> 482 </varlistentry> 483 484 <varlistentry id="factor"> 485 <term><command>factor</command></term> 486 <listitem> 487 <para>Prints the prime factors of all specified integer numbers</para> 488 <indexterm zone="ch-system-coreutils factor"> 489 <primary sortas="b-factor">factor</primary> 490 </indexterm> 491 </listitem> 492 </varlistentry> 493 494 <varlistentry id="false"> 495 <term><command>false</command></term> 496 <listitem> 497 <para>Does nothing, unsuccessfully; it always exits with a status code 498 indicating failure</para> 499 <indexterm zone="ch-system-coreutils false"> 500 <primary sortas="b-false">false</primary> 501 </indexterm> 502 </listitem> 503 </varlistentry> 504 505 <varlistentry id="fmt"> 506 <term><command>fmt</command></term> 507 <listitem> 508 <para>Reformats the paragraphs in the given files</para> 509 <indexterm zone="ch-system-coreutils fmt"> 510 <primary sortas="b-fmt">fmt</primary> 511 </indexterm> 512 </listitem> 513 </varlistentry> 514 515 <varlistentry id="fold"> 516 <term><command>fold</command></term> 517 <listitem> 518 <para>Wraps the lines in the given files</para> 519 <indexterm zone="ch-system-coreutils fold"> 520 <primary sortas="b-fold">fold</primary> 521 </indexterm> 522 </listitem> 523 </varlistentry> 524 525 <varlistentry id="groups"> 526 <term><command>groups</command></term> 527 <listitem> 528 <para>Reports a user's group memberships</para> 529 <indexterm zone="ch-system-coreutils groups"> 530 <primary sortas="b-groups">groups</primary> 531 </indexterm> 532 </listitem> 533 </varlistentry> 534 535 <varlistentry id="head"> 536 <term><command>head</command></term> 537 <listitem> 538 <para>Prints the first ten lines (or the given number of lines) 539 of each given file</para> 540 <indexterm zone="ch-system-coreutils head"> 541 <primary sortas="b-head">head</primary> 542 </indexterm> 543 </listitem> 544 </varlistentry> 545 546 <varlistentry id="hostid"> 547 <term><command>hostid</command></term> 548 <listitem> 549 <para>Reports the numeric identifier (in hexadecimal) of the host</para> 550 <indexterm zone="ch-system-coreutils hostid"> 551 <primary sortas="b-hostid">hostid</primary> 552 </indexterm> 553 </listitem> 554 </varlistentry> 555 556 <varlistentry id="id"> 557 <term><command>id</command></term> 558 <listitem> 559 <para>Reports the effective user ID, group ID, and group memberships 560 of the current user or specified user</para> 561 <indexterm zone="ch-system-coreutils id"> 562 <primary sortas="b-id">id</primary> 563 </indexterm> 564 </listitem> 565 </varlistentry> 566 567 <varlistentry id="install"> 568 <term><command>install</command> </term> 569 <listitem> 570 <para>Copies files while setting their permission modes and, if 571 possible, their owner and group</para> 572 <indexterm zone="ch-system-coreutils install"> 573 <primary sortas="b-install">install</primary> 574 </indexterm> 575 </listitem> 576 </varlistentry> 577 578 <varlistentry id="join"> 579 <term><command>join</command></term> 580 <listitem> 581 <para>Joins the lines that have identical join fields from two 582 separate files</para> 583 <indexterm zone="ch-system-coreutils join"> 584 <primary sortas="b-join">join</primary> 585 </indexterm> 586 </listitem> 587 </varlistentry> 588 589 <varlistentry id="link"> 590 <term><command>link</command></term> 591 <listitem> 592 <para>Creates a hard link with the given name to a file</para> 593 <indexterm zone="ch-system-coreutils link"> 594 <primary sortas="b-link">link</primary> 595 </indexterm> 596 </listitem> 597 </varlistentry> 598 599 <varlistentry id="ln"> 600 <term><command>ln</command></term> 601 <listitem> 602 <para>Makes hard links or soft (symbolic) links between files</para> 603 <indexterm zone="ch-system-coreutils ln"> 604 <primary sortas="b-ln">ln</primary> 605 </indexterm> 606 </listitem> 607 </varlistentry> 608 609 <varlistentry id="logname"> 610 <term><command>logname</command></term> 611 <listitem> 612 <para>Reports the current user's login name</para> 613 <indexterm zone="ch-system-coreutils logname"> 614 <primary sortas="b-logname">logname</primary> 615 </indexterm> 616 </listitem> 617 </varlistentry> 618 619 <varlistentry id="ls"> 620 <term><command>ls</command></term> 621 <listitem> 622 <para>Lists the contents of each given directory</para> 623 <indexterm zone="ch-system-coreutils ls"> 624 <primary sortas="b-ls">ls</primary> 625 </indexterm> 626 </listitem> 627 </varlistentry> 628 629 <varlistentry id="md5sum"> 630 <term><command>md5sum</command></term> 631 <listitem> 632 <para>Reports or checks Message Digest 5 (MD5) checksums</para> 633 <indexterm zone="ch-system-coreutils md5sum"> 634 <primary sortas="b-md5sum">md5sum</primary> 635 </indexterm> 636 </listitem> 637 </varlistentry> 638 639 <varlistentry id="mkdir"> 640 <term><command>mkdir</command></term> 641 <listitem> 642 <para>Creates directories with the given names</para> 643 <indexterm zone="ch-system-coreutils mkdir"> 644 <primary sortas="b-mkdir">mkdir</primary> 645 </indexterm> 646 </listitem> 647 </varlistentry> 648 649 <varlistentry id="mkfifo"> 650 <term><command>mkfifo</command></term> 651 <listitem> 652 <para>Creates First-In, First-Outs (FIFOs), a "named 653 pipe" in UNIX parlance, with the given names</para> 654 <indexterm zone="ch-system-coreutils mkfifo"> 655 <primary sortas="b-mkfifo">mkfifo</primary> 656 </indexterm> 657 </listitem> 658 </varlistentry> 659 660 <varlistentry id="mknod"> 661 <term><command>mknod</command></term> 662 <listitem> 663 <para>Creates device nodes with the given names; a device node is a 664 character special file, a block special file, or a FIFO</para> 665 <indexterm zone="ch-system-coreutils mknod"> 666 <primary sortas="b-mknod">mknod</primary> 667 </indexterm> 668 </listitem> 669 </varlistentry> 670 671 <varlistentry id="mktemp"> 672 <term><command>mktemp</command></term> 673 <listitem> 674 <para>Creates temporary files in a secure manner; it is used in scripts</para> 675 <indexterm zone="ch-system-coreutils mktemp"> 676 <primary sortas="b-mktemp">mktemp</primary> 677 </indexterm> 678 </listitem> 679 </varlistentry> 680 681 <varlistentry id="mv"> 682 <term><command>mv</command></term> 683 <listitem> 684 <para>Moves or renames files or directories</para> 685 <indexterm zone="ch-system-coreutils mv"> 686 <primary sortas="b-mv">mv</primary> 687 </indexterm> 688 </listitem> 689 </varlistentry> 690 691 <varlistentry id="nice"> 692 <term><command>nice</command></term> 693 <listitem> 694 <para>Runs a program with modified scheduling priority</para> 695 <indexterm zone="ch-system-coreutils nice"> 696 <primary sortas="b-nice">nice</primary> 697 </indexterm> 698 </listitem> 699 </varlistentry> 700 701 <varlistentry id="nl"> 702 <term><command>nl</command></term> 703 <listitem> 704 <para>Numbers the lines from the given files</para> 705 <indexterm zone="ch-system-coreutils nl"> 706 <primary sortas="b-nl">nl</primary> 707 </indexterm> 708 </listitem> 709 </varlistentry> 710 711 <varlistentry id="nohup"> 712 <term><command>nohup</command></term> 713 <listitem> 714 <para>Runs a command immune to hangups, with its output redirected to 715 a log file</para> 716 <indexterm zone="ch-system-coreutils nohup"> 717 <primary sortas="b-nohup">nohup</primary> 718 </indexterm> 719 </listitem> 720 </varlistentry> 721 722 <varlistentry id="nproc"> 723 <term><command>nproc</command></term> 724 <listitem> 725 <para>Prints the number of processing units available to a 726 process</para> 727 <indexterm zone="ch-system-coreutils nproc"> 728 <primary sortas="b-nproc">nproc</primary> 729 </indexterm> 730 </listitem> 731 </varlistentry> 732 733 <varlistentry id="numfmt"> 734 <term><command>numfmt</command></term> 735 <listitem> 736 <para>Converts numbers to or from human-readable strings</para> 737 <indexterm zone="ch-system-coreutils numfmt"> 738 <primary sortas="b-numfmt">numfmt</primary> 739 </indexterm> 740 </listitem> 741 </varlistentry> 742 743 <varlistentry id="od"> 744 <term><command>od</command></term> 745 <listitem> 746 <para>Dumps files in octal and other formats</para> 747 <indexterm zone="ch-system-coreutils od"> 748 <primary sortas="b-od">od</primary> 749 </indexterm> 750 </listitem> 751 </varlistentry> 752 753 <varlistentry id="paste"> 754 <term><command>paste</command></term> 755 <listitem> 756 <para>Merges the given files, joining sequentially corresponding lines 757 side by side, separated by tab characters</para> 758 <indexterm zone="ch-system-coreutils paste"> 759 <primary sortas="b-paste">paste</primary> 760 </indexterm> 761 </listitem> 762 </varlistentry> 763 764 <varlistentry id="pathchk"> 765 <term><command>pathchk</command></term> 766 <listitem> 767 <para>Checks if file names are valid or portable</para> 768 <indexterm zone="ch-system-coreutils pathchk"> 769 <primary sortas="b-pathchk">pathchk</primary> 770 </indexterm> 771 </listitem> 772 </varlistentry> 773 774 <varlistentry id="pinky"> 775 <term><command>pinky</command></term> 776 <listitem> 777 <para>Is a lightweight finger client; it reports some information 778 about the given users</para> 779 <indexterm zone="ch-system-coreutils pinky"> 780 <primary sortas="b-pinky">pinky</primary> 781 </indexterm> 782 </listitem> 783 </varlistentry> 784 785 <varlistentry id="pr"> 786 <term><command>pr</command></term> 787 <listitem> 788 <para>Paginates and columnates files for printing</para> 789 <indexterm zone="ch-system-coreutils pr"> 790 <primary sortas="b-pr">pr</primary> 791 </indexterm> 792 </listitem> 793 </varlistentry> 794 795 <varlistentry id="printenv"> 796 <term><command>printenv</command></term> 797 <listitem> 798 <para>Prints the environment</para> 799 <indexterm zone="ch-system-coreutils printenv"> 800 <primary sortas="b-printenv">printenv</primary> 801 </indexterm> 802 </listitem> 803 </varlistentry> 804 805 <varlistentry id="printf"> 806 <term><command>printf</command></term> 807 <listitem> 808 <para>Prints the given arguments according to the given format, much 809 like the C printf function</para> 810 <indexterm zone="ch-system-coreutils printf"> 811 <primary sortas="b-printf">printf</primary> 812 </indexterm> 813 </listitem> 814 </varlistentry> 815 816 <varlistentry id="ptx"> 817 <term><command>ptx</command></term> 818 <listitem> 819 <para>Produces a permuted index from the contents of the given files, 820 with each keyword in its context</para> 821 <indexterm zone="ch-system-coreutils ptx"> 822 <primary sortas="b-ptx">ptx</primary> 823 </indexterm> 824 </listitem> 825 </varlistentry> 826 827 <varlistentry id="pwd"> 828 <term><command>pwd</command></term> 829 <listitem> 830 <para>Reports the name of the current working directory</para> 831 <indexterm zone="ch-system-coreutils pwd"> 832 <primary sortas="b-pwd">pwd</primary> 833 </indexterm> 834 </listitem> 835 </varlistentry> 836 837 <varlistentry id="readlink"> 838 <term><command>readlink</command></term> 839 <listitem> 840 <para>Reports the value of the given symbolic link</para> 841 <indexterm zone="ch-system-coreutils readlink"> 842 <primary sortas="b-readlink">readlink</primary> 843 </indexterm> 844 </listitem> 845 </varlistentry> 846 847 <varlistentry id="realpath"> 848 <term><command>realpath</command></term> 849 <listitem> 850 <para>Prints the resolved path</para> 851 <indexterm zone="ch-system-coreutils realpath"> 852 <primary sortas="b-realpath">realpath</primary> 853 </indexterm> 854 </listitem> 855 </varlistentry> 856 857 <varlistentry id="rm"> 858 <term><command>rm</command></term> 859 <listitem> 860 <para>Removes files or directories</para> 861 <indexterm zone="ch-system-coreutils rm"> 862 <primary sortas="b-rm">rm</primary> 863 </indexterm> 864 </listitem> 865 </varlistentry> 866 867 <varlistentry id="rmdir"> 868 <term><command>rmdir</command></term> 869 <listitem> 870 <para>Removes directories if they are empty</para> 871 <indexterm zone="ch-system-coreutils rmdir"> 872 <primary sortas="b-rmdir">rmdir</primary> 873 </indexterm> 874 </listitem> 875 </varlistentry> 876 877 <varlistentry id="runcon"> 878 <term><command>runcon</command></term> 879 <listitem> 880 <para>Runs a command with specified security context</para> 881 <indexterm zone="ch-system-coreutils runcon"> 882 <primary sortas="b-runcon">runcon</primary> 883 </indexterm> 884 </listitem> 885 </varlistentry> 886 887 <varlistentry id="seq"> 888 <term><command>seq</command></term> 889 <listitem> 890 <para>Prints a sequence of numbers within a given range and with a 891 given increment</para> 892 <indexterm zone="ch-system-coreutils seq"> 893 <primary sortas="b-seq">seq</primary> 894 </indexterm> 895 </listitem> 896 </varlistentry> 897 898 <varlistentry id="sha1sum"> 899 <term><command>sha1sum</command></term> 900 <listitem> 901 <para>Prints or checks 160-bit Secure Hash Algorithm 1 (SHA1) 902 checksums</para> 903 <indexterm zone="ch-system-coreutils sha1sum"> 904 <primary sortas="b-sha1sum">sha1sum</primary> 905 </indexterm> 906 </listitem> 907 </varlistentry> 908 909 <varlistentry id="sha224sum"> 910 <term><command>sha224sum</command></term> 911 <listitem> 912 <para>Prints or checks 224-bit Secure Hash Algorithm checksums</para> 913 <indexterm zone="ch-system-coreutils sha224sum"> 914 <primary sortas="b-sha224sum">sha224sum</primary> 915 </indexterm> 916 </listitem> 917 </varlistentry> 918 919 <varlistentry id="sha256sum"> 920 <term><command>sha256sum</command></term> 921 <listitem> 922 <para>Prints or checks 256-bit Secure Hash Algorithm checksums</para> 923 <indexterm zone="ch-system-coreutils sha256sum"> 924 <primary sortas="b-sha256sum">sha256sum</primary> 925 </indexterm> 926 </listitem> 927 </varlistentry> 928 929 <varlistentry id="sha384sum"> 930 <term><command>sha384sum</command></term> 931 <listitem> 932 <para>Prints or checks 384-bit Secure Hash Algorithm checksums</para> 933 <indexterm zone="ch-system-coreutils sha384sum"> 934 <primary sortas="b-sha384sum">sha384sum</primary> 935 </indexterm> 936 </listitem> 937 </varlistentry> 938 939 <varlistentry id="sha512sum"> 940 <term><command>sha512sum</command></term> 941 <listitem> 942 <para>Prints or checks 512-bit Secure Hash Algorithm checksums</para> 943 <indexterm zone="ch-system-coreutils sha512sum"> 944 <primary sortas="b-sha512sum">sha512sum</primary> 945 </indexterm> 946 </listitem> 947 </varlistentry> 948 949 <varlistentry id="shred"> 950 <term><command>shred</command></term> 951 <listitem> 952 <para>Overwrites the given files repeatedly with complex patterns, 953 making it difficult to recover the data</para> 954 <indexterm zone="ch-system-coreutils shred"> 955 <primary sortas="b-shred">shred</primary> 956 </indexterm> 957 </listitem> 958 </varlistentry> 959 960 <varlistentry id="shuf"> 961 <term><command>shuf</command></term> 962 <listitem> 963 <para>Shuffles lines of text</para> 964 <indexterm zone="ch-system-coreutils shuf"> 965 <primary sortas="b-shuf">shuf</primary> 966 </indexterm> 967 </listitem> 968 </varlistentry> 969 970 <varlistentry id="sleep"> 971 <term><command>sleep</command></term> 972 <listitem> 973 <para>Pauses for the given amount of time</para> 974 <indexterm zone="ch-system-coreutils sleep"> 975 <primary sortas="b-sleep">sleep</primary> 976 </indexterm> 977 </listitem> 978 </varlistentry> 979 980 <varlistentry id="sort"> 981 <term><command>sort</command></term> 982 <listitem> 983 <para>Sorts the lines from the given files</para> 984 <indexterm zone="ch-system-coreutils sort"> 985 <primary sortas="b-sort">sort</primary> 986 </indexterm> 987 </listitem> 988 </varlistentry> 989 990 <varlistentry id="split"> 991 <term><command>split</command></term> 992 <listitem> 993 <para>Splits the given file into pieces, by size or by number of 994 lines</para> 995 <indexterm zone="ch-system-coreutils split"> 996 <primary sortas="b-split">split</primary> 997 </indexterm> 998 </listitem> 999 </varlistentry> 1000 1001 <varlistentry id="stat"> 1002 <term><command>stat</command></term> 1003 <listitem> 1004 <para>Displays file or filesystem status</para> 1005 <indexterm zone="ch-system-coreutils stat"> 1006 <primary sortas="b-stat">stat</primary> 1007 </indexterm> 1008 </listitem> 1009 </varlistentry> 1010 1011 <varlistentry id="stdbuf"> 1012 <term><command>stdbuf</command></term> 1013 <listitem> 1014 <para>Runs commands with altered buffering operations for its standard 1015 streams</para> 1016 <indexterm zone="ch-system-coreutils stdbuf"> 1017 <primary sortas="b-stdbuf">stdbuf</primary> 1018 </indexterm> 1019 </listitem> 1020 </varlistentry> 1021 1022 <varlistentry id="stty"> 1023 <term><command>stty</command></term> 1024 <listitem> 1025 <para>Sets or reports terminal line settings</para> 1026 <indexterm zone="ch-system-coreutils stty"> 1027 <primary sortas="b-stty">stty</primary> 1028 </indexterm> 1029 </listitem> 1030 </varlistentry> 1031 1032 <varlistentry id="sum"> 1033 <term><command>sum</command></term> 1034 <listitem> 1035 <para>Prints checksum and block counts for each given file</para> 1036 <indexterm zone="ch-system-coreutils sum"> 1037 <primary sortas="b-sum">sum</primary> 1038 </indexterm> 1039 </listitem> 1040 </varlistentry> 1041 1042 <varlistentry id="sync"> 1043 <term><command>sync</command></term> 1044 <listitem> 1045 <para>Flushes file system buffers; it forces changed blocks to disk 1046 and updates the super block</para> 1047 <indexterm zone="ch-system-coreutils sync"> 1048 <primary sortas="b-sync">sync</primary> 1049 </indexterm> 1050 </listitem> 1051 </varlistentry> 1052 1053 <varlistentry id="tac"> 1054 <term><command>tac</command></term> 1055 <listitem> 1056 <para>Concatenates the given files in reverse</para> 1057 <indexterm zone="ch-system-coreutils tac"> 1058 <primary sortas="b-tac">tac</primary> 1059 </indexterm> 1060 </listitem> 1061 </varlistentry> 1062 1063 <varlistentry id="tail"> 1064 <term><command>tail</command></term> 1065 <listitem> 1066 <para>Prints the last ten lines (or the given number of lines) of each 1067 given file</para> 1068 <indexterm zone="ch-system-coreutils tail"> 1069 <primary sortas="b-tail">tail</primary> 1070 </indexterm> 1071 </listitem> 1072 </varlistentry> 1073 1074 <varlistentry id="tee"> 1075 <term><command>tee</command></term> 1076 <listitem> 1077 <para>Reads from standard input while writing both to standard output 1078 and to the given files</para> 1079 <indexterm zone="ch-system-coreutils tee"> 1080 <primary sortas="b-tee">tee</primary> 1081 </indexterm> 1082 </listitem> 1083 </varlistentry> 1084 1085 <varlistentry id="test"> 1086 <term><command>test</command></term> 1087 <listitem> 1088 <para>Compares values and checks file types</para> 1089 <indexterm zone="ch-system-coreutils test"> 1090 <primary sortas="b-test">test</primary> 1091 </indexterm> 1092 </listitem> 1093 </varlistentry> 1094 1095 <varlistentry id="timeout"> 1096 <term><command>timeout</command></term> 1097 <listitem> 1098 <para>Runs a command with a time limit</para> 1099 <indexterm zone="ch-system-coreutils timeout"> 1100 <primary sortas="b-timeout">timeout</primary> 1101 </indexterm> 1102 </listitem> 1103 </varlistentry> 1104 1105 <varlistentry id="touch"> 1106 <term><command>touch</command></term> 1107 <listitem> 1108 <para>Changes file timestamps, setting the access and modification 1109 times of the given files to the current time; files that do not exist 1110 are created with zero length</para> 1111 <indexterm zone="ch-system-coreutils touch"> 1112 <primary sortas="b-touch">touch</primary> 1113 </indexterm> 1114 </listitem> 1115 </varlistentry> 1116 1117 <varlistentry id="tr"> 1118 <term><command>tr</command></term> 1119 <listitem> 1120 <para>Translates, squeezes, and deletes the given characters from 1121 standard input</para> 1122 <indexterm zone="ch-system-coreutils tr"> 1123 <primary sortas="b-tr">tr</primary> 1124 </indexterm> 1125 </listitem> 1126 </varlistentry> 1127 1128 <varlistentry id="true"> 1129 <term><command>true</command></term> 1130 <listitem> 1131 <para>Does nothing, successfully; it always exits with a status code 1132 indicating success</para> 1133 <indexterm zone="ch-system-coreutils true"> 1134 <primary sortas="b-true">true</primary> 1135 </indexterm> 1136 </listitem> 1137 </varlistentry> 1138 1139 <varlistentry id="truncate"> 1140 <term><command>truncate</command></term> 1141 <listitem> 1142 <para>Shrinks or expands a file to the specified size</para> 1143 <indexterm zone="ch-system-coreutils truncate"> 1144 <primary sortas="b-truncate">truncate</primary> 1145 </indexterm> 1146 </listitem> 1147 </varlistentry> 1148 1149 <varlistentry id="tsort"> 1150 <term><command>tsort</command></term> 1151 <listitem> 1152 <para>Performs a topological sort; it writes a completely ordered list 1153 according to the partial ordering in a given file</para> 1154 <indexterm zone="ch-system-coreutils tsort"> 1155 <primary sortas="b-tsort">tsort</primary> 1156 </indexterm> 1157 </listitem> 1158 </varlistentry> 1159 1160 <varlistentry id="tty"> 1161 <term><command>tty</command></term> 1162 <listitem> 1163 <para>Reports the file name of the terminal connected to standard 1164 input</para> 1165 <indexterm zone="ch-system-coreutils tty"> 1166 <primary sortas="b-tty">tty</primary> 1167 </indexterm> 1168 </listitem> 1169 </varlistentry> 1170 1171 <varlistentry id="uname"> 1172 <term><command>uname</command></term> 1173 <listitem> 1174 <para>Reports system information</para> 1175 <indexterm zone="ch-system-coreutils uname"> 1176 <primary sortas="b-uname">uname</primary> 1177 </indexterm> 1178 </listitem> 1179 </varlistentry> 1180 1181 <varlistentry id="unexpand"> 1182 <term><command>unexpand</command></term> 1183 <listitem> 1184 <para>Converts spaces to tabs</para> 1185 <indexterm zone="ch-system-coreutils unexpand"> 1186 <primary sortas="b-unexpand">unexpand</primary> 1187 </indexterm> 1188 </listitem> 1189 </varlistentry> 1190 1191 <varlistentry id="uniq"> 1192 <term><command>uniq</command></term> 1193 <listitem> 1194 <para>Discards all but one of successive identical lines</para> 1195 <indexterm zone="ch-system-coreutils uniq"> 1196 <primary sortas="b-uniq">uniq</primary> 1197 </indexterm> 1198 </listitem> 1199 </varlistentry> 1200 1201 <varlistentry id="unlink"> 1202 <term><command>unlink</command></term> 1203 <listitem> 1204 <para>Removes the given file</para> 1205 <indexterm zone="ch-system-coreutils unlink"> 1206 <primary sortas="b-unlink">unlink</primary> 1207 </indexterm> 1208 </listitem> 1209 </varlistentry> 1210 1211 <varlistentry id="users"> 1212 <term><command>users</command></term> 1213 <listitem> 1214 <para>Reports the names of the users currently logged on</para> 1215 <indexterm zone="ch-system-coreutils users"> 1216 <primary sortas="b-users">users</primary> 1217 </indexterm> 1218 </listitem> 1219 </varlistentry> 1220 1221 <varlistentry id="vdir"> 1222 <term><command>vdir</command></term> 1223 <listitem> 1224 <para>Is the same as <command>ls -l</command></para> 1225 <indexterm zone="ch-system-coreutils vdir"> 1226 <primary sortas="b-vdir">vdir</primary> 1227 </indexterm> 1228 </listitem> 1229 </varlistentry> 1230 1231 <varlistentry id="wc"> 1232 <term><command>wc</command></term> 1233 <listitem> 1234 <para>Reports the number of lines, words, and bytes for each given 1235 file, as well as a total line when more than one file is given</para> 1236 <indexterm zone="ch-system-coreutils wc"> 1237 <primary sortas="b-wc">wc</primary> 1238 </indexterm> 1239 </listitem> 1240 </varlistentry> 1241 1242 <varlistentry id="who"> 1243 <term><command>who</command></term> 1244 <listitem> 1245 <para>Reports who is logged on</para> 1246 <indexterm zone="ch-system-coreutils who"> 1247 <primary sortas="b-who">who</primary> 1248 </indexterm> 1249 </listitem> 1250 </varlistentry> 1251 1252 <varlistentry id="whoami"> 1253 <term><command>whoami</command></term> 1254 <listitem> 1255 <para>Reports the user name associated with the current effective 1256 user ID</para> 1257 <indexterm zone="ch-system-coreutils whoami"> 1258 <primary sortas="b-whoami">whoami</primary> 1259 </indexterm> 1260 </listitem> 1261 </varlistentry> 1262 1263 <varlistentry id="yes"> 1264 <term><command>yes</command></term> 1265 <listitem> 1266 <para>Repeatedly outputs <quote>y</quote> or a given string until 1267 killed</para> 1268 <indexterm zone="ch-system-coreutils yes"> 1269 <primary sortas="b-yes">yes</primary> 1270 </indexterm> 1271 </listitem> 1272 </varlistentry> 1273 1274 <varlistentry id="libstdbuf"> 1275 <term><filename class="libraryfile">libstdbuf</filename></term> 1276 <listitem> 1277 <para>Library used by <command>stdbuf</command></para> 1278 <indexterm zone="ch-system-coreutils libstdbuf"> 1279 <primary sortas="c-libstdbuf">libstdbuf</primary> 1280 </indexterm> 1281 </listitem> 1282 </varlistentry> 1283 1284 </variablelist> 100 <para>Details on this package are located in 101 <xref linkend="contents-coreutils" role="."/></para> 1285 102 1286 103 </sect2> -
chapter06/diffutils.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-diffutils" role="wrap">8 <sect1 id="ch-tools-diffutils" role="wrap"> 9 9 <?dbhtml filename="diffutils.html"?> 10 10 … … 17 17 <title>Diffutils-&diffutils-version;</title> 18 18 19 <indexterm zone="ch- system-diffutils">19 <indexterm zone="ch-tools-diffutils"> 20 20 <primary sortas="a-Diffutils">Diffutils</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Diffutils package contains programs that show the differences 27 between files or directories.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/diffutils.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&diffutils- ch6-sbu;</seg>35 <seg>&diffutils- ch6-du;</seg>36 <seg>&diffutils-tmp-sbu;</seg> 37 <seg>&diffutils-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 44 46 <para>Prepare Diffutils for compilation:</para> 45 47 46 <screen><userinput remap="configure">./configure --prefix=/usr </userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> 47 49 48 50 <para>Compile the package:</para> … … 50 52 <screen><userinput remap="make">make</userinput></screen> 51 53 52 <para>To test the results, issue:</para>53 54 <screen><userinput remap="test">make check</userinput></screen>55 56 54 <para>Install the package:</para> 57 55 58 <screen><userinput remap="install">make install</userinput></screen>56 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 59 57 60 58 </sect2> 61 59 60 <sect2 role="content"> 61 <title/> 62 62 63 <sect2 id="contents-diffutils" role="content"> 64 <title>Contents of Diffutils</title> 65 66 <segmentedlist> 67 <segtitle>Installed programs</segtitle> 68 69 <seglistitem> 70 <seg>cmp, diff, diff3, and sdiff</seg> 71 </seglistitem> 72 </segmentedlist> 73 74 <variablelist> 75 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 76 <?dbfo list-presentation="list"?> 77 <?dbhtml list-presentation="table"?> 78 79 <varlistentry id="cmp"> 80 <term><command>cmp</command></term> 81 <listitem> 82 <para>Compares two files and reports whether or in which bytes they 83 differ</para> 84 <indexterm zone="ch-system-diffutils cmp"> 85 <primary sortas="b-cmp">cmp</primary> 86 </indexterm> 87 </listitem> 88 </varlistentry> 89 90 <varlistentry id="diff"> 91 <term><command>diff</command></term> 92 <listitem> 93 <para>Compares two files or directories and reports which lines in 94 the files differ</para> 95 <indexterm zone="ch-system-diffutils diff"> 96 <primary sortas="b-diff">diff</primary> 97 </indexterm> 98 </listitem> 99 </varlistentry> 100 101 <varlistentry id="diff3"> 102 <term><command>diff3</command></term> 103 <listitem> 104 <para>Compares three files line by line</para> 105 <indexterm zone="ch-system-diffutils diff3"> 106 <primary sortas="b-diff3">diff3</primary> 107 </indexterm> 108 </listitem> 109 </varlistentry> 110 111 <varlistentry id="sdiff"> 112 <term><command>sdiff</command></term> 113 <listitem> 114 <para>Merges two files and interactively outputs the results</para> 115 <indexterm zone="ch-system-diffutils sdiff"> 116 <primary sortas="b-sdiff">sdiff</primary> 117 </indexterm> 118 </listitem> 119 </varlistentry> 120 121 </variablelist> 63 <para>Details on this package are located in 64 <xref linkend="contents-diffutils" role="."/></para> 122 65 123 66 </sect2> -
chapter06/file.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-file" role="wrap">8 <sect1 id="ch-tools-file" role="wrap"> 9 9 <?dbhtml filename="file.html"?> 10 10 … … 17 17 <title>File-&file-version;</title> 18 18 19 <indexterm zone="ch- system-file">19 <indexterm zone="ch-tools-file"> 20 20 <primary sortas="a-File">File</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The File package contains a utility for determining the type of a given 27 file or files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/file.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&file- ch6-sbu;</seg>35 <seg>&file- ch6-du;</seg>36 <seg>&file-tmp-sbu;</seg> 37 <seg>&file-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 44 46 <para>Prepare File for compilation:</para> 45 47 46 <screen><userinput remap="configure">./configure --prefix=/usr </userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> 47 49 48 <para>Compile the package:</para> 49 50 <screen><userinput remap="make">make</userinput></screen> 51 52 <para>To test the results, issue:</para> 53 54 <screen><userinput remap="test">make check</userinput></screen> 55 56 <para>Install the package:</para> 57 58 <screen><userinput remap="install">make install</userinput></screen> 59 60 </sect2> 61 62 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> 63 64 <sect2 arch="ml_32,ml_all" role="installation"> 65 <title>Installation of File - 32-bit</title> 66 67 <para>Clean previous build:</para> 68 69 <screen><userinput remap="pre">make distclean</userinput></screen> 70 71 <para>Prepare File for compilation:</para> 72 73 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 74 --prefix=/usr \ 75 --libdir=/usr/lib32 \ 76 --host=i686-pc-linux-gnu</userinput></screen> 77 50 <!-- devs: if using - -build here, the build system wants to compile 51 the signature file with "file" on the build system, but stops if it is not 52 the same version. One possibility would be to build "file" on the build 53 system first, but it is simpler to have the system think it is not 54 cross-compiling, and use the just built "file". --> 78 55 <para>Compile the package:</para> 79 56 … … 82 59 <para>Install the package:</para> 83 60 84 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 85 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 86 rm -rf DESTDIR</userinput></screen> 61 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 87 62 88 63 </sect2> 89 64 90 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> 91 92 <sect2 arch="ml_x32,ml_all" role="installation"> 93 <title>Installation of File - x32-bit</title> 94 95 <para>Clean previous build:</para> 96 97 <screen><userinput remap="pre">make distclean</userinput></screen> 98 99 <para>Prepare File for compilation:</para> 100 101 <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ 102 --prefix=/usr \ 103 --libdir=/usr/libx32 \ 104 --host=x86_64-pc-linux-gnux32</userinput></screen> 105 106 <para>Compile the package:</para> 107 108 <screen><userinput remap="make">make</userinput></screen> 109 110 <para>Install the package:</para> 111 112 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 113 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 114 rm -rf DESTDIR</userinput></screen> 115 116 </sect2> 117 118 <sect2 id="contents-file" role="content"> 119 <title>Contents of File</title> 120 121 <segmentedlist> 122 <segtitle>Installed programs</segtitle> 123 <segtitle>Installed library</segtitle> 124 125 <seglistitem> 126 <seg>file</seg> 127 <seg>libmagic.so</seg> 128 </seglistitem> 129 </segmentedlist> 130 131 <variablelist> 132 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 133 <?dbfo list-presentation="list"?> 134 <?dbhtml list-presentation="table"?> 135 136 <varlistentry id="file"> 137 <term><command>file</command></term> 138 <listitem> 139 <para>Tries to classify each given file; it does this by performing 140 several tests—file system tests, magic number tests, and language 141 tests</para> 142 <indexterm zone="ch-system-file file"> 143 <primary sortas="b-file">file</primary> 144 </indexterm> 145 </listitem> 146 </varlistentry> 147 148 <varlistentry id="libmagic"> 149 <term><filename class="libraryfile">libmagic</filename></term> 150 <listitem> 151 <para>Contains routines for magic number recognition, used by the 152 <command>file</command> program</para> 153 <indexterm zone="ch-system-file libmagic"> 154 <primary sortas="c-libmagic">libmagic</primary> 155 </indexterm> 156 </listitem> 157 </varlistentry> 158 159 </variablelist> 65 <sect2 role="content"> 66 <title/> 67 <para>Details on this package are located in <xref linkend="contents-file" role="."/></para> 160 68 161 69 </sect2> -
chapter06/findutils.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-findutils" role="wrap">8 <sect1 id="ch-tools-findutils" role="wrap"> 9 9 <?dbhtml filename="findutils.html"?> 10 10 … … 17 17 <title>Findutils-&findutils-version;</title> 18 18 19 <indexterm zone="ch- system-findutils">19 <indexterm zone="ch-tools-findutils"> 20 20 <primary sortas="a-Findutils">Findutils</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Findutils package contains programs to find files. These programs 27 are provided to recursively search through a directory tree and to 28 create, maintain, and search a database (often faster than the recursive 29 find, but unreliable if the database has not been recently updated).</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/findutils.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 30 30 31 31 <segmentedlist> … … 34 34 35 35 <seglistitem> 36 <seg>&findutils- ch6-sbu;</seg>37 <seg>&findutils- ch6-du;</seg>36 <seg>&findutils-tmp-sbu;</seg> 37 <seg>&findutils-tmp-du;</seg> 38 38 </seglistitem> 39 39 </segmentedlist> … … 46 46 <para>Prepare Findutils for compilation:</para> 47 47 48 <screen><userinput remap="configure">./configure --prefix=/usr --localstatedir=/var/lib/locate</userinput></screen> 49 50 <variablelist> 51 <title>The meaning of the configure options:</title> 52 53 <varlistentry> 54 <term><parameter>--localstatedir</parameter></term> 55 <listitem> 56 <para>This option changes the location of the <command>locate</command> 57 database to be in <filename class="directory">/var/lib/locate</filename>, 58 which is FHS-compliant.</para> 59 </listitem> 60 </varlistentry> 61 62 </variablelist> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess)</userinput></screen> 63 51 64 52 <para>Compile the package:</para> … … 66 54 <screen><userinput remap="make">make</userinput></screen> 67 55 68 <para>To test the results, issue:</para>69 70 <screen><userinput remap="test">chown -Rv tester .71 su tester -c "PATH=$PATH make check"</userinput></screen>72 73 56 <para>Install the package:</para> 74 57 75 <screen><userinput remap="install">make install</userinput></screen>58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 76 59 77 <para revision="sysv">Some of the scripts in the LFS-Bootscripts package 78 depend on <command>find</command>. As <filename 79 class="directory">/usr</filename> may not be available during the early 80 stages of booting, this program needs to be on the root partition. The 81 <command>updatedb</command> script also needs to be modified to correct an 82 explicit path:</para> 60 <para>Move the excutable to its final expected location:</para> 83 61 84 <para revision="systemd"> Some packages in BLFS and beyond expect the 85 <command>find</command> program in <filename 86 class="directory">/bin</filename>, so make sure it's placed there:</para> 87 88 <screen><userinput remap="install">mv -v /usr/bin/find /bin 89 sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb</userinput></screen> 62 <screen><userinput remap="install">mv -v $LFS/usr/bin/find $LFS/bin 63 sed -i 's|find:=${BINDIR}|find:=/bin|' $LFS/usr/bin/updatedb</userinput></screen> 90 64 91 65 </sect2> 92 66 93 <sect2 id="contents-findutils"role="content">94 <title >Contents of Findutils</title>67 <sect2 role="content"> 68 <title/> 95 69 96 <segmentedlist> 97 <segtitle>Installed programs</segtitle> 98 <segtitle>Installed directory</segtitle> 99 100 <seglistitem> 101 <seg>find, locate, updatedb, and xargs</seg> 102 <seg>/var/lib/locate</seg> 103 </seglistitem> 104 105 </segmentedlist> 106 107 <variablelist> 108 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 109 <?dbfo list-presentation="list"?> 110 <?dbhtml list-presentation="table"?> 111 112 <varlistentry id="find"> 113 <term><command>find</command></term> 114 <listitem> 115 <para>Searches given directory trees for files matching the specified 116 criteria</para> 117 <indexterm zone="ch-system-findutils find"> 118 <primary sortas="b-find">find</primary> 119 </indexterm> 120 </listitem> 121 </varlistentry> 122 123 <varlistentry id="locate"> 124 <term><command>locate</command></term> 125 <listitem> 126 <para>Searches through a database of file names and reports the names 127 that contain a given string or match a given pattern</para> 128 <indexterm zone="ch-system-findutils locate"> 129 <primary sortas="b-locate">locate</primary> 130 </indexterm> 131 </listitem> 132 </varlistentry> 133 134 <varlistentry id="updatedb"> 135 <term><command>updatedb</command></term> 136 <listitem> 137 <para>Updates the <command>locate</command> database; it scans the 138 entire file system (including other file systems that are currently 139 mounted, unless told not to) and puts every file name it finds into 140 the database</para> 141 <indexterm zone="ch-system-findutils updatedb"> 142 <primary sortas="b-updatedb">updatedb</primary> 143 </indexterm> 144 </listitem> 145 </varlistentry> 146 147 <varlistentry id="xargs"> 148 <term><command>xargs</command></term> 149 <listitem> 150 <para>Can be used to apply a given command to a list of files</para> 151 <indexterm zone="ch-system-findutils xargs"> 152 <primary sortas="b-xargs">xargs</primary> 153 </indexterm> 154 </listitem> 155 </varlistentry> 156 157 </variablelist> 70 <para>Details on this package are located in 71 <xref linkend="contents-findutils" role="."/></para> 158 72 159 73 </sect2> -
chapter06/gawk.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-gawk" role="wrap">8 <sect1 id="ch-tools-gawk" role="wrap"> 9 9 <?dbhtml filename="gawk.html"?> 10 10 … … 17 17 <title>Gawk-&gawk-version;</title> 18 18 19 <indexterm zone="ch- system-gawk">19 <indexterm zone="ch-tools-gawk"> 20 20 <primary sortas="a-Gawk">Gawk</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Gawk package contains programs for manipulating text files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/gawk.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&gawk- ch6-sbu;</seg>34 <seg>&gawk- ch6-du;</seg>36 <seg>&gawk-tmp-sbu;</seg> 37 <seg>&gawk-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 47 50 <para>Prepare Gawk for compilation:</para> 48 51 49 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 52 <screen><userinput remap="configure">./configure --prefix=/usr \ 53 --host=$LFS_TGT \ 54 --build=$(./config.guess)</userinput></screen> 50 55 51 56 <para>Compile the package:</para> … … 53 58 <screen><userinput remap="make">make</userinput></screen> 54 59 55 <para>To test the results, issue:</para>56 57 <screen><userinput remap="test">make check</userinput></screen>58 59 60 <para>Install the package:</para> 60 61 61 <screen><userinput remap="install">make install</userinput></screen> 62 63 <para>If desired, install the documentation:</para> 64 65 <screen><userinput remap="install">mkdir -v /usr/share/doc/gawk-&gawk-version; 66 cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen> 62 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 67 63 68 64 </sect2> 69 65 70 <sect2 id="contents-gawk"role="content">71 <title >Contents of Gawk</title>66 <sect2 role="content"> 67 <title/> 72 68 73 <segmentedlist> 74 <segtitle>Installed programs</segtitle> 75 <segtitle>Installed libraries</segtitle> 76 <segtitle>Installed directories</segtitle> 77 78 <seglistitem> 79 <seg>awk (link to gawk), gawk, and awk-&gawk-version;</seg> 80 <seg>filefuncs.so, fnmatch.so, fork.so, inplace.so, intdiv.so, ordchr.so, 81 readdir.so, readfile.so, revoutput.so, revtwoway.so, rwarray.so, 82 and time.so (all in /usr/lib/gawk)</seg> 83 <seg>/usr/lib/gawk, /usr/libexec/awk, /usr/share/awk, and 84 /usr/share/doc/gawk-&gawk-version;</seg> 85 </seglistitem> 86 </segmentedlist> 87 88 <variablelist> 89 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 90 <?dbfo list-presentation="list"?> 91 <?dbhtml list-presentation="table"?> 92 93 <varlistentry id="awk"> 94 <term><command>awk</command></term> 95 <listitem> 96 <para>A link to <command>gawk</command></para> 97 <indexterm zone="ch-system-gawk awk"> 98 <primary sortas="b-awk">awk</primary> 99 </indexterm> 100 </listitem> 101 </varlistentry> 102 103 <varlistentry id="gawk"> 104 <term><command>gawk</command></term> 105 <listitem> 106 <para>A program for manipulating text files; it is the GNU 107 implementation of <command>awk</command></para> 108 <indexterm zone="ch-system-gawk gawk"> 109 <primary sortas="b-gawk">gawk</primary> 110 </indexterm> 111 </listitem> 112 </varlistentry> 113 114 <varlistentry id="gawk-version"> 115 <term><command>gawk-&gawk-version;</command></term> 116 <listitem> 117 <para>A hard link to <command>gawk</command></para> 118 <indexterm zone="ch-system-gawk gawk-version"> 119 <primary sortas="b-gawk-&gawk-version;">gawk-&gawk-version;</primary> 120 </indexterm> 121 </listitem> 122 </varlistentry> 123 124 </variablelist> 69 <para>Details on this package are located in 70 <xref linkend="contents-gawk" role="."/></para> 125 71 126 72 </sect2> -
chapter06/grep.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-grep" role="wrap">8 <sect1 id="ch-tools-grep" role="wrap"> 9 9 <?dbhtml filename="grep.html"?> 10 10 … … 17 17 <title>Grep-&grep-version;</title> 18 18 19 <indexterm zone="ch- system-grep">19 <indexterm zone="ch-tools-grep"> 20 20 <primary sortas="a-Grep">Grep</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Grep package contains programs for searching through files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/grep.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&grep- ch6-sbu;</seg>34 <seg>&grep- ch6-du;</seg>36 <seg>&grep-tmp-sbu;</seg> 37 <seg>&grep-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 43 46 <para>Prepare Grep for compilation:</para> 44 47 45 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --bindir=/bin</userinput></screen> 46 51 47 52 <para>Compile the package:</para> … … 49 54 <screen><userinput remap="make">make</userinput></screen> 50 55 51 <para>To test the results, issue:</para>52 53 <screen><userinput remap="test">make check</userinput></screen>54 55 56 <para>Install the package:</para> 56 57 57 <screen><userinput remap="install">make install</userinput></screen>58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 58 59 59 60 </sect2> 60 61 61 <sect2 id="contents-grep"role="content">62 <title >Contents of Grep</title>62 <sect2 role="content"> 63 <title/> 63 64 64 <segmentedlist> 65 <segtitle>Installed programs</segtitle> 66 67 <seglistitem> 68 <seg>egrep, fgrep, and grep</seg> 69 </seglistitem> 70 </segmentedlist> 71 72 <variablelist> 73 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 74 <?dbfo list-presentation="list"?> 75 <?dbhtml list-presentation="table"?> 76 77 <varlistentry id="egrep"> 78 <term><command>egrep</command></term> 79 <listitem> 80 <para>Prints lines matching an extended regular expression</para> 81 <indexterm zone="ch-system-grep egrep"> 82 <primary sortas="b-egrep">egrep</primary> 83 </indexterm> 84 </listitem> 85 </varlistentry> 86 87 <varlistentry id="fgrep"> 88 <term><command>fgrep</command></term> 89 <listitem> 90 <para>Prints lines matching a list of fixed strings</para> 91 <indexterm zone="ch-system-grep fgrep"> 92 <primary sortas="b-fgrep">fgrep</primary> 93 </indexterm> 94 </listitem> 95 </varlistentry> 96 97 <varlistentry id="grep"> 98 <term><command>grep</command></term> 99 <listitem> 100 <para>Prints lines matching a basic regular expression</para> 101 <indexterm zone="ch-system-grep grep"> 102 <primary sortas="b-grep">grep</primary> 103 </indexterm> 104 </listitem> 105 </varlistentry> 106 107 </variablelist> 65 <para>Details on this package are located in 66 <xref linkend="contents-grep" role="."/></para> 108 67 109 68 </sect2> -
chapter06/gzip.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-gzip" role="wrap">8 <sect1 id="ch-tools-gzip" role="wrap"> 9 9 <?dbhtml filename="gzip.html"?> 10 10 … … 17 17 <title>Gzip-&gzip-version;</title> 18 18 19 <indexterm zone="ch- system-gzip">19 <indexterm zone="ch-tools-gzip"> 20 20 <primary sortas="a-Gzip">Gzip</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Gzip package contains programs for compressing and decompressing 27 files.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/gzip.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&gzip- ch6-sbu;</seg>35 <seg>&gzip- ch6-du;</seg>36 <seg>&gzip-tmp-sbu;</seg> 37 <seg>&gzip-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 44 46 <para>Prepare Gzip for compilation:</para> 45 47 46 <screen><userinput remap="configure">./configure --prefix=/usr </userinput></screen>48 <screen><userinput remap="configure">./configure --prefix=/usr --host=$LFS_TGT</userinput></screen> 47 49 48 50 <para>Compile the package:</para> … … 50 52 <screen><userinput remap="make">make</userinput></screen> 51 53 52 <para>To test the results, issue:</para>53 54 <screen><userinput remap="test">make check</userinput></screen>55 56 <para>Two tests are known to fail in the LFS environment:57 help-version and zmore.</para>58 59 54 <para>Install the package:</para> 60 55 61 <screen><userinput remap="install">make install</userinput></screen>56 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 62 57 63 <para>Move a program that needs to be on the root filesystem:</para>58 <para>Move the excutable to its final expected location:</para> 64 59 65 <screen><userinput remap="install">mv -v /usr/bin/gzip/bin</userinput></screen>60 <screen><userinput remap="install">mv -v $LFS/usr/bin/gzip $LFS/bin</userinput></screen> 66 61 67 62 </sect2> 68 63 69 <sect2 id="contents-gzip"role="content">70 <title >Contents of Gzip</title>64 <sect2 role="content"> 65 <title/> 71 66 72 <segmentedlist> 73 <segtitle>Installed programs</segtitle> 74 75 <seglistitem> 76 <seg>gunzip, gzexe, gzip, uncompress (hard link with gunzip), zcat, zcmp, 77 zdiff, zegrep, zfgrep, zforce, zgrep, zless, zmore, and znew</seg> 78 </seglistitem> 79 </segmentedlist> 80 81 <variablelist> 82 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 83 <?dbfo list-presentation="list"?> 84 <?dbhtml list-presentation="table"?> 85 86 <varlistentry id="gunzip"> 87 <term><command>gunzip</command></term> 88 <listitem> 89 <para>Decompresses gzipped files</para> 90 <indexterm zone="ch-system-gzip gunzip"> 91 <primary sortas="b-gunzip">gunzip</primary> 92 </indexterm> 93 </listitem> 94 </varlistentry> 95 96 <varlistentry id="gzexe"> 97 <term><command>gzexe</command></term> 98 <listitem> 99 <para>Creates self-decompressing executable files</para> 100 <indexterm zone="ch-system-gzip gzexe"> 101 <primary sortas="b-gzexe">gzexe</primary> 102 </indexterm> 103 </listitem> 104 </varlistentry> 105 106 <varlistentry id="gzip"> 107 <term><command>gzip</command></term> 108 <listitem> 109 <para>Compresses the given files using Lempel-Ziv (LZ77) coding</para> 110 <indexterm zone="ch-system-gzip gzip"> 111 <primary sortas="b-gzip">gzip</primary> 112 </indexterm> 113 </listitem> 114 </varlistentry> 115 116 <varlistentry id="uncompress"> 117 <term><command>uncompress</command></term> 118 <listitem> 119 <para>Decompresses compressed files</para> 120 <indexterm zone="ch-system-gzip uncompress"> 121 <primary sortas="b-uncompress">uncompress</primary> 122 </indexterm> 123 </listitem> 124 </varlistentry> 125 126 <varlistentry id="zcat"> 127 <term><command>zcat</command></term> 128 <listitem> 129 <para>Decompresses the given gzipped files to standard output</para> 130 <indexterm zone="ch-system-gzip zcat"> 131 <primary sortas="b-zcat">zcat</primary> 132 </indexterm> 133 </listitem> 134 </varlistentry> 135 136 <varlistentry id="zcmp"> 137 <term><command>zcmp</command></term> 138 <listitem> 139 <para>Runs <command>cmp</command> on gzipped files</para> 140 <indexterm zone="ch-system-gzip zcmp"> 141 <primary sortas="b-zcmp">zcmp</primary> 142 </indexterm> 143 </listitem> 144 </varlistentry> 145 146 <varlistentry id="zdiff"> 147 <term><command>zdiff</command></term> 148 <listitem> 149 <para>Runs <command>diff</command> on gzipped files</para> 150 <indexterm zone="ch-system-gzip zdiff"> 151 <primary sortas="b-zdiff">zdiff</primary> 152 </indexterm> 153 </listitem> 154 </varlistentry> 155 156 <varlistentry id="zegrep"> 157 <term><command>zegrep</command></term> 158 <listitem> 159 <para>Runs <command>egrep</command> on gzipped files</para> 160 <indexterm zone="ch-system-gzip zegrep"> 161 <primary sortas="b-zegrep">zegrep</primary> 162 </indexterm> 163 </listitem> 164 </varlistentry> 165 166 <varlistentry id="zfgrep"> 167 <term><command>zfgrep</command></term> 168 <listitem> 169 <para>Runs <command>fgrep</command> on gzipped files</para> 170 <indexterm zone="ch-system-gzip zfgrep"> 171 <primary sortas="b-zfgrep">zfgrep</primary> 172 </indexterm> 173 </listitem> 174 </varlistentry> 175 176 <varlistentry id="zforce"> 177 <term><command>zforce</command></term> 178 <listitem> 179 <para>Forces a <filename class="extension">.gz</filename> extension on 180 all given files that are gzipped files, so that <command>gzip</command> 181 will not compress them again; this can be useful when file names were 182 truncated during a file transfer</para> 183 <indexterm zone="ch-system-gzip zforce"> 184 <primary sortas="b-zforce">zforce</primary> 185 </indexterm> 186 </listitem> 187 </varlistentry> 188 189 <varlistentry id="zgrep"> 190 <term><command>zgrep</command></term> 191 <listitem> 192 <para>Runs <command>grep</command> on gzipped files</para> 193 <indexterm zone="ch-system-gzip zgrep"> 194 <primary sortas="b-zgrep">zgrep</primary> 195 </indexterm> 196 </listitem> 197 </varlistentry> 198 199 <varlistentry id="zless"> 200 <term><command>zless</command></term> 201 <listitem> 202 <para>Runs <command>less</command> on gzipped files</para> 203 <indexterm zone="ch-system-gzip zless"> 204 <primary sortas="b-zless">zless</primary> 205 </indexterm> 206 </listitem> 207 </varlistentry> 208 209 <varlistentry id="zmore"> 210 <term><command>zmore</command></term> 211 <listitem> 212 <para>Runs <command>more</command> on gzipped files</para> 213 <indexterm zone="ch-system-gzip zmore"> 214 <primary sortas="b-zmore">zmore</primary> 215 </indexterm> 216 </listitem> 217 </varlistentry> 218 219 <varlistentry id="znew"> 220 <term><command>znew</command></term> 221 <listitem> 222 <para>Re-compresses files from <command>compress</command> format to 223 <command>gzip</command> format—<filename 224 class="extension">.Z</filename> to <filename 225 class="extension">.gz</filename></para> 226 <indexterm zone="ch-system-gzip znew"> 227 <primary sortas="b-znew">znew</primary> 228 </indexterm> 229 </listitem> 230 </varlistentry> 231 232 </variablelist> 67 <para>Details on this package are located in 68 <xref linkend="contents-gzip" role="."/></para> 233 69 234 70 </sect2> -
chapter06/introduction.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-introduction">8 <sect1 id="ch-tools-introduction-cross"> 9 9 <?dbhtml filename="introduction.html"?> 10 10 11 11 <title>Introduction</title> 12 12 13 <para>In this chapter, we enter the building site and start constructing the 14 LFS system in earnest. That is, we chroot into the temporary mini Linux system, 15 make a few final preparations, and then begin installing the packages.</para> 13 <para>This chapter shows how to cross-compile basic utilities using 14 the just built cross-toolchain. Those utilities are installed into 15 their final location, but cannot be used yet. Basic tasks still rely on 16 the host's tools. Nevertheless, the installed libraries are used when 17 linking.</para> 16 18 17 <para>The installation of this software is straightforward. Although in many 18 cases the installation instructions could be made shorter and more generic, 19 we have opted to provide the full instructions for every package to minimize 20 the possibilities for mistakes. The key to learning what makes a Linux system 21 work is to know what each package is used for and why you (or the system) 22 may need it.</para> 19 <para>Using the utilities will be possible in next chapter after entering 20 the <quote>chroot</quote> environment. But all the packages built in the 21 present chapter need to be built before we do that. Therefore we cannot be 22 independent of the host system yet.</para> 23 23 24 <para>We do not recommend using optimizations. They can make 25 a program run slightly faster, but they may also cause compilation 26 difficulties and problems when running the program. If a package refuses to 27 compile when using optimization, try to compile it without optimization and 28 see if that fixes the problem. Even if the package does compile when using 29 optimization, there is the risk it may have been compiled incorrectly because 30 of the complex interactions between the code and build tools. Also note that 31 the <option>-march</option> and <option>-mtune</option> options using values 32 not specified in the book have not been tested. This may cause problems with 33 the toolchain packages (Binutils, GCC and Glibc). The small potential gains 34 achieved in using compiler optimizations are often outweighed by the risks. 35 First-time builders of LFS are encouraged to build without custom 36 optimizations. The subsequent system will still run very fast and be stable 37 at the same time.</para> 38 39 <para>The order that packages are installed in this chapter needs to be 40 strictly followed to ensure that no program accidentally acquires a path 41 referring to <filename class="directory">/tools</filename> hard-wired into 42 it. For the same reason, do not compile separate packages in parallel. 43 Compiling in parallel may save time (especially on dual-CPU machines), but it 44 could result in a program containing a hard-wired path to <filename 45 class="directory">/tools</filename>, which will cause the program to stop 46 working when that directory is removed.</para> 47 48 <para>Before the installation instructions, each installation page provides 49 information about the package, including a concise description of what it 50 contains, approximately how long it will take to build, and how much disk 51 space is required during this building process. Following the installation 52 instructions, there is a list of programs and libraries (along with brief 53 descriptions of these) that the package installs.</para> 54 55 <note><para>The SBU values and required disk space includes 56 test suite data for all applicable packages in Chapter 6.</para></note> 57 58 <sect2> 59 <title>About libraries</title> 60 61 <para>In general, the LFS editors discourage building and installing static 62 libraries. The original purpose for most static libraries has been made 63 obsolete in a modern Linux system. In addition linking a static library 64 into a program can be detrimental. If an update to the library is needed 65 to remove a security problem, all programs that use the static library will 66 need to be relinked to the new library. Since the use of static libraries 67 is not always obvious, the relevant programs (and the procedures needed to 68 do the linking) may not even be known.</para> 69 70 <para>In the procedures in Chapter 6, we remove or disable installation of 71 most static libraries. Usually this is done by passing a 72 <option>--disable-static</option> option to <command>configure</command>. 73 In other cases, alternate means are needed. In a few cases, especially 74 glibc and gcc, the use of static libraries remains essential to the general 75 package building process. </para> 76 77 <para>For a more complete discussion of libraries, see the discussion 78 <ulink url="&blfs-root;/view/&short-version;/introduction/libraries.html"> 79 Libraries: Static or shared?</ulink> in the BLFS book.</para> 80 81 </sect2> 24 <para>Once again, let us recall that improper setting of <envar>LFS</envar> 25 together with building as root, may render your computer unusable. 26 This whole chapter must be done as user <systemitem 27 class="username">lfs</systemitem>, with the enviroment as described in 28 <xref linkend="ch-preps-settingenviron"/>.</para> 82 29 83 30 </sect1> -
chapter06/m4.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-m4" role="wrap">8 <sect1 id="ch-tools-m4" role="wrap"> 9 9 <?dbhtml filename="m4.html"?> 10 10 … … 17 17 <title>M4-&m4-version;</title> 18 18 19 <indexterm zone="ch- system-m4">19 <indexterm zone="ch-tools-m4"> 20 20 <primary sortas="a-M4">M4</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The M4 package contains a macro processor.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/m4.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&m4- ch6-sbu;</seg>34 <seg>&m4- ch6-du;</seg>36 <seg>&m4-tmp-sbu;</seg> 37 <seg>&m4-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of M4</title> 42 45 43 <para>First, make some fixes required by glibc-2.28:</para>46 <para>First, make some fixes introduced by glibc-2.28:</para> 44 47 45 48 <screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c … … 48 51 <para>Prepare M4 for compilation:</para> 49 52 50 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 53 <screen><userinput remap="configure">./configure --prefix=/usr \ 54 --host=$LFS_TGT \ 55 --build=$(build-aux/config.guess)</userinput></screen> 51 56 52 57 <para>Compile the package:</para> … … 54 59 <screen><userinput remap="make">make</userinput></screen> 55 60 56 <para>To test the results, issue:</para>57 58 <screen><userinput remap="test">make check</userinput></screen>59 60 61 <para>Install the package:</para> 61 62 62 <screen><userinput remap="install">make install</userinput></screen>63 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 63 64 64 65 </sect2> 65 66 66 <sect2 id="contents-m4" role="content"> 67 <title>Contents of M4</title> 68 69 <segmentedlist> 70 <segtitle>Installed program</segtitle> 71 72 <seglistitem> 73 <seg>m4</seg> 74 </seglistitem> 75 </segmentedlist> 76 77 <variablelist> 78 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 79 <?dbfo list-presentation="list"?> 80 <?dbhtml list-presentation="table"?> 81 82 <varlistentry id="m4"> 83 <!-- Don't remove the extra space, it prevet a FOP warning. --> 84 <term><command>m4 </command></term> 85 <listitem> 86 <para>Copies the given files while expanding the macros that they 87 contain [These macros are either built-in or user-defined and can 88 take any number of arguments. Besides performing macro expansion, 89 <command>m4</command> has built-in functions for including named 90 files, running Unix commands, performing integer arithmetic, 91 manipulating text, recursion, etc. The <command>m4</command> program 92 can be used either as a front-end to a compiler or as a macro processor 93 in its own right.]</para> 94 <indexterm zone="ch-system-m4 m4"> 95 <primary sortas="b-m4">m4</primary> 96 </indexterm> 97 </listitem> 98 </varlistentry> 99 100 </variablelist> 67 <sect2 role="content"> 68 <title/> 69 <para>Details on this package are located in 70 <xref linkend="contents-m4" role="."/></para> 101 71 102 72 </sect2> -
chapter06/make.xml
r811b5a39 r6dfcfecc 5 5 %general-entities; 6 6 ]> 7 8 <sect1 id="ch-system-make" role="wrap"> 7 <sect1 id="ch-tools-make" role="wrap"> 9 8 <?dbhtml filename="make.html"?> 10 9 … … 17 16 <title>Make-&make-version;</title> 18 17 19 <indexterm zone="ch- system-make">18 <indexterm zone="ch-tools-make"> 20 19 <primary sortas="a-Make">Make</primary> 20 <secondary>tools</secondary> 21 21 </indexterm> 22 22 … … 24 24 <title/> 25 25 26 <para>The Make package contains a program for compiling packages.</para> 26 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 27 href="../chapter08/make.xml" 28 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 29 28 30 <segmentedlist> … … 31 33 32 34 <seglistitem> 33 <seg>&make- ch6-sbu;</seg>34 <seg>&make- ch6-du;</seg>35 <seg>&make-tmp-sbu;</seg> 36 <seg>&make-tmp-du;</seg> 35 37 </seglistitem> 36 38 </segmentedlist> … … 40 42 <sect2 role="installation"> 41 43 <title>Installation of Make</title> 42 <!--43 <para>Again, work around an error caused by glibc-2.27 and later:</para>44 44 45 <screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen>46 -->47 45 <para>Prepare Make for compilation:</para> 48 46 49 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 47 <screen><userinput remap="configure">./configure --prefix=/usr \ 48 --without-guile \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess)</userinput></screen> 51 52 <variablelist> 53 <title>The meaning of the new configure option:</title> 54 55 <varlistentry> 56 <term><parameter>--without-guile</parameter></term> 57 <listitem> 58 <para>Although we are cross-compiling, configure tries to use 59 guile from the build host if it finds it. This makes compilation 60 fail, so this switch prevents using it.</para> 61 </listitem> 62 </varlistentry> 63 </variablelist> 50 64 51 65 <para>Compile the package:</para> … … 53 67 <screen><userinput remap="make">make</userinput></screen> 54 68 55 <para>The test suite needs to know where supporting perl files are located.56 We use an environment variable to accomplish this. To test the57 results, issue:</para>58 59 <screen><userinput remap="test">make check</userinput></screen>60 61 69 <para>Install the package:</para> 62 70 63 <screen><userinput remap="install">make install</userinput></screen>71 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 64 72 65 73 </sect2> 66 74 75 <sect2 role="content"> 76 <title/> 67 77 68 <sect2 id="contents-make" role="content"> 69 <title>Contents of Make</title> 70 71 <segmentedlist> 72 <segtitle>Installed program</segtitle> 73 74 <seglistitem> 75 <seg>make</seg> 76 </seglistitem> 77 </segmentedlist> 78 79 <variablelist> 80 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 81 <?dbfo list-presentation="list"?> 82 <?dbhtml list-presentation="table"?> 83 84 <varlistentry id="make"> 85 <term><command>make</command></term> 86 <listitem> 87 <para>Automatically determines which pieces of a package need to 88 be (re)compiled and then issues the relevant commands</para> 89 <indexterm zone="ch-system-make make"> 90 <primary sortas="b-make">make</primary> 91 </indexterm> 92 </listitem> 93 </varlistentry> 94 95 </variablelist> 78 <para>Details on this package are located in 79 <xref linkend="contents-make" role="."/></para> 96 80 97 81 </sect2> -
chapter06/ncurses.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-ncurses" role="wrap">8 <sect1 id="ch-tools-ncurses" role="wrap"> 9 9 <?dbhtml filename="ncurses.html"?> 10 10 … … 17 17 <title>Ncurses-&ncurses-version;</title> 18 18 19 <indexterm zone="ch- system-ncurses">19 <indexterm zone="ch-tools-ncurses"> 20 20 <primary sortas="a-Ncurses">Ncurses</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Ncurses package contains libraries for terminal-independent 27 handling of character screens.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/ncurses.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 28 30 29 31 <segmentedlist> … … 32 34 33 35 <seglistitem> 34 <seg>&ncurses- ch6-sbu;</seg>35 <seg>&ncurses- ch6-du;</seg>36 <seg>&ncurses-tmp-sbu;</seg> 37 <seg>&ncurses-tmp-du;</seg> 36 38 </seglistitem> 37 39 </segmentedlist> … … 42 44 <title>Installation of Ncurses</title> 43 45 44 <para>Don't install a static library that is not handled by configure:</para> 45 46 <screen><userinput remap="pre">sed -i '/LIBTOOL_INSTALL/d' c++/Makefile.in</userinput></screen> 46 <para>First, ensure that <command>gawk</command> is found first during configuration:</para> 47 48 <screen><userinput remap="pre">sed -i s/mawk// configure</userinput></screen> 49 50 <para>Then, run the following commands to build the <quote>tic</quote> 51 program on the build host:</para> 52 53 <screen><userinput remap="pre">mkdir build 54 pushd build 55 ../configure 56 make -C include 57 make -C progs tic 58 popd</userinput></screen> 47 59 48 60 <para>Prepare Ncurses for compilation:</para> 49 61 50 <screen arch="default"><userinput remap="configure">./configure --prefix=/usr \ 51 --mandir=/usr/share/man \ 52 --with-shared \ 53 --without-debug \ 54 --without-normal \ 55 --enable-pc-files \ 62 <screen><userinput remap="configure">./configure --prefix=/usr \ 63 --host=$LFS_TGT \ 64 --build=$(./config.guess) \ 65 --mandir=/usr/share/man \ 66 --with-manpage-format=normal \ 67 --with-shared \ 68 --without-debug \ 69 --without-ada \ 70 --without-normal \ 56 71 --enable-widec</userinput></screen> 57 <screen arch="ml_32,ml_x32,ml_all"><userinput remap="configure">./configure --prefix=/usr \58 --mandir=/usr/share/man \59 --with-shared \60 --without-debug \61 --without-normal \62 --enable-pc-files \63 --enable-widec \64 --with-pkg-config-libdir=/usr/lib/pkgconfig</userinput></screen>65 72 66 73 <variablelist> 67 74 <title>The meaning of the new configure options:</title> 75 76 <varlistentry> 77 <term><parameter>--with-manpage-format=normal</parameter></term> 78 <listitem> 79 <para>This prevents Ncurses installing compressed manual 80 pages, which may happen if the host distribution itself 81 has compressed manual pages.</para> 82 </listitem> 83 </varlistentry> 84 85 <varlistentry> 86 <term><parameter>--without-ada</parameter></term> 87 <listitem> 88 <para>This ensures that Ncurses does not build support for the Ada 89 compiler which may be present on the host but will not be available 90 once we enter the <command>chroot</command> environment.</para> 91 </listitem> 92 </varlistentry> 68 93 69 94 <varlistentry> … … 82 107 83 108 <varlistentry> 84 <term><parameter>--enable-pc-files</parameter></term>85 <listitem>86 <para>This switch generates and installs .pc files for pkg-config.87 </para>88 </listitem>89 </varlistentry>90 91 <varlistentry>92 109 <term><parameter>--without-normal</parameter></term> 93 110 <listitem> … … 97 114 </varlistentry> 98 115 99 <varlistentry arch="ml_32,ml_x32,ml_all">100 <term><parameter>--with-pkg-config-libdir=/usr/lib/pkgconfig</parameter></term>101 <listitem>102 <para>This switch forces .pc to be installed in /usr/lib/pkgconfig. If103 not set, .pc files gets installed in /usr/lib32 even for 64bit binaries.104 </para>105 </listitem>106 </varlistentry>107 108 116 </variablelist> 109 117 … … 112 120 <screen><userinput remap="make">make</userinput></screen> 113 121 114 <para>This package has a test suite, but it can only be run after the115 package has been installed. The tests reside in the116 <filename class="directory">test/</filename> directory. See the117 <filename>README</filename> file in that directory for further details.118 </para>119 120 122 <para>Install the package:</para> 121 122 <screen><userinput remap="install">make install</userinput></screen> 123 <!-- TODO: check and document --> 124 <screen><userinput remap="install">make DESTDIR=$LFS TIC_PATH=$(pwd)/build/progs/tic install 125 ln -s libncursesw.so $LFS/usr/lib/libncurses.so</userinput></screen> 123 126 124 127 <para>Move the shared libraries to the … … 126 129 expected to reside:</para> 127 130 128 <screen><userinput remap="install">mv -v /usr/lib/libncursesw.so.6*/lib</userinput></screen>131 <screen><userinput remap="install">mv -v $LFS/usr/lib/libncursesw.so.6* $LFS/lib</userinput></screen> 129 132 130 133 <para>Because the libraries have been moved, one symlink points to 131 134 a non-existent file. Recreate it:</para> 132 135 133 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink /usr/lib/libncursesw.so) /usr/lib/libncursesw.so</userinput></screen> 134 135 <para>Many applications still expect the linker to be able to find 136 non-wide-character Ncurses libraries. Trick such applications into linking with 137 wide-character libraries by means of symlinks and linker scripts:</para> 138 139 <screen><userinput remap="install">for lib in ncurses form panel menu ; do 140 rm -vf /usr/lib/lib${lib}.so 141 echo "INPUT(-l${lib}w)" > /usr/lib/lib${lib}.so 142 ln -sfv ${lib}w.pc /usr/lib/pkgconfig/${lib}.pc 143 done</userinput></screen> 144 145 <para>Finally, make sure that old applications that look for 146 <filename class="libraryfile">-lcurses</filename> at build time are still 147 buildable:</para> 148 149 <screen><userinput remap="install">rm -vf /usr/lib/libcursesw.so 150 echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so 151 ln -sfv libncurses.so /usr/lib/libcurses.so</userinput></screen> 152 153 <para>If desired, install the Ncurses documentation:</para> 154 155 <screen><userinput remap="install">mkdir -v /usr/share/doc/ncurses-&ncurses-version; 156 cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen> 157 158 <note> 159 <para>The instructions above don't create non-wide-character Ncurses 160 libraries since no package installed by compiling from sources would link 161 against them at runtime. However, the only known binary-only 162 applications that link against non-wide-character Ncurses libraries 163 require version 5. If you must have such libraries because of some binary-only 164 application or to be compliant with LSB, build the package again with the 165 following commands:</para> 166 167 <screen><userinput remap="install">make distclean 168 ./configure --prefix=/usr \ 169 --with-shared \ 170 --without-normal \ 171 --without-debug \ 172 --without-cxx-binding \ 173 --with-abi-version=5 174 make sources libs 175 cp -av lib/lib*.so.5* /usr/lib</userinput></screen> 176 177 </note> 136 <screen><userinput remap="install">ln -sfv ../../lib/$(readlink $LFS/usr/lib/libncursesw.so) $LFS/usr/lib/libncursesw.so</userinput></screen> 178 137 179 138 </sect2> 180 139 181 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> 182 183 <sect2 arch="ml_32,ml_all" role="installation"> 184 <title>Installation of Ncurses - 32-bit</title> 140 <!-- - - - - - - - - - --> 141 <!-- Multilib - 32bit --> 142 <!-- - - - - - - - - - --> 143 <sect2 arch="ml_32,ml_all"> 144 <title>Building Ncurses - 32bit</title> 185 145 186 146 <para>Clean previous build:</para> … … 188 148 <screen><userinput remap="pre">make distclean</userinput></screen> 189 149 190 <para>Prepare Ncurses for compilation:</para> 191 192 <screen><userinput remap="configure">CC="gcc -m32" CXX="g++ -m32" \ 193 ./configure --prefix=/usr \ 194 --libdir=/usr/lib32 \ 195 --mandir=/usr/share/man \ 196 --with-shared \ 197 --without-debug \ 198 --without-normal \ 199 --enable-pc-files \ 200 --enable-widec \ 201 --host=i686-pc-linux-gnu \ 202 --with-pkg-config-libdir=/usr/lib32/pkgconfig</userinput></screen> 150 <para>Prepare Ncurses for compilation:</para> 151 152 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -m32" \ 153 CXX="$LFS_TGT-g++ -m32" \ 154 ./configure --prefix=/usr \ 155 --host=$LFS_TGT32 \ 156 --libdir=&usr-lib-m32; \ 157 --mandir=/usr/share/man \ 158 --with-shared \ 159 --without-debug \ 160 --without-normal \ 161 --enable-pc-files \ 162 --enable-widec \ 163 --with-pkg-config-libdir=&usr-lib-m32;/pkgconfig</userinput></screen> 203 164 204 165 <para>Compile the package:</para> 205 166 206 <screen><userinput remap="make">make -j1</userinput></screen>167 <screen><userinput remap="make">make</userinput></screen> 207 168 208 169 <para>Install the package:</para> 209 170 210 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 211 for lib in ncurses form panel menu ; do 212 rm -vf DESTDIR/usr/lib32/lib${lib}.so 213 echo "INPUT(-l${lib}w)" > DESTDIR/usr/lib32/lib${lib}.so 214 ln -svf ${lib}w.pc DESTDIR/usr/lib32/pkgconfig/$lib.pc 215 done 216 rm -vf DESTDIR/usr/lib32/libcursesw.so 217 echo "INPUT(-lncursesw)" > DESTDIR/usr/lib32/libcursesw.so 218 ln -sfv libncurses.so DESTDIR/usr/lib32/libcurses.so 219 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 171 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install 172 ln -s libncursesw.so DESTDIR&usr-lib-m32;/libcursesw.so 173 cp -Rv DESTDIR&usr-lib-m32;/* $LFS&usr-lib-m32; 220 174 rm -rf DESTDIR</userinput></screen> 221 175 222 <para>If desired, make the version 5 libraries in 32bit as well:</para> 223 224 <screen><userinput remap="install">make distclean 225 CC="gcc -m32" CXX="g++ -m32" \ 226 ./configure --prefix=/usr \ 227 --with-shared \ 228 --without-normal \ 229 --without-debug \ 230 --without-cxx-binding \ 231 --with-abi-version=5 \ 232 --host=i686-pc-linux-gnu 233 make -j1 sources libs 234 cp -av lib/lib*.so.5* /usr/lib32</userinput></screen> 176 </sect2><!-- m32 --> 177 178 <!-- - - - - - - - - - --> 179 <!-- Multilib - x32bit --> 180 <!-- - - - - - - - - - --> 181 <sect2 arch="ml_x32,ml_all"> 182 <title>Building Ncurses - x32bit</title> 183 184 <para>Clean previous build:</para> 185 186 <screen><userinput remap="pre">make distclean</userinput></screen> 187 188 <para>Prepare Ncurses for compilation:</para> 189 190 <screen><userinput remap="configure">CC="$LFS_TGT-gcc -mx32" \ 191 CXX="$LFS_TGT-g++ -mx32" \ 192 ./configure --prefix=/usr \ 193 --host=$LFS_TGTX32 \ 194 --libdir=&usr-lib-mx32; \ 195 --mandir=/usr/share/man \ 196 --with-shared \ 197 --without-debug \ 198 --without-normal \ 199 --enable-pc-files \ 200 --enable-widec \ 201 --with-pkg-config-libdir=&usr-lib-mx32;/pkgconfig</userinput></screen> 202 203 <para>Compile the package:</para> 204 205 <screen><userinput remap="make">make</userinput></screen> 206 207 <para>Install the package:</para> 208 209 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR TIC_PATH=$(pwd)/build/progs/tic install 210 ln -s libncursesw.so DESTDIR&usr-lib-mx32;/libcursesw.so 211 cp -Rv DESTDIR&usr-lib-mx32;/* $LFS&usr-lib-mx32; 212 rm -rf DESTDIR</userinput></screen> 213 214 </sect2><!-- mx32 --> 215 216 <sect2 role="content"> 217 <title/> 218 219 <para>Details on this package are located in 220 <xref linkend="contents-ncurses" role="."/></para> 235 221 236 222 </sect2> 237 223 238 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ -->239 240 <sect2 arch="ml_x32,ml_all" role="installation">241 <title>Installation of Ncurses - x32-bit</title>242 243 <para>Clean previous build:</para>244 245 <screen><userinput remap="pre">make distclean</userinput></screen>246 247 <para>Prepare Ncurses for compilation:</para>248 249 <screen><userinput remap="configure">CC="gcc -mx32" CXX="g++ -mx32" \250 ./configure --prefix=/usr \251 --libdir=/usr/libx32 \252 --mandir=/usr/share/man \253 --with-shared \254 --without-debug \255 --without-normal \256 --enable-pc-files \257 --enable-widec \258 --host=x86_64-pc-linux-gnux32 \259 --with-pkg-config-libdir=/usr/libx32/pkgconfig</userinput></screen>260 261 <para>Compile the package:</para>262 263 <screen><userinput remap="make">make -j1</userinput></screen>264 265 <para>Install the package:</para>266 267 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install268 for lib in ncurses form panel menu ; do269 rm -vf DESTDIR/usr/libx32/lib${lib}.so270 echo "INPUT(-l${lib}w)" > DESTDIR/usr/libx32/lib${lib}.so271 ln -svf ${lib}w.pc DESTDIR/usr/libx32/pkgconfig/$lib.pc272 done273 rm -vf DESTDIR/usr/libx32/libcursesw.so274 echo "INPUT(-lncursesw)" > DESTDIR/usr/libx32/libcursesw.so275 ln -sfv libncurses.so DESTDIR/usr/libx32/libcurses.so276 cp -Rv DESTDIR/usr/libx32/* /usr/libx32277 rm -rf DESTDIR</userinput></screen>278 279 <!-- Any package out there which still needs version 5?280 Leave it out for x32bit for now.281 282 <para>If desired, make the version 5 libraries in x32bit as well:</para>283 284 <screen><userinput remap="install">make distclean285 CC="gcc -mx32" CXX="g++ -mx32" \286 ./configure - -prefix=/usr \287 - -with-shared \288 - -without-normal \289 - -without-debug \290 - -without-cxx-binding \291 - -with-abi-version=5292 make -j1 sources libs293 cp -av lib/lib*.so.5* /usr/libx32</userinput></screen>294 -->295 </sect2>296 297 <sect2 id="contents-ncurses" role="content">298 <title>Contents of Ncurses</title>299 300 <segmentedlist>301 <segtitle>Installed programs</segtitle>302 <segtitle>Installed libraries</segtitle>303 <segtitle>Installed directories</segtitle>304 305 <seglistitem>306 <seg>307 captoinfo (link to tic),308 clear,309 infocmp,310 infotocap (link to tic),311 ncursesw6-config,312 reset (link to tset),313 tabs,314 tic,315 toe,316 tput, and317 tset318 </seg>319 <seg>320 libcursesw.so (symlink and linker script to libncursesw.so),321 libformw.so,322 libmenuw.so,323 libncursesw.so,324 libncurses++w.a,325 libpanelw.so, and their non-wide-character counterparts without "w"326 in the library names.</seg>327 <seg>328 /usr/share/tabset,329 /usr/share/terminfo, and330 /usr/share/doc/ncurses-&ncurses-version;331 </seg>332 </seglistitem>333 </segmentedlist>334 335 <variablelist>336 <bridgehead renderas="sect3">Short Descriptions</bridgehead>337 <?dbfo list-presentation="list"?>338 <?dbhtml list-presentation="table"?>339 340 <varlistentry id="captoinfo">341 <term><command>captoinfo</command></term>342 <listitem>343 <para>Converts a termcap description into a terminfo description</para>344 <indexterm zone="ch-system-ncurses captoinfo">345 <primary sortas="b-captoinfo">captoinfo</primary>346 </indexterm>347 </listitem>348 </varlistentry>349 350 <varlistentry id="clear">351 <term><command>clear</command></term>352 <listitem>353 <para>Clears the screen, if possible</para>354 <indexterm zone="ch-system-ncurses clear">355 <primary sortas="b-clear">clear</primary>356 </indexterm>357 </listitem>358 </varlistentry>359 360 <varlistentry id="infocmp">361 <term><command>infocmp</command></term>362 <listitem>363 <para>Compares or prints out terminfo descriptions</para>364 <indexterm zone="ch-system-ncurses infocmp">365 <primary sortas="b-infocmp">infocmp</primary>366 </indexterm>367 </listitem>368 </varlistentry>369 370 <varlistentry id="infotocap">371 <term><command>infotocap</command></term>372 <listitem>373 <para>Converts a terminfo description into a termcap description</para>374 <indexterm zone="ch-system-ncurses infotocap">375 <primary sortas="b-infotocap">infotocap</primary>376 </indexterm>377 </listitem>378 </varlistentry>379 380 <varlistentry id="ncursesw6-config">381 <term><command>ncursesw6-config</command></term>382 <listitem>383 <para>Provides configuration information for ncurses</para>384 <indexterm zone="ch-system-ncurses ncursesw6-config">385 <primary sortas="b-ncursesw6-config">ncursesw6-config</primary>386 </indexterm>387 </listitem>388 </varlistentry>389 390 <varlistentry id="reset">391 <term><command>reset</command></term>392 <listitem>393 <para>Reinitializes a terminal to its default values</para>394 <indexterm zone="ch-system-ncurses reset">395 <primary sortas="b-reset">reset</primary>396 </indexterm>397 </listitem>398 </varlistentry>399 400 <varlistentry id="tabs">401 <term><command>tabs</command></term>402 <listitem>403 <para>Clears and sets tab stops on a terminal</para>404 <indexterm zone="ch-system-ncurses tabs">405 <primary sortas="b-tabs">tabs</primary>406 </indexterm>407 </listitem>408 </varlistentry>409 410 <varlistentry id="tic">411 <term><command>tic</command></term>412 <listitem>413 <para>The terminfo entry-description compiler that translates a414 terminfo file from source format into the binary format needed for the415 ncurses library routines [A terminfo file contains information on the416 capabilities of a certain terminal.]</para>417 <indexterm zone="ch-system-ncurses tic">418 <primary sortas="b-tic">tic</primary>419 </indexterm>420 </listitem>421 </varlistentry>422 423 <varlistentry id="toe">424 <term><command>toe</command></term>425 <listitem>426 <para>Lists all available terminal types, giving the primary name and427 description for each</para>428 <indexterm zone="ch-system-ncurses toe">429 <primary sortas="b-toe">toe</primary>430 </indexterm>431 </listitem>432 </varlistentry>433 434 <varlistentry id="tput">435 <term><command>tput</command></term>436 <listitem>437 <para>Makes the values of terminal-dependent capabilities available to438 the shell; it can also be used to reset or initialize a terminal or439 report its long name</para>440 <indexterm zone="ch-system-ncurses tput">441 <primary sortas="b-tput">tput</primary>442 </indexterm>443 </listitem>444 </varlistentry>445 446 <varlistentry id="tset">447 <term><command>tset</command></term>448 <listitem>449 <para>Can be used to initialize terminals</para>450 <indexterm zone="ch-system-ncurses tset">451 <primary sortas="b-tset">tset</primary>452 </indexterm>453 </listitem>454 </varlistentry>455 456 <varlistentry id="libcursesw">457 <term><filename class="libraryfile">libcursesw</filename></term>458 <listitem>459 <para>A link to <filename>libncursesw</filename></para>460 <indexterm zone="ch-system-ncurses libcursesw">461 <primary sortas="c-libcursesw">libcursesw</primary>462 </indexterm>463 </listitem>464 </varlistentry>465 466 <varlistentry id="libncursesw">467 <term><filename class="libraryfile">libncursesw</filename></term>468 <listitem>469 <para>Contains functions to display text in many complex ways on a470 terminal screen; a good example of the use of these functions is the471 menu displayed during the kernel's <command>make472 menuconfig</command></para>473 <indexterm zone="ch-system-ncurses libncursesw">474 <primary sortas="c-libncursesw">libncursesw</primary>475 </indexterm>476 </listitem>477 </varlistentry>478 479 <varlistentry id="libformw">480 <term><filename class="libraryfile">libformw</filename></term>481 <listitem>482 <para>Contains functions to implement forms</para>483 <indexterm zone="ch-system-ncurses libformw">484 <primary sortas="c-libformw">libformw</primary>485 </indexterm>486 </listitem>487 </varlistentry>488 489 <varlistentry id="libmenuw">490 <term><filename class="libraryfile">libmenuw</filename></term>491 <listitem>492 <para>Contains functions to implement menus</para>493 <indexterm zone="ch-system-ncurses libmenuw">494 <primary sortas="c-libmenuw">libmenuw</primary>495 </indexterm>496 </listitem>497 </varlistentry>498 499 <varlistentry id="libpanelw">500 <term><filename class="libraryfile">libpanelw</filename></term>501 <listitem>502 <para>Contains functions to implement panels</para>503 <indexterm zone="ch-system-ncurses libpanelw">504 <primary sortas="c-libpanelw">libpanelw</primary>505 </indexterm>506 </listitem>507 </varlistentry>508 509 </variablelist>510 511 </sect2>512 513 224 </sect1> -
chapter06/patch.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-patch" role="wrap">8 <sect1 id="ch-tools-patch" role="wrap"> 9 9 <?dbhtml filename="patch.html"?> 10 10 … … 17 17 <title>Patch-&patch-version;</title> 18 18 19 <indexterm zone="ch- system-patch">19 <indexterm zone="ch-tools-patch"> 20 20 <primary sortas="a-Patch">Patch</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 < para>The Patch package contains a program for modifying or creating files27 by applying a <quote>patch</quote> file typically created by the28 <command>diff</command> program.</para>27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/patch.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 29 30 30 31 <segmentedlist> … … 33 34 34 35 <seglistitem> 35 <seg>&patch- ch6-sbu;</seg>36 <seg>&patch- ch6-du;</seg>36 <seg>&patch-tmp-sbu;</seg> 37 <seg>&patch-tmp-du;</seg> 37 38 </seglistitem> 38 39 </segmentedlist> … … 45 46 <para>Prepare Patch for compilation:</para> 46 47 47 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess)</userinput></screen> 48 51 49 52 <para>Compile the package:</para> … … 51 54 <screen><userinput remap="make">make</userinput></screen> 52 55 53 <para>To test the results, issue:</para>54 55 <screen><userinput remap="test">make check</userinput></screen>56 57 56 <para>Install the package:</para> 58 57 59 <screen><userinput remap="install">make install</userinput></screen>58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 60 59 61 60 </sect2> 62 61 63 <sect2 id="contents-patch"role="content">64 <title >Contents of Patch</title>62 <sect2 role="content"> 63 <title/> 65 64 66 <segmentedlist> 67 <segtitle>Installed program</segtitle> 68 69 <seglistitem> 70 <seg>patch</seg> 71 </seglistitem> 72 </segmentedlist> 73 74 <variablelist> 75 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 76 <?dbfo list-presentation="list"?> 77 <?dbhtml list-presentation="table"?> 78 79 <varlistentry id="patch"> 80 <term><command>patch</command></term> 81 <listitem> 82 <para>Modifies files according to a patch file [A patch file is 83 normally a difference listing created with the <command>diff</command> 84 program. By applying these differences to the original files, 85 <command>patch</command> creates the patched versions.]</para> 86 <indexterm zone="ch-system-patch patch"> 87 <primary sortas="b-patch">patch</primary> 88 </indexterm> 89 </listitem> 90 </varlistentry> 91 92 </variablelist> 65 <para>Details on this package are located in 66 <xref linkend="contents-patch" role="."/></para> 93 67 94 68 </sect2> -
chapter06/sed.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-sed" role="wrap">8 <sect1 id="ch-tools-sed" role="wrap"> 9 9 <?dbhtml filename="sed.html"?> 10 10 … … 17 17 <title>Sed-&sed-version;</title> 18 18 19 <indexterm zone="ch- system-sed">19 <indexterm zone="ch-tools-sed"> 20 20 <primary sortas="a-Sed">Sed</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Sed package contains a stream editor.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/sed.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> 29 32 <segtitle>&buildtime;</segtitle> 30 33 <segtitle>&diskspace;</segtitle> 31 34 32 35 <seglistitem> 33 <seg>&sed- ch6-sbu;</seg>34 <seg>&sed- ch6-du;</seg>36 <seg>&sed-tmp-sbu;</seg> 37 <seg>&sed-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 41 44 <title>Installation of Sed</title> 42 45 43 <para>First fix an issue in the LFS environment:</para>44 45 <screen><userinput remap="pre">sed -i 's/usr/tools/' build-aux/help2man</userinput></screen>46 47 46 <para>Prepare Sed for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr --bindir=/bin</userinput></screen> 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --bindir=/bin</userinput></screen> 50 51 51 <para>Compile the package and generate the HTML documentation:</para>52 <para>Compile the package:</para> 52 53 53 <screen><userinput remap="make">make 54 make html</userinput></screen> 54 <screen><userinput remap="make">make</userinput></screen> 55 55 56 <para> To test the results, issue:</para>56 <para>Install the package:</para> 57 57 58 <screen><userinput remap="test">chown -Rv tester . 59 su tester -c "PATH=$PATH make check"</userinput></screen> 60 61 <para>Install the package and its documentation:</para> 62 63 <screen><userinput remap="install">make install 64 install -d -m755 /usr/share/doc/sed-&sed-version; 65 install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen> 58 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 66 59 67 60 </sect2> 68 61 69 <sect2 id="contents-sed"role="content">70 <title >Contents of Sed</title>62 <sect2 role="content"> 63 <title/> 71 64 72 <segmentedlist> 73 <segtitle>Installed program</segtitle> 74 <segtitle>Installed directory</segtitle> 75 76 <seglistitem> 77 <seg>sed</seg> 78 <seg>/usr/share/doc/sed-&sed-version;</seg> 79 </seglistitem> 80 </segmentedlist> 81 82 <variablelist> 83 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 84 <?dbfo list-presentation="list"?> 85 <?dbhtml list-presentation="table"?> 86 87 <varlistentry id="sed"> 88 <term><command>sed</command></term> 89 <listitem> 90 <para>Filters and transforms text files in a single pass</para> 91 <indexterm zone="ch-system-sed sed"> 92 <primary sortas="b-sed">sed</primary> 93 </indexterm> 94 </listitem> 95 </varlistentry> 96 97 </variablelist> 65 <para>Details on this package are located in 66 <xref linkend="contents-sed" role="."/></para> 98 67 99 68 </sect2> -
chapter06/tar.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-tar" role="wrap">8 <sect1 id="ch-tools-tar" role="wrap"> 9 9 <?dbhtml filename="tar.html"?> 10 10 … … 17 17 <title>Tar-&tar-version;</title> 18 18 19 <indexterm zone="ch- system-tar">19 <indexterm zone="ch-tools-tar"> 20 20 <primary sortas="a-Tar">Tar</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Tar package contains an archiving program.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/tar.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 27 30 28 31 <segmentedlist> … … 31 34 32 35 <seglistitem> 33 <seg>&tar- ch6-sbu;</seg>34 <seg>&tar- ch6-du;</seg>36 <seg>&tar-tmp-sbu;</seg> 37 <seg>&tar-tmp-du;</seg> 35 38 </seglistitem> 36 39 </segmentedlist> … … 43 46 <para>Prepare Tar for compilation:</para> 44 47 45 <screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 \ 46 ./configure --prefix=/usr \ 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess) \ 47 51 --bindir=/bin</userinput></screen> 48 49 <variablelist>50 <title>The meaning of the configure options:</title>51 52 <varlistentry>53 <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>54 <listitem>55 <para>This forces the test for <function>mknod</function> to be run56 as root. It is generally considered dangerous to run this test as57 the root user, but as it is being run on a system that has only been58 partially built, overriding it is OK.</para>59 </listitem>60 </varlistentry>61 </variablelist>62 52 63 53 <para>Compile the package:</para> … … 65 55 <screen><userinput remap="make">make</userinput></screen> 66 56 67 <para>To test the results (about 3 SBU), issue:</para>68 69 <screen><userinput remap="test">make check</userinput></screen>70 71 <!-- Seems to pass for version 1.31. Keeping as a comment just in case...72 <para>One test, link mismatch, is known to fail.</para>73 -->74 75 57 <para>Install the package:</para> 76 58 77 <screen><userinput remap="install">make install 78 make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen> 59 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 79 60 80 61 </sect2> 81 62 63 <sect2 role="content"> 64 <title/> 82 65 83 <sect2 id="contents-tar" role="content"> 84 <title>Contents of Tar</title> 85 86 <segmentedlist> 87 <segtitle>Installed programs</segtitle> 88 <segtitle>Installed directory</segtitle> 89 90 <seglistitem> 91 <seg>tar</seg> 92 <seg>/usr/share/doc/tar-&tar-version;</seg> 93 </seglistitem> 94 </segmentedlist> 95 96 <variablelist> 97 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 98 <?dbfo list-presentation="list"?> 99 <?dbhtml list-presentation="table"?> 100 101 <varlistentry id="tar"> 102 <term><command>tar</command></term> 103 <listitem> 104 <para>Creates, extracts files from, and lists the contents of archives, 105 also known as tarballs</para> 106 <indexterm zone="ch-system-tar tar"> 107 <primary sortas="b-tar">tar</primary> 108 </indexterm> 109 </listitem> 110 </varlistentry> 111 112 </variablelist> 66 <para>Details on this package are located in <xref linkend="contents-tar" role="."/></para> 113 67 114 68 </sect2> -
chapter06/xz.xml
r811b5a39 r6dfcfecc 6 6 ]> 7 7 8 <sect1 id="ch- system-xz" role="wrap">8 <sect1 id="ch-tools-xz" role="wrap"> 9 9 <?dbhtml filename="xz.html"?> 10 10 … … 17 17 <title>Xz-&xz-version;</title> 18 18 19 <indexterm zone="ch- system-xz">19 <indexterm zone="ch-tools-xz"> 20 20 <primary sortas="a-xz">Xz</primary> 21 <secondary>tools</secondary> 21 22 </indexterm> 22 23 … … 24 25 <title/> 25 26 26 <para>The Xz package contains programs for compressing and decompressing 27 files. It provides capabilities for the lzma and the newer xz compression 28 formats. Compressing text files with <command>xz</command> yields a better 29 compression percentage than with the traditional <command>gzip</command> or 30 <command>bzip2</command> commands.</para> 27 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" 28 href="../chapter08/xz.xml" 29 xpointer="xpointer(/sect1/sect2[1]/para[1])"/> 31 30 32 31 <segmentedlist> … … 35 34 36 35 <seglistitem> 37 <seg>&xz- ch6-sbu;</seg>38 <seg>&xz- ch6-du;</seg>36 <seg>&xz-tmp-sbu;</seg> 37 <seg>&xz-tmp-du;</seg> 39 38 </seglistitem> 40 39 </segmentedlist> … … 45 44 <title>Installation of Xz</title> 46 45 47 <para>Prepare Xz for compilation with:</para>46 <para>Prepare Xz for compilation:</para> 48 47 49 <screen><userinput remap="configure">./configure --prefix=/usr \ 50 --disable-static \ 48 <screen><userinput remap="configure">./configure --prefix=/usr \ 49 --host=$LFS_TGT \ 50 --build=$(build-aux/config.guess) \ 51 --disable-static \ 51 52 --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen> 52 53 53 <para>Compile the package:</para> 54 55 <screen><userinput remap="make">make</userinput></screen> 56 57 <para>To test the results, issue:</para> 58 59 <screen><userinput remap="test">make check</userinput></screen> 60 61 <para>Install the package and make sure that all essential files are in the 62 correct directory:</para> 63 64 <screen><userinput remap="install">make install 65 mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin 66 mv -v /usr/lib/liblzma.so.* /lib 67 ln -svf ../../lib/$(readlink /usr/lib/liblzma.so) /usr/lib/liblzma.so</userinput></screen> 68 69 </sect2> 70 71 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI 32 ~~~~~~~~~~~~~~~~~~~~ --> 72 73 <sect2 arch="ml_32,ml_all" role="installation"> 74 <title>Installation of Xz - 32-bit</title> 75 76 <para>Clean previous build:</para> 77 78 <screen><userinput remap="pre">make distclean</userinput></screen> 79 80 <para>Prepare Xz for compilation:</para> 81 82 <screen><userinput remap="configure">CC="gcc -m32" ./configure \ 83 --prefix=/usr \ 84 --disable-static \ 85 --libdir=/usr/lib32 \ 86 --host=i686-pc-linux-gnu</userinput></screen> 87 88 <para>Compile the package:</para> 54 <para>Compile the package:</para> 89 55 90 56 <screen><userinput remap="make">make</userinput></screen> … … 92 58 <para>Install the package:</para> 93 59 94 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 95 cp -Rv DESTDIR/usr/lib32/* /usr/lib32 96 rm -rf DESTDIR</userinput></screen> 60 <screen><userinput remap="install">make DESTDIR=$LFS install</userinput></screen> 61 62 <para>Make sure that all essential files are in the correct directory:</para> 63 64 <screen><userinput remap="install">mv -v $LFS/usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} $LFS/bin 65 mv -v $LFS/usr/lib/liblzma.so.* $LFS/lib 66 ln -svf ../../lib/$(readlink $LFS/usr/lib/liblzma.so) $LFS/usr/lib/liblzma.so</userinput></screen> 97 67 98 68 </sect2> 99 69 100 <!-- ~~~~~~~~~~~~~~~~~~~~ ABI x32 ~~~~~~~~~~~~~~~~~~~~ --> 101 102 <sect2 arch="ml_x32,ml_all" role="installation"> 103 <title>Installation of Xz - x32-bit</title> 104 105 <para>Clean previous build:</para> 106 107 <screen><userinput remap="pre">make distclean</userinput></screen> 108 109 <para>Prepare Xz for compilation:</para> 110 111 <screen><userinput remap="configure">CC="gcc -mx32" ./configure \ 112 --prefix=/usr \ 113 --disable-static \ 114 --libdir=/usr/libx32 \ 115 --host=x86_64-pc-linux-gnux32</userinput></screen> 116 117 <para>Compile the package:</para> 118 119 <screen><userinput remap="make">make</userinput></screen> 120 121 <para>Install the package:</para> 122 123 <screen><userinput remap="install">make DESTDIR=$PWD/DESTDIR install 124 cp -Rv DESTDIR/usr/libx32/* /usr/libx32 125 rm -rf DESTDIR</userinput></screen> 126 127 </sect2> 128 129 <sect2 id="contents-xz" role="content"> 130 <title>Contents of Xz</title> 131 132 <segmentedlist> 133 <segtitle>Installed programs</segtitle> 134 <segtitle>Installed libraries</segtitle> 135 <segtitle>Installed directories</segtitle> 136 137 <seglistitem> 138 <seg> 139 lzcat (link to xz), 140 lzcmp (link to xzdiff), 141 lzdiff (link to xzdiff), 142 lzegrep (link to xzgrep), 143 lzfgrep (link to xzgrep), 144 lzgrep (link to xzgrep), 145 lzless (link to xzless), 146 lzma (link to xz), 147 lzmadec, 148 lzmainfo, 149 lzmore (link to xzmore), 150 unlzma (link to xz), 151 unxz (link to xz), 152 xz, 153 xzcat (link to xz), 154 xzcmp (link to xzdiff), 155 xzdec, 156 xzdiff, 157 xzegrep (link to xzgrep), 158 xzfgrep (link to xzgrep), 159 xzgrep, 160 xzless, and 161 xzmore</seg> 162 <seg> 163 liblzma.so 164 </seg> 165 <seg> 166 /usr/include/lzma and 167 /usr/share/doc/xz-&xz-version; 168 </seg> 169 </seglistitem> 170 </segmentedlist> 171 172 <variablelist> 173 <bridgehead renderas="sect3">Short Descriptions</bridgehead> 174 <?dbfo list-presentation="list"?> 175 <?dbhtml list-presentation="table"?> 176 177 <varlistentry id="lzcat"> 178 <term><command>lzcat</command></term> 179 <listitem> 180 <para>Decompresses to standard output</para> 181 <indexterm zone="ch-system-xz lzcat"> 182 <primary sortas="b-lzcat">lzcat</primary> 183 </indexterm> 184 </listitem> 185 </varlistentry> 186 187 <varlistentry id="lzcmp"> 188 <term><command>lzcmp</command></term> 189 <listitem> 190 <para>Runs <command>cmp</command> on LZMA compressed files</para> 191 <indexterm zone="ch-system-xz lzcmp"> 192 <primary sortas="b-lzcmp">lzcmp</primary> 193 </indexterm> 194 </listitem> 195 </varlistentry> 196 197 <varlistentry id="lzdiff"> 198 <term><command>lzdiff</command></term> 199 <listitem> 200 <para>Runs <command>diff</command> on LZMA compressed files</para> 201 <indexterm zone="ch-system-xz lzdiff"> 202 <primary sortas="b-lzdiff">lzdiff</primary> 203 </indexterm> 204 </listitem> 205 </varlistentry> 206 207 <varlistentry id="lzegrep"> 208 <term><command>lzegrep</command></term> 209 <listitem> 210 <para>Runs <command>egrep</command> on LZMA compressed files</para> 211 <indexterm zone="ch-system-xz lzegrep"> 212 <primary sortas="b-lzegrep">lzegrep</primary> 213 </indexterm> 214 </listitem> 215 </varlistentry> 216 217 <varlistentry id="lzfgrep"> 218 <term><command>lzfgrep</command></term> 219 <listitem> 220 <para>Runs <command>fgrep</command> on LZMA compressed files</para> 221 <indexterm zone="ch-system-xz lzfgrep"> 222 <primary sortas="b-lzfgrep">lzfgrep</primary> 223 </indexterm> 224 </listitem> 225 </varlistentry> 226 227 <varlistentry id="lzgrep"> 228 <term><command>lzgrep</command></term> 229 <listitem> 230 <para>Runs <command>grep</command> on LZMA compressed files</para> 231 <indexterm zone="ch-system-xz lzgrep"> 232 <primary sortas="b-lzgrep">lzgrep</primary> 233 </indexterm> 234 </listitem> 235 </varlistentry> 236 237 <varlistentry id="lzless"> 238 <term><command>lzless</command></term> 239 <listitem> 240 <para>Runs <command>less</command> on LZMA compressed files</para> 241 <indexterm zone="ch-system-xz lzless"> 242 <primary sortas="b-lzless">lzless</primary> 243 </indexterm> 244 </listitem> 245 </varlistentry> 246 247 <varlistentry id="lzma"> 248 <term><command>lzma</command></term> 249 <listitem> 250 <para>Compresses or decompresses files using the LZMA format</para> 251 <indexterm zone="ch-system-xz lzma"> 252 <primary sortas="b-lzma">lzma</primary> 253 </indexterm> 254 </listitem> 255 </varlistentry> 256 257 <varlistentry id="lzmadec"> 258 <term><command>lzmadec</command></term> 259 <listitem> 260 <para>A small and fast decoder for LZMA compressed files</para> 261 <indexterm zone="ch-system-xz lzmadec"> 262 <primary sortas="b-lzmadec">lzmadec</primary> 263 </indexterm> 264 </listitem> 265 </varlistentry> 266 267 <varlistentry id="lzmainfo"> 268 <term><command>lzmainfo</command></term> 269 <listitem> 270 <para>Shows information stored in the LZMA compressed file header</para> 271 <indexterm zone="ch-system-xz lzmainfo"> 272 <primary sortas="b-lzmainfo">lzmainfo</primary> 273 </indexterm> 274 </listitem> 275 </varlistentry> 276 277 <varlistentry id="lzmore"> 278 <term><command>lzmore</command></term> 279 <listitem> 280 <para>Runs <command>more</command> on LZMA compressed files</para> 281 <indexterm zone="ch-system-xz lzmore"> 282 <primary sortas="b-lzmamore">lzmore</primary> 283 </indexterm> 284 </listitem> 285 </varlistentry> 286 287 <varlistentry id="unlzma"> 288 <term><command>unlzma</command></term> 289 <listitem> 290 <para>Decompresses files using the LZMA format</para> 291 <indexterm zone="ch-system-xz unlzma"> 292 <primary sortas="b-unlzma">unlzma</primary> 293 </indexterm> 294 </listitem> 295 </varlistentry> 296 297 <varlistentry id="unxz"> 298 <term><command>unxz</command></term> 299 <listitem> 300 <para>Decompresses files using the XZ format</para> 301 <indexterm zone="ch-system-xz unxz"> 302 <primary sortas="b-unxz">unxz</primary> 303 </indexterm> 304 </listitem> 305 </varlistentry> 306 307 <varlistentry id="xz"> 308 <term><command>xz</command></term> 309 <listitem> 310 <para>Compresses or decompresses files using the XZ format</para> 311 <indexterm zone="ch-system-xz xz"> 312 <primary sortas="b-xz">xz</primary> 313 </indexterm> 314 </listitem> 315 </varlistentry> 316 317 <varlistentry id="xzcat"> 318 <term><command>xzcat</command></term> 319 <listitem> 320 <para>Decompresses to standard output</para> 321 <indexterm zone="ch-system-xz xzcat"> 322 <primary sortas="b-xzcat">xzcat</primary> 323 </indexterm> 324 </listitem> 325 </varlistentry> 326 327 <varlistentry id="xzcmp"> 328 <term><command>xzcmp</command></term> 329 <listitem> 330 <para>Runs <command>cmp</command> on XZ compressed files</para> 331 <indexterm zone="ch-system-xz xzcmp"> 332 <primary sortas="b-xzcmp">xzcmp</primary> 333 </indexterm> 334 </listitem> 335 </varlistentry> 336 337 <varlistentry id="xzdec"> 338 <term><command>xzdec</command></term> 339 <listitem> 340 <para>A small and fast decoder for XZ compressed files</para> 341 <indexterm zone="ch-system-xz xzdec"> 342 <primary sortas="b-xzdec">xzdec</primary> 343 </indexterm> 344 </listitem> 345 </varlistentry> 346 347 <varlistentry id="xzdiff"> 348 <term><command>xzdiff</command></term> 349 <listitem> 350 <para>Runs <command>diff</command> on XZ compressed files</para> 351 <indexterm zone="ch-system-xz xzdiff"> 352 <primary sortas="b-xzdiff">xzdiff</primary> 353 </indexterm> 354 </listitem> 355 </varlistentry> 356 357 <varlistentry id="xzegrep"> 358 <term><command>xzegrep</command></term> 359 <listitem> 360 <para>Runs <command>egrep</command> on XZ compressed files</para> 361 <indexterm zone="ch-system-xz xzegrep"> 362 <primary sortas="b-xzegrep">xzegrep</primary> 363 </indexterm> 364 </listitem> 365 </varlistentry> 366 367 <varlistentry id="xzfgrep"> 368 <term><command>xzfgrep</command></term> 369 <listitem> 370 <para>Runs <command>fgrep</command> on XZ compressed files</para> 371 <indexterm zone="ch-system-xz xzfgrep"> 372 <primary sortas="b-xzfgrep">xzfgrep</primary> 373 </indexterm> 374 </listitem> 375 </varlistentry> 376 377 <varlistentry id="xzgrep"> 378 <term><command>xzgrep</command></term> 379 <listitem> 380 <para>Runs <command>grep</command> on XZ compressed files</para> 381 <indexterm zone="ch-system-xz xzgrep"> 382 <primary sortas="b-xzgrep">xzgrep</primary> 383 </indexterm> 384 </listitem> 385 </varlistentry> 386 387 <varlistentry id="xzless"> 388 <term><command>xzless</command></term> 389 <listitem> 390 <para>Runs <command>less</command> on XZ compressed files</para> 391 <indexterm zone="ch-system-xz xzless"> 392 <primary sortas="b-xzless">xzless</primary> 393 </indexterm> 394 </listitem> 395 </varlistentry> 396 397 <varlistentry id="xzmore"> 398 <term><command>xzmore</command></term> 399 <listitem> 400 <para>Runs <command>more</command> on XZ compressed files</para> 401 <indexterm zone="ch-system-xz xzmore"> 402 <primary sortas="b-xzmore">xzmore</primary> 403 </indexterm> 404 </listitem> 405 </varlistentry> 406 407 <varlistentry id="liblzma"> 408 <term><filename class="libraryfile">liblzma</filename></term> 409 <listitem> 410 <para>The library implementing lossless, block-sorting data 411 compression, using the Lempel-Ziv-Markov chain algorithm</para> 412 <indexterm zone="ch-system-xz liblzma"> 413 <primary sortas="c-liblzma">liblzma</primary> 414 </indexterm> 415 </listitem> 416 </varlistentry> 417 418 </variablelist> 70 <sect2 role="content"> 71 <title/> 72 <para>Details on this package are located in <xref linkend="contents-xz" role="."/></para> 419 73 420 74 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.