From b92d4b394e3471eba322efe21309c884ea51916d Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 7 May 2005 12:23:20 +0000 Subject: [PATCH] Tagged unpacking.xml git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@4016 af4574ff-66df-0310-9fd7-8a98e5e911e0 --- introduction/important/unpacking.xml | 129 ++++++++++++++------------- 1 file changed, 66 insertions(+), 63 deletions(-) diff --git a/introduction/important/unpacking.xml b/introduction/important/unpacking.xml index c31b37b28d..7c0e329e29 100644 --- a/introduction/important/unpacking.xml +++ b/introduction/important/unpacking.xml @@ -6,94 +6,97 @@ ]> - - $LastChangedBy$ - $Date$ - + - -Notes on building software + + $LastChangedBy$ + $Date$ + -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. + Notes on Building Software -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. + 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. -While you can keep the source files anywhere you like, we -assume that you have unpacked them and unzipped any required patches -into /usr/src. + 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. -We can not emphasize strongly enough that you should start from a -clean source tree each time. This means that if -you have had an error, it's usually best to delete the source tree and -re-unpack it before 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. + While you can keep the source files anywhere you like, we + assume that you have unpacked them and unzipped any required patches + into /usr/src. - -Unpacking the software + We can not emphasize strongly enough that you should start from a + clean source tree each time. This means that if + you have had an error, it's usually best to delete the source tree and + re-unpack it before 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. -If a file is tar'ed and compressed, it is unpacked by running one of -the following commands: + + Unpacking the Software -tar -xf filename.tar.gz -tar -xf filename.tgz -tar -xf filename.tar.Z -tar -xf filename.tar.bz2 + If a file is tar'ed and compressed, it is unpacked by running one of + the following commands: -You can also use a slightly different method: +tar -xvf filename.tar.gz +tar -xvf filename.tgz +tar -xvf filename.tar.Z +tar -xvf filename.tar.bz2 + + You can also use a slightly different method: bzcat filename.tar.bz2 | tar -xv -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 -/usr/src and then to run one of the following commands -depending on whether the file is .gz or .bz2: + 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 + /usr/src and then to run one of the following commands + depending on whether the file is .gz or + .bz2: -gunzip patchname.gz -bunzip2 patchname.bz2 +gunzip -v patchname.gz +bunzip2 -v patchname.bz2 - + - -Verifying file integrity using md5sum + + Verifying File Integrity Using 'md5sum' -Generally, to verify that the downloaded file is genuine and complete, -most package maintainers also distribute md5sums of the files. -To verify the md5sum of the downloaded files, download both the file and the -corresponding md5sum file to the same directory (preferably from different -on-line locations), and (assuming file.md5sum is the md5sum file downloaded) -run the following command: + Generally, to verify that the downloaded file is genuine and complete, + most package maintainers also distribute md5sums of the files. + To verify the md5sum of the downloaded files, download both the file and the + corresponding md5sum file to the same directory (preferably from different + on-line locations), and (assuming file.md5sum is the md5sum file downloaded) + run the following command: md5sum -c file.md5sum -If there are any errors, they will be reported. + If there are any errors, they will be reported. - + - -Creating Log files during installation + + Creating Log Files During Installation -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 -are also useful for debugging and keeping records. The following command -allows you to create an installation log. Replace <command> with the -command you intend to execute. + 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 + are also useful for debugging and keeping records. The following command + allows you to create an installation log. Replace <command> with the + command you intend to execute. ( <command> 2>&1 | tee compile.log && exit $PIPESTATUS ) -2>&1 redirects error messages -to the same location as standard output. The tee 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 -exit $PIPESTATUS ensures the result of the <command> -is returned as the result and not the result of the tee command. + redirects error messages to the same + location as standard output. The tee 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 + exit $PIPESTATUS ensures the result of the + <command> is returned as the result and not the result of the + tee command. - +