Changeset b92d4b3 for introduction/important/unpacking.xml
- Timestamp:
- 05/07/2005 12:23:20 PM (19 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 12.2, 6.1, 6.2, 6.2.0, 6.2.0-rc1, 6.2.0-rc2, 6.3, 6.3-rc1, 6.3-rc2, 6.3-rc3, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gimp3, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/for-12.3, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/spidermonkey128, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- f88c4ee
- Parents:
- d5f2a3f
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
introduction/important/unpacking.xml
rd5f2a3f rb92d4b3 7 7 8 8 <sect1 id="intro-important-unpacking"> 9 <sect1info> 10 <othername>$LastChangedBy$</othername> 11 <date>$Date$</date> 12 </sect1info> 9 <?dbhtml filename="unpacking.html"?> 13 10 14 <?dbhtml filename="unpacking.html"?> 15 <title>Notes on building software</title> 11 <sect1info> 12 <othername>$LastChangedBy$</othername> 13 <date>$Date$</date> 14 </sect1info> 16 15 17 <para>Those people who have built an <acronym>LFS</acronym> system will be aware 18 of the general principles of downloading and unpacking software. We will 19 however repeat some of that information here for those new to building 20 their own software.</para> 16 <title>Notes on Building Software</title> 21 17 22 <para>Each set of installation instructions contains a <acronym>URL</acronym>23 from which you can download the package. We do however keep a selection of 24 patches available via http. These are referenced as needed in the 25 installation instructions.</para>18 <para>Those people who have built an LFS system will be aware 19 of the general principles of downloading and unpacking software. We will 20 however repeat some of that information here for those new to building 21 their own software.</para> 26 22 27 <para>While you can keep the source files anywhere you like, we 28 assume that you have unpacked them and unzipped any required patches 29 into <filename>/usr/src</filename>.</para> 23 <para>Each set of installation instructions contains a URL from which you 24 can download the package. We do however keep a selection of patches 25 available via http. These are referenced as needed in the installation 26 instructions.</para> 30 27 31 <para>We can not emphasize strongly enough that you should start from a 32 <emphasis>clean source tree</emphasis> each time. This means that if 33 you have had an error, it's usually best to delete the source tree and 34 re-unpack it <emphasis>before</emphasis> trying again. This obviously 35 doesn't apply if you're an advanced user used to hacking Makefiles and C 36 code, but if in doubt, start from a clean tree.</para> 28 <para>While you can keep the source files anywhere you like, we 29 assume that you have unpacked them and unzipped any required patches 30 into <filename>/usr/src</filename>.</para> 37 31 38 <sect2> 39 <title>Unpacking the software</title> 32 <para>We can not emphasize strongly enough that you should start from a 33 <emphasis>clean source tree</emphasis> each time. This means that if 34 you have had an error, it's usually best to delete the source tree and 35 re-unpack it <emphasis>before</emphasis> trying again. This obviously 36 doesn't apply if you're an advanced user used to hacking Makefiles and C 37 code, but if in doubt, start from a clean tree.</para> 40 38 41 <para>If a file is tar'ed and compressed, it is unpacked by running one of 42 the following commands:</para>39 <sect2> 40 <title>Unpacking the Software</title> 43 41 44 <screen><command>tar -xf filename.tar.gz 45 tar -xf filename.tgz 46 tar -xf filename.tar.Z 47 tar -xf filename.tar.bz2</command></screen> 42 <para>If a file is tar'ed and compressed, it is unpacked by running one of 43 the following commands:</para> 48 44 49 <para>You can also use a slightly different method:</para> 45 <screen><command>tar -xvf filename.tar.gz 46 tar -xvf filename.tgz 47 tar -xvf filename.tar.Z 48 tar -xvf filename.tar.bz2</command></screen> 49 50 <para>You can also use a slightly different method:</para> 50 51 51 52 <screen><command>bzcat filename.tar.bz2 | tar -xv</command></screen> 52 53 53 <para>Finally, you sometimes need to be able to unpack patches which are 54 generally not tar'ed. The best way to do this is to copy the patch file to 55 <filename>/usr/src</filename> and then to run one of the following commands 56 depending on whether the file is .gz or .bz2:</para> 54 <para>Finally, you sometimes need to be able to unpack patches which are 55 generally not tar'ed. The best way to do this is to copy the patch file to 56 <filename>/usr/src</filename> and then to run one of the following commands 57 depending on whether the file is <filename>.gz</filename> or 58 <filename>.bz2</filename>:</para> 57 59 58 <screen><command>gunzip patchname.gz59 bunzip2 patchname.bz2</command></screen>60 <screen><command>gunzip -v patchname.gz 61 bunzip2 -v patchname.bz2</command></screen> 60 62 61 </sect2>63 </sect2> 62 64 63 <sect2>64 <title>Verifying file integrity using md5sum</title>65 <sect2> 66 <title>Verifying File Integrity Using 'md5sum'</title> 65 67 66 <para>Generally, to verify that the downloaded file is genuine and complete,67 most package maintainers also distribute md5sums of the files.68 To verify the md5sum of the downloaded files, download both the file and the69 corresponding md5sum file to the same directory (preferably from different70 on-line locations), and (assuming file.md5sum is the md5sum file downloaded)71 run the following command:</para>68 <para>Generally, to verify that the downloaded file is genuine and complete, 69 most package maintainers also distribute md5sums of the files. 70 To verify the md5sum of the downloaded files, download both the file and the 71 corresponding md5sum file to the same directory (preferably from different 72 on-line locations), and (assuming file.md5sum is the md5sum file downloaded) 73 run the following command:</para> 72 74 73 75 <screen><command>md5sum -c file.md5sum</command></screen> 74 76 75 <para>If there are any errors, they will be reported.</para>77 <para>If there are any errors, they will be reported.</para> 76 78 77 </sect2>79 </sect2> 78 80 79 <sect2>80 <title>Creating Log files during installation</title>81 <sect2> 82 <title>Creating Log Files During Installation</title> 81 83 82 <para>For larger packages, it is convenient to create log files instead of83 staring at the screen hoping to catch a particular error or warning. Log files84 are also useful for debugging and keeping records. The following command85 allows you to create an installation log. Replace <command> with the86 command you intend to execute.</para>84 <para>For larger packages, it is convenient to create log files instead of 85 staring at the screen hoping to catch a particular error or warning. Log files 86 are also useful for debugging and keeping records. The following command 87 allows you to create an installation log. Replace <command> with the 88 command you intend to execute.</para> 87 89 88 90 <screen><command>( <command> 2>&1 | tee compile.log && exit $PIPESTATUS )</command></screen> 89 91 90 <para><parameter>2>&1</parameter> redirects error messages 91 to the same location as standard output. The <command>tee</command> command 92 allows viewing of the output while logging the results to a file. The parentheses 93 around the command run the entire command in a subshell and finally the 94 <command>exit $PIPESTATUS</command> ensures the result of the <command> 95 is returned as the result and not the result of the <command>tee</command> command.</para> 92 <para><option>2>&1</option> redirects error messages to the same 93 location as standard output. The <command>tee</command> command allows 94 viewing of the output while logging the results to a file. The parentheses 95 around the command run the entire command in a subshell and finally the 96 <command>exit $PIPESTATUS</command> ensures the result of the 97 <command> is returned as the result and not the result of the 98 <command>tee</command> command.</para> 96 99 97 </sect2>100 </sect2> 98 101 99 102 </sect1>
Note:
See TracChangeset
for help on using the changeset viewer.