apt-zip8
Use apt with removable media
Usage
apt-zip-list [--help]
[--version]
[--medium=mountpoint]
[--aptgetaction=action]
[--packages=package
[,package ...]]
[--fix-broken]
[--skip-mount]
[--method=method]
[--options=opt
[,opt ...]]
[{--accept=accept
[,accept ...] | --reject=reject
[,reject ...]}]
apt-zip-inst [--help]
[--version]
[--medium=mountpoint]
[--aptgetaction=action]
[--packages=package
[,package ...]]
[--fix-broken]
[--skip-mount]
Overview
This manpage should be up-to-date with version 0.17 of the programs.
The apt-zip-list and apt-zip-inst commands simplify the upgrade process of a non-networked Debian host using apt(8), by using (preferably high-capacity) removable media, like a ZIP drive.
apt-zip-list produces two files. One is a script that can be used on another host (maybe not running a Debian system) to fetch packages previously selected in dselect(8) or indicated in the command line, the other apt-zip.options saves the options used by apt-zip-list to indicate to apt-zip-inst what action to perform and/or which packages to install. Various types of scripts can be generated, by specifying a fetch method supported by the host that will fetch the packages. If you prefer, the script may generate a tarball containing the fetched packages. Note that apt-zip-list can be called as a non-root user.
The name of the script (as well as the name of the tarfile when using the tar option) contains the name of the Debian host for which the packages are to be fetched. Thus you can, using the same medium, upgrade several hosts at the same time, provided you have enough space on this disk. This should work with or without the tar option.
The script is written to the removable medium, which is mounted if necessary, and then restored to the original unmounted state when applicable. It is the responsibility of the user then to run the script on a host that will fetch the packages, and to have them (or the generated archive) copied to the removable medium.
When back on your Debian host, you just run apt-zip-inst, which will take care of the script-produced files, and call apt(8) to install the packages on your disk.
Options
Common options
-
--help, -h -
Show summary of options.
-
--version, -V -
Show version of program.
-
--medium, -m -
Select a removable medium other than the site default. See also
--skip-mount.
-
--aptgetaction, -a -
Select the action done by apt-get. Possible actions are
dselect-upgrade,upgradeanddist-upgrade.If
--packagesis not set the default isdselect-upgrade(See also apt-zip.conf), if it is set none is selected.
-
--packages, -p -
Comma-separated list of extra packages to install.
-
--fix-broken, -f -
Run
apt-getwith the--fix-brokenoption. See apt-get(8) for more details.
-
--skip-mount, -s -
Allow specifying a non-mountpoint directory to the
--mediumoption. This may help on laptops only getting point-to-point networking without being routed to. This is also useful while testing the program, as it allows sending the script into /tmp.
-
--use-sleep=SEC, -S -
Introduces waiting times between downloaded files. Allows the genearation of a fetch script that will wait some time (configurable). The number parameter represents the delay between consecutive dowloads. Note that this option is safe: even if the connected machine does not have a
waitcommand, the script will not fail.
-
--no-checksum, --no-md5, -5 -
This option will command to apt-zip-list to create a script which does not make any sha256sum checks. Note that if this option is not given at script generation time, the sha256sum command will be called only after it has been found in the system. (--no-md5 is maintained for script compatibility, but there is only sha256)
Options for apt-zip-list
-
--method, -M -
Select a method other than the default one. The
wgetandwget-dosmethods are currently supported.
-
--options, -o -
Specifies a set of options to be used while generating the script. A warning is issued only if an option is unkown to
apt-zip-list, but all known options may not be supported by all methods. Options may be given a value, with the option=value syntax.Currently available options include:
tar[=gnutarprogram]-
causes the dowloaded files to be grouped into a tarball. The name of a
tarprogram on the download machine can be specified, if different fromtar. Example:tar=gtar.When used in conjunction with the
restartoption, a GNUtarmust be specified, so that 2 tarballs man be concatenated - this is only needed on the 3rd and subsequent runs of the fetch script.
restart-
causes the downloaded files to be grouped into a tarball.
-
--accept , -A / --reject , -R -
Comma-separated list of accepted/rejected protocols for download. By default are only accepted http and ftp.
Config file
The /etc/apt/apt-zip.conf file can be used to set defaults: method, removable medium, options, apt-get action and accepted/rejected protocols. It is a self-explainatory bourne-shell script snippet. It allows to provide site defaults for command-line options.
Method API
A method is handled by an executable object (usually a script) placed in the /usr/share/apt-zip/methods/ directory. This executable is fed on standard input with the output of apt-get --print-uris.
It is communicated the state of requested options using for each option an environment variables named OPTION_OPTNAME, where OPTNAME is the uppercased name of an option.
Additional environment variables are also set, such as APTZIPVERSION, APTZIPTARFILE, APTZIPINSFILE, and OPTIONS.
Limitations
- •
-
Only one disk can be used. If your packages do not fit on one, you have to deselect some packages using dselect(8) or you have to select a suitable list of package.
- •
-
The files on an Internet distribution site can change rather frequently. It is up to the user to make sure the site was not updated between the build of the fetch script by
apt-zip-listand the fetch itself, otherwise some required files may not be possible to fetch.
Files
/etc/apt/apt-zip.conf
/usr/share/apt-zip/methods/
Releases
7 releases since Debian 2.2 (Potato); the text changed 3 times.
--accept since Debian 3.0 (Woody);
--aptgetaction since Debian 3.0 (Woody);
--no-checksum since Debian 5.0 (Lenny);
--no-md5 since Debian 4.0 (Etch);
--packages since Debian 3.0 (Woody);
--reject since Debian 3.0 (Woody);
--use-sleep since Debian 4.0 (Etch);
-5 since Debian 4.0 (Etch);
-A since Debian 3.0 (Woody);
-R since Debian 3.0 (Woody);
-S since Debian 4.0 (Etch);
-a since Debian 3.0 (Woody);
-p since Debian 3.0 (Woody);
-s since Debian 4.0 (Etch).