Apt-mirror
download: apt-mirror.cgi.
README:
APT-MIRROR
----------
Description:
Apt-mirror is a perl script that acts as a proxy for apt-get. It runs from
your regular (local) webserver, and saves every file that was retrieved to a
local directory structure. File are served from local disk if they weren't
changed on the web/ftp server. This can save a lot of bandwidth if you have
multiple Debian machines behind a slow Internet link.
Features:
* When retrieving files, the contents are at the same time sent to the client
and saved on disk, so the user can monitor the progress of the download.
* The files stored in the mirror directory can be used as a local Debian
mirror.
Installation:
* Make sure libwww-perl is installed.
* Put the script somewhere where it can be executed by your webserver.
* Change $mirrordir at the top of the script to the location of the mirrored
files. Make sure this directory is writable by the user the cgi runs as.
* Put lines like
deb http://yourserver/apt-mirror.cgi/ftp/ftp.nl.debian.org/debian
potato main contrib non-free
or
deb http://yourserver/apt-mirror.cgi/http/security.debian.org/
potato/updates main contrib non-free
in your sources.list.
Drawbacks:
* When ftp urls are used, there is a noticable delay before each file
download. The reason for this delay is that for every file a separate ftp
session is started. Without apt-mirror, apt-get can use a single ftp
session for all files.
Possible future enhancements:
* Auto-delete package files when a new version is downloaded.
* Reuse ftp sessions
* If a mirror doesn't work, automatically switch to a different Debian mirror.
Copyright:
Apt-mirror is (c) copyright 2000 Eric Lammerts
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
A copy of the GNU General Public License is available on the World Wide Web
at `http://www.gnu.org/copyleft/gpl.html'. You can also obtain it by
writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.