[baseline of web page quozl@us.netrek.org**20060823075521] { addfile ./doc/index.phtml hunk ./doc/index.phtml 1 + +An APT with random-access removable media HOWTO
+by James Cameron, 2005-10-25

+ +

No .deb should ever have to be downloaded more than once!
(a Pathetic fallacy used for the purposes of illustration)

+ +

Synopsis

+ + Describes how to upgrade non-connected or low-speed linked + Debian systems using APT with random-access removable media.

+ + Package is a set of shell scripts.

+ +

Usage Cases

+ + + +The essence of it is to keep a per-target dpkg(8) status file and run +"apt-get --download-only dist-upgrade" against a prepared directory, +like this:

+ +

+ +More detail below.

+ +

Resources

+ + + +

Using Darcs

+ +Darcs is a distributed revision control system by David Roundy +designed to replace centralised CVS. apt-walkabout is provided via +darcs to encourage contributions.

+ + + + + + + + + + + + + + + + + + + + + + + + +
install darcs :apt-get install darcs
checkout initial copy :darcs get http://quozl.linux.org.au/darcs/apt-walkabout
(this creates a directory apt-walkabout in your current directory)
propose a change :darcs record
darcs send

(this sends a mail to me with your changes)
update :darcs pull
(this updates your directory with changes made by me and others)
+ +

+ +

ChangeLog for 0.9-5 released 2005-08-20

+ + + +

APT Normality

+ + On a normal system APT is used to maintain a list of package + sources (/etc/apt/sources.list), a set of downloaded package + lists (/var/lib/apt/lists), and a cache of downloaded package + archives (/var/cache/apt/archives).

+ +

+ + The update phase downloads the package lists from the + internet. The dist-upgrade phase downloads the packages and + installs them.

+ +

+ +

apt-walkabout

+ + With apt-walkabout, we operate on removable media instead of + using the root filesystem. A status file for each target + system is kept, and a package list and archives cache is + maintained.

+ +

+ + The package lists are downloaded from the internet, the + upgrade is simulated to fetch the packages using the + per-target status file, and when the media is mounted on the + target system the changes can be applied.

+ +

+ + A fetch can be run for each remote target system being + administered; all the packages required are downloaded to the + removable media.

+ + Timing comparison, side by side, old method, vs apt-walkabout:

+ + + + + + + + +
normal +
    +
  • visit the target, (or ssh to it), +
  • download packages using target's internet connection, +
  • go home. +
interim +
    +
  • download some packages, or most of them, e.g. my apt cache, cut to a CD or take a laptop, +
  • visit them, +
  • install packages, download missing, have a drink while stressing over it, +
  • go home. +
walkabout +
    +
  • download all packages required, +
  • visit them, +
  • install packages, no download required, +
  • have a drink without stress, +
  • go home. +
+ +

Types of removable media

+ + +

Types of random-access removable media

+ + +

Relevant features of APT

+ + +

Assumptions

+ + +

Basic Procedure

+ + +

Phase 0, Structure

+ +Aim: to build filesystem structure on removable media.

+Why: to enable the following procedures to work.

+

+

Phase 1, Adoption

+ + Aim: obtain the list of package versions installed.

+ Why: so that the fetch phase knows what to get.

+

+

Phase 2, Delta

+ + Aim: to update the package list on the media.

+ Why: so that the fetch phase knows what to get.

+ Why: so that the target system can be updated with the new list.

+

+

Phase 3, Fetch

+ + Aim: to download the packages required by a target system.

+ Why: so that the packages can be carried on the media.

+

+

Phase 4, Apply

+ + Aim: to update the target system's package list.

+ Aim: to upgrade the target system packages from the media.

+

+

Phase 5, Purge

+ + Aim: to maintain free space on the media.

+ Why: to prevent a fetch from failing due to lack of space.

+

+

Procedure Summary

+ + }