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