Tagged unpacking.xml

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4016 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
Manuel Canales Esparcia 2005-05-07 12:23:20 +00:00
parent d5f2a3f4c9
commit b92d4b394e

View File

@ -6,23 +6,24 @@
]>
<sect1 id="intro-important-unpacking">
<?dbhtml filename="unpacking.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<?dbhtml filename="unpacking.html"?>
<title>Notes on building software</title>
<title>Notes on Building Software</title>
<para>Those people who have built an <acronym>LFS</acronym> system will be aware
<para>Those people who have built an LFS system will be aware
of the general principles of downloading and unpacking software. We will
however repeat some of that information here for those new to building
their own software.</para>
<para>Each set of installation instructions contains a <acronym>URL</acronym>
from which you can download the package. We do however keep a selection of
patches available via http. These are referenced as needed in the
installation instructions.</para>
<para>Each set of installation instructions contains a URL from which you
can download the package. We do however keep a selection of patches
available via http. These are referenced as needed in the installation
instructions.</para>
<para>While you can keep the source files anywhere you like, we
assume that you have unpacked them and unzipped any required patches
@ -36,15 +37,15 @@ doesn't apply if you're an advanced user used to hacking Makefiles and C
code, but if in doubt, start from a clean tree.</para>
<sect2>
<title>Unpacking the software</title>
<title>Unpacking the Software</title>
<para>If a file is tar'ed and compressed, it is unpacked by running one of
the following commands:</para>
<screen><command>tar -xf filename.tar.gz
tar -xf filename.tgz
tar -xf filename.tar.Z
tar -xf filename.tar.bz2</command></screen>
<screen><command>tar -xvf filename.tar.gz
tar -xvf filename.tgz
tar -xvf filename.tar.Z
tar -xvf filename.tar.bz2</command></screen>
<para>You can also use a slightly different method:</para>
@ -53,15 +54,16 @@ tar -xf filename.tar.bz2</command></screen>
<para>Finally, you sometimes need to be able to unpack patches which are
generally not tar'ed. The best way to do this is to copy the patch file to
<filename>/usr/src</filename> and then to run one of the following commands
depending on whether the file is .gz or .bz2:</para>
depending on whether the file is <filename>.gz</filename> or
<filename>.bz2</filename>:</para>
<screen><command>gunzip patchname.gz
bunzip2 patchname.bz2</command></screen>
<screen><command>gunzip -v patchname.gz
bunzip2 -v patchname.bz2</command></screen>
</sect2>
<sect2>
<title>Verifying file integrity using md5sum</title>
<title>Verifying File Integrity Using 'md5sum'</title>
<para>Generally, to verify that the downloaded file is genuine and complete,
most package maintainers also distribute md5sums of the files.
@ -77,7 +79,7 @@ run the following command:</para>
</sect2>
<sect2>
<title>Creating Log files during installation</title>
<title>Creating Log Files During Installation</title>
<para>For larger packages, it is convenient to create log files instead of
staring at the screen hoping to catch a particular error or warning. Log files
@ -87,12 +89,13 @@ command you intend to execute.</para>
<screen><command>( &lt;command&gt; 2&gt;&amp;1 | tee compile.log &amp;&amp; exit $PIPESTATUS )</command></screen>
<para><parameter>2&gt;&amp;1</parameter> redirects error messages
to the same location as standard output. The <command>tee</command> command
allows viewing of the output while logging the results to a file. The parentheses
<para><option>2&gt;&amp;1</option> redirects error messages to the same
location as standard output. The <command>tee</command> command allows
viewing of the output while logging the results to a file. The parentheses
around the command run the entire command in a subshell and finally the
<command>exit $PIPESTATUS</command> ensures the result of the &lt;command&gt;
is returned as the result and not the result of the <command>tee</command> command.</para>
<command>exit $PIPESTATUS</command> ensures the result of the
&lt;command&gt; is returned as the result and not the result of the
<command>tee</command> command.</para>
</sect2>