mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-24 15:12:11 +08:00
Tagged unpacking.xml
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4016 af4574ff-66df-0310-9fd7-8a98e5e911e0
This commit is contained in:
parent
d5f2a3f4c9
commit
b92d4b394e
@ -6,94 +6,97 @@
|
|||||||
]>
|
]>
|
||||||
|
|
||||||
<sect1 id="intro-important-unpacking">
|
<sect1 id="intro-important-unpacking">
|
||||||
<sect1info>
|
<?dbhtml filename="unpacking.html"?>
|
||||||
<othername>$LastChangedBy$</othername>
|
|
||||||
<date>$Date$</date>
|
|
||||||
</sect1info>
|
|
||||||
|
|
||||||
<?dbhtml filename="unpacking.html"?>
|
<sect1info>
|
||||||
<title>Notes on building software</title>
|
<othername>$LastChangedBy$</othername>
|
||||||
|
<date>$Date$</date>
|
||||||
|
</sect1info>
|
||||||
|
|
||||||
<para>Those people who have built an <acronym>LFS</acronym> system will be aware
|
<title>Notes on Building Software</title>
|
||||||
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>
|
<para>Those people who have built an LFS system will be aware
|
||||||
from which you can download the package. We do however keep a selection of
|
of the general principles of downloading and unpacking software. We will
|
||||||
patches available via http. These are referenced as needed in the
|
however repeat some of that information here for those new to building
|
||||||
installation instructions.</para>
|
their own software.</para>
|
||||||
|
|
||||||
<para>While you can keep the source files anywhere you like, we
|
<para>Each set of installation instructions contains a URL from which you
|
||||||
assume that you have unpacked them and unzipped any required patches
|
can download the package. We do however keep a selection of patches
|
||||||
into <filename>/usr/src</filename>.</para>
|
available via http. These are referenced as needed in the installation
|
||||||
|
instructions.</para>
|
||||||
|
|
||||||
<para>We can not emphasize strongly enough that you should start from a
|
<para>While you can keep the source files anywhere you like, we
|
||||||
<emphasis>clean source tree</emphasis> each time. This means that if
|
assume that you have unpacked them and unzipped any required patches
|
||||||
you have had an error, it's usually best to delete the source tree and
|
into <filename>/usr/src</filename>.</para>
|
||||||
re-unpack it <emphasis>before</emphasis> trying again. This obviously
|
|
||||||
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>
|
<para>We can not emphasize strongly enough that you should start from a
|
||||||
<title>Unpacking the software</title>
|
<emphasis>clean source tree</emphasis> each time. This means that if
|
||||||
|
you have had an error, it's usually best to delete the source tree and
|
||||||
|
re-unpack it <emphasis>before</emphasis> trying again. This obviously
|
||||||
|
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>
|
||||||
|
|
||||||
<para>If a file is tar'ed and compressed, it is unpacked by running one of
|
<sect2>
|
||||||
the following commands:</para>
|
<title>Unpacking the Software</title>
|
||||||
|
|
||||||
<screen><command>tar -xf filename.tar.gz
|
<para>If a file is tar'ed and compressed, it is unpacked by running one of
|
||||||
tar -xf filename.tgz
|
the following commands:</para>
|
||||||
tar -xf filename.tar.Z
|
|
||||||
tar -xf filename.tar.bz2</command></screen>
|
|
||||||
|
|
||||||
<para>You can also use a slightly different method:</para>
|
<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>
|
||||||
|
|
||||||
<screen><command>bzcat filename.tar.bz2 | tar -xv</command></screen>
|
<screen><command>bzcat filename.tar.bz2 | tar -xv</command></screen>
|
||||||
|
|
||||||
<para>Finally, you sometimes need to be able to unpack patches which are
|
<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
|
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
|
<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
|
<screen><command>gunzip -v patchname.gz
|
||||||
bunzip2 patchname.bz2</command></screen>
|
bunzip2 -v patchname.bz2</command></screen>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<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,
|
<para>Generally, to verify that the downloaded file is genuine and complete,
|
||||||
most package maintainers also distribute md5sums of the files.
|
most package maintainers also distribute md5sums of the files.
|
||||||
To verify the md5sum of the downloaded files, download both the file and the
|
To verify the md5sum of the downloaded files, download both the file and the
|
||||||
corresponding md5sum file to the same directory (preferably from different
|
corresponding md5sum file to the same directory (preferably from different
|
||||||
on-line locations), and (assuming file.md5sum is the md5sum file downloaded)
|
on-line locations), and (assuming file.md5sum is the md5sum file downloaded)
|
||||||
run the following command:</para>
|
run the following command:</para>
|
||||||
|
|
||||||
<screen><command>md5sum -c file.md5sum</command></screen>
|
<screen><command>md5sum -c file.md5sum</command></screen>
|
||||||
|
|
||||||
<para>If there are any errors, they will be reported.</para>
|
<para>If there are any errors, they will be reported.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<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
|
<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
|
staring at the screen hoping to catch a particular error or warning. Log files
|
||||||
are also useful for debugging and keeping records. The following command
|
are also useful for debugging and keeping records. The following command
|
||||||
allows you to create an installation log. Replace <command> with the
|
allows you to create an installation log. Replace <command> with the
|
||||||
command you intend to execute.</para>
|
command you intend to execute.</para>
|
||||||
|
|
||||||
<screen><command>( <command> 2>&1 | tee compile.log && exit $PIPESTATUS )</command></screen>
|
<screen><command>( <command> 2>&1 | tee compile.log && exit $PIPESTATUS )</command></screen>
|
||||||
|
|
||||||
<para><parameter>2>&1</parameter> redirects error messages
|
<para><option>2>&1</option> redirects error messages to the same
|
||||||
to the same location as standard output. The <command>tee</command> command
|
location as standard output. The <command>tee</command> command allows
|
||||||
allows viewing of the output while logging the results to a file. The parentheses
|
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
|
around the command run the entire command in a subshell and finally the
|
||||||
<command>exit $PIPESTATUS</command> ensures the result of the <command>
|
<command>exit $PIPESTATUS</command> ensures the result of the
|
||||||
is returned as the result and not the result of the <command>tee</command> command.</para>
|
<command> is returned as the result and not the result of the
|
||||||
|
<command>tee</command> command.</para>
|
||||||
|
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
</sect1>
|
</sect1>
|
||||||
|
Loading…
Reference in New Issue
Block a user