[f45b1953] | 1 | <sect1 id="intro-important-unpacking">
|
---|
| 2 | <?dbhtml filename="unpacking.html" dir="introduction"?>
|
---|
| 3 | <title>Getting and unpacking the software</title>
|
---|
| 4 |
|
---|
[acfc391] | 5 | <para>Those people who have built a <acronym>LFS</acronym> system will be aware
|
---|
| 6 | of the general principles of downloading and unpacking software. We will
|
---|
[f45b1953] | 7 | however repeat some of that information here for those new to building
|
---|
| 8 | their own software.</para>
|
---|
| 9 |
|
---|
[acfc391] | 10 | <para>Each set of installation instructions contains a <acronym>URL</acronym>
|
---|
| 11 | from which you can download the package. We do however keep a selection of
|
---|
| 12 | patches available via http. These are referenced as needed in the
|
---|
[f45b1953] | 13 | installation instructions.</para>
|
---|
| 14 |
|
---|
[5e18c49c] | 15 | <para>While you can keep the source <acronym>TAR</acronym> balls anywhere you like, we
|
---|
[f45b1953] | 16 | assume that you have unpacked them and unzipped any required patches
|
---|
| 17 | into <filename>/usr/src</filename>.</para>
|
---|
| 18 |
|
---|
[64d97b7c] | 19 | <para>We can not emphasize strongly enough that you should start from a
|
---|
[f45b1953] | 20 | <emphasis>clean source tree</emphasis> each time. This means that if
|
---|
| 21 | you have had an error, it's usually best to delete the source tree and
|
---|
| 22 | re-unpack it <emphasis>before</emphasis> trying again. This obviously
|
---|
| 23 | doesn't apply if you're an advanced user used to hacking Makefiles and C
|
---|
| 24 | code, but if in doubt, start from a clean tree.</para>
|
---|
| 25 |
|
---|
| 26 | <sect2>
|
---|
| 27 | <title>Unpacking the software</title>
|
---|
| 28 |
|
---|
| 29 | <para>If a file is tar'ed and gzip'ed, it is unpacked by running one of
|
---|
| 30 | the following two commands, depending on the filename:</para>
|
---|
| 31 |
|
---|
[acfc391] | 32 | <screen><command>tar -xvzf filename.tar.gz
|
---|
[75d7f3d7] | 33 | tar -xvzf filename.tgz
|
---|
[acfc391] | 34 | tar -xvzf filename.tar.Z</command></screen>
|
---|
[f45b1953] | 35 |
|
---|
| 36 | <para>If a file is tar'ed and bzip2'ed, it can usually be unpacked by
|
---|
| 37 | running:</para>
|
---|
| 38 |
|
---|
[acfc391] | 39 | <screen><command>tar -jxvf filename.tar.bz2</command></screen>
|
---|
[f45b1953] | 40 |
|
---|
[acfc391] | 41 | <para>You can also use a slightly different method:</para>
|
---|
[f45b1953] | 42 |
|
---|
[acfc391] | 43 | <screen><command>bzcat filename.tar.bz2 | tar -xv</command></screen>
|
---|
[f45b1953] | 44 |
|
---|
| 45 | <para>Finally, you need to be able to unpack patches which are generally
|
---|
[5628618e] | 46 | not tar'ed. The best way to do this is to copy the patch file to
|
---|
[f45b1953] | 47 | <filename>/usr/src</filename> and then to run one of the following
|
---|
| 48 | commands depending on whether the file is .gz or .bz2:</para>
|
---|
| 49 |
|
---|
[acfc391] | 50 | <screen><command>gunzip patchname.gz
|
---|
| 51 | bunzip2 patchname.bz2</command></screen>
|
---|
[f45b1953] | 52 |
|
---|
| 53 | </sect2>
|
---|
| 54 |
|
---|
| 55 | </sect1>
|
---|