-<!doctype debiandoc system>
<!-- -*- mode: sgml; mode: fold -*- -->
+<!doctype debiandoc PUBLIC "-//DebianDoc//DTD DebianDoc//EN">
<book>
<title>Using APT Offline</title>
<author>Jason Gunthorpe <email>jgg@debian.org</email></author>
-<version>$Id: offline.sgml,v 1.3 2001/02/20 07:03:17 jgg Exp $</version>
+<version>$Id: offline.sgml,v 1.8 2003/02/12 15:06:41 doogie Exp $</version>
<abstract>
This document describes how to use APT in a non-networked environment,
<p>
For more details, on Debian GNU/Linux systems, see the file
-/usr/doc/copyright/GPL for the full license.
+/usr/share/common-licenses/GPL for the full license.
</copyright>
<toc sect>
is to use APT to generate a list of packages that are required and then fetch
them onto the disc using another machine with good connectivity. It is
even possible to use another Debian machine with APT or to use a completely
-different OS and a download tool like wget.
+different OS and a download tool like wget. Let <em>remote host</em> mean the
+machine downloading the packages, and <em>target host</em> the one with bad or
+no connection.
<p>
This is achieved by creatively manipulating the APT configuration file. The
The configuration file should tell APT to store its files on the disc and
to use the configuration files on the disc as well. The sources.list should
contain the proper sites that you wish to use from the remote machine, and
-the status file should be a copy of <em>/var/lib/dpkg/status</em>. Please note,
-if you are using a local archive you must use copy URIs, the syntax is identical
-to file URIs.
+the status file should be a copy of <em>/var/lib/dpkg/status</em> from the
+<em>target host</em>. Please note, if you are using a local archive you must use
+copy URIs, the syntax is identical to file URIs.
<p>
<em>apt.conf</em> must contain the necessary information to make APT use the
APT
{
/* This is not necessary if the two machines are the same arch, it tells
- the remote APT what architecture the Debian machine is */
+ the remote APT what architecture the target machine is */
Architecture "i386";
Get::Download-Only "true";
// Binary caches will be stored locally
Cache::archives "/disc/archives/";
-
+ Cache "/tmp/";
+
// Location of the source list.
Etc "/disc/";
};
</example>
More details can be seen by examining the apt.conf man page and the sample
-configuration file in <em>/usr/doc/apt/examples/apt.conf</em>.
+configuration file in <em>/usr/share/doc/apt/examples/apt.conf</em>.
<p>
-On the remote Debian machine the first thing to do is mount the disc and copy
+On the target machine the first thing to do is mount the disc and copy
<em>/var/lib/dpkg/status</em> to it. You will also need to create the directories
outlined in the Overview, <em>archives/partial/</em> and <em>lists/partial/</em>
Then take the disc to the remote machine and configure the sources.list.
# apt-get update
[ APT fetches the package files ]
# apt-get dist-upgrade
- [ APT fetches all the packages needed to upgrade your machine ]
+ [ APT fetches all the packages needed to upgrade the target machine ]
</example>
The dist-upgrade command can be replaced with any-other standard APT commands,
-particularly dselect-upgrad. You can even use an APT front end such as
+particularly dselect-upgrade. You can even use an APT front end such as
<em>dselect</em> However this presents a problem in communicating your
selections back to the local computer.
<p>
Now the disc contains all of the index files and archives needed to upgrade
-the Debian machine. Take the disc back and run:
+the target machine. Take the disc back and run:
<example>
# export APT_CONFIG="/disc/apt.conf"
# apt-get check
[ APT generates a local copy of the cache files ]
- # apt-get --no-d -o dir::etc::status=/var/lib/dpkg/status dist-upgrade
+ # apt-get --no-d -o dir::state::status=/var/lib/dpkg/status dist-upgrade
[ Or any other APT command ]
</example>