Chapter three of the book details fetching and uncompressing
all the packages and patches we need for our system. That is 78
downloads, and some of the packages are difficult to find. Also, the system
basically requires that all of the different versions be exactly as
specified, which makes it even more difficult. Lucky for us, our the LFS
authors created a nice list of the packages that wget can
use to download them all at once.The little script below encapsulates
essentially all of chapter three's directions.
Obtaining the Packages and Patches
First, we are going to use the second hard drive's mount point as the
directory that will hold all of the packages and patches. This directory gets
the special sticky permission. What this does is it allows anyone
to write to the directory, but only a file's owner can delete it. We will then
use wget to download all of the file's from a list that is
included with our book. We will also check that all the files are correct
by comparing their MD5 checksums to a list of pre-calculated
checksums.
chmod -v a+wt $LFS/sources pushd $LFS/sources wget -i ~/Desktop/LFS/wget-list -P $LFS/sources md5sum -c ~/Desktop/LFS/md5sums popd
As of Febuary 5, 2014 the URL for shadow included included in the wget-list file is incorrect. It has to be downloaded separately. Also because of this error, the md5sum check will issue a single warning, this can be ignored.
wget http://cdn.debian.net/debian/pool/main/s/shadow/shadow_4.1.5.1.orig.tar.gz