Files
glfs/introduction/welcome/packages.xml

89 lines
3.7 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
]>
<sect1 id="packages" xreflabel="Getting the Source Packages">
<?dbhtml filename="packages.html"?>
<title>Getting the Source Packages</title>
<para>Within the GLFS instructions, each package has a reference for
finding the source files for the package&mdash;a link
(some packages may not list any, in which case it is a group of packages
meant to be installed in bulk and the book will instruct you on how to
install all the files necessary). Every effort has been made to ensure that
these links are accurate. However, the World Wide Web is in continuous flux.
Packages are sometimes moved or updated and the exact URL specified is not
always available.</para>
<para>The BLFS Team noticed this problem with BLFS, so they, with the
assistance of Oregon State University Open Source Lab, have made a
site available through world wide mirrors. See <ulink
url="https://www.linuxfromscratch.org/blfs/download.html#sources"/>
for a list. These sites have all the sources of the exact versions of the
packages used in BLFS. If you can't find the BLFS or GLFS package you need at
the listed addresses, get it from these sites.</para>
<para>We would like to ask a favor, however. Although this is a public
resource for you to use, please do not abuse it. They have already had one
unthinking individual download over 3 GB of data, including multiple copies of
the same files that are placed at different locations (via symlinks) to make
finding the right package easier. This person clearly did not know what files
he needed and downloaded everything. The best place to download files
is the site or sites set up by the source code developer. Please try
there first.</para>
<para>As for GLFS, some packages listed here are not on BLFS or their site.
In such a case, we do not have a solution at the moment besides going to the
developer(s) and/or their website.</para>
<sect2>
<title>Obtaining the Source Packages in Bulk</title>
<para>
Obtaining all the source packages all at once is not recommended as
you will probably pull in packages you won't want. However, it is
certainly a convenient option if you have the disk space to spare and may
be necessary if the LFS system cannot download any source code, but
another system can, such as the host you built the LFS target from.
</para>
<note><para>
This process depends on <xref linkend="wget"/>. It also depends on a
working internet connection. If you just got done with LFS and are not
yet booted into the new system yet, then it is recommended to navigate to
<filename class="directory">$LFS/sources</filename> then follow the below
instructions on the host system outside of a chroot.
</para></note>
<para>
First navigate to the directory you want the downloaded source code and
patches to be, then download <ulink url="../wget-list">wget-list</ulink>.
After that, download the packages and patches by doing the following:
</para>
<screen><userinput>wget -N --input-file=wget-list --continue</userinput></screen>
<para>
To verify every file has been downloaded, you can run the following:
</para>
<screen><userinput>for file in $(grep -v '^#' wget-list); do
if [ ! -f $(basename $file) ]; then
echo "$(basename $file) NOT found"
fi
done</userinput></screen>
<para>
If every file got downloaded, there should be no output from the above
commands.
</para>
</sect2>
</sect1>